buzzcasting-utils 1.13.5 → 1.13.8
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.
|
@@ -3,4 +3,4 @@ var e=function(e){return e.CARDS=`cards`,e.CLOUD=`cloud`,e.DASHBOARD=`dashboard`
|
|
|
3
3
|
<`),ue=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,`!`),de=e=>e.replace(/\,/g,`, `).replace(/\{/g,` {
|
|
4
4
|
`).replace(/\}/g,`}
|
|
5
5
|
`).replace(/\;/g,`;
|
|
6
|
-
`);function fe(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 pe(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var me=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function he(e){return e[Math.floor(Math.random()*e.length)]}function ge(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var _e=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function ve(e){let t=e.filter(e=>e!==void 0);return t.forEach(e=>{if(window.__bc.opts.suspended===!0
|
|
6
|
+
`);function fe(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 pe(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var me=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function he(e){return e[Math.floor(Math.random()*e.length)]}function ge(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var _e=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function ve(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 ye(e,t,n,r){e.stopPropagation(),t.showModal({showComponent:`card-modal`,props:{data:n,options:r}})}function be(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 xe=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 Se(){let e=``;for(let t=0;t<7;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return e}var Ce=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}},we=(e=6)=>Math.random().toString(36).substring(2,e+2),Te=(e,t=[])=>!t.find(function(t){return t===e}),Ee=(e,t=[])=>{let n=0,r=``;for(;r==``&&n<100;)r=we(e),Te(r,t)||(r=``,n++);return r},De=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`}},$=(e,t,n)=>Promise.race([e,Oe(t,n)]),Oe=(e,t)=>new Promise((n,r)=>setTimeout(()=>t===void 0?n(`ok`):r(t),e));function ke(e){let t=`${e.type}.${e.topics}`;return e.order&&(t+=`.${e.order}`),e.period&&(t+=`.${e.period}`),t}function Ae(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 je(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 Me=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({}),Ne=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({});export{e as API,t as CSS,n as EVENTS,Me as GeoType,K as HTMLParser,F as HTMLtoDOM,P as HTMLtoXML,r as MODERATION,te as RGBAchangeA,i as STORAGE,Ne as ShapeType,xe as Snowflake,ie 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,ne as debounce,x as deepMerge,_e as dir,C as escape,c as filterAttributes,T as flatten,w as formatContent,E as getGuid,ke as getKey,pe as getParameterByName,me as getQueryParam,Z as hasHWA,N as hashSum,Y as html2json,re as intToString,ae as isEmpty,X as json2html,oe as log,se as logging,de as maxifyCss,le as maxifyHtml,ue as minifyCss,ce as minifyHtml,je as moderation,fe as numberFormatter,_ as randomColor,ee as randomRGB,y as randomRGBA,v as randomRGBAfull,he as randomValue,ge as rtl,ve as sanitize,ye as showModal,be as shuffleMessages,b as stall,Se as stringGen,Ce as typeCss,Ee as uniq,S as unique,De as upDownColor,Ae as widgetParams,$ as wrapPromise};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzcasting-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mark Tamis, TouchFlows SAS",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@commitlint/cli": "^20.5.3",
|
|
35
35
|
"@commitlint/config-conventional": "^20.5.3",
|
|
36
|
-
"@types/node": "^24.13.
|
|
36
|
+
"@types/node": "^24.13.3",
|
|
37
37
|
"@vitest/coverage-v8": "^4.1.9",
|
|
38
38
|
"camelcase": "^9.0.0",
|
|
39
39
|
"changelogen": "^0.6.2",
|
|
40
40
|
"lint-staged": "^16.4.0",
|
|
41
|
-
"typedoc": "^0.28.
|
|
41
|
+
"typedoc": "^0.28.20",
|
|
42
42
|
"typedoc-plugin-markdown": "^4.12.0",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
|
-
"vite": "^8.
|
|
44
|
+
"vite": "^8.2.0",
|
|
45
45
|
"vite-plugin-dts": "^4.5.4",
|
|
46
46
|
"vitest": "^4.1.9"
|
|
47
47
|
},
|