Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@finsweet/attributes-cmscore

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finsweet/attributes-cmscore - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

4

cmscore.js

@@ -1,2 +0,2 @@

var Lt=Object.create;var N=Object.defineProperty,Mt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptor,_t=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,Ot=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var q=(n,t,e)=>t in n?N(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,S=(n,t)=>{for(var e in t||(t={}))V.call(t,e)&&q(n,e,t[e]);if(v)for(var e of v(t))ot.call(t,e)&&q(n,e,t[e]);return n},M=(n,t)=>Mt(n,_t(t));var it=(n,t)=>{var e={};for(var o in n)V.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(n!=null&&v)for(var o of v(n))t.indexOf(o)<0&&ot.call(n,o)&&(e[o]=n[o]);return e};var Bt=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ut=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Rt(t))!V.call(n,i)&&i!==e&&N(n,i,{get:()=>t[i],enumerable:!(o=Pt(t,i))||o.enumerable});return n};var vt=(n,t,e)=>(e=n!=null?Lt(Ot(n)):{},Ut(t||!n||!n.__esModule?N(e,"default",{value:n,enumerable:!0}):e,n));var rt=(n,t,e)=>(q(n,typeof t!="symbol"?t+"":t,e),e);var ut=Bt((Jt,pt)=>{"use strict";var T=new WeakMap,W=new WeakMap,P=new WeakMap,Q=Symbol("anyProducer"),st=Promise.resolve(),$=Symbol("listenerAdded"),F=Symbol("listenerRemoved"),E=Symbol("metaEventsAllowed"),K=!1;function w(n,t){if(typeof n!="string"&&typeof n!="symbol"&&typeof n!="number")throw new TypeError("`eventName` must be a string, symbol, or number");if(H(n)&&t!==E)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`")}function D(n){if(typeof n!="function")throw new TypeError("listener must be a function")}function I(n,t){let e=W.get(n);return e.has(t)||e.set(t,new Set),e.get(t)}function _(n,t){let e=typeof t=="string"||typeof t=="symbol"||typeof t=="number"?t:Q,o=P.get(n);return o.has(e)||o.set(e,new Set),o.get(e)}function Ht(n,t,e){let o=P.get(n);if(o.has(t))for(let i of o.get(t))i.enqueue(e);if(o.has(Q)){let i=Promise.all([t,e]);for(let r of o.get(Q))r.enqueue(i)}}function at(n,t){t=Array.isArray(t)?t:[t];let e=!1,o=()=>{},i=[],r={enqueue(s){i.push(s),o()},finish(){e=!0,o()}};for(let s of t)_(n,s).add(r);return{async next(){return i?i.length===0?e?(i=void 0,this.next()):(await new Promise(s=>{o=s}),this.next()):{done:!1,value:await i.shift()}:{done:!0}},async return(s){i=void 0;for(let a of t)_(n,a).delete(r);return o(),arguments.length>0?{done:!0,value:await s}:{done:!0}},[Symbol.asyncIterator](){return this}}}function lt(n){if(n===void 0)return ct;if(!Array.isArray(n))throw new TypeError("`methodNames` must be an array of strings");for(let t of n)if(!ct.includes(t))throw typeof t!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return n}var H=n=>n===$||n===F,y=class{static mixin(t,e){return e=lt(e),o=>{if(typeof o!="function")throw new TypeError("`target` must be function");for(let s of e)if(o.prototype[s]!==void 0)throw new Error(`The property \`${s}\` already exists on \`target\``);function i(){return Object.defineProperty(this,t,{enumerable:!1,value:new y}),this[t]}Object.defineProperty(o.prototype,t,{enumerable:!1,get:i});let r=s=>function(...a){return this[t][s](...a)};for(let s of e)Object.defineProperty(o.prototype,s,{enumerable:!1,value:r(s)});return o}}static get isDebugEnabled(){if(typeof process!="object")return K;let{env:t}=process||{env:{}};return t.DEBUG==="emittery"||t.DEBUG==="*"||K}static set isDebugEnabled(t){K=t}constructor(t={}){T.set(this,new Set),W.set(this,new Map),P.set(this,new Map),this.debug=t.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,o,i,r)=>{try{r=JSON.stringify(r)}catch(l){r=`Object with the following keys failed to stringify: ${Object.keys(r).join(",")}`}(typeof i=="symbol"||typeof i=="number")&&(i=i.toString());let s=new Date,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}.${s.getMilliseconds()}`;console.log(`[${a}][emittery:${e}][${o}] Event Name: ${i}
data: ${r}`)})}logIfDebugEnabled(t,e,o){(y.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,e,o)}on(t,e){D(e),t=Array.isArray(t)?t:[t];for(let o of t)w(o,E),I(this,o).add(e),this.logIfDebugEnabled("subscribe",o,void 0),H(o)||this.emit($,{eventName:o,listener:e},E);return this.off.bind(this,t,e)}off(t,e){D(e),t=Array.isArray(t)?t:[t];for(let o of t)w(o,E),I(this,o).delete(e),this.logIfDebugEnabled("unsubscribe",o,void 0),H(o)||this.emit(F,{eventName:o,listener:e},E)}once(t){return new Promise(e=>{let o=this.on(t,i=>{o(),e(i)})})}events(t){t=Array.isArray(t)?t:[t];for(let e of t)w(e,E);return at(this,t)}async emit(t,e,o){w(t,o),this.logIfDebugEnabled("emit",t,e),Ht(this,t,e);let i=I(this,t),r=T.get(this),s=[...i],a=H(t)?[]:[...r];await st,await Promise.all([...s.map(async l=>{if(i.has(l))return l(e)}),...a.map(async l=>{if(r.has(l))return l(t,e)})])}async emitSerial(t,e,o){w(t,o),this.logIfDebugEnabled("emitSerial",t,e);let i=I(this,t),r=T.get(this),s=[...i],a=[...r];await st;for(let l of s)i.has(l)&&await l(e);for(let l of a)r.has(l)&&await l(t,e)}onAny(t){return D(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),T.get(this).add(t),this.emit($,{listener:t},E),this.offAny.bind(this,t)}anyEvent(){return at(this)}offAny(t){D(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(F,{listener:t},E),T.get(this).delete(t)}clearListeners(t){t=Array.isArray(t)?t:[t];for(let e of t)if(this.logIfDebugEnabled("clear",e,void 0),typeof e=="string"||typeof e=="symbol"||typeof e=="number"){I(this,e).clear();let o=_(this,e);for(let i of o)i.finish();o.clear()}else{T.get(this).clear();for(let o of W.get(this).values())o.clear();for(let o of P.get(this).values()){for(let i of o)i.finish();o.clear()}}}listenerCount(t){t=Array.isArray(t)?t:[t];let e=0;for(let o of t){if(typeof o=="string"){e+=T.get(this).size+I(this,o).size+_(this,o).size+_(this).size;continue}typeof o!="undefined"&&w(o,E),e+=T.get(this).size;for(let i of W.get(this).values())e+=i.size;for(let i of P.get(this).values())e+=i.size}return e}bindMethods(t,e){if(typeof t!="object"||t===null)throw new TypeError("`target` must be an object");e=lt(e);for(let o of e){if(t[o]!==void 0)throw new Error(`The property \`${o}\` already exists on \`target\``);Object.defineProperty(t,o,{enumerable:!1,value:this[o].bind(this)})}}},ct=Object.getOwnPropertyNames(y.prototype).filter(n=>n!=="constructor");Object.defineProperty(y,"listenerAdded",{value:$,writable:!1,enumerable:!0,configurable:!1});Object.defineProperty(y,"listenerRemoved",{value:F,writable:!1,enumerable:!0,configurable:!1});pt.exports=y});var Wt="1.10.0";var xt=vt(ut(),1);var A=class{static activateAlerts(){this.alertsActivated=!0}static alert(t,e){if(this.alertsActivated&&window.alert(t),e==="error")throw new Error(t)}};rt(A,"alertsActivated",!1);var mt={wrapper:"w-dyn-list",list:"w-dyn-items",item:"w-dyn-item",paginationWrapper:"w-pagination-wrapper",paginationNext:"w-pagination-next",paginationPrevious:"w-pagination-previous",pageCount:"w-page-count",emptyState:"w-dyn-empty"};var R=(n,t)=>!!n&&t.includes(n);var z=n=>n!=null;var O=n=>typeof n=="number";var G=n=>{let t=n.split("-"),e=parseInt(t[t.length-1]);if(!isNaN(e))return e};var X=n=>Object.keys(n);var Y=n=>new Promise(t=>setTimeout(t,n));var J=()=>document.documentElement.getAttribute("data-wf-site");var k=async n=>{var e,o,i;let{Webflow:t}=window;if(!(!t||!("destroy"in t)||!("ready"in t)||!("require"in t))&&!(n&&!n.length)){if(n||(t.destroy(),t.ready()),!n||n.includes("ix2")){let r=t.require("ix2");if(r){let{store:s,actions:a}=r,{eventState:l}=s.getState().ixSession,p=Object.entries(l);n||r.destroy(),r.init(),await Promise.all(p.map(c=>s.dispatch(a.eventStateChanged(...c))))}}if(!n||n.includes("commerce")){let r=t.require("commerce"),s=J();r&&s&&(r.destroy(),r.init({siteId:s,apiUrl:"https://render.webflow.com"}))}return n!=null&&n.includes("lightbox")&&((e=t.require("lightbox"))==null||e.ready()),n!=null&&n.includes("slider")&&((o=t.require("slider"))==null||o.redraw()),n!=null&&n.includes("tabs")&&((i=t.require("tabs"))==null||i.redraw()),new Promise(r=>t.push(()=>r(void 0)))}};var $t="fs-cms-element",Ft={wrapper:"wrapper",list:"list",item:"item",paginationWrapper:"pagination-wrapper",paginationNext:"pagination-next",paginationPrevious:"pagination-previous",pageCount:"page-count",emptyState:"empty"},b=n=>{let t=`.${mt[n]}`,e=`[${$t}="${Ft[n]}"]`;return`:is(${t}, ${e})`},j=(n,t=document)=>{n=n.filter(r=>r);let e=n.join(", ")||b("wrapper");return[...t.querySelectorAll(e)].reduce((r,s)=>{if(!s)return r;let a=g(s,"wrapper");return!a||r.includes(a)||r.push(a),r},[])};function g(n,t,e=document){let o=typeof n=="string"?e.querySelector(n):n;if(!o)return;let i=o.closest(b("wrapper"));if(!i)return;let r=i.querySelector(b("list"));return t==="wrapper"?i:t==="list"?r:t==="items"?[...(r==null?void 0:r.querySelectorAll(`:scope > ${b("item")}`))||[]]:t==="pageCount"?i.querySelector(b("pageCount")):t==="empty"?i.querySelector(`:scope > ${b("emptyState")}`):t==="pagination"?i.querySelector(b("paginationWrapper")):i.querySelector(b(t==="next"?"paginationNext":"paginationPrevious"))}var ft=async n=>{let e=await(await fetch(n)).text();return new DOMParser().parseFromString(e,"text/html")};var Z=(n,t)=>{let e=n.getAttribute(t);return e?G(e):void 0};function dt(n){return n==null?void 0:n.trim().toLowerCase()}var C=class{constructor(t,e,o,i){this.element=t;this.list=e;this.currentIndex=o;this.staticIndex=i;this.props={};this.valid=!0;var s;this.href=(s=t.querySelector("a"))==null?void 0:s.href;let r=O(o);this.needsWebflowRestart=!r}collectProps({fieldKey:t,typeKey:e,rangeKey:o}){let{element:i,props:r}=this,s=[...i.querySelectorAll(`[${t}]`)];for(let a of s){let l=dt(a.getAttribute(t));if(!l)return;let{textContent:p,innerHTML:c}=a;if(!p)continue;let u=e?a.getAttribute(e):void 0,m=o?a.getAttribute(o):void 0;r[l]||(r[l]={type:u,range:m,values:new Set,elements:new Map});let d=r[l],{values:f,elements:h}=d;if(m==="from"||m==="to"){let x=[...f];x[m==="from"?0:1]=p,d.values=new Set(x)}f.add(p),h.has(p)||h.set(p,{element:a,originalHTML:c})}}};var B=(n,t)=>{n.textContent=`${t}`};var{location:ht,history:kt}=window,gt,bt=n=>{if(!n)return;let{href:t}=n,{searchParams:e}=new URL(t);return[...e.entries()]},jt=async({paginationNext:n,paginationPrevious:t,index:e})=>{let o=bt(n||t);if(!o||!o.length)return;let i,r;if(o.length===1){let[a]=o;if(!a)return;[i,r]=a}else try{let{origin:a,pathname:l}=ht;gt||(gt=ft(a+l));let p=await gt,u=j([],p)[e];if(!u)return;let m=g(u,"next"),[d]=bt(m)||[];if(!d)return;[i]=d,[,r]=o.find(([f])=>f===i)||[]}catch(a){return}if(!i||!r)return;let s=parseInt(r);return[i,s]},Et=n=>{let{paginationNext:t}=n;n.extractingPaginationData=new Promise(async e=>{let o=await jt(n);if(!o){e();return}let[i,r]=o;n.pagesQuery=i,n.currentPage=t?r-1:r+1,e()})},yt=({currentPage:n,pagesQuery:t})=>{if(!t||!n)return;let e=new URL(ht.href),{searchParams:o}=e;o.set(t,`${n}`),kt.replaceState(null,"",e.toString())};var Tt=async(n,{items:t,restartWebflow:e,restartIx:o,restartCommerce:i,restartLightbox:r,restartSliders:s,restartTabs:a})=>{let l=[[o,"ix2"],[i,"commerce"],[r,"lightbox"],[s,"slider"],[a,"tabs"]];if(!e&&!l.some(([c])=>c)||!n.some(({needsWebflowRestart:c})=>c))return;for(let c of t){let u=n.includes(c);c.needsWebflowRestart=!u}if(e){await k();return}let p=l.reduce((c,[u,m])=>(u&&c.push(m),c),[]);await k(p)};var Ct=async(n,t=!1,e=!0)=>{let{items:o,itemsPerPage:i,paginationActive:r,currentPage:s,emptyState:a}=n,l=[],p=[],c=[];for(let f of o){let{valid:h,currentIndex:x}=f,L=O(x);if(h){if(l.push(f),!r||!s){c.push(f);continue}l.length>(s-1)*i&&l.length<=s*i?c.push(f):L&&p.push(f)}else L&&p.push(f)}n.validItems=l,n.totalPages=Math.ceil(l.length/i)||1;let u=!l.length;n.emptyState=u;let m=[];c.forEach((f,h)=>{f.currentIndex!==h&&m.push([f,h,c[h-1]])});let d=e&&!t||a!==u;return d&&await n.displayElement(a?"emptyElement":"list",!1),await Promise.all([...qt(p,n,t),...Nt(m,n,t)]),await n.emitSerial("renderitems",c),await Tt(c,n),d&&await n.displayElement(u?"emptyElement":"list"),c},qt=(n,{itemsAnimation:t},e)=>n.map(async o=>{let{element:i}=o;if(e&&t){let{animateOut:r,options:s}=t;await r(i,S({remove:!0},s))}else i.remove();o.currentIndex=void 0}),Nt=(n,{list:t,itemsAnimation:e},o)=>t?n.map(async([i,r,s],a)=>{i.animating=new Promise(async l=>{i.rendering=new Promise(async p=>{await(s==null?void 0:s.rendering);let{element:c,currentIndex:u}=i,m=(s==null?void 0:s.element)||null;if(!O(u)&&o&&e){let{prepareIn:f,animateIn:h,options:x}=e,d=x||{},{stagger:L}=d,et=it(d,["stagger"]),nt=S({target:t,insertAfter:m},et);f(c,nt),St(c),p(),L&&await Y(L*a),await h(c,M(S({},nt),{prepared:!0}))}else m?t.insertBefore(c,m.nextSibling):t.prepend(c),St(c),p();l()})}),await i.rendering,i.currentIndex=r}):[],St=n=>{if(!/apple/i.test(navigator.vendor))return;let t=n.querySelectorAll("img");for(let e of t)e.outerHTML=e.outerHTML};var U=class extends xt.default{constructor(e,o){super();this.wrapper=e;this.index=o;this.emptyState=!1;this.paginationActive=!1;this.showPaginationQuery=!1;this.staticItems=[];this.restartWebflow=!1;this.restartIx=!1;this.restartCommerce=!1;this.restartLightbox=!1;this.restartSliders=!1;this.restartTabs=!1;let i=g(e,"list");this.list=i,this.paginationWrapper=g(e,"pagination"),this.paginationNext=g(e,"next"),this.paginationPrevious=g(e,"previous"),this.paginationCount=g(e,"pageCount"),this.emptyElement=g(e,"empty");let r=g(e,"items");this.itemsPerPage=this.originalItemsPerPage=r.length,this.totalPages=1,Et(this);let s=[];i&&s.push(...r.map((a,l)=>new C(a,i,l))),this.items=s,this.validItems=s,this.originalItemsOrder=[...s]}async addItems(e,o="push"){let{items:i,list:r,originalItemsOrder:s}=this;if(!r)return;let a=e.map(l=>new C(l,r));for(let l of[i,s])l[o](...a);await this.emit("shouldnest",a),await this.emit("shouldcollectprops",a),await this.emit("shouldsort",a),await this.emit("shouldfilter"),await this.renderItems(!0),await this.emit("additems",a)}async addStaticItems(e){let{items:o,staticItems:i,list:r,originalItemsOrder:s}=this;if(!r)return;let a=e.map(({itemElement:l,targetIndex:p,interactive:c})=>{let u=c?void 0:p,m=new C(l,r,void 0,u);for(let d of[o,s])d.splice(p,0,m);return c||i.push(m),m});await this.emit("shouldnest",a),await this.emit("shouldcollectprops",a),await this.emit("shouldsort",a),await this.emit("shouldfilter"),await this.renderItems(!0),await this.emit("additems",a)}restoreItemsOrder(){this.items=[...this.originalItemsOrder]}async clearItems(e=!0){if(e)for(let{element:o}of this.items)o.remove();this.items=[],this.staticItems=[],this.originalItemsOrder=[],await this.renderItems(!1,!1)}async renderItems(e,o){return await this.renderingQueue,new Promise(async i=>{let r=Ct(this,e,o);this.renderingQueue=r;let s=await r;i(s)})}async displayElement(e,o=!0,i=!0){let{listAnimation:r}=this,s=this[e];if(!!s)if(r&&i){let{animateIn:a,animateOut:l,options:p}=r;await(o?a:l)(s,p)}else s.style.display=o?"":"none",s.style.opacity=o?"1":"0"}async switchPage(e,o=!0){let{currentPage:i,showPaginationQuery:r}=this;e!==i&&(await this.emit("switchpage",e),this.currentPage=e,this.scrollToAnchor(),r&&yt(this),o&&await this.renderItems())}initPagination(e){this.paginationActive=!0,this.showPaginationQuery=!!e}addPaginationButton(e,o,i){let{paginationWrapper:r}=this;!r||this[o]||i<0||(e.style.display="none",r.insertBefore(e,r.children[i]),this[o]=e)}addEmptyElement(e){let{wrapper:o,list:i,emptyElement:r}=this;r||(e.style.display="none",o.insertBefore(e,(i==null?void 0:i.nextSibling)||null),this.emptyElement=e)}addLoader(e){let{loader:o}=this;o||(e.style.display="none",this.loader=e)}addItemsCount(e){if(this.itemsCount)return;this.itemsCount=e;let o=()=>B(e,this.items.length);o(),this.on("additems",o)}addVisibleCount(e,o,i){if(e&&!this.visibleCount){this.visibleCount=e;let r=()=>{let s=Math.min(this.itemsPerPage,this.validItems.length);B(e,s)};r(),this.on("renderitems",r)}if(o&&!this.visibleCountFrom){this.visibleCountFrom=o;let r=()=>{let s=Math.min(this.itemsPerPage*(this.currentPage||1)-(this.itemsPerPage-1),this.validItems.length);B(o,s)};r(),this.on("renderitems",r)}if(i&&!this.visibleCountTo){this.visibleCountTo=i;let r=()=>{let s=Math.min(this.itemsPerPage*(this.currentPage||1),this.validItems.length);B(i,s)};r(),this.on("renderitems",r)}}scrollToAnchor(){let{scrollAnchor:e}=this;!e||window.setTimeout(()=>e.scrollIntoView({behavior:"smooth"}),100)}getAttribute(e){let{wrapper:o,list:i}=this;return o.getAttribute(e)||(i==null?void 0:i.getAttribute(e))}getInstanceIndex(e){let{wrapper:o,list:i}=this;return Z(o,e)||(i?Z(i,e):void 0)}destroy(){var e,o;this.clearListeners(),(o=(e=window.fsAttributes.cmscore)==null?void 0:e.listInstances)==null||o.delete(this.wrapper)}};var Vt=(n,t)=>{let{version:e}=window.fsAttributes.cmscore||{};if(!e)return!1;let o={numeric:!0,sensitivity:"base"},i=t.localeCompare(e,void 0,o);return i===0||(n===">="?i<0:i>0)};var wt=(n,t="1",e="iife")=>{let i=`${n}${e==="esm"?".esm":""}.js`;return`https://cdn.jsdelivr.net/npm/@finsweet/attributes-${n}@${t}/${i}`};var It="animation";var Kt=wt(It,"1","esm"),tt=async()=>{let{fsAttributes:n}=window;n.animation||(n.animation={});let{animation:t}=n;if(t.import)return t.import;try{return t.import=import(Kt),t.import}catch(e){A.alert(`${e}`,"error");return}};var Qt=async(n,{durationKey:t,easingKey:e})=>{let o=await tt();if(!o)return;let{animations:{fade:i},easings:r}=o,{listAnimation:s}=n,a=n.getAttribute(t),l=n.getAttribute(e);if(s&&!a&&!l)return;let p=R(l,r)?l:void 0,c=a?parseFloat(a)/2e3:.1;if(!s){n.listAnimation=M(S({},i),{options:{easing:p,duration:c}});return}let{options:u}=s;if(!u){s.options={easing:p,duration:c};return}u.easing||(u.easing=p),a&&(u.duration=c)},zt=async(n,{animationKey:t,durationKey:e,easingKey:o,staggerKey:i})=>{let r=await tt();if(!r)return;let{animations:s,easings:a}=r,l=n.getAttribute(t),p=R(l,X(s))?s[l]:s.fade,c=n.getAttribute(e),u=n.getAttribute(o),m=n.getAttribute(i);n.itemsAnimation=M(S({},p),{options:{easing:R(u,a)?u:void 0,duration:c?parseFloat(c)/1e3:void 0,stagger:m?parseFloat(m):void 0}})};var Gt=n=>j(n).map(At).filter(z),At=n=>{let t=g(n,"wrapper");if(!t)return;let{fsAttributes:e}=window;e.cmscore||(e.cmscore={});let{cmscore:o}=e;o.listInstances||(o.listInstances=new Map);let{listInstances:i}=o,r=i.get(t);if(r)return r;let a=[...document.querySelectorAll(b("wrapper"))].indexOf(t);if(a===-1)return;let l=new U(t,a);return i.set(t,l),l};export{C as CMSItem,U as CMSList,zt as addItemsAnimation,Qt as addListAnimation,Vt as checkCMSCoreVersion,At as createCMSListInstance,Gt as createCMSListInstances,Wt as version};
var Ct=Object.defineProperty,It=Object.defineProperties;var At=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var nt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var V=(n,t,e)=>t in n?Ct(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,w=(n,t)=>{for(var e in t||(t={}))nt.call(t,e)&&V(n,e,t[e]);if(D)for(var e of D(t))ot.call(t,e)&&V(n,e,t[e]);return n},_=(n,t)=>It(n,At(t));var it=(n,t)=>{var e={};for(var o in n)nt.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(n!=null&&D)for(var o of D(n))t.indexOf(o)<0&&ot.call(n,o)&&(e[o]=n[o]);return e};var rt=(n,t,e)=>(V(n,typeof t!="symbol"?t+"":t,e),e);var Mt="1.10.1";var T=new WeakMap,S=new WeakMap,y=new WeakMap;var $=Symbol("anyProducer"),st=Promise.resolve(),F=Symbol("listenerAdded"),k=Symbol("listenerRemoved"),j=!1,K=!1;function I(n){if(typeof n!="string"&&typeof n!="symbol"&&typeof n!="number")throw new TypeError("`eventName` must be a string, symbol, or number")}function W(n){if(typeof n!="function")throw new TypeError("listener must be a function")}function A(n,t){let e=S.get(n);if(!!e.has(t))return e.get(t)}function R(n,t){let e=typeof t=="string"||typeof t=="symbol"||typeof t=="number"?t:$,o=y.get(n);if(!!o.has(e))return o.get(e)}function Pt(n,t,e){let o=y.get(n);if(o.has(t))for(let i of o.get(t))i.enqueue(e);if(o.has($)){let i=Promise.all([t,e]);for(let r of o.get($))r.enqueue(i)}}function at(n,t){t=Array.isArray(t)?t:[t];let e=!1,o=()=>{},i=[],r={enqueue(s){i.push(s),o()},finish(){e=!0,o()}};for(let s of t){let a=R(n,s);a||(a=new Set,y.get(n).set(s,a)),a.add(r)}return{async next(){return i?i.length===0?e?(i=void 0,this.next()):(await new Promise(s=>{o=s}),this.next()):{done:!1,value:await i.shift()}:{done:!0}},async return(s){i=void 0;for(let a of t){let l=R(n,a);l&&(l.delete(r),l.size===0&&y.get(n).delete(a))}return o(),arguments.length>0?{done:!0,value:await s}:{done:!0}},[Symbol.asyncIterator](){return this}}}function lt(n){if(n===void 0)return ct;if(!Array.isArray(n))throw new TypeError("`methodNames` must be an array of strings");for(let t of n)if(!ct.includes(t))throw typeof t!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return n}var L=n=>n===F||n===k;function H(n,t,e){if(L(t))try{j=!0,n.emit(t,e)}finally{j=!1}}var b=class{static mixin(t,e){return e=lt(e),o=>{if(typeof o!="function")throw new TypeError("`target` must be function");for(let s of e)if(o.prototype[s]!==void 0)throw new Error(`The property \`${s}\` already exists on \`target\``);function i(){return Object.defineProperty(this,t,{enumerable:!1,value:new b}),this[t]}Object.defineProperty(o.prototype,t,{enumerable:!1,get:i});let r=s=>function(...a){return this[t][s](...a)};for(let s of e)Object.defineProperty(o.prototype,s,{enumerable:!1,value:r(s)});return o}}static get isDebugEnabled(){if(typeof globalThis.process!="object")return K;let{env:t}=globalThis.process||{env:{}};return(t==null?void 0:t.DEBUG)==="emittery"||(t==null?void 0:t.DEBUG)==="*"||K}static set isDebugEnabled(t){K=t}constructor(t={}){T.set(this,new Set),S.set(this,new Map),y.set(this,new Map),y.get(this).set($,new Set),this.debug=t.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,o,i,r)=>{try{r=JSON.stringify(r)}catch(l){r=`Object with the following keys failed to stringify: ${Object.keys(r).join(",")}`}(typeof i=="symbol"||typeof i=="number")&&(i=i.toString());let s=new Date,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}.${s.getMilliseconds()}`;console.log(`[${a}][emittery:${e}][${o}] Event Name: ${i}
data: ${r}`)})}logIfDebugEnabled(t,e,o){(b.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,e,o)}on(t,e){W(e),t=Array.isArray(t)?t:[t];for(let o of t){I(o);let i=A(this,o);i||(i=new Set,S.get(this).set(o,i)),i.add(e),this.logIfDebugEnabled("subscribe",o,void 0),L(o)||H(this,F,{eventName:o,listener:e})}return this.off.bind(this,t,e)}off(t,e){W(e),t=Array.isArray(t)?t:[t];for(let o of t){I(o);let i=A(this,o);i&&(i.delete(e),i.size===0&&S.get(this).delete(o)),this.logIfDebugEnabled("unsubscribe",o,void 0),L(o)||H(this,k,{eventName:o,listener:e})}}once(t){let e,o=new Promise(i=>{e=this.on(t,r=>{e(),i(r)})});return o.off=e,o}events(t){t=Array.isArray(t)?t:[t];for(let e of t)I(e);return at(this,t)}async emit(t,e){if(I(t),L(t)&&!j)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,e),Pt(this,t,e);let o=A(this,t)||new Set,i=T.get(this),r=[...o],s=L(t)?[]:[...i];await st,await Promise.all([...r.map(async a=>{if(o.has(a))return a(e)}),...s.map(async a=>{if(i.has(a))return a(t,e)})])}async emitSerial(t,e){if(I(t),L(t)&&!j)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,e);let o=A(this,t)||new Set,i=T.get(this),r=[...o],s=[...i];await st;for(let a of r)o.has(a)&&await a(e);for(let a of s)i.has(a)&&await a(t,e)}onAny(t){return W(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),T.get(this).add(t),H(this,F,{listener:t}),this.offAny.bind(this,t)}anyEvent(){return at(this)}offAny(t){W(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),H(this,k,{listener:t}),T.get(this).delete(t)}clearListeners(t){t=Array.isArray(t)?t:[t];for(let e of t)if(this.logIfDebugEnabled("clear",e,void 0),typeof e=="string"||typeof e=="symbol"||typeof e=="number"){let o=A(this,e);o&&o.clear();let i=R(this,e);if(i){for(let r of i)r.finish();i.clear()}}else{T.get(this).clear();for(let[o,i]of S.get(this).entries())i.clear(),S.get(this).delete(o);for(let[o,i]of y.get(this).entries()){for(let r of i)r.finish();i.clear(),y.get(this).delete(o)}}}listenerCount(t){t=Array.isArray(t)?t:[t];let e=0;for(let o of t){if(typeof o=="string"){e+=T.get(this).size+(A(this,o)||new Set).size+(R(this,o)||new Set).size+(R(this)||new Set).size;continue}typeof o!="undefined"&&I(o),e+=T.get(this).size;for(let i of S.get(this).values())e+=i.size;for(let i of y.get(this).values())e+=i.size}return e}bindMethods(t,e){if(typeof t!="object"||t===null)throw new TypeError("`target` must be an object");e=lt(e);for(let o of e){if(t[o]!==void 0)throw new Error(`The property \`${o}\` already exists on \`target\``);Object.defineProperty(t,o,{enumerable:!1,value:this[o].bind(this)})}}},ct=Object.getOwnPropertyNames(b.prototype).filter(n=>n!=="constructor");Object.defineProperty(b,"listenerAdded",{value:F,writable:!1,enumerable:!0,configurable:!1});Object.defineProperty(b,"listenerRemoved",{value:k,writable:!1,enumerable:!0,configurable:!1});var M=class{static activateAlerts(){this.alertsActivated=!0}static alert(t,e){if(this.alertsActivated&&window.alert(t),e==="error")throw new Error(t)}};rt(M,"alertsActivated",!1);var pt={wrapper:"w-dyn-list",list:"w-dyn-items",item:"w-dyn-item",paginationWrapper:"w-pagination-wrapper",paginationNext:"w-pagination-next",paginationPrevious:"w-pagination-previous",pageCount:"w-page-count",emptyState:"w-dyn-empty"};var O=(n,t)=>!!n&&t.includes(n);var z=n=>n!=null;var B=n=>typeof n=="number";var Q=n=>{let t=n.split("-"),e=parseInt(t[t.length-1]);if(!isNaN(e))return e};var G=n=>Object.keys(n);var X=n=>new Promise(t=>setTimeout(t,n));var Y=()=>document.documentElement.getAttribute("data-wf-site");var N=async n=>{var e,o,i;let{Webflow:t}=window;if(!(!t||!("destroy"in t)||!("ready"in t)||!("require"in t))&&!(n&&!n.length)){if(n||(t.destroy(),t.ready()),!n||n.includes("ix2")){let r=t.require("ix2");if(r){let{store:s,actions:a}=r,{eventState:l}=s.getState().ixSession,p=Object.entries(l);n||r.destroy(),r.init(),await Promise.all(p.map(c=>s.dispatch(a.eventStateChanged(...c))))}}if(!n||n.includes("commerce")){let r=t.require("commerce"),s=Y();r&&s&&(r.destroy(),r.init({siteId:s,apiUrl:"https://render.webflow.com"}))}return n!=null&&n.includes("lightbox")&&((e=t.require("lightbox"))==null||e.ready()),n!=null&&n.includes("slider")&&((o=t.require("slider"))==null||o.redraw()),n!=null&&n.includes("tabs")&&((i=t.require("tabs"))==null||i.redraw()),new Promise(r=>t.push(()=>r(void 0)))}};var _t="fs-cms-element",Rt={wrapper:"wrapper",list:"list",item:"item",paginationWrapper:"pagination-wrapper",paginationNext:"pagination-next",paginationPrevious:"pagination-previous",pageCount:"page-count",emptyState:"empty"},h=n=>{let t=`.${pt[n]}`,e=`[${_t}="${Rt[n]}"]`;return`:is(${t}, ${e})`},q=(n,t=document)=>{n=n.filter(r=>r);let e=n.join(", ")||h("wrapper");return[...t.querySelectorAll(e)].reduce((r,s)=>{if(!s)return r;let a=g(s,"wrapper");return!a||r.includes(a)||r.push(a),r},[])};function g(n,t,e=document){let o=typeof n=="string"?e.querySelector(n):n;if(!o)return;let i=o.closest(h("wrapper"));if(!i)return;let r=i.querySelector(h("list"));return t==="wrapper"?i:t==="list"?r:t==="items"?[...(r==null?void 0:r.querySelectorAll(`:scope > ${h("item")}`))||[]]:t==="pageCount"?i.querySelector(h("pageCount")):t==="empty"?i.querySelector(`:scope > ${h("emptyState")}`):t==="pagination"?i.querySelector(h("paginationWrapper")):i.querySelector(h(t==="next"?"paginationNext":"paginationPrevious"))}var ut=async n=>{let e=await(await fetch(n)).text();return new DOMParser().parseFromString(e,"text/html")};var J=(n,t)=>{let e=n.getAttribute(t);return e?Q(e):void 0};function mt(n){return n==null?void 0:n.trim().toLowerCase()}var x=class{constructor(t,e,o,i){this.element=t;this.list=e;this.currentIndex=o;this.staticIndex=i;this.props={};this.valid=!0;var s;this.href=(s=t.querySelector("a"))==null?void 0:s.href;let r=B(o);this.needsWebflowRestart=!r}collectProps({fieldKey:t,typeKey:e,rangeKey:o}){let{element:i,props:r}=this,s=[...i.querySelectorAll(`[${t}]`)];for(let a of s){let l=mt(a.getAttribute(t));if(!l)return;let{textContent:p,innerHTML:c}=a;if(!p)continue;let u=e?a.getAttribute(e):void 0,m=o?a.getAttribute(o):void 0;r[l]||(r[l]={type:u,range:m,values:new Set,elements:new Map});let d=r[l],{values:f,elements:E}=d;if(m==="from"||m==="to"){let C=[...f];C[m==="from"?0:1]=p,d.values=new Set(C)}f.add(p),E.has(p)||E.set(p,{element:a,originalHTML:c})}}};var U=(n,t)=>{n.textContent=`${t}`};var{location:gt,history:Ot}=window,ft,dt=n=>{if(!n)return;let{href:t}=n,{searchParams:e}=new URL(t);return[...e.entries()]},Bt=async({paginationNext:n,paginationPrevious:t,index:e})=>{let o=dt(n||t);if(!o||!o.length)return;let i,r;if(o.length===1){let[a]=o;if(!a)return;[i,r]=a}else try{let{origin:a,pathname:l}=gt;ft||(ft=ut(a+l));let p=await ft,u=q([],p)[e];if(!u)return;let m=g(u,"next"),[d]=dt(m)||[];if(!d)return;[i]=d,[,r]=o.find(([f])=>f===i)||[]}catch(a){return}if(!i||!r)return;let s=parseInt(r);return[i,s]},bt=n=>{let{paginationNext:t}=n;n.extractingPaginationData=new Promise(async e=>{let o=await Bt(n);if(!o){e();return}let[i,r]=o;n.pagesQuery=i,n.currentPage=t?r-1:r+1,e()})},ht=({currentPage:n,pagesQuery:t})=>{if(!t||!n)return;let e=new URL(gt.href),{searchParams:o}=e;o.set(t,`${n}`),Ot.replaceState(null,"",e.toString())};var Et=async(n,{items:t,restartWebflow:e,restartIx:o,restartCommerce:i,restartLightbox:r,restartSliders:s,restartTabs:a})=>{let l=[[o,"ix2"],[i,"commerce"],[r,"lightbox"],[s,"slider"],[a,"tabs"]];if(!e&&!l.some(([c])=>c)||!n.some(({needsWebflowRestart:c})=>c))return;for(let c of t){let u=n.includes(c);c.needsWebflowRestart=!u}if(e){await N();return}let p=l.reduce((c,[u,m])=>(u&&c.push(m),c),[]);await N(p)};var Tt=async(n,t=!1,e=!0)=>{let{items:o,itemsPerPage:i,paginationActive:r,currentPage:s,emptyState:a}=n,l=[],p=[],c=[];for(let f of o){let{valid:E,currentIndex:C}=f,P=B(C);if(E){if(l.push(f),!r||!s){c.push(f);continue}l.length>(s-1)*i&&l.length<=s*i?c.push(f):P&&p.push(f)}else P&&p.push(f)}n.validItems=l,n.totalPages=Math.ceil(l.length/i)||1;let u=!l.length;n.emptyState=u;let m=[];c.forEach((f,E)=>{f.currentIndex!==E&&m.push([f,E,c[E-1]])});let d=e&&!t||a!==u;return d&&await n.displayElement(a?"emptyElement":"list",!1),await Promise.all([...Ut(p,n,t),...vt(m,n,t)]),await n.emitSerial("renderitems",c),await Et(c,n),d&&await n.displayElement(u?"emptyElement":"list"),c},Ut=(n,{itemsAnimation:t},e)=>n.map(async o=>{let{element:i}=o;if(e&&t){let{animateOut:r,options:s}=t;await r(i,w({remove:!0},s))}else i.remove();o.currentIndex=void 0}),vt=(n,{list:t,itemsAnimation:e},o)=>t?n.map(async([i,r,s],a)=>{i.animating=new Promise(async l=>{i.rendering=new Promise(async p=>{await(s==null?void 0:s.rendering);let{element:c,currentIndex:u}=i,m=(s==null?void 0:s.element)||null;if(!B(u)&&o&&e){let{prepareIn:f,animateIn:E,options:C}=e,d=C||{},{stagger:P}=d,tt=it(d,["stagger"]),et=w({target:t,insertAfter:m},tt);f(c,et),yt(c),p(),P&&await X(P*a),await E(c,_(w({},et),{prepared:!0}))}else m?t.insertBefore(c,m.nextSibling):t.prepend(c),yt(c),p();l()})}),await i.rendering,i.currentIndex=r}):[],yt=n=>{if(!/apple/i.test(navigator.vendor))return;let t=n.querySelectorAll("img");for(let e of t)e.outerHTML=e.outerHTML};var v=class extends b{constructor(e,o){super();this.wrapper=e;this.index=o;this.emptyState=!1;this.paginationActive=!1;this.showPaginationQuery=!1;this.staticItems=[];this.restartWebflow=!1;this.restartIx=!1;this.restartCommerce=!1;this.restartLightbox=!1;this.restartSliders=!1;this.restartTabs=!1;let i=g(e,"list");this.list=i,this.paginationWrapper=g(e,"pagination"),this.paginationNext=g(e,"next"),this.paginationPrevious=g(e,"previous"),this.paginationCount=g(e,"pageCount"),this.emptyElement=g(e,"empty");let r=g(e,"items");this.itemsPerPage=this.originalItemsPerPage=r.length,this.totalPages=1,bt(this);let s=[];i&&s.push(...r.map((a,l)=>new x(a,i,l))),this.items=s,this.validItems=s,this.originalItemsOrder=[...s]}async addItems(e,o="push"){let{items:i,list:r,originalItemsOrder:s}=this;if(!r)return;let a=e.map(l=>new x(l,r));for(let l of[i,s])l[o](...a);await this.emit("shouldnest",a),await this.emit("shouldcollectprops",a),await this.emit("shouldsort",a),await this.emit("shouldfilter"),await this.renderItems(!0),await this.emit("additems",a)}async addStaticItems(e){let{items:o,staticItems:i,list:r,originalItemsOrder:s}=this;if(!r)return;let a=e.map(({itemElement:l,targetIndex:p,interactive:c})=>{let u=c?void 0:p,m=new x(l,r,void 0,u);for(let d of[o,s])d.splice(p,0,m);return c||i.push(m),m});await this.emit("shouldnest",a),await this.emit("shouldcollectprops",a),await this.emit("shouldsort",a),await this.emit("shouldfilter"),await this.renderItems(!0),await this.emit("additems",a)}restoreItemsOrder(){this.items=[...this.originalItemsOrder]}async clearItems(e=!0){if(e)for(let{element:o}of this.items)o.remove();this.items=[],this.staticItems=[],this.originalItemsOrder=[],await this.renderItems(!1,!1)}async renderItems(e,o){return await this.renderingQueue,new Promise(async i=>{let r=Tt(this,e,o);this.renderingQueue=r;let s=await r;i(s)})}async displayElement(e,o=!0,i=!0){let{listAnimation:r}=this,s=this[e];if(!!s)if(r&&i){let{animateIn:a,animateOut:l,options:p}=r;await(o?a:l)(s,p)}else s.style.display=o?"":"none",s.style.opacity=o?"1":"0"}async switchPage(e,o=!0){let{currentPage:i,showPaginationQuery:r}=this;e!==i&&(await this.emit("switchpage",e),this.currentPage=e,this.scrollToAnchor(),r&&ht(this),o&&await this.renderItems())}initPagination(e){this.paginationActive=!0,this.showPaginationQuery=!!e}addPaginationButton(e,o,i){let{paginationWrapper:r}=this;!r||this[o]||i<0||(e.style.display="none",r.insertBefore(e,r.children[i]),this[o]=e)}addEmptyElement(e){let{wrapper:o,list:i,emptyElement:r}=this;r||(e.style.display="none",o.insertBefore(e,(i==null?void 0:i.nextSibling)||null),this.emptyElement=e)}addLoader(e){let{loader:o}=this;o||(e.style.display="none",this.loader=e)}addItemsCount(e){if(this.itemsCount)return;this.itemsCount=e;let o=()=>U(e,this.items.length);o(),this.on("additems",o)}addVisibleCount(e,o,i){if(e&&!this.visibleCount){this.visibleCount=e;let r=()=>{let s=Math.min(this.itemsPerPage,this.validItems.length);U(e,s)};r(),this.on("renderitems",r)}if(o&&!this.visibleCountFrom){this.visibleCountFrom=o;let r=()=>{let s=Math.min(this.itemsPerPage*(this.currentPage||1)-(this.itemsPerPage-1),this.validItems.length);U(o,s)};r(),this.on("renderitems",r)}if(i&&!this.visibleCountTo){this.visibleCountTo=i;let r=()=>{let s=Math.min(this.itemsPerPage*(this.currentPage||1),this.validItems.length);U(i,s)};r(),this.on("renderitems",r)}}scrollToAnchor(){let{scrollAnchor:e}=this;!e||window.setTimeout(()=>e.scrollIntoView({behavior:"smooth"}),100)}getAttribute(e){let{wrapper:o,list:i}=this;return o.getAttribute(e)||(i==null?void 0:i.getAttribute(e))}getInstanceIndex(e){let{wrapper:o,list:i}=this;return J(o,e)||(i?J(i,e):void 0)}destroy(){var e,o;this.clearListeners(),(o=(e=window.fsAttributes.cmscore)==null?void 0:e.listInstances)==null||o.delete(this.wrapper)}};var Dt=(n,t)=>{let{version:e}=window.fsAttributes.cmscore||{};if(!e)return!1;let o={numeric:!0,sensitivity:"base"},i=t.localeCompare(e,void 0,o);return i===0||(n===">="?i<0:i>0)};var St=(n,t="1",e="iife")=>{let i=`${n}${e==="esm"?".esm":""}.js`;return`https://cdn.jsdelivr.net/npm/@finsweet/attributes-${n}@${t}/${i}`};var wt="animation";var Wt=St(wt,"1","esm"),Z=async()=>{let{fsAttributes:n}=window;n.animation||(n.animation={});let{animation:t}=n;if(t.import)return t.import;try{return t.import=import(Wt),t.import}catch(e){M.alert(`${e}`,"error");return}};var Ht=async(n,{durationKey:t,easingKey:e})=>{let o=await Z();if(!o)return;let{animations:{fade:i},easings:r}=o,{listAnimation:s}=n,a=n.getAttribute(t),l=n.getAttribute(e);if(s&&!a&&!l)return;let p=O(l,r)?l:void 0,c=a?parseFloat(a)/2e3:.1;if(!s){n.listAnimation=_(w({},i),{options:{easing:p,duration:c}});return}let{options:u}=s;if(!u){s.options={easing:p,duration:c};return}u.easing||(u.easing=p),a&&(u.duration=c)},$t=async(n,{animationKey:t,durationKey:e,easingKey:o,staggerKey:i})=>{let r=await Z();if(!r)return;let{animations:s,easings:a}=r,l=n.getAttribute(t),p=O(l,G(s))?s[l]:s.fade,c=n.getAttribute(e),u=n.getAttribute(o),m=n.getAttribute(i);n.itemsAnimation=_(w({},p),{options:{easing:O(u,a)?u:void 0,duration:c?parseFloat(c)/1e3:void 0,stagger:m?parseFloat(m):void 0}})};var Ft=n=>q(n).map(xt).filter(z),xt=n=>{let t=g(n,"wrapper");if(!t)return;let{fsAttributes:e}=window;e.cmscore||(e.cmscore={});let{cmscore:o}=e;o.listInstances||(o.listInstances=new Map);let{listInstances:i}=o,r=i.get(t);if(r)return r;let a=[...document.querySelectorAll(h("wrapper"))].indexOf(t);if(a===-1)return;let l=new v(t,a);return i.set(t,l),l};export{x as CMSItem,v as CMSList,$t as addItemsAnimation,Ht as addListAnimation,Dt as checkCMSCoreVersion,xt as createCMSListInstance,Ft as createCMSListInstances,Mt as version};
{
"name": "@finsweet/attributes-cmscore",
"version": "1.10.0",
"version": "1.10.1",
"description": "Core functionalities of all cms Attributes.",

@@ -31,3 +31,3 @@ "main": "./src/index.ts",

"dependencies": {
"emittery": "^0.11.0"
"emittery": "^1.0.0"
},

@@ -34,0 +34,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc