UNPKG

@getontime/cli

Version:

Time keeping for live events

2 lines 2.94 kB
System.register(["./jsx-runtime-legacy-DMkDNnVj.js","./useSocket-legacy-C772wu7w.js","./playbackstate-legacy-DgaX7fPF.js","./viewUtils-legacy-djI28uVO.js"],function(e,n){var t,o,r,i,s,c,d,a,u,l,f,y,w;return e({a:function(e){return e!==c.Clock},c:function(e){return e!==c.None&&e!==c.Clock},i:function(e,n,t,o,r,i){if(!i)return"aux1"===e.timer.secondarySource||"aux2"===e.timer.secondarySource||"aux3"===e.timer.secondarySource?u(n,c.CountDown,t,{removeSeconds:o,removeLeadingZero:r}):"secondary"===e.timer.secondarySource&&e.secondary?e.secondary:void 0},l:function(e,n){return(e??0)+(n??0)},n:function(e,n){const t=e.length;let o=100/(t-1)*1.25;return w[t]&&(o=w[t]),n&&(o*=.6),o},o:function(e){return""!==e.text&&e.visible},r:function(e){return e===s.Play||e===s.Roll},s:function(e,n,t,o,r,s){return s?{showEndMessage:!1,showFinished:!1,showWarning:!1,showDanger:!1}:e===c.CountDown||n?{showEndMessage:t===i.Overtime&&o&&""!==r,showFinished:t===i.Overtime,showWarning:t===i.Warning,showDanger:t===i.Danger}:{showEndMessage:!1,showFinished:!1,showWarning:!1,showDanger:!1}},t:function(e,n,t,o,r,c,u){if(r===s.Stop)return{showNow:!1,nowMain:void 0,nowSecondary:void 0,showNext:!1,nextMain:void 0,nextSecondary:void 0};const l=d(r)&&c!==i.Pending,f=l?a(e,t??"title"):void 0,y=l?a(e,o,u):void 0,w=a(l?n:e,t??"title"),h=a(l?n:e,o,u);return{showNow:"none"!==t&&(Boolean(f)||Boolean(y)),nowMain:f,nowSecondary:y,showNext:"none"!==t&&(Boolean(w)||Boolean(h)),nextMain:w,nextSecondary:h}},u:function({children:e,mode:n="multi",min:t=16,max:o=256,...r}){const i=(0,f.useRef)(null),s=(0,f.useCallback)(()=>{const e=i.current;return!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)},[]),c=(0,f.useCallback)(()=>{const e=i.current;if(!e)return;const n=e.style.visibility;e.style.visibility="hidden";const r=l(t,o+1,n=>(e.style.fontSize=`${n}px`,!s()));e.style.fontSize=`${r}px`,e.style.visibility=n},[s,t,o]);return(0,f.useEffect)(()=>{const e=i.current;if(!e)return;c();const n=new ResizeObserver(c);return n.observe(e),()=>n.disconnect()},[e,n,c]),(0,y.jsx)("div",{ref:i,style:{whiteSpace:"single"===n?"nowrap":"normal"},...r,children:e})}}),{setters:[function(e){t=e.a,o=e.n,r=e.t},function(e){i=e.Rt,s=e.Ut,c=e.qt},function(e){d=e.t},function(e){a=e.n,u=e.t}],execute:function(){!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"f14ad0099eab1969fdd065b56af5fdd3cf530de6"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56a84fe1-6d6c-4dc4-8b34-d3d11f8047fd",e._sentryDebugIdIdentifier="sentry-dbid-56a84fe1-6d6c-4dc4-8b34-d3d11f8047fd")}catch(e){}}(),l=(e,n,t)=>{for(;e<n;){const o=Math.floor((e+n)/2);if(o===e)break;t(o)?e=o:n=o}return e},f=t(o(),1),y=r(),w={4:28,5:28,6:25,8:18,9:18}}}}); //# sourceMappingURL=timer.utils-legacy-CQShK8iX.js.map