!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("tile",t):(e=e||self).tile=t()}(this,function(){"use strict";var e=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};e.now||e.mozNow||e.msNow||e.oNow||e.webkitNow;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;var a=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,i,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s2?n-2:0),o=2;o1?t-1:0),r=1;r2?n-2:0),o=2;o8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=r.map(function(e){return""+e});a.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,a)}try{var i=0,u="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(u)}catch(e){}}},j={};function O(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+t;j[o]||(R(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),j[o]=!0)}var E={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){O(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){O(e,"replaceState")},enqueueSetState:function(e,t,n,r){O(e,"setState")}},$={};function I(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||E}Object.freeze($),I.prototype.isReactComponent={},I.prototype.setState=function(e,t){!function(){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw S(Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."))}(),this.updater.enqueueSetState(this,e,t,"setState")},I.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var N={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},T=function(e,t){Object.defineProperty(I.prototype,e,{get:function(){P(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var A in N)N.hasOwnProperty(A)&&T(A,N[A]);function D(){}function M(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||E}D.prototype=I.prototype;var L=M.prototype=new D;L.constructor=M,t(L,I.prototype),L.isPureReactComponent=!0;var q={current:null},F={suspense:null},U={current:null},H=/^(.*)[\\\/]/,W=1;function z(e){if(null==e)return null;if("number"==typeof e.tag&&R(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case i:return"Portal";case c:return"Profiler";case s:return"StrictMode";case y:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case l:return"Context.Provider";case d:return r=e,o=e.render,a="ForwardRef",p=o.displayName||o.name||"",r.displayName||(""!==p?a+"("+p+")":a);case m:return z(e.type);case g:var t=(n=e)._status===W?n._result:null;if(t)return z(t)}var n,r,o,a,p;return null}var V={},Y=null;function B(e){Y=e}V.getCurrentStack=null,V.getStackAddendum=function(){var e="";if(Y){var t=z(Y.type),n=Y._owner;e+=function(e,t,n){var r="";if(t){var o=t.fileName,a=o.replace(H,"");if(/^index\./.test(a)){var i=o.match(H);if(i){var u=i[1];u&&(a=u.replace(H,"")+"/"+a)}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,Y._source,n&&z(n.type))}var r=V.getCurrentStack;return r&&(e+=r()||""),e};var J={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:F,ReactCurrentOwner:U,IsSomeRendererActing:{current:!1},assign:t};t(J,{ReactDebugCurrentFrame:V,ReactComponentTreeHook:{}});var X,Z,G=function(e,t){if(!e){for(var n=J.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,o=new Array(r>2?r-2:0),a=2;a1){for(var l=Array(c),f=0;f.")}return t}(t);if(!ke[n]){ke[n]=!0;var r="";e&&e._owner&&e._owner!==U.current&&(r=" It was passed a child from "+z(e._owner.type)+"."),B(e),G(!1,'Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',n,r),B(null)}}}function Se(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n",s=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,G(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,s)}var f=re.apply(this,arguments);if(null==f)return f;if(i)for(var p=2;p is not supported and will be removed in a future major release. Did you mean to render instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,G(!1,"Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),n.Consumer}}}),n.Consumer=a,n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return null!=e&&e.$$typeof===m?R(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?R(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&R(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&R(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:d,render:e}},lazy:function(e){var t,n,r={$$typeof:g,_ctor:e,_status:-1,_result:null};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){G(!1,"React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){G(!1,"React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},memo:function(e,t){return we(e)||R(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return _e().useCallback(e,t)},useContext:function(e,t){var n=_e();if(void 0!==t&&G(!1,"useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?G(!1,"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&G(!1,"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},useEffect:function(e,t){return _e().useEffect(e,t)},useImperativeHandle:function(e,t,n){return _e().useImperativeHandle(e,t,n)},useDebugValue:function(e,t){return _e().useDebugValue(e,t)},useLayoutEffect:function(e,t){return _e().useLayoutEffect(e,t)},useMemo:function(e,t){return _e().useMemo(e,t)},useReducer:function(e,t,n){return _e().useReducer(e,t,n)},useRef:function(e){return _e().useRef(e)},useState:function(e){return _e().useState(e)},Fragment:u,Profiler:c,StrictMode:s,Suspense:y,unstable_SuspenseList:h,createElement:Re,cloneElement:function(e,n,r){for(var o=function(e,n,r){var o;!function(){if(null==e)throw S(Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+"."))}();var a,i=t({},e.props),u=e.key,s=e.ref,c=e._self,l=e._source,f=e._owner;if(null!=n)for(o in ee(n)&&(s=n.ref,f=U.current),te(n)&&(u=""+n.key),e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)K.call(n,o)&&!Q.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==a?i[o]=a[o]:i[o]=n[o]);var p=arguments.length-2;if(1===p)i.children=r;else if(p>1){for(var d=Array(p),y=0;ythis.canvasRef=e,id:"clock-canvas",__self:this,__source:{fileName:_,lineNumber:136}}))}}class P extends w{constructor(e){super(e)}renderWrapper(e){return b.createElement("div",{className:"pa2",style:{width:C,height:C,background:"rgba(0,0,0,1)"},__self:this,__source:{fileName:_,lineNumber:152}},e)}render(){this.props.data&&this.props.data;return this.renderWrapper(b.createElement(S,{__self:this,__source:{fileName:_,lineNumber:166}}))}}const R=(e,t,n)=>{const{x:r,y:o}=t;e.getContext("2d");return e.width=r*n,e.height=o*n,e.style.width=r+"px",e.style.height=o+"px",e.getContext("2d").scale(n,n),e};return window.clockTile=P,P});