mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
1 line
27 KiB
JavaScript
1 line
27 KiB
JavaScript
!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:{};"function"==typeof e.setTimeout&&setTimeout,"function"==typeof e.clearTimeout&&clearTimeout;function t(e,t){this.fun=e,this.array=t}t.prototype.run=function(){this.fun.apply(null,this.array)};var r=e.performance||{};r.now||r.mozNow||r.msNow||r.oNow||r.webkitNow;new Date;var n={};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var l=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={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&&(o[c]=r[c]);if(a){n=a(r);for(var f=0;f<n.length;f++)u.call(r,n[f])&&(o[n[f]]=r[n[f]])}}return o},c="function"==typeof Symbol&&Symbol.for,f=c?Symbol.for("react.element"):60103,s=c?Symbol.for("react.portal"):60106,p=c?Symbol.for("react.fragment"):60107,d=c?Symbol.for("react.strict_mode"):60108,y=c?Symbol.for("react.profiler"):60114,v=c?Symbol.for("react.provider"):60109,m=c?Symbol.for("react.context"):60110,h=c?Symbol.for("react.concurrent_mode"):60111,b=c?Symbol.for("react.forward_ref"):60112,g=c?Symbol.for("react.suspense"):60113,_=c?Symbol.for("react.memo"):60115,w=c?Symbol.for("react.lazy"):60116,k="function"==typeof Symbol&&Symbol.iterator;function S(e){for(var t=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<t;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,t,r,n,o,a,i,u){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,o,a,i,u],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x={};function j(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||P}function O(){}function C(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||P}j.prototype.isReactComponent={},j.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&S("85"),this.updater.enqueueSetState(this,e,t,"setState")},j.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=j.prototype;var R=C.prototype=new O;R.constructor=C,l(R,j.prototype),R.isPureReactComponent=!0;var $={current:null,currentDispatcher:null},E=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,r){var n=void 0,o={},a=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,n)&&!N.hasOwnProperty(n)&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return{$$typeof:f,type:e,key:a,ref:i,props:o,_owner:$.current}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===f}var I=/\/+/g,M=[];function D(e,t,r,n){if(M.length){var o=M.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function F(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function U(e,t,r){return null==e?0:function e(t,r,n,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var i=!1;if(null===t)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case f:case s:i=!0}}if(i)return n(o,t,""===r?"."+q(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=r+q(a=t[u],u);i+=e(a,l,n,o)}else if(l=null===t||"object"!=typeof t?null:"function"==typeof(l=k&&t[k]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),u=0;!(a=t.next()).done;)i+=e(a=a.value,l=r+q(a,u++),n,o);else"object"===a&&S("31","[object Object]"==(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return i}(e,"",t,r)}function q(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function V(e,t){e.func.call(e.context,t,e.count++)}function W(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?H(e,n,r,function(e){return e}):null!=e&&(A(e)&&(e=function(e,t){return{$$typeof:f,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(I,"$&/")+"/")+r)),n.push(e))}function H(e,t,r,n,o){var a="";null!=r&&(a=(""+r).replace(I,"$&/")+"/"),U(e,W,t=D(t,a,n,o)),F(t)}var z={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return H(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;U(e,V,t=D(null,null,t,r)),F(t)},count:function(e){return U(e,function(){return null},null)},toArray:function(e){var t=[];return H(e,t,null,function(e){return e}),t},only:function(e){return A(e)||S("143"),e}},createRef:function(){return{current:null}},Component:j,PureComponent:C,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:m,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:v,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:b,render:e}},lazy:function(e){return{$$typeof:w,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:_,type:e,compare:void 0===t?null:t}},Fragment:p,StrictMode:d,Suspense:g,createElement:T,cloneElement:function(e,t,r){null==e&&S("267",e);var n=void 0,o=l({},e.props),a=e.key,i=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(i=t.ref,u=$.current),void 0!==t.key&&(a=""+t.key);var c=void 0;for(n in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)E.call(t,n)&&!N.hasOwnProperty(n)&&(o[n]=void 0===t[n]&&void 0!==c?c[n]:t[n])}if(1===(n=arguments.length-2))o.children=r;else if(1<n){c=Array(n);for(var s=0;s<n;s++)c[s]=arguments[s+2];o.children=c}return{$$typeof:f,type:e.type,key:a,ref:i,props:o,_owner:u}},createFactory:function(e){var t=T.bind(null,e);return t.type=e,t},isValidElement:A,version:"16.6.3",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:$,assign:l}};z.unstable_ConcurrentMode=h,z.unstable_Profiler=y;var B={default:z},L=B&&z||B,Y=L.default||L,J=function(){},X="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",G={};J=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var K=function(e,t,r,n,o){for(var a in e)if(e.hasOwnProperty(a)){var i;try{if("function"!=typeof e[a]){var u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](t,a,n,r,null,X)}catch(e){i=e}if(!i||i instanceof Error||J((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in G)){G[i.message]=!0;var l=o?o():"";J("Failed "+r+" type: "+i.message+(null!=l?l:""))}}},Q=o(function(e){"production"!==n.NODE_ENV&&function(){var t=l,r=K,n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,f=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,h="function"==typeof Symbol&&Symbol.iterator,b="@@iterator";function g(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e[b];return"function"==typeof t?t:null}var _=function(){};function w(e,t,r,n,o,a,i,u){if(_(t),!e){var l=void 0;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,a,i,u],f=0;(l=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}_=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")};var k=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=0,a="Warning: "+e.replace(/%s/g,function(){return r[o++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(n))}},S=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(n.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=n.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 n[i++]});throw new Error(u)}catch(e){}}},P={};function x(e,t){var r=e.constructor,n=r&&(r.displayName||r.name)||"ReactClass",o=n+"."+t;P[o]||(S(!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,n),P[o]=!0)}var j={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){x(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){x(e,"replaceState")},enqueueSetState:function(e,t,r,n){x(e,"setState")}},O={};function C(e,t,r){this.props=e,this.context=t,this.refs=O,this.updater=r||j}Object.freeze(O),C.prototype.isReactComponent={},C.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&w(!1,"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")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var R={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)."]},$=function(e,t){Object.defineProperty(C.prototype,e,{get:function(){k(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var E in R)R.hasOwnProperty(E)&&$(E,R[E]);function N(){}function T(e,t,r){this.props=e,this.context=t,this.refs=O,this.updater=r||j}N.prototype=C.prototype;var A=T.prototype=new N;A.constructor=T,t(A,C.prototype),A.isPureReactComponent=!0;var I={current:null,currentDispatcher:null},M=/^(.*)[\\\/]/,D=1;function F(e){if(null==e)return null;if("number"==typeof e.tag&&S(!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 p:return"ConcurrentMode";case i:return"Fragment";case a:return"Portal";case c:return"Profiler";case u:return"StrictMode";case y:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case s:return"Context.Consumer";case f:return"Context.Provider";case d:return n=e,o=e.render,l="ForwardRef",h=o.displayName||o.name||"",n.displayName||(""!==h?l+"("+h+")":l);case v:return F(e.type);case m:var t=(r=e)._status===D?r._result:null;if(t)return F(t)}var r,n,o,l,h;return null}var U={},q=null;function V(e){q=e}U.getCurrentStack=null,U.getStackAddendum=function(){var e="";if(q){var t=F(q.type),r=q._owner;e+=function(e,t,r){var n="";if(t){var o=t.fileName,a=o.replace(M,"");if(/^index\./.test(a)){var i=o.match(M);if(i){var u=i[1];u&&(a=u.replace(M,"")+"/"+a)}}n=" (at "+a+":"+t.lineNumber+")"}else r&&(n=" (created by "+r+")");return"\n in "+(e||"Unknown")+n}(t,q._source,r&&F(r.type))}var n=U.getCurrentStack;return n&&(e+=n()||""),e};var W={ReactCurrentOwner:I,assign:t};t(W,{ReactDebugCurrentFrame:U,ReactComponentTreeHook:{}});var H=function(e,t){if(!e){for(var r=W.ReactDebugCurrentFrame.getStackAddendum(),n=arguments.length,o=Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];S.apply(void 0,[!1,t+"%s"].concat(o,[r]))}},z=Object.prototype.hasOwnProperty,B={key:!0,ref:!0,__self:!0,__source:!0},L=void 0,Y=void 0;function J(e){if(z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function X(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var G=function(e,t,r,n,a,i,u){var l={$$typeof:o,type:e,key:t,ref:r,props:u,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Q(e,t,r){var n=void 0,o={},a=null,i=null,u=null,l=null;if(null!=t)for(n in J(t)&&(i=t.ref),X(t)&&(a=""+t.key),u=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)z.call(t,n)&&!B.hasOwnProperty(n)&&(o[n]=t[n]);var c=arguments.length-2;if(1===c)o.children=r;else if(c>1){for(var f=Array(c),s=0;s<c;s++)f[s]=arguments[s+2];Object.freeze&&Object.freeze(f),o.children=f}if(e&&e.defaultProps){var p=e.defaultProps;for(n in p)void 0===o[n]&&(o[n]=p[n])}if(a||i){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var r=function(){L||(L=!0,S(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,d),i&&function(e,t){var r=function(){Y||(Y=!0,S(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(o,d)}return G(e,a,i,u,l,I.current,o)}function Z(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var ee=".",te=":";var re=!1,ne=/\/+/g;function oe(e){return(""+e).replace(ne,"$&/")}var ae=10,ie=[];function ue(e,t,r,n){if(ie.length){var o=ie.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function le(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,ie.length<ae&&ie.push(e)}function ce(e,t,r){return null==e?0:function e(t,r,n,i){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return n(i,t,""===r?ee+fe(t,0):r),1;var c=void 0,f=0,s=""===r?ee:r+te;if(Array.isArray(t))for(var p=0;p<t.length;p++)f+=e(c=t[p],s+fe(c,p),n,i);else{var d=g(t);if("function"==typeof d){d===t.entries&&(re||H(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),re=!0);for(var y=d.call(t),v=void 0,m=0;!(v=y.next()).done;)f+=e(c=v.value,s+fe(c,m++),n,i)}else if("object"===u){var h;h=" If you meant to render a collection of children, use an array instead."+U.getStackAddendum();var b=""+t;w(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===b?"object with keys {"+Object.keys(t).join(", ")+"}":b,h)}}return f}(e,"",t,r)}function fe(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=e.key,n={"=":"=0",":":"=2"},"$"+(""+r).replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function se(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function pe(e,t,r){var n,o,a=e.result,i=e.keyPrefix,u=e.func,l=e.context,c=u.call(l,t,e.count++);Array.isArray(c)?de(c,a,r,function(e){return e}):null!=c&&(Z(c)&&(n=c,o=i+(!c.key||t&&t.key===c.key?"":oe(c.key)+"/")+r,c=G(n.type,o,n.ref,n._self,n._source,n._owner,n.props)),a.push(c))}function de(e,t,r,n,o){var a="";null!=r&&(a=oe(r)+"/");var i=ue(t,a,n,o);ce(e,pe,i),le(i)}function ye(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===c||e===u||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===f||e.$$typeof===s||e.$$typeof===d)}var ve=void 0;function me(){if(I.current){var e=F(I.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ve=!1;var he={};function be(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=me();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!he[r]){he[r]=!0;var n="";e&&e._owner&&e._owner!==I.current&&(n=" It was passed a child from "+F(e._owner.type)+"."),V(e),H(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',r,n),V(null)}}}function ge(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];Z(n)&&be(n,t)}else if(Z(e))e._store&&(e._store.validated=!0);else if(e){var o=g(e);if("function"==typeof o&&o!==e.entries)for(var a=o.call(e),i=void 0;!(i=a.next()).done;)Z(i.value)&&be(i.value,t)}}function _e(e){var t=e.type,n=void 0,o=void 0;if("function"==typeof t)n=t.displayName||t.name,o=t.propTypes;else{if("object"!=typeof t||null===t||t.$$typeof!==d)return;var a=t.render.displayName||t.render.name||"";n=t.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef"),o=t.propTypes}o?(V(e),r(o,e.props,"prop",n,U.getStackAddendum),V(null)):void 0===t.PropTypes||ve||(ve=!0,S(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||S(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}function we(e,t,r){var n=ye(e);if(!n){var a="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var u=function(e){if(null!=e&&void 0!==e.__source){var t=e.__source;return"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+"."}return""}(t);a+=u||me();var l=void 0;null===e?l="null":Array.isArray(e)?l="array":void 0!==e&&e.$$typeof===o?(l="<"+(F(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,H(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var c=Q.apply(this,arguments);if(null==c)return c;if(n)for(var f=2;f<arguments.length;f++)ge(arguments[f],e);return e===i?function(e){V(e);for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){H(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n);break}}null!==e.ref&&H(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),V(null)}(c):_e(c),c}var ke={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return de(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;var n=ue(null,null,t,r);ce(e,se,n),le(n)},count:function(e){return ce(e,function(){return null},null)},toArray:function(e){var t=[];return de(e,t,null,function(e){return e}),t},only:function(e){return Z(e)||w(!1,"React.Children.only expected to receive a single React element child."),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:C,PureComponent:T,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&S(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};r.Provider={$$typeof:f,_context:r};var n=!1,o=!1,a={$$typeof:s,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(a,{Provider:{get:function(){return o||(o=!0,H(!1,"Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,H(!1,"Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=a,r._currentRenderer=null,r._currentRenderer2=null,r},forwardRef:function(e){return null!=e&&e.$$typeof===v?S(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?S(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&S(!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)&&S(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:d,render:e}},lazy:function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return ye(e)||S(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:v,type:e,compare:void 0===t?null:t}},Fragment:i,StrictMode:u,Suspense:y,createElement:we,cloneElement:function(e,r,n){for(var o=function(e,r,n){null==e&&w(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",e);var o=void 0,a=t({},e.props),i=e.key,u=e.ref,l=e._self,c=e._source,f=e._owner;if(null!=r){J(r)&&(u=r.ref,f=I.current),X(r)&&(i=""+r.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),r)z.call(r,o)&&!B.hasOwnProperty(o)&&(void 0===r[o]&&void 0!==s?a[o]=s[o]:a[o]=r[o])}var p=arguments.length-2;if(1===p)a.children=n;else if(p>1){for(var d=Array(p),y=0;y<p;y++)d[y]=arguments[y+2];a.children=d}return G(e.type,i,u,l,c,f,a)}.apply(this,arguments),a=2;a<arguments.length;a++)ge(arguments[a],o.type);return _e(o),o},createFactory:function(e){var t=we.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return k(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:Z,version:"16.6.3",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:W};ke.unstable_ConcurrentMode=p,ke.unstable_Profiler=c;var Se=Object.freeze({default:ke}),Pe=Se&&ke||Se,xe=Pe.default||Pe;e.exports=xe}()}),Z=o(function(e){"production"===n.NODE_ENV?e.exports=Y:e.exports=Q}),ee=Z.Component;o(function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var u in o)t.call(o,u)&&o[u]&&e.push(u)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()});const te="/Users/logan/Dev/interface/apps/clock/tile/tile.js",re=234,ne=218;var oe=function(e,t){return{x:e*Math.cos(t),y:e*Math.sin(t)}};class ae extends ee{constructor(e){super(e),this.animate=this.animate.bind(this),this.hourHand=this.hourHand.bind(this),this.minuteHand=this.minuteHand.bind(this),this.secondHand=this.secondHand.bind(this)}componentDidMount(){this.animate()}dodecagon(e){for(var t=[],r=0;r<12;r++){var n=r*(Math.PI/6),o=oe(ne/2,n);o.x+=ne/2,o.y+=ne/2,t[r]=o}e.fillStyle="white",e.beginPath(),e.moveTo(t[0].x,t[0].y);for(r=1;r<t.length;r++)e.lineTo(t[r].x,t[r].y);e.closePath(),e.fill()}hourHand(e,t){var r=t.getMinutes()+60*t.getHours();e.fillStyle="black",e.beginPath(),e.arc(ne/2,ne/2,5,0,2*Math.PI),e.fill(),e.strokeStyle="black",e.beginPath(),e.moveTo(ne/2,ne/2);var n=Math.PI/-2+2*Math.PI/720*r,o=oe(.22*ne,n);o.x+=ne/2,o.y+=ne/2,e.lineTo(o.x,o.y),e.stroke()}minuteHand(e,t){var r=t.getSeconds()+60*t.getMinutes();e.strokeStyle="black",e.beginPath(),e.moveTo(ne/2,ne/2);var n=Math.PI/-2+2*Math.PI/3600*r,o=oe(.35*ne,n);o.x+=ne/2,o.y+=ne/2,e.lineTo(o.x,o.y),e.stroke()}secondHand(e,t){var r=t.getSeconds();let n={x:ne/2,y:.75*ne};e.fillStyle="red",e.beginPath(),e.arc(n.x,n.y,5,0,2*Math.PI),e.fill(),e.strokeStyle="red",e.beginPath();var o=Math.PI/-2+2*Math.PI/60*r,a=oe(30,o),i=oe(-10,o);a.x+=n.x,a.y+=n.y,i.x+=n.x,i.y+=n.y,e.moveTo(i.x,i.y),e.lineTo(a.x,a.y),e.stroke()}animate(){var e=new Date,t=document.getElementById("clock-canvas"),r=t.getContext("2d");r.clearRect(0,0,t.width,t.height),r.save(),r.translate(.5,.5),this.dodecagon(r),this.secondHand(r,e),this.hourHand(r,e),this.minuteHand(r,e),r.restore(),window.requestAnimationFrame(this.animate)}render(){return Z.createElement("div",{__self:this,__source:{fileName:te,lineNumber:138}},Z.createElement("canvas",{id:"clock-canvas",width:ne,height:ne,__self:this,__source:{fileName:te,lineNumber:139}}))}}class ie extends ee{constructor(e){super(e)}renderWrapper(e){return Z.createElement("div",{className:"pa2",style:{width:re,height:re,background:"#1a1a1a"},__self:this,__source:{fileName:te,lineNumber:152}},e)}render(){this.props.data&&this.props.data;return this.renderWrapper(Z.createElement(ae,{__self:this,__source:{fileName:te,lineNumber:166}}))}}return window.clockTile=ie,ie}); |