able-baker/bundled/preact/compat.js

3 lines
24 KiB
JavaScript
Raw Permalink Normal View History

2024-05-14 17:17:10 -04:00
///<reference types="https://esm.sh/v128/preact@10.20.2/compat/src/index.d.ts"/>
2024-05-15 09:19:10 -04:00
var T,d,Q,x,q,X,I,G,$,O,Y,E={},Z=[],ie=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,A=Array.isArray;function b(_,e){for(var t in e)_[t]=e[t];return _}function ee(_){var e=_.parentNode;e&&e.removeChild(_)}function le(_,e,t){var i,o2,r2,l2={};for(r2 in e)r2=="key"?i=e[r2]:r2=="ref"?o2=e[r2]:l2[r2]=e[r2];if(arguments.length>2&&(l2.children=arguments.length>3?T.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r2 in _.defaultProps)l2[r2]===void 0&&(l2[r2]=_.defaultProps[r2]);return w(_,l2,i,o2,null)}function w(_,e,t,i,o2){var r2={type:_,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o2??++Q,__i:-1,__u:0};return o2==null&&d.vnode!=null&&d.vnode(r2),r2}function he(){return{current:null}}function H(_){return _.children}function M(_,e){this.props=_,this.context=e}function P(_,e){if(e==null)return _.__?P(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?P(_):null}function _e(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return _e(_)}}function R(_){(!_.__d&&(_.__d=true)&&x.push(_)&&!W.__r++||q!==d.debounceRendering)&&((q=d.debounceRendering)||X)(W)}function W(){var _,e,t,i,o2,r2,l2,s;for(x.sort(I);_=x.shift();)_.__d&&(e=x.length,i=void 0,r2=(o2=(t=_).__v).__e,l2=[],s=[],t.__P&&((i=b({},o2)).__v=o2.__v+1,d.vnode&&d.vnode(i),V(t.__P,i,o2,t.__n,t.__P.ownerSVGElement!==void 0,32&o2.__u?[r2]:null,l2,r2??P(o2),!!(32&o2.__u),s),i.__v=o2.__v,i.__.__k[i.__i]=i,oe(l2,i,s),i.__e!=r2&&_e(i)),x.length>e&&x.sort(I));W.__r=0}function te(_,e,t,i,o2,r2,l2,s,f,u,p2){var n,m,c2,h2,k2,v2=i&&i.__k||Z,a=e.length;for(t.__d=f,se(t,e,v2),f=t.__d,n=0;n<a;n++)(c2=t.__k[n])!=null&&typeof c2!="boolean"&&typeof c2!="function"&&(m=c2.__i===-1?E:v2[c2.__i]||E,c2.__i=n,V(_,c2,m,o2,r2,l2,s,f,u,p2),h2=c2.__e,c2.ref&&m.ref!=c2.ref&&(m.ref&&j(m.ref,null,c2),p2.push(c2.ref,c2.__c||h2,c2)),k2==null&&h2!=null&&(k2=h2),65536&c2.__u||m.__k===c2.__k?(f&&!f.isConnected&&(f=P(m)),f=ne(c2,f,_)):typeof c2.type=="function"&&c2.__d!==void 0?f=c2.__d:h2&&(f=h2.nextSibling),c2.__d=void 0,c2.__u&=-196609);t.__d=f,t.__e=k2}function se(_,e,t){var i,o2,r2,l2,s,f=e.length,u=t.length,p2=u,n=0;for(_.__k=[],i=0;i<f;i++)l2=i+n,(o2=_.__k[i]=(o2=e[i])==null||typeof o2=="boolean"||typeof o2=="function"?null:typeof o2=="string"||typeof o2=="number"||typeof o2=="bigint"||o2.constructor==String?w(null,o2,null,null,null):A(o2)?w(H,{children:o2},null,null,null):o2.constructor===void 0&&o2.__b>0?w(o2.type,o2.props,o2.key,o2.ref?o2.ref:null,o2.__v):o2)!=null?(o2.__=_,o2.__b=_.__b+1,s=ce(o2,t,l2,p2),o2.__i=s,r2=null,s!==-1&&(p2--,(r2=t[s])&&(r2.__u|=131072)),r2==null||r2.__v===null?(s==-1&&n--,typeof o2.type!="function"&&(o2.__u|=65536)):s!==l2&&(s===l2+1?n++:s>l2?p2>f-l2?n+=s-l2:n--:s<l2?s==l2-1&&(n=s-l2):n=0,s!==i+n&&(o2.__u|=65536))):(r2=t[l2])&&r2.key==null&&r2.__e&&!(131072&r2.__u)&&(r2.__e==_.__d&&(_.__d=P(r2)),B(r2,r2,false),t[l2]=null,p2--);if(p2)for(i=0;i<u;i++)(r2=t[i])!=null&&!(131072&r2.__u)&&(r2.__e==_.__d&&(_.__d=P(r2)),B(r2,r2))}function ne(_,e,t){var i,o2;if(typeof _.type=="function"){for(i=_.__k,o2=0;i&&o2<i.length;o2++)i[o2]&&(i[o2].__=_,e=ne(i[o2],e,t));return e}_.__e!=e&&(t.insertBefore(_.__e,e||null),e=_.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ue(_,e){return e=e||[],_==null||typeof _=="boolean"||(A(_)?_.some(function(t){ue(t,e)}):e.push(_)),e}function ce(_,e,t,i){var o2=_.key,r2=_.type,l2=t-1,s=t+1,f=e[t];if(f===null||f&&o2==f.key&&r2===f.type&&!(131072&f.__u))return t;if(i>(f!=null&&!(131072&f.__u)?1:0))for(;l2>=0||s<e.length;){if(l2>=0){if((f=e[l2])&&!(131072&f.__u)&&o2==f.key&&r2===f.type)return l2;l2--}if(s<e.length){if((f=e[s])&&!(131072&f.__u)&&o2==f.key&&r2===f.type)return s;s++}}return-1}function J(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||ie.test(e)?t:t+"px"}function L(_,e,t,i,o2){var r2;e:if(e==="style")if(typeof t=="string")