PageSourceSearch

https://www.bitlayer.org/assets/fromUnixTime-DihweCq9.js

js bitlayer.org collected 2026-10-02 04:54:26 UTC 9,521 bytes, 2 lines download raw bytes

1import{r as y}from"./jsx-runtime-c7lzrv_k.js";import{t as z}from"./toDate-qOSwr3PX.js";var D={exports:{}},x="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",N=x,$=N;function b(){}function O(){}O.resetWarningCache=b;var U=function(){function e(r,t,i,a,u,c){if(c!==$){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function n(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:O,resetWarningCache:b};return o.PropTypes=o,o};D.exports=U();var s=D.exports;function _(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function H(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n,o){return n&&H(e.prototype,n),e}function C(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&S(e,n)}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},T(e)}function S(e,n){return S=Object.setPrototypeOf||function(r,t){return r.__proto__=t,r},S(e,n)}function W(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e,n){return n&&(typeof n=="object"||typeof n=="function")?n:F(e)}function E(e){var n=W();return function(){var r=T(e),t;if(n){var i=T(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return L(this,t)}}function V(e){return q(e)||B(e)||Y(e)||G()}function q(e){if(Array.isArray(e))return g(e)}function B(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Y(e,n){if(e){if(typeof e=="string")return g(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return g(e,n)}}function g(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=e[o];return r}function G(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,o=String(e);if(n===0)return o;var r=o.match(/(.*?)([0-9]+)(.*)/),t=r?r[1]:"",i=r?r[3]:"",a=r?r[2]:o,u=a.length>=n?a:(V(Array(n)).map(function(){return"0"}).join("")+a).slice(n*-1);return"".concat(t).concat(u).concat(i)}var R={daysInHours:!1,zeroPadTime:2};function J(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.now,r=o===void 0?Date.now:o,t=n.precision,i=t===void 0?0:t,a=n.controlled,u=n.offsetTime,c=u===void 0?0:u,p=n.overtime,f;typeof e=="string"?f=new Date(e).getTime():e instanceof Date?f=e.getTime():f=e,a||(f+=c);var l=a?f:f-r(),m=Math.min(20,Math.max(0,i)),h=Math.round(parseFloat(((p?l:Math.max(0,l))/1e3).toFixed(m))*1e3),d=Math.abs(h)/1e3;return{total:h,days:Math.floor(d/(3600*24)),hours:Math.floor(d/3600%24),minutes:Math.floor(d/60%60),seconds:Math.floor(d%60),milliseconds:Number((d%1*1e3).toFixed()),completed:h<=0}}function K(e,n){var o=e.days,r=e.hours,t=e.minutes,i=e.seconds,a=Object.assign(Object.assign({},R),n),u=a.daysInHours,c=a.zeroPadTime,p=a.zeroPadDays,f=p===void 0?c:p,l=Math.min(2,c),m=u?v(r+o*24,c):v(r,l);return{days:u?"":v(o,f),hours:m,minutes:v(t,l),seconds:v(i,l)}}var M=function(e){C(o,e);var n=E(o);function o(){var r;return _(this,o),r=n.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var t=r.state.count-1;t===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(i){return{count:i.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(t){r.stopCountdown(),r.setState(function(i){return{count:i.count+t}},r.startCountdown)},r}
2return w(o,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?y.cloneElement(this.props.children,{count:this.state.count}):null}}]),o}(y.Component);M.propTypes={count:s.number,children:s.element,onComplete:s.func};var k=function(e){C(o,e);var n=E(o);function o(r){var t;if(_(this,o),t=n.call(this,r),t.mounted=!1,t.initialTimestamp=t.calcOffsetStartTimestamp(),t.offsetStartTimestamp=t.props.autoStart?0:t.initialTimestamp,t.offsetTime=0,t.legacyMode=!1,t.legacyCountdownRef=y.createRef(),t.tick=function(){var a=t.calcTimeDelta(),u=a.completed&&!t.props.overtime?void 0:t.props.onTick;t.setTimeDeltaState(a,void 0,u)},t.start=function(){if(!t.isStarted()){var a=t.offsetStartTimestamp;t.offsetStartTimestamp=0,t.offsetTime+=a?t.calcOffsetStartTimestamp()-a:0;var u=t.calcTimeDelta();t.setTimeDeltaState(u,"STARTED",t.props.onStart),!t.props.controlled&&(!u.completed||t.props.overt
2ime)&&(t.clearTimer(),t.interval=window.setInterval(t.tick,t.props.intervalDelay))}},t.pause=function(){t.isPaused()||(t.clearTimer(),t.offsetStartTimestamp=t.calcOffsetStartTimestamp(),t.setTimeDeltaState(t.state.timeDelta,"PAUSED",t.props.onPause))},t.stop=function(){t.isStopped()||(t.clearTimer(),t.offsetStartTimestamp=t.calcOffsetStartTimestamp(),t.offsetTime=t.offsetStartTimestamp-t.initialTimestamp,t.setTimeDeltaState(t.calcTimeDelta(),"STOPPED",t.props.onStop))},t.isStarted=function(){return t.isStatus("STARTED")},t.isPaused=function(){return t.isStatus("PAUSED")},t.isStopped=function(){return t.isStatus("STOPPED")},t.isCompleted=function(){return t.isStatus("COMPLETED")},r.date){var i=t.calcTimeDelta();t.state={timeDelta:i,status:i.completed?"COMPLETED":"STOPPED"}}else t.legacyMode=!0;return t}return w(o,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(t){this.legacyMode||this.props.date!==t.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var t=this.props,i=t.date,a=t.now,u=t.precision,c=t.controlled,p=t.overtime;return J(i,{now:a,precision:u,controlled:c,offsetTime:this.offsetTime,overtime:p})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(t){this.legacyCountdownRef.current.addTime(t)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(t){return this.state.status===t}},{key:"setTimeDeltaState",value:function(t,i,a){var u=this;if(this.mounted){var c=t.completed&&!this.state.timeDelta.completed,p=t.completed&&i==="STARTED";c&&!this.props.overtime&&this.clearTimer();var f=function(){a&&a(u.state.timeDelta),u.props.onComplete&&(c||p)&&u.props.onComplete(t,p)};return this.setState(function(l){var m=i||l.status;return t.completed&&!u.props.overtime?m="COMPLETED":!i&&m==="COMPLETED"&&(m="STOPPED"),{timeDelta:t,status:m}},f)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var t=this.props,i=t.daysInHours,a=t.zeroPadTime,u=t.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:K(c,{daysInHours:i,zeroPadTime:a,zeroPadDays:u})})}},{key:"render",value:function(){if(this.legacyMode){var t=this.props,i=t.count,a=t.children,u=t.onComplete;return y.createElement(M,{ref:this.legacyCountdownRef,count:i,onComplete:u},a)}var c=this.props,p=c.className,f=c.overtime,l=c.children,m=c.renderer,h=this.getRenderProps();if(m)return m(h);if(l&&this.state.timeDelta.completed&&!f)return y.cloneElement(l,{countdown:h});var d=h.formatted,P=d.days,I=d.hours,j=d.minutes,A=d.seconds;return y.createElement("span",{className:p},h.total<0?"-":"",P,P?":":"",I,":",j,":",A)}}]),o}(y.Component);k.defaultProps=Object.assign(Object.assign({},R),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});k.propTypes={date:s.oneOfType([s.instanceOf(Date),s.string,s.number]),daysInHours:s.bool,zeroPadTime:s.number,zeroPadDays:s.number,controlled:s.bool,intervalDelay:s.number,precision:s.number,autoStart:s.bool,overtime:s.bool,className:s.string,children:s.element,renderer:s.func,now:s.func,onMount:s.func,onStart:s.func,onPause:s.func,onStop:s.func,onTick:s.func,onComplete:s.func};function Z(e){return z(e*1e3)}export{k as C,Z as f,v as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.