|
|
- /* Riot v4.5.0, @license MIT */
- (function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t():typeof define==="function"&&define.amd?define(t):(e=e||self,e.riot=t())})(this,function(){"use strict";const e=new Map,t=Symbol("riot-component"),r=new Set,n="is",i="value",s=Symbol("attributes"),a=Symbol("template");var o=Object.freeze({COMPONENTS_IMPLEMENTATION_MAP:e,DOM_COMPONENT_INSTANCE_PROPERTY:t,PLUGINS_SET:r,IS_DIRECTIVE:n,VALUE_ATTRIBUTE:i,ATTRIBUTES_KEY_SYMBOL:s,TEMPLATE_KEY_SYMBOL:a});function l(e){u(e.childNodes)}function u(e){Array.from(e).forEach(e=>e.parentNode&&e.parentNode.removeChild(e))}const c=0;const f=1;const h=2;const p=3;const d=4;var m={EACH:c,IF:f,SIMPLE:h,TAG:p,SLOT:d};function v(e){const t=e.dom.cloneNode(true);return{avoidDOMInjection:true,fragment:t,children:Array.from(t.childNodes)}}const{indexOf:g}=[];const y=(e,t,r,n,i,s)=>{const a="selectedIndex"in t;let o=a;while(n<i){const i=e(r[n],1);t.insertBefore(i,s);if(a&&o&&i.selected){o=!o;let{selectedIndex:e}=t;t.selectedIndex=e<0?n:g.call(t.querySelectorAll("option"),i)}n++}};const x=(e,t)=>e==t;const E=e=>e;const b=(e,t,r,n,i,s,a)=>{const o=s-i;if(o<1)return-1;while(r-t>=o){let o=t;let l=i;while(o<r&&l<s&&a(e[o],n[l])){o++;l++}if(l===s)return t;t=o+1}return-1};const S=(e,t,r,n,i,s)=>{while(n<i&&s(r[n],e[t-1])){n++;t--}return t===0};const D=(e,t,r,n,i)=>r<n?e(t[r],0):0<r?e(t[r-1],-0).nextSibling:i;const C=(e,t,r,n,i)=>{if(i-n<2)t.removeChild(e(r[n],-1));else{const s=t.ownerDocument.createRange();s.setStartBefore(e(r[n],-1));s.setEndAfter(e(r[i-1],-1));s.deleteContents()}};const w=-1;const A=1;const T=0;const k=50;const _=(e,t,r,n,i,s,a,o)=>{let l=0;let u=n<o?n:o;const c=Array(u++);const f=Array(u);f[0]=-1;for(let e=1;e<u;e++)f[e]=a;const h=new Map;for(let e=s;e<a;e++)h.set(i[e],e);for(let n=t;n<r;n++){const t=h.get(e[n]);if(t!=null){l=I(f,u,t);if(-1<l){f[l]=t;c[l]={newi:n,oldi:t,prev:c[l-1]}}}}l=--u;--a;while(f[l]>a)--l;u=o+n-l;const p=Array(u);let d=c[l];--r;while(d){const{newi:e,oldi:t}=d;while(r>e){p[--u]=A;--r}while(a>t){p[--u]=w;--a}p[--u]=T;--r;--a;d=d.prev}while(r>=t){p[--u]=A;--r}while(a>=s){p[--u]=w;--a}return p};const P=(e,t,r,n,i,s,a)=>{const o=r+s;const l=[];let u,c,f,h,p,d,m;e:for(u=0;u<=o;u++){if(u>k)return null;m=u-1;p=u?l[u-1]:[0,0];d=l[u]=[];for(c=-u;c<=u;c+=2){if(c===-u||c!==u&&p[m+c-1]<p[m+c+1]){h=p[m+c+1]}else{h=p[m+c-1]+1}f=h-c;while(h<s&&f<r&&a(n[i+h],e[t+f])){h++;f++}if(h===s&&f===r){break e}d[u+c]=h}}const v=Array(u/2+o/2);let g=v.length-1;for(u=l.length-1;u>=0;u--){while(h>0&&f>0&&a(n[i+h-1],e[t+f-1])){v[g--]=T;h--;f--}if(!u)break;m=u-1;p=u?l[u-1]:[0,0];c=h-f;if(c===-u||c!==u&&p[m+c-1]<p[m+c+1]){f--;v[g--]=A}else{h--;v[g--]=w}}return v};const F=(e,t,r,n,i,s,a,o,l)=>{const u=new Map;const c=e.length;let f=a;let h=0;while(h<c){switch(e[h++]){case T:i++;f++;break;case A:u.set(n[i],1);y(t,r,n,i++,i,f<o?t(s[f],0):l);break;case w:f++;break}}h=0;while(h<c){switch(e[h++]){case T:a++;break;case w:if(u.has(s[a]))a++;else C(t,r,s,a++,a);break}}};const I=(e,t,r)=>{let n=1;let i=t;while(n<i){const t=(n+i)/2>>>0;if(r<e[t])i=t;else n=t+1}return n};const M=(e,t,r,n,i,s,a,o,l,u,c,f,h)=>{F(P(r,n,s,a,o,u,f)||_(r,n,i,s,a,o,l,u),e,t,r,n,a,o,c,h)};const N=(e,t,r,n)=>{if(!n)n={};const i=n.compare||x;const s=n.node||E;const a=n.before==null?null:s(n.before,0);const o=t.length;let l=o;let u=0;let c=r.length;let f=0;while(u<l&&f<c&&i(t[u],r[f])){u++;f++}while(u<l&&f<c&&i(t[l-1],r[c-1])){l--;c--}const h=u===l;const p=f===c;if(h&&p)return r;if(h&&f<c){y(s,e,r,f,c,D(s,t,u,o,a));return r}if(p&&u<l){C(s,e,t,u,l);return r}const d=l-u;const m=c-f;let v=-1;if(d<m){v=b(r,f,c,t,u,l,i);if(-1<v){y(s,e,r,f,v,s(t[u],0));y(s,e,r,v+d,c,D(s,t,l,o,a));return r}}else if(m<d){v=b(t,u,l,r,f,c,i);if(-1<v){C(s,e,t,u,v);C(s,e,t,v+m,l);return r}}if(d<2||m<2){y(s,e,r,f,c,s(t[u],0));C(s,e,t,u,l);return r}if(d===m&&S(r,c,t,u,l,i)){y(s,e,r,f,c,D(s,t,l,o,a));return r}M(s,e,r,f,c,m,t,u,l,d,o,i,a);return r};function L(e){return e===null||e===undefined}function B(e){return!L(e.content)}const O=Object.seal({childrenMap:null,node:null,root:null,condition:null,evaluate:null,template:null,isT
- /*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
- * @license MIT
- */var ce=50;pe.TYPED_ARRAY_SUPPORT=Lt.TYPED_ARRAY_SUPPORT!==undefined?Lt.TYPED_ARRAY_SUPPORT:true;function fe(){return pe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(e,t){if(fe()<t){throw new RangeError("Invalid typed array length")}if(pe.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=pe.prototype}else{if(e===null){e=new pe(t)}e.length=t}return e}function pe(e,t,r){if(!pe.TYPED_ARRAY_SUPPORT&&!(this instanceof pe)){return new pe(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return ge(this,e)}return de(this,e,t,r)}pe.poolSize=8192;pe._augment=function(e){e.__proto__=pe.prototype;return e};function de(e,t,r,n){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return Ee(e,t,r,n)}if(typeof t==="string"){return ye(e,t,r)}return be(e,t)}pe.from=function(e,t,r){return de(null,e,t,r)};if(pe.TYPED_ARRAY_SUPPORT){pe.prototype.__proto__=Uint8Array.prototype;pe.__proto__=Uint8Array}function me(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}else if(e<0){throw new RangeError('"size" argument must not be negative')}}function ve(e,t,r,n){me(t);if(t<=0){return he(e,t)}if(r!==undefined){return typeof n==="string"?he(e,t).fill(r,n):he(e,t).fill(r)}return he(e,t)}pe.alloc=function(e,t,r){return ve(null,e,t,r)};function ge(e,t){me(t);e=he(e,t<0?0:Se(t)|0);if(!pe.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;++r){e[r]=0}}return e}pe.allocUnsafe=function(e){return ge(null,e)};pe.allocUnsafeSlow=function(e){return ge(null,e)};function ye(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!pe.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var n=Ce(t,r)|0;e=he(e,n);var i=e.write(t,r);if(i!==n){e=e.slice(0,i)}return e}function xe(e,t){var r=t.length<0?0:Se(t.length)|0;e=he(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function Ee(e,t,r,n){t.byteLength;if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(n||0)){throw new RangeError("'length' is out of bounds")}if(r===undefined&&n===undefined){t=new Uint8Array(t)}else if(n===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,n)}if(pe.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=pe.prototype}else{e=xe(e,t)}return e}function be(e,t){if(De(t)){var r=Se(t.length)|0;e=he(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||st(t.length)){return he(e,0)}return xe(e,t)}if(t.type==="Buffer"&&ue(t.data)){return xe(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Se(e){if(e>=fe()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+fe().toString(16)+" bytes")}return e|0}pe.isBuffer=at;function De(e){return!!(e!=null&&e._isBuffer)}pe.compare=function e(t,r){if(!De(t)||!De(r)){throw new TypeError("Arguments must be Buffers")}if(t===r)return 0;var n=t.length;var i=r.length;for(var s=0,a=Math.min(n,i);s<a;++s){if(t[s]!==r[s]){n=t[s];i=r[s];break}}if(n<i)return-1;if(i<n)return 1;return 0};pe.isEncoding=function e(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};pe.concat=function e(t,r){if(!ue(t)){throw new TypeError('"list" argument must be an Array of Buffers')}if(t.length===0){return pe.alloc(0)}var n;if(r===undefined){r=0;for(n=0;n<t.length;++n){r+=t[n].length}}var i=pe.allocUnsafe(r);var s=0;for(n=0;n<t.length;++n){var a=t[n];if(!De(a)){throw new TypeError('"list" argument must be an Array of Buffers')}a.copy(i,s);s+=a.length}return i};function Ce(e,t){if(De(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteL
|