{"version":3,"file":"CMSLibrary.D94tKC-x.mjs","names":["__esmMin","clamp","init_index_es","t","e","getCollectionData","collectionList","_collectionList_props_children","_collectionList_props1","_collectionList_props_children_props_children","_collectionList_props_children_props1","_collectionList_props_children1","_collectionList_props2","queryParent","query","queryData","left","i","propertyControlsById","propertyControlsByName","id","control","childrenFunction","_clpc_props_children","_clpc_props1","clpc","init_CMSLibrary"],"sources":["https:/ga.jspm.io/npm:@motionone/utils@10.12.0/dist/index.es.js","https:/framerusercontent.com/modules/OPJlnSDokJ2eD9lIXljn/mr2QJ5zw4xvkJ1Vbvzgr/CMSLibrary.js"],"sourcesContent":["function addUniqueItem(t,e){-1===t.indexOf(e)&&t.push(e)}function removeItem(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const clamp=(t,e,n)=>Math.min(Math.max(n,t),e);const t={duration:.3,delay:0,endDelay:0,repeat:0,easing:\"ease\"};const isNumber=t=>\"number\"===typeof t;const isString=t=>\"string\"===typeof t;const isEasingGenerator=t=>\"object\"===typeof t&&Boolean(t.createAnimation);const isCubicBezier=t=>Array.isArray(t)&&isNumber(t[0]);const isEasingList=t=>Array.isArray(t)&&!isNumber(t[0]);const wrap=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};function getEasingForSegment(t,e){return isEasingList(t)?t[wrap(0,t.length,e)]:t}const mix=(t,e,n)=>-n*t+n*e+t;const noop=()=>{};const noopReturn=t=>t;const progress=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function fillOffset(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const s=progress(0,e,o);t.push(mix(n,1,s))}}function defaultOffset(t){const e=[0];fillOffset(e,t-1);return e}function interpolate(t,e=defaultOffset(t.length),n=noopReturn){const o=t.length;const s=o-e.length;s>0&&fillOffset(e,s);return s=>{let r=0;for(;r<o-2;r++)if(s<e[r+1])break;let f=clamp(0,1,progress(e[r],e[r+1],s));const c=getEasingForSegment(n,r);f=c(f);return mix(t[r],t[r+1],f)}}const e={ms:t=>1e3*t,s:t=>t/1e3};\n/*\n  Convert velocity into velocity per second\n\n  @param [number]: Unit per frame\n  @param [number]: Frame duration in ms\n*/function velocityPerSecond(t,e){return e?t*(1e3/e):0}export{addUniqueItem,clamp,defaultOffset,t as defaults,fillOffset,getEasingForSegment,interpolate,isCubicBezier,isEasingGenerator,isEasingList,isNumber,isString,mix,noop,noopReturn,progress,removeItem,e as time,velocityPerSecond,wrap};\n\n//# sourceMappingURL=index.es.js.map","export function getCollectionData(collectionList){var _collectionList_props,_collectionList_props_children_props,_collectionList_props_children,_collectionList_props1,_collectionList_props_children_props_children_props,_collectionList_props_children_props_children,_collectionList_props_children_props1,_collectionList_props_children1,_collectionList_props2,_queryParent_props;let queryParent=null;if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props=collectionList.props)===null||_collectionList_props===void 0?void 0:_collectionList_props.query){queryParent=collectionList;}else if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props1=collectionList.props)===null||_collectionList_props1===void 0?void 0:(_collectionList_props_children=_collectionList_props1.children)===null||_collectionList_props_children===void 0?void 0:(_collectionList_props_children_props=_collectionList_props_children.props)===null||_collectionList_props_children_props===void 0?void 0:_collectionList_props_children_props.query){queryParent=collectionList.props.children;}else if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props2=collectionList.props)===null||_collectionList_props2===void 0?void 0:(_collectionList_props_children1=_collectionList_props2.children)===null||_collectionList_props_children1===void 0?void 0:(_collectionList_props_children_props1=_collectionList_props_children1.props)===null||_collectionList_props_children_props1===void 0?void 0:(_collectionList_props_children_props_children=_collectionList_props_children_props1.children)===null||_collectionList_props_children_props_children===void 0?void 0:(_collectionList_props_children_props_children_props=_collectionList_props_children_props_children.props)===null||_collectionList_props_children_props_children_props===void 0?void 0:_collectionList_props_children_props_children_props.query){queryParent=collectionList.props.children.props.children;}const query=queryParent===null||queryParent===void 0?void 0:(_queryParent_props=queryParent.props)===null||_queryParent_props===void 0?void 0:_queryParent_props.query;let queryData=null;if(query===null||query===void 0?void 0:query.from){if(query.from.data){queryData=query.from.data;}else if(query.from.left){let left=query.from.left;for(let i=0;i<100;i++){if(left.type==\"Collection\"){queryData=left.data;break;}else if(left.left){left=left.left;}else{break;}}}}// Get property controls\nconst propertyControlsById=(queryData===null||queryData===void 0?void 0:queryData.propertyControls)||{};const propertyControlsByName={};for(const id in propertyControlsById){const control=propertyControlsById[id];propertyControlsByName[control.title]={id,...control};}// Get children function\nlet childrenFunction=null;if(collectionList){var _collectionList_props3,_clpc_props,_clpc_props_children_props,_clpc_props_children,_clpc_props1;const clpc=(_collectionList_props3=collectionList.props)===null||_collectionList_props3===void 0?void 0:_collectionList_props3.children;if(typeof clpc==\"function\"){childrenFunction=clpc;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props=clpc.props)===null||_clpc_props===void 0?void 0:_clpc_props.children)==\"function\"){childrenFunction=clpc.props.children;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props1=clpc.props)===null||_clpc_props1===void 0?void 0:(_clpc_props_children=_clpc_props1.children)===null||_clpc_props_children===void 0?void 0:(_clpc_props_children_props=_clpc_props_children.props)===null||_clpc_props_children_props===void 0?void 0:_clpc_props_children_props.children)==\"function\"){childrenFunction=clpc.props.children.props.children;}}return{query,queryParent,queryData,propertyControlsById,propertyControlsByName,childrenFunction};}export function addFieldsToSelect(fields,query,propertyControlsByName){const alias=query.alias;const select=Array.isArray(query===null||query===void 0?void 0:query.select)?[...query.select]:[];for(const fieldName of fields){var _propertyControlsByName_fieldName;const fieldId=(_propertyControlsByName_fieldName=propertyControlsByName[fieldName])===null||_propertyControlsByName_fieldName===void 0?void 0:_propertyControlsByName_fieldName.id;if(!fieldId){continue;}let matchFound=false;for(const item of select){if(item.name===fieldId&&item.type===\"Identifier\"&&item.collection===alias){matchFound=true;continue;}}if(matchFound){continue;}select.push({collection:alias,name:fieldId,type:\"Identifier\"});}return select;}\nexport const __FramerMetadata__ = {\"exports\":{\"getCollectionData\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addFieldsToSelect\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSLibrary.map"],"mappings":"A,wFAAiIC,GAAOE,EAAEC,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,EAAED,CAAC,EAAEC,CAAC,C,OCAxK,SAAgBC,EAAkBC,EAAe,CAAC,IAA+DC,EAA+BC,EAA2EC,EAA8CC,EAAsCC,EAAgCC,EAA0C,IAAIC,EAAY,KAAQP,GAAiB,MAA4DA,EAAe,OAA2E,MAAOO,EAAYP,EAAwBA,GAAiB,OAAsCE,EAAuBF,EAAe,QAAS,OAA8CC,EAA+BC,EAAuB,WAAY,MAA2FD,EAA+B,OAAyG,MAAOM,EAAYP,EAAe,MAAM,SAAkBA,GAAiB,OAAsCM,EAAuBN,EAAe,QAAS,OAA8CK,EAAgCC,EAAuB,WAAY,OAAuDF,EAAsCC,EAAgC,QAAS,OAA6DF,EAA8CC,EAAsC,WAAY,MAAyHD,EAA8C,OAAuI,QAAOI,EAAYP,EAAe,MAAM,SAAS,MAAM,UAAU,IAAMQ,EAAMD,GAAgF,OAAqE,MAAUE,EAAU,KAAK,GAAGD,GAA0C,KAAK,CAAC,GAAGA,EAAM,KAAK,KAAMC,EAAUD,EAAM,KAAK,UAAW,GAAGA,EAAM,KAAK,KAAK,CAAC,IAAIE,EAAKF,EAAM,KAAK,KAAK,IAAI,IAAIG,EAAE,EAAEA,EAAE,IAAIA,IAAK,GAAGD,EAAK,MAAM,aAAa,CAACD,EAAUC,EAAK,KAAK,KAAM,MAAM,GAAGA,EAAK,KAAMA,EAAKA,EAAK,UAAW,KAAQ,CAAC,CAC54E,IAAME,EAAsBH,GAAsD,kBAAmB,CAAC,EAAQI,EAAuB,CAAC,EAAE,IAAI,IAAMC,KAAMF,EAAqB,CAAC,IAAMG,EAAQH,EAAqBE,GAAID,EAAuBE,EAAQ,OAAO,CAACD,KAAG,GAAGC,CAAO,CAAE,CAC3Q,IAAIC,EAAiB,KAAK,GAAGhB,EAAe,CAAC,IAAkEiB,EAAqBC,EAAa,IAAMC,EAA6BnB,EAAe,OAA6E,SAAY,OAAOmB,GAAM,WAAYH,EAAiBG,EAAc,OAAOA,GAAoD,OAAuD,UAAW,WAAYH,EAAiBG,EAAK,MAAM,SAAkB,OAAOA,GAAO,OAA4BD,EAAaC,EAAK,QAAS,OAAoCF,EAAqBC,EAAa,WAAY,KAArH,IAAK,GAAuLD,EAAqB,OAAqF,WAAW,aAAYD,EAAiBG,EAAK,MAAM,SAAS,MAAM,SAAU,CAAC,MAAM,CAACX,QAAMD,cAAYE,YAAUG,uBAAqBC,yBAAuBG,kBAAgB,CAAE,C"}