Files
tekelanew_acs/acs/nladmin-ui/node_modules/preact/dist/preact.umd.js
2024-12-05 09:33:18 +08:00

3 lines
11 KiB
JavaScript

!function(n,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports):"function"==typeof define&&define.amd?define(["exports"],l):l((n||self).preact={})}(this,function(n){var l,t,u,i,e,o,f,r,c,s,h,a,p=65536,y=1<<17,v=void 0,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(n,l){for(var t in l)n[t]=l[t];return n}function m(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(n,t,u){var i,e,o,f={};for(o in t)"key"==o?i=t[o]:"ref"==o?e=t[o]:f[o]=t[o];if(arguments.length>2&&(f.children=arguments.length>3?l.call(arguments,2):u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)f[o]===v&&(f[o]=n.defaultProps[o]);return x(n,f,i,e,null)}function x(n,l,i,e,o){var f={type:n,props:l,key:i,ref:e,__k:null,__:null,__b:0,__e:null,__d:v,__c:null,constructor:v,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=t.vnode&&t.vnode(f),f}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function M(n,l){if(null==l)return n.__?M(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?M(n):null}function P(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return P(n)}}function T(n){(!n.__d&&(n.__d=!0)&&e.push(n)&&!$.__r++||o!==t.debounceRendering)&&((o=t.debounceRendering)||f)($)}function $(){var n,l,u,i,o,f,c,s;for(e.sort(r);n=e.shift();)n.__d&&(l=e.length,i=void 0,f=(o=(u=n).__v).__e,c=[],s=[],u.__P&&((i=b({},o)).__v=o.__v+1,t.vnode&&t.vnode(i),z(u.__P,i,o,u.__n,u.__P.namespaceURI,32&o.__u?[f]:null,c,null==f?M(o):f,!!(32&o.__u),s),i.__v=o.__v,i.__.__k[i.__i]=i,E(c,i,s),i.__e!=f&&P(i)),e.length>l&&e.sort(r));$.__r=0}function I(n,l,t,u,i,e,o,f,r,c,s){var h,a,y,_,g,b=u&&u.__k||w,m=l.length;for(t.__d=r,H(t,l,b),r=t.__d,h=0;h<m;h++)null!=(y=t.__k[h])&&(a=-1===y.__i?d:b[y.__i]||d,y.__i=h,z(n,y,a,i,e,o,f,r,c,s),_=y.__e,y.ref&&a.ref!=y.ref&&(a.ref&&V(a.ref,null,y),s.push(y.ref,y.__c||_,y)),null==g&&null!=_&&(g=_),y.__u&p||a.__k===y.__k?r=L(y,r,n):"function"==typeof y.type&&y.__d!==v?r=y.__d:_&&(r=_.nextSibling),y.__d=v,y.__u&=-196609);t.__d=r,t.__e=g}function H(n,l,t){var u,i,e,o,f,r=l.length,c=t.length,s=c,h=0;for(n.__k=[],u=0;u<r;u++)null!=(i=l[u])&&"boolean"!=typeof i&&"function"!=typeof i?(o=u+h,(i=n.__k[u]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?x(null,i,null,null,null):g(i)?x(S,{children:i},null,null,null):i.constructor===v&&i.__b>0?x(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=n,i.__b=n.__b+1,e=null,-1!==(f=i.__i=j(i,t,o,s))&&(s--,(e=t[f])&&(e.__u|=y)),null==e||null===e.__v?(-1==f&&h--,"function"!=typeof i.type&&(i.__u|=p)):f!==o&&(f==o-1?h--:f==o+1?h++:(f>o?h--:h++,i.__u|=p))):i=n.__k[u]=null;if(s)for(u=0;u<c;u++)null!=(e=t[u])&&0==(e.__u&y)&&(e.__e==n.__d&&(n.__d=M(e)),q(e,e))}function L(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=L(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=M(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function j(n,l,t,u){var i=n.key,e=n.type,o=t-1,f=t+1,r=l[t];if(null===r||r&&i==r.key&&e===r.type&&0==(r.__u&y))return t;if(("function"!=typeof e||e===S||i)&&u>(null!=r&&0==(r.__u&y)?1:0))for(;o>=0||f<l.length;){if(o>=0){if((r=l[o])&&0==(r.__u&y)&&i==r.key&&e===r.type)return o;o--}if(f<l.length){if((r=l[f])&&0==(r.__u&y)&&i==r.key&&e===r.type)return f;f++}}return-1}function A(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||_.test(l)?t:t+"px"}function F(n,l,t,u,i){var e;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||A(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||A(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])e=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+e]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,e?h:s,e)):n.removeEventListener(l,e?h:s,e);else{if("http://www.w3.org/2000/svg"==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&&"popover"!=l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function O(n){return function(l){if(this.l){var u=this.l[l.type+n];if(null==l.u)l.u=c++;else if(l.u<u.t)return;return t.event&&(l=t.event(l)),"handleEvent"in u?u.handleEvent(l):u(l)}}}function z(n,l,u,i,e,o,f,r,c,s){var h,a,p,y,d,w,_,m,k,x,M,P,T,$,H,L,j=l.type;if(l.constructor!==v)return null;128&u.__u&&(c=!!(32&u.__u),o=[r=l.__e=u.__e]),(h=t.__b)&&h(l);n:if("function"==typeof j)try{if(m=l.props,k="prototype"in j&&j.prototype.render,x=(h=j.contextType)&&i[h.__c],M=h?x?x.props.value:h.__:i,u.__c?_=(a=l.__c=u.__c).__=a.__E:(k?l.__c=a=new j(m,M):(l.__c=a=new C(m,M),a.constructor=j,a.render=B),x&&x.sub(a),a.props=m,a.state||(a.state={}),a.context=M,a.__n=i,p=a.__d=!0,a.__h=[],a._sb=[]),k&&null==a.__s&&(a.__s=a.state),k&&null!=j.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=b({},a.__s)),b(a.__s,j.getDerivedStateFromProps(m,a.__s))),y=a.props,d=a.state,a.__v=l,p)k&&null==j.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),k&&null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(k&&null==j.getDerivedStateFromProps&&m!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,M),!a.__e&&(null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,M)||l.__v===u.__v)){for(l.__v!==u.__v&&(a.props=m,a.state=a.__s,a.__d=!1),l.__e=u.__e,l.__k=u.__k,l.__k.some(function(n){n&&(n.__=l)}),P=0;P<a._sb.length;P++)a.__h.push(a._sb[P]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(m,a.__s,M),k&&null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,d,w)})}if(a.context=M,a.props=m,a.__P=n,a.__e=!1,T=t.__r,$=0,k){for(a.state=a.__s,a.__d=!1,T&&T(l),h=a.render(a.props,a.state,a.context),H=0;H<a._sb.length;H++)a.__h.push(a._sb[H]);a._sb=[]}else do{a.__d=!1,T&&T(l),h=a.render(a.props,a.state,a.context),a.state=a.__s}while(a.__d&&++$<25);a.state=a.__s,null!=a.getChildContext&&(i=b(b({},i),a.getChildContext())),k&&!p&&null!=a.getSnapshotBeforeUpdate&&(w=a.getSnapshotBeforeUpdate(y,d)),I(n,g(L=null!=h&&h.type===S&&null==h.key?h.props.children:h)?L:[L],l,u,i,e,o,f,r,c,s),a.base=l.__e,l.__u&=-161,a.__h.length&&f.push(a),_&&(a.__E=a.__=null)}catch(n){if(l.__v=null,c||null!=o){for(l.__u|=c?160:128;r&&8===r.nodeType&&r.nextSibling;)r=r.nextSibling;o[o.indexOf(r)]=null,l.__e=r}else l.__e=u.__e,l.__k=u.__k;t.__e(n,l,u)}else null==o&&l.__v===u.__v?(l.__k=u.__k,l.__e=u.__e):l.__e=N(u.__e,l,u,i,e,o,f,c,s);(h=t.diffed)&&h(l)}function E(n,l,u){l.__d=v;for(var i=0;i<u.length;i++)V(u[i],u[++i],u[++i]);t.__c&&t.__c(l,n),n.some(function(l){try{n=l.__h,l.__h=[],n.some(function(n){n.call(l)})}catch(n){t.__e(n,l.__v)}})}function N(n,u,i,e,o,f,r,c,s){var h,a,p,y,w,_,b,k=i.props,x=u.props,S=u.type;if("svg"===S?o="http://www.w3.org/2000/svg":"math"===S?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=f)for(h=0;h<f.length;h++)if((w=f[h])&&"setAttribute"in w==!!S&&(S?w.localName===S:3===w.nodeType)){n=w,f[h]=null;break}if(null==n){if(null===S)return document.createTextNode(x);n=document.createElementNS(o,S,x.is&&x),c&&(t.__m&&t.__m(u,f),c=!1),f=null}if(null===S)k===x||c&&n.data===x||(n.data=x);else{if(f=f&&l.call(n.childNodes),k=i.props||d,!c&&null!=f)for(k={},h=0;h<n.attributes.length;h++)k[(w=n.attributes[h]).name]=w.value;for(h in k)if(w=k[h],"children"==h);else if("dangerouslySetInnerHTML"==h)p=w;else if(!(h in x)){if("value"==h&&"defaultValue"in x||"checked"==h&&"defaultChecked"in x)continue;F(n,h,null,w,o)}for(h in x)w=x[h],"children"==h?y=w:"dangerouslySetInnerHTML"==h?a=w:"value"==h?_=w:"checked"==h?b=w:c&&"function"!=typeof w||k[h]===w||F(n,h,w,k[h],o);if(a)c||p&&(a.__html===p.__html||a.__html===n.innerHTML)||(n.innerHTML=a.__html),u.__k=[];else if(p&&(n.innerHTML=""),I(n,g(y)?y:[y],u,i,e,"foreignObject"===S?"http://www.w3.org/1999/xhtml":o,f,r,f?f[0]:i.__k&&M(i,0),c,s),null!=f)for(h=f.length;h--;)m(f[h]);c||(h="value","progress"===S&&null==_?n.removeAttribute("value"):_!==v&&(_!==n[h]||"progress"===S&&!_||"option"===S&&_!==k[h])&&F(n,h,_,k[h],o),h="checked",b!==v&&b!==n[h]&&F(n,h,b,k[h],o))}return n}function V(n,l,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==l||(n.__u=n(l))}else n.current=l}catch(n){t.__e(n,u)}}function q(n,l,u){var i,e;if(t.unmount&&t.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(i,null,l)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){t.__e(n,l)}i.base=i.__P=null}if(i=n.__k)for(e=0;e<i.length;e++)i[e]&&q(i[e],l,u||"function"!=typeof n.type);u||m(n.__e),n.__c=n.__=n.__e=n.__d=v}function B(n,l,t){return this.constructor(n,t)}function D(n,u,i){var e,o,f,r;t.__&&t.__(n,u),o=(e="function"==typeof i)?null:i&&i.__k||u.__k,f=[],r=[],z(u,n=(!e&&i||u).__k=k(S,null,[n]),o||d,d,u.namespaceURI,!e&&i?[i]:o?null:u.firstChild?l.call(u.childNodes):null,f,!e&&i?i:o?o.__e:u.firstChild,e,r),E(f,n,r)}l=w.slice,t={__e:function(n,l,t,u){for(var i,e,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((e=i.constructor)&&null!=e.getDerivedStateFromError&&(i.setState(e.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&n.constructor==v},C.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof n&&(n=n(b({},t),this.props)),n&&b(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),T(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),T(this))},C.prototype.render=S,e=[],f="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,c=0,s=O(!1),h=O(!0),a=0,n.Component=C,n.Fragment=S,n.cloneElement=function(n,t,u){var i,e,o,f,r=b({},n.props);for(o in n.type&&n.type.defaultProps&&(f=n.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?e=t[o]:r[o]=t[o]===v&&f!==v?f[o]:t[o];return arguments.length>2&&(r.children=arguments.length>3?l.call(arguments,2):u),x(n.type,r,i||n.key,e||n.ref,null)},n.createContext=function(n,l){var t={__c:l="__cC"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,T(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t},n.createElement=k,n.createRef=function(){return{current:null}},n.h=k,n.hydrate=function n(l,t){D(l,t,n)},n.isValidElement=i,n.options=t,n.render=D,n.toChildArray=function n(l,t){return t=t||[],null==l||"boolean"==typeof l||(g(l)?l.some(function(l){n(l,t)}):t.push(l)),t}});
//# sourceMappingURL=preact.umd.js.map