buzzcasting-utils 1.14.0 → 1.14.3

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 CHANGED
@@ -29,6 +29,7 @@ import { html2json, json2html, uniq, log, hashSum } from 'buzzcasting-utils' //
29
29
  - [documentation/html-json-conversion.md](documentation/html-json-conversion.md) — `html2json`/`json2html` (`window.__bc.h2j`/`.j2h`), the algorithm behind how a slide's builder-authored JSON round-trips to real HTML.
30
30
  - [documentation/type-inconsistencies.md](documentation/type-inconsistencies.md) — where a declared type disagrees with how it's actually used at runtime (most importantly `ISeries.items`), and which of several overlapping "same concept" interfaces (response envelopes, layout trees) is the one that actually matters.
31
31
  - [documentation/known-issues.md](documentation/known-issues.md) — confirmed bugs (e.g. `rtl()`/`dir()` disagreeing about Malayalam) and utility functions that have been forked and quietly diverged elsewhere in the stack (`flatten`, `intToString`, `sendEvent`).
32
+ - [documentation/release-process.md](documentation/release-process.md) — `npm run release` bumps/tags/pushes locally, but the actual `npm publish` now happens in CI on that tag push (via npm Trusted Publishing/OIDC, no stored token) - what to do if a release run fails.
32
33
 
33
34
  ## Development
34
35
 
@@ -40,6 +41,7 @@ npm run test:watch
40
41
  npm run test:coverage
41
42
  npm run lint # eslint . --fix
42
43
  npm run docs # regenerate docs/ (typedoc)
44
+ npm run release # bump version, changelog, tag, push - CI publishes to npm
43
45
  ```
44
46
 
45
47
  ### Git Clone
@@ -29,6 +29,11 @@ export declare interface AreaStyle {
29
29
 
30
30
  export declare function attachedMedia(message: IMessage): IAttachedMedia_2;
31
31
 
32
+ declare interface Attr_2 {
33
+ class: string[];
34
+ edit?: string;
35
+ }
36
+
32
37
  export declare function attrs(attributes: NamedNodeMap): any;
33
38
 
34
39
  export declare const awaitElement: (selector: string) => Promise<unknown>;
@@ -55,6 +60,13 @@ export declare const camelToHyphen: (str: string) => string;
55
60
 
56
61
  export declare const capitalizeFirstLetter: (prop: string) => string;
57
62
 
63
+ declare interface Child {
64
+ node: string;
65
+ tag: string;
66
+ attr?: Attr_2;
67
+ child: Child[];
68
+ }
69
+
58
70
  /**
59
71
  * Clear Container range contents of template code when the web component is connected to the DOM
60
72
  * @param myNode
@@ -97,6 +109,15 @@ export declare interface Content {
97
109
  attr: MessagesAttr;
98
110
  }
99
111
 
112
+ declare interface Content_2 {
113
+ editable: boolean;
114
+ path: string;
115
+ query: string;
116
+ text: string;
117
+ node: string;
118
+ attr: Attr_2;
119
+ }
120
+
100
121
  export declare interface CountriesGeometry {
101
122
  type: GeoType;
102
123
  arcs: Array<Array<number[] | number>>;
@@ -1356,6 +1377,16 @@ export declare interface IShowSeries {
1356
1377
  debug?: boolean;
1357
1378
  }
1358
1379
 
1380
+ export declare interface ISlideLayout {
1381
+ sections: Sections;
1382
+ slide: Slide;
1383
+ widgets: Widgets;
1384
+ zones: Zones;
1385
+ animation: number;
1386
+ interval: number;
1387
+ label: string;
1388
+ }
1389
+
1359
1390
  export declare interface ISlides {
1360
1391
  presentation: string;
1361
1392
  slides: any;
@@ -1608,6 +1639,16 @@ export declare function rtl(message: IMessage): {
1608
1639
 
1609
1640
  export declare function sanitize(messages: IMessage[]): IMessage[];
1610
1641
 
1642
+ declare interface Section {
1643
+ area: string;
1644
+ "grid-area": string;
1645
+ widgets: string[];
1646
+ }
1647
+
1648
+ declare interface Sections {
1649
+ [x: string]: Section;
1650
+ }
1651
+
1611
1652
  export declare interface Series {
1612
1653
  data: number[];
1613
1654
  type: string;
@@ -1650,6 +1691,11 @@ export declare interface Settings {
1650
1691
  component: Component;
1651
1692
  }
1652
1693
 
1694
+ declare interface Settings_2 {
1695
+ contents: Content_2[];
1696
+ components: any[];
1697
+ }
1698
+
1653
1699
  export declare enum ShapeType {
1654
1700
  MultiPolygon = "MultiPolygon",
1655
1701
  Polygon = "Polygon"
@@ -1659,6 +1705,20 @@ export declare function showModal(e: MouseEvent, widget: any, message: IMessage,
1659
1705
 
1660
1706
  export declare function shuffleMessages(messages: IMessage[]): IMessage[];
1661
1707
 
1708
+ declare interface Slide {
1709
+ id: string;
1710
+ label: string;
1711
+ cols: number;
1712
+ rows: number;
1713
+ width: string;
1714
+ height: string;
1715
+ backgrounds: string[];
1716
+ zones: string[];
1717
+ interval: string;
1718
+ animation: string;
1719
+ "animation-speed": string;
1720
+ }
1721
+
1662
1722
  export declare class Snowflake {
1663
1723
  /**
1664
1724
  * The generators epoch timestamp in milliseconds.
@@ -1755,8 +1815,21 @@ export declare const unique: (arr: any) => unknown[];
1755
1815
 
1756
1816
  export declare const upDownColor: (change: number) => "text-down text-xs" | "text-up text-xs" | "text-white text-xs";
1757
1817
 
1818
+ declare interface Widget {
1819
+ node: string;
1820
+ child: Child[];
1821
+ settings: Settings_2;
1822
+ template: string;
1823
+ label: string;
1824
+ type?: string;
1825
+ }
1826
+
1758
1827
  export declare function widgetParams(query: IQuery): IQuery;
1759
1828
 
1829
+ declare interface Widgets {
1830
+ [x: string]: Widget;
1831
+ }
1832
+
1760
1833
  export declare const wrapPromise: (promise: any, delay: number, reason: string) => Promise<any>;
1761
1834
 
1762
1835
  export declare interface XAxis {
@@ -1774,4 +1847,20 @@ export declare interface Youtube {
1774
1847
  title: string;
1775
1848
  }
1776
1849
 
1850
+ declare interface Zone {
1851
+ label: string;
1852
+ area: string;
1853
+ "grid-area": string;
1854
+ "grid-rows": string;
1855
+ "grid-cols": string;
1856
+ "gap-x": string;
1857
+ "gap-y": string;
1858
+ padding: string;
1859
+ sections: string[];
1860
+ }
1861
+
1862
+ declare interface Zones {
1863
+ [x: string]: Zone;
1864
+ }
1865
+
1777
1866
  export { }
@@ -1,6 +1,6 @@
1
- var e=function(e){return e.CARDS=`cards`,e.CLOUD=`cloud`,e.DASHBOARD=`dashboard`,e.DASHBOARDS=`dashboards`,e.IMAGES=`images`,e.MESSAGES=`messages`,e.PREFERENCE=`preference`,e.PREFERENCES=`preferences`,e.PRESENTATION=`presentation`,e.PRESENTATIONS=`presentations`,e.SERIES=`series`,e.SLIDE=`slide`,e.SLIDES=`slides`,e.TEMPLATES=`templates`,e.TOPICS=`topics`,e.WIDGET=`widget`,e.WIDGETS=`widgets`,e}({}),t=function(e){return e.API=`color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;`,e.APP=`color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;`,e.BROADCAST=`color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;`,e.CLOUD=`color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;`,e.DATA=`color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;`,e.ERROR=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.GET_DATA=`color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;`,e.HIDE=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.KO=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.MESSAGES=`color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;`,e.NO_UPDATES=`color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;`,e.NONE=`color:transparent;background-color:transparent;`,e.OK=`color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;`,e.PRESENTATION=`color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;`,e.SERIES=`color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;`,e.SLIDE=`color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;`,e.STORAGE=`color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;`,e.SUBSCRIBE=`color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;`,e.WIDGET=`color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;`,e.WS=`color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;`,e}({}),n=function(e){return e.ADD_SLIDE=`addSlide`,e.APP_READY=`appReady`,e.API_UPDATE=`apiUpdate`,e.BACKGROUND_UPDATE=`backgroundUpdate`,e.BUILDER_PREVIEW=`builderPreview`,e.COMPONENT_UPDATE=`componentUpdate`,e.APPROVE_MESSAGE=`approveMessage`,e.CHANNEL=`channel`,e.CLEAN_MESSAGES=`cleanMessages`,e.CLOSE_BUILDER_DIALOG=`closeBuilderDialog`,e.CLOSE_BUILDER_MODAL=`closeBuilderModal`,e.CLOSE_MODAL=`closeModal`,e.COLOR_UPDATE=`colorUpdate`,e.COMPONENT_INDEX=`componentIndex`,e.CSS_SET=`setCss`,e.CSS_STORE=`storeCss`,e.DASHBOARD_LOAD=`loadDashboard`,e.DASHBOARD_STORE=`storeDashboard`,e.DASHBOARD_UPDATED=`dashboardUpdated`,e.ERROR=`error`,e.HIDE_MESSAGE=`hideMessage`,e.IMAGE_GET=`getImage`,e.IMAGE_SET=`setImage`,e.IMAGE_STORED=`imageStored`,e.LAYOUT_UPDATE=`layoutUpdate`,e.PREV_SLIDE=`prevSlide`,e.RELOAD_PRESENTATION=`reloadPresentation`,e.STAR_MESSAGE=`starMessage`,e.GOTO_SLIDE=`gotoSlide`,e.NEXT_SLIDE=`nextSlide`,e.PREFERENCE_LOAD=`loadPreference`,e.PREFERENCE_STORE=`storePreference`,e.PREFERENCE_UPDATED=`preferenceUpdated`,e.PAUSE_PRESENTATION=`pausePresentation`,e.PRESENTATION_READY=`presentationReady`,e.PRESENTATION_LOAD=`loadPresentation`,e.PRESENTATION_STORE=`storePresentation`,e.PRESENTATION_UPDATED=`presentationUpdated`,e.ROW_COL_UPDATE=`rowcolupdate`,e.SCREENSHOT_TAKE=`takeScreenshot`,e.SCREENSHOT_STORE=`storeScreenshot`,e.SECTION_UPDATE=`sectionUpdate`,e.SHOW_BUILDER_DIALOG=`showBuilderDialog`,e.SHOW_BUILDER_MODAL=`showBuilderModal`,e.SHOW_MODAL=`showModal`,e.SLIDE_DID_LOAD=`slideDidLoad`,e.SLIDE_GET=`getSlide`,e.SLIDE_GOTO=`slideGoto`,e.SLIDE_LOAD=`loadSlide`,e.SLIDE_READY=`slideReady`,e.SLIDE_SAVED=`slideSaved`,e.SLIDE_SET=`setSlide`,e.SLIDE_STORE=`storeSlide`,e.SLIDE_STORED=`slideStored`,e.SLIDE_TRANSITIONER=`slideTransitioner`,e.SLIDE_UPDATED=`slideUpdated`,e.START_TRANSITIONER=`startTransitioner`,e.STORAGE_INIT=`storageInit`,e.STREAM=`stream`,e.SUBSCRIBE=`subscribe`,e.UNSUBSCRIBE=`unsubscribe`,e.SUSPEND_ACCOUNT=`suspendAccount`,e.SWITCH_PRESENTATION=`switchPresentation`,e.REMOVE_CLOUD=`removeCloud`,e.UPDATE=`update`,e.UPLOAD_COMPLETED=`uploadCompleted`,e.VERSION=`version`,e.WIDGETS_CLEAR=`widgetsClear`,e.WIDGET_DID_LOAD=`widgetDidLoad`,e.WIDGET_DID_UPDATE=`widgetDidUpdate`,e.WIDGET_LOAD=`widgetLoad`,e.WIDGET_STORE=`widgetStore`,e.WIDGET_UPDATE=`widgetUpdate`,e.WS_API_REQUEST=`wsApiRequest`,e.WS_API_RESPONSE=`wsApiResponse`,e.WS_API_UPDATE=`wsApiUpdate`,e}({}),r=function(e){return e.APPROVED=`approved`,e.BEFORE=`before`,e.DELAYED=`delayed`,e.NONE=`none`,e.REALTIME=`realtime`,e}({}),i=function(e){return e.KEYVAL=`keyval`,e.LOCAL=`local`,e.SESSION=`session`,e.DEXIE=`dexie`,e.WINDOW=`window`,e}({});function a(e){let t=e.toUpperCase().split(/[\s_-]+/);return t.length>0?(t.forEach((e,n)=>{t[n]=`${e.charAt(0)}.`}),t.join(` `)):``}function o(e){let t=``,n=``,r={backgroundImage:``};return e.media!==void 0&&e.media.forEach(e=>{(e.type===`photo`||e.type===`image`)&&(r={backgroundImage:`url(${e.url})`},n=e.url),e.type===`video`&&(t=e.url)}),{image:n,background:r||null,video:t}}function s(e){let t={};for(let n=0;n<e.length;n++){let r=e.item(n);r?.name&&(t[r.name]=r.value)}return t}function c(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r.name!==`class`&&!r.name.includes(`data`)&&(t[r.name]=r.value)}return t}function l(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r.name!==`class`&&(t[r.name]=p(r.value))}return t}var u=e=>new Promise(t=>{if(document.querySelector(e))return t(document.querySelector(e));let n=new MutationObserver(r=>{document.querySelector(e)&&(n.disconnect(),t(document.querySelector(e)))});n.observe(document.body,{childList:!0,subtree:!0})});function d(e,t){switch(e){case`ax`:return`<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>`;case`bl`:return`<li class="text-blue fa-solid fa-rss fa-${t}"/>`;case`co`:return`<li class="fa-solid fa-comment fa-${t}"/>`;case`da`:return`<li class="fa-brands fa-dailymotion fa-${t}"/>`;case`fb`:return`<li class="text-blue-900 fa-brands fa-facebook fa-${t}"/>`;case`fo`:return`<li class="fa-solid fa-messages fa-${t}"/>`;case`ig`:return`<li class="fa-brands fa-instagram fa-${t}"/>`;case`lb`:return`<li class="fa-solid fa-comment fa-${t}"/>`;case`li`:return`<li class="fa-brands fa-linkedin fa-${t}"/>`;case`me`:return`<li class="fa-solid fa-rss fa-${t}"/>`;case`pi`:return`<li class="fa-brands fa-pinterest fa-${t}"/>`;case`qq`:return`<li class="fa-brands fa-weibo fa-${t}"/>`;case`rd`:return`<li class="fa-brands fa-reddit fa-${t}"/>`;case`re`:return`<li class="fa-solid fa-star-sharp-half-stroke fa-${t}"/>`;case`ti`:return`<li class="fa-brands fa-tiktok fa-${t}"/>`;case`tw`:return`<li class="fa-brands fa-x-twitter fa-${t}"/>`;case`vk`:return`<li class="fa-brands fa-vk fa-${t}"/>`;case`ws`:return`<li class="fa-solid fa-rss fa-${t}"/>`;case`yt`:return`<li class="text-red fa-brands fa-youtube fa-${t}"/>`;default:return``}}function f(e){return e.replace(/^\w|[A-Z]|\b\w/g,(e,t)=>t===0?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,``)}function p(e){return e.toLowerCase().split(`-`).reduce((e,t)=>e+(t.charAt(0).toUpperCase()+t.slice(1)))}var m=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase(),h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e){let t=document.createRange();t.selectNodeContents(e),t.deleteContents()}var _=()=>Math.floor(Math.random()*16777215).toString(16),v=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`,`+t().toFixed(1)+`)`},ee=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`, 0)`},te=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`)`},ne=(e,t)=>{e=e.substring(e.indexOf(`(`)+1,e.indexOf(`)`));let n=e.split(`,`);return n=n.map(e=>parseFloat(e.trim()).toString()),e=`background-color: rgba(`+parseInt(n[0])+`,`+parseInt(n[1])+`,`+parseInt(n[2])+`,`+t+`);`,e},re=(e,t=300)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},y=(e,t=300)=>{let n;return(...r)=>{n||e.apply(void 0,r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}};function b(e){return e.reduce((e,t)=>Object.keys(t).reduce((n,r)=>({...n,[r]:r in e&&typeof e[r]==`object`&&e[r]!==null&&typeof t[r]==`object`&&t[r]!==null?b([e[r],t[r]]):t[r]}),e),{})}var x=e=>[...new Set(e)],S=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`);function C(e,t=`font-bold`){return`${e?.title===null?``:`<div title="heading" class="${t}">${e.title}</div>`}${e?.content?e.content.replace(/\n\n/g,`
1
+ var e=function(e){return e.CARDS=`cards`,e.CLOUD=`cloud`,e.DASHBOARD=`dashboard`,e.DASHBOARDS=`dashboards`,e.IMAGES=`images`,e.MESSAGES=`messages`,e.PREFERENCE=`preference`,e.PREFERENCES=`preferences`,e.PRESENTATION=`presentation`,e.PRESENTATIONS=`presentations`,e.SERIES=`series`,e.SLIDE=`slide`,e.SLIDES=`slides`,e.TEMPLATES=`templates`,e.TOPICS=`topics`,e.WIDGET=`widget`,e.WIDGETS=`widgets`,e}({}),t=function(e){return e.API=`color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;`,e.APP=`color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;`,e.BROADCAST=`color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;`,e.CLOUD=`color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;`,e.DATA=`color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;`,e.ERROR=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.GET_DATA=`color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;`,e.HIDE=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.KO=`color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;`,e.MESSAGES=`color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;`,e.NO_UPDATES=`color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;`,e.NONE=`color:transparent;background-color:transparent;`,e.OK=`color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;`,e.PRESENTATION=`color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;`,e.SERIES=`color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;`,e.SLIDE=`color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;`,e.STORAGE=`color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;`,e.SUBSCRIBE=`color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;`,e.WIDGET=`color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;`,e.WS=`color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;`,e}({}),n=function(e){return e.ADD_SLIDE=`addSlide`,e.APP_READY=`appReady`,e.API_UPDATE=`apiUpdate`,e.BACKGROUND_UPDATE=`backgroundUpdate`,e.BUILDER_PREVIEW=`builderPreview`,e.COMPONENT_UPDATE=`componentUpdate`,e.APPROVE_MESSAGE=`approveMessage`,e.CHANNEL=`channel`,e.CLEAN_MESSAGES=`cleanMessages`,e.CLOSE_BUILDER_DIALOG=`closeBuilderDialog`,e.CLOSE_BUILDER_MODAL=`closeBuilderModal`,e.CLOSE_MODAL=`closeModal`,e.COLOR_UPDATE=`colorUpdate`,e.COMPONENT_INDEX=`componentIndex`,e.CSS_SET=`setCss`,e.CSS_STORE=`storeCss`,e.DASHBOARD_LOAD=`loadDashboard`,e.DASHBOARD_STORE=`storeDashboard`,e.DASHBOARD_UPDATED=`dashboardUpdated`,e.ERROR=`error`,e.HIDE_MESSAGE=`hideMessage`,e.IMAGE_GET=`getImage`,e.IMAGE_SET=`setImage`,e.IMAGE_STORED=`imageStored`,e.LAYOUT_UPDATE=`layoutUpdate`,e.PREV_SLIDE=`prevSlide`,e.RELOAD_PRESENTATION=`reloadPresentation`,e.STAR_MESSAGE=`starMessage`,e.GOTO_SLIDE=`gotoSlide`,e.NEXT_SLIDE=`nextSlide`,e.PREFERENCE_LOAD=`loadPreference`,e.PREFERENCE_STORE=`storePreference`,e.PREFERENCE_UPDATED=`preferenceUpdated`,e.PAUSE_PRESENTATION=`pausePresentation`,e.PRESENTATION_READY=`presentationReady`,e.PRESENTATION_LOAD=`loadPresentation`,e.PRESENTATION_STORE=`storePresentation`,e.PRESENTATION_UPDATED=`presentationUpdated`,e.ROW_COL_UPDATE=`rowcolupdate`,e.SCREENSHOT_TAKE=`takeScreenshot`,e.SCREENSHOT_STORE=`storeScreenshot`,e.SECTION_UPDATE=`sectionUpdate`,e.SHOW_BUILDER_DIALOG=`showBuilderDialog`,e.SHOW_BUILDER_MODAL=`showBuilderModal`,e.SHOW_MODAL=`showModal`,e.SLIDE_DID_LOAD=`slideDidLoad`,e.SLIDE_GET=`getSlide`,e.SLIDE_GOTO=`slideGoto`,e.SLIDE_LOAD=`loadSlide`,e.SLIDE_READY=`slideReady`,e.SLIDE_SAVED=`slideSaved`,e.SLIDE_SET=`setSlide`,e.SLIDE_STORE=`storeSlide`,e.SLIDE_STORED=`slideStored`,e.SLIDE_TRANSITIONER=`slideTransitioner`,e.SLIDE_UPDATED=`slideUpdated`,e.START_TRANSITIONER=`startTransitioner`,e.STORAGE_INIT=`storageInit`,e.STREAM=`stream`,e.SUBSCRIBE=`subscribe`,e.UNSUBSCRIBE=`unsubscribe`,e.SUSPEND_ACCOUNT=`suspendAccount`,e.SWITCH_PRESENTATION=`switchPresentation`,e.REMOVE_CLOUD=`removeCloud`,e.UPDATE=`update`,e.UPLOAD_COMPLETED=`uploadCompleted`,e.VERSION=`version`,e.WIDGETS_CLEAR=`widgetsClear`,e.WIDGET_DID_LOAD=`widgetDidLoad`,e.WIDGET_DID_UPDATE=`widgetDidUpdate`,e.WIDGET_LOAD=`widgetLoad`,e.WIDGET_STORE=`widgetStore`,e.WIDGET_UPDATE=`widgetUpdate`,e.WS_API_REQUEST=`wsApiRequest`,e.WS_API_RESPONSE=`wsApiResponse`,e.WS_API_UPDATE=`wsApiUpdate`,e}({}),r=function(e){return e.APPROVED=`approved`,e.BEFORE=`before`,e.DELAYED=`delayed`,e.NONE=`none`,e.REALTIME=`realtime`,e}({}),i=function(e){return e.KEYVAL=`keyval`,e.LOCAL=`local`,e.SESSION=`session`,e.DEXIE=`dexie`,e.WINDOW=`window`,e}({});function a(e){let t=e.toUpperCase().split(/[\s_-]+/);return t.length>0?(t.forEach((e,n)=>{t[n]=`${e.charAt(0)}.`}),t.join(` `)):``}function o(e){let t=``,n=``,r={backgroundImage:``};return e.media!==void 0&&e.media.forEach(e=>{(e.type===`photo`||e.type===`image`)&&(r={backgroundImage:`url(${e.url})`},n=e.url),e.type===`video`&&(t=e.url)}),{image:n,background:r||null,video:t}}function s(e){let t={};for(let n=0;n<e.length;n++){let r=e.item(n);r?.name&&(t[r.name]=r.value)}return t}function c(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r.name!==`class`&&!r.name.includes(`data`)&&(t[r.name]=r.value)}return t}function l(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r.name!==`class`&&(t[r.name]=p(r.value))}return t}var u=e=>new Promise(t=>{if(document.querySelector(e))return t(document.querySelector(e));let n=new MutationObserver(r=>{document.querySelector(e)&&(n.disconnect(),t(document.querySelector(e)))});n.observe(document.body,{childList:!0,subtree:!0})});function d(e,t){switch(e){case`ax`:return`<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>`;case`bl`:return`<li class="text-blue fa-solid fa-rss fa-${t}"/>`;case`co`:return`<li class="fa-solid fa-comment fa-${t}"/>`;case`da`:return`<li class="fa-brands fa-dailymotion fa-${t}"/>`;case`fb`:return`<li class="text-blue-900 fa-brands fa-facebook fa-${t}"/>`;case`fo`:return`<li class="fa-solid fa-messages fa-${t}"/>`;case`ig`:return`<li class="fa-brands fa-instagram fa-${t}"/>`;case`lb`:return`<li class="fa-solid fa-comment fa-${t}"/>`;case`li`:return`<li class="fa-brands fa-linkedin fa-${t}"/>`;case`me`:return`<li class="fa-solid fa-rss fa-${t}"/>`;case`pi`:return`<li class="fa-brands fa-pinterest fa-${t}"/>`;case`qq`:return`<li class="fa-brands fa-weibo fa-${t}"/>`;case`rd`:return`<li class="fa-brands fa-reddit fa-${t}"/>`;case`re`:return`<li class="fa-solid fa-star-sharp-half-stroke fa-${t}"/>`;case`ti`:return`<li class="fa-brands fa-tiktok fa-${t}"/>`;case`tw`:return`<li class="fa-brands fa-x-twitter fa-${t}"/>`;case`vk`:return`<li class="fa-brands fa-vk fa-${t}"/>`;case`ws`:return`<li class="fa-solid fa-rss fa-${t}"/>`;case`yt`:return`<li class="text-red fa-brands fa-youtube fa-${t}"/>`;default:return``}}function f(e){return e.replace(/^\w|[A-Z]|\b\w/g,(e,t)=>t===0?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,``)}function p(e){return e.toLowerCase().split(`-`).reduce((e,t)=>e+(t.charAt(0).toUpperCase()+t.slice(1)))}var m=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase(),h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e){let t=document.createRange();t.selectNodeContents(e),t.deleteContents()}var _=()=>Math.floor(Math.random()*16777215).toString(16),v=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`,`+t().toFixed(1)+`)`},ee=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`, 0)`},te=()=>{var e=Math.round,t=Math.random,n=255;return`rgba(`+e(t()*n)+`,`+e(t()*n)+`,`+e(t()*n)+`)`},ne=(e,t)=>{e=e.substring(e.indexOf(`(`)+1,e.indexOf(`)`));let n=e.split(`,`);return n=n.map(e=>parseFloat(e.trim()).toString()),e=`background-color: rgba(`+parseInt(n[0])+`,`+parseInt(n[1])+`,`+parseInt(n[2])+`,`+t+`);`,e},re=(e,t=300)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},y=(e,t=300)=>{let n;return(...r)=>{n||e.apply(void 0,r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}};function b(e){return e.reduce((e,t)=>Object.keys(t).reduce((n,r)=>({...n,[r]:r in e&&typeof e[r]==`object`&&e[r]!==null&&typeof t[r]==`object`&&t[r]!==null?b([e[r],t[r]]):t[r]}),e),{})}var x=e=>[...new Set(e)],S=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`);function C(e,t=`font-bold`){return`${e?.title?`<div title="heading" class="${t}">${e.title}</div>`:``}${e?.content?e.content.replace(/\n\n/g,`
2
2
  `).replace(/\n/g,`<br/>`):``}`}var w=(e,t={},n=``)=>{for(let r in e){let i=n?`${n}-${r}`:r;typeof e[r]==`object`&&!Array.isArray(e[r])?w(e[r],t,i):e[r]!==``&&(t[i]=e[r])}return t},T=e=>({topic:e.topic,title:e.title,timestamp:e.timestamp,items:(e.items??[]).map(e=>({name:e.name,label:e.label,color:e.color,points:(e.data??[]).map(e=>({x:e.timestamp,y:e.count}))}))}),E=e=>({items:[{name:`labels`,points:(e.labels??[]).map(e=>({x:e.label,y:e.count,label:e.label}))}]}),D=()=>[O(2),O(1),O(1),O(1),O(3)].join(`-`),O=e=>{let t=``;for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t};function k(e,t){for(;e.length<t;)e=`0${e}`;return e}function A(e,t){let n,r,i;if(t.length===0)return e;for(n=0,i=t.length;n<i;n++)r=t.charCodeAt(n),e=(e<<5)-e+r,e|=0;return e<0?e*-2:e}function j(e,t,n){return Object.keys(t).sort().reduce(r,e);function r(e,r){return M(e,t[r],r,n)}}function M(e,t,n,r){let i=A(A(A(e,n),N(t)),typeof t);if(t===null)return A(i,`null`);if(t===void 0)return A(i,`undefined`);if(typeof t==`object`||typeof t==`function`){if(r.includes(t))return A(i,`[Circular]${n}`);r.push(t);let e=j(i,t,r);if(!(`valueOf`in t)||typeof t.valueOf!=`function`)return e;try{return A(e,String(t.valueOf()))}catch(t){return A(e,`[valueOf exception]${t.stack||t.message}`)}}return A(i,t.toString())}function N(e){return Object.prototype.toString.call(e)}function P(e){return k(M(0,e,``,[]).toString(16),8)}var F=e=>{let t=``;return q(e,{start:function(e,n,r){t+=`<`+e;for(let e=0;e<n.length;e++)t+=` ${n[e].name}="${n[e].escaped}"`;t+=`>`},end:function(e){t+=`</${e}>`},chars:function(e){t+=e},comment:function(e){t+=`<!-- ${e} -->`}}),t},I=(e,t)=>{let n=L(`html,head,body,title`),r={link:`head`,base:`head`};t?t=t.ownerDocument||t.getOwnerDocument&&t.getOwnerDocument()||t:t===void 0?typeof document<`u`&&document.implementation&&document.implementation.createDocument&&(t=document.implementation.createDocument(``,``,null)):t=new Document;let i=[];if(!(t.documentElement||t.getDocumentElement&&t.getDocumentElement())&&t.createElement&&(function(){let e=t.createElement(`html`),n=t.createElement(`head`);n.appendChild(t.createElement(`title`)),e.appendChild(n),e.appendChild(t.createElement(`body`)),t.appendChild(e)})(),t.getElementsByTagName)for(let e in n)n[e]=t.getElementsByTagName(e)[0];let a=n.body;return q(e,{start:function(e,o,s){if(n[e]){a=n[e],s||i.push(a);return}let c=t.createElement(e);for(let e in o)c.setAttribute(o[e].name,o[e].value);r[e]&&typeof n[r[e]]!=`boolean`?n[r[e]].appendChild(c):a&&a.appendChild&&a.appendChild(c),s||(i.push(c),a=c)},end:function(e){--i.length,a=i[i.length-1]},chars:function(e){a.appendChild(t.createTextNode(e))},comment:function(e){}}),t},L=e=>{let t={},n=e.split(`,`);for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},R=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,z=/^<\/([-A-Za-z0-9_]+)[^>]*>/,B=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,V=L(`area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr`),H=L(`a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video`),U=L(`abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var`),W=L(`colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr`),G=L(`checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected`),K=L(`script,style`),q=(e,t)=>{let n,r,i,a=[],o=e,s=(e,n)=>{let r;if(!n)r=0;else for(r=a.length-1;r>=0&&a[r]!=n;r--);if(r>=0){for(let e=a.length-1;e>=r;e--)t.end&&t.end(a[e]);a.length=r}};for(;e;){if(r=!0,!a.at(-1)||!K[a.at(-1)]){if(e.indexOf(`<!--`)==0?(n=e.indexOf(`-->`),n>=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),r=!1)):e.indexOf(`</`)==0?(i=e.match(z),i&&(e=e.substring(i[0].length),i[0].replace(z,s),r=!1)):e.indexOf(`<`)==0&&(i=e.match(R),i&&(e=e.substring(i[0].length),i[0].replace(R,c),r=!1)),r){n=e.indexOf(`<`);let r=n<0?e:e.substring(0,n);e=n<0?``:e.substring(n),t.chars&&t.chars(r)}}else e=e.replace(RegExp(`([\\s\\S]*?)</`+a.at(-1)+`[^>]*>`),function(e,n){return n=n.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,`$1$2`),t.chars&&t.chars(n),``}),s(``,a.at(-1));if(e==o)throw`Parse Error: `+e;o=e}s();function c(e,n,r,i){if(n=n.toLowerCase(),H[n])for(;a.at(-1)&&U[a.at(-1)];)s(``,a.at(-1));if(W[n]&&a.at(-1)==n&&s(``,n),i=V[n]||!!i,i||a.push(n),t.start){let e=[];r.replace(B,function(t,n){let r=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:G[n]?n:``;e.push({name:n,value:r,escaped:r.replace(/(^|[^\\])"/g,`$1\\"`)})}),t.start&&t.start(n,e,i)}}};function J(e){return`"${e}"`}function Y(e){return e.replace(/<\?xml.*\?>\n/,``).replace(/<!doctype.*\>\n/,``).replace(/<!DOCTYPE.*\>\n/,``)}var X=e=>{e=Y(e);let t=[],n={node:`root`,child:[]};return q(e,{start:function(e,r,i){let a={node:`element`,tag:e};if(r.length!==0&&(a.attr=r.reduce(function(e,t){let n=t.name,r=t.value;return r.match(/ /)&&([`title`,`transform`,`viewBox`,`widget`].includes(t.name)||(r=r.split(` `))),e[n]?Array.isArray(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e},{})),i){let e=t[0]||n;e.child===void 0&&(e.child=[]),e.child.push(a)}else t.unshift(a)},end:function(e){let r=t.shift();if(r.tag!==e&&console.error(`invalid state: mismatch end tag`),t.length===0)n.child.push(r);else{let e=t[0];e.child===void 0&&(e.child=[]),e.child.push(r)}},chars:function(e){let r={node:`text`,text:e};if(t.length===0)n.child.push(r);else{let e=t[0];e.child===void 0&&(e.child=[]),e.child.push(r)}},comment:function(e){let n={node:`comment`,text:e},r=t[0];r.child===void 0&&(r.child=[]),r.child.push(n)}}),n},Z=e=>{let t=[`area`,`base`,`basefont`,`br`,`col`,`frame`,`hr`,`img`,`input`,`isindex`,`link`,`meta`,`param`,`embed`],n=``;e.child&&(n=e.child.map(function(e){return Z(e)}).join(``));let r=``;if(e.attr&&(r=Object.keys(e.attr).map(function(t){let n=e.attr[t];return Array.isArray(n)&&(n=n.join(` `)),`${t}=${J(n)}`}).join(` `),r!==``&&(r=` ${r}`)),e.node===`element`){let i=e.tag;if(t.indexOf(i)>-1)return`<${e.tag}${r}/>`;let a=`<${e.tag}${r}>`,o=`</${e.tag}>`;return`${a}${n}${o}`}if(e.node===`text`)return e.text;if(e.node===`comment`)return`<!-- ${e.text} -->`;if(e.node===`root`)return n},ie=()=>{let e=(e=!1)=>{let t=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:e});return t===null?null:(t.moveTo(0,0),t.lineTo(120,121),t.stroke(),t.getImageData(0,0,200,200).data.join())};return e(!0)!==e(!1)},ae=(e,t=0,n=!0,r=`en`)=>{if(e===void 0)return``;if(e=typeof e==`string`||e instanceof String?parseFloat(e.replace(/[^0-9.]/g,``)):e,n===!1)return e.toLocaleString(r);if(e<1e3)return Math.round(e)===e?e:e.toFixed(t);e=e.toString().replace(/[^0-9.]/g,``);let i=[{v:1e3,s:`k`},{v:1e6,s:`M`},{v:1e9,s:`G`},{v:0xe8d4a51000,s:`T`},{v:0x38d7ea4c68000,s:`P`},{v:0xde0b6b3a7640000,s:`E`},{v:1e21,s:`Z`},{v:1e24,s:`Y`}],a;for(a=i.length-1;a>0&&!(e>=i[a].v);a--);return(e/i[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/,`$1`)+i[a].s},oe=(e,t=0,n=!0,r=`en`)=>{if(e===void 0)return``;if(e=typeof e==`string`||e instanceof String?parseFloat(e.replace(/[^0-9.]/g,``)):e,n===!1)return e.toLocaleString(r);if(e<1e3)return Math.round(e)===e?e:e.toFixed(t);e=e.toString().replace(/[^0-9.]/g,``);let i=[{v:1e3,s:`k`},{v:1e6,s:`M`},{v:1e9,s:`B`},{v:0xe8d4a51000,s:`T`},{v:0x38d7ea4c68000,s:`P`},{v:0xde0b6b3a7640000,s:`E`},{v:1e21,s:`Z`},{v:1e24,s:`Y`}],a;for(a=i.length-1;a>0&&!(e>=i[a].v);a--);return(e/i[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/,`$1`)+i[a].s},se=e=>Object.keys(e).length===0,Q=new BroadcastChannel(`logging`),ce=async(e=0,t)=>{Q.postMessage({action:`log`,level:e,message:t})},le={add:e=>Q.postMessage({action:`add`,level:e}),clear:()=>Q.postMessage({action:`delete`}),delete:e=>Q.postMessage({action:`delete`,level:e}),list:()=>Q.postMessage({action:`list`,message:[`%capp%c %clogging`,t.APP,t.NONE,t.OK]})},ue=e=>e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g,``).replace(/\>\s*\</g,`><`).replace(/\t/g,``),de=e=>e.replace(/\>\</g,`>
3
3
  <`),fe=e=>e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g,``).replace(/\s*\{\s*/g,`{`).replace(/\s*\}\s*/g,`}`).replace(/\s*\:\s*/g,`:`).replace(/\s*\;\s*/g,`;`).replace(/\s*\,\s*/g,`,`).replace(/\s*\~\s*/g,`~`).replace(/\s*\>\s*/g,`>`).replace(/\s*\+\s*/g,`+`).replace(/\s*\!\s*/g,`!`),pe=e=>e.replace(/\,/g,`, `).replace(/\{/g,` {
4
4
  `).replace(/\}/g,`}
5
5
  `).replace(/\;/g,`;
6
- `);function me(e,t){let n=[{value:1,symbol:``},{value:1e3,symbol:`k`},{value:1e6,symbol:`M`},{value:1e9,symbol:`G`},{value:0xe8d4a51000,symbol:`T`},{value:0x38d7ea4c68000,symbol:`P`},{value:0xde0b6b3a7640000,symbol:`E`},{value:1e21,symbol:`Z`},{value:1e24,symbol:`Y`}],r=/\.0+$|(\.\d*[1-9])0+$/,i;for(i=n.length-1;i>0&&!(e>=n[i].value);i--);return(e/n[i].value).toFixed(t).replace(r,`$1`)+n[i].symbol}function he(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var ge=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var ye=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function be(e){let t=e.filter(e=>e!==void 0);return t.forEach(e=>{if(e.content=window.__bc.opts.suspended===!0?`License suspended, please contact your Sales Representative to restore service`:e.content?.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,``)||``,e.sender!==null)switch(!0){case e.sender.title===`Unknown author`:e.sender.title=``,e.sender.name=``;break;case e.sender.title===e.sender.name:e.sender.name=``;break;case e.channel===`tw`:e.sender.name=`@${e.sender.name}`}else e.sender={title:``,name:``,id:``,avatar:`default`,bio:``,location:``,following:0,verified:0,listed:0,followers:0,favourites:0,messages:0,influence:0};if(e.sender.title===``&&e.link!==``){let t=new URL(e.link);e.sender.title=t.hostname.replace(`www.`,``)}}),t}function xe(e,t,n,r){e.stopPropagation(),t.showModal({showComponent:`card-modal`,props:{data:n,options:r}})}function Se(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Ce=class e{static EPOCH=Date.UTC(1970,0,1).valueOf();static SHARD_ID=1;static SEQUENCE=1;static generate({timestamp:t=Date.now(),shard_id:n=e.SHARD_ID}={}){t=t instanceof Date?t.valueOf():new Date(t).valueOf();let r=BigInt(t)-BigInt(e.EPOCH)<<BigInt(22);return r|=BigInt(n%1024)<<BigInt(12),r|=BigInt(e.SEQUENCE++%4096),r.toString()}static parse(t){let n=e.binary(t);return{timestamp:e.extractBits(t,1,41),shard_id:e.extractBits(t,42,10),sequence:e.extractBits(t,52),binary:n}}static isValid(t){if(!/^[\d]{19}$/.test(t))return!1;try{return e.parse(t),!0}catch{return!1}}static extractBits(t,n,r){return parseInt(r?e.binary(t).substring(n,n+r):e.binary(t).substring(n),2)}static binary(e){let t=BigInt(e).toString(2);return t.length<64?`0000000000000000000000000000000000000000000000000000000000000000`.substring(0,64-t.length)+t:t}};function we(){let e=``;for(let t=0;t<7;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return e}var Te=n=>{switch(n?.type){case e.MESSAGES:return t.MESSAGES;case e.SERIES:return t.SERIES;case e.CLOUD:return t.CLOUD;default:return t.NO_UPDATES}},Ee=(e=6)=>Math.random().toString(36).substring(2,e+2),De=(e,t=[])=>!t.find(function(t){return t===e}),$=(e,t=[])=>{let n=0,r=``;for(;r==``&&n<100;)r=Ee(e),De(r,t)||(r=``,n++);return r},Oe=e=>{switch(!0){case e<0:return`text-down text-xs`;case e>0:return`text-up text-xs`;default:return`text-white text-xs`}},ke=(e,t,n)=>Promise.race([e,Ae(t,n)]),Ae=(e,t)=>new Promise((n,r)=>setTimeout(()=>t===void 0?n(`ok`):r(t),e));function je(e){let t=`${e.type}.${e.topics}`;return e.order&&(t+=`.${e.order}`),e.period&&(t+=`.${e.period}`),t}function Me(e){if(e.widget===void 0){let t=e.topics?.split(`-`);t&&t.length>1?(e.dashboard=t?t[0]:``,e.widget=t?t[1]:``):(e.widget=e.topics,e.dashboard=e.slide)}return e}function Ne(e,t){let n,i,a,o,s;switch(e.moderation){case r.BEFORE:n=new Date,i=e.beforeTime?.split(`:`),a=Number.parseInt(i?i[0]:`00`),o=Number.parseInt(i?i[1]:`00`),s=Number.parseInt(i?i[2]:`00`),t.before=n.setHours(a,o,s,0)/1e3,t.period||=n.getDay()===1?72:24;break;case r.DELAYED:e.delay&&e.delay>0&&(t.delay=`${e.delay}`);break;case r.APPROVED:t.approved=`1`;break;default:e.period!==0&&(t.period=e.period)}return t}var Pe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({}),Fe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({});export{e as API,t as CSS,n as EVENTS,Pe as GeoType,q as HTMLParser,I as HTMLtoDOM,F as HTMLtoXML,r as MODERATION,ne as RGBAchangeA,i as STORAGE,Fe as ShapeType,Ce as Snowflake,oe as abbr,a as anonymize,o as attachedMedia,s as attrs,u as awaitElement,d as brandLogo,p as camelCase,l as camelCasedProps,m as camelToHyphen,f as camelize,h as capitalizeFirstLetter,g as clearContents,E as cloudToGraph,re as debounce,b as deepMerge,ye as dir,S as escape,c as filterAttributes,w as flatten,C as formatContent,D as getGuid,je as getKey,he as getParameterByName,ge as getQueryParam,ie as hasHWA,P as hashSum,X as html2json,ae as intToString,se as isEmpty,Z as json2html,ce as log,le as logging,pe as maxifyCss,de as maxifyHtml,fe as minifyCss,ue as minifyHtml,Ne as moderation,me as numberFormatter,_ as randomColor,te as randomRGB,ee as randomRGBA,v as randomRGBAfull,_e as randomValue,ve as rtl,be as sanitize,T as seriesToGraph,xe as showModal,Se as shuffleMessages,y as stall,we as stringGen,Te as typeCss,$ as uniq,x as unique,Oe as upDownColor,Me as widgetParams,ke as wrapPromise};
6
+ `);function me(e,t){let n=[{value:1,symbol:``},{value:1e3,symbol:`k`},{value:1e6,symbol:`M`},{value:1e9,symbol:`G`},{value:0xe8d4a51000,symbol:`T`},{value:0x38d7ea4c68000,symbol:`P`},{value:0xde0b6b3a7640000,symbol:`E`},{value:1e21,symbol:`Z`},{value:1e24,symbol:`Y`}],r=/\.0+$|(\.\d*[1-9])0+$/,i;for(i=n.length-1;i>0&&!(e>=n[i].value);i--);return(e/n[i].value).toFixed(t).replace(r,`$1`)+n[i].symbol}function he(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var ge=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var ye=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function be(e){let t=e.filter(e=>e!==void 0);return t.forEach(e=>{if(e.content=window.__bc.opts.suspended===!0?`License suspended, please contact your Sales Representative to restore service`:e.content?.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,``)||``,e.sender!==null)switch(!0){case e.sender.title===`Unknown author`:e.sender.title=``,e.sender.name=``;break;case e.sender.title===e.sender.name:e.sender.name=``;break;case e.channel===`tw`:e.sender.name=`@${e.sender.name}`}else e.sender={title:``,name:``,id:``,avatar:``,bio:``,location:``,following:0,verified:0,listed:0,followers:0,favourites:0,messages:0,influence:0};if(e.sender.title===``&&e.link!==``){let t=new URL(e.link);e.sender.title=t.hostname.replace(`www.`,``)}}),t}function xe(e,t,n,r){e.stopPropagation(),t.showModal({showComponent:`card-modal`,props:{data:n,options:r}})}function Se(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Ce=class e{static EPOCH=Date.UTC(1970,0,1).valueOf();static SHARD_ID=1;static SEQUENCE=1;static generate({timestamp:t=Date.now(),shard_id:n=e.SHARD_ID}={}){t=t instanceof Date?t.valueOf():new Date(t).valueOf();let r=BigInt(t)-BigInt(e.EPOCH)<<BigInt(22);return r|=BigInt(n%1024)<<BigInt(12),r|=BigInt(e.SEQUENCE++%4096),r.toString()}static parse(t){let n=e.binary(t);return{timestamp:e.extractBits(t,1,41),shard_id:e.extractBits(t,42,10),sequence:e.extractBits(t,52),binary:n}}static isValid(t){if(!/^[\d]{19}$/.test(t))return!1;try{return e.parse(t),!0}catch{return!1}}static extractBits(t,n,r){return parseInt(r?e.binary(t).substring(n,n+r):e.binary(t).substring(n),2)}static binary(e){let t=BigInt(e).toString(2);return t.length<64?`0000000000000000000000000000000000000000000000000000000000000000`.substring(0,64-t.length)+t:t}};function we(){let e=``;for(let t=0;t<7;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return e}var Te=n=>{switch(n?.type){case e.MESSAGES:return t.MESSAGES;case e.SERIES:return t.SERIES;case e.CLOUD:return t.CLOUD;default:return t.NO_UPDATES}},Ee=(e=6)=>Math.random().toString(36).substring(2,e+2),De=(e,t=[])=>!t.find(function(t){return t===e}),$=(e,t=[])=>{let n=0,r=``;for(;r==``&&n<100;)r=Ee(e),De(r,t)||(r=``,n++);return r},Oe=e=>{switch(!0){case e<0:return`text-down text-xs`;case e>0:return`text-up text-xs`;default:return`text-white text-xs`}},ke=(e,t,n)=>Promise.race([e,Ae(t,n)]),Ae=(e,t)=>new Promise((n,r)=>setTimeout(()=>t===void 0?n(`ok`):r(t),e));function je(e){let t=`${e.type}.${e.topics}`;return e.order&&(t+=`.${e.order}`),e.period&&(t+=`.${e.period}`),t}function Me(e){if(e.widget===void 0){let t=e.topics?.split(`-`);t&&t.length>1?(e.dashboard=t?t[0]:``,e.widget=t?t[1]:``):(e.widget=e.topics,e.dashboard=e.slide)}return e}function Ne(e,t){let n,i,a,o,s;switch(e.moderation){case r.BEFORE:n=new Date,i=e.beforeTime?.split(`:`),a=Number.parseInt(i?i[0]:`00`),o=Number.parseInt(i?i[1]:`00`),s=Number.parseInt(i?i[2]:`00`),t.before=n.setHours(a,o,s,0)/1e3,t.period||=n.getDay()===1?72:24;break;case r.DELAYED:e.delay&&e.delay>0&&(t.delay=`${e.delay}`);break;case r.APPROVED:t.approved=`1`;break;default:e.period!==0&&(t.period=e.period)}return t}var Pe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({}),Fe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({});export{e as API,t as CSS,n as EVENTS,Pe as GeoType,q as HTMLParser,I as HTMLtoDOM,F as HTMLtoXML,r as MODERATION,ne as RGBAchangeA,i as STORAGE,Fe as ShapeType,Ce as Snowflake,oe as abbr,a as anonymize,o as attachedMedia,s as attrs,u as awaitElement,d as brandLogo,p as camelCase,l as camelCasedProps,m as camelToHyphen,f as camelize,h as capitalizeFirstLetter,g as clearContents,E as cloudToGraph,re as debounce,b as deepMerge,ye as dir,S as escape,c as filterAttributes,w as flatten,C as formatContent,D as getGuid,je as getKey,he as getParameterByName,ge as getQueryParam,ie as hasHWA,P as hashSum,X as html2json,ae as intToString,se as isEmpty,Z as json2html,ce as log,le as logging,pe as maxifyCss,de as maxifyHtml,fe as minifyCss,ue as minifyHtml,Ne as moderation,me as numberFormatter,_ as randomColor,te as randomRGB,ee as randomRGBA,v as randomRGBAfull,_e as randomValue,ve as rtl,be as sanitize,T as seriesToGraph,xe as showModal,Se as shuffleMessages,y as stall,we as stringGen,Te as typeCss,$ as uniq,x as unique,Oe as upDownColor,Me as widgetParams,ke as wrapPromise};
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.14.0",
4
+ "version": "1.14.3",
5
+ "packageManager": "pnpm@11.5.2",
5
6
  "private": false,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/TouchFlows/buzzcasting-utils.git"
10
+ },
6
11
  "author": {
7
12
  "name": "Mark Tamis, TouchFlows SAS",
8
13
  "email": "mark.tamis@touchflows.com"
@@ -24,7 +29,7 @@
24
29
  "docs": "typedoc",
25
30
  "build": "tsc && vite build",
26
31
  "changelog": "changelogen --release",
27
- "release": "npm test && npm run build && changelogen --release && npm publish && git push --follow-tags",
32
+ "release": "pnpm test && pnpm run build && changelogen --release && git push --follow-tags",
28
33
  "lint": "eslint . --fix",
29
34
  "test": "vitest --run",
30
35
  "test:watch": "vitest",
@@ -34,7 +39,7 @@
34
39
  "@commitlint/cli": "^20.5.3",
35
40
  "@commitlint/config-conventional": "^20.5.3",
36
41
  "@types/node": "^24.13.3",
37
- "@vitest/coverage-v8": "^4.1.9",
42
+ "@vitest/coverage-v8": "^4.1.11",
38
43
  "camelcase": "^9.0.0",
39
44
  "changelogen": "^0.6.2",
40
45
  "lint-staged": "^16.4.0",
@@ -43,9 +48,9 @@
43
48
  "typescript": "^5.9.3",
44
49
  "vite": "^8.2.0",
45
50
  "vite-plugin-dts": "^4.5.4",
46
- "vitest": "^4.1.9"
51
+ "vitest": "^4.1.11"
47
52
  },
48
53
  "lint-staged": {
49
54
  "*.ts": "npm run lint"
50
55
  }
51
- }
56
+ }