@builder.io/sdk-react 2.0.2 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/browser/blocks-exports.cjs +29 -29
  2. package/lib/browser/blocks-exports.mjs +300 -278
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -1
  6. package/lib/browser/init.mjs +1 -1
  7. package/lib/browser/server-entry-0c6c220c.js +688 -0
  8. package/lib/browser/server-entry-7e145817.cjs +2 -0
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-4f96554c.cjs → accordion-72dab8ce.cjs} +1 -1
  12. package/lib/edge/{accordion-ca081054.js → accordion-99129d68.js} +1 -1
  13. package/lib/edge/blocks-426e0c44.js +808 -0
  14. package/lib/edge/blocks-53ae1b87.cjs +12 -0
  15. package/lib/edge/blocks-exports.cjs +1 -1
  16. package/lib/edge/blocks-exports.mjs +2 -2
  17. package/lib/edge/{button-41169061.js → button-778062cd.js} +2 -2
  18. package/lib/edge/{button-5d140f8e.cjs → button-967d0268.cjs} +1 -1
  19. package/lib/edge/{columns-f8916a18.js → columns-3a8c4d3f.js} +53 -51
  20. package/lib/edge/columns-3b921658.cjs +28 -0
  21. package/lib/edge/{content-variants-71ee0c76.js → content-variants-15d191de.js} +28 -26
  22. package/lib/edge/content-variants-4b8718f8.cjs +134 -0
  23. package/lib/edge/evaluate-26c0fdb7.js +2615 -0
  24. package/lib/edge/evaluate-c0eeb4f8.cjs +21 -0
  25. package/lib/edge/form-9d9dce5d.cjs +1 -0
  26. package/lib/edge/{form-ac2f2a0e.js → form-ccb0b912.js} +8 -7
  27. package/lib/edge/{get-class-prop-name-a677d7a5.js → get-class-prop-name-0a91c3bd.js} +1 -1
  28. package/lib/edge/{get-class-prop-name-a9b4959e.cjs → get-class-prop-name-eae60eae.cjs} +1 -1
  29. package/lib/edge/{image-e3fcd611.js → image-6a074aab.js} +27 -25
  30. package/lib/edge/image-eebfcbac.cjs +17 -0
  31. package/lib/edge/{img-b91cb4fd.cjs → img-183de27d.cjs} +1 -1
  32. package/lib/edge/{img-8fc26395.js → img-75751c89.js} +1 -1
  33. package/lib/edge/index.cjs +1 -1
  34. package/lib/edge/index.mjs +1 -1
  35. package/lib/edge/init.cjs +1 -1
  36. package/lib/edge/init.mjs +1 -1
  37. package/lib/edge/{input-549f090e.js → input-27972020.js} +1 -1
  38. package/lib/edge/{input-ec7c695a.cjs → input-fd18a67d.cjs} +1 -1
  39. package/lib/edge/{select-6a5a28ac.js → select-60ff549c.js} +1 -1
  40. package/lib/edge/{select-3ffa9294.cjs → select-6ea0d59f.cjs} +1 -1
  41. package/lib/edge/server-entry-4133a544.cjs +2 -0
  42. package/lib/edge/server-entry-feff6177.js +689 -0
  43. package/lib/edge/server-entry.cjs +1 -1
  44. package/lib/edge/server-entry.mjs +1 -1
  45. package/lib/edge/{slot-40de071b.js → slot-2347377e.js} +12 -11
  46. package/lib/edge/slot-a4509cae.cjs +1 -0
  47. package/lib/edge/{symbol-76e76298.cjs → symbol-98650b06.cjs} +1 -1
  48. package/lib/edge/{symbol-e6515a5f.js → symbol-dcef0d8e.js} +2 -2
  49. package/lib/edge/{tabs-b75be82d.js → tabs-0784574b.js} +10 -9
  50. package/lib/edge/tabs-4c131e17.cjs +1 -0
  51. package/lib/edge/text-1c1986aa.cjs +1 -0
  52. package/lib/edge/text-6f7cbc35.js +38 -0
  53. package/lib/node/blocks-exports.cjs +16 -16
  54. package/lib/node/blocks-exports.mjs +255 -233
  55. package/lib/node/index.cjs +1 -1
  56. package/lib/node/index.mjs +2 -2
  57. package/lib/node/init.cjs +1 -1
  58. package/lib/node/init.mjs +2 -2
  59. package/lib/node/{node-runtime-0e37d6f7.cjs → node-runtime-4978bc21.cjs} +2 -2
  60. package/lib/node/{node-runtime-0f3a5df1.js → node-runtime-ce5c71e5.js} +3 -2
  61. package/lib/node/server-entry-0c6c220c.js +688 -0
  62. package/lib/node/server-entry-7e145817.cjs +2 -0
  63. package/lib/node/server-entry.cjs +1 -1
  64. package/lib/node/server-entry.mjs +1 -1
  65. package/package.json +1 -1
  66. package/types/blocks/image/image.types.d.ts +2 -0
  67. package/types/blocks/symbol/symbol.types.d.ts +1 -0
  68. package/types/constants/sdk-version.d.ts +1 -1
  69. package/types/functions/register-component.d.ts +2 -2
  70. package/lib/browser/server-entry-419c051e.cjs +0 -2
  71. package/lib/browser/server-entry-825b4408.js +0 -695
  72. package/lib/edge/blocks-078044bc.cjs +0 -32
  73. package/lib/edge/blocks-f55c7d3e.js +0 -3418
  74. package/lib/edge/columns-354bf349.cjs +0 -28
  75. package/lib/edge/content-variants-89a9389a.cjs +0 -134
  76. package/lib/edge/form-f2d2c2bf.cjs +0 -1
  77. package/lib/edge/image-344ddbb0.cjs +0 -17
  78. package/lib/edge/server-entry-966ac144.cjs +0 -2
  79. package/lib/edge/server-entry-d2020acf.js +0 -695
  80. package/lib/edge/slot-8b27e15e.cjs +0 -1
  81. package/lib/edge/tabs-9c5af0ec.cjs +0 -1
  82. package/lib/edge/text-5915f038.js +0 -17
  83. package/lib/edge/text-e6dbb721.cjs +0 -1
  84. package/lib/node/server-entry-5ebd1c9b.js +0 -695
  85. package/lib/node/server-entry-8002325b.cjs +0 -2
@@ -0,0 +1,21 @@
1
+ "use strict";var Zr=Object.defineProperty;var zr=(e,t,n)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ct=(e,t,n)=>(zr(e,typeof t!="symbol"?t+"":t,n),n);const ee=require("./server-entry-4133a544.cjs"),Cr=(e,t,n)=>{if(Object(e)!==e)return e;const r=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return r.slice(0,-1).reduce((i,s,u)=>Object(i[s])===i[s]?i[s]:i[s]=Math.abs(Number(r[u+1]))>>0===+r[u+1]?[]:{},e)[r[r.length-1]]=n,e},Ar=({builder:e,context:t,event:n,state:r})=>Object.entries({state:r,Builder:e,builder:e,context:t,event:n}),Qr=()=>({isEditing:ee.isEditing(),isBrowser:ee.isBrowser(),isServer:!ee.isBrowser(),getUserAttributes:()=>ee.getUserAttributes()}),qr=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,en=({code:e,builder:t,context:n,event:r,localState:i,rootSetState:s,rootState:u})=>{const h=Ar({builder:t,context:n,event:r,state:Ir({rootState:u,localState:i,rootSetState:s})});return new Function(...h.map(([m])=>m),e)(...h.map(([,m])=>m))};function Ir({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(r,i)=>{if(t&&i in t)return t[i];const s=r[i];return typeof s=="object"&&s!==null?Ir({rootState:s,localState:void 0,rootSetState:n?u=>{r[i]=u,n(r)}:void 0}):s},set:(r,i,s)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return r[i]=s,n==null||n(r),!0}})}var O,tn=function(e){function t(o){return 48>o?o===36:58>o?!0:65>o?!1:91>o?!0:97>o?o===95:123>o?!0:170<=o&&Yr.test(String.fromCharCode(o))}function n(o){return 65>o?o===36:91>o?!0:97>o?o===95:123>o?!0:170<=o&&wr.test(String.fromCharCode(o))}function r(o,a){for(var l=g,p=1,E=0;;){et.lastIndex=E;var P=et.exec(l);if(P&&P.index<o)++p,E=P.index+P[0].length;else break}throw l={line:p,ab:o-E},a+=" ("+l.line+":"+l.ab+")",a=new SyntaxError(a),a.j=o,a.X=l,a.o=c,a}function i(o){o=o.split(" ");for(var a=Object.create(null),l=0;l<o.length;l++)a[o[l]]=!0;return function(p){return a[p]||!1}}function s(){this.line=ce,this.ab=c-K}function u(o,a){ge=c,j.C&&(ft=new s),w=o,m(),V=a,Te=o.m}function h(){for(var o=c,a=j.va&&j.C&&new s,l=g.charCodeAt(c+=2);c<he&&l!==10&&l!==13&&l!==8232&&l!==8233;)++c,l=g.charCodeAt(c);j.va&&j.va(!1,g.slice(o+2,c),o,c,a,j.C&&new s)}function m(){for(;c<he;){var o=g.charCodeAt(c);if(o===32)++c;else if(o===13)++c,o=g.charCodeAt(c),o===10&&++c,j.C&&(++ce,K=c);else if(o===10||o===8232||o===8233)++c,j.C&&(++ce,K=c);else if(8<o&&14>o)++c;else if(o===47)if(o=g.charCodeAt(c+1),o===42){o=void 0;var a=j.va&&j.C&&new s,l=c,p=g.indexOf("*/",c+=2);if(p===-1&&r(c-2,"Unterminated comment"),c=p+2,j.C)for(et.lastIndex=l;(o=et.exec(g))&&o.index<c;)++ce,K=o.index+o[0].length;j.va&&j.va(!0,g.slice(l+2,p),l,c,a,j.C&&new s)}else if(o===47)h();else break;else if(o===160)++c;else if(5760<=o&&Jr.test(String.fromCharCode(o)))++c;else break}}function T(o){switch(o){case 46:o=g.charCodeAt(c+1),48<=o&&57>=o?fe(!0):(++c,u(pr));return;case 40:return++c,u(Z);case 41:return++c,u($);case 59:return++c,u(z);case 44:return++c,u(se);case 91:return++c,u(jt);case 93:return++c,u(St);case 123:return++c,u(Re);case 125:return++c,u(ye);case 58:return++c,u(Pe);case 63:return++c,u(fr);case 48:if(o=g.charCodeAt(c+1),o===120||o===88){c+=2,o=ue(16),o===null&&r(R+2,"Expected hexadecimal number"),n(g.charCodeAt(c))&&r(c,"Identifier directly after number"),u(Me,o);return}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return fe(!1);case 34:case 39:c++;for(var a="";;){c>=he&&r(R,"Unterminated string constant");var l=g.charCodeAt(c);if(l===o){++c,u(Ze,a);break}if(l===92){l=g.charCodeAt(++c);var p=/^[0-7]+/.exec(g.slice(c,c+3));for(p&&(p=p[0]);p&&255<parseInt(p,8);)p=p.slice(0,-1);if(p==="0"&&(p=null),++c,p)G&&r(c-2,"Octal literal in strict mode"),a+=String.fromCharCode(parseInt(p,8)),c+=p.length-1;else switch(l){case 110:a+=`
2
+ `;break;case 114:a+="\r";break;case 120:a+=String.fromCharCode(ke(2));break;case 117:a+=String.fromCharCode(ke(4));break;case 85:a+=String.fromCharCode(ke(8));break;case 116:a+=" ";break;case 98:a+="\b";break;case 118:a+="\v";break;case 102:a+="\f";break;case 48:a+="\0";break;case 13:g.charCodeAt(c)===10&&++c;case 10:j.C&&(K=c,++ce);break;default:a+=String.fromCharCode(l)}}else l!==13&&l!==10&&l!==8232&&l!==8233||r(R,"Unterminated string constant"),a+=String.fromCharCode(l),++c}return;case 47:o=g.charCodeAt(c+1),Te?(++c,He()):o===61?A(pe,2):A(hr,1);return;case 37:case 42:g.charCodeAt(c+1)===61?A(pe,2):A(Wr,1);return;case 124:case 38:a=g.charCodeAt(c+1),a===o?A(o===124?yr:dr,2):a===61?A(pe,2):A(o===124?Fr:Lr,1);return;case 94:g.charCodeAt(c+1)===61?A(pe,2):A(_r,1);return;case 43:case 45:a=g.charCodeAt(c+1),a===o?a===45&&g.charCodeAt(c+2)===62&&qe.test(g.slice(oe,c))?(c+=3,h(),m(),C()):A(Dr,2):a===61?A(pe,2):A(Xr,1);return;case 60:case 62:a=g.charCodeAt(c+1),l=1,a===o?(l=o===62&&g.charCodeAt(c+2)===62?3:2,g.charCodeAt(c+l)===61?A(pe,l+1):A(Vr,l)):a===33&&o===60&&g.charCodeAt(c+2)===45&&g.charCodeAt(c+3)===45?(c+=4,h(),m(),C()):(a===61&&(l=g.charCodeAt(c+2)===61?3:2),A(Gr,l));return;case 61:case 33:g.charCodeAt(c+1)===61?A(Br,g.charCodeAt(c+2)===61?3:2):A(o===61?gr:vr,1);return;case 126:return A(vr,1)}return!1}function C(o){if(o?c=R+1:R=c,j.C&&(pt=new s),o)return He();if(c>=he)return u(vt);if(o=g.charCodeAt(c),n(o)||o===92)return H();if(T(o)===!1){if(o=String.fromCharCode(o),o==="\\"||wr.test(o))return H();r(c,"Unexpected character '"+o+"'")}}function A(o,a){var l=g.slice(c,c+a);c+=a,u(o,l)}function He(){for(var o,a,l=c;;){c>=he&&r(l,"Unterminated regexp");var p=g.charAt(c);if(qe.test(p)&&r(l,"Unterminated regexp"),o)o=!1;else{if(p==="[")a=!0;else if(p==="]"&&a)a=!1;else if(p==="/"&&!a)break;o=p==="\\"}++c}o=g.slice(l,c),++c,(a=X())&&!/^[gmi]*$/.test(a)&&r(l,"Invalid regexp flag");try{var E=new RegExp(o,a)}catch(P){throw P instanceof SyntaxError&&r(l,P.message),P}u($t,E)}function ue(o,a){for(var l=c,p=0,E=a===void 0?1/0:a,P=0;P<E;++P){var _=g.charCodeAt(c);if(_=97<=_?_-97+10:65<=_?_-65+10:48<=_&&57>=_?_-48:1/0,_>=o)break;++c,p=p*o+_}return c===l||a!==void 0&&c-l!==a?null:p}function fe(o){var a=c,l=!1,p=g.charCodeAt(c)===48;o||ue(10)!==null||r(a,"Invalid number"),g.charCodeAt(c)===46&&(++c,ue(10),l=!0),o=g.charCodeAt(c),(o===69||o===101)&&(o=g.charCodeAt(++c),o!==43&&o!==45||++c,ue(10)===null&&r(a,"Invalid number"),l=!0),n(g.charCodeAt(c))&&r(c,"Identifier directly after number"),o=g.slice(a,c);var E;l?E=parseFloat(o):p&&o.length!==1?/[89]/.test(o)||G?r(a,"Invalid number"):E=parseInt(o,8):E=parseInt(o,10),u(Me,E)}function ke(o){return o=ue(16,o),o===null&&r(R,"Bad character escape sequence"),o}function X(){de=!1;for(var o,a=!0,l=c;;){var p=g.charCodeAt(c);if(t(p))de&&(o+=g.charAt(c)),++c;else if(p===92){de||(o=g.slice(l,c)),de=!0,g.charCodeAt(++c)!==117&&r(c,"Expecting Unicode escape sequence \\uXXXX"),++c,p=ke(4);var E=String.fromCharCode(p);E||r(c-1,"Invalid Unicode escape"),(a?n(p):t(p))||r(c-4,"Invalid Unicode escape"),o+=E}else break;a=!1}return de?o:g.slice(l,c)}function H(){var o=X(),a=ve;!de&&$r(o)&&(a=Ur[o]),u(a,o)}function S(){ht=R,oe=ge,gt=ft,C()}function Oe(o){if(G=o,c=R,j.C)for(;c<K;)K=g.lastIndexOf(`
3
+ `,K-2)+1,--ce;m(),C()}function $e(){this.type=null,this.start=R,this.end=null}function Vt(){this.start=pt,this.end=null,ct&&(this.source=ct)}function U(){var o=new $e;return j.C&&(o.X=new Vt),j.vb&&(o.sourceFile=j.vb),j.Xa&&(o.j=[R,0]),o}function ie(o){var a=new $e;return a.start=o.start,j.C&&(a.X=new Vt,a.X.start=o.X.start),j.Xa&&(a.j=[o.j[0],0]),a}function x(o,a){return o.type=a,o.end=oe,j.C&&(o.X.end=gt),j.Xa&&(o.j[1]=oe),o}function nt(o){return o.type==="ExpressionStatement"&&o.la.type==="Literal"&&o.la.value==="use strict"}function I(o){return w===o?(S(),!0):!1}function Je(){return!j.fc&&(w===vt||w===ye||qe.test(g.slice(oe,R)))}function le(){I(z)||Je()||J()}function N(o){w===o?S():J()}function J(){r(R,"Unexpected token")}function Ye(o){o.type!=="Identifier"&&o.type!=="MemberExpression"&&r(o.start,"Assigning to rvalue"),G&&o.type==="Identifier"&&Qe(o.name)&&r(o.start,"Assigning to "+o.name+" in strict mode")}function W(){(w===hr||w===pe&&V==="/=")&&C(!0);var o=w,a=U();switch(o){case yt:case Yt:S();var l=o===yt;I(z)||Je()?a.label=null:w!==ve?J():(a.label=Y(),le());for(var p=0;p<M.length;++p){var E=M[p];if((a.label===null||E.name===a.label.name)&&(E.kind!==null&&(l||E.kind==="loop")||a.label&&l))break}return p===M.length&&r(a.start,"Unsyntactic "+o.l),x(a,l?"BreakStatement":"ContinueStatement");case Kt:return S(),le(),x(a,"DebuggerStatement");case zt:return S(),M.push(kt),a.body=W(),M.pop(),N(xt),a.test=Ce(),le(),x(a,"DoWhileStatement");case er:return S(),M.push(kt),N(Z),w===z?it(a,null):w===Et?(o=U(),S(),Wt(o,!0),x(o,"VariableDeclaration"),o.fa.length===1&&I(ze)?Xt(a,o):it(a,o)):(o=F(!1,!0),I(ze)?(Ye(o),Xt(a,o)):it(a,o));case mt:return S(),ut(a,!0);case tr:return S(),a.test=Ce(),a.da=W(),a.alternate=I(Qt)?W():null,x(a,"IfStatement");case rr:return Ne||j.Ib||r(R,"'return' outside of function"),S(),I(z)||Je()?a.K=null:(a.K=F(),le()),x(a,"ReturnStatement");case wt:for(S(),a.Qb=Ce(),a.tb=[],N(Re),M.push(Kr);w!==ye;)w===dt||w===Zt?(o=w===dt,p&&x(p,"SwitchCase"),a.tb.push(p=U()),p.da=[],S(),o?p.test=F():(l&&r(ht,"Multiple default clauses"),l=!0,p.test=null),N(Pe)):(p||J(),p.da.push(W()));return p&&x(p,"SwitchCase"),S(),M.pop(),x(a,"SwitchStatement");case nr:return S(),qe.test(g.slice(oe,R))&&r(oe,"Illegal newline after throw"),a.K=F(),le(),x(a,"ThrowStatement");case ir:return S(),a.block=Ae(),a.Ea=null,w===Jt&&(o=U(),S(),N(Z),o.Ua=Y(),G&&Qe(o.Ua.name)&&r(o.Ua.start,"Binding "+o.Ua.name+" in strict mode"),N($),o.body=Ae(),a.Ea=x(o,"CatchClause")),a.fb=I(qt)?Ae():null,a.Ea||a.fb||r(a.start,"Missing catch or finally clause"),x(a,"TryStatement");case Et:return S(),Wt(a),le(),x(a,"VariableDeclaration");case xt:return S(),a.test=Ce(),M.push(kt),a.body=W(),M.pop(),x(a,"WhileStatement");case or:return G&&r(R,"'with' in strict mode"),S(),a.object=Ce(),a.body=W(),x(a,"WithStatement");case Re:return Ae();case z:return S(),x(a,"EmptyStatement");default:if(l=V,E=F(),o===ve&&E.type==="Identifier"&&I(Pe)){for(p=0;p<M.length;++p)M[p].name===l&&r(E.start,"Label '"+l+"' is already declared");return M.push({name:l,kind:w.W?"loop":w===wt?"switch":null}),a.body=W(),M.pop(),a.label=E,x(a,"LabeledStatement")}return a.la=E,le(),x(a,"ExpressionStatement")}}function Ce(){N(Z);var o=F();return N($),o}function Ae(o){var a=U(),l=!0,p=!1;for(a.body=[],N(Re);!I(ye);){var E=W();if(a.body.push(E),l&&o&&nt(E)){var P=p;Oe(p=!0)}l=!1}return p&&!P&&Oe(!1),x(a,"BlockStatement")}function it(o,a){return o.ua=a,N(z),o.test=w===z?null:F(),N(z),o.update=w===$?null:F(),N($),o.body=W(),M.pop(),x(o,"ForStatement")}function Xt(o,a){return o.left=a,o.right=F(),N($),o.body=W(),M.pop(),x(o,"ForInStatement")}function Wt(o,a){for(o.fa=[],o.kind="var";;){var l=U();if(l.id=Y(),G&&Qe(l.id.name)&&r(l.id.start,"Binding "+l.id.name+" in strict mode"),l.ua=I(gr)?F(!0,a):null,o.fa.push(x(l,"VariableDeclarator")),!I(se))break}}function F(o,a){var l=ot(a);if(!o&&w===se){for(o=ie(l),o.xb=[l];I(se);)o.xb.push(ot(a));return x(o,"SequenceExpression")}return l}function ot(o){var a=st(at(),-1,o);if(I(fr)){var l=ie(a);l.test=a,l.da=F(!0),N(Pe),l.alternate=F(!0,o),a=x(l,"ConditionalExpression")}return w.Cb?(l=ie(a),l.operator=V,l.left=a,S(),l.right=ot(o),Ye(a),x(l,"AssignmentExpression")):a}function st(o,a,l){var p=w.L;if(p!==null&&(!l||w!==ze)&&p>a){var E=ie(o);return E.left=o,E.operator=V,o=w,S(),E.right=st(at(),p,l),p=x(E,o===yr||o===dr?"LogicalExpression":"BinaryExpression"),st(p,a,l)}return o}function at(){if(w.prefix){var o=U(),a=w.$b;return o.operator=V,Te=o.prefix=!0,S(),o.K=at(),a?Ye(o.K):G&&o.operator==="delete"&&o.K.type==="Identifier"&&r(o.start,"Deleting local variable in strict mode"),x(o,a?"UpdateExpression":"UnaryExpression")}for(a=Ie(Ke());w.cc&&!Je();)o=ie(a),o.operator=V,o.prefix=!1,o.K=a,Ye(a),S(),a=x(o,"UpdateExpression");return a}function Ie(o,a){if(I(pr)){var l=ie(o);return l.object=o,l.Wa=Y(!0),l.bb=!1,Ie(x(l,"MemberExpression"),a)}return I(jt)?(l=ie(o),l.object=o,l.Wa=F(),l.bb=!0,N(St),Ie(x(l,"MemberExpression"),a)):!a&&I(Z)?(l=ie(o),l.callee=o,l.arguments=lt($,!1),Ie(x(l,"CallExpression"),a)):o}function Ke(){switch(w){case ar:var o=U();return S(),x(o,"ThisExpression");case ve:return Y();case Me:case Ze:case $t:return o=U(),o.value=V,o.raw=g.slice(R,ge),S(),x(o,"Literal");case ur:case lr:case cr:return o=U(),o.value=w.$a,o.raw=w.l,S(),x(o,"Literal");case Z:o=pt;var a=R;S();var l=F();return l.start=a,l.end=ge,j.C&&(l.X.start=o,l.X.end=ft),j.Xa&&(l.j=[a,ge]),N($),l;case jt:return o=U(),S(),o.elements=lt(St,!0,!0),x(o,"ArrayExpression");case Re:for(o=U(),a=!0,l=!1,o.h=[],S();!I(ye);){if(a)a=!1;else if(N(se),j.sb&&I(ye))break;var p={key:w===Me||w===Ze?Ke():Y(!0)},E=!1;if(I(Pe)){p.value=F(!0);var P=p.kind="init"}else p.key.type!=="Identifier"||p.key.name!=="get"&&p.key.name!=="set"?J():(E=l=!0,P=p.kind=p.key.name,p.key=w===Me||w===Ze?Ke():Y(!0),w!==Z&&J(),p.value=ut(U(),!1));if(p.key.type==="Identifier"&&(G||l))for(var _=0;_<o.h.length;++_){var me=o.h[_];if(me.key.name===p.key.name){var Ot=P===me.kind||E&&me.kind==="init"||P==="init"&&(me.kind==="get"||me.kind==="set");Ot&&!G&&P==="init"&&me.kind==="init"&&(Ot=!1),Ot&&r(p.key.start,"Redefinition of property")}}o.h.push(p)}return x(o,"ObjectExpression");case mt:return o=U(),S(),ut(o,!1);case sr:return o=U(),S(),o.callee=Ie(Ke(),!0),o.arguments=I(Z)?lt($,!1):br,x(o,"NewExpression")}J()}function ut(o,a){w===ve?o.id=Y():a?J():o.id=null,o.oa=[];var l=!0;for(N(Z);!I($);)l?l=!1:N(se),o.oa.push(Y());l=Ne;var p=M;if(Ne=!0,M=[],o.body=Ae(!0),Ne=l,M=p,G||o.body.body.length&&nt(o.body.body[0])){for(l=o.id?-1:0;l<o.oa.length;++l)if(p=0>l?o.id:o.oa[l],(mr(p.name)||Qe(p.name))&&r(p.start,"Defining '"+p.name+"' in strict mode"),0<=l)for(var E=0;E<l;++E)p.name===o.oa[E].name&&r(p.start,"Argument name clash in strict mode")}return x(o,a?"FunctionDeclaration":"FunctionExpression")}function lt(o,a,l){for(var p=[],E=!0;!I(o);){if(E)E=!1;else if(N(se),a&&j.sb&&I(o))break;p.push(l&&w===se?null:F(!0))}return p}function Y(o){var a=U();return o&&j.yb==="everywhere"&&(o=!1),w===ve?(!o&&(j.yb&&Hr(V)||G&&mr(V))&&g.slice(R,ge).indexOf("\\")===-1&&r(R,"The keyword '"+V+"' is reserved"),a.name=V):o&&w.l?a.name=w.l:J(),Te=!1,S(),x(a,"Identifier")}e.version="0.5.0";var j,g="",he,ct;e.parse=function(o,a){g=String(o),he=g.length,j=a||{};for(var l in Ht)Object.prototype.hasOwnProperty.call(j,l)||(j[l]=Ht[l]);for(ct=j.sourceFile,ce=1,c=K=0,Te=!0,m(),l=j.dc,ht=oe=c,j.C&&(gt=new s),Ne=G=!1,M=[],C(),o=l||U(),a=!0,l||(o.body=[]);w!==vt;)l=W(),o.body.push(l),a&&nt(l)&&Oe(!0),a=!1;return x(o,"Program")};var Ht={fc:!1,sb:!0,yb:!1,Ib:!1,C:!1,va:null,Xa:!1,dc:null,sourceFile:null,vb:null},c=0,R=0,ge=0,pt,ft,w,V,Te,ce,K,ht=0,oe=0,gt,Ne,M,G,br=[],Me={type:"num"},$t={type:"regexp"},Ze={type:"string"},ve={type:"name"},vt={type:"eof"},yt={l:"break"},dt={l:"case",m:!0},Jt={l:"catch"},Yt={l:"continue"},Kt={l:"debugger"},Zt={l:"default"},zt={l:"do",W:!0},Qt={l:"else",m:!0},qt={l:"finally"},er={l:"for",W:!0},mt={l:"function"},tr={l:"if"},rr={l:"return",m:!0},wt={l:"switch"},nr={l:"throw",m:!0},ir={l:"try"},Et={l:"var"},xt={l:"while",W:!0},or={l:"with"},sr={l:"new",m:!0},ar={l:"this"},ur={l:"null",$a:null},lr={l:"true",$a:!0},cr={l:"false",$a:!1},ze={l:"in",L:7,m:!0},Ur={break:yt,case:dt,catch:Jt,continue:Yt,debugger:Kt,default:Zt,do:zt,else:Qt,finally:qt,for:er,function:mt,if:tr,return:rr,switch:wt,throw:nr,try:ir,var:Et,while:xt,with:or,null:ur,true:lr,false:cr,new:sr,in:ze,instanceof:{l:"instanceof",L:7,m:!0},this:ar,typeof:{l:"typeof",prefix:!0,m:!0},void:{l:"void",prefix:!0,m:!0},delete:{l:"delete",prefix:!0,m:!0}},jt={type:"[",m:!0},St={type:"]"},Re={type:"{",m:!0},ye={type:"}"},Z={type:"(",m:!0},$={type:")"},se={type:",",m:!0},z={type:";",m:!0},Pe={type:":",m:!0},pr={type:"."},fr={type:"?",m:!0},hr={L:10,m:!0},gr={Cb:!0,m:!0},pe={Cb:!0,m:!0},Dr={cc:!0,prefix:!0,$b:!0},vr={prefix:!0,m:!0},yr={L:1,m:!0},dr={L:2,m:!0},Fr={L:3,m:!0},_r={L:4,m:!0},Lr={L:5,m:!0},Br={L:6,m:!0},Gr={L:7,m:!0},Vr={L:8,m:!0},Xr={L:9,prefix:!0,m:!0},Wr={L:10,m:!0},Hr=i("class enum extends super const export import"),mr=i("implements interface let package private protected public static yield"),Qe=i("eval arguments"),$r=i("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),Jr=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,wr=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),Yr=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),qe=/[\n\r\u2028\u2029]/,et=/\r\n|[\n\r\u2028\u2029]/g,de,kt={kind:"loop"},Kr={kind:"switch"}},It=It=typeof globalThis=="undefined"?void 0:globalThis;tn(It.j||(It.j={}));function f(e,t){typeof e=="string"&&(e=xe(e,"code"));var n=e.constructor;this.ya=function(){return new n({options:{}})};var r=this.ya(),i;for(i in e)r[i]=i==="body"?e[i].slice():e[i];this.ra=r,this.ca=[],this.qb=t,this.za=!1,this.ba=[],this.Ya=0,this.rb=Object.create(null),e=/^step([A-Z]\w*)$/;var s,u;for(u in this)typeof this[u]=="function"&&(s=u.match(e))&&(this.rb[s[1]]=this[u].bind(this));this.N=Nt(this,this.ra,null),this.Na=this.N.object,this.ra=xe(this.ba.join(`
4
+ `),"polyfills"),this.ba=void 0,tt(this.ra),s=new y(this.ra,this.N),s.done=!1,this.o=[s],this.Eb(),this.value=void 0,this.ra=r,s=new y(this.ra,this.N),s.done=!1,this.o.length=0,this.o[0]=s}var Er={C:!0,kc:5},Mt={configurable:!0,enumerable:!0,writable:!1},v={configurable:!0,enumerable:!1,writable:!0},B={configurable:!0,enumerable:!1,writable:!1},be={configurable:!1,enumerable:!1,writable:!1},xr={configurable:!1,enumerable:!0,writable:!0},Tr={STEP_ERROR:!0},Se={SCOPE_REFERENCE:!0},Ge={VALUE_IN_DESCRIPTOR:!0},we={REGEXP_TIMEOUT:!0},jr=[],te=null,Le=null,ae=typeof globalThis=="undefined"?void 0:globalThis,rn=["onmessage = function(e) {","var result;","var data = e.data;","switch (data[0]) {","case 'split':","result = data[1].split(data[2], data[3]);","break;","case 'match':","result = data[1].match(data[2]);","break;","case 'search':","result = data[1].search(data[2]);","break;","case 'replace':","result = data[1].replace(data[2], data[3]);","break;","case 'exec':","var regexp = data[1];","regexp.lastIndex = data[2];","result = [regexp.exec(data[3]), data[1].lastIndex];","break;","default:","throw Error('Unknown RegExp operation: ' + data[0]);","}","postMessage(result);","close();","};"];function Rt(e){var t=e>>>0;return t===Number(e)?t:NaN}function Be(e){var t=e>>>0;return String(t)===String(e)&&t!==4294967295?t:NaN}function tt(e,t,n){t?e.start=t:delete e.start,n?e.end=n:delete e.end;for(var r in e)if(r!=="loc"&&e.hasOwnProperty(r)){var i=e[r];i&&typeof i=="object"&&tt(i,t,n)}}f.prototype.REGEXP_MODE=2;f.prototype.REGEXP_THREAD_TIMEOUT=1e3;f.prototype.POLYFILL_TIMEOUT=1e3;O=f.prototype;O.P=!1;O.Ka=!1;O.Kb=0;O.ic=0;function xe(e,t){var n={},r;for(r in Er)n[r]=Er[r];return n.sourceFile=t,ae.j.parse(e,n)}O.Jb=function(e){var t=this.o[0];if(!t||t.node.type!=="Program")throw Error("Expecting original AST to start with a Program node");if(typeof e=="string"&&(e=xe(e,"appendCode"+this.Kb++)),!e||e.type!=="Program")throw Error("Expecting new AST to start with a Program node");Ve(this,e,t.scope),Array.prototype.push.apply(t.node.body,e.body),t.node.body.jb=null,t.done=!1};O.lb=function(){var e=this.o,t;do{var n=e[e.length-1];if(this.za)break;if(!n||n.node.type==="Program"&&n.done){if(!this.ca.length)return!1;if(n=this.ca[0],!n||n.time>Date.now())n=null;else{this.ca.shift(),0<=n.interval&&Rr(this,n,n.interval);var r=new y(n.node,n.scope);n.zb&&(r.ia=2,r.B=this.Na,r.U=n.zb,r.Qa=!0,r.F=n.Lb),n=r}if(!n)break}r=n.node;var i=Le;Le=this;try{var s=this.rb[r.type](e,n,r)}catch(u){if(u!==Tr)throw this.value!==u&&(this.value=void 0),u}finally{Le=i}if(s&&e.push(s),this.P)throw this.value=void 0,Error("Getter not supported in this context");if(this.Ka)throw this.value=void 0,Error("Setter not supported in this context");t||r.end||(t=Date.now()+this.POLYFILL_TIMEOUT)}while(!r.end&&t>Date.now());return!0};O.Eb=function(){for(;!this.za&&this.lb(););return this.za};function nn(e,t){e.g(t,"NaN",NaN,be),e.g(t,"Infinity",1/0,be),e.g(t,"undefined",void 0,be),e.g(t,"window",t,Mt),e.g(t,"this",t,be),e.g(t,"self",t),e.M=new k(null),e.Z=new k(e.M),on(e,t),sn(e,t),t.xa=e.M,e.g(t,"constructor",e.v,v),an(e,t),un(e,t),ln(e,t),cn(e,t),pn(e,t),fn(e,t),hn(e,t),gn(e,t),vn(e,t);var n=e.i(function(){throw EvalError("Can't happen")},!1);n.eval=!0,e.g(t,"eval",n,v),e.g(t,"parseInt",e.i(parseInt,!1),v),e.g(t,"parseFloat",e.i(parseFloat,!1),v),e.g(t,"isNaN",e.i(isNaN,!1),v),e.g(t,"isFinite",e.i(isFinite,!1),v);for(var r=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i<r.length;i++)n=function(s){return function(u){try{return s(u)}catch(h){d(e,e.Gb,h.message)}}}(r[i][0]),e.g(t,r[i][1],e.i(n,!1),v);n=function(s){return Sr(e,!1,arguments)},e.g(t,"setTimeout",e.i(n,!1),v),n=function(s){return Sr(e,!0,arguments)},e.g(t,"setInterval",e.i(n,!1),v),n=function(s){kr(e,s)},e.g(t,"clearTimeout",e.i(n,!1),v),n=function(s){kr(e,s)},e.g(t,"clearInterval",e.i(n,!1),v),e.OBJECT=e.v,e.OBJECT_PROTO=e.M,e.FUNCTION=e.O,e.FUNCTION_PROTO=e.Z,e.ARRAY=e.qa,e.ARRAY_PROTO=e.La,e.REGEXP=e.I,e.REGEXP_PROTO=e.Ma,e.DATE=e.$,e.DATE_PROTO=e.nb,e.qb&&e.qb(e,t)}O.Wb=0;function on(e,t){var n=/^[A-Za-z_$][\w$]*$/,r=function(i){var s=arguments.length?String(arguments[arguments.length-1]):"",u=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(u){u=u.split(/\s*,\s*/);for(var h=0;h<u.length;h++){var m=u[h];n.test(m)||d(e,e.T,"Invalid function argument: "+m)}u=u.join(", ")}try{var T=xe("(function("+u+") {"+s+"})","function"+e.Wb++)}catch(C){d(e,e.T,"Invalid code: "+C.message)}return T.body.length!==1&&d(e,e.T,"Invalid code in function body"),Ut(e,T.body[0].la,e.N,"anonymous")};e.O=e.i(r,!0),e.g(t,"Function",e.O,v),e.g(e.O,"prototype",e.Z,v),e.g(e.Z,"constructor",e.O,v),e.Z.Ta=function(){},e.Z.Ta.id=e.Ya++,e.Z.Ab=!0,e.g(e.Z,"length",0,B),e.Z.H="Function",r=function(i,s){var u=e.o[e.o.length-1];u.U=this,u.B=i,u.F=[],s!=null&&(s instanceof k?u.F=Nr(e,s):d(e,e.j,"CreateListFromArrayLike called on non-object")),u.eb=!1},b(e,e.O,"apply",r),r=function(i){var s=e.o[e.o.length-1];s.U=this,s.B=i,s.F=[];for(var u=1;u<arguments.length;u++)s.F.push(arguments[u]);s.eb=!1},b(e,e.O,"call",r),e.ba.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function bind(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),r=function(){return String(this)},b(e,e.O,"toString",r),e.g(e.O,"toString",e.i(r,!1),v),r=function(){return this.valueOf()},b(e,e.O,"valueOf",r),e.g(e.O,"valueOf",e.i(r,!1),v)}function sn(e,t){function n(i){i!=null||d(e,e.j,"Cannot convert '"+i+"' to object")}var r=function(i){if(i==null)return ne(e)?this:e.s(e.M);if(!(i instanceof k)){var s=e.s(re(e,i));return s.data=i,s}return i};e.v=e.i(r,!0),e.g(e.v,"prototype",e.M,v),e.g(e.M,"constructor",e.v,v),e.g(t,"Object",e.v,v),r=function(i){return n(i),q(e,Object.getOwnPropertyNames(i instanceof k?i.h:i))},e.g(e.v,"getOwnPropertyNames",e.i(r,!1),v),r=function(i){return n(i),i instanceof k&&(i=i.h),q(e,Object.keys(i))},e.g(e.v,"keys",e.i(r,!1),v),r=function(i){return i===null?e.s(null):(i instanceof k||d(e,e.j,"Object prototype may only be an Object or null, not "+i),e.s(i))},e.g(e.v,"create",e.i(r,!1),v),e.ba.push("(function() {","var create_ = Object.create;","Object.create = function create(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),r=function(i,s,u){return s=String(s),i instanceof k||d(e,e.j,"Object.defineProperty called on non-object: "+i),u instanceof k||d(e,e.j,"Property description must be an object"),!i.preventExtensions||s in i.h||d(e,e.j,"Can't define property '"+s+"', object is not extensible"),e.g(i,s,Ge,u.h),i},e.g(e.v,"defineProperty",e.i(r,!1),v),e.ba.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function defineProperty(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function defineProperties(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),r=function(i,s){if(i instanceof k||d(e,e.j,"Object.getOwnPropertyDescriptor called on non-object: "+i),s=String(s),s in i.h){var u=Object.getOwnPropertyDescriptor(i.h,s),h=i.V[s];return i=i.Y[s],s=e.s(e.M),h||i?(e.g(s,"get",h),e.g(s,"set",i)):(e.g(s,"value",u.value),e.g(s,"writable",u.writable)),e.g(s,"configurable",u.configurable),e.g(s,"enumerable",u.enumerable),s}},e.g(e.v,"getOwnPropertyDescriptor",e.i(r,!1),v),r=function(i){return n(i),re(e,i)},e.g(e.v,"getPrototypeOf",e.i(r,!1),v),r=function(i){return!!i&&!i.preventExtensions},e.g(e.v,"isExtensible",e.i(r,!1),v),r=function(i){return i instanceof k&&(i.preventExtensions=!0),i},e.g(e.v,"preventExtensions",e.i(r,!1),v),b(e,e.v,"toString",k.prototype.toString),b(e,e.v,"toLocaleString",k.prototype.toString),b(e,e.v,"valueOf",k.prototype.valueOf),r=function(i){return n(this),this instanceof k?String(i)in this.h:this.hasOwnProperty(i)},b(e,e.v,"hasOwnProperty",r),r=function(i){return n(this),this instanceof k?Object.prototype.propertyIsEnumerable.call(this.h,i):this.propertyIsEnumerable(i)},b(e,e.v,"propertyIsEnumerable",r),r=function(i){for(;;){if(i=re(e,i),!i)return!1;if(i===this)return!0}},b(e,e.v,"isPrototypeOf",r)}function an(e,t){var n=function(r){var i=ne(e)?this:je(e),s=arguments[0];if(arguments.length===1&&typeof s=="number")isNaN(Rt(s))&&d(e,e.ob,"Invalid array length: "+s),i.h.length=s;else{for(s=0;s<arguments.length;s++)i.h[s]=arguments[s];i.h.length=s}return i};e.qa=e.i(n,!0),e.La=e.qa.h.prototype,e.g(t,"Array",e.qa,v),n=function(r){return r&&r.H==="Array"},e.g(e.qa,"isArray",e.i(n,!1),v),e.g(e.La,"length",0,{configurable:!1,enumerable:!1,writable:!0}),e.La.H="Array",e.ba.push("(function() {","function createArrayMethod_(f) {","Object.defineProperty(Array.prototype, f.name,","{configurable: true, writable: true, value: f});","}","createArrayMethod_(","function pop() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","len--;","var x = o[len];","delete o[len];","o.length = len;","return x;","}",");","createArrayMethod_(","function push(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","for (var i = 0; i < arguments.length; i++) {","o[len] = arguments[i];","len++;","}","o.length = len;","return len;","}",");","createArrayMethod_(","function shift() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","var value = o[0];","for (var i = 0; i < len - 1; i++) {","if ((i + 1) in o) {","o[i] = o[i + 1];","} else {","delete o[i];","}","}","delete o[i];","o.length = len - 1;","return value;","}",");","createArrayMethod_(","function unshift(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","len = 0;","}","for (var i = len - 1; i >= 0; i--) {","if (i in o) {","o[i + arguments.length] = o[i];","} else {","delete o[i + arguments.length];","}","}","for (var i = 0; i < arguments.length; i++) {","o[i] = arguments[i];","}","return (o.length = len + arguments.length);","}",");","createArrayMethod_(","function reverse() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 2) {","return o;","}","for (var i = 0; i < len / 2 - 0.5; i++) {","var x = o[i];","var hasX = i in o;","if ((len - i - 1) in o) {","o[i] = o[len - i - 1];","} else {","delete o[i];","}","if (hasX) {","o[len - i - 1] = x;","} else {","delete o[len - i - 1];","}","}","return o;","}",");","createArrayMethod_(","function indexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var n = fromIndex | 0;","if (!len || n >= len) {","return -1;","}","var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","while (i < len) {","if (i in o && o[i] === searchElement) {","return i;","}","i++;","}","return -1;","}",");","createArrayMethod_(","function lastIndexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len) {","return -1;","}","var n = len - 1;","if (arguments.length > 1) {","n = fromIndex | 0;","if (n) {","n = (n > 0 || -1) * Math.floor(Math.abs(n));","}","}","var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);","while (i >= 0) {","if (i in o && o[i] === searchElement) {","return i;","}","i--;","}","return -1;","}",");","createArrayMethod_(","function slice(start, end) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","start = (start >= 0) ? start : Math.max(0, len + start);","if (typeof end !== 'undefined') {","if (end !== Infinity) {","end |= 0;","}","if (end < 0) {","end = len + end;","} else {","end = Math.min(end, len);","}","} else {","end = len;","}","var size = end - start;","var cloned = new Array(size);","for (var i = 0; i < size; i++) {","if ((start + i) in o) {","cloned[i] = o[start + i];","}","}","return cloned;","}",");","createArrayMethod_(","function splice(start, deleteCount, var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","if (start < 0) {","start = Math.max(len + start, 0);","} else {","start = Math.min(start, len);","}","if (arguments.length < 1) {","deleteCount = len - start;","} else {","deleteCount |= 0;","deleteCount = Math.max(0, Math.min(deleteCount, len - start));","}","var removed = [];","for (var i = start; i < start + deleteCount; i++) {","if (i in o) {","removed.push(o[i]);","} else {","removed.length++;","}","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = start + deleteCount; i < len - deleteCount; i++) {","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = len - deleteCount; i < len; i++) {","delete o[i];","}","len -= deleteCount;","var arl = arguments.length - 2;","for (var i = len - 1; i >= start; i--) {","if (i in o) {","o[i + arl] = o[i];","} else {","delete o[i + arl];","}","}","len += arl;","for (var i = 2; i < arguments.length; i++) {","o[start + i - 2] = arguments[i];","}","o.length = len;","return removed;","}",");","createArrayMethod_(","function concat(var_args) {","if (!this) throw TypeError();","var o = Object(this);","var cloned = [];","for (var i = -1; i < arguments.length; i++) {","var value = (i === -1) ? o : arguments[i];","if (Array.isArray(value)) {","for (var j = 0, l = value.length; j < l; j++) {","if (j in value) {","cloned.push(value[j]);","} else {","cloned.length++;","}","}","} else {","cloned.push(value);","}","}","return cloned;","}",");","createArrayMethod_(","function join(opt_separator) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var sep = typeof opt_separator === 'undefined' ?","',' : ('' + opt_separator);","var str = '';","for (var i = 0; i < len; i++) {","if (i && sep) str += sep;","str += (o[i] === null || o[i] === undefined) ? '' : o[i];","}","return str;","}",");","createArrayMethod_(","function every(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o && !callbackfn.call(t, o[k], k, o)) return false;","k++;","}","return true;","}",");","createArrayMethod_(","function filter(fun, var_args) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o) {","var val = o[i];","if (fun.call(thisArg, val, i, o)) res.push(val);","}","}","return res;","}",");","createArrayMethod_(","function forEach(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o) callback.call(t, o[k], k, o);","k++;","}","}",");","createArrayMethod_(","function map(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","var a = new Array(len);","while (k < len) {","if (k in o) a[k] = callback.call(t, o[k], k, o);","k++;","}","return a;","}",");","createArrayMethod_(","function reduce(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in o)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k++];","}","for (; k < len; k++) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function reduceRight(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in o)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k--];","}","for (; k >= 0; k--) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function some(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o && fun.call(thisArg, o[i], i, o)) return true;","}","return false;","}",");","createArrayMethod_(","function sort(opt_comp) {","if (!this) throw TypeError();","if (typeof opt_comp !== 'function') {","opt_comp = undefined;","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :","(String(this[j]) > String(this[j + 1]))) {","var swap = this[j];","var hasSwap = j in this;","if ((j + 1) in this) {","this[j] = this[j + 1];","} else {","delete this[j];","}","if (hasSwap) {","this[j + 1] = swap;","} else {","delete this[j + 1];","}","changes++;","}","}","if (!changes) break;","}","return this;","}",");","createArrayMethod_(","function toLocaleString() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var out = [];","for (var i = 0; i < len; i++) {","out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();","}","return out.join(',');","}",");","})();","")}function un(e,t){var n=function(r){return r=arguments.length?ae.String(r):"",ne(e)?(this.data=r,this):r};for(e.J=e.i(n,!0),e.g(t,"String",e.J,v),e.g(e.J,"fromCharCode",e.i(String.fromCharCode,!1),v),t="charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "),n=0;n<t.length;n++)b(e,e.J,t[n],String.prototype[t[n]]);n=function(r,i,s){i=e.R(i),s=e.R(s);try{return String(this).localeCompare(r,i,s)}catch(u){d(e,e.D,"localeCompare: "+u.message)}},b(e,e.J,"localeCompare",n),n=function(r,i,s){var u=String(this);if(i=i?Number(i):void 0,D(e,r,e.I)&&(r=r.data,De(e,r,s),e.REGEXP_MODE===2)){if(te)r=Ue(e,"string.split(separator, limit)",{string:u,separator:r,limit:i},r,s),r!==we&&s(q(e,r));else{var h=e.ha(),m=Fe(e,r,h,s);h.onmessage=function(T){clearTimeout(m),s(q(e,T.data))},h.postMessage(["split",u,r,i])}return}r=u.split(r,i),s(q(e,r))},_e(e,e.J,"split",n),n=function(r,i){var s=String(this);if(r=D(e,r,e.I)?r.data:new RegExp(r),De(e,r,i),e.REGEXP_MODE===2)if(te)r=Ue(e,"string.match(regexp)",{string:s,regexp:r},r,i),r!==we&&i(r&&q(e,r));else{var u=e.ha(),h=Fe(e,r,u,i);u.onmessage=function(m){clearTimeout(h),i(m.data&&q(e,m.data))},u.postMessage(["match",s,r])}else r=s.match(r),i(r&&q(e,r))},_e(e,e.J,"match",n),n=function(r,i){var s=String(this);if(D(e,r,e.I)?r=r.data:r=new RegExp(r),De(e,r,i),e.REGEXP_MODE===2)if(te)r=Ue(e,"string.search(regexp)",{string:s,regexp:r},r,i),r!==we&&i(r);else{var u=e.ha(),h=Fe(e,r,u,i);u.onmessage=function(m){clearTimeout(h),i(m.data)},u.postMessage(["search",s,r])}else i(s.search(r))},_e(e,e.J,"search",n),n=function(r,i,s){var u=String(this);if(i=String(i),D(e,r,e.I)&&(r=r.data,De(e,r,s),e.REGEXP_MODE===2)){if(te)r=Ue(e,"string.replace(substr, newSubstr)",{string:u,substr:r,newSubstr:i},r,s),r!==we&&s(r);else{var h=e.ha(),m=Fe(e,r,h,s);h.onmessage=function(T){clearTimeout(m),s(T.data)},h.postMessage(["replace",u,r,i])}return}s(u.replace(r,i))},_e(e,e.J,"replace",n),e.ba.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function replace(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")}function ln(e,t){e.mb=e.i(function(n){return n=ae.Boolean(n),ne(e)?(this.data=n,this):n},!0),e.g(t,"Boolean",e.mb,v)}function cn(e,t){var n=function(r){return r=arguments.length?ae.Number(r):0,ne(e)?(this.data=r,this):r};for(e.aa=e.i(n,!0),e.g(t,"Number",e.aa,v),t=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],n=0;n<t.length;n++)e.g(e.aa,t[n],Number[t[n]],be);n=function(r){try{return Number(this).toExponential(r)}catch(i){d(e,e.D,i.message)}},b(e,e.aa,"toExponential",n),n=function(r){try{return Number(this).toFixed(r)}catch(i){d(e,e.D,i.message)}},b(e,e.aa,"toFixed",n),n=function(r){try{return Number(this).toPrecision(r)}catch(i){d(e,e.D,i.message)}},b(e,e.aa,"toPrecision",n),n=function(r){try{return Number(this).toString(r)}catch(i){d(e,e.D,i.message)}},b(e,e.aa,"toString",n),n=function(r,i){r=r?e.R(r):void 0,i=i?e.R(i):void 0;try{return Number(this).toLocaleString(r,i)}catch(s){d(e,e.D,"toLocaleString: "+s.message)}},b(e,e.aa,"toLocaleString",n)}function pn(e,t){var n=function(i,s){if(!ne(e))return ae.Date();var u=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(ae.Date,u)),this};e.$=e.i(n,!0),e.nb=e.$.h.prototype,e.g(t,"Date",e.$,v),e.g(e.$,"now",e.i(Date.now,!1),v),e.g(e.$,"parse",e.i(Date.parse,!1),v),e.g(e.$,"UTC",e.i(Date.UTC,!1),v),t="getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");for(var r=0;r<t.length;r++)n=function(i){return function(s){var u=this.data;u instanceof Date||d(e,e.j,i+" not called on a Date");for(var h=[],m=0;m<arguments.length;m++)h[m]=e.R(arguments[m]);return u[i].apply(u,h)}}(t[r]),b(e,e.$,t[r],n)}function fn(e,t){var n=function(r,i){if(ne(e))var s=this;else{if(i===void 0&&D(e,r,e.I))return r;s=e.s(e.Ma)}r=r===void 0?"":String(r),i=i?String(i):"",/^[gmi]*$/.test(i)||d(e,e.T,"Invalid regexp flag: "+i);try{var u=new ae.RegExp(r,i)}catch(h){d(e,e.T,h.message)}return Pt(e,s,u),s};e.I=e.i(n,!0),e.Ma=e.I.h.prototype,e.g(t,"RegExp",e.I,v),e.g(e.I.h.prototype,"global",void 0,B),e.g(e.I.h.prototype,"ignoreCase",void 0,B),e.g(e.I.h.prototype,"multiline",void 0,B),e.g(e.I.h.prototype,"source","(?:)",B),e.ba.push("Object.defineProperty(RegExp.prototype, 'test',","{configurable: true, writable: true, value:","function test(str) {","return !!this.exec(str);","}","});"),n=function(r,i){function s(C){if(C){var A=q(e,C);return e.g(A,"index",C.index),e.g(A,"input",C.input),A}return null}var u=this.data;if(r=String(r),u.lastIndex=Number(e.G(this,"lastIndex")),De(e,u,i),e.REGEXP_MODE===2)if(te)r=Ue(e,"regexp.exec(string)",{string:r,regexp:u},u,i),r!==we&&(e.g(this,"lastIndex",u.lastIndex),i(s(r)));else{var h=e.ha(),m=Fe(e,u,h,i),T=this;h.onmessage=function(C){clearTimeout(m),e.g(T,"lastIndex",C.data[1]),i(s(C.data[0]))},h.postMessage(["exec",u,u.lastIndex,r])}else r=u.exec(r),e.g(this,"lastIndex",u.lastIndex),i(s(r))},_e(e,e.I,"exec",n)}function hn(e,t){function n(r){var i=e.i(function(s){var u=ne(e)?this:e.Aa(i);return Tt(e,u,s),u},!0);return e.g(i,"prototype",e.Aa(e.D),v),e.g(i.h.prototype,"name",r,v),e.g(t,r,i,v),i}e.D=e.i(function(r){var i=ne(e)?this:e.Aa(e.D);return Tt(e,i,r),i},!0),e.g(t,"Error",e.D,v),e.g(e.D.h.prototype,"message","",v),e.g(e.D.h.prototype,"name","Error",v),n("EvalError"),e.ob=n("RangeError"),e.pb=n("ReferenceError"),e.T=n("SyntaxError"),e.j=n("TypeError"),e.Gb=n("URIError")}function gn(e,t){var n=e.s(e.M);e.g(t,"Math",n,v);var r="E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");for(t=0;t<r.length;t++)e.g(n,r[t],Math[r[t]],B);for(r="abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "),t=0;t<r.length;t++)e.g(n,r[t],e.i(Math[r[t]],!1),v)}function vn(e,t){var n=e.s(e.M);e.g(t,"JSON",n,v),t=function(r){try{var i=JSON.parse(String(r))}catch(s){d(e,e.T,s.message)}return e.Ia(i)},e.g(n,"parse",e.i(t,!1)),t=function(r,i,s){i&&i.H==="Function"?d(e,e.j,"Function replacer on JSON.stringify not supported"):i&&i.H==="Array"?(i=Nr(e,i),i=i.filter(function(h){return typeof h=="string"||typeof h=="number"})):i=null,typeof s!="string"&&typeof s!="number"&&(s=void 0),r=e.R(r);try{var u=JSON.stringify(r,i,s)}catch(h){d(e,e.j,h.message)}return u},e.g(n,"stringify",e.i(t,!1))}function D(e,t,n){if(t==null||!n)return!1;if(n=n.h.prototype,t===n)return!0;for(t=re(e,t);t;){if(t===n)return!0;t=t.xa}return!1}function Pt(e,t,n){t.data=new RegExp(n.source,n.flags),e.g(t,"lastIndex",n.lastIndex,v),e.g(t,"source",n.source,B),e.g(t,"global",n.global,B),e.g(t,"ignoreCase",n.ignoreCase,B),e.g(t,"multiline",n.multiline,B)}function Tt(e,t,n){n&&e.g(t,"message",String(n),v),n=[];for(var r=e.o.length-1;0<=r;r--){var i=e.o[r],s=i.node;s.type==="CallExpression"&&(i=i.U)&&n.length&&(n[n.length-1].Ob=e.G(i,"name")),!s.X||n.length&&s.type!=="CallExpression"||n.push({Nb:s.X})}for(r=String(e.G(t,"name")),s=String(e.G(t,"message")),s=r+": "+s+`
5
+ `,r=0;r<n.length;r++){var u=n[r].Nb;i=n[r].Ob,u=u.source+":"+u.start.line+":"+u.start.ab,s=i?s+(" at "+i+" ("+u+`)
6
+ `):s+(" at "+u+`
7
+ `)}e.g(t,"stack",s.trim(),v)}O.ha=function(){var e=this.ha.Mb;return e||(e=new Blob([rn.join(`
8
+ `)],{type:"application/javascript"}),this.ha.Mb=e),new Worker(URL.createObjectURL(e))};function Ue(e,t,n,r,i){var s={timeout:e.REGEXP_THREAD_TIMEOUT};try{return te.runInNewContext(t,n,s)}catch{i(null),d(e,e.D,"RegExp Timeout: "+r)}return we}function De(e,t,n){if(e.REGEXP_MODE===0)var r=!1;else if(e.REGEXP_MODE===1)r=!0;else if(te)r=!0;else if(typeof Worker=="function"&&typeof URL=="function")r=!0;else if(typeof require=="function"){try{te=require("vm")}catch{}r=!!te}else r=!1;r||(n(null),d(e,e.D,"Regular expressions not supported: "+t))}function Fe(e,t,n,r){return setTimeout(function(){n.terminate(),r(null);try{d(e,e.D,"RegExp Timeout: "+t)}catch{}},e.REGEXP_THREAD_TIMEOUT)}O.Aa=function(e){return this.s(e&&e.h.prototype)};O.s=function(e){if(typeof e!="object")throw Error("Non object prototype");return e=new k(e),D(this,e,this.D)&&(e.H="Error"),e};function je(e){var t=e.s(e.La);return e.g(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.H="Array",t}function bt(e,t,n){var r=e.s(e.Z);return n?(n=e.s(e.M),e.g(r,"prototype",n,v),e.g(n,"constructor",r,v)):r.Ab=!0,e.g(r,"length",t,B),r.H="Function",r}function Ut(e,t,n,r){var i=bt(e,t.oa.length,!0);return i.Va=n,i.node=t,e.g(i,"name",t.id?String(t.id.name):r||"",B),i}O.i=function(e,t){return t=bt(this,e.length,t),t.Ta=e,e.id=this.Ya++,this.g(t,"name",e.name,B),t};O.ub=function(e){var t=bt(this,e.length,!0);return t.Za=e,e.id=this.Ya++,this.g(t,"name",e.name,B),t};O.Ia=function(e){if(e instanceof k)throw Error("Object is already pseudo");if(e==null||e===!0||e===!1||typeof e=="string"||typeof e=="number")return e;if(e instanceof RegExp){var t=this.s(this.Ma);return Pt(this,t,e),t}if(e instanceof Date)return t=this.s(this.nb),t.data=new Date(e.valueOf()),t;if(typeof e=="function"){var n=this;return t=Object.getOwnPropertyDescriptor(e,"prototype"),this.i(function(){var i=Array.prototype.slice.call(arguments).map(function(s){return n.R(s)});return i=e.apply(n,i),n.Ia(i)},!!t)}if(Array.isArray(e)){t=je(this);for(var r=0;r<e.length;r++)r in e&&this.g(t,r,this.Ia(e[r]));return t}t=this.s(this.M);for(r in e)this.g(t,r,this.Ia(e[r]));return t};O.R=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)return e;if(!(e instanceof k))throw Error("Object is not pseudo");if(D(this,e,this.I))return t=new RegExp(e.data.source,e.data.flags),t.lastIndex=e.data.lastIndex,t;if(D(this,e,this.$))return new Date(e.data.valueOf());t=t||{hb:[],Sa:[]};var n=t.hb.indexOf(e);if(n!==-1)return t.Sa[n];if(t.hb.push(e),D(this,e,this.qa)){n=[],t.Sa.push(n);for(var r=this.G(e,"length"),i=0;i<r;i++)rt(this,e,i)&&(n[i]=this.R(this.G(e,i),t))}else for(r in n={},t.Sa.push(n),e.h)i=this.R(e.h[r],t),Object.defineProperty(n,r,{value:i,writable:!0,enumerable:!0,configurable:!0});return t.hb.pop(),t.Sa.pop(),n};function q(e,t){for(var n=je(e),r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++)e.g(n,r[i],t[r[i]]);return n}function Nr(e,t){var n=[],r;for(r in t.h)n[r]=e.G(t,r);return n.length=Rt(e.G(t,"length"))||0,n}function re(e,t){switch(typeof t){case"number":return e.aa.h.prototype;case"boolean":return e.mb.h.prototype;case"string":return e.J.h.prototype}return t?t.xa:null}O.G=function(e,t){if(this.P)throw Error("Getter not supported in that context");if(t=String(t),e!=null||d(this,this.j,"Cannot read property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof k))throw TypeError("Expecting native value or pseudo object");if(t==="length"){if(D(this,e,this.J))return String(e).length}else if(64>t.charCodeAt(0)&&D(this,e,this.J)){var n=Be(t);if(!isNaN(n)&&n<String(e).length)return String(e)[n]}do if(e.h&&t in e.h)return(n=e.V[t])?(this.P=!0,n):e.h[t];while(e=re(this,e))};function rt(e,t,n){if(!(t instanceof k))throw TypeError("Primitive data type has no properties");if(n=String(n),n==="length"&&D(e,t,e.J))return!0;if(D(e,t,e.J)){var r=Be(n);if(!isNaN(r)&&r<String(t).length)return!0}do if(t.h&&n in t.h)return!0;while(t=re(e,t));return!1}O.g=function(e,t,n,r){if(this.Ka)throw Error("Setter not supported in that context");if(t=String(t),e!=null||d(this,this.j,"Cannot set property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof k))throw TypeError("Expecting native value or pseudo object");r&&("get"in r||"set"in r)&&("value"in r||"writable"in r)&&d(this,this.j,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var i=!this.o||Dt(this).S;if(e instanceof k){if(D(this,e,this.J)){var s=Be(t);if(t==="length"||!isNaN(s)&&s<String(e).length){i&&d(this,this.j,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'");return}}if(e.H==="Array")if(s=e.h.length,t==="length"){if(r){if(!("value"in r))return;n=r.value}if(n=Rt(n),isNaN(n)&&d(this,this.ob,"Invalid array length"),n<s)for(u in e.h){var u=Be(u);!isNaN(u)&&n<=u&&delete e.h[u]}}else isNaN(u=Be(t))||(e.h.length=Math.max(s,u+1));if(!e.preventExtensions||t in e.h)if(r){i={},"get"in r&&r.get&&(e.V[t]=r.get,i.get=this.g.ac),"set"in r&&r.set&&(e.Y[t]=r.set,i.set=this.g.bc),"configurable"in r&&(i.configurable=r.configurable),"enumerable"in r&&(i.enumerable=r.enumerable),"writable"in r&&(i.writable=r.writable,delete e.V[t],delete e.Y[t]),"value"in r?(i.value=r.value,delete e.V[t],delete e.Y[t]):n!==Ge&&(i.value=n,delete e.V[t],delete e.Y[t]);try{Object.defineProperty(e.h,t,i)}catch{d(this,this.j,"Cannot redefine property: "+t)}"get"in r&&!r.get&&delete e.V[t],"set"in r&&!r.set&&delete e.Y[t]}else{if(n===Ge)throw ReferenceError("Value not specified");for(r=e;!(t in r.h);)if(r=re(this,r),!r){r=e;break}if(r.Y&&r.Y[t])return this.Ka=!0,r.Y[t];if(r.V&&r.V[t])i&&d(this,this.j,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.h[t]=n}catch{i&&d(this,this.j,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else i&&d(this,this.j,"Can't add property '"+t+"', object is not extensible")}else i&&d(this,this.j,"Can't create property '"+t+"' on '"+e+"'")};O.g.ac=function(){throw Error("Placeholder getter")};O.g.bc=function(){throw Error("Placeholder setter")};function b(e,t,n,r){e.g(t.h.prototype,n,e.i(r,!1),v)}function _e(e,t,n,r){e.g(t.h.prototype,n,e.ub(r),v)}function Dt(e){if(e=e.o[e.o.length-1].scope,!e)throw Error("No scope found");return e}function Nt(e,t,n){var r=!1;if(n&&n.S)r=!0;else{var i=t.body&&t.body[0];i&&i.la&&i.la.type==="Literal"&&i.la.value==="use strict"&&(r=!0)}return i=e.s(null),r=new Pr(n,r,i),n||nn(e,r.object),Ve(e,t,r),r}function Ft(e,t,n){if(!t)throw Error("parentScope required");return e=n||e.s(null),new Pr(t,t.S,e)}function _t(e,t){for(var n=Dt(e);n&&n!==e.N;){if(t in n.object.h)return n.object.h[t];n=n.Va}if(n===e.N&&rt(e,n.object,t))return e.G(n.object,t);n=e.o[e.o.length-1].node,n.type==="UnaryExpression"&&n.operator==="typeof"||d(e,e.pb,t+" is not defined")}function Mr(e,t,n){for(var r=Dt(e),i=r.S;r&&r!==e.N;){if(t in r.object.h){try{r.object.h[t]=n}catch{i&&d(e,e.j,"Cannot assign to read only variable '"+t+"'")}return}r=r.Va}if(r===e.N&&(!i||rt(e,r.object,t)))return e.g(r.object,t,n);d(e,e.pb,t+" is not defined")}function Ve(e,t,n){if(t.jb)var r=t.jb;else{switch(r=Object.create(null),t.type){case"VariableDeclaration":for(var i=0;i<t.fa.length;i++)r[t.fa[i].id.name]=!0;break;case"FunctionDeclaration":r[t.id.name]=t;break;case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"Program":case"SwitchCase":case"SwitchStatement":case"TryStatement":case"WithStatement":case"WhileStatement":var s=t.constructor,u;for(u in t)if(u!=="loc"){var h=t[u];if(h&&typeof h=="object"){if(Array.isArray(h)){for(i=0;i<h.length;i++)if(h[i]&&h[i].constructor===s){var m=Ve(e,h[i],n);for(u in m)r[u]=m[u]}}else if(h.constructor===s)for(u in m=Ve(e,h,n),m)r[u]=m[u]}}}t.jb=r}for(u in r)r[u]===!0?e.g(n.object,u,void 0,xr):e.g(n.object,u,Ut(e,r[u],n),xr);return r}function ne(e){return e.o[e.o.length-1].isConstructor}function Lt(e,t){return t[0]===Se?_t(e,t[1]):e.G(t[0],t[1])}function Bt(e,t,n){return t[0]===Se?Mr(e,t[1],n):e.g(t[0],t[1],n)}function d(e,t,n){throw e.N?(n!==void 0&&t instanceof k&&(t=e.Aa(t),Tt(e,t,n)),Xe(e,4,t),Tr):n===void 0?t:n}function Xe(e,t,n,r){if(t===0)throw TypeError("Should not unwind for NORMAL completions");var i=e.o;e:for(;0<i.length;i.pop()){var s=i[i.length-1];switch(s.node.type){case"TryStatement":s.ea={type:t,value:n,label:r};return;case"CallExpression":case"NewExpression":if(t===3){s.value=n;return}if(t!==4)throw Error("Unsynatctic break/continue not rejected by Acorn");break;case"Program":s.done=!0;break e}if(t===1){if(r?s.labels&&s.labels.indexOf(r)!==-1:s.W||s.Zb){i.pop();return}}else if(t===2&&(r?s.labels&&s.labels.indexOf(r)!==-1:s.W))return}throw D(e,n,e.D)?(t={EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},r=String(e.G(n,"name")),i=e.G(n,"message").valueOf(),t=(t[r]||Error)(i),t.stack=String(e.G(n,"stack"))):t=String(n),e.value=t,t}function L(e,t){switch(t.type){case"ArrayExpression":return"[...]";case"BinaryExpression":case"LogicalExpression":return L(e,t.left)+" "+t.operator+" "+L(e,t.right);case"CallExpression":return L(e,t.callee)+"(...)";case"ConditionalExpression":return L(e,t.test)+" ? "+L(e,t.da)+" : "+L(e,t.alternate);case"Identifier":return t.name;case"Literal":return t.raw;case"MemberExpression":var n=L(e,t.object);return e=L(e,t.Wa),t.bb?n+"["+e+"]":n+"."+e;case"NewExpression":return"new "+L(e,t.callee)+"(...)";case"ObjectExpression":return"{...}";case"ThisExpression":return"this";case"UnaryExpression":return t.operator+" "+L(e,t.K);case"UpdateExpression":return n=L(e,t.K),t.prefix?t.operator+n:n+t.operator}return"???"}function Sr(e,t,n){var r=e.o[e.o.length-1],i=Array.from(n),s=i.shift();n=Math.max(Number(i.shift()||0),0);var u=e.ya();if(s instanceof k&&s.H==="Function"){var h=s;u.type="CallExpression",r=r.scope}else{try{var m=xe(String(s),"taskCode"+e.ic++)}catch(T){d(e,e.T,"Invalid code: "+T.message)}u.type="EvalProgram_",u.body=m.body,r=r.node.arguments[0],tt(u,r?r.start:void 0,r?r.end:void 0),r=e.N,i.length=0}return t=new yn(h,i,r,u,t?n:-1),Rr(e,t,n),t.Db}function Rr(e,t,n){t.time=Date.now()+n,e.ca.push(t),e.ca.sort(function(r,i){return r.time-i.time})}function kr(e,t){for(var n=0;n<e.ca.length;n++)if(e.ca[n].Db==t){e.ca.splice(n,1);break}}function We(e,t,n){if(!e.P)throw Error("Unexpected call to createGetter");e.P=!1,n=Array.isArray(n)?n[0]:n;var r=e.ya();return r.type="CallExpression",e=new y(r,e.o[e.o.length-1].scope),e.ia=2,e.B=n,e.U=t,e.Qa=!0,e.F=[],e}function Gt(e,t,n,r){if(!e.Ka)throw Error("Unexpected call to createSetter");e.Ka=!1,n=Array.isArray(n)?n[0]:e.Na;var i=e.ya();return i.type="CallExpression",e=new y(i,e.o[e.o.length-1].scope),e.ia=2,e.B=n,e.U=t,e.Qa=!0,e.F=[r],e}function At(e,t){return t==null?e.Na:t instanceof k?t:(e=e.s(re(e,t)),e.data=t,e)}O.Xb=function(){return this.N};O.Yb=function(){return this.o};O.ec=function(e){this.o=e};function y(e,t){this.node=e,this.scope=t}function Pr(e,t,n){this.Va=e,this.S=t,this.object=n}function k(e){this.V=Object.create(null),this.Y=Object.create(null),this.h=Object.create(null),this.xa=e}O=k.prototype;O.xa=null;O.H="Object";O.data=null;O.toString=function(){if(!Le)return"[object Interpreter.Object]";if(!(this instanceof k))return String(this);if(this.H==="Array"){var e=jr;e.push(this);try{var t=[],n=this.h.length,r=!1;1024<n&&(n=1e3,r=!0);for(var i=0;i<n;i++){var s=this.h[i];t[i]=s instanceof k&&e.indexOf(s)!==-1?"...":s}r&&t.push("...")}finally{e.pop()}return t.join(",")}if(this.H==="Error"){if(e=jr,e.indexOf(this)!==-1)return"[object Error]";n=this;do if("name"in n.h){t=n.h.name;break}while(n=n.xa);n=this;do if("message"in n.h){r=n.h.message;break}while(n=n.xa);e.push(this);try{t=t&&String(t),r=r&&String(r)}finally{e.pop()}return r?t+": "+r:String(t)}return this.data!==null?String(this.data):"[object "+this.H+"]"};O.valueOf=function(){return!Le||this.data===void 0||this.data===null||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data};function yn(e,t,n,r,i){this.zb=e,this.Lb=t,this.scope=n,this.node=r,this.interval=i,this.Db=++dn,this.time=0}var dn=0;f.prototype.stepArrayExpression=function(e,t,n){n=n.elements;var r=t.A||0;for(t.Oa?(this.g(t.Oa,r,t.value),r++):(t.Oa=je(this),t.Oa.h.length=n.length);r<n.length;){if(n[r])return t.A=r,new y(n[r],t.scope);r++}e.pop(),e[e.length-1].value=t.Oa};f.prototype.stepAssignmentExpression=function(e,t,n){if(!t.ja)return t.ja=!0,t=new y(n.left,t.scope),t.sa=!0,t;if(!t.Da)return t.Fa||(t.Fa=t.value),t.Ba&&(t.ma=t.value),!t.Ba&&n.operator!=="="&&(e=Lt(this,t.Fa),t.ma=e,this.P)?(t.Ba=!0,We(this,e,t.Fa)):(t.Da=!0,n.operator==="="&&n.left.type==="Identifier"&&(t.Pa=n.left.name),new y(n.right,t.scope));if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{var r=t.ma,i=t.value;switch(n.operator){case"=":r=i;break;case"+=":r+=i;break;case"-=":r-=i;break;case"*=":r*=i;break;case"/=":r/=i;break;case"%=":r%=i;break;case"<<=":r<<=i;break;case">>=":r>>=i;break;case">>>=":r>>>=i;break;case"&=":r&=i;break;case"^=":r^=i;break;case"|=":r|=i;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}if(n=Bt(this,t.Fa,r))return t.ta=!0,t.ib=r,Gt(this,n,t.Fa,r);e.pop(),e[e.length-1].value=r}};f.prototype.stepBinaryExpression=function(e,t,n){if(!t.ja)return t.ja=!0,new y(n.left,t.scope);if(!t.Da)return t.Da=!0,t.ma=t.value,new y(n.right,t.scope);e.pop();var r=t.ma;switch(t=t.value,n.operator){case"==":n=r==t;break;case"!=":n=r!=t;break;case"===":n=r===t;break;case"!==":n=r!==t;break;case">":n=r>t;break;case">=":n=r>=t;break;case"<":n=r<t;break;case"<=":n=r<=t;break;case"+":n=r+t;break;case"-":n=r-t;break;case"*":n=r*t;break;case"/":n=r/t;break;case"%":n=r%t;break;case"&":n=r&t;break;case"|":n=r|t;break;case"^":n=r^t;break;case"<<":n=r<<t;break;case">>":n=r>>t;break;case">>>":n=r>>>t;break;case"in":t instanceof k||d(this,this.j,"'in' expects an object, not '"+t+"'"),n=rt(this,t,r);break;case"instanceof":D(this,t,this.O)||d(this,this.j,"'instanceof' expects an object, not '"+t+"'"),n=r instanceof k?D(this,r,t):!1;break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=n};f.prototype.stepBlockStatement=function(e,t,n){var r=t.A||0;if(n=n.body[r])return t.A=r+1,new y(n,t.scope);e.pop()};f.prototype.stepBreakStatement=function(e,t,n){Xe(this,1,void 0,n.label&&n.label.name)};f.prototype.Hb=0;f.prototype.stepCallExpression=function(e,t,n){if(!t.ia){t.ia=1;var r=new y(n.callee,t.scope);return r.sa=!0,r}if(t.ia===1){t.ia=2;var i=t.value;if(Array.isArray(i)){if(t.U=Lt(this,i),i[0]===Se?t.Pb=i[1]==="eval":t.B=i[0],i=t.U,this.P)return t.ia=1,We(this,i,t.value)}else t.U=i;t.F=[],t.A=0}if(i=t.U,!t.Qa){if(t.A!==0&&t.F.push(t.value),n.arguments[t.A])return new y(n.arguments[t.A++],t.scope);if(n.type==="NewExpression"){if(i instanceof k&&!i.Ab||d(this,this.j,L(this,n.callee)+" is not a constructor"),i===this.qa)t.B=je(this);else{var s=i.h.prototype;(typeof s!="object"||s===null)&&(s=this.M),t.B=this.s(s)}t.isConstructor=!0}t.Qa=!0}if(t.eb)e.pop(),e[e.length-1].value=t.isConstructor&&typeof t.value!="object"?t.B:t.value;else{if(t.eb=!0,i instanceof k||d(this,this.j,L(this,n.callee)+" is not a function"),e=i.node){for(n=Nt(this,e.body,i.Va),r=je(this),i=0;i<t.F.length;i++)this.g(r,i,t.F[i]);for(this.g(n.object,"arguments",r),i=0;i<e.oa.length;i++)this.g(n.object,e.oa[i].name,t.F.length>i?t.F[i]:void 0);return n.S||(t.B=At(this,t.B)),this.g(n.object,"this",t.B,Mt),t.value=void 0,new y(e.body,n)}if(i.eval)if(i=t.F[0],typeof i!="string")t.value=i;else{try{r=xe(String(i),"eval"+this.Hb++)}catch(h){d(this,this.T,"Invalid code: "+h.message)}return i=this.ya(),i.type="EvalProgram_",i.body=r.body,tt(i,n.start,n.end),n=t.Pb?t.scope:this.N,n.S?n=Nt(this,r,n):Ve(this,r,n),this.value=void 0,new y(i,n)}else if(i.Ta)t.scope.S||(t.B=At(this,t.B)),t.value=i.Ta.apply(t.B,t.F);else if(i.Za){var u=this;r=i.Za.length-1,r=t.F.concat(Array(r)).slice(0,r),r.push(function(h){t.value=h,u.za=!1}),this.za=!0,t.scope.S||(t.B=At(this,t.B)),i.Za.apply(t.B,r)}else d(this,this.j,L(this,n.callee)+" is not callable")}};f.prototype.stepConditionalExpression=function(e,t,n){var r=t.na||0;if(r===0)return t.na=1,new y(n.test,t.scope);if(r===1){if(t.na=2,(r=!!t.value)&&n.da)return new y(n.da,t.scope);if(!r&&n.alternate)return new y(n.alternate,t.scope);this.value=void 0}e.pop(),n.type==="ConditionalExpression"&&(e[e.length-1].value=t.value)};f.prototype.stepContinueStatement=function(e,t,n){Xe(this,2,void 0,n.label&&n.label.name)};f.prototype.stepDebuggerStatement=function(e){e.pop()};f.prototype.stepDoWhileStatement=function(e,t,n){if(n.type==="DoWhileStatement"&&t.ga===void 0&&(t.value=!0,t.ga=!0),!t.ga)return t.ga=!0,new y(n.test,t.scope);if(!t.value)e.pop();else if(n.body)return t.ga=!1,t.W=!0,new y(n.body,t.scope)};f.prototype.stepEmptyStatement=function(e){e.pop()};f.prototype.stepEvalProgram_=function(e,t,n){var r=t.A||0;if(n=n.body[r])return t.A=r+1,new y(n,t.scope);e.pop(),e[e.length-1].value=this.value};f.prototype.stepExpressionStatement=function(e,t,n){if(!t.ka)return this.value=void 0,t.ka=!0,new y(n.la,t.scope);e.pop(),this.value=t.value};f.prototype.stepForInStatement=function(e,t,n){if(!t.Ub&&(t.Ub=!0,n.left.fa&&n.left.fa[0].ua))return t.scope.S&&d(this,this.T,"for-in loop variable declaration may not have an initializer"),new y(n.left,t.scope);if(!t.Ca)return t.Ca=!0,t.pa||(t.pa=t.value),new y(n.right,t.scope);if(t.W||(t.W=!0,t.u=t.value,t.kb=Object.create(null)),t.Ra===void 0)e:for(;;){if(t.u instanceof k)for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u.h));;){var r=t.wa.shift();if(r===void 0)break;if(Object.prototype.hasOwnProperty.call(t.u.h,r)&&!t.kb[r]&&(t.kb[r]=!0,Object.prototype.propertyIsEnumerable.call(t.u.h,r))){t.Ra=r;break e}}else if(t.u!==null&&t.u!==void 0){for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u));r=t.wa.shift(),r!==void 0;)if(t.kb[r]=!0,Object.prototype.propertyIsEnumerable.call(t.u,r)){t.Ra=r;break e}}if(t.u=re(this,t.u),t.wa=null,t.u===null){e.pop();return}}if(!t.wb)if(t.wb=!0,e=n.left,e.type==="VariableDeclaration")t.pa=[Se,e.fa[0].id.name];else return t.pa=null,t=new y(e,t.scope),t.sa=!0,t;if(t.pa||(t.pa=t.value),!t.ta&&(t.ta=!0,e=t.Ra,r=Bt(this,t.pa,e)))return Gt(this,r,t.pa,e);if(t.Ra=void 0,t.wb=!1,t.ta=!1,n.body)return new y(n.body,t.scope)};f.prototype.stepForStatement=function(e,t,n){switch(t.na){default:if(t.na=1,n.ua)return new y(n.ua,t.scope);break;case 1:if(t.na=2,n.test)return new y(n.test,t.scope);break;case 2:if(t.na=3,n.test&&!t.value)e.pop();else return t.W=!0,new y(n.body,t.scope);break;case 3:if(t.na=1,n.update)return new y(n.update,t.scope)}};f.prototype.stepFunctionDeclaration=function(e){e.pop()};f.prototype.stepFunctionExpression=function(e,t,n){e.pop(),t=e[e.length-1],e=t.scope,n.id&&(e=Ft(this,e)),t.value=Ut(this,n,e,t.Pa),n.id&&this.g(e.object,n.id.name,t.value,Mt)};f.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.sa)e[e.length-1].value=[Se,n.name];else{if(t=_t(this,n.name),this.P)return We(this,t,this.Na);e[e.length-1].value=t}};f.prototype.stepIfStatement=f.prototype.stepConditionalExpression;f.prototype.stepLabeledStatement=function(e,t,n){return e.pop(),e=t.labels||[],e.push(n.label.name),t=new y(n.body,t.scope),t.labels=e,t};f.prototype.stepLiteral=function(e,t,n){e.pop(),t=n.value,t instanceof RegExp&&(n=this.s(this.Ma),Pt(this,n,t),t=n),e[e.length-1].value=t};f.prototype.stepLogicalExpression=function(e,t,n){if(n.operator!=="&&"&&n.operator!=="||")throw SyntaxError("Unknown logical operator: "+n.operator);if(!t.ja)return t.ja=!0,new y(n.left,t.scope);if(t.Da)e.pop(),e[e.length-1].value=t.value;else if(n.operator==="&&"&&!t.value||n.operator==="||"&&t.value)e.pop(),e[e.length-1].value=t.value;else return t.Da=!0,new y(n.right,t.scope)};f.prototype.stepMemberExpression=function(e,t,n){if(!t.Ca)return t.Ca=!0,new y(n.object,t.scope);if(n.bb)if(t.Vb)n=t.value;else return t.u=t.value,t.Vb=!0,new y(n.Wa,t.scope);else t.u=t.value,n=n.Wa.name;if(e.pop(),t.sa)e[e.length-1].value=[t.u,n];else{if(n=this.G(t.u,n),this.P)return We(this,n,t.u);e[e.length-1].value=n}};f.prototype.stepNewExpression=f.prototype.stepCallExpression;f.prototype.stepObjectExpression=function(e,t,n){var r=t.A||0,i=n.h[r];if(t.u){var s=t.Pa;t.Ja[s]||(t.Ja[s]={}),t.Ja[s][i.kind]=t.value,t.A=++r,i=n.h[r]}else t.u=this.s(this.M),t.Ja=Object.create(null);if(i){var u=i.key;if(u.type==="Identifier")s=u.name;else if(u.type==="Literal")s=u.value;else throw SyntaxError("Unknown object structure: "+u.type);return t.Pa=s,new y(i.value,t.scope)}for(u in t.Ja)n=t.Ja[u],"get"in n||"set"in n?this.g(t.u,u,Ge,{configurable:!0,enumerable:!0,get:n.get,set:n.set}):this.g(t.u,u,n.init);e.pop(),e[e.length-1].value=t.u};f.prototype.stepProgram=function(e,t,n){if(e=n.body.shift())return t.done=!1,new y(e,t.scope);t.done=!0};f.prototype.stepReturnStatement=function(e,t,n){if(n.K&&!t.ka)return t.ka=!0,new y(n.K,t.scope);Xe(this,3,t.value)};f.prototype.stepSequenceExpression=function(e,t,n){var r=t.A||0;if(n=n.xb[r])return t.A=r+1,new y(n,t.scope);e.pop(),e[e.length-1].value=t.value};f.prototype.stepSwitchStatement=function(e,t,n){if(!t.ga)return t.ga=1,new y(n.Qb,t.scope);for(t.ga===1&&(t.ga=2,t.hc=t.value,t.cb=-1);;){var r=t.gb||0,i=n.tb[r];if(t.Ha||!i||i.test)if(i||t.Ha||t.cb===-1)if(i){if(!t.Ha&&!t.Fb&&i.test)return t.Fb=!0,new y(i.test,t.scope);if(t.Ha||t.value===t.hc){t.Ha=!0;var s=t.A||0;if(i.da[s])return t.Zb=!0,t.A=s+1,new y(i.da[s],t.scope)}t.Fb=!1,t.A=0,t.gb=r+1}else{e.pop();break}else t.Ha=!0,t.gb=t.cb;else t.cb=r,t.gb=r+1}};f.prototype.stepThisExpression=function(e){e.pop(),e[e.length-1].value=_t(this,"this")};f.prototype.stepThrowStatement=function(e,t,n){if(t.ka)d(this,t.value);else return t.ka=!0,new y(n.K,t.scope)};f.prototype.stepTryStatement=function(e,t,n){if(!t.Rb)return t.Rb=!0,new y(n.block,t.scope);if(t.ea&&t.ea.type===4&&!t.Tb&&n.Ea)return t.Tb=!0,e=Ft(this,t.scope),this.g(e.object,n.Ea.Ua.name,t.ea.value),t.ea=void 0,new y(n.Ea.body,e);if(!t.Sb&&n.fb)return t.Sb=!0,new y(n.fb,t.scope);e.pop(),t.ea&&Xe(this,t.ea.type,t.ea.value,t.ea.label)};f.prototype.stepUnaryExpression=function(e,t,n){if(!t.ka)return t.ka=!0,e=new y(n.K,t.scope),e.sa=n.operator==="delete",e;e.pop();var r=t.value;switch(n.operator){case"-":r=-r;break;case"+":r=+r;break;case"!":r=!r;break;case"~":r=~r;break;case"delete":if(n=!0,Array.isArray(r)){var i=r[0];i===Se&&(i=t.scope),r=String(r[1]);try{delete i.h[r]}catch{t.scope.S?d(this,this.j,"Cannot delete property '"+r+"' of '"+i+"'"):n=!1}}r=n;break;case"typeof":r=r&&r.H==="Function"?"function":typeof r;break;case"void":r=void 0;break;default:throw SyntaxError("Unknown unary operator: "+n.operator)}e[e.length-1].value=r};f.prototype.stepUpdateExpression=function(e,t,n){if(!t.ja)return t.ja=!0,e=new y(n.K,t.scope),e.sa=!0,e;if(t.Ga||(t.Ga=t.value),t.Ba&&(t.ma=t.value),!t.Ba){var r=Lt(this,t.Ga);if(t.ma=r,this.P)return t.Ba=!0,We(this,r,t.Ga)}if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{if(r=Number(t.ma),n.operator==="++")var i=r+1;else if(n.operator==="--")i=r-1;else throw SyntaxError("Unknown update expression: "+n.operator);if(n=n.prefix?i:r,r=Bt(this,t.Ga,i))return t.ta=!0,t.ib=n,Gt(this,r,t.Ga,i);e.pop(),e[e.length-1].value=n}};f.prototype.stepVariableDeclaration=function(e,t,n){n=n.fa;var r=t.A||0,i=n[r];for(t.Bb&&i&&(Mr(this,i.id.name,t.value),t.Bb=!1,i=n[++r]);i;){if(i.ua)return t.A=r,t.Bb=!0,t.Pa=i.id.name,new y(i.ua,t.scope);i=n[++r]}e.pop()};f.prototype.stepWithStatement=function(e,t,n){return t.Ca?(e.pop(),e=Ft(this,t.scope,t.value),new y(n.body,e)):(t.Ca=!0,new y(n.object,t.scope))};f.prototype.stepWhileStatement=f.prototype.stepDoWhileStatement;ae.Interpreter=f;f.prototype.step=f.prototype.lb;f.prototype.run=f.prototype.Eb;f.prototype.appendCode=f.prototype.Jb;f.prototype.createObject=f.prototype.Aa;f.prototype.createObjectProto=f.prototype.s;f.prototype.createAsyncFunction=f.prototype.ub;f.prototype.createNativeFunction=f.prototype.i;f.prototype.getProperty=f.prototype.G;f.prototype.setProperty=f.prototype.g;f.prototype.nativeToPseudo=f.prototype.Ia;f.prototype.pseudoToNative=f.prototype.R;f.prototype.getGlobalScope=f.prototype.Xb;f.prototype.getStateStack=f.prototype.Yb;f.prototype.setStateStack=f.prototype.ec;f.VALUE_IN_DESCRIPTOR=Ge;const mn=e=>e.split(`
9
+ `).map(t=>{const n=t.trim();if(t.includes("__awaiter"))return;if(!n.startsWith("state."))return t;const[i,s]=n.split("="),h=`setRootState('${i.replace("state.","").trim()}', ${s.trim()})`;return`
10
+ ${t}
11
+ ${h}
12
+ `}).filter(Boolean).join(`
13
+ `),Or=e=>e+"JSON",wn=({builder:e,context:t,event:n,rootState:r,localState:i,rootSetState:s,code:u})=>{const h={...r,...i},m=Ar({builder:e,context:t,event:n,state:h}),T=m.map(([X])=>{const H=Or(X);return`var ${X} = ${H} === undefined ? undefined : JSON.parse(${H});`}).join(`
14
+ `),C=mn(u);if(C===""){ee.logger.warn("Skipping evaluation of empty code block.");return}const A=`
15
+ function theFunction() {
16
+ ${T}
17
+
18
+ ${C}
19
+ }
20
+ theFunction();
21
+ `,He=(X,H)=>{const S=Cr(h,X,H);s==null||s(S)},ue=function(X,H){m.forEach(([S,Oe])=>{const $e=JSON.stringify(Oe);X.setProperty(H,Or(S),$e)}),X.setProperty(H,"setRootState",X.createNativeFunction(He))},fe=new f(A,ue);return fe.run(),fe.pseudoToNative(fe.value)};function En(){var e;return typeof process!="undefined"&&ee.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const xn=()=>{var r;if(!En())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return e&&t&&!n?(ee.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},jn=e=>ee.isBrowser()||xn()?en(e):wn(e),Q=class Q{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return Q.cache.get(t)}static setCachedValue(t,n){Q.cache.size>20&&Q.cache.delete(Q.cache.keys().next().value),Q.cache.set(t,{value:n})}};Ct(Q,"cacheLimit",20),Ct(Q,"cache",new Map);let Ee=Q;function Sn({code:e,context:t,localState:n,rootState:r,rootSetState:i,event:s,isExpression:u=!0,enableCache:h}){if(e==="")return;const m={code:qr(e,{isExpression:u}),builder:Qr(),context:t,event:s,rootSetState:i,rootState:r,localState:n};if(h){const T=Ee.getCacheKey(m),C=Ee.getCachedValue(T);if(C)return C.value}try{const T=jn(m);if(h){const C=Ee.getCacheKey(m);Ee.setCachedValue(C,T)}return T}catch(T){ee.logger.error("Failed code evaluation: "+T.message,{code:e});return}}exports.evaluate=Sn;exports.set=Cr;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),v=require("react"),y=require("./blocks-53ae1b87.cjs"),P=require("./server-entry-4133a544.cjs"),B=require("./evaluate-c0eeb4f8.cjs");require("./blocks-exports.cjs");require("./get-class-prop-name-eae60eae.cjs");require("./dynamic-renderer-b29b45ca.cjs");const D=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],A=()=>{const e=process.env.NODE_ENV||"production";return D.includes(e)?e:"production"},O=(e,i,S)=>{const a=String.prototype.split.call(i,/[,[\].]+?/).filter(Boolean).reduce((c,b)=>c!=null?c[b]:c,e);return a===void 0||a===e?S:a};function J(e){var x,E;const i=v.useRef(null),[S,a]=v.useState(()=>"unsubmitted"),[c,b]=v.useState(()=>null),[R,T]=v.useState(()=>"");function q(s){var f,m;const u={...e.builderContext.rootState,...s};e.builderContext.rootSetState?(m=(f=e.builderContext).rootSetState)==null||m.call(f,u):e.builderContext.rootState=u}function h(){return P.isEditing()&&e.previewState||S}function F(s){var f;const u=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")s.preventDefault();else if(u){if(!(e.action||e.sendSubmissionsTo==="email")){s.preventDefault();return}s.preventDefault();const m=s.currentTarget||s.target,k=e.customHeaders||{};let g;const N=new FormData(m),C=Array.from(m.querySelectorAll("input,select,textarea")).filter(t=>!!t.name).map(t=>{let n;const l=t.name;if(t instanceof HTMLInputElement)if(t.type==="radio"){if(t.checked)return n=t.name,{key:l,value:n}}else if(t.type==="checkbox")n=t.checked;else if(t.type==="number"||t.type==="range"){const r=t.valueAsNumber;isNaN(r)||(n=r)}else t.type==="file"?n=t.files:n=t.value;else n=t.value;return{key:l,value:n}});let d=e.contentType;if(e.sendSubmissionsTo==="email"&&(d="multipart/form-data"),Array.from(C).forEach(({value:t})=>{(t instanceof File||Array.isArray(t)&&t[0]instanceof File||t instanceof FileList)&&(d="multipart/form-data")}),d!=="application/json")g=N;else{const t={};Array.from(C).forEach(({value:n,key:l})=>{B.set(t,l,n)}),g=JSON.stringify(t)}d&&d!=="multipart/form-data"&&(u&&((f=e.action)!=null&&f.includes("zapier.com"))||(k["content-type"]=d));const j=new CustomEvent("presubmit",{detail:{body:g}});if(i.current&&(i.current.dispatchEvent(j),j.defaultPrevented))return;a("sending");const w=`${A()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?w:e.action,{body:g,headers:k,method:e.method||"post"}).then(async t=>{let n;const l=t.headers.get("content-type");if(l&&l.indexOf("application/json")!==-1?n=await t.json():n=await t.text(),!t.ok&&e.errorMessagePath){let r=O(n,e.errorMessagePath);r&&(typeof r!="string"&&(r=JSON.stringify(r)),T(r),q({formErrorMessage:r}))}if(b(n),a(t.ok?"success":"error"),t.ok){const r=new CustomEvent("submit:success",{detail:{res:t,body:n}});if(i.current){if(i.current.dispatchEvent(r),r.defaultPrevented)return;e.resetFormOnSubmit!==!1&&i.current.reset()}if(e.successUrl)if(i.current){const M=new CustomEvent("route",{detail:{url:e.successUrl}});i.current.dispatchEvent(M),M.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},t=>{const n=new CustomEvent("submit:error",{detail:{error:t}});i.current&&(i.current.dispatchEvent(n),n.defaultPrevented)||(b(t),a("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:i,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:s=>F(s),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(E=(x=e.builderBlock)==null?void 0:x.children)==null?void 0:E.map((s,u)=>o.jsx(y.Block,{block:s,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${u}`))}):null,h()==="error"?o.jsx(y.Blocks,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,h()==="sending"?o.jsx(y.Blocks,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,h()==="error"&&c?o.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(c,null,2)}):null,h()==="success"?o.jsx(y.Blocks,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",o.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}exports.default=J;
@@ -1,9 +1,10 @@
1
1
  import { jsxs as N, Fragment as w, jsx as u } from "react/jsx-runtime";
2
2
  import { useRef as J, useState as y } from "react";
3
- import { Block as O, Blocks as S, set as U } from "./blocks-f55c7d3e.js";
4
- import { isEditing as j } from "./server-entry-d2020acf.js";
3
+ import { Block as O, Blocks as S } from "./blocks-426e0c44.js";
4
+ import { isEditing as U } from "./server-entry-feff6177.js";
5
+ import { set as j } from "./evaluate-26c0fdb7.js";
5
6
  import "./blocks-exports.mjs";
6
- import "./get-class-prop-name-a677d7a5.js";
7
+ import "./get-class-prop-name-0a91c3bd.js";
7
8
  import "./dynamic-renderer-8b343325.js";
8
9
  const R = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], $ = () => {
9
10
  const e = process.env.NODE_ENV || "production";
@@ -12,7 +13,7 @@ const R = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud",
12
13
  const s = String.prototype.split.call(i, /[,[\].]+?/).filter(Boolean).reduce((a, b) => a != null ? a[b] : a, e);
13
14
  return s === void 0 || s === e ? v : s;
14
15
  };
15
- function G(e) {
16
+ function Q(e) {
16
17
  var E, x;
17
18
  const i = J(null), [v, s] = y(() => "unsubmitted"), [a, b] = y(() => null), [q, F] = y(() => "");
18
19
  function D(o) {
@@ -24,7 +25,7 @@ function G(e) {
24
25
  e.builderContext.rootSetState ? (f = (m = e.builderContext).rootSetState) == null || f.call(m, c) : e.builderContext.rootState = c;
25
26
  }
26
27
  function h() {
27
- return j() && e.previewState || v;
28
+ return U() && e.previewState || v;
28
29
  }
29
30
  function P(o) {
30
31
  var m;
@@ -71,7 +72,7 @@ function G(e) {
71
72
  else {
72
73
  const t = {};
73
74
  Array.from(k).forEach(({ value: n, key: l }) => {
74
- U(t, l, n);
75
+ j(t, l, n);
75
76
  }), g = JSON.stringify(t);
76
77
  }
77
78
  d && d !== "multipart/form-data" && (c && ((m = e.action) != null && m.includes("zapier.com")) || (C["content-type"] = d));
@@ -178,5 +179,5 @@ function G(e) {
178
179
  ] });
179
180
  }
180
181
  export {
181
- G as default
182
+ Q as default
182
183
  };
@@ -1,4 +1,4 @@
1
- import { TARGET as e } from "./server-entry-d2020acf.js";
1
+ import { TARGET as e } from "./server-entry-feff6177.js";
2
2
  const a = () => {
3
3
  switch (e) {
4
4
  case "react":
@@ -1 +1 @@
1
- "use strict";const e=require("./server-entry-966ac144.cjs"),s=()=>{switch(e.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};exports.getClassPropName=s;
1
+ "use strict";const e=require("./server-entry-4133a544.cjs"),s=()=>{switch(e.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};exports.getClassPropName=s;
@@ -1,36 +1,37 @@
1
- import { jsxs as r, Fragment as m, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as d, Fragment as f, jsx as o } from "react/jsx-runtime";
2
+ import { useEffect as v } from "react";
2
3
  function x(e) {
3
4
  return e.replace(/http(s)?:/, "");
4
5
  }
5
- function v(e = "", i, t) {
6
+ function y(e = "", i, t) {
6
7
  const n = new RegExp("([?&])" + i + "=.*?(&|$)", "i"), c = e.indexOf("?") !== -1 ? "&" : "?";
7
8
  return e.match(n) ? e.replace(n, "$1" + i + "=" + encodeURIComponent(t) + "$2") : e + c + i + "=" + encodeURIComponent(t);
8
9
  }
9
- function y(e, i) {
10
+ function $(e, i) {
10
11
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !i)
11
12
  return e;
12
13
  if (i === "master")
13
14
  return x(e);
14
15
  const t = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
15
16
  if (t) {
16
- const n = e.split(t[0]), c = t[3], d = i.match("x") ? i : `${i}x`;
17
- return x(`${n[0]}_${d}${c}`);
17
+ const n = e.split(t[0]), c = t[3], r = i.match("x") ? i : `${i}x`;
18
+ return x(`${n[0]}_${r}${c}`);
18
19
  }
19
20
  return null;
20
21
  }
21
- function u(e) {
22
+ function m(e) {
22
23
  if (!e)
23
24
  return e;
24
25
  const i = [100, 200, 400, 800, 1200, 1600, 2e3];
25
26
  if (e.match(/builder\.io/)) {
26
27
  let t = e;
27
28
  const n = Number(e.split("?width=")[1]);
28
- return isNaN(n) || (t = `${t} ${n}w`), i.filter((c) => c !== n).map((c) => `${v(e, "width", c)} ${c}w`).concat([t]).join(", ");
29
+ return isNaN(n) || (t = `${t} ${n}w`), i.filter((c) => c !== n).map((c) => `${y(e, "width", c)} ${c}w`).concat([t]).join(", ");
29
30
  }
30
- return e.match(/cdn\.shopify\.com/) ? i.map((t) => [y(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, n]) => `${t} ${n}w`).concat([e]).join(", ") : e;
31
+ return e.match(/cdn\.shopify\.com/) ? i.map((t) => [$(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, n]) => `${t} ${n}w`).concat([e]).join(", ") : e;
31
32
  }
32
- function w(e) {
33
- var c, d, f, h, s, g;
33
+ function R(e) {
34
+ var c, r, u, h, s, g;
34
35
  function i() {
35
36
  var b;
36
37
  const a = e.image || e.src;
@@ -41,10 +42,10 @@ function w(e) {
41
42
  if (!e.noWebp) {
42
43
  if (e.srcset && ((b = e.image) != null && b.includes("builder.io/api/v1/image"))) {
43
44
  if (!e.srcset.includes(e.image.split("?")[0]))
44
- return console.debug("Removed given srcset"), u(a);
45
+ return console.debug("Removed given srcset"), m(a);
45
46
  } else if (e.image && !e.srcset)
46
- return u(a);
47
- return u(a);
47
+ return m(a);
48
+ return m(a);
48
49
  }
49
50
  }
50
51
  function t() {
@@ -61,9 +62,10 @@ function w(e) {
61
62
  };
62
63
  return e.aspectRatio ? l : void 0;
63
64
  }
64
- return /* @__PURE__ */ r(m, { children: [
65
- /* @__PURE__ */ r(m, { children: [
66
- /* @__PURE__ */ r("picture", { children: [
65
+ return v(() => {
66
+ }, []), /* @__PURE__ */ d(f, { children: [
67
+ /* @__PURE__ */ d(f, { children: [
68
+ /* @__PURE__ */ d("picture", { children: [
67
69
  t() ? /* @__PURE__ */ o("source", { type: "image/webp", srcSet: t() }) : null,
68
70
  /* @__PURE__ */ o(
69
71
  "img",
@@ -77,33 +79,33 @@ function w(e) {
77
79
  objectFit: e.backgroundSize || "cover",
78
80
  ...n()
79
81
  },
80
- className: "builder-image" + (e.className ? " " + e.className : "") + " img-56bbd606",
82
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-2d6925f2",
81
83
  src: e.image,
82
84
  srcSet: i(),
83
85
  sizes: e.sizes
84
86
  }
85
87
  )
86
88
  ] }),
87
- e.aspectRatio && !((d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && e.fitContent) ? /* @__PURE__ */ o(
89
+ e.aspectRatio && !((r = (c = e.builderBlock) == null ? void 0 : c.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ o(
88
90
  "div",
89
91
  {
90
- className: "builder-image-sizer div-56bbd606",
92
+ className: "builder-image-sizer div-2d6925f2",
91
93
  style: {
92
94
  paddingTop: e.aspectRatio * 100 + "%"
93
95
  }
94
96
  }
95
97
  ) : null,
96
- (h = (f = e.builderBlock) == null ? void 0 : f.children) != null && h.length && e.fitContent ? /* @__PURE__ */ o(m, { children: e.children }) : null,
97
- !e.fitContent && ((g = (s = e.builderBlock) == null ? void 0 : s.children) != null && g.length) ? /* @__PURE__ */ o("div", { className: "div-56bbd606-2", children: e.children }) : null
98
+ (h = (u = e.builderBlock) == null ? void 0 : u.children) != null && h.length && e.fitContent ? /* @__PURE__ */ o(f, { children: e.children }) : null,
99
+ !e.fitContent && ((g = (s = e.builderBlock) == null ? void 0 : s.children) != null && g.length) ? /* @__PURE__ */ o("div", { className: "div-2d6925f2-2", children: e.children }) : null
98
100
  ] }),
99
- /* @__PURE__ */ o("style", { children: `.img-56bbd606 {
101
+ /* @__PURE__ */ o("style", { children: `.img-2d6925f2 {
100
102
  opacity: 1;
101
103
  transition: opacity 0.2s ease-in-out;
102
- }.div-56bbd606 {
104
+ }.div-2d6925f2 {
103
105
  width: 100%;
104
106
  pointer-events: none;
105
107
  font-size: 0;
106
- }.div-56bbd606-2 {
108
+ }.div-2d6925f2-2 {
107
109
  display: flex;
108
110
  flex-direction: column;
109
111
  align-items: stretch;
@@ -116,5 +118,5 @@ function w(e) {
116
118
  ] });
117
119
  }
118
120
  export {
119
- w as default
121
+ R as default
120
122
  };
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),b=require("react");function g(e){return e.replace(/http(s)?:/,"")}function x(e="",i,t){const n=new RegExp("([?&])"+i+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(n)?e.replace(n,"$1"+i+"="+encodeURIComponent(t)+"$2"):e+a+i+"="+encodeURIComponent(t)}function j(e,i){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!i)return e;if(i==="master")return g(e);const t=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(t){const n=e.split(t[0]),a=t[3],r=i.match("x")?i:`${i}x`;return g(`${n[0]}_${r}${a}`)}return null}function d(e){if(!e)return e;const i=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let t=e;const n=Number(e.split("?width=")[1]);return isNaN(n)||(t=`${t} ${n}w`),i.filter(a=>a!==n).map(a=>`${x(e,"width",a)} ${a}w`).concat([t]).join(", ")}return e.match(/cdn\.shopify\.com/)?i.map(t=>[j(e,`${t}x${t}`),t]).filter(([t])=>!!t).map(([t,n])=>`${t} ${n}w`).concat([e]).join(", "):e}function y(e){var a,r,s,u,f,m;function i(){var h;const o=e.image||e.src;if(!o||!(o.match(/builder\.io/)||o.match(/cdn\.shopify\.com/)))return e.srcset;if(!e.noWebp){if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),d(o)}else if(e.image&&!e.srcset)return d(o);return d(o)}}function t(){var l;return(l=i==null?void 0:i())!=null&&l.match(/builder\.io/)&&!e.noWebp?i().replace(/\?/g,"?format=webp&"):""}function n(){const l={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?l:void 0}return b.useEffect(()=>{},[]),c.jsxs(c.Fragment,{children:[c.jsxs(c.Fragment,{children:[c.jsxs("picture",{children:[t()?c.jsx("source",{type:"image/webp",srcSet:t()}):null,c.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...n()},className:"builder-image"+(e.className?" "+e.className:"")+" img-2d6925f2",src:e.image,srcSet:i(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?c.jsx("div",{className:"builder-image-sizer div-2d6925f2",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(u=(s=e.builderBlock)==null?void 0:s.children)!=null&&u.length&&e.fitContent?c.jsx(c.Fragment,{children:e.children}):null,!e.fitContent&&((m=(f=e.builderBlock)==null?void 0:f.children)!=null&&m.length)?c.jsx("div",{className:"div-2d6925f2-2",children:e.children}):null]}),c.jsx("style",{children:`.img-2d6925f2 {
2
+ opacity: 1;
3
+ transition: opacity 0.2s ease-in-out;
4
+ }.div-2d6925f2 {
5
+ width: 100%;
6
+ pointer-events: none;
7
+ font-size: 0;
8
+ }.div-2d6925f2-2 {
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: stretch;
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ width: 100%;
16
+ height: 100%;
17
+ }`})]})}exports.default=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./server-entry-966ac144.cjs");function n(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},i.isEditing()&&e.imgSrc||"default-key")}exports.default=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./server-entry-4133a544.cjs");function n(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},i.isEditing()&&e.imgSrc||"default-key")}exports.default=n;
@@ -1,5 +1,5 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { isEditing as e } from "./server-entry-d2020acf.js";
2
+ import { isEditing as e } from "./server-entry-feff6177.js";
3
3
  function c(t) {
4
4
  return /* @__PURE__ */ i(
5
5
  "img",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-966ac144.cjs");require("react");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-4133a544.cjs");require("react");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
@@ -1,5 +1,5 @@
1
1
  import { Blocks as o, BuilderContext as i, Button as s, Columns as n, Content as c, Fragment as g, Image as m, Section as a, Symbol as d, Text as l, Video as u } from "./blocks-exports.mjs";
2
- import { _processContentResult as f, createRegisterComponentMessage as B, fetchBuilderProps as C, fetchEntries as E, fetchOneEntry as h, getBuilderSearchParams as x, isEditing as S, isPreviewing as b, register as P, setEditorSettings as k, subscribeToEditor as y, track as R } from "./server-entry-d2020acf.js";
2
+ import { _processContentResult as f, createRegisterComponentMessage as B, fetchBuilderProps as C, fetchEntries as E, fetchOneEntry as h, getBuilderSearchParams as x, isEditing as S, isPreviewing as b, register as P, setEditorSettings as k, subscribeToEditor as y, track as R } from "./server-entry-feff6177.js";
3
3
  import "react";
4
4
  export {
5
5
  o as Blocks,
package/lib/edge/init.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-966ac144.cjs"),SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(t){}const INJECTED_IVM_GLOBAL="BUILDER_IVM";let IVM_INSTANCE=null;const setIvm=(t,e={})=>{IVM_INSTANCE=t,setIsolateContext(e)},SHOULD_MENTION_INITIALIZE_SCRIPT=SDK_NAME==="@builder.io/sdk-react-nextjs"||SDK_NAME==="@builder.io/sdk-react",getIvm=()=>{try{if(IVM_INSTANCE)return IVM_INSTANCE;const e=safeDynamicRequire("isolated-vm");if(e)return e}catch(e){serverEntry.logger.error("isolated-vm import error.",e)}const t=`${serverEntry.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-4133a544.cjs"),SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(t){}const INJECTED_IVM_GLOBAL="BUILDER_IVM";let IVM_INSTANCE=null;const setIvm=(t,e={})=>{IVM_INSTANCE=t,setIsolateContext(e)},SHOULD_MENTION_INITIALIZE_SCRIPT=SDK_NAME==="@builder.io/sdk-react-nextjs"||SDK_NAME==="@builder.io/sdk-react",getIvm=()=>{try{if(IVM_INSTANCE)return IVM_INSTANCE;const e=safeDynamicRequire("isolated-vm");if(e)return e}catch(e){serverEntry.logger.error("isolated-vm import error.",e)}const t=`${serverEntry.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
2
2
 
3
3
  SOLUTION: In a server-only execution path within your application, do one of the following:
4
4
 
package/lib/edge/init.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import ivm from "isolated-vm";
2
- import { TARGET, logger, MSG_PREFIX } from "./server-entry-d2020acf.js";
2
+ import { TARGET, logger, MSG_PREFIX } from "./server-entry-feff6177.js";
3
3
  const SDK_NAME_FOR_TARGET = (() => {
4
4
  switch (TARGET) {
5
5
  case "rsc":
@@ -1,5 +1,5 @@
1
1
  import { createElement as t } from "react";
2
- import { isEditing as a } from "./server-entry-d2020acf.js";
2
+ import { isEditing as a } from "./server-entry-feff6177.js";
3
3
  function d(e) {
4
4
  return /* @__PURE__ */ t(
5
5
  "input",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("./server-entry-966ac144.cjs");function a(e){return t.createElement("input",{...e.attributes,key:u.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}exports.default=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("./server-entry-4133a544.cjs");function a(e){return t.createElement("input",{...e.attributes,key:u.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}exports.default=a;
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { createElement as m } from "react";
3
- import { isEditing as n } from "./server-entry-d2020acf.js";
3
+ import { isEditing as n } from "./server-entry-feff6177.js";
4
4
  function r(e) {
5
5
  var t;
6
6
  return /* @__PURE__ */ m(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),r=require("./server-entry-966ac144.cjs");function i(e){var u;return n.createElement("select",{...e.attributes,value:e.value,key:r.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(u=e.options)==null?void 0:u.map((t,a)=>l.jsx("option",{value:t.value,children:t.name||t.value},`${t.name}-${a}`)))}exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),r=require("./server-entry-4133a544.cjs");function i(e){var u;return n.createElement("select",{...e.attributes,value:e.value,key:r.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(u=e.options)==null?void 0:u.map((t,a)=>l.jsx("option",{value:t.value,children:t.name||t.value},`${t.name}-${a}`)))}exports.default=i;
@@ -0,0 +1,2 @@
1
+ "use strict";const I="react",ce=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},V=e=>e instanceof URLSearchParams?ce(e):e,M=e=>typeof e=="string"?e:e instanceof URLSearchParams?e.toString():new URLSearchParams(e).toString();function c(){return typeof window!="undefined"&&typeof document!="undefined"}function ue(){return c()&&window.self!==window.top}function U(e){return ue()&&M(e||window.location.search).indexOf("builder.frameEditing=")!==-1}function de(e){const t=e||(c()?window.location.search:void 0);return t?M(t).indexOf("builder.preview=")!==-1:!1}const le=e=>({type:"builder.registerComponent",data:F(e)}),fe=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`};function F(e){return JSON.parse(JSON.stringify(e,(t,n)=>typeof n=="function"?fe(n):n))}const T={};function N(e,t){let n=T[e];if(n||(n=T[e]=[]),n.push(t),c()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const x={};function ge(e){if(c()){Object.assign(x,e);const t={type:"builder.settingsChange",data:x};parent.postMessage(t,"*")}}const R="builder.",he="options.",k=e=>{if(!e)return{};const t=V(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(R)){const o=r.replace(R,"").replace(he,"");n[o]=t[r]}}),n},pe=()=>{if(!c())return{};const e=new URLSearchParams(window.location.search);return k(e)},b="[Builder.io]: ",d={log:(...e)=>console.log(b,...e),error:(...e)=>console.error(b,...e),warn:(...e)=>console.warn(b,...e),debug:(...e)=>console.debug(b,...e)},p=e=>e!=null,me=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},D=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){d.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},j=async e=>D(e),ye=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(p).join("; "),Se=[["secure",""],["SameSite","None"]],we=({name:e,value:t,expires:n})=>{const o=(c()?location.protocol==="https:":!0)?Se:[[]],s=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...s,["path","/"],["domain",me(window.location.hostname)],...o];return ye(a)},K=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=we({name:e,value:t,expires:n});document.cookie=o}catch(o){d.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}};function be(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function _(){return be().replace(/-/g,"")}const W="builderSessionId",Ie=async({canTrack:e})=>{if(!e)return;const t=await j({name:W,canTrack:e});if(p(t))return t;{const n=ve();return Ee({id:n,canTrack:e}),n}},ve=()=>_(),Ee=({id:e,canTrack:t})=>K({name:W,value:e,canTrack:t}),$=()=>c()&&typeof localStorage!="undefined"?localStorage:void 0,ke=({key:e,canTrack:t})=>{var n;try{return t?(n=$())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},Pe=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=$())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},G="builderVisitorId",Ce=({canTrack:e})=>{if(!e)return;const t=ke({key:G,canTrack:e});if(p(t))return t;{const n=Oe();return Ae({id:n,canTrack:e}),n}},Oe=()=>_(),Ae=({id:e,canTrack:t})=>Pe({key:G,value:e,canTrack:t}),Te=()=>{if(c()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},xe=()=>typeof navigator=="object"&&navigator.userAgent||"",z=()=>{const e=xe(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),r=Te();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},Re=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Ie({canTrack:e}),n=Ce({canTrack:e});return{sessionId:t,visitorId:n}},Be=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await Re({canTrack:t}),userAttributes:z(),ownerId:n}});async function J(e){if(!e.apiKey){d.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!U()&&(c()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Be(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Le=e=>J({...e,canTrack:!0}),Ve=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function H(e,t){if(!t.origin.startsWith("http")&&!t.origin.startsWith("https"))return!1;const n=new URL(t.origin),r=n.hostname;return(e||Ve).findIndex(o=>o.startsWith("*.")?r.endsWith(o.slice(1)):o===r)>-1}const Me="2.0.5",Ue=()=>{N("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let B=!1;const X=(e={})=>{var t,n;B||(B=!0,c()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:Me,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",r=>{var s,a;if(!H(e.trustedHosts,r))return;const{data:o}=r;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const l=o.data.text,y=o.data.arguments||[],m=o.data.id,v=new Function(l);let u,g=null;try{u=v.apply(null,y)}catch(h){g=h}g?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):u&&typeof u.then=="function"?u.then(h=>{var S;(S=window.parent)==null||S.postMessage({type:"builder.evaluateResult",data:{id:m,result:h}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:u,id:m}},"*");break}}})))},q=({model:e,trustedHosts:t,callbacks:n})=>r=>{if(!H(t,r))return;const{data:o}=r;if(o)switch(o.type){case"builder.configureSdk":{n.configureSdk(o.data);break}case"builder.triggerAnimation":{n.animation(o.data);break}case"builder.contentUpdate":{const s=o.data,a=s.key||s.alias||s.entry||s.modelName,l=s.data;a===e&&n.contentUpdate(l);break}}},Fe=(e,t,n)=>{if(!c)return d.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};X();const r=q({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},Ne="builder.tests",P=e=>`${Ne}.${e}`,De=({contentId:e})=>j({name:P(e),canTrack:!0}),je=({contentId:e})=>D({name:P(e),canTrack:!0}),Ke=({contentId:e,value:t})=>K({name:P(e),value:t,canTrack:!0}),Q=e=>p(e.id)&&p(e.variations)&&Object.keys(e.variations).length>0,_e=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const a=(o=t[s])==null?void 0:o.testRatio;if(n+=a,r<n)return s}return e},Y=e=>{const t=_e(e);return Ke({contentId:e.id,value:t}).catch(n=>{d.error("could not store A/B test variation: ",n)}),t},Z=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},We=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!Q(e))return e;const n=je({contentId:e.id})||Y({variations:e.variations,id:e.id}),r=Z({item:e,testGroupId:n});return{...e,...r}},$e=async({item:e,canTrack:t})=>{if(!t||!Q(e))return e;const r=await De({contentId:e.id})||Y({variations:e.variations,id:e.id}),o=Z({item:e,testGroupId:r});return{...e,...o}},ee=e=>p(e)?e:!0;function Ge(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:globalThis}function ze(){const e=Ge().fetch;if(typeof e=="undefined")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
2
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const te=ze();function E(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],a=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...E(s,a,n)}:{...r,[a]:s}},{})}function ne(e,t,n={}){for(const r in e){const o=e[r],s=t?t+"."+r:r;o&&typeof o=="object"&&!Array.isArray(o)&&!Object.keys(o).find(a=>a.startsWith("$"))?ne(o,s,n):n[s]=o}return n}const Je="v3",L=e=>typeof e=="number"&&!isNaN(e)&&e>=0,C=e=>{const{limit:t=30,userAttributes:n,query:r,model:o,apiKey:s,enrich:a,locale:l,apiVersion:y=Je,fields:m,omit:v,offset:u,cacheSeconds:g,staleCacheSeconds:h,sort:S,includeUnpublished:O}=e;if(!s)throw new Error("Missing API key");if(!["v3"].includes(y))throw new Error(`Invalid apiVersion: expected 'v3', received '${y}'`);const ie=t!==1,i=new URL(`https://cdn.builder.io/api/${y}/content/${o}`);if(i.searchParams.set("apiKey",s),i.searchParams.set("limit",String(t)),i.searchParams.set("noTraverse",String(ie)),i.searchParams.set("includeRefs",String(!0)),l&&i.searchParams.set("locale",l),a&&i.searchParams.set("enrich",String(a)),i.searchParams.set("omit",v||"meta.componentsUsed"),m&&i.searchParams.set("fields",m),Number.isFinite(u)&&u>-1&&i.searchParams.set("offset",String(Math.floor(u))),typeof O=="boolean"&&i.searchParams.set("includeUnpublished",String(O)),g&&L(g)&&i.searchParams.set("cacheSeconds",String(g)),h&&L(h)&&i.searchParams.set("staleCacheSeconds",String(h)),S){const f=E({sort:S});for(const w in f)i.searchParams.set(w,JSON.stringify(f[w]))}const ae={...pe(),...V(e.options||{})},A=E(ae);for(const f in A)i.searchParams.set(f,String(A[f]));if(n&&i.searchParams.set("userAttributes",JSON.stringify(n)),r){const f=ne({query:r});for(const w in f)i.searchParams.set(w,JSON.stringify(f[w]))}return i},He=e=>"results"in e;async function re(e){const t=await se({...e,limit:1});return t&&t[0]||null}const Xe=async e=>{var s;const t=C(e);return await(await((s=e.fetch)!=null?s:te)(t.href,e.fetchOptions)).json()},oe=async(e,t,n=C(e))=>{const r=ee(e.canTrack);if(n.search.includes("preview="),!r||!(c()||I==="reactNative"))return t.results;try{const o=[];for(const s of t.results)o.push(await $e({item:s,canTrack:r}));t.results=o}catch(o){d.error("Could not process A/B tests. ",o)}return t.results};async function se(e){try{const t=C(e),n=await Xe(e);return He(n)?oe(e,n):(d.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return d.error("Error fetching data. ",t),null}}const qe=async e=>{var r,o,s;const t=e.path||((r=e.url)==null?void 0:r.pathname)||((o=e.userAttributes)==null?void 0:o.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:k(e.searchParams||((s=e.url)==null?void 0:s.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await re(n)}};exports.MSG_PREFIX=b;exports.TARGET=I;exports._processContentResult=oe;exports._track=J;exports.checkIsDefined=p;exports.createEditorListener=q;exports.createRegisterComponentMessage=le;exports.fetch=te;exports.fetchBuilderProps=qe;exports.fetchEntries=se;exports.fetchOneEntry=re;exports.getBuilderSearchParams=k;exports.getDefaultCanTrack=ee;exports.getUserAttributes=z;exports.handleABTestingSync=We;exports.isBrowser=c;exports.isEditing=U;exports.isPreviewing=de;exports.logger=d;exports.register=N;exports.registerInsertMenu=Ue;exports.serializeComponentInfo=F;exports.setEditorSettings=ge;exports.setupBrowserForEditing=X;exports.subscribeToEditor=Fe;exports.track=Le;