| 1 | /* widget-sandbox version=0.6.0 protocol=1 profile=1 sdk=1 */ |
| 2 | "use strict";(()=>{var Fu=Object.create;var mr=Object.defineProperty;var Bu=Object.getOwnPropertyDescriptor;var Uu=Object.getOwnPropertyNames;var |
Preview is bounded. Use the raw download for the complete file.
| 3 | `)}})}var kr=100,ea=60,ta=" ";function na({source:e,line:t,column:n,baseLine:r,baseColumn:i},o){function s(d,g){return l.slice(d,g).map((T,b)=>String(d+b+1).padStart(h)+" |"+T).join(` |
| 4 | `)}let a=` |
| 5 | `.repeat(Math.max(r-1,0)),c=" ".repeat(Math.max(i-1,0)),l=(a+c+e).split(/\r\n?|\n|\f/),u=Math.max(1,t-o)-1,p=Math.min(t+o,l.length+1),h=Math.max(4,String(p).length)+1,f=0;n+=(ta.length-1)*(l[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>kr&&(f=n-ea+3,n=ea-2);for(let d=u;d<=p;d++)d>=0&&d<l.length&&(l[d]=l[d].replace(/\t/g,ta),l[d]=(f>0&&l[d].length>f?"\u2026":"")+l[d].substr(f,kr-2)+(l[d].length>f+kr-1?"\u2026":""));return[s(u,t),new Array(n+h+2).join("-")+"^",s(t,p)].filter(Boolean).join(` |
| 6 | `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function wr(e,t,n,r,i,o=1,s=1){return Object.assign(et("SyntaxError",e),{source:t,offset:n,line:r,column:i,sourceFragment(c){return na({source:t,line:r,column:i,baseLine:o,baseColumn:s},isNaN(c)?0:c)},get formattedMessage(){return`Parse error: ${e} |
| 7 | `+na({source:t,line:r,column:i,baseLine:o,baseColumn:s},2)}})}function ra(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(i===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),n=!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var mt=()=>{},Qu=33,Zu=35,vr=59,ia=123,oa=0,Ju={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},ep={createList(){return new F},createSingleNodeList(e){return new F().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};function tp(e){return function(){return this[e]()}}function Sr(e){let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function np(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Sr(e.atrule),pseudo:Sr(e.pseudo),node:Sr(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case"function":t.context[n]=r;break;case"string":t.context[n]=tp(r);break}return{config:t,...t,...t.node}}function sa(e){let t="",n="<unknown>",r=!1,i=mt,o=!1,s=new wn,a=Object.assign(new vn,np(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ra,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(u){return u===ia?1:0},consumeUntilLeftCurlyBracketOrSemicolon(u){return u===ia||u===vr?1:0},consumeUntilExclamationMarkOrSemicolon(u){return u===Qu||u===vr?1:0},consumeUntilSemicolonIncluded(u){return u===vr?2:0},createList:mt,createSingleNodeList:mt,getFirstListNode:mt,getLastListNode:mt,parseWithFallback(u,p){let h=this.tokenIndex;try{return u.call(this)}catch(f){if(o)throw f;this.skip(h-this.tokenIndex);let d=p.call(this);return o=!0,i(f,d),o=!1,d}},lookupNonWSType(u){let p;do if(p=this.lookupType(u++),p!==13&&p!==25)return p;while(p!==oa);return oa},charCodeAt(u){return u>=0&&u<t.length?t.charCodeAt(u):0},substring(u,p){return t.substring(u,p)},substrToCursor(u){return this.source.substring(u,this.tokenStart)},cmpChar(u,p){return Re(t,u,p)},cmpStr(u,p,h){return Ne(t,u,p,h)},consume(u){let p=this.tokenStart;return this.eat(u),this.substrToCursor(p)},consumeFunctionName(){let u=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),u},consumeNumber(u){let p=t.substring(this.tokenStart,Ze(t,this.tokenStart));return this.eat(u),p},eat(u){if(this.tokenType!==u){let p=ht[u].slice(0,-6).replace(/-/g," ").replace(/^./,d=>d.toUpperCase()),h=`${/[[\](){}]/.test(p)?`"${p}"`:p} is expected`,f=this.tokenStart;switch(u){case 1:this.tokenType===2||this.tokenType===7?(f=this.tokenEnd-1,h="Identifier is expected but function found"):h="Identifier is expected";break;case 4:this.isDelim(Zu)&&(this.next(),f++,h="Name is expected");break;case 11:this.tokenType===10&&(f=this.tokenEnd,h="Percent sign is expected");break}this.error(h,f)}this.next()},eatIdent(u){(this.tokenType!==1||this.lookupValue(0,u)===!1)&&this.error(`Identifier "${u}" is expected`),this.next()},eatDelim(u){this.isDelim(u)||this.error(`Delim "${String.fromCharCode(u)}" is expected`),this.next()},getLocation(u,p){return r?s.getLocationRange(u,p,n):null},getLocationFromList(u){if(r){let p=this.getFirstListNode(u),h=this.getLastListNode(u);return s.getLocationRange(p!==null?p.loc.start.offset-s.startOffset:this.tokenStart,h!==null?h.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(u,p){let h=typeof p<"u"&&p<t.length?s.getLocation(p):this.eof?s.getLocation(Ks(t,t.length-1)):s.getLocation(this.tokenStart);throw new wr(u||"Unexpected input",t,h.offset,h.line,h.column,s.startLine,s.startColumn)}}),c=()=>({filename:n,source:t,tokenCount:a.tokenCount,getTokenType:u=>a.getTokenType(u),getTokenTypeName:u=>ht[a.getToken |
| 8 | `,13,!0)},emit(c){i+=c},result(){return i}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=La(s)),r.mode in Ln&&(s.tokenBefore=Ln[r.mode]));let a={node:c=>s.node(c),children:Ap,token:(c,l)=>s.token(c,l),tokenize:c=>qe(c,(l,u,p)=>{s.token(l,c.slice(u,p),u!==0)})};return s.node(n),s.result()}}function Na(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof F)&&(n.children=new F().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof F&&(n.children=n.children.toArray())}}),t}}}var{hasOwnProperty:Nr}=Object.prototype,Mt=function(){};function Pa(e){return typeof e=="function"?e:Mt}function Oa(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function Ep(e,t){let n=t.structure,r=[];for(let i in n){if(Nr.call(n,i)===!1)continue;let o=n[i],s={name:i,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(let a of o)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function Lp(e){let t={};for(let n in e.node)if(Nr.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Ep(n,r)}return t}function za(e,t){let n=e.fields.slice(),r=e.context,i=typeof r=="string";return t&&n.reverse(),function(o,s,a,c){let l;i&&(l=s[r],s[r]=o);for(let u of n){let p=o[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return!0}else if(a(p))return!0}}i&&(s[r]=l)}}function Da({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}}}function Ma(e){let t=Lp(e),n={},r={},i=Symbol("break-walk"),o=Symbol("skip-node");for(let l in t)Nr.call(t,l)&&t[l]!==null&&(n[l]=za(t[l],!1),r[l]=za(t[l],!0));let s=Da(n),a=Da(r),c=function(l,u){function p(b,A,C){let _=h.call(T,b,A,C);return _===i?!0:_===o?!1:!!(d.hasOwnProperty(b.type)&&d[b.type](b,T,p,g)||f.call(T,b,A,C)===i)}let h=Mt,f=Mt,d=n,g=(b,A,C,_)=>b||p(A,C,_),T={break:i,skip:o,root:l,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Pa(u.enter),f=Pa(u.leave),u.reverse&&(d=r),u.visit)){if(s.hasOwnProperty(u.visit))d=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=Oa(h,u.visit),f=Oa(f,u.visit)}if(h===Mt&&f===Mt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(l)};return c.break=i,c.skip=o,c.find=function(l,u){let p=null;return c(l,function(h,f,d){if(u.call(this,h,f,d))return p=h,i}),p},c.findLast=function(l,u){let p=null;return c(l,{reverse:!0,enter(h,f,d){if(u.call(this,h,f,d))return p=h,i}}),p},c.findAll=function(l,u){let p=[];return c(l,function(h,f,d){u.call(this,h,f,d)&&p.push(h)}),p},c}function _p(e){return e}function Ip(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?"#?":"*":t===0&&n===1?"?":t===1&&n===0?r?"#":"+":t===1&&n===1?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(n!==0?n:"")+"}")}function Rp(e){if(e.type==="Range")return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}function Np(e,t,n,r){let i=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",o=e.terms.map(s=>_n(s,t,n,r)).join(i);return e.explicit||n?(r||o[0]===","?"[":"[ ")+o+(r?"]":" ]"):o}function _n(e,t,n,r){let i;switch(e.type){case"Group":i=Np(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return _n(e.term,t,n,r)+t(Ip(e),e);case"Boolean":i="<boolean-expr["+_n(e.term,t,n,r)+"]>";break;case"Type":i="<"+e.name+(e.opts?t(Rp(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;ca |
| 9 | syntax: `+i.syntax+` |
| 10 | value: `+(o||"<empty string>")+` |
| 11 | --------`+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,c),i.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:c,end:l},i};var Rn=new Map,yt=new Map,Nn=45,Pn=Op,Pr=zp;function On(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Nn&&e.charCodeAt(t+1)===Nn}function Ua(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Nn&&e.charCodeAt(t+1)!==Nn){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function Op(e){if(Rn.has(e))return Rn.get(e);let t=e.toLowerCase(),n=Rn.get(t);if(n===void 0){let r=On(t,0),i=r?"":Ua(t,0);n=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:r})}return Rn.set(e,n),n}function zp(e){if(yt.has(e))return yt.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=On(t,n.length);if(!r&&(t=t.toLowerCase(),yt.has(t))){let a=yt.get(t);return yt.set(e,a),a}let i=r?"":Ua(t,n.length),o=t.substr(0,n.length+i.length),s=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:i,prefix:o,custom:r});return yt.set(e,s),s}var kt=["initial","inherit","unset","revert","revert-layer"];var Ut=43,Ae=45,Or=110,wt=!0,Mp=!1;function Dr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Bt(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Ge(e,t,n,r){if(!e)return 0;let i=e.value.charCodeAt(t);if(i===Ut||i===Ae){if(n)return 0;t++}for(;t<e.value.length;t++)if(!W(e.value.charCodeAt(t)))return 0;return r+1}function zr(e,t,n){let r=!1,i=Bt(e,t,n);if(e=n(i),e===null)return t;if(e.type!==10)if(Dr(e,Ut)||Dr(e,Ae)){if(r=!0,i=Bt(n(++i),i,n),e=n(i),e===null||e.type!==10)return 0}else return t;if(!r){let o=e.value.charCodeAt(0);if(o!==Ut&&o!==Ae)return 0}return Ge(e,r?0:1,r,i)}function Mr(e,t){let n=0;if(!e)return 0;if(e.type===10)return Ge(e,0,Mp,n);if(e.type===1&&e.value.charCodeAt(0)===Ae){if(!Re(e.value,1,Or))return 0;switch(e.value.length){case 2:return zr(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Ae?0:(n=Bt(t(++n),n,t),e=t(n),Ge(e,0,wt,n));default:return e.value.charCodeAt(2)!==Ae?0:Ge(e,3,wt,n)}}else if(e.type===1||Dr(e,Ut)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Re(e.value,0,Or))return 0;switch(e.value.length){case 1:return zr(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Ae?0:(n=Bt(t(++n),n,t),e=t(n),Ge(e,0,wt,n));default:return e.value.charCodeAt(1)!==Ae?0:Ge(e,2,wt,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),i=r===Ut||r===Ae?1:0,o=i;for(;o<e.value.length&&W(e.value.charCodeAt(o));o++);return o===i||!Re(e.value,o,Or)?0:o+1===e.value.length?zr(t(++n),n,t):e.value.charCodeAt(o+1)!==Ae?0:o+2===e.value.length?(n=Bt(t(++n),n,t),e=t(n),Ge(e,0,wt,n)):Ge(e,o+2,wt,n)}return 0}var Fp=43,Wa=45,ja=63,Bp=117;function Fr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Up(e,t){return e.value.charCodeAt(0)===t}function Wt(e,t,n){let r=0;for(let i=t;i<e.value.length;i++){let o=e.value.charCodeAt(i);if(o===Wa&&n&&r!==0)return Wt(e,t+r+1,!1),6;if(!ne(o)||++r>6)return 0}return r}function zn(e,t,n){if(!e)return 0;for(;Fr(n(t),ja);){if(++e>6)return 0;t++}return t}function Br(e,t){let n=0;if(e===null||e.type!==1||!Re(e.value,0,Bp)||(e=t(++n),e===null))return 0;if(Fr(e,Fp))return e=t(++n),e===null?0:e.type===1?zn(Wt(e,0,!0),++n,t):Fr(e,ja)?zn(1,++n,t):0;if(e.type===10){let r=Wt(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!Up(e,Wa)||!Wt(e,1,!1)?0:n+1:zn(r,n,t))}return e.type===12?zn(Wt(e,1,!0),++n,t):0}var Ur=["calc(","-moz-calc(","-webkit-calc("],Wr=["min(","max(","clamp("],jr=["round(","mod(","rem("],Wp=["sin(","cos(","tan("],jp=["asin(","acos(","atan(","atan2("],Hp=["pow(","sqrt(","log(","exp(","sign("],Hr=["hypot("],qr=["abs("],Ha=[...Ur,...Wr,...jr,...Wp,...Hp,...Hr,...qr],qp=[...Ur,...Wr,...jr,...Hr,...qr],De=[...Ur,...Wr,...jr,...jp,...Hr,...qr],Gr=new Map([[2,22],[21,22],[19,20],[23,24]]);function ke(e,t){return t<e.length?e.charCodeAt(t):0}function qa(e,t){return Ne(e,0,e.len |
| 12 | `+t+` |
| 13 | --`+new Array((n||t.length)+1).join("-")+"^"})}var fh=9,mh=10,gh=12,bh=13,xh=32,Qa=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Fn=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(t=this.charCode()){return t<128&&Qa[t]===1}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(t){for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n!==bh&&n!==mh&&n!==gh&&n!==xh&&n!==fh)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new Xa(t,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n>=128||Qa[n]===0)break}return this.pos===t&&this.error("Expect a keyword"),this.substringToPos(t)}scanNumber(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n<48||n>57)break}return this.pos===t&&this.error("Expect a number"),this.substringToPos(t)}scanString(){let t=this.str.indexOf("'",this.pos+1);return t===-1&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(t+1)}};var yh=9,kh=10,wh=12,vh=13,Sh=32,il=33,Kr=35,Za=38,Bn=39,ol=40,sl=41,al=42,Xr=43,Qr=44,Ja=45,Zr=60,$r=62,Un=63,Ch=64,jt=91,vt=93,Wn=123,el=124,Yr=125,tl=8734,nl={" ":1,"&&":2,"||":3,"|":4};function rl(e){let t=null,n=null;return e.eat(Wn),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===Qr?(e.pos++,e.skipWs(),e.charCode()!==Yr&&(n=e.scanNumber(e),e.skipWs())):n=t,e.eat(Yr),{min:Number(t),max:n?Number(n):0}}function Th(e){let t=null,n=!1;switch(e.charCode()){case al:e.pos++,t={min:0,max:0};break;case Xr:e.pos++,t={min:1,max:0};break;case Un:e.pos++,t={min:0,max:1};break;case Kr:e.pos++,n=!0,e.charCode()===Wn?t=rl(e):e.charCode()===Un?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Wn:t=rl(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Fe(e,t){let n=Th(e);return n!==null?(n.term=t,e.charCode()===Kr&&e.charCodeAt(e.pos-1)===Xr||e.charCode()===Un&&e.charCodeAt(e.pos-1)===Yr?Fe(e,n):n):t}function Vr(e){let t=e.peek();return t===""?null:Fe(e,{type:"Token",value:t})}function Ah(e){let t;return e.eat(Zr),e.eat(Bn),t=e.scanWord(),e.eat(Bn),e.eat($r),Fe(e,{type:"Property",name:t})}function Eh(e){let t=null,n=null,r=1;return e.eat(jt),e.charCode()===Ja&&(e.peek(),r=-1),r==-1&&e.charCode()===tl?e.peek():(t=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(Qr),e.skipWs(),e.charCode()===tl?e.peek():(r=1,e.charCode()===Ja&&(e.peek(),r=-1),n=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(n+=e.scanWord())),e.eat(vt),{type:"Range",min:t,max:n}}function Lh(e){let t,n=null;if(e.eat(Zr),t=e.scanWord(),t==="boolean-expr"){e.eat(jt);let r=jn(e,vt);return e.eat(vt),e.eat($r),Fe(e,{type:"Boolean",term:r.terms.length===1?r.terms[0]:r})}return e.charCode()===ol&&e.nextCharCode()===sl&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===jt&&(e.skipWs(),n=Eh(e)),e.eat($r),Fe(e,{type:"Type",name:t,opts:n})}function _h(e){let t=e.scanWord();return e.charCode()===ol?(e.pos++,{type:"Function",name:t}):Fe(e,{type:"Keyword",name:t})}function Ih(e,t){function n(i,o){return{type:"Group",terms:i,combinator:o,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((i,o)=>nl[i]-nl[o]);t.length>0;){r=t.shift();let i=0,o=0;for(;i<e.length;i++){let s=e[i];s.type==="Combinator"&&(s.value===r?(o===-1&&(o=i-1),e.splice(i,1),i--):(o!==-1&&i-o>1&&(e.splice(o,i-o,n(e.slice(o,i),r)),i=o+1),o=-1))}o!==-1&&t.length&&e.splice(o,i-o,n(e.slice(o,i),r))}return r}function jn(e,t=-1){let n=Object.crea |
| 14 |
| 15 | `)&&s(12,"IHDR")&&t(0,24))return[r(16)*65536+r(18),r(20)*65536+r(22)];if((s(0,"GIF87a")||s(0,"GIF89a"))&&t(0,13)){let a=[i(6),i(8)],c=0;for(let l=13+(n(10)&128?3<<(n(10)&7)+1:0),u=0;l<gs&&u<256;u++){if(!t(l,l+2))return null;if(n(l)===44)return t(l,l+9)?[Math.max(a[0],i(l+1)+i(l+5)),Math.max(a[1],i(l+3)+i(l+7))]:null;if(n(l)!==33)return null;for(l+=2;;){if(l>=gs||++c>4096||!t(l,l+1))return null;let p=n(l);if(l+=1+p,p===0)break}}return null}if(s(0,"RIFF")&&s(8,"WEBP"))return s(12,"VP8X")&&t(0,30)?[1+o(24),1+o(27)]:s(12,"VP8L")&&t(0,25)&&n(20)===47?[1+(n(21)|(n(22)&63)<<8),1+(n(22)>>6|n(23)<<2|(n(24)&15)<<10)]:s(12,"VP8 ")&&t(0,30)?[(n(26)|n(27)<<8)&16383,(n(28)|n(29)<<8)&16383]:null;if(s(0,"\xFF\xD8")&&t(0,4))for(let a=2,c=0;a+9<=gs&&c<1024;c++){if(!t(a,a+4)||n(a)!==255)return null;let l=n(a+1);if(l===255){a++;continue}if(l===1||l>=208&&l<=216){a+=2;continue}if(l>=192&&l<=207&&l!==196&&l!==200&&l!==204)return t(a,a+9)?[r(a+7),r(a+5)]:null;if(l===217||l===218)return null;a+=2+r(a+2)}return null}var bs=null;function Ye(e,t){let n=Ac(String(e));if(n.startsWith("#"))return/^#[^\s"'()\\<>]*$/.test(n)?n:null;if(t==="fragment-only")return null;if(/^data:/i.test(n)){let r=gb(n);if(r===null||t!=="image"||!xs.has(r))return null;if(bs?.url===n)return bs.checked;let i=Cb(n),o=i?i[0]*i[1]<=bb?n:null:xb;return bs={url:n,checked:o},o}return/^blob:/i.test(n)&&mb.has(n)?n:null}function Ec(e){return Ac(String(e)).startsWith("#")}var ys="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" fill="#8882"/><path d="M8 36l10-12 8 9 6-7 8 10z" fill="#8886"/><circle cx="33" cy="15" r="4" fill="#8886"/></svg>');var Tb=["bg_color","text_color","hint_color","link_color","button_color","button_text_color","secondary_bg_color","accent_text_color","subtitle_text_color","destructive_text_color","section_bg_color","section_header_text_color","section_separator_color","header_bg_color","bottom_bar_bg_color"];var ks=/^(0|[0-9]{1,4}(\.[0-9]{1,3})?(px|em|rem))$/,Lc=/^#[0-9a-fA-F]{6}$/,Ab=new Set(["system-ui","sans-serif","serif","monospace","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"]),Eb=/^(?:(normal|italic) )?(?:(normal|bold|[1-9]00) )?[0-9]{1,3}(?:\.[0-9]{1,2})?(?:px|em|rem)(?:\/[0-9]{1,3}(?:\.[0-9]{1,2})?(?:px|em|rem)?)? ([a-z-]+(?:, ?[a-z-]+)*)$/;function _c(e){let t=typeof e=="number"?String(e):typeof e=="string"?e:"";return/^(0(\.[0-9]{1,3})?|1(\.0{1,3})?|\.[0-9]{1,3})$/.test(t)?t:null}var Rc=e=>typeof e=="string"&&/^\S+( \S+){0,3}$/.test(e)&&e.split(" ").every(t=>ks.test(t))?e:null;function Ic(e,t,n,r,i){let o;if(typeof e=="number")o=e;else if(typeof e=="string"&&new RegExp(`^[0-9]{1,2}(\\.[0-9]{1,${r}})?${i}$`).test(e))o=parseFloat(e);else return null;if(!Number.isFinite(o)||o<t||o>n)return null;let s=10**r;return String(Math.round(o*s)/s)+i}var Lb=[["bg","--tg-button-bg",e=>typeof e=="string"&&Lc.test(e)?e.toLowerCase():null],["text","--tg-button-text",e=>typeof e=="string"&&Lc.test(e)?e.toLowerCase():null],["radius","--tg-button-radius",e=>typeof e=="string"&&ks.test(e)?e:null],["font","--tg-button-font",e=>{let t=typeof e=="string"?Eb.exec(e):null;return t&&t[3].split(",").every(n=>Ab.has(n.trim()))?e:null}],["padding","--tg-button-padding",Rc],["height","--tg-button-height",e=>typeof e=="string"&&ks.test(e)?e:null],["pressedOpacity","--tg-button-pressed-opacity",_c],["disabledOpacity","--tg-button-disabled-opacity",_c]],_b=[["fontSize","--tg-text-font-size",e=>Ic(e,8,64,2,"px")],["lineHeight","--tg-text-line-height",e=>Ic(e,1,3,3,"")],["padding","--tg-text-padding",Rc]];var rv=Object.freeze({top:0,right:0,bottom:0,left:0,cornerLeft:0,cornerRight:0});var Ib=[["top","--tg-content-safe-area-inset-top"],["right","--tg-content-safe-area-inset-right"],["bottom","--tg-content-safe-area-inset-bottom"],["left","--tg-content-safe-area-inset-left"],["cornerLeft","--tg-content-safe-area-corner-left"],["cornerRight","--tg-content-safe-area-corner-right"]], |
| 16 | script iframe frame frameset object embed link meta base portal noscript set title template applet param |
| 17 | noembed noframes plaintext xmp listing slot track area map math metadata fencedframe audio video source |
| 18 | `)),Ns=new Set(or("keep").filter(e=>!an.has(e))),sr=new Map([...or("span").map(e=>[e,"span"]),...or("div").map(e=>[e,"div"])]),ln=new Set([...an,...or("drop")]),Ps=new Map(Ie.svg.elements.map(e=>[e.toLowerCase(),e])),ar=new Set(Ie.html.attributes),gu=Ie.svg.attributes,lr=new Set(gu.map(e=>e.toLowerCase())),mv=new Set([...ar,...lr]),Os=new Map(gu.filter(e=>e!==e.toLowerCase()).map(e=>[e.toLowerCase(),e])),zs=new Set(lt(` |
| 19 | href xlink:href src srcset poster action formaction background ping data cite codebase manifest longdesc |
| 20 | usemap profile icon archive classid lowsrc dynsrc srcdoc imagesrcset imagesizes attributionsrc |
| 21 | `)),Ds=new Set(lt(` |
| 22 | fill stroke filter mask clip-path marker marker-start marker-mid marker-end cursor color flood-color |
| 23 | lighting-color stop-color |
| 24 | `)),Ms=new Set(["from","to","by","values"]),Fs=new Set(lt(` |
| 25 | xmlns xmlns:xlink target rel download autofocus nonce is loading decoding crossorigin referrerpolicy |
| 26 | integrity fetchpriority charset http-equiv content async defer |
| 27 | `)),Sx={scrollTop:{type:"number",tags:null},scrollLeft:{type:"number",tags:null}},bu=(e,t)=>Object.fromEntries(Object.entries(e).filter(([n])=>t.includes(n))),cr=bu(Sx,Ie.properties),Cx={scrollIntoView:4,setPointerCapture:1,releasePointerCapture:1,scrollTo:2,scrollBy:2,observeResize:0,unobserveResize:0},ur=bu(Cx,Ie.methods),xu=new Set(Ie.canvas.methods),yu=new Set(Ie.canvas.properties),Bs=new Set(lt(` |
| 28 | putImageData globalCompositeOperation shadowBlur shadowColor shadowOffsetX shadowOffsetY filter |
| 29 | letterSpacing wordSpacing fontKerning fontStretch fontVariantCaps textRendering |
| 30 | `)),ku=new Set(Ie.canvas.gradients),wu=new Set(lt(` |
| 31 | moveTo lineTo bezierCurveTo quadraticCurveTo arc arcTo ellipse rect roundRect closePath addPath |
| 32 | `)),vu=new Set(lt(` |
| 33 | getBBox getComputedTextLength getTotalLength getPointAtLength getCTM getScreenCTM getSubStringLength |
| 34 | getNumberOfChars |
| 35 | `)),Su=new Set(Ie.canvas.queries.filter(e=>e!=="measureText"));var cn=1,Cu=4*1024*1024,Tu=fs;var xv={memoryLimitBytes:8*1024*1024,cpuLimitMs:500,cpuQuotaMs:300,cpuQuotaWindowMs:1e3,cpuKillAfterMs:0,mainThreadQuotaMs:100,maxTimers:64};var Tx=65536,yv=16*1024*1024/Tx,kv=16*1024*1024;var qs=5e4,Au=32*1024,Ax=2*1024*1024,Gs=8192,Eu=1024,Ex=48*1024;function pr(e){let t=0,n=!1;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i>=11904&&i<=42191||i>=44032&&i<=55295||i>=63744||i>=55296&&i<=56319?(n&&t++,n=!1,t++,i>=55296&&i<=56319&&r+1<e.length&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343&&r++):i<=32||i===45||i===63||i===47||i===8203?(n&&t++,n=!1):n=!0}return n&&t++,Math.max(t,Math.ceil(e.length/1024))}var Lx=256;function hr(e){if(e.length>Lx)return!0;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=1424&&n<8192||n>=11904&&n<=55295||n>=63744&&n<=65519)return!0}return!1}function Us(e){let t=0;for(let n=0;n<e.length;n++)e.charCodeAt(n)>=1424&&t++;return t}var _x=new Set(["offset","easing","composite","computed-offset"]),Ws=Symbol("out of profile"),Ix=8*1024,Rx=1e4,Nx=2e3,Px=4e3,Ox=400,zx=32,Dx=64,Mx=2048*2048,Lu=4*1024*1024,Fx=2e5,Bx=5e5,Ux=1024,Wx=2**31,Ru=0,jx=/^[a-zA-Z_][\w.:\-]*$/,Hx=/^[a-zA-Z][\w.\-]*$/,Nu=new Set(Tu),Pu=new Set(["animate","animateTransform","animateMotion"]),Ou=new Set(["use","linearGradient","radialGradient","pattern","filter","textPath","mpath","feImage"]);function Vs(e){return e==="strict"?{maxText:Au,maxCanvasString:Au,maxAttr:Ix,maxOps:Rx,maxCanvasCmds:Px,maxNodes:Nx,maxCssRules:Ox,maxKeyframes:zx,maxLiveAnims:Dx,maxCanvasPixels:Mx,complexTextBudget:Gs,textBudget:Ex,stop:!0}:{maxText:Ax,maxCanvasString:Lu,maxAttr:Lu,maxOps:Fx,maxCanvasCmds:Bx,maxNodes:0,maxCssRules:0,maxKeyframes:0,maxLiveAnims:Ux,maxCanvasPixels:0,complexTextBudget:0,textBudget:0,stop:!1}}function qx(e){let t=0,n=0,r=[],i=0;for(let o=0;o<e.length;o++){let s=e.charCodeAt(o);if(s===34||s===39)for(o++;o<e.length&&e.charCodeAt(o)!==s;o++)e.charCodeAt(o)===92&&o++;else if(s===92)o++;else if(s===47&&e.charCodeAt(o+1)===42){let a=e.indexOf("*/",o+2);o=a<0?e.length:a+1}else if(s===123){let a=e.slice(i,o).trim().toLowerCase(),c=r[r.length-1],l;c==="kf"?l="frame":/^@(-webkit-)?keyframes\b/.test(a)?l="kf":a.startsWith("@")?l="at":l="rule",l==="kf"?n++:l==="rule"&&t++,r.push(l),i=o+1}else s===125?(r.pop(),i=o+1):s===59&&(i=o+1)}return{rules:t,keyframes:n}}function zu(e="compat"){let t=Vs(e);return{html:[...Ns],svg:[...Ps.entries()],dropped:[...ln],attrs:[...ar],svgAttrs:[...lr],replace:[...sr.entries()],securityDropped:[...an],silent:[...Fs],url:[...zs],css:[...Ds],anim:[...Ms],animTags:[...Pu],fragTags:[...Ou],svgCase:[...Os.entries()],props:Object.entries(cr).map(([n,r])=>[n,r.type,r.tags?[...r.tags]:null]),methods:Object.entries(ur),events:[...Nu],mime:[...xs],placeholder:ys,limits:[qs,t.maxText,t.maxAttr,t.maxOps,t.maxCanvasCmds,Ru],complexTextBudget:t.complexTextBudget,textBudget:t.textBudget,documentNodes:t.maxNodes,cssRules:t.maxCssRules,keyframes:t.maxKeyframes,liveAnims:t.maxLiveAnims,canvasPixels:t.maxCanvasPixels,stop:t.stop,textAttrs:tu,textAttrPrefixes:nu}}function je(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function J(e){return typeof e=="number"&&Number.isInteger(e)&&e>cn&&e<Wx}function Xe(e,t){return typeof e=="string"&&e.length<=t}function ee(e){return typeof e=="number"&&Number.isFinite(e)}var fr=class{nodes=new Map;adopted={html:!1,head:!1,body:!1};dirtyStyles=new Set;complexText=0;totalText=0;cssRules=0;cssKeyframes=0;canvasSizes=new Map;canvasPixels=0;stopReason=null;churnTokens=Gs;churnAt=null;clock=()=>Date.now()/1e3;setClock(t){this.clock=t}loading=!0;markLoaded(){this.loading=!1}takeChurn(t){if(this.loading)return!0;let n=this.clock();return this.churnAt!==null&&(this.churnTokens=Math.min(Gs,this.churnTokens+Math.max(0,n-this.churnAt)*Eu)),this.churnAt=n,this.churnTokens<t?!1:(this.churnTokens-=t,!0)}overChurn(){return this.diag("text-churn",`text changes over ${Eu} units per second`),!1}policyName |
| 36 |