{"version":3,"file":"C_TextCounter.B9O2_Jaf.mjs","names":["n","s","a","p","e","e","t","i","u","n","p","o","i","t","l","r","a"],"sources":["https:/ga.jspm.io/npm:countup.js@2.8.0/dist/countUp.min.js","https:/ga.jspm.io/npm:usehooks-ts@2.9.1/dist/esm/index.js","https:/framerusercontent.com/modules/IqKU4zRQOizpwJFYNlrz/chqOkqW7nEW0PWgMSk2V/C_TextCounter.js"],"sourcesContent":["var t=function(){return t=Object.assign||function(n){for(var s,a=1,e=arguments.length;a<e;a++)for(var o in s=arguments[a])Object.prototype.hasOwnProperty.call(s,o)&&(n[o]=s[o]);return n},t.apply(this,arguments)},n=function(){function i(n,s,a){var e=this;this.endVal=s,this.options=a,this.version=\"2.8.0\",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:\",\",decimal:\".\",prefix:\"\",suffix:\"\",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error=\"\",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(n){e.startTime||(e.startTime=n);var s=n-e.startTime;e.remaining=e.duration-s,e.useEasing?e.countDown?e.frameVal=e.startVal-e.easingFn(s,0,e.startVal-e.endVal,e.duration):e.frameVal=e.easingFn(s,e.startVal,e.endVal-e.startVal,e.duration):e.frameVal=e.startVal+(e.endVal-e.startVal)*(s/e.duration);var a=e.countDown?e.frameVal<e.endVal:e.frameVal>e.endVal;e.frameVal=a?e.endVal:e.frameVal,e.frameVal=Number(e.frameVal.toFixed(e.options.decimalPlaces)),e.printValue(e.frameVal),s<e.duration?e.rAF=requestAnimationFrame(e.count):null!==e.finalEndVal?e.update(e.finalEndVal):e.options.onCompleteCallback&&e.options.onCompleteCallback()},this.formatNumber=function(n){var s,a,o,r,l=n<0?\"-\":\"\";s=Math.abs(n).toFixed(e.options.decimalPlaces);var h=(s+=\"\").split(\".\");if(a=h[0],o=h.length>1?e.options.decimal+h[1]:\"\",e.options.useGrouping){r=\"\";for(var u=3,p=0,d=0,c=a.length;d<c;++d)e.options.useIndianSeparators&&4===d&&(u=2,p=1),0!==d&&p%u==0&&(r=e.options.separator+r),p++,r=a[c-d-1]+r;a=r}return e.options.numerals&&e.options.numerals.length&&(a=a.replace(/[0-9]/g,(function(n){return e.options.numerals[+n]})),o=o.replace(/[0-9]/g,(function(n){return e.options.numerals[+n]}))),l+e.options.prefix+a+o+e.options.suffix},this.easeOutExpo=function(n,s,a,e){return a*(1-Math.pow(2,-10*n/e))*1024/1023+s},this.options=t(t({},this.defaults),a),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(s),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,\"\"===this.options.separator&&(this.options.useGrouping=!1),this.el=\"string\"==typeof n?document.getElementById(n):n,this.el?this.printValue(this.startVal):this.error=\"[CountUp] target is null or undefined\",\"undefined\"!=typeof window&&this.options.enableScrollSpy&&(this.error?console.error(this.error,n):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return e.handleScroll(e)})),window.onscroll=function(){window.onScrollFns.forEach((function(n){return n()}))},this.handleScroll(this)))}return i.prototype.handleScroll=function(n){if(n&&window&&!n.once){var s=window.innerHeight+window.scrollY,a=n.el.getBoundingClientRect(),e=a.top+window.pageYOffset,o=a.top+a.height+window.pageYOffset;o<s&&o>window.scrollY&&n.paused?(n.paused=!1,setTimeout((function(){return n.start()}),n.options.scrollSpyDelay),n.options.scrollSpyOnce&&(n.once=!0)):(window.scrollY>o||e>s)&&!n.paused&&n.reset()}},i.prototype.determineDirectionAndSmartEasing=function(){var n=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>n;var s=n-this.startVal;if(Math.abs(s)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=n;var a=this.countDown?1:-1;this.endVal=n+a*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=n,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},i.prototype.start=function(n){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),n&&(this.options.onCompleteCallback=n),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},i.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},i.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},i.prototype.update=function(n){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(n),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},i.prototype.printValue=function(n){var s;if(this.el){var a=this.formattingFn(n);(null===(s=this.options.plugin)||void 0===s?void 0:s.render)?this.options.plugin.render(this.el,a):\"INPUT\"===this.el.tagName?this.el.value=a:\"text\"===this.el.tagName||\"tspan\"===this.el.tagName?this.el.textContent=a:this.el.innerHTML=a}},i.prototype.ensureNumber=function(n){return\"number\"==typeof n&&!isNaN(n)},i.prototype.validateValue=function(n){var s=Number(n);return this.ensureNumber(s)?s:(this.error=\"[CountUp] invalid start or end value: \".concat(n),null)},i.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},i}();export{n as CountUp};\n\n//# sourceMappingURL=countUp.min.js.map","import{useState as e,useCallback as t,useEffect as n,useRef as o,useReducer as r,useLayoutEffect as s,useMemo as i}from\"react\";function useBoolean(n){const[o,r]=e(!!n);const s=t((()=>r(true)),[]);const i=t((()=>r(false)),[]);const u=t((()=>r((e=>!e))),[]);return{value:o,setValue:r,setTrue:s,setFalse:i,toggle:u}}function useClickAnyWhere(e){useEventListener(\"click\",(t=>{e(t)}))}var u=(void 0,function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function fulfilled(e){try{step(o.next(e))}catch(e){r(e)}}function rejected(e){try{step(o.throw(e))}catch(e){r(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))});function useCopyToClipboard(){const[t,n]=e(null);const copy=e=>u(this,void 0,void 0,(function*(){if(!(null===navigator||void 0===navigator?void 0:navigator.clipboard)){console.warn(\"Clipboard not supported\");return false}try{yield navigator.clipboard.writeText(e);n(e);return true}catch(e){console.warn(\"Copy failed\",e);n(null);return false}}));return[t,copy]}function useCountdown(e){let n=false;let o,r,s,i;if(\"seconds\"in e){console.warn(\"[useCountdown:DEPRECATED] new interface is already available (see https://usehooks-ts.com/react-hook/use-countdown), the old version will retire on usehooks-ts@3.\");n=true;o=e.seconds;r=e.interval;s=e.isIncrement}else({countStart:o,intervalMs:r,isIncrement:s,countStop:i}=e);r=null!==r&&void 0!==r?r:1e3;s=null!==s&&void 0!==s&&s;i=null!==i&&void 0!==i?i:0;const{count:u,increment:c,decrement:a,reset:d}=useCounter(o);const{value:l,setTrue:f,setFalse:v}=useBoolean(false);const resetCountdown=()=>{v();d()};const g=t((()=>{u!==i?s?c():a():v()}),[u,i,a,c,s,v]);useInterval(g,l?r:null);return n?[u,{start:f,stop:v,reset:resetCountdown}]:[u,{startCountdown:f,stopCountdown:v,resetCountdown:resetCountdown}]}function useCounter(t){const[n,o]=e(t||0);const increment=()=>o((e=>e+1));const decrement=()=>o((e=>e-1));const reset=()=>o(t||0);return{count:n,increment:increment,decrement:decrement,reset:reset,setCount:o}}const c=\"(prefers-color-scheme: dark)\";function useDarkMode(e){var t;const n=useMediaQuery(c);const[o,r]=useLocalStorage(\"usehooks-ts-dark-mode\",null!==(t=null!==e&&void 0!==e?e:n)&&void 0!==t&&t);useUpdateEffect((()=>{r(n)}),[n]);return{isDarkMode:o,toggle:()=>r((e=>!e)),enable:()=>r(true),disable:()=>r(false)}}function useDebounce(t,o){const[r,s]=e(t);n((()=>{const e=setTimeout((()=>s(t)),o||500);return()=>{clearTimeout(e)}}),[t,o]);return r}function useDocumentTitle(e){l((()=>{window.document.title=e}),[e])}function useEffectOnce(e){n(e,[])}function useElementSize(){const[n,o]=e(null);const[r,s]=e({width:0,height:0});const i=t((()=>{s({width:(null===n||void 0===n?void 0:n.offsetWidth)||0,height:(null===n||void 0===n?void 0:n.offsetHeight)||0})}),[null===n||void 0===n?void 0:n.offsetHeight,null===n||void 0===n?void 0:n.offsetWidth]);useEventListener(\"resize\",i);l((()=>{i()}),[null===n||void 0===n?void 0:n.offsetHeight,null===n||void 0===n?void 0:n.offsetWidth]);return[o,r]}function useEventCallback(e){const n=o((()=>{throw new Error(\"Cannot call an event handler while rendering.\")}));l((()=>{n.current=e}),[e]);return t(((...e)=>n.current(...e)),[n])}function useEventListener(e,t,r,s){const i=o(t);l((()=>{i.current=t}),[t]);n((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!(n&&n.addEventListener))return;const listener=e=>i.current(e);n.addEventListener(e,listener,s);return()=>{n.removeEventListener(e,listener,s)}}),[e,r,s])}var a=(void 0,function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function fulfilled(e){try{step(o.next(e))}catch(e){r(e)}}function rejected(e){try{step(o.throw(e))}catch(e){r(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))});function useFetch(e,t){const s=o({});const i=o(false);const u={error:void 0,data:void 0};const fetchReducer=(e,t)=>{switch(t.type){case\"loading\":return Object.assign({},u);case\"fetched\":return Object.assign(Object.assign({},u),{data:t.payload});case\"error\":return Object.assign(Object.assign({},u),{error:t.payload});default:return e}};const[c,d]=r(fetchReducer,u);n((()=>{if(!e)return;i.current=false;const fetchData=()=>a(this,void 0,void 0,(function*(){d({type:\"loading\"});if(s.current[e])d({type:\"fetched\",payload:s.current[e]});else try{const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);const o=yield n.json();s.current[e]=o;if(i.current)return;d({type:\"fetched\",payload:o})}catch(e){if(i.current)return;d({type:\"error\",payload:e})}}));void fetchData();return()=>{i.current=true}}),[e]);return c}function useHover(t){const[n,o]=e(false);const handleMouseEnter=()=>o(true);const handleMouseLeave=()=>o(false);useEventListener(\"mouseenter\",handleMouseEnter,t);useEventListener(\"mouseleave\",handleMouseLeave,t);return n}function useImageOnLoad(){const[t,n]=e(false);const handleImageOnLoad=()=>{n(true)};const o={thumbnail:{visibility:t?\"hidden\":\"visible\",filter:\"blur(8px)\",transition:\"visibility 0ms ease-out 500ms\"},fullSize:{opacity:t?1:0,transition:\"opacity 500ms ease-in 0ms\"}};return{handleImageOnLoad:handleImageOnLoad,css:o}}function useIntersectionObserver(t,{threshold:o=0,root:r=null,rootMargin:s=\"0%\",freezeOnceVisible:i=false}){const[u,c]=e();const a=(null===u||void 0===u?void 0:u.isIntersecting)&&i;const updateEntry=([e])=>{c(e)};n((()=>{const e=null===t||void 0===t?void 0:t.current;const n=!!window.IntersectionObserver;if(!n||a||!e)return;const i={threshold:o,root:r,rootMargin:s};const u=new IntersectionObserver(updateEntry,i);u.observe(e);return()=>u.disconnect()}),[null===t||void 0===t?void 0:t.current,JSON.stringify(o),r,s,a]);return u}function useInterval(e,t){const r=o(e);l((()=>{r.current=e}),[e]);n((()=>{if(!t&&0!==t)return;const e=setInterval((()=>r.current()),t);return()=>clearInterval(e)}),[t])}function useIsClient(){const[t,o]=e(false);n((()=>{o(true)}),[]);return t}function useIsFirstRender(){const e=o(true);if(e.current){e.current=false;return true}return e.current}function useIsMounted(){const e=o(false);n((()=>{e.current=true;return()=>{e.current=false}}),[]);return t((()=>e.current),[])}const d=\"undefined\"!==typeof window?s:n;var l=d;function useLocalStorage(o,r){const s=t((()=>{if(\"undefined\"===typeof window)return r;try{const e=window.localStorage.getItem(o);return e?parseJSON$1(e):r}catch(e){console.warn(`Error reading localStorage key “${o}”:`,e);return r}}),[r,o]);const[i,u]=e(s);const c=useEventCallback((e=>{\"undefined\"===typeof window&&console.warn(`Tried setting localStorage key “${o}” even though environment is not a client`);try{const t=e instanceof Function?e(i):e;window.localStorage.setItem(o,JSON.stringify(t));u(t);window.dispatchEvent(new Event(\"local-storage\"))}catch(e){console.warn(`Error setting localStorage key “${o}”:`,e)}}));n((()=>{u(s())}),[]);const a=t((e=>{(null===e||void 0===e?void 0:e.key)&&e.key!==o||u(s())}),[o,s]);useEventListener(\"storage\",a);useEventListener(\"local-storage\",a);return[i,c]}function parseJSON$1(e){try{return\"undefined\"===e?void 0:JSON.parse(null!==e&&void 0!==e?e:\"\")}catch(t){console.log(\"parsing error on\",{value:e});return}}function useLockedBody(t=false,o=\"___gatsby\"){const[r,s]=e(t);l((()=>{if(!r)return;const e=document.body.style.overflow;const t=document.body.style.paddingRight;document.body.style.overflow=\"hidden\";const n=document.getElementById(o);const s=n?n.offsetWidth-n.scrollWidth:0;s&&(document.body.style.paddingRight=`${s}px`);return()=>{document.body.style.overflow=e;s&&(document.body.style.paddingRight=t)}}),[r]);n((()=>{r!==t&&s(t)}),[t]);return[r,s]}function useMap(n=new Map){const[o,r]=e(new Map(n));const s={set:t(((e,t)=>{r((n=>{const o=new Map(n);o.set(e,t);return o}))}),[]),setAll:t((e=>{r((()=>new Map(e)))}),[]),remove:t((e=>{r((t=>{const n=new Map(t);n.delete(e);return n}))}),[]),reset:t((()=>{r((()=>new Map))}),[])};return[o,s]}function useMediaQuery(t){const getMatches=e=>\"undefined\"!==typeof window&&window.matchMedia(e).matches;const[o,r]=e(getMatches(t));function handleChange(){r(getMatches(t))}n((()=>{const e=window.matchMedia(t);handleChange();e.addListener?e.addListener(handleChange):e.addEventListener(\"change\",handleChange);return()=>{e.removeListener?e.removeListener(handleChange):e.removeEventListener(\"change\",handleChange)}}),[t]);return o}function useOnClickOutside(e,t,n=\"mousedown\"){useEventListener(n,(n=>{const o=null===e||void 0===e?void 0:e.current;o&&!o.contains(n.target)&&t(n)}))}function useReadLocalStorage(o){const r=t((()=>{if(\"undefined\"===typeof window)return null;try{const e=window.localStorage.getItem(o);return e?JSON.parse(e):null}catch(e){console.warn(`Error reading localStorage key “${o}”:`,e);return null}}),[o]);const[s,i]=e(r);n((()=>{i(r())}),[]);const u=t((e=>{(null===e||void 0===e?void 0:e.key)&&e.key!==o||i(r())}),[o,r]);useEventListener(\"storage\",u);useEventListener(\"local-storage\",u);return s}function useScreen(){const getScreen=()=>{if(\"undefined\"!==typeof window&&window.screen)return window.screen};const[t,n]=e(getScreen());function handleSize(){n(getScreen())}useEventListener(\"resize\",handleSize);l((()=>{handleSize()}),[]);return t}const f={};function getScriptNode(e){const t=document.querySelector(`script[src=\"${e}\"]`);const n=null===t||void 0===t?void 0:t.getAttribute(\"data-status\");return{node:t,status:n}}function useScript(t,o){const[r,s]=e((()=>{var e;return!t||(null===o||void 0===o?void 0:o.shouldPreventLoad)?\"idle\":\"undefined\"===typeof window?\"loading\":null!==(e=f[t])&&void 0!==e?e:\"loading\"}));n((()=>{var e,n;if(!t||(null===o||void 0===o?void 0:o.shouldPreventLoad))return;const r=f[t];if(\"ready\"===r||\"error\"===r){s(r);return}const i=getScriptNode(t);let u=i.node;if(u)s(null!==(n=null!==(e=i.status)&&void 0!==e?e:r)&&void 0!==n?n:\"loading\");else{u=document.createElement(\"script\");u.src=t;u.async=true;u.setAttribute(\"data-status\",\"loading\");document.body.appendChild(u);const setAttributeFromEvent=e=>{const t=\"load\"===e.type?\"ready\":\"error\";null===u||void 0===u?void 0:u.setAttribute(\"data-status\",t)};u.addEventListener(\"load\",setAttributeFromEvent);u.addEventListener(\"error\",setAttributeFromEvent)}const setStateFromEvent=e=>{const n=\"load\"===e.type?\"ready\":\"error\";s(n);f[t]=n};u.addEventListener(\"load\",setStateFromEvent);u.addEventListener(\"error\",setStateFromEvent);return()=>{if(u){u.removeEventListener(\"load\",setStateFromEvent);u.removeEventListener(\"error\",setStateFromEvent)}u&&(null===o||void 0===o?void 0:o.removeOnUnmount)&&u.remove()}}),[t,null===o||void 0===o?void 0:o.shouldPreventLoad,null===o||void 0===o?void 0:o.removeOnUnmount]);return r}function useSessionStorage(o,r){const s=t((()=>{if(\"undefined\"===typeof window)return r;try{const e=window.sessionStorage.getItem(o);return e?parseJSON(e):r}catch(e){console.warn(`Error reading sessionStorage key “${o}”:`,e);return r}}),[r,o]);const[i,u]=e(s);const c=useEventCallback((e=>{\"undefined\"==typeof window&&console.warn(`Tried setting sessionStorage key “${o}” even though environment is not a client`);try{const t=e instanceof Function?e(i):e;window.sessionStorage.setItem(o,JSON.stringify(t));u(t);window.dispatchEvent(new Event(\"session-storage\"))}catch(e){console.warn(`Error setting sessionStorage key “${o}”:`,e)}}));n((()=>{u(s())}),[]);const a=t((e=>{(null===e||void 0===e?void 0:e.key)&&e.key!==o||u(s())}),[o,s]);useEventListener(\"storage\",a);useEventListener(\"session-storage\",a);return[i,c]}function parseJSON(e){try{return\"undefined\"===e?void 0:JSON.parse(null!==e&&void 0!==e?e:\"\")}catch(t){console.log(\"parsing error on\",{value:e});return}}function useSsr(){const e=\"undefined\"!==typeof window&&window.document&&window.document.documentElement;return{isBrowser:e,isServer:!e}}function useStep(n){const[o,r]=e(1);const s=i((()=>o+1<=n),[o,n]);const u=i((()=>o-1>=1),[o]);const c=t((e=>{const t=e instanceof Function?e(o):e;if(!(t>=1&&t<=n))throw new Error(\"Step not valid\");r(t)}),[n,o]);const a=t((()=>{s&&r((e=>e+1))}),[s]);const d=t((()=>{u&&r((e=>e-1))}),[u]);const l=t((()=>{r(1)}),[]);return[o,{goToNextStep:a,goToPrevStep:d,canGoToNextStep:s,canGoToPrevStep:u,setStep:c,reset:l}]}const v=\"(prefers-color-scheme: dark)\";function useTernaryDarkMode(){const t=useMediaQuery(v);const[o,r]=useLocalStorage(\"usehooks-ts-ternary-dark-mode\",\"system\");const[s,i]=e(t);useUpdateEffect((()=>{\"system\"===o&&i(t)}),[t]);n((()=>{switch(o){case\"light\":i(false);break;case\"system\":i(t);break;case\"dark\":i(true);break}}),[o,t]);function toggleTernaryDarkMode(){const e={light:\"system\",system:\"dark\",dark:\"light\"};r((t=>e[t]))}return{isDarkMode:s,ternaryDarkMode:o,setTernaryDarkMode:r,toggleTernaryDarkMode:toggleTernaryDarkMode}}function useTimeout(e,t){const r=o(e);l((()=>{r.current=e}),[e]);n((()=>{if(!t&&0!==t)return;const e=setTimeout((()=>r.current()),t);return()=>clearTimeout(e)}),[t])}function useToggle(n){const[o,r]=e(!!n);const s=t((()=>r((e=>!e))),[]);return[o,s,r]}function useUpdateEffect(e,t){const o=useIsFirstRender();n((()=>{if(!o)return e()}),t)}function useWindowSize(){const[t,n]=e({width:0,height:0});const handleSize=()=>{n({width:window.innerWidth,height:window.innerHeight})};useEventListener(\"resize\",handleSize);l((()=>{handleSize()}),[]);return t}export{useBoolean,useClickAnyWhere,useCopyToClipboard,useCountdown,useCounter,useDarkMode,useDebounce,useDocumentTitle,useEffectOnce,useElementSize,useEventCallback,useEventListener,useFetch,useHover,useImageOnLoad,useIntersectionObserver,useInterval,useIsClient,useIsFirstRender,useIsMounted,l as useIsomorphicLayoutEffect,useLocalStorage,useLockedBody,useMap,useMediaQuery,useOnClickOutside,useReadLocalStorage,useScreen,useScript,useSessionStorage,useSsr,useStep,useTernaryDarkMode,useTimeout,useToggle,useUpdateEffect,useWindowSize};\n\n//# sourceMappingURL=index.js.map","import{jsx as e}from\"react/jsx-runtime\";import{CountUp as t}from\"countup.js\";import{useEffect as l,useRef as o}from\"react\";import{addPropertyControls as r,ControlType as a}from\"framer\";import{useIntersectionObserver as i}from\"usehooks-ts\";export default function n({startingNumber:r,endingNumber:a,decimalPlaces:n,duration:u,fontStyle:p,isDemo:m}){let d=o(null),s=i(d,{}),f=!!(null==s?void 0:s.isIntersecting);async function c(){let e=new t(d.current,a,{startVal:r,decimalPlaces:n,duration:u,onCompleteCallback:()=>{m&&setTimeout(()=>{e.frameVal===a?e.update(r):e.update(a);},u);}});e.error?console.error(e.error):e.start();}return l(()=>{f&&c();},[r,a,n,u,p,f]),/*#__PURE__*/e(\"span\",{ref:d,style:{...p,fontVariantNumeric:\"normal\"}});}n.displayName=\"Text Counter\",r(n,{isDemo:{title:\"Demo\",type:a.Boolean,defaultValue:!1,hidden:()=>!(window.document.location.href.includes(\"dolfwbvpohqr10miiz4u\")||window.document.location.href.includes(\"dgreloj5g2111zyxcd1s\"))},startingNumber:{type:a.Number,defaultValue:0},endingNumber:{type:a.Number,defaultValue:1e3},duration:{type:a.Number,defaultValue:2},decimalPlaces:{type:a.Number,defaultValue:0},fontStyle:{type:a.Object,controls:{fontFamily:{title:\"Family\",type:a.String,defaultValue:\"Inter\"},fontWeight:{title:\"Weight\",type:a.Enum,defaultValue:\"400\",options:[\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"],optionTitles:[\"Thin\",\"Extra Light\",\"Light\",\"Regular\",\"Medium\",\"Semibold\",\"Bold\",\"Extra Bold\",\"Black\"]},fontStyle:{title:\"Style\",type:a.Enum,defaultValue:\"Normal\",options:[\"Normal\",\"Italic\"]},color:{type:a.Color,defaultValue:\"#000\"},fontSize:{title:\"Size\",type:a.Number,defaultValue:16,min:0,step:1,displayStepper:!0},letterSpacing:{title:\"Letter\",type:a.Number,defaultValue:0,min:0,displayStepper:!0,step:.1},lineHeight:{title:\"Line\",type:a.Number,defaultValue:1.2,min:1,displayStepper:!0,step:.1},textAlign:{title:\"Align\",type:a.Enum,defaultValue:\"left\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"⬅️\",\"⏺\",\"➡️\"],displaySegmentedControl:!0},textTransform:{title:\"Transform\",type:a.Enum,defaultValue:\"none\",options:[\"none\",\"uppercase\",\"lowercase\",\"capitalize\"]}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./C_TextCounter.map"],"mappings":"6NAAI,EAAE,UAAU,CAAC,MAAO,GAAE,OAAO,QAAQ,SAAS,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,OAAO,EAAE,EAAE,IAAI,IAAI,IAAI,IAAK,GAAE,UAAU,GAAG,OAAO,UAAU,eAAe,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,OAAOA,GAAG,EAAE,MAAM,KAAK,UAAU,EAAE,EAAE,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,QAAQ,KAAK,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,YAAY,CAAC,EAAE,oBAAoB,CAAC,EAAE,qBAAqB,IAAI,kBAAkB,IAAI,UAAU,IAAI,QAAQ,IAAI,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAAC,EAAE,eAAe,IAAI,cAAc,CAAC,EAAE,CAAC,KAAK,YAAY,KAAK,KAAK,UAAU,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,KAAK,MAAM,GAAG,KAAK,SAAS,EAAE,KAAK,OAAO,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,KAAK,MAAM,SAAS,EAAE,CAAC,AAAc,EAAE,YAAUA,EAAG,IAAIC,EAAED,EAAE,EAAE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