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

@netless/app-countdown

Package Overview
Dependencies
Maintainers
12
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netless/app-countdown - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

dist/main.iife.js

@@ -1,3 +0,3 @@

"use strict";var NetlessAppCountdown=(()=>{var Qe=Object.create;var V=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var nt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rt=(e,t)=>{for(var n in t)V(e,n,{get:t[n],enumerable:!0})},se=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tt(t))!ot.call(e,i)&&i!==n&&V(e,i,{get:()=>t[i],enumerable:!(o=et(t,i))||o.enumerable});return e};var ae=(e,t,n)=>(n=e!=null?Qe(nt(e)):{},se(t||!e||!e.__esModule?V(n,"default",{value:e,enumerable:!0}):n,e)),it=e=>se(V({},"__esModule",{value:!0}),e);var Ee=le(()=>{var ft=`.time-cell{display:flex;flex-flow:column nowrap;align-items:center;font-family:sans-serif;font-weight:700}.time-cell.disabled .time-cell-up:before,.time-cell.disabled .time-cell-down:after{border-top-color:#0000000d;border-bottom-color:#0000000d}.time-cell-up:before,.time-cell-down:after{content:"";display:block;width:0;height:0;margin:0 0 4px;border-top:0;border-left:12px solid rgba(0,0,0,0);border-right:12px solid rgba(0,0,0,0);border-bottom:12px solid #151515;transition:border-color .4s;cursor:pointer}.time-cell-down:after{margin:4px 0 0;border-top:12px solid #151515;border-bottom:0}.rotor{position:relative;width:36px;height:64px;border-radius:4px;font-size:48px;text-align:center;perspective:200px}.rotor-top,.rotor-bottom{overflow:hidden;position:absolute;width:36px;height:32px}.rotor-leaf{z-index:1;position:absolute;width:36px;height:64px;transform-style:preserve-3d;transition:transform 0s}.rotor-leaf.flipped{transform:rotateX(-180deg);transition:all .5s ease-in-out}.rotor-leaf-front,.rotor-leaf-rear{overflow:hidden;position:absolute;width:36px;height:32px;margin:0;transform:rotateX(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}.rotor-leaf-front{line-height:64px;border-radius:4px 4px 0 0}.rotor-leaf-rear{line-height:0px;border-radius:0 0 4px 4px;transform:rotateX(-180deg)}.rotor-top{line-height:64px;border-radius:4px 4px 0 0}.rotor-bottom{bottom:0;line-height:0px;border-radius:0 0 4px 4px}.rotor:after{content:"";z-index:2;position:absolute;bottom:0;left:0;width:36px;height:32px;border-radius:0 0 4px 4px}.rotor,.rotor-top,.rotor-leaf-front{color:#fff;background-color:#151515}.rotor-bottom,.rotor-leaf-rear{color:#efefef;background-color:#202020}.rotor:after{border-top:solid 1px #151515}.telebox-color-scheme-dark .time-cell.disabled .time-cell-up:before,.telebox-color-scheme-dark .time-cell.disabled .time-cell-down:after{border-top-color:#ffffff14;border-bottom-color:#ffffff14}.telebox-color-scheme-dark .time-cell-up:before,.telebox-color-scheme-dark .time-cell-down:after{border-top-color:#d9d9df;border-bottom-color:#d9d9df}.telebox-color-scheme-dark .rotor,.telebox-color-scheme-dark .rotor-top,.telebox-color-scheme-dark .rotor-leaf-front{color:#383838;background-color:#efeff5}.telebox-color-scheme-dark .rotor-bottom,.telebox-color-scheme-dark .rotor-leaf-rear{color:#333;background-color:#eeecec}.telebox-color-scheme-dark .rotor:after{border-top:solid 1px #efeff5}.countdown-clock{display:flex;padding:5px}.countdown-clock>*{padding:0 5px}.countdown-clock-divider{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 1px}.countdown-clock-divider:before,.countdown-clock-divider:after{content:"";display:block;width:8px;height:8px;margin:6px 0;background-color:#000;border-radius:50%}.netless-app-countdown{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;transition:background-color .4s}.netless-app-countdown-shrink{display:inline-block;transition:background-color .4s}.netless-app-countdown-btns{width:100%;margin-top:10px;display:flex;flex-wrap:nowrap}.netless-app-countdown-btns>button{flex:1;display:block;margin:0 10px 0 0;padding:5px 10px;text-align:center;border:0;border-radius:4px;color:#fff;background-color:#3380ff;transition:background-color .4s,color .4s;cursor:pointer}.netless-app-countdown-btns>button:last-of-type{margin:0}.netless-app-countdown-btns>button:disabled{color:#00000040;background:#f5f5f5;cursor:not-allowed}.telebox-color-scheme-dark .netless-app-countdown-btns>button:disabled{color:#ffffff4d;background:rgba(255,255,255,.08)}
`,Se=document.createElement("style");Se.appendChild(document.createTextNode(ft));document.head.appendChild(Se)});var Ge=le((Jt,Q)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var r=typeof i;if(r==="string"||r==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=t.apply(null,i);s&&n.push(s)}}else if(r==="object")if(i.toString===Object.prototype.toString)for(var u in i)e.call(i,u)&&i[u]&&n.push(u);else n.push(i.toString())}}return n.join(" ")}typeof Q<"u"&&Q.exports?(t.default=t,Q.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Nt={};rt(Nt,{default:()=>Mt});var q,c,pe,lt,F,me,_e,st,B={},he=[],at=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(e,t){for(var n in t)e[n]=t[n];return e}function ve(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,n){var o,i,r,s={};for(r in t)r=="key"?o=t[r]:r=="ref"?i=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?q.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)s[r]===void 0&&(s[r]=e.defaultProps[r]);return $(e,s,o,i,null)}function $(e,t,n,o,i){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++pe};return i==null&&c.vnode!=null&&c.vnode(r),r}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function D(e,t){if(t==null)return e.__?D(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?D(e):null}function be(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return be(e)}}function ce(e){(!e.__d&&(e.__d=!0)&&F.push(e)&&!z.__r++||_e!==c.debounceRendering)&&((_e=c.debounceRendering)||me)(z)}function z(){for(var e;z.__r=F.length;)e=F.sort(function(t,n){return t.__v.__b-n.__v.__b}),F=[],e.some(function(t){var n,o,i,r,s,u;t.__d&&(s=(r=(n=t).__v).__e,(u=n.__P)&&(o=[],(i=N({},r)).__v=r.__v+1,ee(u,r,i,n.__n,u.ownerSVGElement!==void 0,r.__h!=null?[s]:null,o,s??D(r),r.__h),xe(o,r),r.__e!=s&&be(r)))})}function ye(e,t,n,o,i,r,s,u,f,p){var l,h,_,a,d,k,b,v=o&&o.__k||he,y=v.length;for(n.__k=[],l=0;l<t.length;l++)if((a=n.__k[l]=(a=t[l])==null||typeof a=="boolean"?null:typeof a=="string"||typeof a=="number"||typeof a=="bigint"?$(null,a,null,null,a):Array.isArray(a)?$(C,{children:a},null,null,null):a.__b>0?$(a.type,a.props,a.key,null,a.__v):a)!=null){if(a.__=n,a.__b=n.__b+1,(_=v[l])===null||_&&a.key==_.key&&a.type===_.type)v[l]=void 0;else for(h=0;h<y;h++){if((_=v[h])&&a.key==_.key&&a.type===_.type){v[h]=void 0;break}_=null}ee(e,a,_=_||B,i,r,s,u,f,p),d=a.__e,(h=a.ref)&&_.ref!=h&&(b||(b=[]),_.ref&&b.push(_.ref,null,a),b.push(h,a.__c||d,a)),d!=null?(k==null&&(k=d),typeof a.type=="function"&&a.__k===_.__k?a.__d=f=ge(a,f,e):f=ke(e,a,_,v,d,f),typeof n.type=="function"&&(n.__d=f)):f&&_.__e==f&&f.parentNode!=e&&(f=D(_))}for(n.__e=k,l=y;l--;)v[l]!=null&&(typeof n.type=="function"&&v[l].__e!=null&&v[l].__e==n.__d&&(n.__d=D(o,l+1)),Ce(v[l],v[l]));if(b)for(l=0;l<b.length;l++)we(b[l],b[++l],b[++l])}function ge(e,t,n){for(var o,i=e.__k,r=0;i&&r<i.length;r++)(o=i[r])&&(o.__=e,t=typeof o.type=="function"?ge(o,t,n):ke(n,o,o,i,o.__e,t));return t}function H(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){H(n,t)}):t.push(e)),t}function ke(e,t,n,o,i,r){var s,u,f;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=r||i.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(i),s=null;else{for(u=r,f=0;(u=u.nextSibling)&&f<o.length;f+=2)if(u==i)break e;e.insertBefore(i,r),s=r}return s!==void 0?s:i.nextSibling}function _t(e,t,n,o,i){var r;for(r in n)r==="children"||r==="key"||r in t||j(e,r,null,n[r],o);for(r in t)i&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===t[r]||j(e,r,t[r],n[r],o)}function ue(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||at.test(t)?n:n+"px"}function j(e,t,n,o,i){var r;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||ue(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||ue(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o||e.addEventListener(t,r?de:fe,r):e.removeEventListener(t,r?de:fe,r);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function fe(e){this.l[e.type+!1](c.event?c.event(e):e)}function de(e){this.l[e.type+!0](c.event?c.event(e):e)}function ee(e,t,n,o,i,r,s,u,f){var p,l,h,_,a,d,k,b,v,y,P,g=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(f=n.__h,u=t.__e=n.__e,t.__h=null,r=[u]),(p=c.__b)&&p(t);try{e:if(typeof g=="function"){if(b=t.props,v=(p=g.contextType)&&o[p.__c],y=p?v?v.props.value:p.__:o,n.__c?k=(l=t.__c=n.__c).__=l.__E:("prototype"in g&&g.prototype.render?t.__c=l=new g(b,y):(t.__c=l=new w(b,y),l.constructor=g,l.render=ut),v&&v.sub(l),l.props=b,l.state||(l.state={}),l.context=y,l.__n=o,h=l.__d=!0,l.__h=[]),l.__s==null&&(l.__s=l.state),g.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=N({},l.__s)),N(l.__s,g.getDerivedStateFromProps(b,l.__s))),_=l.props,a=l.state,h)g.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==_&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,y),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,y)===!1||t.__v===n.__v){l.props=b,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),l.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(R){R&&(R.__=t)}),l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,y),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(_,a,d)})}l.context=y,l.props=b,l.state=l.__s,(p=c.__r)&&p(t),l.__d=!1,l.__v=t,l.__P=e,p=l.render(l.props,l.state,l.context),l.state=l.__s,l.getChildContext!=null&&(o=N(N({},o),l.getChildContext())),h||l.getSnapshotBeforeUpdate==null||(d=l.getSnapshotBeforeUpdate(_,a)),P=p!=null&&p.type===C&&p.key==null?p.props.children:p,ye(e,Array.isArray(P)?P:[P],t,n,o,i,r,s,u,f),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),k&&(l.__E=l.__=null),l.__e=!1}else r==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ct(n.__e,t,n,o,i,r,s,f);(p=c.diffed)&&p(t)}catch(R){t.__v=null,(f||r!=null)&&(t.__e=u,t.__h=!!f,r[r.indexOf(u)]=null),c.__e(R,t,n)}}function xe(e,t){c.__c&&c.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){c.__e(o,n.__v)}})}function ct(e,t,n,o,i,r,s,u){var f,p,l,h=n.props,_=t.props,a=t.type,d=0;if(a==="svg"&&(i=!0),r!=null){for(;d<r.length;d++)if((f=r[d])&&"setAttribute"in f==!!a&&(a?f.localName===a:f.nodeType===3)){e=f,r[d]=null;break}}if(e==null){if(a===null)return document.createTextNode(_);e=i?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a,_.is&&_),r=null,u=!1}if(a===null)h===_||u&&e.data===_||(e.data=_);else{if(r=r&&q.call(e.childNodes),p=(h=n.props||B).dangerouslySetInnerHTML,l=_.dangerouslySetInnerHTML,!u){if(r!=null)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(l||p)&&(l&&(p&&l.__html==p.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(_t(e,_,h,i,u),l)t.__k=[];else if(d=t.props.children,ye(e,Array.isArray(d)?d:[d],t,n,o,i&&a!=="foreignObject",r,s,r?r[0]:n.__k&&D(n,0),u),r!=null)for(d=r.length;d--;)r[d]!=null&&ve(r[d]);u||("value"in _&&(d=_.value)!==void 0&&(d!==e.value||a==="progress"&&!d||a==="option"&&d!==h.value)&&j(e,"value",d,h.value,!1),"checked"in _&&(d=_.checked)!==void 0&&d!==e.checked&&j(e,"checked",d,h.checked,!1))}return e}function we(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){c.__e(o,n)}}function Ce(e,t,n){var o,i;if(c.unmount&&c.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||we(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){c.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&Ce(o[i],t,typeof e.type!="function");n||e.__e==null||ve(e.__e),e.__e=e.__d=void 0}function ut(e,t,n){return this.constructor(e,n)}function G(e,t,n){var o,i,r;c.__&&c.__(e,t),i=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],ee(t,e=(!o&&n||t).__k=U(C,null,[e]),i||B,B,t.ownerSVGElement!==void 0,!o&&n?[n]:i?null:t.firstChild?q.call(t.childNodes):null,r,!o&&n?n:i?i.__e:t.firstChild,o),xe(r,e)}q=he.slice,c={__e:function(e,t,n,o){for(var i,r,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),s=i.__d),s)return i.__E=i}catch(u){e=u}throw e}},pe=0,lt=function(e){return e!=null&&e.constructor===void 0},w.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof e=="function"&&(e=e(N({},n),this.props)),e&&N(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),ce(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ce(this))},w.prototype.render=C,F=[],me=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z.__r=0,st=0;var Ke=ae(Ee());var Z,x,Pe,Y=0,De=[],Re=c.__b,Ae=c.__r,Me=c.diffed,Ne=c.__c,Te=c.unmount;function ne(e,t){c.__h&&c.__h(x,e,Y||t),Y=0;var n=x.__H||(x.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function S(e){return Y=1,Ue(He,e)}function Ue(e,t,n){var o=ne(Z++,2);return o.t=e,o.__c||(o.__=[n?n(t):He(void 0,t),function(i){var r=o.t(o.__[0],i);o.__[0]!==r&&(o.__=[r,o.__[1]],o.__c.setState({}))}],o.__c=x),o.__}function A(e,t){var n=ne(Z++,3);!c.__s&&Fe(n.__H,t)&&(n.__=e,n.__H=t,x.__H.__h.push(n))}function J(e,t){var n=ne(Z++,7);return Fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function M(e,t){return Y=8,J(function(){return e},t)}function dt(){for(var e;e=De.shift();)if(e.__P)try{e.__H.__h.forEach(X),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){x=null,Re&&Re(e)},c.__r=function(e){Ae&&Ae(e),Z=0;var t=(x=e.__c).__H;t&&(t.__h.forEach(X),t.__h.forEach(te),t.__h=[])},c.diffed=function(e){Me&&Me(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(De.push(t)!==1&&Pe===c.requestAnimationFrame||((Pe=c.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(r),Oe&&cancelAnimationFrame(o),setTimeout(n)},r=setTimeout(i,100);Oe&&(o=requestAnimationFrame(i))})(dt)),x=null},c.__c=function(e,t){t.some(function(n){try{n.__h.forEach(X),n.__h=n.__h.filter(function(o){return!o.__||te(o)})}catch(o){t.some(function(i){i.__h&&(i.__h=[])}),t=[],c.__e(o,n.__v)}}),Ne&&Ne(e,t)},c.unmount=function(e){Te&&Te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{X(o)}catch(i){t=i}}),t&&c.__e(t,n.__v))};var Oe=typeof requestAnimationFrame=="function";function X(e){var t=x,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),x=t}function te(e){var t=x;e.__c=e.__(),x=t}function Fe(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function He(e,t){return typeof t=="function"?t(e):t}function ht(e,t){for(var n in t)e[n]=t[n];return e}function re(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function We(e){this.props=e}function T(e,t){function n(i){var r=this.props.ref,s=r==i.ref;return!s&&r&&(r.call?r(null):r.current=null),t?!t(this.props,i)||!s:re(this.props,i)}function o(i){return this.shouldComponentUpdate=n,U(e,i)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(We.prototype=new w).isPureReactComponent=!0,We.prototype.shouldComponentUpdate=function(e,t){return re(this.props,e)||re(this.state,t)};var Le=c.__b;c.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Le&&Le(e)};var Gt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var vt=c.__e;c.__e=function(e,t,n,o){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}vt(e,t,n,o)};var Ie=c.unmount;function oe(){this.__u=0,this.t=null,this.__b=null}function qe(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function K(){this.u=null,this.o=null}c.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ie&&Ie(e)},(oe.prototype=new w).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var i=qe(o.__v),r=!1,s=function(){r||(r=!0,n.__R=null,i?i(u):u())};n.__R=s;var u=function(){if(!--o.__u){if(o.state.__e){var p=o.state.__e;o.__v.__k[0]=function h(_,a,d){return _&&(_.__v=null,_.__k=_.__k&&_.__k.map(function(k){return h(k,a,d)}),_.__c&&_.__c.__P===a&&(_.__e&&d.insertBefore(_.__e,_.__d),_.__c.__e=!0,_.__c.__P=d)),_}(p,p.__c.__P,p.__c.__O)}var l;for(o.setState({__e:o.__b=null});l=o.t.pop();)l.forceUpdate()}},f=t.__h===!0;o.__u++||f||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(s,s)},oe.prototype.componentWillUnmount=function(){this.t=[]},oe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function r(s,u,f){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(p){typeof p.__c=="function"&&p.__c()}),s.__c.__H=null),(s=ht({},s)).__c!=null&&(s.__c.__P===f&&(s.__c.__P=u),s.__c=null),s.__k=s.__k&&s.__k.map(function(p){return r(p,u,f)})),s}(this.__b,n,o.__O=o.__P)}this.__b=null}var i=t.__e&&U(C,null,e.fallback);return i&&(i.__h=null),[U(C,null,t.__e?null:e.children),i]};var Ve=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(K.prototype=new w).__e=function(e){var t=this,n=qe(t.__v),o=t.o.get(e);return o[0]++,function(i){var r=function(){t.props.revealOrder?(o.push(i),Ve(t,e,o)):i()};n?n(r):r()}},K.prototype.render=function(e){this.u=null,this.o=new Map;var t=H(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ve(e,n,t)})};var bt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,gt=typeof document<"u",kt=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $e=c.event;function xt(){}function wt(){return this.cancelBubble}function Ct(){return this.defaultPrevented}c.event=function(e){return $e&&(e=$e(e)),e.persist=xt,e.isPropagationStopped=wt,e.isDefaultPrevented=Ct,e.nativeEvent=e};var St,Be={configurable:!0,get:function(){return this.class}},ze=c.vnode;c.vnode=function(e){var t=e.type,n=e.props,o=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var r in o={},n){var s=n[r];gt&&r==="children"&&t==="noscript"||r==="value"&&"defaultValue"in n&&s==null||(r==="defaultValue"&&"value"in n&&n.value==null?r="value":r==="download"&&s===!0?s="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!kt(n.type)?r="oninput":/^onfocus$/i.test(r)?r="onfocusin":/^onblur$/i.test(r)?r="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(r)?r=r.toLowerCase():i&&yt.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),o[r]=s)}t=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=H(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),t=="select"&&o.defaultValue!=null&&(o.value=H(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),e.props=o,n.class!=n.className&&(Be.enumerable="className"in n,n.className!=null&&(o.class=n.className),Object.defineProperty(o,"className",Be))}e.$$typeof=bt,ze&&ze(e)};var je=c.__r;c.__r=function(e){je&&je(e),St=e.__c};var ie=ae(Ge());var Et=0;function m(e,t,n,o,i){var r,s,u={};for(s in t)s=="ref"?r=t[s]:u[s]=t[s];var f={type:e,props:u,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Et,__source:i,__self:o};if(typeof e=="function"&&(r=e.defaultProps))for(s in r)u[s]===void 0&&(u[s]=r[s]);return c.vnode&&c.vnode(f),f}var W=T(({digit:e,disabled:t,onUp:n,onDown:o})=>{let[i,r]=S(0),[s,u]=S(!1);return A(()=>{if(t){u(!0);let f=window.setTimeout(()=>{u(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),m("div",{class:(0,ie.default)("time-cell",{disabled:t}),children:[m("div",{class:"time-cell-up",onClick:t?void 0:n}),m("div",{class:"rotor",children:[m("div",{class:(0,ie.default)("rotor-leaf",{flipped:s}),children:[m("figure",{class:"rotor-leaf-rear",children:e}),m("figure",{class:"rotor-leaf-front",children:i})]}),m("div",{class:"rotor-top",children:e}),m("div",{class:"rotor-bottom",children:i})]}),m("div",{class:"time-cell-down",onClick:t?void 0:o})]})});function Xe(e){return J(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function O(e,t){return M(()=>e(t),[e])}var Ye=T(({minutes:e,seconds:t,disabled:n,onAdjustTime:o})=>{let i=Xe(e),r=Xe(t),s=O(o,0),u=O(o,1),f=O(o,2),p=O(o,3),l=O(o,4),h=O(o,5),_=O(o,6),a=O(o,7);return m("div",{className:"countdown-clock",children:[m(W,{disabled:n,digit:i[0],onUp:s,onDown:u}),m(W,{digit:i[1],disabled:n,onUp:f,onDown:p}),m("div",{class:"countdown-clock-divider"}),m(W,{disabled:n,digit:r[0],onUp:l,onDown:h}),m(W,{digit:r[1],disabled:n,onUp:_,onDown:a})]})});var Ze=T(({readonly:e,countdownSecs:t,startTime:n,paused:o,onAdjustTime:i,onStart:r,onPause:s,onResume:u,onReset:f})=>{let[p,l]=S(0),h=n>0&&p>=n,_=t-(h?p-n:0),a=Math.floor(_/60),d=_-a*60;return A(()=>{let k=NaN;if(t>0&&n>0&&!o){let b=()=>{l(Math.floor(Date.now()/1e3)),k=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(k)}else window.cancelAnimationFrame(k)},[n,o,t]),A(()=>{n>0&&p-n>=t&&f()},[p,n,t,f]),m("div",{class:"netless-app-countdown",children:m("div",{class:"netless-app-countdown-shrink",children:[m(Ye,{minutes:a,seconds:d,disabled:e||h,onAdjustTime:i}),m("div",{class:"netless-app-countdown-btns",children:o?m(C,{children:[m("button",{onClick:f,disabled:e,children:"Reset"}),m("button",{onClick:u,disabled:e,children:"Resume"})]}):h?m("button",{onClick:s,disabled:e,children:"Pause"}):m("button",{onClick:r,disabled:e||_<=0,children:"Start"})})]})})});var Je=T(({context:e,storage:t})=>{let[n,o]=S(()=>e.isWritable),[i,r]=S(t.state.countdownSecs),[s,u]=S(t.state.startTime),[f,p]=S(t.state.paused);A(()=>(o(e.isWritable),e.emitter.on("writableChange",o),()=>e.emitter.off("writableChange",o)),[e]),A(()=>{let b=v=>{v.countdownSecs&&r(t.state.countdownSecs),v.paused&&p(t.state.paused),v.startTime&&u(t.state.startTime)};return t.on("stateChanged",b)},[t]);let l=s>0,h=M(()=>{e.isWritable&&t.setState({paused:!1,startTime:Math.floor(Date.now()/1e3)})},[e,t]),_=M(()=>{e.isWritable&&t.setState({paused:!0})},[e,t]),a=M(()=>{e.isWritable&&t.setState({paused:!1})},[e,t]),d=M(()=>{e.isWritable&&t.setState({paused:!1,countdownSecs:0,startTime:0})},[e]),k=M(b=>{if(!l&&e.isWritable){let v=Math.floor(i/60),y=i-v*60,P=Math.floor(v/10),g=v%10,R=Math.floor(y/10),L=y%10,E;switch(b){case 0:{let I=g+y===0?7:6;E=((P+1)%I*10+g)*60+y;break}case 1:{let I=g+y===0?7:6;E=((P+I-1)%I*10+g)*60+y;break}case 2:{E=(Math.min(5,P)*10+(g+1)%10)*60+y;break}case 3:{E=(Math.min(5,P)*10+(g+10-1)%10)*60+y;break}case 4:{E=v*60+((R+1)%6*10+L);break}case 5:{E=v*60+((R+6-1)%6*10+L);break}case 6:{E=v*60+(Math.min(5,R)*10+(L+1)%10);break}case 7:{E=v*60+(Math.min(5,R)*10+(L+10-1)%10);break}default:{E=i;break}}t.setState({countdownSecs:E})}},[l,e]);return m(Ze,{readonly:!n,countdownSecs:i,startTime:s,paused:f,onAdjustTime:k,onStart:h,onPause:_,onResume:a,onReset:d})});var Pt=208,Rt=216,At={kind:"Countdown",config:{minwidth:Pt,minheight:Rt},setup(e){let t=e.box;t.mountStyles(Ke.default);let n=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});G(m(Je,{context:e,storage:n}),t.$content),e.emitter.on("destroy",()=>{G(null,t.$content)})}},Mt=At;return it(Nt);})();
"use strict";var NetlessAppCountdown=(()=>{var Qe=Object.create;var V=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var nt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rt=(e,t)=>{for(var n in t)V(e,n,{get:t[n],enumerable:!0})},se=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tt(t))!ot.call(e,i)&&i!==n&&V(e,i,{get:()=>t[i],enumerable:!(o=et(t,i))||o.enumerable});return e};var _e=(e,t,n)=>(n=e!=null?Qe(nt(e)):{},se(t||!e||!e.__esModule?V(n,"default",{value:e,enumerable:!0}):n,e)),it=e=>se(V({},"__esModule",{value:!0}),e);var Ee=le(()=>{var ft=`.time-cell{display:flex;flex-flow:column nowrap;align-items:center;font-family:sans-serif;font-weight:700}.time-cell.disabled .time-cell-up:before,.time-cell.disabled .time-cell-down:after{border-top-color:#0000000d;border-bottom-color:#0000000d}.time-cell-up:before,.time-cell-down:after{content:"";display:block;width:0;height:0;margin:0 0 4px;border-top:0;border-left:12px solid rgba(0,0,0,0);border-right:12px solid rgba(0,0,0,0);border-bottom:12px solid #151515;transition:border-color .4s;cursor:pointer}.time-cell-down:after{margin:4px 0 0;border-top:12px solid #151515;border-bottom:0}.rotor{position:relative;width:36px;height:64px;border-radius:4px;font-size:48px;text-align:center;perspective:200px}.rotor-top,.rotor-bottom{overflow:hidden;position:absolute;width:36px;height:32px}.rotor-leaf{z-index:1;position:absolute;width:36px;height:64px;transform-style:preserve-3d;transition:transform 0s}.rotor-leaf.flipped{transform:rotateX(-180deg);transition:all .5s ease-in-out}.rotor-leaf-front,.rotor-leaf-rear{overflow:hidden;position:absolute;width:36px;height:32px;margin:0;transform:rotateX(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}.rotor-leaf-front{line-height:64px;border-radius:4px 4px 0 0}.rotor-leaf-rear{line-height:0px;border-radius:0 0 4px 4px;transform:rotateX(-180deg)}.rotor-top{line-height:64px;border-radius:4px 4px 0 0}.rotor-bottom{bottom:0;line-height:0px;border-radius:0 0 4px 4px}.rotor:after{content:"";z-index:2;position:absolute;bottom:0;left:0;width:36px;height:32px;border-radius:0 0 4px 4px}.rotor,.rotor-top,.rotor-leaf-front{color:#fff;background-color:#151515}.rotor-bottom,.rotor-leaf-rear{color:#efefef;background-color:#202020}.rotor:after{border-top:solid 1px #151515}.telebox-color-scheme-dark .time-cell.disabled .time-cell-up:before,.telebox-color-scheme-dark .time-cell.disabled .time-cell-down:after{border-top-color:#ffffff14;border-bottom-color:#ffffff14}.telebox-color-scheme-dark .time-cell-up:before,.telebox-color-scheme-dark .time-cell-down:after{border-top-color:#d9d9df;border-bottom-color:#d9d9df}.telebox-color-scheme-dark .rotor,.telebox-color-scheme-dark .rotor-top,.telebox-color-scheme-dark .rotor-leaf-front{color:#383838;background-color:#efeff5}.telebox-color-scheme-dark .rotor-bottom,.telebox-color-scheme-dark .rotor-leaf-rear{color:#333;background-color:#eeecec}.telebox-color-scheme-dark .rotor:after{border-top:solid 1px #efeff5}.countdown-clock{display:flex;padding:5px}.countdown-clock>*{padding:0 5px}.countdown-clock-divider{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 1px}.countdown-clock-divider:before,.countdown-clock-divider:after{content:"";display:block;width:8px;height:8px;margin:6px 0;background-color:#000;border-radius:50%}.netless-app-countdown{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;transition:background-color .4s}.netless-app-countdown-shrink{display:inline-block;transition:background-color .4s}.netless-app-countdown-btns{width:100%;margin-top:10px;display:flex;flex-wrap:nowrap}.netless-app-countdown-btns>button{flex:1;display:block;margin:0 10px 0 0;padding:5px 10px;text-align:center;border:0;border-radius:4px;color:#fff;background-color:#3380ff;transition:background-color .4s,color .4s;cursor:pointer}.netless-app-countdown-btns>button:last-of-type{margin:0}.netless-app-countdown-btns>button:disabled{color:#00000040;background:#f5f5f5;cursor:not-allowed}.telebox-color-scheme-dark .netless-app-countdown-btns>button:disabled{color:#ffffff4d;background:rgba(255,255,255,.08)}
`,Se=document.createElement("style");Se.appendChild(document.createTextNode(ft));document.head.appendChild(Se)});var Ge=le((Jt,Q)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var r=typeof i;if(r==="string"||r==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=t.apply(null,i);s&&n.push(s)}}else if(r==="object")if(i.toString===Object.prototype.toString)for(var u in i)e.call(i,u)&&i[u]&&n.push(u);else n.push(i.toString())}}return n.join(" ")}typeof Q<"u"&&Q.exports?(t.default=t,Q.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Nt={};rt(Nt,{default:()=>Mt});var q,c,pe,lt,F,me,ae,st,B={},he=[],_t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(e,t){for(var n in t)e[n]=t[n];return e}function ve(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,n){var o,i,r,s={};for(r in t)r=="key"?o=t[r]:r=="ref"?i=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?q.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)s[r]===void 0&&(s[r]=e.defaultProps[r]);return $(e,s,o,i,null)}function $(e,t,n,o,i){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++pe};return i==null&&c.vnode!=null&&c.vnode(r),r}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function D(e,t){if(t==null)return e.__?D(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?D(e):null}function be(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return be(e)}}function ce(e){(!e.__d&&(e.__d=!0)&&F.push(e)&&!z.__r++||ae!==c.debounceRendering)&&((ae=c.debounceRendering)||me)(z)}function z(){for(var e;z.__r=F.length;)e=F.sort(function(t,n){return t.__v.__b-n.__v.__b}),F=[],e.some(function(t){var n,o,i,r,s,u;t.__d&&(s=(r=(n=t).__v).__e,(u=n.__P)&&(o=[],(i=N({},r)).__v=r.__v+1,ee(u,r,i,n.__n,u.ownerSVGElement!==void 0,r.__h!=null?[s]:null,o,s??D(r),r.__h),xe(o,r),r.__e!=s&&be(r)))})}function ye(e,t,n,o,i,r,s,u,f,p){var l,h,a,_,d,k,b,v=o&&o.__k||he,y=v.length;for(n.__k=[],l=0;l<t.length;l++)if((_=n.__k[l]=(_=t[l])==null||typeof _=="boolean"?null:typeof _=="string"||typeof _=="number"||typeof _=="bigint"?$(null,_,null,null,_):Array.isArray(_)?$(C,{children:_},null,null,null):_.__b>0?$(_.type,_.props,_.key,null,_.__v):_)!=null){if(_.__=n,_.__b=n.__b+1,(a=v[l])===null||a&&_.key==a.key&&_.type===a.type)v[l]=void 0;else for(h=0;h<y;h++){if((a=v[h])&&_.key==a.key&&_.type===a.type){v[h]=void 0;break}a=null}ee(e,_,a=a||B,i,r,s,u,f,p),d=_.__e,(h=_.ref)&&a.ref!=h&&(b||(b=[]),a.ref&&b.push(a.ref,null,_),b.push(h,_.__c||d,_)),d!=null?(k==null&&(k=d),typeof _.type=="function"&&_.__k===a.__k?_.__d=f=ge(_,f,e):f=ke(e,_,a,v,d,f),typeof n.type=="function"&&(n.__d=f)):f&&a.__e==f&&f.parentNode!=e&&(f=D(a))}for(n.__e=k,l=y;l--;)v[l]!=null&&(typeof n.type=="function"&&v[l].__e!=null&&v[l].__e==n.__d&&(n.__d=D(o,l+1)),Ce(v[l],v[l]));if(b)for(l=0;l<b.length;l++)we(b[l],b[++l],b[++l])}function ge(e,t,n){for(var o,i=e.__k,r=0;i&&r<i.length;r++)(o=i[r])&&(o.__=e,t=typeof o.type=="function"?ge(o,t,n):ke(n,o,o,i,o.__e,t));return t}function H(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){H(n,t)}):t.push(e)),t}function ke(e,t,n,o,i,r){var s,u,f;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=r||i.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(i),s=null;else{for(u=r,f=0;(u=u.nextSibling)&&f<o.length;f+=2)if(u==i)break e;e.insertBefore(i,r),s=r}return s!==void 0?s:i.nextSibling}function at(e,t,n,o,i){var r;for(r in n)r==="children"||r==="key"||r in t||j(e,r,null,n[r],o);for(r in t)i&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===t[r]||j(e,r,t[r],n[r],o)}function ue(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||_t.test(t)?n:n+"px"}function j(e,t,n,o,i){var r;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||ue(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||ue(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o||e.addEventListener(t,r?de:fe,r):e.removeEventListener(t,r?de:fe,r);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function fe(e){this.l[e.type+!1](c.event?c.event(e):e)}function de(e){this.l[e.type+!0](c.event?c.event(e):e)}function ee(e,t,n,o,i,r,s,u,f){var p,l,h,a,_,d,k,b,v,y,P,g=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(f=n.__h,u=t.__e=n.__e,t.__h=null,r=[u]),(p=c.__b)&&p(t);try{e:if(typeof g=="function"){if(b=t.props,v=(p=g.contextType)&&o[p.__c],y=p?v?v.props.value:p.__:o,n.__c?k=(l=t.__c=n.__c).__=l.__E:("prototype"in g&&g.prototype.render?t.__c=l=new g(b,y):(t.__c=l=new w(b,y),l.constructor=g,l.render=ut),v&&v.sub(l),l.props=b,l.state||(l.state={}),l.context=y,l.__n=o,h=l.__d=!0,l.__h=[]),l.__s==null&&(l.__s=l.state),g.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=N({},l.__s)),N(l.__s,g.getDerivedStateFromProps(b,l.__s))),a=l.props,_=l.state,h)g.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==a&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,y),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,y)===!1||t.__v===n.__v){l.props=b,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),l.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(R){R&&(R.__=t)}),l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,y),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(a,_,d)})}l.context=y,l.props=b,l.state=l.__s,(p=c.__r)&&p(t),l.__d=!1,l.__v=t,l.__P=e,p=l.render(l.props,l.state,l.context),l.state=l.__s,l.getChildContext!=null&&(o=N(N({},o),l.getChildContext())),h||l.getSnapshotBeforeUpdate==null||(d=l.getSnapshotBeforeUpdate(a,_)),P=p!=null&&p.type===C&&p.key==null?p.props.children:p,ye(e,Array.isArray(P)?P:[P],t,n,o,i,r,s,u,f),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),k&&(l.__E=l.__=null),l.__e=!1}else r==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ct(n.__e,t,n,o,i,r,s,f);(p=c.diffed)&&p(t)}catch(R){t.__v=null,(f||r!=null)&&(t.__e=u,t.__h=!!f,r[r.indexOf(u)]=null),c.__e(R,t,n)}}function xe(e,t){c.__c&&c.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){c.__e(o,n.__v)}})}function ct(e,t,n,o,i,r,s,u){var f,p,l,h=n.props,a=t.props,_=t.type,d=0;if(_==="svg"&&(i=!0),r!=null){for(;d<r.length;d++)if((f=r[d])&&"setAttribute"in f==!!_&&(_?f.localName===_:f.nodeType===3)){e=f,r[d]=null;break}}if(e==null){if(_===null)return document.createTextNode(a);e=i?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,a.is&&a),r=null,u=!1}if(_===null)h===a||u&&e.data===a||(e.data=a);else{if(r=r&&q.call(e.childNodes),p=(h=n.props||B).dangerouslySetInnerHTML,l=a.dangerouslySetInnerHTML,!u){if(r!=null)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(l||p)&&(l&&(p&&l.__html==p.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(at(e,a,h,i,u),l)t.__k=[];else if(d=t.props.children,ye(e,Array.isArray(d)?d:[d],t,n,o,i&&_!=="foreignObject",r,s,r?r[0]:n.__k&&D(n,0),u),r!=null)for(d=r.length;d--;)r[d]!=null&&ve(r[d]);u||("value"in a&&(d=a.value)!==void 0&&(d!==e.value||_==="progress"&&!d||_==="option"&&d!==h.value)&&j(e,"value",d,h.value,!1),"checked"in a&&(d=a.checked)!==void 0&&d!==e.checked&&j(e,"checked",d,h.checked,!1))}return e}function we(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){c.__e(o,n)}}function Ce(e,t,n){var o,i;if(c.unmount&&c.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||we(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){c.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&Ce(o[i],t,typeof e.type!="function");n||e.__e==null||ve(e.__e),e.__e=e.__d=void 0}function ut(e,t,n){return this.constructor(e,n)}function G(e,t,n){var o,i,r;c.__&&c.__(e,t),i=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],ee(t,e=(!o&&n||t).__k=U(C,null,[e]),i||B,B,t.ownerSVGElement!==void 0,!o&&n?[n]:i?null:t.firstChild?q.call(t.childNodes):null,r,!o&&n?n:i?i.__e:t.firstChild,o),xe(r,e)}q=he.slice,c={__e:function(e,t,n,o){for(var i,r,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),s=i.__d),s)return i.__E=i}catch(u){e=u}throw e}},pe=0,lt=function(e){return e!=null&&e.constructor===void 0},w.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof e=="function"&&(e=e(N({},n),this.props)),e&&N(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),ce(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ce(this))},w.prototype.render=C,F=[],me=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z.__r=0,st=0;var Ke=_e(Ee());var Z,x,Pe,Y=0,De=[],Re=c.__b,Ae=c.__r,Me=c.diffed,Ne=c.__c,Te=c.unmount;function ne(e,t){c.__h&&c.__h(x,e,Y||t),Y=0;var n=x.__H||(x.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function S(e){return Y=1,Ue(He,e)}function Ue(e,t,n){var o=ne(Z++,2);return o.t=e,o.__c||(o.__=[n?n(t):He(void 0,t),function(i){var r=o.t(o.__[0],i);o.__[0]!==r&&(o.__=[r,o.__[1]],o.__c.setState({}))}],o.__c=x),o.__}function A(e,t){var n=ne(Z++,3);!c.__s&&Fe(n.__H,t)&&(n.__=e,n.__H=t,x.__H.__h.push(n))}function J(e,t){var n=ne(Z++,7);return Fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function M(e,t){return Y=8,J(function(){return e},t)}function dt(){for(var e;e=De.shift();)if(e.__P)try{e.__H.__h.forEach(X),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){x=null,Re&&Re(e)},c.__r=function(e){Ae&&Ae(e),Z=0;var t=(x=e.__c).__H;t&&(t.__h.forEach(X),t.__h.forEach(te),t.__h=[])},c.diffed=function(e){Me&&Me(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(De.push(t)!==1&&Pe===c.requestAnimationFrame||((Pe=c.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(r),Oe&&cancelAnimationFrame(o),setTimeout(n)},r=setTimeout(i,100);Oe&&(o=requestAnimationFrame(i))})(dt)),x=null},c.__c=function(e,t){t.some(function(n){try{n.__h.forEach(X),n.__h=n.__h.filter(function(o){return!o.__||te(o)})}catch(o){t.some(function(i){i.__h&&(i.__h=[])}),t=[],c.__e(o,n.__v)}}),Ne&&Ne(e,t)},c.unmount=function(e){Te&&Te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{X(o)}catch(i){t=i}}),t&&c.__e(t,n.__v))};var Oe=typeof requestAnimationFrame=="function";function X(e){var t=x,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),x=t}function te(e){var t=x;e.__c=e.__(),x=t}function Fe(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function He(e,t){return typeof t=="function"?t(e):t}function ht(e,t){for(var n in t)e[n]=t[n];return e}function re(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function We(e){this.props=e}function T(e,t){function n(i){var r=this.props.ref,s=r==i.ref;return!s&&r&&(r.call?r(null):r.current=null),t?!t(this.props,i)||!s:re(this.props,i)}function o(i){return this.shouldComponentUpdate=n,U(e,i)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(We.prototype=new w).isPureReactComponent=!0,We.prototype.shouldComponentUpdate=function(e,t){return re(this.props,e)||re(this.state,t)};var Le=c.__b;c.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Le&&Le(e)};var Gt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var vt=c.__e;c.__e=function(e,t,n,o){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}vt(e,t,n,o)};var Ie=c.unmount;function oe(){this.__u=0,this.t=null,this.__b=null}function qe(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function K(){this.u=null,this.o=null}c.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ie&&Ie(e)},(oe.prototype=new w).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var i=qe(o.__v),r=!1,s=function(){r||(r=!0,n.__R=null,i?i(u):u())};n.__R=s;var u=function(){if(!--o.__u){if(o.state.__e){var p=o.state.__e;o.__v.__k[0]=function h(a,_,d){return a&&(a.__v=null,a.__k=a.__k&&a.__k.map(function(k){return h(k,_,d)}),a.__c&&a.__c.__P===_&&(a.__e&&d.insertBefore(a.__e,a.__d),a.__c.__e=!0,a.__c.__P=d)),a}(p,p.__c.__P,p.__c.__O)}var l;for(o.setState({__e:o.__b=null});l=o.t.pop();)l.forceUpdate()}},f=t.__h===!0;o.__u++||f||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(s,s)},oe.prototype.componentWillUnmount=function(){this.t=[]},oe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function r(s,u,f){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(p){typeof p.__c=="function"&&p.__c()}),s.__c.__H=null),(s=ht({},s)).__c!=null&&(s.__c.__P===f&&(s.__c.__P=u),s.__c=null),s.__k=s.__k&&s.__k.map(function(p){return r(p,u,f)})),s}(this.__b,n,o.__O=o.__P)}this.__b=null}var i=t.__e&&U(C,null,e.fallback);return i&&(i.__h=null),[U(C,null,t.__e?null:e.children),i]};var Ve=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(K.prototype=new w).__e=function(e){var t=this,n=qe(t.__v),o=t.o.get(e);return o[0]++,function(i){var r=function(){t.props.revealOrder?(o.push(i),Ve(t,e,o)):i()};n?n(r):r()}},K.prototype.render=function(e){this.u=null,this.o=new Map;var t=H(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ve(e,n,t)})};var bt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,gt=typeof document<"u",kt=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $e=c.event;function xt(){}function wt(){return this.cancelBubble}function Ct(){return this.defaultPrevented}c.event=function(e){return $e&&(e=$e(e)),e.persist=xt,e.isPropagationStopped=wt,e.isDefaultPrevented=Ct,e.nativeEvent=e};var St,Be={configurable:!0,get:function(){return this.class}},ze=c.vnode;c.vnode=function(e){var t=e.type,n=e.props,o=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var r in o={},n){var s=n[r];gt&&r==="children"&&t==="noscript"||r==="value"&&"defaultValue"in n&&s==null||(r==="defaultValue"&&"value"in n&&n.value==null?r="value":r==="download"&&s===!0?s="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!kt(n.type)?r="oninput":/^onfocus$/i.test(r)?r="onfocusin":/^onblur$/i.test(r)?r="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(r)?r=r.toLowerCase():i&&yt.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),o[r]=s)}t=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=H(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),t=="select"&&o.defaultValue!=null&&(o.value=H(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),e.props=o,n.class!=n.className&&(Be.enumerable="className"in n,n.className!=null&&(o.class=n.className),Object.defineProperty(o,"className",Be))}e.$$typeof=bt,ze&&ze(e)};var je=c.__r;c.__r=function(e){je&&je(e),St=e.__c};var ie=_e(Ge());var Et=0;function m(e,t,n,o,i){var r,s,u={};for(s in t)s=="ref"?r=t[s]:u[s]=t[s];var f={type:e,props:u,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Et,__source:i,__self:o};if(typeof e=="function"&&(r=e.defaultProps))for(s in r)u[s]===void 0&&(u[s]=r[s]);return c.vnode&&c.vnode(f),f}var W=T(({digit:e,disabled:t,onUp:n,onDown:o})=>{let[i,r]=S(0),[s,u]=S(!1);return A(()=>{if(t){u(!0);let f=window.setTimeout(()=>{u(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),m("div",{class:(0,ie.default)("time-cell",{disabled:t}),children:[m("div",{class:"time-cell-up",onClick:t?void 0:n}),m("div",{class:"rotor",children:[m("div",{class:(0,ie.default)("rotor-leaf",{flipped:s}),children:[m("figure",{class:"rotor-leaf-rear",children:e}),m("figure",{class:"rotor-leaf-front",children:i})]}),m("div",{class:"rotor-top",children:e}),m("div",{class:"rotor-bottom",children:i})]}),m("div",{class:"time-cell-down",onClick:t?void 0:o})]})});function Xe(e){return J(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function O(e,t){return M(()=>e(t),[e])}var Ye=T(({minutes:e,seconds:t,disabled:n,onAdjustTime:o})=>{let i=Xe(e),r=Xe(t),s=O(o,0),u=O(o,1),f=O(o,2),p=O(o,3),l=O(o,4),h=O(o,5),a=O(o,6),_=O(o,7);return m("div",{className:"countdown-clock",children:[m(W,{disabled:n,digit:i[0],onUp:s,onDown:u}),m(W,{digit:i[1],disabled:n,onUp:f,onDown:p}),m("div",{class:"countdown-clock-divider"}),m(W,{disabled:n,digit:r[0],onUp:l,onDown:h}),m(W,{digit:r[1],disabled:n,onUp:a,onDown:_})]})});var Ze=T(({readonly:e,countdownSecs:t,startTime:n,paused:o,onAdjustTime:i,onStart:r,onPause:s,onResume:u,onReset:f})=>{let[p,l]=S(0),h=n>0&&p>=n,a=t-(h?p-n:0),_=Math.floor(a/60),d=a-_*60;return A(()=>{let k=NaN;if(t>0&&n>0&&!o){let b=()=>{l(Math.floor(Date.now()/1e3)),k=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(k)}else window.cancelAnimationFrame(k)},[n,o,t]),A(()=>{n>0&&p-n>=t&&f()},[p,n,t,f]),m("div",{class:"netless-app-countdown",children:m("div",{class:"netless-app-countdown-shrink",children:[m(Ye,{minutes:_,seconds:d,disabled:e||h,onAdjustTime:i}),m("div",{class:"netless-app-countdown-btns",children:o?m(C,{children:[m("button",{onClick:f,disabled:e,children:"Reset"}),m("button",{onClick:u,disabled:e,children:"Resume"})]}):h?m("button",{onClick:s,disabled:e,children:"Pause"}):m("button",{onClick:r,disabled:e||a<=0,children:"Start"})})]})})});var Je=T(({context:e,storage:t})=>{let[n,o]=S(()=>e.isWritable),[i,r]=S(t.state.countdownSecs),[s,u]=S(t.state.startTime),[f,p]=S(t.state.paused);A(()=>(o(e.isWritable),e.emitter.on("writableChange",o),()=>e.emitter.off("writableChange",o)),[e]),A(()=>{let b=v=>{v.countdownSecs&&r(t.state.countdownSecs),v.paused&&p(t.state.paused),v.startTime&&u(t.state.startTime)};return t.on("stateChanged",b)},[t]);let l=s>0,h=M(()=>{e.isWritable&&t.setState({paused:!1,startTime:Math.floor(Date.now()/1e3)})},[e,t]),a=M(()=>{e.isWritable&&t.setState({paused:!0})},[e,t]),_=M(()=>{e.isWritable&&t.setState({paused:!1})},[e,t]),d=M(()=>{e.isWritable&&t.setState({paused:!1,countdownSecs:0,startTime:0})},[e]),k=M(b=>{if(!l&&e.isWritable){let v=Math.floor(i/60),y=i-v*60,P=Math.floor(v/10),g=v%10,R=Math.floor(y/10),L=y%10,E;switch(b){case 0:{let I=g+y===0?7:6;E=((P+1)%I*10+g)*60+y;break}case 1:{let I=g+y===0?7:6;E=((P+I-1)%I*10+g)*60+y;break}case 2:{E=(Math.min(5,P)*10+(g+1)%10)*60+y;break}case 3:{E=(Math.min(5,P)*10+(g+10-1)%10)*60+y;break}case 4:{E=v*60+((R+1)%6*10+L);break}case 5:{E=v*60+((R+6-1)%6*10+L);break}case 6:{E=v*60+(Math.min(5,R)*10+(L+1)%10);break}case 7:{E=v*60+(Math.min(5,R)*10+(L+10-1)%10);break}default:{E=i;break}}t.setState({countdownSecs:E})}},[l,i,e,t]);return m(Ze,{readonly:!n,countdownSecs:i,startTime:s,paused:f,onAdjustTime:k,onStart:h,onPause:a,onResume:_,onReset:d})});var Pt=208,Rt=216,At={kind:"Countdown",config:{minwidth:Pt,minheight:Rt},setup(e){let t=e.box;t.mountStyles(Ke.default);let n=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});G(m(Je,{context:e,storage:n}),t.$content),e.emitter.on("destroy",()=>{G(null,t.$content)})}},Mt=At;return it(Nt);})();
/*! Bundled license information:

@@ -4,0 +4,0 @@

@@ -6,3 +6,3 @@ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Z,u,$e,D,Ce,oe,z={},Pe=[],ze=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function O(e,t){for(var n in t)e[n]=t[n];return e}function Oe(e){var t=e.parentNode;t&&t.removeChild(e)}function V(e,t,n){var o,l,r,i={};for(r in t)r=="key"?o=t[r]:r=="ref"?l=t[r]:i[r]=t[r];if(arguments.length>2&&(i.children=arguments.length>3?Z.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)i[r]===void 0&&(i[r]=e.defaultProps[r]);return L(e,i,o,l,null)}function L(e,t,n,o,l){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:l??++$e};return l==null&&u.vnode!=null&&u.vnode(r),r}function E(e){return e.children}function C(e,t){this.props=e,this.context=t}function R(e,t){if(t==null)return e.__?R(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?R(e):null}function He(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return He(e)}}function re(e){(!e.__d&&(e.__d=!0)&&D.push(e)&&!q.__r++||oe!==u.debounceRendering)&&((oe=u.debounceRendering)||Ce)(q)}function q(){for(var e;q.__r=D.length;)e=D.sort(function(t,n){return t.__v.__b-n.__v.__b}),D=[],e.some(function(t){var n,o,l,r,i,a;t.__d&&(i=(r=(n=t).__v).__e,(a=n.__P)&&(o=[],(l=O({},r)).__v=r.__v+1,te(a,r,l,n.__n,a.ownerSVGElement!==void 0,r.__h!=null?[i]:null,o,i??R(r),r.__h),De(o,r),r.__e!=i&&He(r)))})}function Ee(e,t,n,o,l,r,i,a,f,p){var _,h,s,c,d,g,b,v=o&&o.__k||Pe,y=v.length;for(n.__k=[],_=0;_<t.length;_++)if((c=n.__k[_]=(c=t[_])==null||typeof c=="boolean"?null:typeof c=="string"||typeof c=="number"||typeof c=="bigint"?L(null,c,null,null,c):Array.isArray(c)?L(E,{children:c},null,null,null):c.__b>0?L(c.type,c.props,c.key,null,c.__v):c)!=null){if(c.__=n,c.__b=n.__b+1,(s=v[_])===null||s&&c.key==s.key&&c.type===s.type)v[_]=void 0;else for(h=0;h<y;h++){if((s=v[h])&&c.key==s.key&&c.type===s.type){v[h]=void 0;break}s=null}te(e,c,s=s||z,l,r,i,a,f,p),d=c.__e,(h=c.ref)&&s.ref!=h&&(b||(b=[]),s.ref&&b.push(s.ref,null,c),b.push(h,c.__c||d,c)),d!=null?(g==null&&(g=d),typeof c.type=="function"&&c.__k===s.__k?c.__d=f=Ne(c,f,e):f=Re(e,c,s,v,d,f),typeof n.type=="function"&&(n.__d=f)):f&&s.__e==f&&f.parentNode!=e&&(f=R(s))}for(n.__e=g,_=y;_--;)v[_]!=null&&(typeof n.type=="function"&&v[_].__e!=null&&v[_].__e==n.__d&&(n.__d=R(o,_+1)),Ae(v[_],v[_]));if(b)for(_=0;_<b.length;_++)Ue(b[_],b[++_],b[++_])}function Ne(e,t,n){for(var o,l=e.__k,r=0;l&&r<l.length;r++)(o=l[r])&&(o.__=e,t=typeof o.type=="function"?Ne(o,t,n):Re(n,o,o,l,o.__e,t));return t}function B(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){B(n,t)}):t.push(e)),t}function Re(e,t,n,o,l,r){var i,a,f;if(t.__d!==void 0)i=t.__d,t.__d=void 0;else if(n==null||l!=r||l.parentNode==null)e:if(r==null||r.parentNode!==e)e.appendChild(l),i=null;else{for(a=r,f=0;(a=a.nextSibling)&&f<o.length;f+=2)if(a==l)break e;e.insertBefore(l,r),i=r}return i!==void 0?i:l.nextSibling}function Ve(e,t,n,o,l){var r;for(r in n)r==="children"||r==="key"||r in t||G(e,r,null,n[r],o);for(r in t)l&&typeof t[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===t[r]||G(e,r,t[r],n[r],o)}function _e(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||ze.test(t)?n:n+"px"}function G(e,t,n,o,l){var r;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||_e(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||_e(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o||e.addEventListener(t,r?ie:le,r):e.removeEventListener(t,r?ie:le,r);else if(t!=="dangerouslySetInnerHTML"){if(l)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function le(e){this.l[e.type+!1](u.event?u.event(e):e)}function ie(e){this.l[e.type+!0](u.event?u.event(e):e)}function te(e,t,n,o,l,r,i,a,f){var p,_,h,s,c,d,g,b,v,y,S,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(f=n.__h,a=t.__e=n.__e,t.__h=null,r=[a]),(p=u.__b)&&p(t);try{e:if(typeof k=="function"){if(b=t.props,v=(p=k.contextType)&&o[p.__c],y=p?v?v.props.value:p.__:o,n.__c?g=(_=t.__c=n.__c).__=_.__E:("prototype"in k&&k.prototype.render?t.__c=_=new k(b,y):(t.__c=_=new C(b,y),_.constructor=k,_.render=Be),v&&v.sub(_),_.props=b,_.state||(_.state={}),_.context=y,_.__n=o,h=_.__d=!0,_.__h=[]),_.__s==null&&(_.__s=_.state),k.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=O({},_.__s)),O(_.__s,k.getDerivedStateFromProps(b,_.__s))),s=_.props,c=_.state,h)k.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(k.getDerivedStateFromProps==null&&b!==s&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(b,y),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(b,_.__s,y)===!1||t.__v===n.__v){_.props=b,_.state=_.__s,t.__v!==n.__v&&(_.__d=!1),_.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(M){M&&(M.__=t)}),_.__h.length&&i.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(b,_.__s,y),_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(s,c,d)})}_.context=y,_.props=b,_.state=_.__s,(p=u.__r)&&p(t),_.__d=!1,_.__v=t,_.__P=e,p=_.render(_.props,_.state,_.context),_.state=_.__s,_.getChildContext!=null&&(o=O(O({},o),_.getChildContext())),h||_.getSnapshotBeforeUpdate==null||(d=_.getSnapshotBeforeUpdate(s,c)),S=p!=null&&p.type===E&&p.key==null?p.props.children:p,Ee(e,Array.isArray(S)?S:[S],t,n,o,l,r,i,a,f),_.base=t.__e,t.__h=null,_.__h.length&&i.push(_),g&&(_.__E=_.__=null),_.__e=!1}else r==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=qe(n.__e,t,n,o,l,r,i,f);(p=u.diffed)&&p(t)}catch(M){t.__v=null,(f||r!=null)&&(t.__e=a,t.__h=!!f,r[r.indexOf(a)]=null),u.__e(M,t,n)}}function De(e,t){u.__c&&u.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(o){o.call(n)})}catch(o){u.__e(o,n.__v)}})}function qe(e,t,n,o,l,r,i,a){var f,p,_,h=n.props,s=t.props,c=t.type,d=0;if(c==="svg"&&(l=!0),r!=null){for(;d<r.length;d++)if((f=r[d])&&"setAttribute"in f==!!c&&(c?f.localName===c:f.nodeType===3)){e=f,r[d]=null;break}}if(e==null){if(c===null)return document.createTextNode(s);e=l?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c,s.is&&s),r=null,a=!1}if(c===null)h===s||a&&e.data===s||(e.data=s);else{if(r=r&&Z.call(e.childNodes),p=(h=n.props||z).dangerouslySetInnerHTML,_=s.dangerouslySetInnerHTML,!a){if(r!=null)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(_||p)&&(_&&(p&&_.__html==p.__html||_.__html===e.innerHTML)||(e.innerHTML=_&&_.__html||""))}if(Ve(e,s,h,l,a),_)t.__k=[];else if(d=t.props.children,Ee(e,Array.isArray(d)?d:[d],t,n,o,l&&c!=="foreignObject",r,i,r?r[0]:n.__k&&R(n,0),a),r!=null)for(d=r.length;d--;)r[d]!=null&&Oe(r[d]);a||("value"in s&&(d=s.value)!==void 0&&(d!==e.value||c==="progress"&&!d||c==="option"&&d!==h.value)&&G(e,"value",d,h.value,!1),"checked"in s&&(d=s.checked)!==void 0&&d!==e.checked&&G(e,"checked",d,h.checked,!1))}return e}function Ue(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){u.__e(o,n)}}function Ae(e,t,n){var o,l;if(u.unmount&&u.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Ue(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){u.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(l=0;l<o.length;l++)o[l]&&Ae(o[l],t,typeof e.type!="function");n||e.__e==null||Oe(e.__e),e.__e=e.__d=void 0}function Be(e,t,n){return this.constructor(e,n)}function ce(e,t,n){var o,l,r;u.__&&u.__(e,t),l=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],te(t,e=(!o&&n||t).__k=V(E,null,[e]),l||z,z,t.ownerSVGElement!==void 0,!o&&n?[n]:l?null:t.firstChild?Z.call(t.childNodes):null,r,!o&&n?n:l?l.__e:t.firstChild,o),De(r,e)}Z=Pe.slice,u={__e:function(e,t,n,o){for(var l,r,i;t=t.__;)if((l=t.__c)&&!l.__)try{if((r=l.constructor)&&r.getDerivedStateFromError!=null&&(l.setState(r.getDerivedStateFromError(e)),i=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e,o||{}),i=l.__d),i)return l.__E=l}catch(a){e=a}throw e}},$e=0,C.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=O({},this.state),typeof e=="function"&&(e=e(O({},n),this.props)),e&&O(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),re(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),re(this))},C.prototype.render=E,D=[],Ce=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q.__r=0;var Ge=0;function m(e,t,n,o,l){var r,i,a={};for(i in t)i=="ref"?r=t[i]:a[i]=t[i];var f={type:e,props:a,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Ge,__source:l,__self:o};if(typeof e=="function"&&(r=e.defaultProps))for(i in r)a[i]===void 0&&(a[i]=r[i]);return u.vnode&&u.vnode(f),f}const Xe=`.time-cell{display:flex;flex-flow:column nowrap;align-items:center;font-family:sans-serif;font-weight:700}.time-cell.disabled .time-cell-up:before,.time-cell.disabled .time-cell-down:after{border-top-color:#0000000d;border-bottom-color:#0000000d}.time-cell-up:before,.time-cell-down:after{content:"";display:block;width:0;height:0;margin:0 0 4px;border-top:0;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid #151515;transition:border-color .4s;cursor:pointer}.time-cell-down:after{margin:4px 0 0;border-top:12px solid #151515;border-bottom:0}.rotor{position:relative;width:36px;height:64px;border-radius:4px;font-size:48px;text-align:center;perspective:200px}.rotor-top,.rotor-bottom{overflow:hidden;position:absolute;width:36px;height:32px}.rotor-leaf{z-index:1;position:absolute;width:36px;height:64px;transform-style:preserve-3d;transition:transform 0s}.rotor-leaf.flipped{transform:rotateX(-180deg);transition:all .5s ease-in-out}.rotor-leaf-front,.rotor-leaf-rear{overflow:hidden;position:absolute;width:36px;height:32px;margin:0;transform:rotateX(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}.rotor-leaf-front{line-height:64px;border-radius:4px 4px 0 0}.rotor-leaf-rear{line-height:0px;border-radius:0 0 4px 4px;transform:rotateX(-180deg)}.rotor-top{line-height:64px;border-radius:4px 4px 0 0}.rotor-bottom{bottom:0;line-height:0px;border-radius:0 0 4px 4px}.rotor:after{content:"";z-index:2;position:absolute;bottom:0px;left:0px;width:36px;height:32px;border-radius:0 0 4px 4px}.rotor,.rotor-top,.rotor-leaf-front{color:#fff;background-color:#151515}.rotor-bottom,.rotor-leaf-rear{color:#efefef;background-color:#202020}.rotor:after{border-top:solid 1px #151515}.telebox-color-scheme-dark .time-cell.disabled .time-cell-up:before,.telebox-color-scheme-dark .time-cell.disabled .time-cell-down:after{border-top-color:#ffffff14;border-bottom-color:#ffffff14}.telebox-color-scheme-dark .time-cell-up:before,.telebox-color-scheme-dark .time-cell-down:after{border-top-color:#d9d9df;border-bottom-color:#d9d9df}.telebox-color-scheme-dark .rotor,.telebox-color-scheme-dark .rotor-top,.telebox-color-scheme-dark .rotor-leaf-front{color:#383838;background-color:#efeff5}.telebox-color-scheme-dark .rotor-bottom,.telebox-color-scheme-dark .rotor-leaf-rear{color:#333;background-color:#eeecec}.telebox-color-scheme-dark .rotor:after{border-top:solid 1px #efeff5}.countdown-clock{display:flex;padding:5px}.countdown-clock>*{padding:0 5px}.countdown-clock-divider{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 1px}.countdown-clock-divider:before,.countdown-clock-divider:after{content:"";display:block;width:8px;height:8px;margin:6px 0;background-color:#000;border-radius:50%}.netless-app-countdown{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;transition:background-color .4s}.netless-app-countdown-shrink{display:inline-block;transition:background-color .4s}.netless-app-countdown-btns{width:100%;margin-top:10px;display:flex;flex-wrap:nowrap}.netless-app-countdown-btns>button{flex:1;display:block;margin:0 10px 0 0;padding:5px 10px;text-align:center;border:0;border-radius:4px;color:#fff;background-color:#3380ff;transition:background-color .4s,color .4s;cursor:pointer}.netless-app-countdown-btns>button:last-of-type{margin:0}.netless-app-countdown-btns>button:disabled{color:#00000040;background:#f5f5f5;cursor:not-allowed}.telebox-color-scheme-dark .netless-app-countdown-btns>button:disabled{color:#ffffff4d;background:rgba(255,255,255,.08)}

http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o=[],l=0;l<arguments.length;l++){var r=arguments[l];if(r){var i=typeof r;if(i==="string"||i==="number")o.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&o.push(a)}}else if(i==="object")if(r.toString===Object.prototype.toString)for(var f in r)t.call(r,f)&&r[f]&&o.push(f);else o.push(r.toString())}}return o.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_t);const Se=ee,F=K(({digit:e,disabled:t,onUp:n,onDown:o})=>{const[l,r]=H(0),[i,a]=H(!1);return U(()=>{if(t){a(!0);const f=window.setTimeout(()=>{a(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),m("div",{class:Se("time-cell",{disabled:t}),children:[m("div",{class:"time-cell-up",onClick:t?void 0:n}),m("div",{class:"rotor",children:[m("div",{class:Se("rotor-leaf",{flipped:i}),children:[m("figure",{class:"rotor-leaf-rear",children:e}),m("figure",{class:"rotor-leaf-front",children:l})]}),m("div",{class:"rotor-top",children:e}),m("div",{class:"rotor-bottom",children:l})]}),m("div",{class:"time-cell-down",onClick:t?void 0:o})]})});var $=(e=>(e[e.AddTenMinutes=0]="AddTenMinutes",e[e.ReduceTenMinutes=1]="ReduceTenMinutes",e[e.AddOneMinute=2]="AddOneMinute",e[e.ReduceOneMinute=3]="ReduceOneMinute",e[e.AddTenSeconds=4]="AddTenSeconds",e[e.ReduceTenSeconds=5]="ReduceTenSeconds",e[e.AddOneSecond=6]="AddOneSecond",e[e.ReduceOneSecond=7]="ReduceOneSecond",e))($||{});function Me(e){return Te(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function P(e,t){return N(()=>e(t),[e])}const lt=K(({minutes:e,seconds:t,disabled:n,onAdjustTime:o})=>{const l=Me(e),r=Me(t),i=P(o,0),a=P(o,1),f=P(o,2),p=P(o,3),_=P(o,4),h=P(o,5),s=P(o,6),c=P(o,7);return m("div",{className:"countdown-clock",children:[m(F,{disabled:n,digit:l[0],onUp:i,onDown:a}),m(F,{digit:l[1],disabled:n,onUp:f,onDown:p}),m("div",{class:"countdown-clock-divider"}),m(F,{disabled:n,digit:r[0],onUp:_,onDown:h}),m(F,{digit:r[1],disabled:n,onUp:s,onDown:c})]})}),it=K(({readonly:e,countdownSecs:t,startTime:n,paused:o,onAdjustTime:l,onStart:r,onPause:i,onResume:a,onReset:f})=>{const[p,_]=H(0),h=n>0&&p>=n,s=t-(h?p-n:0),c=Math.floor(s/60),d=s-c*60;return U(()=>{let g=NaN;if(t>0&&n>0&&!o){const b=()=>{_(Math.floor(Date.now()/1e3)),g=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(g)}else window.cancelAnimationFrame(g)},[n,o,t]),U(()=>{n>0&&p-n>=t&&f()},[p,n,t,f]),m("div",{class:"netless-app-countdown",children:m("div",{class:"netless-app-countdown-shrink",children:[m(lt,{minutes:c,seconds:d,disabled:e||h,onAdjustTime:l}),m("div",{class:"netless-app-countdown-btns",children:o?m(E,{children:[m("button",{onClick:f,disabled:e,children:"Reset"}),m("button",{onClick:a,disabled:e,children:"Resume"})]}):h?m("button",{onClick:i,disabled:e,children:"Pause"}):m("button",{onClick:r,disabled:e||s<=0,children:"Start"})})]})})}),ct=K(({context:e,storage:t})=>{const[n,o]=H(()=>e.isWritable),[l,r]=H(t.state.countdownSecs),[i,a]=H(t.state.startTime),[f,p]=H(t.state.paused);U(()=>(o(e.isWritable),e.emitter.on("writableChange",o),()=>e.emitter.off("writableChange",o)),[e]),U(()=>{const b=v=>{v.countdownSecs&&r(t.state.countdownSecs),v.paused&&p(t.state.paused),v.startTime&&a(t.state.startTime)};return t.on("stateChanged",b)},[t]);const _=i>0,h=N(()=>{e.isWritable&&t.setState({paused:!1,startTime:Math.floor(Date.now()/1e3)})},[e,t]),s=N(()=>{e.isWritable&&t.setState({paused:!0})},[e,t]),c=N(()=>{e.isWritable&&t.setState({paused:!1})},[e,t]),d=N(()=>{e.isWritable&&t.setState({paused:!1,countdownSecs:0,startTime:0})},[e]),g=N(b=>{if(!_&&e.isWritable){const v=Math.floor(l/60),y=l-v*60,S=Math.floor(v/10),k=v%10,M=Math.floor(y/10),A=y%10;let x;switch(b){case $.AddTenMinutes:{const W=k+y===0?7:6;x=((S+1)%W*10+k)*60+y;break}case $.ReduceTenMinutes:{const W=k+y===0?7:6;x=((S+W-1)%W*10+k)*60+y;break}case $.AddOneMinute:{x=(Math.min(5,S)*10+(k+1)%10)*60+y;break}case $.ReduceOneMinute:{x=(Math.min(5,S)*10+(k+10-1)%10)*60+y;break}case $.AddTenSeconds:{x=v*60+((M+1)%6*10+A);break}case $.ReduceTenSeconds:{x=v*60+((M+6-1)%6*10+A);break}case $.AddOneSecond:{x=v*60+(Math.min(5,M)*10+(A+1)%10);break}case $.ReduceOneSecond:{x=v*60+(Math.min(5,M)*10+(A+10-1)%10);break}default:{x=l;break}}t.setState({countdownSecs:x})}},[_,e]);return m(it,{readonly:!n,countdownSecs:l,startTime:i,paused:f,onAdjustTime:g,onStart:h,onPause:s,onResume:c,onReset:d})}),st=208,at=216,ut={kind:"Countdown",config:{minwidth:st,minheight:at},setup(e){const t=e.box;t.mountStyles(Xe);const n=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});ce(m(ct,{context:e,storage:n}),t.$content),e.emitter.on("destroy",()=>{ce(null,t.$content)})}};exports.default=ut;
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o=[],l=0;l<arguments.length;l++){var r=arguments[l];if(r){var i=typeof r;if(i==="string"||i==="number")o.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&o.push(a)}}else if(i==="object")if(r.toString===Object.prototype.toString)for(var f in r)t.call(r,f)&&r[f]&&o.push(f);else o.push(r.toString())}}return o.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_t);const Se=ee,F=K(({digit:e,disabled:t,onUp:n,onDown:o})=>{const[l,r]=H(0),[i,a]=H(!1);return U(()=>{if(t){a(!0);const f=window.setTimeout(()=>{a(!1),r(e)},500);return()=>window.clearTimeout(f)}else r(e)},[e]),m("div",{class:Se("time-cell",{disabled:t}),children:[m("div",{class:"time-cell-up",onClick:t?void 0:n}),m("div",{class:"rotor",children:[m("div",{class:Se("rotor-leaf",{flipped:i}),children:[m("figure",{class:"rotor-leaf-rear",children:e}),m("figure",{class:"rotor-leaf-front",children:l})]}),m("div",{class:"rotor-top",children:e}),m("div",{class:"rotor-bottom",children:l})]}),m("div",{class:"time-cell-down",onClick:t?void 0:o})]})});var $=(e=>(e[e.AddTenMinutes=0]="AddTenMinutes",e[e.ReduceTenMinutes=1]="ReduceTenMinutes",e[e.AddOneMinute=2]="AddOneMinute",e[e.ReduceOneMinute=3]="ReduceOneMinute",e[e.AddTenSeconds=4]="AddTenSeconds",e[e.ReduceTenSeconds=5]="ReduceTenSeconds",e[e.AddOneSecond=6]="AddOneSecond",e[e.ReduceOneSecond=7]="ReduceOneSecond",e))($||{});function Me(e){return Te(()=>(e=e%61,[Math.floor(e/10),e%10]),[e])}function P(e,t){return N(()=>e(t),[e])}const lt=K(({minutes:e,seconds:t,disabled:n,onAdjustTime:o})=>{const l=Me(e),r=Me(t),i=P(o,0),a=P(o,1),f=P(o,2),p=P(o,3),_=P(o,4),h=P(o,5),s=P(o,6),c=P(o,7);return m("div",{className:"countdown-clock",children:[m(F,{disabled:n,digit:l[0],onUp:i,onDown:a}),m(F,{digit:l[1],disabled:n,onUp:f,onDown:p}),m("div",{class:"countdown-clock-divider"}),m(F,{disabled:n,digit:r[0],onUp:_,onDown:h}),m(F,{digit:r[1],disabled:n,onUp:s,onDown:c})]})}),it=K(({readonly:e,countdownSecs:t,startTime:n,paused:o,onAdjustTime:l,onStart:r,onPause:i,onResume:a,onReset:f})=>{const[p,_]=H(0),h=n>0&&p>=n,s=t-(h?p-n:0),c=Math.floor(s/60),d=s-c*60;return U(()=>{let g=NaN;if(t>0&&n>0&&!o){const b=()=>{_(Math.floor(Date.now()/1e3)),g=window.requestAnimationFrame(b)};return b(),()=>window.cancelAnimationFrame(g)}else window.cancelAnimationFrame(g)},[n,o,t]),U(()=>{n>0&&p-n>=t&&f()},[p,n,t,f]),m("div",{class:"netless-app-countdown",children:m("div",{class:"netless-app-countdown-shrink",children:[m(lt,{minutes:c,seconds:d,disabled:e||h,onAdjustTime:l}),m("div",{class:"netless-app-countdown-btns",children:o?m(E,{children:[m("button",{onClick:f,disabled:e,children:"Reset"}),m("button",{onClick:a,disabled:e,children:"Resume"})]}):h?m("button",{onClick:i,disabled:e,children:"Pause"}):m("button",{onClick:r,disabled:e||s<=0,children:"Start"})})]})})}),ct=K(({context:e,storage:t})=>{const[n,o]=H(()=>e.isWritable),[l,r]=H(t.state.countdownSecs),[i,a]=H(t.state.startTime),[f,p]=H(t.state.paused);U(()=>(o(e.isWritable),e.emitter.on("writableChange",o),()=>e.emitter.off("writableChange",o)),[e]),U(()=>{const b=v=>{v.countdownSecs&&r(t.state.countdownSecs),v.paused&&p(t.state.paused),v.startTime&&a(t.state.startTime)};return t.on("stateChanged",b)},[t]);const _=i>0,h=N(()=>{e.isWritable&&t.setState({paused:!1,startTime:Math.floor(Date.now()/1e3)})},[e,t]),s=N(()=>{e.isWritable&&t.setState({paused:!0})},[e,t]),c=N(()=>{e.isWritable&&t.setState({paused:!1})},[e,t]),d=N(()=>{e.isWritable&&t.setState({paused:!1,countdownSecs:0,startTime:0})},[e]),g=N(b=>{if(!_&&e.isWritable){const v=Math.floor(l/60),y=l-v*60,S=Math.floor(v/10),k=v%10,M=Math.floor(y/10),A=y%10;let x;switch(b){case $.AddTenMinutes:{const W=k+y===0?7:6;x=((S+1)%W*10+k)*60+y;break}case $.ReduceTenMinutes:{const W=k+y===0?7:6;x=((S+W-1)%W*10+k)*60+y;break}case $.AddOneMinute:{x=(Math.min(5,S)*10+(k+1)%10)*60+y;break}case $.ReduceOneMinute:{x=(Math.min(5,S)*10+(k+10-1)%10)*60+y;break}case $.AddTenSeconds:{x=v*60+((M+1)%6*10+A);break}case $.ReduceTenSeconds:{x=v*60+((M+6-1)%6*10+A);break}case $.AddOneSecond:{x=v*60+(Math.min(5,M)*10+(A+1)%10);break}case $.ReduceOneSecond:{x=v*60+(Math.min(5,M)*10+(A+10-1)%10);break}default:{x=l;break}}t.setState({countdownSecs:x})}},[_,l,e,t]);return m(it,{readonly:!n,countdownSecs:l,startTime:i,paused:f,onAdjustTime:g,onStart:h,onPause:s,onResume:c,onReset:d})}),st=208,at=216,ut={kind:"Countdown",config:{minwidth:st,minheight:at},setup(e){const t=e.box;t.mountStyles(Xe);const n=e.createStorage("state",{countdownSecs:0,startTime:0,paused:!1});ce(m(ct,{context:e,storage:n}),t.$content),e.emitter.on("destroy",()=>{ce(null,t.$content)})}};exports.default=ut;
//# sourceMappingURL=main.js.map
{
"name": "@netless/app-countdown",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/main.js",

@@ -5,0 +5,0 @@ "module": "dist/main.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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