You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
11 KiB
2 lines
11 KiB
var n,l,u,t,i,o,r,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function v(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d(l,f,i,o,null)}function d(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function _(n){return n.children}function x(n,l){this.props=n,this.context=l}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__d||u.__e;return"function"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function g(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!m.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(m)}function m(){var n,l,u,t,o,r,e,c,s;for(i.sort(f);n=i.shift();)n.__d&&(l=i.length,t=void 0,o=void 0,r=void 0,c=(e=(u=n).__v).__e,(s=u.__P)&&(t=[],o=[],(r=v({},e)).__v=e.__v+1,T(s,e,r,u.__n,void 0!==s.ownerSVGElement,null!=e.__h?[c]:null,t,null==c?k(e):c,e.__h,o),j(t,e,o),e.__e!=c&&b(e)),i.length>l&&i.sort(f));m.__r=0}function w(n,l,u,t,i,o,r,f,e,a,v){var h,y,x,b,g,m,w,S,A,D=0,H=t&&t.__k||s,I=H.length,j=I,z=l.length;for(u.__k=[],h=0;h<z;h++)null!=(b=u.__k[h]=null==(b=l[h])||"boolean"==typeof b||"function"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?d(null,b,null,null,b):p(b)?d(_,{children:b},null,null,null):b.__b>0?d(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)?(b.__=u,b.__b=u.__b+1,-1===(S=C(b,H,w=h+D,j))?x=c:(x=H[S]||c,H[S]=void 0,j--),T(n,b,x,i,o,r,f,e,a,v),g=b.__e,(y=b.ref)&&x.ref!=y&&(x.ref&&L(x.ref,null,b),v.push(y,b.__c||g,b)),null!=g&&(null==m&&(m=g),(A=x===c||null===x.__v)?-1==S&&D--:S!==w&&(S===w+1?D++:S>w?j>z-w?D+=S-w:D--:D=S<w&&S==w-1?S-w:0),w=h+D,"function"!=typeof b.type||S===w&&x.__k!==b.__k?"function"==typeof b.type||S===w&&!A?void 0!==b.__d?(e=b.__d,b.__d=void 0):e=g.nextSibling:e=$(n,g,e):e=P(b,e,n),"function"==typeof u.type&&(u.__d=e))):(x=H[h])&&null==x.key&&x.__e&&(x.__e==e&&(x.__=t,e=k(x)),M(x,x,!1),H[h]=null);for(u.__e=m,h=I;h--;)null!=H[h]&&("function"==typeof u.type&&null!=H[h].__e&&H[h].__e==u.__d&&(u.__d=H[h].__e.nextSibling),M(H[h],H[h]))}function P(n,l,u){for(var t,i=n.__k,o=0;i&&o<i.length;o++)(t=i[o])&&(t.__=n,l="function"==typeof t.type?P(t,l,u):$(u,t.__e,l));return l}function $(n,l,u){return null==u||u.parentNode!==n?n.insertBefore(l,null):l==u&&null!=l.parentNode||n.insertBefore(l,u),l.nextSibling}function C(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&i==e.key&&o===e.type)return f;f++}}return-1}function S(n,l,u,t,i){var o;for(o in u)"children"===o||"key"===o||o in l||D(n,o,null,u[o],t);for(o in l)i&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||D(n,o,l[o],u[o],t)}function A(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a.test(l)?u:u+"px"}function D(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||A(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||A(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/,"$1")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?I:H,o)):n.removeEventListener(l,o?I:H,o);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&"role"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u))}}function H(n){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l.event?l.event(n):n)}function I(n){return this.l[n.type+!0](l.event?l.event(n):n)}function T(n,u,t,i,o,r,f,e,c,s){var a,h,y,d,k,b,g,m,P,$,C,S,A,D,H,I=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,e=u.__e=t.__e,u.__h=null,r=[e]),(a=l.__b)&&a(u);n:if("function"==typeof I)try{if(m=u.props,P=(a=I.contextType)&&i[a.__c],$=a?P?P.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:("prototype"in I&&I.prototype.render?u.__c=h=new I(m,$):(u.__c=h=new x(m,$),h.constructor=I,h.render=N),P&&P.sub(h),h.props=m,h.state||(h.state={}),h.context=$,h.__n=i,y=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=I.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=v({},h.__s)),v(h.__s,I.getDerivedStateFromProps(m,h.__s))),d=h.props,k=h.state,h.__v=u,y)null==I.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==I.getDerivedStateFromProps&&m!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,$),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,$)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,$),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,k,b)})}if(h.context=$,h.props=m,h.__P=n,h.__e=!1,S=l.__r,A=0,"prototype"in I&&I.prototype.render){for(h.state=h.__s,h.__d=!1,S&&S(u),a=h.render(h.props,h.state,h.context),D=0;D<h._sb.length;D++)h.__h.push(h._sb[D]);h._sb=[]}else do{h.__d=!1,S&&S(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=v(v({},i),h.getChildContext())),y||null==h.getSnapshotBeforeUpdate||(b=h.getSnapshotBeforeUpdate(d,k)),w(n,p(H=null!=a&&a.type===_&&null==a.key?a.props.children:a)?H:[H],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),g&&(h.__E=h.__=null)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){for(var i=0;i<t.length;i++)L(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function z(l,u,t,i,o,r,f,e,s){var a,v,y,d=t.props,_=u.props,x=u.type,b=0;if("svg"===x&&(o=!0),null!=r)for(;b<r.length;b++)if((a=r[b])&&"setAttribute"in a==!!x&&(x?a.localName===x:3===a.nodeType)){l=a,r[b]=null;break}if(null==l){if(null===x)return document.createTextNode(_);l=o?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,_.is&&_),r=null,e=!1}if(null===x)d===_||e&&l.data===_||(l.data=_);else{if(r=r&&n.call(l.childNodes),v=(d=t.props||c).dangerouslySetInnerHTML,y=_.dangerouslySetInnerHTML,!e){if(null!=r)for(d={},b=0;b<l.attributes.length;b++)d[l.attributes[b].name]=l.attributes[b].value;(y||v)&&(y&&(v&&y.__html==v.__html||y.__html===l.innerHTML)||(l.innerHTML=y&&y.__html||""))}if(S(l,_,d,o,e),y)u.__k=[];else if(w(l,p(b=u.props.children)?b:[b],u,t,i,o&&"foreignObject"!==x,r,f,r?r[0]:t.__k&&k(t,0),e,s),null!=r)for(b=r.length;b--;)null!=r[b]&&h(r[b]);e||("value"in _&&void 0!==(b=_.value)&&(b!==l.value||"progress"===x&&!b||"option"===x&&b!==d.value)&&D(l,"value",b,d.value,!1),"checked"in _&&void 0!==(b=_.checked)&&b!==l.checked&&D(l,"checked",b,d.checked,!1))}return l}function L(n,u,t){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function M(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||L(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null,n.__c=void 0}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&M(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||h(n.__e),n.__=n.__e=n.__d=void 0}function N(n,l,u){return this.constructor(n,u)}function O(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],T(t,u=(!o&&i||t).__k=y(_,null,[u]),r||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j(f,u,e)}n=s.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof n&&(n=n(v({},u),this.props)),n&&v(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),g(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),g(this))},x.prototype.render=_,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},m.__r=0,e=0,exports.Component=x,exports.Fragment=_,exports.cloneElement=function(l,u,t){var i,o,r,f,e=v({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)},exports.createContext=function(n,l){var u={__c:l="__cC"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,g(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},exports.createElement=y,exports.createRef=function(){return{current:null}},exports.h=y,exports.hydrate=function n(l,u){O(l,u,n)},exports.isValidElement=t,exports.options=l,exports.render=O,exports.toChildArray=function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(p(l)?l.some(function(l){n(l,u)}):u.push(l)),u};
|
|
//# sourceMappingURL=preact.js.map
|
|
|