@streamline-pulse/formkrafter-wc 0.27.0 → 0.28.0
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.
- package/dist/components/fk-address-search.js +1 -1
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-form-review.js +1 -1
- package/dist/components/fk-geo-map.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-slot-picker.d.ts +11 -0
- package/dist/components/fk-slot-picker.js +1 -0
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/fk-variable-picker.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-QhU0FQmA.js → p-1Ki_1K2W.js} +1 -1
- package/dist/components/{p-Dwz_AerL.js → p-B5gG7fHb.js} +1 -1
- package/dist/components/{p-N4ocWM74.js → p-BEft-cf2.js} +1 -1
- package/dist/components/p-BGax6QkM.js +1 -0
- package/dist/components/p-Bs2c_rtu.js +1 -0
- package/dist/components/{p-CY-uaS2y.js → p-C8yXvs3g.js} +1 -1
- package/dist/components/{p-DoRivFlV.js → p-CIZUeonQ.js} +1 -1
- package/dist/components/{p-Deomtk7O.js → p-CuF0gbWB.js} +1 -1
- package/dist/components/{p-4J6WHge8.js → p-DIW5FtAy.js} +1 -1
- package/dist/components/{p-6IFMAlaM.js → p-DJxeNTfC.js} +1 -1
- package/dist/components/{p-DLWd_wkA.js → p-DK2UgrV9.js} +1 -1
- package/dist/components/{p-CV5yMN-W.js → p-Ddiv4Djm.js} +7 -7
- package/dist/components/{p-BJPNcA2I.js → p-Di7uMflS.js} +1 -1
- package/dist/components/{p-BdV2F17R.js → p-DskfAsd6.js} +1 -1
- package/dist/components/{p-Ck8lu3cO.js → p-Dt5tFknh.js} +1 -1
- package/dist/components/{p-xwwy55X1.js → p-DtPhC0nx.js} +1 -1
- package/dist/components/p-FSCguIuu.js +1 -0
- package/dist/components/p-YMLbA4H2.js +1 -0
- package/dist/components/{p-DSArI0Qr.js → p-lOT7NMxD.js} +1 -1
- package/dist/components/{p-AxQWXLy8.js → p-xvN-OJAU.js} +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/{p-1f9e4187.entry.js → p-730cac62.entry.js} +1 -1
- package/dist/formkrafter-wc/{p-f7ffd2a4.entry.js → p-7bc82da2.entry.js} +1 -1
- package/dist/formkrafter-wc/{p--7ABNliQ.js → p-CiXmtjEN.js} +1 -1
- package/dist/formkrafter-wc/{p-DoSYU_vL.js → p-D3ItRsmP.js} +7 -7
- package/dist/formkrafter-wc/p-d1d683b6.entry.js +1 -0
- package/dist/types/components/fk-slot-picker/fk-slot-picker.d.ts +33 -0
- package/dist/types/components.d.ts +93 -2
- package/dist/types/registry/default-bricks.d.ts +36 -0
- package/package.json +2 -2
- package/dist/components/p-CJAIx_lh.js +0 -1
- package/dist/components/p-D23KNvvF.js +0 -1
- package/dist/components/p-yZ54sN-p.js +0 -1
- package/dist/formkrafter-wc/p-36f8ef99.entry.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,i={exports:{}},r=(e||(e=1,i.exports=function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var t={},e={"==":function(t,e){return t==e},"===":function(t,e){return t===e},"!=":function(t,e){return t!=e},"!==":function(t,e){return t!==e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e,i){return void 0===i?t<e:t<e&&e<i},"<=":function(t,e,i){return void 0===i?t<=e:t<=e&&e<=i},"!!":function(e){return t.truthy(e)},"!":function(e){return!t.truthy(e)},"%":function(t,e){return t%e},log:function(t){return console.log(t),t},in:function(t,e){return!(!e||void 0===e.indexOf)&&-1!==e.indexOf(t)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,e,i){if(i<0){var r=String(t).substr(e);return r.substr(0,r.length+i)}return String(t).substr(e,i)},"+":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)+parseFloat(e,10)}),0)},"*":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)*parseFloat(e,10)}))},"-":function(t,e){return void 0===e?-t:t-e},"/":function(t,e){return t/e},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,(function(t,e){return t.concat(e)}),[])},var:function(t,e){var i=void 0===e?null:e,r=this;if(void 0===t||""===t||null===t)return r;for(var n=String(t).split("."),s=0;s<n.length;s++){if(null==r)return i;if(void 0===(r=r[n[s]]))return i}return r},missing:function(){for(var e=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<i.length;r++){var n=i[r],s=t.apply({var:n},this);null!==s&&""!==s||e.push(n)}return e},missing_some:function(e,i){var r=t.apply({missing:i},this);return i.length-r.length>=e?[]:r}};return t.is_logic=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&1===Object.keys(t).length},t.truthy=function(t){return!(Array.isArray(t)&&0===t.length||!t)},t.get_operator=function(t){return Object.keys(t)[0]},t.get_values=function(e){return e[t.get_operator(e)]},t.apply=function(i,r){if(Array.isArray(i))return i.map((function(e){return t.apply(e,r)}));if(!t.is_logic(i))return i;var n,s,o,a,h,u=t.get_operator(i),c=i[u];if(Array.isArray(c)||(c=[c]),"if"===u||"?:"==u){for(n=0;n<c.length-1;n+=2)if(t.truthy(t.apply(c[n],r)))return t.apply(c[n+1],r);return c.length===n+1?t.apply(c[n],r):null}if("and"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.filter((function(e){return t.truthy(t.apply(o,e))})):[];if("map"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===u)return a=t.apply(c[0],r),o=c[1],h=void 0!==c[2]?t.apply(c[2],r):null,Array.isArray(a)?a.reduce((function(e,i){return t.apply(o,{current:i,accumulator:e})}),h):h;if("all"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(!t.truthy(t.apply(o,a[n])))return!1;return!0}if("none"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!0;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!1;return!0}if("some"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!0;return!1}if(c=c.map((function(e){return t.apply(e,r)})),e.hasOwnProperty(u)&&"function"==typeof e[u])return e[u].apply(r,c);if(u.indexOf(".")>0){var f=String(u).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+u+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+u)},t.uses_data=function(e){var i=[];if(t.is_logic(e)){var r=t.get_operator(e),n=e[r];Array.isArray(n)||(n=[n]),"var"===r?i.push(n[0]):n.forEach((function(e){i.push.apply(i,t.uses_data(e))}))}return function(t){for(var e=[],i=0,r=t.length;i<r;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(i)},t.add_operation=function(t,i){e[t]=i},t.rm_operation=function(t){delete e[t]},t.rule_like=function(e,i){if(i===e)return!0;if("@"===i)return!0;if("number"===i)return"number"==typeof e;if("string"===i)return"string"==typeof e;if("array"===i)return Array.isArray(e)&&!t.is_logic(e);if(t.is_logic(i)){if(t.is_logic(e)){var r=t.get_operator(i),n=t.get_operator(e);if("@"===r||r===n)return t.rule_like(t.get_values(e,!1),t.get_values(i,!1))}return!1}if(Array.isArray(i)){if(Array.isArray(e)){if(i.length!==e.length)return!1;for(var s=0;s<i.length;s+=1)if(!t.rule_like(e[s],i[s]))return!1;return!0}return!1}return!1},t}()),i.exports),n=t(r),s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",h={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},u="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",c={5:u,"5module":u+" export import",6:u+" const class extends export import super"},f=/^in(stanceof)?$/,l=new RegExp("["+a+"]"),d=new RegExp("["+a+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function p(t,e){for(var i=65536,r=0;r<e.length;r+=2){if((i+=e[r])>t)return!1;if((i+=e[r+1])>=t)return!0}return!1}function m(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&p(t,o)))}function v(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&d.test(String.fromCharCode(t)):!1!==e&&(p(t,o)||p(t,s)))))}var y=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function g(t,e){return new y(t,{beforeExpr:!0,binop:e})}var b={beforeExpr:!0},$={startsExpr:!0},w={};function _(t,e){return void 0===e&&(e={}),e.keyword=t,w[t]=new y(t,e)}var E={num:new y("num",$),regexp:new y("regexp",$),string:new y("string",$),name:new y("name",$),privateId:new y("privateId",$),eof:new y("eof"),bracketL:new y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new y("]"),braceL:new y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new y("}"),parenL:new y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new y(")"),comma:new y(",",b),semi:new y(";",b),colon:new y(":",b),dot:new y("."),question:new y("?",b),questionDot:new y("?."),arrow:new y("=>",b),template:new y("template"),invalidTemplate:new y("invalidTemplate"),ellipsis:new y("...",b),backQuote:new y("`",$),dollarBraceL:new y("${",{beforeExpr:!0,startsExpr:!0}),eq:new y("=",{beforeExpr:!0,isAssign:!0}),assign:new y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new y("**",{beforeExpr:!0}),coalesce:g("??",1),_break:_("break"),_case:_("case",b),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",b),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",b),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",$),_if:_("if"),_return:_("return",b),_switch:_("switch"),_throw:_("throw",b),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",$),_super:_("super",$),_class:_("class",$),_extends:_("extends",b),_export:_("export"),_import:_("import",$),_null:_("null",$),_true:_("true",$),_false:_("false",$),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(k.source,"g");function x(t){return 10===t||13===t||8232===t||8233===t}function j(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(x(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var O=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,C=I.hasOwnProperty,A=I.toString,N=Object.hasOwn||function(t,e){return C.call(t,e)},T=Array.isArray||function(t){return"[object Array]"===A.call(t)},M=Object.create(null);function R(t){return M[t]||(M[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var z=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,L=function(t,e){this.line=t,this.column=e};L.prototype.offset=function(t){return new L(this.line,this.column+t)};var U=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function q(t,e){for(var i=1,r=0;;){var n=j(t,r,e);if(n<0)return new L(i,e-r);++i,r=n}}var F={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},B=!1;function V(t,e){return 2|(t?4:0)|(e?8:0)}var G=function(t,e,i){this.options=t=function(t){var e={};for(var i in F)e[i]=t&&N(t,i)?t[i]:F[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),T(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(T(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var h={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(h.loc=new U(this,o,a)),t.ranges&&(h.range=[n,s]),e.push(h)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}(t),this.sourceFile=t.sourceFile,this.keywords=R(c[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=h[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=R(r);var n=(r?r+" ":"")+h.strict;this.reservedWordsStrict=R(n),this.reservedWordsStrictBind=R(n+" "+h.strictBind),this.input=String(e),this.containsEsc=!1,this.pos=i||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):i?(this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(k).length)):this.lineStart=0,this.type=E.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||!0===t.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},H.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},H.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},H.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},H.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},H.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},H.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},H.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},H.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},H.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},H.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},G.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,r=0;r<t.length;r++)i=t[r](i);return i},G.parse=function(t,e){return new this(e,t).parse()},G.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},G.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(G.prototype,H);var K=G.prototype,J=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;K.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){P.lastIndex=t,t+=P.exec(this.input)[0].length;var e=J.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){P.lastIndex=t+e[0].length;var i=P.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||k.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}P.lastIndex=t+=e[0].length,t+=P.exec(this.input)[0].length,";"===this.input[t]&&t++}},K.eat=function(t){return this.type===t&&(this.next(),!0)},K.isContextual=function(t){return this.type===E.name&&this.value===t&&!this.containsEsc},K.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},K.catchStackOverflow=function(t){try{return t()}catch(t){if(!(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message))))throw t;this.raise(this.start,"Not enough stack space to parse input")}},K.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===E.eof||this.type===E.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(E.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},K.expect=function(t){this.eat(t)||this.unexpected()},K.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var W=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};K.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},K.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,r=t.doubleProto;if(!e)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},K.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},K.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Z=G.prototype;Z.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==E.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var r=0,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var s=n[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var X={kind:"loop"},Y={kind:"switch"};Z.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;P.lastIndex=this.pos;var e=P.exec(this.input),i=this.pos+e[0].length,r=this.fullCharCodeAt(i);if(91===r||92===r)return!0;if(t)return!1;if(123===r)return!0;if(m(r)){var n=i;do{i+=r<=65535?1:2}while(v(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!f.test(s))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;P.lastIndex=this.pos;var t,e=P.exec(this.input),i=this.pos+e[0].length;return!(k.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(v(t=this.fullCharCodeAt(i+8))||92===t))},Z.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;P.lastIndex=this.pos;var i=P.exec(this.input),r=this.pos+i[0].length;if(k.test(this.input.slice(this.pos,r)))return!1;if(t){var n,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||v(n=this.fullCharCodeAt(s))||92===n)return!1;P.lastIndex=s;var o=P.exec(this.input);if(r=s+o[0].length,o&&k.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!m(a)&&92!==a)return!1;var h=r;do{r+=a<=65535?1:2}while(v(a=this.fullCharCodeAt(r)));if(92===a)return!0;var u=this.input.slice(h,r);if(f.test(u))return!1;if(e&&!t&&"of"===u){P.lastIndex=r;var c=P.exec(this.input);if(61!==this.input.charCodeAt(r+=c[0].length)||61===(a=this.input.charCodeAt(r+1))||62===a)return!1}return!0},Z.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Z.isUsing=function(t){return this.isUsingKeyword(!1,t)},Z.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=E._var,r="let"),n){case E._break:case E._continue:return this.parseBreakContinueStatement(s,n.keyword);case E._debugger:return this.parseDebuggerStatement(s);case E._do:return this.parseDoStatement(s);case E._for:return this.parseForStatement(s);case E._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case E._class:return t&&this.unexpected(),this.parseClass(s,!0);case E._if:return this.parseIfStatement(s);case E._return:return this.parseReturnStatement(s);case E._switch:return this.parseSwitchStatement(s);case E._throw:return this.parseThrowStatement(s);case E._try:return this.parseTryStatement(s);case E._const:case E._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case E._while:return this.parseWhileStatement(s);case E._with:return this.parseWithStatement(s);case E.braceL:return this.parseBlock(!0,s);case E.semi:return this.parseEmptyStatement(s);case E._export:case E._import:if(this.options.ecmaVersion>10&&n===E._import){P.lastIndex=this.pos;var o=P.exec(this.input),a=this.input.charCodeAt(this.pos+o[0].length);if(40===a||46===a)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===E._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var h=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(h)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===h&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,h),this.semicolon(),this.finishNode(s,"VariableDeclaration");var u=this.value,c=this.parseExpression();return n===E.name&&"Identifier"===c.type&&this.eat(E.colon)?this.parseLabeledStatement(s,u,c,t):this.parseExpressionStatement(s,c)}},Z.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(E.semi)||this.insertSemicolon()?t.label=null:this.type!==E.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var n=this.labels[r];if(null==t.label||n.name===t.label.name){if(null!=n.kind&&(i||"loop"===n.kind))break;if(t.label&&i)break}}return r===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Z.parseDoStatement=function(t){return this.next(),this.labels.push(X),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(E._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(E.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Z.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(X),this.enterScope(0),this.expect(E.parenL),this.type===E.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===E._var||this.type===E._const||i){var r=this.startNode(),n=i?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var h=this.startNode();return this.next(),"await using"===a&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,a),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var u=this.containsEsc,c=new W,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===E._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===E._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||u||"Identifier"!==l.type||"async"!==l.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,c),this.checkLValPattern(l),this.parseForIn(t,l)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,l))},Z.parseForAfterInit=function(t,e,i){return(this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===E._in?("using"!==e.kind&&"await using"!==e.kind||e.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Z.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,tt|(i?0:et),!1,e)},Z.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(E._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Z.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(E.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Z.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(E.braceL),this.labels.push(Y),this.enterScope(1024);for(var i=!1;this.type!==E.braceR;)if(this.type===E._case||this.type===E._default){var r=this.type===E._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(E.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Z.parseThrowStatement=function(t){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Q=[];Z.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(E.parenR),t},Z.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===E._catch){var e=this.startNode();this.next(),this.eat(E.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(E._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Z.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Z.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(X),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Z.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Z.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Z.parseLabeledStatement=function(t,e,i,r){for(var n=0,s=this.labels;n<s.length;n+=1)s[n].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===E._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Z.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Z.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(E.braceL),t&&this.enterScope(0);this.type!==E.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Z.parseFor=function(t,e){return t.init=e,this.expect(E.semi),t.test=this.type===E.semi?null:this.parseExpression(),this.expect(E.semi),t.update=this.type===E.parenR?null:this.parseExpression(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Z.parseForIn=function(t,e){var i=this.type===E._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Z.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(E.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===E._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===E._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(E.comma))break}return t},Z.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var tt=1,et=2;function it(t,e){var i=e.key.name,r=t[i],n="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(n=(e.static?"s":"i")+e.kind),"iget"===r&&"iset"===n||"iset"===r&&"iget"===n||"sget"===r&&"sset"===n||"sset"===r&&"sget"===n?(t[i]="true",!1):!!r||(t[i]=n,!1)}function rt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}Z.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===E.star&&e&et&&this.unexpected(),t.generator=this.eat(E.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e&tt&&(t.id=4&e&&this.type!==E.name?null:this.parseIdent(),!t.id||e&et||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(V(t.async,t.generator)),e&tt||(t.id=this.type===E.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&tt?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(t){this.expect(E.parenL),t.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(E.braceL);this.type!==E.braceR;){var o=this.parseClassElement(null!==t.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&it(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(t){if(this.eat(E.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),r="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(E.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===E.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==E.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(E.star)&&(n=!0),!r&&!s&&!n){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:r=h)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===E.parenL||"method"!==o||n||s){var u=!i.static&&rt(i,"constructor"),c=u&&t;u&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=u?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},Z.isClassElementNameStart=function(){return this.type===E.name||this.type===E.privateId||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword},Z.parseClassElementName=function(t){this.type===E.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Z.parseClassMethod=function(t,e,i,r){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),i&&this.raise(n.start,"Constructor can't be an async method")):t.static&&rt(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,i,r);return"get"===t.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===t.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Z.parseClassField=function(t){return rt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(E.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Z.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==E.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Z.parseClassId=function(t,e){this.type===E.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Z.parseClassSuper=function(t){t.superClass=this.eat(E._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Z.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,n=0===r?null:this.privateNameStack[r-1],s=0;s<i.length;++s){var o=i[s];N(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Z.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Z.parseExport=function(t,e){if(this.next(),this.eat(E.star))return this.parseExportAllDeclaration(t,e);if(this.eat(E._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,r=t.specifiers;i<r.length;i+=1){var n=r[i];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Z.parseExportDeclaration=function(){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var t;if(this.type===E._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|tt,!1,t)}if(this.type===E._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Z.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var r=0,n=e.properties;r<n.length;r+=1)this.checkPatternExport(t,n[r]);else if("ArrayPattern"===i)for(var s=0,o=e.elements;s<o.length;s+=1){var a=o[s];a&&this.checkPatternExport(t,a)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Z.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Z.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(E.braceL);!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Z.parseImport=function(t){return this.next(),this.type===E.string?(t.specifiers=Q,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===E.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Z.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Z.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Z.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Z.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===E.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(E.comma)))return t;if(this.type===E.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(E.braceL);!this.eat(E.braceR);){if(e)e=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;t.push(this.parseImportSpecifier())}return t},Z.parseWithClause=function(){var t=[];if(!this.eat(E._with))return t;this.expect(E.braceL);for(var e={},i=!0;!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;N(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},Z.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(E.colon),this.type!==E.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===E.string){var t=this.parseLiteral(this.value);return z.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var nt=G.prototype;nt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,n=t.properties;r<n.length;r+=1){var s=n[r];this.toAssignable(s,e),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},nt.toAssignableList=function(t,e){for(var i=t.length,r=0;r<i;r++){var n=t[r];n&&this.toAssignable(n,e)}if(i){var s=t[i-1];6===this.options.ecmaVersion&&e&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return t},nt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},nt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==E.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},nt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case E.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(E.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case E.braceL:return this.parseObj(!0)}return this.parseIdent()},nt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(E.comma),e&&this.type===E.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===E.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},nt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},nt.parseBindingListItem=function(t){return t},nt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(E.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},nt.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var r=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},nt.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var r=0,n=t.properties;r<n.length;r+=1)this.checkLValInnerPattern(n[r],e,i);break;case"ArrayPattern":for(var s=0,o=t.elements;s<o.length;s+=1){var a=o[s];a&&this.checkLValInnerPattern(a,e,i)}break;default:this.checkLValSimple(t,e,i)}},nt.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var st=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},ot={b_stat:new st("{",!1),b_expr:new st("{",!0),b_tmpl:new st("${",!1),p_stat:new st("(",!1),p_expr:new st("(",!0),q_tmpl:new st("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new st("function",!1),f_expr:new st("function",!0),f_expr_gen:new st("function",!0,!1,null,!0),f_gen:new st("function",!1,!1,null,!0)},at=G.prototype;at.initialContext=function(){return[ot.b_stat]},at.curContext=function(){return this.context[this.context.length-1]},at.braceIsBlock=function(t){var e=this.curContext();return e===ot.f_expr||e===ot.f_stat||(t!==E.colon||e!==ot.b_stat&&e!==ot.b_expr?t===E._return||t===E.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):t===E._else||t===E.semi||t===E.eof||t===E.parenR||t===E.arrow||(t===E.braceL?e===ot.b_stat:t!==E._var&&t!==E._const&&t!==E.name&&!this.exprAllowed):!e.isExpr)},at.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},at.updateContext=function(t){var e,i=this.type;i.keyword&&t===E.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},at.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},E.parenR.updateContext=E.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===ot.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},E.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ot.b_stat:ot.b_expr),this.exprAllowed=!0},E.dollarBraceL.updateContext=function(){this.context.push(ot.b_tmpl),this.exprAllowed=!0},E.parenL.updateContext=function(t){this.context.push(t===E._if||t===E._for||t===E._with||t===E._while?ot.p_stat:ot.p_expr),this.exprAllowed=!0},E.incDec.updateContext=function(){},E._function.updateContext=E._class.updateContext=function(t){!t.beforeExpr||t===E._else||t===E.semi&&this.curContext()!==ot.p_stat||t===E._return&&k.test(this.input.slice(this.lastTokEnd,this.start))||(t===E.colon||t===E.braceL)&&this.curContext()===ot.b_stat?this.context.push(ot.f_stat):this.context.push(ot.f_expr),this.exprAllowed=!1},E.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},E.backQuote.updateContext=function(){this.curContext()===ot.q_tmpl?this.context.pop():this.context.push(ot.q_tmpl),this.exprAllowed=!1},E.star.updateContext=function(t){if(t===E._function){var e=this.context.length-1;this.context[e]=this.context[e]===ot.f_expr?ot.f_expr_gen:ot.f_gen}this.exprAllowed=!0},E.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==E.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var ht=G.prototype;function ut(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ut(t.expression)}function ct(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&ct(t.expression)||"ParenthesizedExpression"===t.type&&ct(t.expression)}ht.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,n=t.key;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);else{var o=e[r="$"+r];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(n.start,"Redefinition of property"):o=e[r]={init:!1,get:!1,set:!1},o[s]=!0}}},ht.parseExpression=function(t,e){var i=this;return this.catchStackOverflow((function(){var r=i.start,n=i.startLoc,s=i.parseMaybeAssign(t,e);if(i.type===E.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(E.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},ht.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new W,r=!0);var a=this.start,h=this.startLoc;this.type!==E.parenL&&this.type!==E.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,this.type===E.eq&&(u=this.toAssignable(u,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===E.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),u},ht.parseMaybeConditional=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(("ArrowFunctionExpression"!==n.type||n.start!==i)&&this.eat(E.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(E.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},ht.parseExprOps=function(t,e){var i=this.start,r=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===i&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,i,r,-1,t)},ht.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==E._in)&&s>r){var o=this.type===E.logicalOR||this.type===E.logicalAND,a=this.type===E.coalesce;a&&(s=E.logicalAND.binop);var h=this.value;this.next();var u=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),u,c,s,n),l=this.buildBinary(e,i,t,f,h,o||a);return(o&&this.type===E.coalesce||a&&(this.type===E.logicalOR||this.type===E.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(l,e,i,r,n)}return t},ht.buildBinary=function(t,e,i,r,n,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=n,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ht.parseMaybeUnary=function(t,e,i,r){var n,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),e=!0;else if(this.type.prefix){var a=this.startNode(),h=this.type===E.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,h,r),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&ut(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&ct(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==E.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(s,o);u.operator=this.value,u.prefix=!1,u.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(u,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==E._in&&this.unexpected();return i||"ArrowFunctionExpression"===n.type&&n.start===s||!this.eat(E.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ht.parseExprSubscripts=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var s=this.parseSubscripts(n,i,r,!1,e);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},ht.parseSubscripts=function(t,e,i,r,n){for(var s=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,i,r,s,o,n);if(a.optional&&(o=!0),a===t||"ArrowFunctionExpression"===a.type){if(o){var h=this.startNodeAt(e,i);h.expression=a,a=this.finishNode(h,"ChainExpression")}return a}t=a}},ht.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(E.arrow)},ht.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},ht.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,h=a&&this.eat(E.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(E.bracketL);if(u||h&&this.type!==E.parenL&&this.type!==E.backQuote||this.eat(E.dot)){var c=this.startNodeAt(e,i);c.object=t,u?(c.property=this.parseExpression(),this.expect(E.bracketR)):c.property=this.type===E.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!u,a&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(E.parenL)){var f=new W,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=d,this.awaitIdentPos=p,this.parseSubscriptAsyncArrow(e,i,m,o);this.checkExpressionErrors(f,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=p||this.awaitIdentPos;var v=this.startNodeAt(e,i);v.callee=t,v.arguments=m,a&&(v.optional=h),t=this.finishNode(v,"CallExpression")}else if(this.type===E.backQuote){(h||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(e,i);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t},ht.parseExprAtom=function(t,e,i){this.type===E.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case E._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==E.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==E.dot&&this.type!==E.bracketL&&this.type!==E.parenL&&this.unexpected(),this.finishNode(r,"Super");case E._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case E.name:var s=this.start,o=this.startLoc,a=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(E._function))return this.overrideContext(ot.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(E.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===E.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(E.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[h],!0,e)}return h;case E.regexp:var u=this.value;return(r=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},r;case E.num:case E.string:return this.parseLiteral(this.value);case E._null:case E._true:case E._false:return(r=this.startNode()).value=this.type===E._null?null:this.type===E._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case E.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),f;case E.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(E.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case E.braceL:return this.overrideContext(ot.b_expr),this.parseObj(!1,t);case E._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case E._class:return this.parseClass(this.startNode(),!1);case E._new:return this.parseNew();case E.backQuote:return this.parseTemplate();case E._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},ht.parseExprAtomDefault=function(){this.unexpected()},ht.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===E.parenL&&!t)return this.parseDynamicImport(e);if(this.type===E.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},ht.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(E.parenR)?t.options=null:(this.expect(E.comma),this.afterTrailingComma(E.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(E.parenR)||(this.expect(E.comma),this.afterTrailingComma(E.parenR)||this.unexpected())));else if(!this.eat(E.parenR)){var e=this.start;this.eat(E.comma)&&this.eat(E.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},ht.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},ht.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},ht.parseParenExpression=function(){this.expect(E.parenL);var t=this.parseExpression();return this.expect(E.parenR),t},ht.shouldParseArrow=function(){return!this.canInsertSemicolon()},ht.parseParenAndDistinguishExpression=function(t,e){var i,r=this.start,n=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,h=this.startLoc,u=[],c=!0,f=!1,l=new W,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==E.parenR;){if(c?c=!1:this.expect(E.comma),s&&this.afterTrailingComma(E.parenR,!0)){f=!0;break}if(this.type===E.ellipsis){o=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(E.parenR),t&&this.shouldParseArrow(u)&&this.eat(E.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,u,e);u.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,u.length>1?((i=this.startNodeAt(a,h)).expressions=u,this.finishNodeAt(i,"SequenceExpression",m,v)):i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,n);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},ht.parseParenItem=function(t){return t},ht.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var ft=[];ht.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===E.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var r=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),"Super"===t.callee.type&&this.raiseRecoverable(r,"Invalid use of 'super'"),t.arguments=this.eat(E.parenL)?this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1):ft,this.finishNode(t,"NewExpression")},ht.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===E.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===E.backQuote,this.finishNode(i,"TemplateElement")},ht.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:e});for(i.quasis=[r];!r.tail;)this.type===E.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(E.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(E.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},ht.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===E.name||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===E.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},ht.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(E.braceR);){if(r)r=!1;else if(this.expect(E.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(E.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},ht.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(E.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,e),this.type===E.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(t||e)&&(n=this.start,s=this.startLoc),t||(i=this.eat(E.star)));var a=this.containsEsc;return this.parsePropertyName(o),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(o)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(E.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},ht.parseGetterSetter=function(t){var e=t.key.name;(this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e,t.value.params.length!==("get"===t.kind?0:1))?this.raiseRecoverable(t.value.start,"get"===t.kind?"getter should have no params":"setter should have exactly one param"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},ht.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===E.colon&&this.unexpected(),this.eat(E.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===E.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,r),t.kind="init"):e||a||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===E.comma||this.type===E.braceR||this.type===E.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===E.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||r)&&this.unexpected(),this.parseGetterSetter(t))},ht.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(E.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(E.bracketR),t.key;t.computed=!1}return t.key=this.type===E.num||this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ht.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},ht.parseMethod=function(t,e,i){var r=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|V(e,r.generator)|(i?128:0)),this.expect(E.parenL),r.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},ht.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|V(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},ht.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==E.braceL)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);n&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!n&&!s&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,s&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=a}this.exitScope()},ht.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},ht.checkParams=function(t,e){for(var i=Object.create(null),r=0,n=t.params;r<n.length;r+=1)this.checkLValInnerPattern(n[r],1,e?null:i)},ht.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(E.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===E.comma?o=null:this.type===E.ellipsis?(o=this.parseSpread(r),r&&this.type===E.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},ht.checkUnreserved=function(t){var e=t.start,i=t.end,r=t.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(e,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(e,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+r+"' is reserved"))},ht.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},ht.parseIdentNode=function(){var t=this.startNode();return this.type===E.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=E.name):this.unexpected(),t},ht.parsePrivateIdent=function(){var t=this.startNode();return this.type===E.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},ht.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===E.semi||this.canInsertSemicolon()||this.type!==E.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(E.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},ht.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var lt=G.prototype;lt.raise=function(t,e){var i=q(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var r=new SyntaxError(e);throw r.pos=t,r.loc=i,r.raisedAt=this.pos,r},lt.raiseRecoverable=lt.raise,lt.curPosition=function(){if(this.options.locations)return new L(this.curLine,this.pos-this.lineStart)};var dt=G.prototype,pt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};dt.enterScope=function(t){this.scopeStack.push(new pt(t))},dt.exitScope=function(){this.scopeStack.pop()},dt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},dt.declareName=function(t,e,i){var r=!1;if(2===e){var n=this.currentScope();r=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&1&n.flags&&delete this.undefinedExports[t]}else if(4===e)this.currentScope().lexical.push(t);else if(3===e){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(t)>-1:s.lexical.indexOf(t)>-1||s.var.indexOf(t)>-1,s.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(t)>-1&&!(32&a.flags&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(t)>-1){r=!0;break}if(a.var.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t],259&a.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},dt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},dt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},dt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var mt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new U(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},vt=G.prototype;function yt(t,e,i,r){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=i),t}vt.startNode=function(){return new mt(this,this.start,this.startLoc)},vt.startNodeAt=function(t,e){return new mt(this,t,e)},vt.finishNode=function(t,e){return yt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},vt.finishNodeAt=function(t,e,i,r){return yt.call(this,t,e,i,r)},vt.copyNode=function(t){var e=new mt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var gt,bt,$t="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",wt=$t+" Extended_Pictographic",_t=wt+" EBase EComp EMod EPres ExtPict",Et={9:$t,10:wt,11:wt,12:_t,13:_t,14:_t},kt={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},St="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",xt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=xt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ot=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Pt=Ot+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",It=Pt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ct={9:xt,10:jt,11:Ot,12:Pt,13:It,14:It+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},At={};for(var Nt=0,Tt=[9,10,11,12,13,14];Nt<Tt.length;Nt+=1)bt=void 0,(bt=At[gt=Tt[Nt]]={binary:R(Et[gt]+" "+St),binaryOfStrings:R(kt[gt]),nonBinary:{General_Category:R(St),Script:R(Ct[gt])}}).nonBinary.Script_Extensions=bt.nonBinary.Script,bt.nonBinary.gc=bt.nonBinary.General_Category,bt.nonBinary.sc=bt.nonBinary.Script,bt.nonBinary.scx=bt.nonBinary.Script_Extensions;var Mt=G.prototype,Rt=function(t,e){this.parent=t,this.base=e||this};Rt.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},Rt.prototype.sibling=function(){return new Rt(this.parent,this.base)};var Dt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=At[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function zt(t){return 105===t||109===t||115===t}function Lt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Ut(t){return t>=65&&t<=90||t>=97&&t<=122}function qt(t){return Ut(t)||95===t}function Ft(t){return qt(t)||Bt(t)}function Bt(t){return t>=48&&t<=57}function Vt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Gt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ht(t){return t>=48&&t<=55}Dt.prototype.reset=function(t,e,i){var r=-1!==i.indexOf("v"),n=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Dt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Dt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return-1;var n=i.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=r)return n;var s=i.charCodeAt(t+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n},Dt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return r;var n,s=i.charCodeAt(t);return!e&&!this.switchU||s<=55295||s>=57344||t+1>=r||(n=i.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Dt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Dt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Dt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Dt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Dt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,r=0,n=t;r<n.length;r+=1){var s=n[r],o=this.at(i,e);if(-1===o||o!==s)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},Mt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,r=!1,n=!1,s=0;s<i.length;s++){var o=i.charAt(s);-1===e.indexOf(o)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&r&&n&&this.raise(t.start,"Invalid regular expression flag")},Mt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Mt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1)t.groupNames[i[e]]||t.raise("Invalid named capture referenced")},Mt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Rt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Mt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Mt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Mt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Mt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Mt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Mt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var r=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<r&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Mt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Mt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Mt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),r=t.eat(45);if(i||r){for(var n=0;n<i.length;n++){var s=i.charAt(n);i.indexOf(s,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(t);i||o||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var h=o.charAt(a);(o.indexOf(h,a+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Mt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Mt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&zt(i);)e+=D(i),t.advance();return e},Mt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Mt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Mt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Lt(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Lt(i);)t.advance();return t.pos!==e},Mt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e||(t.advance(),0))},Mt.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var r=0,n=i;r<n.length;r+=1)n[r].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Mt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Mt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=D(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=D(t.lastIntValue);return!0}return!1},Mt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return m(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return v(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Mt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Mt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Mt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Mt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Mt.regexp_eatZero=function(t){return 48===t.current()&&!Bt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Mt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Mt.regexp_eatControlLetter=function(t){var e=t.current();return!!Ut(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Mt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,r=t.pos,n=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var s=t.lastIntValue;if(n&&s>=55296&&s<=56319){var o=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}t.pos=o,t.lastIntValue=s}return!0}if(n&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(i=t.lastIntValue)>=0&&i<=1114111)return!0;n&&t.raise("Invalid unicode escape"),t.pos=r}return!1},Mt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e||(t.lastIntValue=e,t.advance(),0))},Mt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},Mt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var r;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===r&&t.raise("Invalid property name"),r;t.raise("Invalid property name")}return 0},Mt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t))return this.regexp_validateUnicodePropertyNameAndValue(t,i,t.lastStringValue),1}return t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)?this.regexp_validateUnicodePropertyNameOrValue(t,t.lastStringValue):0},Mt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Mt.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Mt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";qt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ft(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Mt.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Mt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Mt.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Mt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||Ht(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var r=t.current();return 93!==r&&(t.lastIntValue=r,t.advance(),!0)},Mt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Mt.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var r=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(r!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(r!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Mt.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var r=t.lastIntValue;return-1!==i&&-1!==r&&i>r&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Mt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Mt.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),r=this.regexp_classContents(t);if(t.eat(93))return i&&2===r&&t.raise("Negated character class may contain strings"),r;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},Mt.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Mt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Mt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Mt.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t)&&(t.eat(98)?(t.lastIntValue=8,0):(t.pos=e,1)));var i=t.current();return!(i<0||i===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(i)||function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(i)||(t.advance(),t.lastIntValue=i,0))},Mt.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Bt(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Mt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Mt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Bt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Mt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Vt(i=t.current());)t.lastIntValue=16*t.lastIntValue+Gt(i),t.advance();return t.pos!==e},Mt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;t.lastIntValue=e<=3&&this.regexp_eatOctalDigit(t)?64*e+8*i+t.lastIntValue:8*e+i}else t.lastIntValue=e;return!0}return!1},Mt.regexp_eatOctalDigit=function(t){var e=t.current();return Ht(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Mt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!Vt(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Gt(n),t.advance()}return!0};var Kt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new U(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Jt=G.prototype;function Wt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Jt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Kt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Jt.getToken=function(){return this.next(),new Kt(this)},"undefined"!=typeof Symbol&&(Jt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===E.eof,value:e}}}}),Jt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(E.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Jt.readToken=function(t){return m(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Jt.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Jt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Jt.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,n=e;(r=j(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Jt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!x(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Jt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&O.test(String.fromCharCode(t))))break t;++this.pos}}},Jt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Jt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(E.ellipsis)):(++this.pos,this.finishToken(E.dot))},Jt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(E.assign,2):this.finishOp(E.slash,1)},Jt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?E.star:E.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=E.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(E.assign,i+1):this.finishOp(r,i)},Jt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(124===t?E.logicalOR:E.logicalAND,2):61===e?this.finishOp(E.assign,2):this.finishOp(124===t?E.bitwiseOR:E.bitwiseAND,1)},Jt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(E.assign,2):this.finishOp(E.bitwiseXOR,1)},Jt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!k.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(E.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(E.assign,2):this.finishOp(E.plusMin,1)},Jt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(E.assign,i+1):this.finishOp(E.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(E.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Jt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(E.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(E.arrow)):this.finishOp(61===t?E.eq:E.prefix,1)},Jt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(E.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(E.coalesce,2)}return this.finishOp(E.question,1)},Jt.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,m(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(E.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Jt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(E.parenL);case 41:return++this.pos,this.finishToken(E.parenR);case 59:return++this.pos,this.finishToken(E.semi);case 44:return++this.pos,this.finishToken(E.comma);case 91:return++this.pos,this.finishToken(E.bracketL);case 93:return++this.pos,this.finishToken(E.bracketR);case 123:return++this.pos,this.finishToken(E.braceL);case 125:return++this.pos,this.finishToken(E.braceR);case 58:return++this.pos,this.finishToken(E.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(E.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(E.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Jt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Jt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(k.test(r)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Dt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(n,o)}catch(t){}return this.finishToken(E.regexp,{pattern:n,flags:o,value:h})},Jt.readInt=function(t,e,i){for(var r=this.options.ecmaVersion>=12&&void 0===e,n=i&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,h=0,u=null==e?1/0:e;h<u;++h,++this.pos){var c=this.input.charCodeAt(this.pos),f=void 0;if(r&&95===c)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((f=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;a=c,o=o*t+f}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=e&&this.pos-s!==e?null:o},Jt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Wt(this.input.slice(e,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,i)},Jt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===r){var n=Wt(this.input.slice(e,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,n)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(e,this.pos),i?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(E.num,o)},Jt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Jt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;92===r?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(x(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(E.string,e)};var Zt={};function Xt(t,e){return G.parse(t,e)}
|
|
1
|
+
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,i={exports:{}},r=(e||(e=1,i.exports=function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var t={},e={"==":function(t,e){return t==e},"===":function(t,e){return t===e},"!=":function(t,e){return t!=e},"!==":function(t,e){return t!==e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e,i){return void 0===i?t<e:t<e&&e<i},"<=":function(t,e,i){return void 0===i?t<=e:t<=e&&e<=i},"!!":function(e){return t.truthy(e)},"!":function(e){return!t.truthy(e)},"%":function(t,e){return t%e},log:function(t){return console.log(t),t},in:function(t,e){return!(!e||void 0===e.indexOf)&&-1!==e.indexOf(t)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,e,i){if(i<0){var r=String(t).substr(e);return r.substr(0,r.length+i)}return String(t).substr(e,i)},"+":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)+parseFloat(e,10)}),0)},"*":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)*parseFloat(e,10)}))},"-":function(t,e){return void 0===e?-t:t-e},"/":function(t,e){return t/e},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,(function(t,e){return t.concat(e)}),[])},var:function(t,e){var i=void 0===e?null:e,r=this;if(void 0===t||""===t||null===t)return r;for(var n=String(t).split("."),s=0;s<n.length;s++){if(null==r)return i;if(void 0===(r=r[n[s]]))return i}return r},missing:function(){for(var e=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<i.length;r++){var n=i[r],s=t.apply({var:n},this);null!==s&&""!==s||e.push(n)}return e},missing_some:function(e,i){var r=t.apply({missing:i},this);return i.length-r.length>=e?[]:r}};return t.is_logic=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&1===Object.keys(t).length},t.truthy=function(t){return!(Array.isArray(t)&&0===t.length||!t)},t.get_operator=function(t){return Object.keys(t)[0]},t.get_values=function(e){return e[t.get_operator(e)]},t.apply=function(i,r){if(Array.isArray(i))return i.map((function(e){return t.apply(e,r)}));if(!t.is_logic(i))return i;var n,s,o,a,u,h=t.get_operator(i),c=i[h];if(Array.isArray(c)||(c=[c]),"if"===h||"?:"==h){for(n=0;n<c.length-1;n+=2)if(t.truthy(t.apply(c[n],r)))return t.apply(c[n+1],r);return c.length===n+1?t.apply(c[n],r):null}if("and"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===h)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.filter((function(e){return t.truthy(t.apply(o,e))})):[];if("map"===h)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===h)return a=t.apply(c[0],r),o=c[1],u=void 0!==c[2]?t.apply(c[2],r):null,Array.isArray(a)?a.reduce((function(e,i){return t.apply(o,{current:i,accumulator:e})}),u):u;if("all"===h){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(!t.truthy(t.apply(o,a[n])))return!1;return!0}if("none"===h){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!0;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!1;return!0}if("some"===h){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!0;return!1}if(c=c.map((function(e){return t.apply(e,r)})),e.hasOwnProperty(h)&&"function"==typeof e[h])return e[h].apply(r,c);if(h.indexOf(".")>0){var f=String(h).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+h+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+h)},t.uses_data=function(e){var i=[];if(t.is_logic(e)){var r=t.get_operator(e),n=e[r];Array.isArray(n)||(n=[n]),"var"===r?i.push(n[0]):n.forEach((function(e){i.push.apply(i,t.uses_data(e))}))}return function(t){for(var e=[],i=0,r=t.length;i<r;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(i)},t.add_operation=function(t,i){e[t]=i},t.rm_operation=function(t){delete e[t]},t.rule_like=function(e,i){if(i===e)return!0;if("@"===i)return!0;if("number"===i)return"number"==typeof e;if("string"===i)return"string"==typeof e;if("array"===i)return Array.isArray(e)&&!t.is_logic(e);if(t.is_logic(i)){if(t.is_logic(e)){var r=t.get_operator(i),n=t.get_operator(e);if("@"===r||r===n)return t.rule_like(t.get_values(e,!1),t.get_values(i,!1))}return!1}if(Array.isArray(i)){if(Array.isArray(e)){if(i.length!==e.length)return!1;for(var s=0;s<i.length;s+=1)if(!t.rule_like(e[s],i[s]))return!1;return!0}return!1}return!1},t}()),i.exports),n=t(r),s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",u={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},h="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",c={5:h,"5module":h+" export import",6:h+" const class extends export import super"},f=/^in(stanceof)?$/,l=new RegExp("["+a+"]"),d=new RegExp("["+a+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function p(t,e){for(var i=65536,r=0;r<e.length;r+=2){if((i+=e[r])>t)return!1;if((i+=e[r+1])>=t)return!0}return!1}function m(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&p(t,o)))}function v(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&d.test(String.fromCharCode(t)):!1!==e&&(p(t,o)||p(t,s)))))}var y=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function g(t,e){return new y(t,{beforeExpr:!0,binop:e})}var b={beforeExpr:!0},$={startsExpr:!0},w={};function _(t,e){return void 0===e&&(e={}),e.keyword=t,w[t]=new y(t,e)}var E={num:new y("num",$),regexp:new y("regexp",$),string:new y("string",$),name:new y("name",$),privateId:new y("privateId",$),eof:new y("eof"),bracketL:new y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new y("]"),braceL:new y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new y("}"),parenL:new y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new y(")"),comma:new y(",",b),semi:new y(";",b),colon:new y(":",b),dot:new y("."),question:new y("?",b),questionDot:new y("?."),arrow:new y("=>",b),template:new y("template"),invalidTemplate:new y("invalidTemplate"),ellipsis:new y("...",b),backQuote:new y("`",$),dollarBraceL:new y("${",{beforeExpr:!0,startsExpr:!0}),eq:new y("=",{beforeExpr:!0,isAssign:!0}),assign:new y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new y("**",{beforeExpr:!0}),coalesce:g("??",1),_break:_("break"),_case:_("case",b),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",b),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",b),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",$),_if:_("if"),_return:_("return",b),_switch:_("switch"),_throw:_("throw",b),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",$),_super:_("super",$),_class:_("class",$),_extends:_("extends",b),_export:_("export"),_import:_("import",$),_null:_("null",$),_true:_("true",$),_false:_("false",$),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(k.source,"g");function x(t){return 10===t||13===t||8232===t||8233===t}function O(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(x(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var j=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,C=I.hasOwnProperty,A=I.toString,N=Object.hasOwn||function(t,e){return C.call(t,e)},T=Array.isArray||function(t){return"[object Array]"===A.call(t)},M=Object.create(null);function R(t){return M[t]||(M[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var z=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,L=function(t,e){this.line=t,this.column=e};L.prototype.offset=function(t){return new L(this.line,this.column+t)};var U=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function q(t,e){for(var i=1,r=0;;){var n=O(t,r,e);if(n<0)return new L(i,e-r);++i,r=n}}var F={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},B=!1;function V(t,e){return 2|(t?4:0)|(e?8:0)}var G=function(t,e,i){this.options=t=function(t){var e={};for(var i in F)e[i]=t&&N(t,i)?t[i]:F[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),T(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(T(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var u={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(u.loc=new U(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}(t),this.sourceFile=t.sourceFile,this.keywords=R(c[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=u[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=R(r);var n=(r?r+" ":"")+u.strict;this.reservedWordsStrict=R(n),this.reservedWordsStrictBind=R(n+" "+u.strictBind),this.input=String(e),this.containsEsc=!1,this.pos=i||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):i?(this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(k).length)):this.lineStart=0,this.type=E.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||!0===t.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},H.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},H.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},H.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},H.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},H.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},H.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},H.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},H.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},H.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},H.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},G.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,r=0;r<t.length;r++)i=t[r](i);return i},G.parse=function(t,e){return new this(e,t).parse()},G.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},G.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(G.prototype,H);var J=G.prototype,K=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;J.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){P.lastIndex=t,t+=P.exec(this.input)[0].length;var e=K.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){P.lastIndex=t+e[0].length;var i=P.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||k.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}P.lastIndex=t+=e[0].length,t+=P.exec(this.input)[0].length,";"===this.input[t]&&t++}},J.eat=function(t){return this.type===t&&(this.next(),!0)},J.isContextual=function(t){return this.type===E.name&&this.value===t&&!this.containsEsc},J.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},J.catchStackOverflow=function(t){try{return t()}catch(t){if(!(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message))))throw t;this.raise(this.start,"Not enough stack space to parse input")}},J.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},J.canInsertSemicolon=function(){return this.type===E.eof||this.type===E.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},J.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},J.semicolon=function(){this.eat(E.semi)||this.insertSemicolon()||this.unexpected()},J.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},J.expect=function(t){this.eat(t)||this.unexpected()},J.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var W=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};J.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},J.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,r=t.doubleProto;if(!e)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},J.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},J.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Z=G.prototype;Z.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==E.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var r=0,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var s=n[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var Y={kind:"loop"},X={kind:"switch"};Z.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;P.lastIndex=this.pos;var e=P.exec(this.input),i=this.pos+e[0].length,r=this.fullCharCodeAt(i);if(91===r||92===r)return!0;if(t)return!1;if(123===r)return!0;if(m(r)){var n=i;do{i+=r<=65535?1:2}while(v(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!f.test(s))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;P.lastIndex=this.pos;var t,e=P.exec(this.input),i=this.pos+e[0].length;return!(k.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(v(t=this.fullCharCodeAt(i+8))||92===t))},Z.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;P.lastIndex=this.pos;var i=P.exec(this.input),r=this.pos+i[0].length;if(k.test(this.input.slice(this.pos,r)))return!1;if(t){var n,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||v(n=this.fullCharCodeAt(s))||92===n)return!1;P.lastIndex=s;var o=P.exec(this.input);if(r=s+o[0].length,o&&k.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!m(a)&&92!==a)return!1;var u=r;do{r+=a<=65535?1:2}while(v(a=this.fullCharCodeAt(r)));if(92===a)return!0;var h=this.input.slice(u,r);if(f.test(h))return!1;if(e&&!t&&"of"===h){P.lastIndex=r;var c=P.exec(this.input);if(61!==this.input.charCodeAt(r+=c[0].length)||61===(a=this.input.charCodeAt(r+1))||62===a)return!1}return!0},Z.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Z.isUsing=function(t){return this.isUsingKeyword(!1,t)},Z.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=E._var,r="let"),n){case E._break:case E._continue:return this.parseBreakContinueStatement(s,n.keyword);case E._debugger:return this.parseDebuggerStatement(s);case E._do:return this.parseDoStatement(s);case E._for:return this.parseForStatement(s);case E._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case E._class:return t&&this.unexpected(),this.parseClass(s,!0);case E._if:return this.parseIfStatement(s);case E._return:return this.parseReturnStatement(s);case E._switch:return this.parseSwitchStatement(s);case E._throw:return this.parseThrowStatement(s);case E._try:return this.parseTryStatement(s);case E._const:case E._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case E._while:return this.parseWhileStatement(s);case E._with:return this.parseWithStatement(s);case E.braceL:return this.parseBlock(!0,s);case E.semi:return this.parseEmptyStatement(s);case E._export:case E._import:if(this.options.ecmaVersion>10&&n===E._import){P.lastIndex=this.pos;var o=P.exec(this.input),a=this.input.charCodeAt(this.pos+o[0].length);if(40===a||46===a)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===E._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===u&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,u),this.semicolon(),this.finishNode(s,"VariableDeclaration");var h=this.value,c=this.parseExpression();return n===E.name&&"Identifier"===c.type&&this.eat(E.colon)?this.parseLabeledStatement(s,h,c,t):this.parseExpressionStatement(s,c)}},Z.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(E.semi)||this.insertSemicolon()?t.label=null:this.type!==E.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var n=this.labels[r];if(null==t.label||n.name===t.label.name){if(null!=n.kind&&(i||"loop"===n.kind))break;if(t.label&&i)break}}return r===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Z.parseDoStatement=function(t){return this.next(),this.labels.push(Y),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(E._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(E.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Z.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Y),this.enterScope(0),this.expect(E.parenL),this.type===E.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===E._var||this.type===E._const||i){var r=this.startNode(),n=i?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var u=this.startNode();return this.next(),"await using"===a&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(u,!0,a),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(t,u,e)}var h=this.containsEsc,c=new W,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===E._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===E._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||h||"Identifier"!==l.type||"async"!==l.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,c),this.checkLValPattern(l),this.parseForIn(t,l)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,l))},Z.parseForAfterInit=function(t,e,i){return(this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===E._in?("using"!==e.kind&&"await using"!==e.kind||e.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Z.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,tt|(i?0:et),!1,e)},Z.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(E._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Z.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(E.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Z.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(E.braceL),this.labels.push(X),this.enterScope(1024);for(var i=!1;this.type!==E.braceR;)if(this.type===E._case||this.type===E._default){var r=this.type===E._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(E.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Z.parseThrowStatement=function(t){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Q=[];Z.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(E.parenR),t},Z.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===E._catch){var e=this.startNode();this.next(),this.eat(E.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(E._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Z.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Z.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Y),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Z.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Z.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Z.parseLabeledStatement=function(t,e,i,r){for(var n=0,s=this.labels;n<s.length;n+=1)s[n].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===E._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==t.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Z.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Z.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(E.braceL),t&&this.enterScope(0);this.type!==E.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Z.parseFor=function(t,e){return t.init=e,this.expect(E.semi),t.test=this.type===E.semi?null:this.parseExpression(),this.expect(E.semi),t.update=this.type===E.parenR?null:this.parseExpression(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Z.parseForIn=function(t,e){var i=this.type===E._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Z.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(E.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===E._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===E._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(E.comma))break}return t},Z.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var tt=1,et=2;function it(t,e){var i=e.key.name,r=t[i],n="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(n=(e.static?"s":"i")+e.kind),"iget"===r&&"iset"===n||"iset"===r&&"iget"===n||"sget"===r&&"sset"===n||"sset"===r&&"sget"===n?(t[i]="true",!1):!!r||(t[i]=n,!1)}function rt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}Z.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===E.star&&e&et&&this.unexpected(),t.generator=this.eat(E.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e&tt&&(t.id=4&e&&this.type!==E.name?null:this.parseIdent(),!t.id||e&et||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(V(t.async,t.generator)),e&tt||(t.id=this.type===E.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&tt?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(t){this.expect(E.parenL),t.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(E.braceL);this.type!==E.braceR;){var o=this.parseClassElement(null!==t.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&it(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(t){if(this.eat(E.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),r="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(E.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===E.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==E.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(E.star)&&(n=!0),!r&&!s&&!n){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:r=u)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===E.parenL||"method"!==o||n||s){var h=!i.static&&rt(i,"constructor"),c=h&&t;h&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=h?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},Z.isClassElementNameStart=function(){return this.type===E.name||this.type===E.privateId||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword},Z.parseClassElementName=function(t){this.type===E.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Z.parseClassMethod=function(t,e,i,r){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),i&&this.raise(n.start,"Constructor can't be an async method")):t.static&&rt(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,i,r);return"get"===t.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===t.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Z.parseClassField=function(t){return rt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(E.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Z.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==E.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Z.parseClassId=function(t,e){this.type===E.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Z.parseClassSuper=function(t){t.superClass=this.eat(E._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Z.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,n=0===r?null:this.privateNameStack[r-1],s=0;s<i.length;++s){var o=i[s];N(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Z.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Z.parseExport=function(t,e){if(this.next(),this.eat(E.star))return this.parseExportAllDeclaration(t,e);if(this.eat(E._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,r=t.specifiers;i<r.length;i+=1){var n=r[i];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Z.parseExportDeclaration=function(){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var t;if(this.type===E._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|tt,!1,t)}if(this.type===E._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Z.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var r=0,n=e.properties;r<n.length;r+=1)this.checkPatternExport(t,n[r]);else if("ArrayPattern"===i)for(var s=0,o=e.elements;s<o.length;s+=1){var a=o[s];a&&this.checkPatternExport(t,a)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Z.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Z.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(E.braceL);!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Z.parseImport=function(t){return this.next(),this.type===E.string?(t.specifiers=Q,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===E.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Z.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Z.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Z.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Z.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===E.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(E.comma)))return t;if(this.type===E.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(E.braceL);!this.eat(E.braceR);){if(e)e=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;t.push(this.parseImportSpecifier())}return t},Z.parseWithClause=function(){var t=[];if(!this.eat(E._with))return t;this.expect(E.braceL);for(var e={},i=!0;!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;N(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},Z.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(E.colon),this.type!==E.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===E.string){var t=this.parseLiteral(this.value);return z.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var nt=G.prototype;nt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,n=t.properties;r<n.length;r+=1){var s=n[r];this.toAssignable(s,e),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},nt.toAssignableList=function(t,e){for(var i=t.length,r=0;r<i;r++){var n=t[r];n&&this.toAssignable(n,e)}if(i){var s=t[i-1];6===this.options.ecmaVersion&&e&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return t},nt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},nt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==E.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},nt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case E.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(E.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case E.braceL:return this.parseObj(!0)}return this.parseIdent()},nt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(E.comma),e&&this.type===E.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===E.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},nt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},nt.parseBindingListItem=function(t){return t},nt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(E.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},nt.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var r=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},nt.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var r=0,n=t.properties;r<n.length;r+=1)this.checkLValInnerPattern(n[r],e,i);break;case"ArrayPattern":for(var s=0,o=t.elements;s<o.length;s+=1){var a=o[s];a&&this.checkLValInnerPattern(a,e,i)}break;default:this.checkLValSimple(t,e,i)}},nt.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var st=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},ot={b_stat:new st("{",!1),b_expr:new st("{",!0),b_tmpl:new st("${",!1),p_stat:new st("(",!1),p_expr:new st("(",!0),q_tmpl:new st("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new st("function",!1),f_expr:new st("function",!0),f_expr_gen:new st("function",!0,!1,null,!0),f_gen:new st("function",!1,!1,null,!0)},at=G.prototype;at.initialContext=function(){return[ot.b_stat]},at.curContext=function(){return this.context[this.context.length-1]},at.braceIsBlock=function(t){var e=this.curContext();return e===ot.f_expr||e===ot.f_stat||(t!==E.colon||e!==ot.b_stat&&e!==ot.b_expr?t===E._return||t===E.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):t===E._else||t===E.semi||t===E.eof||t===E.parenR||t===E.arrow||(t===E.braceL?e===ot.b_stat:t!==E._var&&t!==E._const&&t!==E.name&&!this.exprAllowed):!e.isExpr)},at.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},at.updateContext=function(t){var e,i=this.type;i.keyword&&t===E.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},at.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},E.parenR.updateContext=E.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===ot.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},E.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ot.b_stat:ot.b_expr),this.exprAllowed=!0},E.dollarBraceL.updateContext=function(){this.context.push(ot.b_tmpl),this.exprAllowed=!0},E.parenL.updateContext=function(t){this.context.push(t===E._if||t===E._for||t===E._with||t===E._while?ot.p_stat:ot.p_expr),this.exprAllowed=!0},E.incDec.updateContext=function(){},E._function.updateContext=E._class.updateContext=function(t){!t.beforeExpr||t===E._else||t===E.semi&&this.curContext()!==ot.p_stat||t===E._return&&k.test(this.input.slice(this.lastTokEnd,this.start))||(t===E.colon||t===E.braceL)&&this.curContext()===ot.b_stat?this.context.push(ot.f_stat):this.context.push(ot.f_expr),this.exprAllowed=!1},E.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},E.backQuote.updateContext=function(){this.curContext()===ot.q_tmpl?this.context.pop():this.context.push(ot.q_tmpl),this.exprAllowed=!1},E.star.updateContext=function(t){if(t===E._function){var e=this.context.length-1;this.context[e]=this.context[e]===ot.f_expr?ot.f_expr_gen:ot.f_gen}this.exprAllowed=!0},E.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==E.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var ut=G.prototype;function ht(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ht(t.expression)}function ct(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&ct(t.expression)||"ParenthesizedExpression"===t.type&&ct(t.expression)}ut.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,n=t.key;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);else{var o=e[r="$"+r];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(n.start,"Redefinition of property"):o=e[r]={init:!1,get:!1,set:!1},o[s]=!0}}},ut.parseExpression=function(t,e){var i=this;return this.catchStackOverflow((function(){var r=i.start,n=i.startLoc,s=i.parseMaybeAssign(t,e);if(i.type===E.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(E.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},ut.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new W,r=!0);var a=this.start,u=this.startLoc;this.type!==E.parenL&&this.type!==E.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var h=this.parseMaybeConditional(t,e);if(i&&(h=i.call(this,h,a,u)),this.type.isAssign){var c=this.startNodeAt(a,u);return c.operator=this.value,this.type===E.eq&&(h=this.toAssignable(h,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=h.start&&(e.shorthandAssign=-1),this.type===E.eq?this.checkLValPattern(h):this.checkLValSimple(h),c.left=h,this.next(),c.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),h},ut.parseMaybeConditional=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(("ArrowFunctionExpression"!==n.type||n.start!==i)&&this.eat(E.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(E.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},ut.parseExprOps=function(t,e){var i=this.start,r=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===i&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,i,r,-1,t)},ut.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==E._in)&&s>r){var o=this.type===E.logicalOR||this.type===E.logicalAND,a=this.type===E.coalesce;a&&(s=E.logicalAND.binop);var u=this.value;this.next();var h=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),h,c,s,n),l=this.buildBinary(e,i,t,f,u,o||a);return(o&&this.type===E.coalesce||a&&(this.type===E.logicalOR||this.type===E.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(l,e,i,r,n)}return t},ut.buildBinary=function(t,e,i,r,n,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=n,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ut.parseMaybeUnary=function(t,e,i,r){var n,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),e=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===E.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&ht(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&ct(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==E.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(s,o);h.operator=this.value,h.prefix=!1,h.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(h,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==E._in&&this.unexpected();return i||"ArrowFunctionExpression"===n.type&&n.start===s||!this.eat(E.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ut.parseExprSubscripts=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var s=this.parseSubscripts(n,i,r,!1,e);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},ut.parseSubscripts=function(t,e,i,r,n){for(var s=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,i,r,s,o,n);if(a.optional&&(o=!0),a===t||"ArrowFunctionExpression"===a.type){if(o){var u=this.startNodeAt(e,i);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}t=a}},ut.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(E.arrow)},ut.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},ut.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(E.questionDot);r&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(E.bracketL);if(h||u&&this.type!==E.parenL&&this.type!==E.backQuote||this.eat(E.dot)){var c=this.startNodeAt(e,i);c.object=t,h?(c.property=this.parseExpression(),this.expect(E.bracketR)):c.property=this.type===E.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!h,a&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(E.parenL)){var f=new W,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!u&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=d,this.awaitIdentPos=p,this.parseSubscriptAsyncArrow(e,i,m,o);this.checkExpressionErrors(f,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=p||this.awaitIdentPos;var v=this.startNodeAt(e,i);v.callee=t,v.arguments=m,a&&(v.optional=u),t=this.finishNode(v,"CallExpression")}else if(this.type===E.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(e,i);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t},ut.parseExprAtom=function(t,e,i){this.type===E.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case E._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==E.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==E.dot&&this.type!==E.bracketL&&this.type!==E.parenL&&this.unexpected(),this.finishNode(r,"Super");case E._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case E.name:var s=this.start,o=this.startLoc,a=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===u.name&&!this.canInsertSemicolon()&&this.eat(E._function))return this.overrideContext(ot.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(E.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[u],!1,e);if(this.options.ecmaVersion>=8&&"async"===u.name&&this.type===E.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return u=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(E.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[u],!0,e)}return u;case E.regexp:var h=this.value;return(r=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},r;case E.num:case E.string:return this.parseLiteral(this.value);case E._null:case E._true:case E._false:return(r=this.startNode()).value=this.type===E._null?null:this.type===E._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case E.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),f;case E.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(E.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case E.braceL:return this.overrideContext(ot.b_expr),this.parseObj(!1,t);case E._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case E._class:return this.parseClass(this.startNode(),!1);case E._new:return this.parseNew();case E.backQuote:return this.parseTemplate();case E._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},ut.parseExprAtomDefault=function(){this.unexpected()},ut.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===E.parenL&&!t)return this.parseDynamicImport(e);if(this.type===E.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},ut.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(E.parenR)?t.options=null:(this.expect(E.comma),this.afterTrailingComma(E.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(E.parenR)||(this.expect(E.comma),this.afterTrailingComma(E.parenR)||this.unexpected())));else if(!this.eat(E.parenR)){var e=this.start;this.eat(E.comma)&&this.eat(E.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},ut.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},ut.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},ut.parseParenExpression=function(){this.expect(E.parenL);var t=this.parseExpression();return this.expect(E.parenR),t},ut.shouldParseArrow=function(){return!this.canInsertSemicolon()},ut.parseParenAndDistinguishExpression=function(t,e){var i,r=this.start,n=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,u=this.startLoc,h=[],c=!0,f=!1,l=new W,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==E.parenR;){if(c?c=!1:this.expect(E.comma),s&&this.afterTrailingComma(E.parenR,!0)){f=!0;break}if(this.type===E.ellipsis){o=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(E.parenR),t&&this.shouldParseArrow(h)&&this.eat(E.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,h,e);h.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?((i=this.startNodeAt(a,u)).expressions=h,this.finishNodeAt(i,"SequenceExpression",m,v)):i=h[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,n);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},ut.parseParenItem=function(t){return t},ut.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var ft=[];ut.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===E.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var r=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),"Super"===t.callee.type&&this.raiseRecoverable(r,"Invalid use of 'super'"),t.arguments=this.eat(E.parenL)?this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1):ft,this.finishNode(t,"NewExpression")},ut.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===E.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===E.backQuote,this.finishNode(i,"TemplateElement")},ut.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:e});for(i.quasis=[r];!r.tail;)this.type===E.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(E.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(E.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},ut.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===E.name||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===E.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},ut.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(E.braceR);){if(r)r=!1;else if(this.expect(E.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(E.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},ut.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(E.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,e),this.type===E.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(t||e)&&(n=this.start,s=this.startLoc),t||(i=this.eat(E.star)));var a=this.containsEsc;return this.parsePropertyName(o),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(o)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(E.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},ut.parseGetterSetter=function(t){var e=t.key.name;(this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e,t.value.params.length!==("get"===t.kind?0:1))?this.raiseRecoverable(t.value.start,"get"===t.kind?"getter should have no params":"setter should have exactly one param"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},ut.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===E.colon&&this.unexpected(),this.eat(E.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===E.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,r),t.kind="init"):e||a||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===E.comma||this.type===E.braceR||this.type===E.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===E.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||r)&&this.unexpected(),this.parseGetterSetter(t))},ut.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(E.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(E.bracketR),t.key;t.computed=!1}return t.key=this.type===E.num||this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ut.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},ut.parseMethod=function(t,e,i){var r=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|V(e,r.generator)|(i?128:0)),this.expect(E.parenL),r.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},ut.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|V(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},ut.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==E.braceL)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);n&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!n&&!s&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,s&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=a}this.exitScope()},ut.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},ut.checkParams=function(t,e){for(var i=Object.create(null),r=0,n=t.params;r<n.length;r+=1)this.checkLValInnerPattern(n[r],1,e?null:i)},ut.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(E.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===E.comma?o=null:this.type===E.ellipsis?(o=this.parseSpread(r),r&&this.type===E.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},ut.checkUnreserved=function(t){var e=t.start,i=t.end,r=t.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(e,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(e,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+r+"' is reserved"))},ut.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},ut.parseIdentNode=function(){var t=this.startNode();return this.type===E.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=E.name):this.unexpected(),t},ut.parsePrivateIdent=function(){var t=this.startNode();return this.type===E.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},ut.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===E.semi||this.canInsertSemicolon()||this.type!==E.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(E.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},ut.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var lt=G.prototype;lt.raise=function(t,e){var i=q(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var r=new SyntaxError(e);throw r.pos=t,r.loc=i,r.raisedAt=this.pos,r},lt.raiseRecoverable=lt.raise,lt.curPosition=function(){if(this.options.locations)return new L(this.curLine,this.pos-this.lineStart)};var dt=G.prototype,pt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};dt.enterScope=function(t){this.scopeStack.push(new pt(t))},dt.exitScope=function(){this.scopeStack.pop()},dt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},dt.declareName=function(t,e,i){var r=!1;if(2===e){var n=this.currentScope();r=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&1&n.flags&&delete this.undefinedExports[t]}else if(4===e)this.currentScope().lexical.push(t);else if(3===e){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(t)>-1:s.lexical.indexOf(t)>-1||s.var.indexOf(t)>-1,s.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(t)>-1&&!(32&a.flags&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(t)>-1){r=!0;break}if(a.var.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t],259&a.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},dt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},dt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},dt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var mt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new U(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},vt=G.prototype;function yt(t,e,i,r){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=i),t}vt.startNode=function(){return new mt(this,this.start,this.startLoc)},vt.startNodeAt=function(t,e){return new mt(this,t,e)},vt.finishNode=function(t,e){return yt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},vt.finishNodeAt=function(t,e,i,r){return yt.call(this,t,e,i,r)},vt.copyNode=function(t){var e=new mt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var gt,bt,$t="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",wt=$t+" Extended_Pictographic",_t=wt+" EBase EComp EMod EPres ExtPict",Et={9:$t,10:wt,11:wt,12:_t,13:_t,14:_t},kt={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},St="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",xt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ot=xt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",jt=Ot+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Pt=jt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",It=Pt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ct={9:xt,10:Ot,11:jt,12:Pt,13:It,14:It+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},At={};for(var Nt=0,Tt=[9,10,11,12,13,14];Nt<Tt.length;Nt+=1)bt=void 0,(bt=At[gt=Tt[Nt]]={binary:R(Et[gt]+" "+St),binaryOfStrings:R(kt[gt]),nonBinary:{General_Category:R(St),Script:R(Ct[gt])}}).nonBinary.Script_Extensions=bt.nonBinary.Script,bt.nonBinary.gc=bt.nonBinary.General_Category,bt.nonBinary.sc=bt.nonBinary.Script,bt.nonBinary.scx=bt.nonBinary.Script_Extensions;var Mt=G.prototype,Rt=function(t,e){this.parent=t,this.base=e||this};Rt.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},Rt.prototype.sibling=function(){return new Rt(this.parent,this.base)};var Dt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=At[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function zt(t){return 105===t||109===t||115===t}function Lt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Ut(t){return t>=65&&t<=90||t>=97&&t<=122}function qt(t){return Ut(t)||95===t}function Ft(t){return qt(t)||Bt(t)}function Bt(t){return t>=48&&t<=57}function Vt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Gt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ht(t){return t>=48&&t<=55}Dt.prototype.reset=function(t,e,i){var r=-1!==i.indexOf("v"),n=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Dt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Dt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return-1;var n=i.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=r)return n;var s=i.charCodeAt(t+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n},Dt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return r;var n,s=i.charCodeAt(t);return!e&&!this.switchU||s<=55295||s>=57344||t+1>=r||(n=i.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Dt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Dt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Dt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Dt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Dt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,r=0,n=t;r<n.length;r+=1){var s=n[r],o=this.at(i,e);if(-1===o||o!==s)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},Mt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,r=!1,n=!1,s=0;s<i.length;s++){var o=i.charAt(s);-1===e.indexOf(o)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&r&&n&&this.raise(t.start,"Invalid regular expression flag")},Mt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Mt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1)t.groupNames[i[e]]||t.raise("Invalid named capture referenced")},Mt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Rt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Mt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Mt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Mt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Mt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Mt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Mt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var r=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<r&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Mt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Mt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Mt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),r=t.eat(45);if(i||r){for(var n=0;n<i.length;n++){var s=i.charAt(n);i.indexOf(s,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(t);i||o||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var u=o.charAt(a);(o.indexOf(u,a+1)>-1||i.indexOf(u)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Mt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Mt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&zt(i);)e+=D(i),t.advance();return e},Mt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Mt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Mt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Lt(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Lt(i);)t.advance();return t.pos!==e},Mt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e||(t.advance(),0))},Mt.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var r=0,n=i;r<n.length;r+=1)n[r].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Mt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Mt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=D(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=D(t.lastIntValue);return!0}return!1},Mt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return m(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return v(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Mt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Mt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Mt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Mt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Mt.regexp_eatZero=function(t){return 48===t.current()&&!Bt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Mt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Mt.regexp_eatControlLetter=function(t){var e=t.current();return!!Ut(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Mt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,r=t.pos,n=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var s=t.lastIntValue;if(n&&s>=55296&&s<=56319){var o=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}t.pos=o,t.lastIntValue=s}return!0}if(n&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(i=t.lastIntValue)>=0&&i<=1114111)return!0;n&&t.raise("Invalid unicode escape"),t.pos=r}return!1},Mt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e||(t.lastIntValue=e,t.advance(),0))},Mt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},Mt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var r;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===r&&t.raise("Invalid property name"),r;t.raise("Invalid property name")}return 0},Mt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t))return this.regexp_validateUnicodePropertyNameAndValue(t,i,t.lastStringValue),1}return t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)?this.regexp_validateUnicodePropertyNameOrValue(t,t.lastStringValue):0},Mt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Mt.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Mt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";qt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ft(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Mt.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Mt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Mt.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Mt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||Ht(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var r=t.current();return 93!==r&&(t.lastIntValue=r,t.advance(),!0)},Mt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Mt.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var r=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(r!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(r!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Mt.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var r=t.lastIntValue;return-1!==i&&-1!==r&&i>r&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Mt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Mt.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),r=this.regexp_classContents(t);if(t.eat(93))return i&&2===r&&t.raise("Negated character class may contain strings"),r;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},Mt.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Mt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Mt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Mt.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t)&&(t.eat(98)?(t.lastIntValue=8,0):(t.pos=e,1)));var i=t.current();return!(i<0||i===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(i)||function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(i)||(t.advance(),t.lastIntValue=i,0))},Mt.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Bt(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Mt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Mt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Bt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Mt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Vt(i=t.current());)t.lastIntValue=16*t.lastIntValue+Gt(i),t.advance();return t.pos!==e},Mt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;t.lastIntValue=e<=3&&this.regexp_eatOctalDigit(t)?64*e+8*i+t.lastIntValue:8*e+i}else t.lastIntValue=e;return!0}return!1},Mt.regexp_eatOctalDigit=function(t){var e=t.current();return Ht(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Mt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!Vt(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Gt(n),t.advance()}return!0};var Jt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new U(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Kt=G.prototype;function Wt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Kt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Jt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Kt.getToken=function(){return this.next(),new Jt(this)},"undefined"!=typeof Symbol&&(Kt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===E.eof,value:e}}}}),Kt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(E.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Kt.readToken=function(t){return m(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Kt.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Kt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Kt.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,n=e;(r=O(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Kt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!x(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Kt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&j.test(String.fromCharCode(t))))break t;++this.pos}}},Kt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Kt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(E.ellipsis)):(++this.pos,this.finishToken(E.dot))},Kt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(E.assign,2):this.finishOp(E.slash,1)},Kt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?E.star:E.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=E.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(E.assign,i+1):this.finishOp(r,i)},Kt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(124===t?E.logicalOR:E.logicalAND,2):61===e?this.finishOp(E.assign,2):this.finishOp(124===t?E.bitwiseOR:E.bitwiseAND,1)},Kt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(E.assign,2):this.finishOp(E.bitwiseXOR,1)},Kt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!k.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(E.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(E.assign,2):this.finishOp(E.plusMin,1)},Kt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(E.assign,i+1):this.finishOp(E.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(E.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Kt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(E.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(E.arrow)):this.finishOp(61===t?E.eq:E.prefix,1)},Kt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(E.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(E.coalesce,2)}return this.finishOp(E.question,1)},Kt.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,m(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(E.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Kt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(E.parenL);case 41:return++this.pos,this.finishToken(E.parenR);case 59:return++this.pos,this.finishToken(E.semi);case 44:return++this.pos,this.finishToken(E.comma);case 91:return++this.pos,this.finishToken(E.bracketL);case 93:return++this.pos,this.finishToken(E.bracketR);case 123:return++this.pos,this.finishToken(E.braceL);case 125:return++this.pos,this.finishToken(E.braceR);case 58:return++this.pos,this.finishToken(E.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(E.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(E.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Kt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Kt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(k.test(r)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Dt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(n,o)}catch(t){}return this.finishToken(E.regexp,{pattern:n,flags:o,value:u})},Kt.readInt=function(t,e,i){for(var r=this.options.ecmaVersion>=12&&void 0===e,n=i&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,u=0,h=null==e?1/0:e;u<h;++u,++this.pos){var c=this.input.charCodeAt(this.pos),f=void 0;if(r&&95===c)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===u&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((f=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;a=c,o=o*t+f}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=e&&this.pos-s!==e?null:o},Kt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Wt(this.input.slice(e,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,i)},Kt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===r){var n=Wt(this.input.slice(e,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,n)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(e,this.pos),i?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(E.num,o)},Kt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Kt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;92===r?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(x(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(E.string,e)};var Zt={};function Yt(t,e){return G.parse(t,e)}
|
|
2
2
|
/*!
|
|
3
3
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
4
4
|
* (c) 2017-2022 Joachim Wester
|
|
5
5
|
* MIT licensed
|
|
6
|
-
*/Jt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Zt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Jt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Zt;this.raise(t,e)},Jt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==E.template&&this.type!==E.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(E.template,t)):36===i?(this.pos+=2,this.finishToken(E.dollarBraceL)):(++this.pos,this.finishToken(E.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(x(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Jt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(E.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Jt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t&&this.invalidStringToken(this.pos-1,"Invalid escape sequence in template string");default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),"0"===i&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return x(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Jt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Jt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(v(n,r))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?m:v)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=D(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Jt.readWord=function(){var t=this.readWord1(),e=E.name;return this.keywords.test(t)&&(e=w[t]),this.finishToken(e,t)},G.acorn={Parser:G,version:"8.18.0",defaultOptions:F,Position:L,SourceLocation:U,getLineInfo:q,Node:mt,TokenType:y,tokTypes:E,keywordTypes:w,TokContext:st,tokContexts:ot,isIdentifierChar:v,isIdentifierStart:m,Token:Kt,isNewLine:x,lineBreak:k,lineBreakG:S,nonASCIIwhitespace:O};var Yt,Qt=(Yt=function(t,e){return Yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Yt(t,e)},function(t,e){function i(){this.constructor=t}Yt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),te=Object.prototype.hasOwnProperty;function ee(t,e){return te.call(t,e)}function ie(t){if(Array.isArray(t)){for(var e=new Array(t.length),i=0;i<e.length;i++)e[i]=""+i;return e}if(Object.keys)return Object.keys(t);var r=[];for(var n in t)ee(t,n)&&r.push(n);return r}function re(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ne(t){for(var e,i=0,r=t.length;i<r;){if(!((e=t.charCodeAt(i))>=48&&e<=57))return!1;i++}return!0}function se(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function oe(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ae(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(ae(t[e]))return!0}else if("object"==typeof t)for(var r=ie(t),n=r.length,s=0;s<n;s++)if(ae(t[r[s]]))return!0;return!1}function he(t,e){var i=[t];for(var r in e){var n="object"==typeof e[r]?JSON.stringify(e[r],null,2):e[r];void 0!==n&&i.push(r+": "+n)}return i.join("\n")}var ue=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,he(e,{name:i,index:r,operation:n,tree:s}))||this;return a.name=i,a.index=r,a.operation=n,a.tree=s,Object.setPrototypeOf(a,o.prototype),a.message=he(e,{name:i,index:r,operation:n,tree:s}),a}return Qt(e,t),e}(Error),ce=ue,fe={add:function(t,e,i){return t[e]=this.value,{newDocument:i}},remove:function(t,e,i){var r=t[e];return delete t[e],{newDocument:i,removed:r}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:function(t,e,i){var r=de(i,this.path);r&&(r=re(r));var n=pe(i,{op:"remove",path:this.from}).removed;return pe(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=de(i,this.from);return pe(i,{op:"add",path:this.path,value:re(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:be(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},le={add:function(t,e,i){return ne(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:i,index:e}},remove:function(t,e,i){return{newDocument:i,removed:t.splice(e,1)[0]}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:fe.move,copy:fe.copy,test:fe.test,_get:fe._get};function de(t,e){if(""==e)return t;var i={op:"_get",path:e};return pe(t,i),i.value}function pe(t,e,i,r,n,s){if(void 0===i&&(i=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),void 0===s&&(s=0),i&&("function"==typeof i?i(e,0,t,e.path):ye(e,0)),""===e.path){var o={newDocument:t};if("add"===e.op)return o.newDocument=e.value,o;if("replace"===e.op)return o.newDocument=e.value,o.removed=t,o;if("move"===e.op||"copy"===e.op)return o.newDocument=de(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=be(t,e.value),!1===o.test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o.newDocument=t,o}if("remove"===e.op)return o.removed=t,o.newDocument=null,o;if("_get"===e.op)return e.value=t,o;if(i)throw new ce("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=re(t));var a=(e.path||"").split("/"),h=t,u=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:ye;;){if((l=a[u])&&-1!=l.indexOf("~")&&(l=oe(l)),n&&("__proto__"==l||"prototype"==l&&u>0&&"constructor"==a[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&void 0===f&&(void 0===h[l]?f=a.slice(0,u).join("/"):u==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),u++,Array.isArray(h)){if("-"===l)l=h.length;else{if(i&&!ne(l))throw new ce("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);ne(l)&&(l=~~l)}if(u>=c){if(i&&"add"===e.op&&l>h.length)throw new ce("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);if(!1===(o=le[e.op].call(e,h,l,t)).test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(u>=c){if(!1===(o=fe[e.op].call(e,h,l,t)).test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(h=h[l],i&&u<c&&(!h||"object"!=typeof h))throw new ce("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function me(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new ce("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=re(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=pe(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function ve(t,e,i){var r=pe(t,e);if(!1===r.test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function ye(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new ce("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!fe[t.op])throw new ce("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,i);if("string"!=typeof t.path)throw new ce("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new ce('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new ce("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new ce("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&ae(t.value))throw new ce("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,i);if(i)if("add"==t.op){var n=t.path.split("/").length,s=r.split("/").length;if(n!==s+1&&n!==s)throw new ce("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==r)throw new ce("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,i)}else if("move"===t.op||"copy"===t.op){var o=ge([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new ce("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function ge(t,e,i){try{if(!Array.isArray(t))throw new ce("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)me(re(e),re(t),i||!0);else{i=i||ye;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof ce)return t;throw t}}function be(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var i,r,n,s=Array.isArray(t),o=Array.isArray(e);if(s&&o){if((r=t.length)!=e.length)return!1;for(i=r;0!=i--;)if(!be(t[i],e[i]))return!1;return!0}if(s!=o)return!1;var a=Object.keys(t);if((r=a.length)!==Object.keys(e).length)return!1;for(i=r;0!=i--;)if(!e.hasOwnProperty(a[i]))return!1;for(i=r;0!=i--;)if(!be(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var $e=Object.freeze({__proto__:null,JsonPatchError:ce,_areEquals:be,applyOperation:pe,applyPatch:me,applyReducer:ve,deepClone:re,getValueByPointer:de,validate:ge,validator:ye}),we=new WeakMap,_e=function(t){this.observers=new Map,this.obj=t},Ee=function(t,e){this.callback=t,this.observer=e};
|
|
6
|
+
*/Kt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Zt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Kt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Zt;this.raise(t,e)},Kt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==E.template&&this.type!==E.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(E.template,t)):36===i?(this.pos+=2,this.finishToken(E.dollarBraceL)):(++this.pos,this.finishToken(E.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(x(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Kt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(E.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Kt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t&&this.invalidStringToken(this.pos-1,"Invalid escape sequence in template string");default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),"0"===i&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return x(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Kt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Kt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(v(n,r))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?m:v)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=D(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Kt.readWord=function(){var t=this.readWord1(),e=E.name;return this.keywords.test(t)&&(e=w[t]),this.finishToken(e,t)},G.acorn={Parser:G,version:"8.18.0",defaultOptions:F,Position:L,SourceLocation:U,getLineInfo:q,Node:mt,TokenType:y,tokTypes:E,keywordTypes:w,TokContext:st,tokContexts:ot,isIdentifierChar:v,isIdentifierStart:m,Token:Jt,isNewLine:x,lineBreak:k,lineBreakG:S,nonASCIIwhitespace:j};var Xt,Qt=(Xt=function(t,e){return Xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Xt(t,e)},function(t,e){function i(){this.constructor=t}Xt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),te=Object.prototype.hasOwnProperty;function ee(t,e){return te.call(t,e)}function ie(t){if(Array.isArray(t)){for(var e=new Array(t.length),i=0;i<e.length;i++)e[i]=""+i;return e}if(Object.keys)return Object.keys(t);var r=[];for(var n in t)ee(t,n)&&r.push(n);return r}function re(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ne(t){for(var e,i=0,r=t.length;i<r;){if(!((e=t.charCodeAt(i))>=48&&e<=57))return!1;i++}return!0}function se(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function oe(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ae(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(ae(t[e]))return!0}else if("object"==typeof t)for(var r=ie(t),n=r.length,s=0;s<n;s++)if(ae(t[r[s]]))return!0;return!1}function ue(t,e){var i=[t];for(var r in e){var n="object"==typeof e[r]?JSON.stringify(e[r],null,2):e[r];void 0!==n&&i.push(r+": "+n)}return i.join("\n")}var he=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,ue(e,{name:i,index:r,operation:n,tree:s}))||this;return a.name=i,a.index=r,a.operation=n,a.tree=s,Object.setPrototypeOf(a,o.prototype),a.message=ue(e,{name:i,index:r,operation:n,tree:s}),a}return Qt(e,t),e}(Error),ce=he,fe={add:function(t,e,i){return t[e]=this.value,{newDocument:i}},remove:function(t,e,i){var r=t[e];return delete t[e],{newDocument:i,removed:r}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:function(t,e,i){var r=de(i,this.path);r&&(r=re(r));var n=pe(i,{op:"remove",path:this.from}).removed;return pe(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=de(i,this.from);return pe(i,{op:"add",path:this.path,value:re(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:be(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},le={add:function(t,e,i){return ne(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:i,index:e}},remove:function(t,e,i){return{newDocument:i,removed:t.splice(e,1)[0]}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:fe.move,copy:fe.copy,test:fe.test,_get:fe._get};function de(t,e){if(""==e)return t;var i={op:"_get",path:e};return pe(t,i),i.value}function pe(t,e,i,r,n,s){if(void 0===i&&(i=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),void 0===s&&(s=0),i&&("function"==typeof i?i(e,0,t,e.path):ye(e,0)),""===e.path){var o={newDocument:t};if("add"===e.op)return o.newDocument=e.value,o;if("replace"===e.op)return o.newDocument=e.value,o.removed=t,o;if("move"===e.op||"copy"===e.op)return o.newDocument=de(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=be(t,e.value),!1===o.test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o.newDocument=t,o}if("remove"===e.op)return o.removed=t,o.newDocument=null,o;if("_get"===e.op)return e.value=t,o;if(i)throw new ce("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=re(t));var a=(e.path||"").split("/"),u=t,h=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:ye;;){if((l=a[h])&&-1!=l.indexOf("~")&&(l=oe(l)),n&&("__proto__"==l||"prototype"==l&&h>0&&"constructor"==a[h-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&void 0===f&&(void 0===u[l]?f=a.slice(0,h).join("/"):h==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),h++,Array.isArray(u)){if("-"===l)l=u.length;else{if(i&&!ne(l))throw new ce("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);ne(l)&&(l=~~l)}if(h>=c){if(i&&"add"===e.op&&l>u.length)throw new ce("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);if(!1===(o=le[e.op].call(e,u,l,t)).test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(h>=c){if(!1===(o=fe[e.op].call(e,u,l,t)).test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(u=u[l],i&&h<c&&(!u||"object"!=typeof u))throw new ce("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function me(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new ce("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=re(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=pe(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function ve(t,e,i){var r=pe(t,e);if(!1===r.test)throw new ce("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function ye(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new ce("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!fe[t.op])throw new ce("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,i);if("string"!=typeof t.path)throw new ce("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new ce('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new ce("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new ce("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&ae(t.value))throw new ce("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,i);if(i)if("add"==t.op){var n=t.path.split("/").length,s=r.split("/").length;if(n!==s+1&&n!==s)throw new ce("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==r)throw new ce("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,i)}else if("move"===t.op||"copy"===t.op){var o=ge([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new ce("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function ge(t,e,i){try{if(!Array.isArray(t))throw new ce("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)me(re(e),re(t),i||!0);else{i=i||ye;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof ce)return t;throw t}}function be(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var i,r,n,s=Array.isArray(t),o=Array.isArray(e);if(s&&o){if((r=t.length)!=e.length)return!1;for(i=r;0!=i--;)if(!be(t[i],e[i]))return!1;return!0}if(s!=o)return!1;var a=Object.keys(t);if((r=a.length)!==Object.keys(e).length)return!1;for(i=r;0!=i--;)if(!e.hasOwnProperty(a[i]))return!1;for(i=r;0!=i--;)if(!be(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var $e=Object.freeze({__proto__:null,JsonPatchError:ce,_areEquals:be,applyOperation:pe,applyPatch:me,applyReducer:ve,deepClone:re,getValueByPointer:de,validate:ge,validator:ye}),we=new WeakMap,_e=function(t){this.observers=new Map,this.obj=t},Ee=function(t,e){this.callback=t,this.observer=e};
|
|
7
7
|
/*!
|
|
8
8
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
9
9
|
* (c) 2017-2021 Joachim Wester
|
|
10
10
|
* MIT license
|
|
11
|
-
*/function ke(t,e){e.unobserve()}function Se(t,e){var i,r=function(t){return we.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new _e(t),we.set(t,r);if(i)return i;if(i={},r.value=re(t),e){i.callback=e,i.next=null;var s=function(){xe(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){xe(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new Ee(e,i)),i}function xe(t,e){void 0===e&&(e=!1);var i=we.get(t.object);je(i.value,t.object,t.patches,"",e),t.patches.length&&me(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function je(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=ie(e),o=ie(t),a=!1,h=o.length-1;h>=0;h--){var u=t[f=o[h]];if(!ee(e,f)||void 0===e[f]&&void 0!==u&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+se(f),value:re(u)}),i.push({op:"remove",path:r+"/"+se(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?je(u,c,i,r+"/"+se(f),n):u!==c&&(n&&i.push({op:"test",path:r+"/"+se(f),value:re(u)}),i.push({op:"replace",path:r+"/"+se(f),value:re(c)}))}}if(a||s.length!=o.length)for(h=0;h<s.length;h++){var f;ee(t,f=s[h])||void 0===e[f]||i.push({op:"add",path:r+"/"+se(f),value:re(e[f])})}}}function Oe(t,e,i){void 0===i&&(i=!1);var r=[];return je(t,e,r,"",i),r}var Pe,Ie=Object.assign({},$e,Object.freeze({__proto__:null,compare:Oe,generate:xe,observe:Se,unobserve:ke}),{JsonPatchError:ue,deepClone:re,escapePathComponent:se,unescapePathComponent:oe}),Ce=Object.freeze({__proto__:null,JsonPatchError:ue,_areEquals:be,applyOperation:pe,applyPatch:me,applyReducer:ve,compare:Oe,deepClone:re,default:Ie,escapePathComponent:se,generate:xe,getValueByPointer:de,observe:Se,unescapePathComponent:oe,unobserve:ke,validate:ge,validator:ye}),Ae=Object.create,Ne=Object.getPrototypeOf,Te=Object.defineProperty,Me=Object.getOwnPropertyNames,Re=Object.prototype.hasOwnProperty;function De(t){return this[t]}var ze=(t,e,i)=>{var r=null!=t&&"object"==typeof t;if(r){var n=Pe??=new WeakMap,s=n.get(t);if(s)return s}i=null!=t?Ae(Ne(t)):{};const o=Te(i,"default",{value:t,enumerable:!0});if(t&&"object"==typeof t||"function"==typeof t)for(let e of Me(t))Re.call(o,e)||Te(o,e,{get:De.bind(t,e),enumerable:!0});return r&&n.set(t,o),o},Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ue=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function n(t,...e){const i=[t[0]];let n=0;for(;n<e.length;)a(i,e[n]),i.push(t[++n]);return new r(i)}t._Code=r,t.nil=new r(""),t._=n;var s=new r("+");function o(t,...e){const i=[u(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,u(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=h(t[e-1],t[e+1]);if(void 0!==i){t.splice(e-1,3,i);continue}t[e++]="+"}e++}}(i),new r(i)}function a(t,e){var n;e instanceof r?t.push(...e._items):t.push(e instanceof i?e:"number"==typeof(n=e)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function h(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function u(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=a,t.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:o`${t}${e}`},t.stringify=function(t){return new r(u(t))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new r(`.${e}`):n`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new r(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(t){return new r(t.toString())}})),qe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e,i=Ue();class r extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(e||(t.UsedValueState=e={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class n{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,i;if((null===(i=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===i?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}t.Scope=n;class s extends i.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:e,itemIndex:r}){this.value=t,this.scopePath=i._`.${new i.Name(e)}[${r}]`}}t.ValueScopeName=s;var o=i._`\n`;t.ValueScope=class extends n{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?o:i.nil}}get(){return this._scope}name(t){return new s(t,this._newName(t))}value(t,e){var i;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(t),{prefix:n}=r,s=null!==(i=e.key)&&void 0!==i?i:e.ref;let o=this._values[n];if(o){const t=o.get(s);if(t)return t}else o=this._values[n]=new Map;o.set(s,r);const a=this._scope[n]||(this._scope[n]=[]),h=a.length;return a[h]=e.ref,r.setValue(e,{property:n,itemIndex:h}),r}getValue(t,e){const i=this._values[t];if(i)return i.get(e)}scopeRefs(t,e=this._values){return this._reduceValues(e,(e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return i._`${t}${e.scopePath}`}))}scopeCode(t=this._values,e,i){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,i)}_reduceValues(n,s,o={},a){let h=i.nil;for(const u in n){const c=n[u];if(!c)continue;const f=o[u]=o[u]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,e.Started);let o=s(n);if(o)h=i._`${h}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${n} = ${o};${this.opts._n}`;else{if(!(o=null==a?void 0:a(n)))throw new r(n);h=i._`${h}${o}${this.opts._n}`}f.set(n,e.Completed)}))}return h}}})),Fe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Ue(),i=qe(),r=Ue();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var n=qe();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(t,e){return this}}class o extends s{constructor(t,e,i){super(),this.varKind=t,this.name=e,this.rhs=i}render({es5:t,_n:e}){return`${t?i.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,t,e)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(t,e,i){super(),this.lhs=t,this.rhs=e,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof e.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,t,i),this}get names(){return O(this.lhs instanceof e.Name?{}:{...this.lhs.names},this.rhs)}}class h extends a{constructor(t,e,i,r){super(t,i,r),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class u extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class c extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class f extends s{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class l extends s{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=P(this.code,t,e),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class d extends s{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,i)=>e+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const i=t[e].optimizeNodes();Array.isArray(i)?t.splice(e,1,...i):i?t[e]=i:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:i}=this;let r=i.length;for(;r--;){const n=i[r];n.optimizeNames(t,e)||(I(t,n.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>j(t,e.names)),{})}}class p extends d{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class m extends d{}class v extends p{}v.kind="else";class y extends p{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new v(t):t}return e?!1===t?e instanceof y?e:e.nodes:this.nodes.length?this:new y(C(t),e instanceof y?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=P(this.condition,t,e),this}get names(){const t=super.names;return O(t,this.condition),this.else&&j(t,this.else.names),t}}y.kind="if";class g extends p{}g.kind="for";class b extends g{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=P(this.iteration,t,e),this}get names(){return j(super.names,this.iteration.names)}}class $ extends g{constructor(t,e,i,r){super(),this.varKind=t,this.name=e,this.from=i,this.to=r}render(t){const e=t.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${e} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(t)}get names(){const t=O(super.names,this.from);return O(t,this.to)}}class w extends g{constructor(t,e,i,r){super(),this.loop=t,this.varKind=e,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=P(this.iterable,t,e),this}get names(){return j(super.names,this.iterable.names)}}class _ extends p{constructor(t,e,i){super(),this.name=t,this.args=e,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}_.kind="func";class E extends d{render(t){return"return "+super.render(t)}}E.kind="return";class k extends p{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var i,r;return super.optimizeNames(t,e),null===(i=this.catch)||void 0===i||i.optimizeNames(t,e),null===(r=this.finally)||void 0===r||r.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&j(t,this.catch.names),this.finally&&j(t,this.finally.names),t}}class S extends p{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}S.kind="catch";class x extends p{render(t){return"finally"+super.render(t)}}function j(t,e){for(const i in e)t[i]=(t[i]||0)+(e[i]||0);return t}function O(t,i){return i instanceof e._CodeOrName?j(t,i.names):t}function P(t,i,r){return t instanceof e.Name?s(t):(n=t)instanceof e._Code&&n._items.some((t=>t instanceof e.Name&&1===i[t.str]&&void 0!==r[t.str]))?new e._Code(t._items.reduce(((t,i)=>(i instanceof e.Name&&(i=s(i)),i instanceof e._Code?t.push(...i._items):t.push(i),t)),[])):t;var n;function s(t){const e=r[t.str];return void 0===e||1!==i[t.str]?t:(delete i[t.str],e)}}function I(t,e){for(const i in e)t[i]=(t[i]||0)-(e[i]||0)}function C(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:e._`!${M(t)}`}x.kind="finally",t.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new i.Scope({parent:t}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const i=this._extScope.value(t,e);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,i,r){const n=this._scope.toName(e);return void 0!==i&&r&&(this._constants[n.str]=i),this._leafNode(new o(t,n,i)),n}const(t,e,r){return this._def(i.varKinds.const,t,e,r)}let(t,e,r){return this._def(i.varKinds.let,t,e,r)}var(t,e,r){return this._def(i.varKinds.var,t,e,r)}assign(t,e,i){return this._leafNode(new a(t,e,i))}add(e,i){return this._leafNode(new h(e,t.operators.ADD,i))}code(t){return"function"==typeof t?t():t!==e.nil&&this._leafNode(new l(t)),this}object(...t){const i=["{"];for(const[r,n]of t)i.length>1&&i.push(","),i.push(r),(r!==n||this.opts.es5)&&(i.push(":"),(0,e.addCodeArg)(i,n));return i.push("}"),new e._Code(i)}if(t,e,i){if(this._blockNode(new y(t)),e&&i)this.code(e).else().code(i).endIf();else if(e)this.code(e).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new y(t))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new b(t),e)}forRange(t,e,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(t);return this._for(new $(s,o,e,r),(()=>n(o)))}forOf(t,r,n,s=i.varKinds.const){const o=this._scope.toName(t);if(this.opts.es5){const t=r instanceof e.Name?r:this.var("_arr",r);return this.forRange("_i",0,e._`${t}.length`,(i=>{this.var(o,e._`${t}[${i}]`),n(o)}))}return this._for(new w("of",s,o,r),(()=>n(o)))}forIn(t,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,e._`Object.keys(${r})`,n);const o=this._scope.toName(t);return this._for(new w("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode(g)}label(t){return this._leafNode(new u(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new k;if(this._blockNode(r),this.code(t),e){const t=this.name("e");this._currNode=r.catch=new S(t),e(t)}return i&&(this._currNode=r.finally=new x,this.code(i)),this._endBlockNode(S,x)}throw(t){return this._leafNode(new f(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-e;if(i<0||void 0!==t&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=e,this}func(t,i=e.nil,r,n){return this._blockNode(new _(t,i,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const i=this._currNode;if(i instanceof t||e&&i instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},t.not=C;var A=T(t.operators.AND);t.and=function(...t){return t.reduce(A)};var N=T(t.operators.OR);function T(t){return(i,r)=>i===e.nil?r:r===e.nil?i:e._`${M(i)} ${t} ${M(r)}`}function M(t){return t instanceof e.Name?t:e._`(${t})`}t.or=function(...t){return t.reduce(N)}})),Be=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Fe(),i=Ue();function r(t,e=t.schema){const{opts:i,self:r}=t;if(!i.strictSchema)return;if("boolean"==typeof e)return;const n=r.RULES.keywords;for(const i in e)n[i]||l(t,`unknown keyword: "${i}"`)}function n(t,e){if("boolean"==typeof t)return!t;for(const i in t)if(e[i])return!0;return!1}function s(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function o(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function a({mergeNames:t,mergeToName:i,mergeValues:r,resultToName:n}){return(s,o,a,h)=>{const u=void 0===a?o:a instanceof e.Name?(o instanceof e.Name?t(s,o,a):i(s,o,a),a):o instanceof e.Name?(i(s,a,o),o):r(o,a);return h!==e.Name||u instanceof e.Name?u:n(s,u)}}function h(t,i){if(!0===i)return t.var("props",!0);const r=t.var("props",e._`{}`);return void 0!==i&&u(t,r,i),r}function u(t,i,r){Object.keys(r).forEach((r=>t.assign(e._`${i}${(0,e.getProperty)(r)}`,!0)))}t.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},t.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(r(t,e),!n(e,t.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=n,t.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const i in t)if("$ref"!==i&&e.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:t,schemaPath:i},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return e._`${r}`}return e._`${t}${i}${(0,e.getProperty)(n)}`},t.unescapeFragment=function(t){return o(decodeURIComponent(t))},t.escapeFragment=function(t){return encodeURIComponent(s(t))},t.escapeJsonPointer=s,t.unescapeJsonPointer=o,t.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},t.mergeEvaluated={props:a({mergeNames:(t,i,r)=>t.if(e._`${r} !== true && ${i} !== undefined`,(()=>{t.if(e._`${i} === true`,(()=>t.assign(r,!0)),(()=>t.assign(r,e._`${r} || {}`).code(e._`Object.assign(${r}, ${i})`)))})),mergeToName:(t,i,r)=>t.if(e._`${r} !== true`,(()=>{!0===i?t.assign(r,!0):(t.assign(r,e._`${r} || {}`),u(t,r,i))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:h}),items:a({mergeNames:(t,i,r)=>t.if(e._`${r} !== true && ${i} !== undefined`,(()=>t.assign(r,e._`${i} === true ? true : ${r} > ${i} ? ${r} : ${i}`))),mergeToName:(t,i,r)=>t.if(e._`${r} !== true`,(()=>t.assign(r,!0===i||e._`${r} > ${i} ? ${r} : ${i}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},t.evaluatedPropsToName=h,t.setEvaluated=u;var c,f={};function l(t,e,i=t.opts.strictSchema){if(i){if(e=`strict mode: ${e}`,!0===i)throw new Error(e);t.self.logger.warn(e)}}t.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:f[e.code]||(f[e.code]=new i._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(t.Type=c={})),t.getErrorPath=function(t,i,r){if(t instanceof e.Name){const n=i===c.Num;return r?n?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:n?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,e.getProperty)(t).toString():"/"+s(t)},t.checkStrictMode=l})),Ve=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=i})),Ge=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Fe(),i=Be(),r=Ve();function n(t,i){const n=t.const("err",i);t.if(e._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,e._`[${n}]`)),e._`${r.default.vErrors}.push(${n})`),t.code(e._`${r.default.errors}++`)}function s(t,i){const{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw(e._`new ${t.ValidationError}(${i})`):(r.assign(e._`${n}.errors`,i),r.return(!1))}t.keywordError={message:({keyword:t})=>e.str`must pass "${t}" keyword validation`},t.keyword$DataError={message:({keyword:t,schemaType:i})=>i?e.str`"${t}" keyword must be ${i} ($data)`:e.str`"${t}" keyword is invalid ($data)`},t.reportError=function(i,r=t.keywordError,o,h){const{it:u}=i,{gen:c,compositeRule:f,allErrors:l}=u,d=a(i,r,o);(null!=h?h:f||l)?n(c,d):s(u,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:h}=e,{gen:u,compositeRule:c,allErrors:f}=h;n(u,a(e,i,o)),c||f||s(h,r.default.vErrors)},t.resetErrorsCount=function(t,i){t.assign(r.default.errors,i),t.if(e._`${r.default.vErrors} !== null`,(()=>t.if(i,(()=>t.assign(e._`${r.default.vErrors}.length`,i)),(()=>t.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:t,keyword:i,schemaValue:n,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const h=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(h,e._`${r.default.vErrors}[${o}]`),t.if(e._`${h}.instancePath === undefined`,(()=>t.assign(e._`${h}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${h}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${h}.schema`,n),t.assign(e._`${h}.data`,s))}))};var o={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function a(t,i,n){const{createErrors:s}=t.it;return!1===s?e._`{}`:function(t,i,n={}){const{gen:s,it:a}=t,c=[h(a,n),u(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:h,schemaValue:u,it:c}=t,{opts:f,propertyName:l,topSchemaRef:d,schemaPath:p}=c;s.push([o.keyword,a],[o.params,"function"==typeof i?i(t):i||e._`{}`]),f.messages&&s.push([o.message,"function"==typeof n?n(t):n]),f.verbose&&s.push([o.schema,u],[o.parentSchema,e._`${d}${p}`],[r.default.data,h]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function h({errorPath:t},{instancePath:n}){const s=n?e.str`${t}${(0,i.getErrorPath)(n,i.Type.Str)}`:t;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,s)]}function u({keyword:t,it:{errSchemaPath:r}},{schemaPath:n,parentSchema:s}){let a=s?r:e.str`${r}/${t}`;return n&&(a=e.str`${a}${(0,i.getErrorPath)(n,i.Type.Str)}`),[o.schemaPath,a]}})),He=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Ge(),i=Fe(),r=Ve(),n={message:"boolean schema is false"};function s(t,i){const{gen:r,data:s}=t;(0,e.reportError)({gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t},n,void 0,i)}t.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:o}=t;!1===n?s(t,!1):"object"==typeof n&&!0===n.$async?e.return(r.default.data):(e.assign(i._`${o}.errors`,null),e.return(!0))},t.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),s(t)):i.var(e,!0)}})),Ke=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(t){return"string"==typeof t&&e.has(t)},t.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}})),Je=Le((function(t){function e(t,e){return e.rules.some((e=>i(t,e)))}function i(t,e){var i;return void 0!==t[e.keyword]||(null===(i=e.definition.implements)||void 0===i?void 0:i.some((e=>void 0!==t[e])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:t,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&e(t,n)},t.shouldUseGroup=e,t.shouldUseRule=i})),We=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e,i=Ke(),r=Je(),n=Ge(),s=Fe(),o=Be();function a(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(i.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(e||(t.DataType=e={})),t.getSchemaTypes=function(t){const e=a(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},t.getJSONTypes=a,t.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:a}=t,u=function(t,e){return e?t.filter((t=>h.has(t)||"array"===e&&"array"===t)):[]}(i,a.coerceTypes),f=i.length>0&&!(0===u.length&&1===i.length&&(0,r.schemaHasRulesForType)(t,i[0]));if(f){const r=c(i,o,a.strictNumbers,e.Wrong);n.if(r,(()=>{u.length?function(t,e,i){const{gen:r,data:n,opts:o}=t,a=r.let("dataType",s._`typeof ${n}`),u=r.let("coerced",s._`undefined`);"array"===o.coerceTypes&&r.if(s._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>r.assign(n,s._`${n}[0]`).assign(a,s._`typeof ${n}`).if(c(e,n,o.strictNumbers),(()=>r.assign(u,n))))),r.if(s._`${u} !== undefined`);for(const t of i)(h.has(t)||"array"===t&&"array"===o.coerceTypes)&&f(t);function f(t){switch(t){case"string":return void r.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(u,s._`"" + ${n}`).elseIf(s._`${n} === null`).assign(u,s._`""`);case"number":return void r.elseIf(s._`${a} == "boolean" || ${n} === null
|
|
12
|
-
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(
|
|
13
|
-
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(
|
|
14
|
-
|| ${a} === "boolean" || ${n} === null`).assign(u,s._`[${n}]`)}}r.else(),l(t),r.endIf(),r.if(s._`${u} !== undefined`,(()=>{r.assign(n,u),function({gen:t,parentData:e,parentDataProperty:i},r){t.if(s._`${e} !== undefined`,(()=>t.assign(s._`${e}[${i}]`,r)))}(t,u)}))}(t,i,u):l(t)}))}return f};var h=new Set(["string","number","integer","boolean","null"]);function u(t,i,r,n=e.Correct){const o=n===e.Correct?s.operators.EQ:s.operators.NEQ;let a;switch(t){case"null":return s._`${i} ${o} null`;case"array":a=s._`Array.isArray(${i})`;break;case"object":a=s._`${i} && typeof ${i} == "object" && !Array.isArray(${i})`;break;case"integer":a=h(s._`!(${i} % 1) && !isNaN(${i})`);break;case"number":a=h();break;default:return s._`typeof ${i} ${o} ${t}`}return n===e.Correct?a:(0,s.not)(a);function h(t=s.nil){return(0,s.and)(s._`typeof ${i} == "number"`,t,r?s._`isFinite(${i})`:s.nil)}}function c(t,e,i,r){if(1===t.length)return u(t[0],e,i,r);let n;const a=(0,o.toHash)(t);if(a.array&&a.object){const t=s._`typeof ${e} != "object"`;n=a.null?t:s._`!${e} || ${t}`,delete a.null,delete a.array,delete a.object}else n=s.nil;a.number&&delete a.integer;for(const t in a)n=(0,s.and)(n,u(t,e,i,r));return n}t.checkDataType=u,t.checkDataTypes=c;var f={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?s._`{type: ${t}}`:s._`{type: ${e}}`};function l(t){const e=function(t){const{gen:e,data:i,schema:r}=t,n=(0,o.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:i,schema:r.type,schemaCode:n,schemaValue:n,parentSchema:r,params:{},it:t}}(t);(0,n.reportError)(e,f)}t.reportTypeError=l})),Ze=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Fe(),i=Be();function r(t,r,n){const{gen:s,compositeRule:o,data:a,opts:h}=t;if(void 0===n)return;const u=e._`${a}${(0,e.getProperty)(r)}`;if(o)return void(0,i.checkStrictMode)(t,`default is ignored for: ${u}`);let c=e._`${u} === undefined`;"empty"===h.useDefaults&&(c=e._`${c} || ${u} === null || ${u} === ""`),s.if(c,e._`${u} = ${(0,e.stringify)(n)}`)}t.assignDefaults=function(t,e){const{properties:i,items:n}=t.schema;if("object"===e&&i)for(const e in i)r(t,e,i[e].default);else"array"===e&&Array.isArray(n)&&n.forEach(((e,i)=>r(t,i,e.default)))}})),Xe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Fe(),i=Be(),r=Ve(),n=Be();function s(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function o(t,i,r){return e._`${s(t)}.call(${i}, ${r})`}function a(t,i,r,n){const s=e._`${i}${(0,e.getProperty)(r)} === undefined`;return n?(0,e.or)(s,(0,e.not)(o(t,i,r))):s}function h(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}t.checkReportMissingProp=function(t,i){const{gen:r,data:n,it:s}=t;r.if(a(r,n,i,s.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${i}`},!0),t.error()}))},t.checkMissingProp=function({gen:t,data:i,it:{opts:r}},n,s){return(0,e.or)(...n.map((n=>(0,e.and)(a(t,i,n,r.ownProperties),e._`${s} = ${n}`))))},t.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},t.hasPropFunc=s,t.isOwnProperty=o,t.propertyInData=function(t,i,r,n){const s=e._`${i}${(0,e.getProperty)(r)} !== undefined`;return n?e._`${s} && ${o(t,i,r)}`:s},t.noPropertyInData=a,t.allSchemaProperties=h,t.schemaProperties=function(t,e){return h(e).filter((r=>!(0,i.alwaysValidSchema)(t,e[r])))},t.callValidateCode=function({schemaCode:t,data:i,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:h},u,c,f){const l=f?e._`${t}, ${i}, ${s}${o}`:i,d=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,a)],[r.default.parentData,h.parentData],[r.default.parentDataProperty,h.parentDataProperty],[r.default.rootData,r.default.rootData]];h.opts.dynamicRef&&d.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const p=e._`${l}, ${n.object(...d)}`;return c!==e.nil?e._`${u}.call(${c}, ${p})`:e._`${u}(${p})`};var u=e._`new RegExp`;t.usePattern=function({gen:t,it:{opts:i}},r){const s=i.unicodeRegExp?"u":"",{regExp:o}=i.code,a=o(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`${"new RegExp"===o.code?u:(0,n.useFunc)(t,o)}(${r}, ${s})`})},t.validateArray=function(t){const{gen:r,data:n,keyword:s,it:o}=t,a=r.name("valid");if(o.allErrors){const t=r.let("valid",!0);return h((()=>r.assign(t,!1))),t}return r.var(a,!0),h((()=>r.break())),a;function h(o){const h=r.const("len",e._`${n}.length`);r.forRange("i",0,h,(n=>{t.subschema({keyword:s,dataProp:n,dataPropType:i.Type.Num},a),r.if((0,e.not)(a),o)}))}},t.validateUnion=function(t){const{gen:r,schema:n,keyword:s,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((t=>(0,i.alwaysValidSchema)(o,t)))&&!o.opts.unevaluated)return;const a=r.let("valid",!1),h=r.name("_valid");r.block((()=>n.forEach(((i,n)=>{const o=t.subschema({keyword:s,schemaProp:n,compositeRule:!0},h);r.assign(a,e._`${a} || ${h}`),t.mergeValidEvaluated(o,h)||r.if((0,e.not)(a))})))),t.result(a,(()=>t.reset()),(()=>t.error(!0)))}})),Ye=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Fe(),i=Ve(),r=Xe(),n=Ge();function s(t){const{gen:i,data:r,it:n}=t;i.if(n.parentData,(()=>i.assign(r,e._`${n.parentData}[${n.parentDataProperty}]`)))}function o(t,i,r){if(void 0===r)throw new Error(`keyword "${i}" failed to compile`);return t.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,e.stringify)(r)})}t.macroKeywordCode=function(t,i){const{gen:r,keyword:n,schema:s,parentSchema:a,it:h}=t,u=i.macro.call(h.self,s,a,h),c=o(r,n,u);!1!==h.opts.validateSchema&&h.self.validateSchema(u,!0);const f=r.name("valid");t.subschema({schema:u,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),t.pass(f,(()=>t.error(!0)))},t.funcKeywordCode=function(t,a){var h;const{gen:u,keyword:c,schema:f,parentSchema:l,$data:d,it:p}=t;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(p,a);const m=!d&&a.compile?a.compile.call(p.self,f,l,p):a.validate,v=o(u,c,m),y=u.let("valid");function g(n=(a.async?e._`await `:e.nil)){u.assign(y,e._`${n}${(0,r.callValidateCode)(t,v,p.opts.passContext?i.default.this:i.default.self,!("compile"in a&&!d||!1===a.schema))}`,a.modifying)}function b(t){var i;u.if((0,e.not)(null!==(i=a.valid)&&void 0!==i?i:y),t)}t.block$data(y,(function(){if(!1===a.errors)g(),a.modifying&&s(t),b((()=>t.error()));else{const r=a.async?function(){const t=u.let("ruleErrs",null);return u.try((()=>g(e._`await `)),(i=>u.assign(y,!1).if(e._`${i} instanceof ${p.ValidationError}`,(()=>u.assign(t,e._`${i}.errors`)),(()=>u.throw(i))))),t}():function(){const t=e._`${v}.errors`;return u.assign(t,null),g(e.nil),t}();a.modifying&&s(t),b((()=>function(t,r){const{gen:s}=t;s.if(e._`Array.isArray(${r})`,(()=>{s.assign(i.default.vErrors,e._`${i.default.vErrors} === null ? ${r} : ${i.default.vErrors}.concat(${r})`).assign(i.default.errors,e._`${i.default.vErrors}.length`),(0,n.extendErrors)(t)}),(()=>t.error()))}(t,r)))}})),t.ok(null!==(h=a.valid)&&void 0!==h?h:y)},t.validSchemaType=function(t,e,i=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||i&&void 0===t))},t.validateKeywordUsage=function({schema:t,opts:e,self:i,errSchemaPath:r},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[s])){const t=`keyword "${s}" value is invalid at path "${r}": `+i.errorsText(n.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);i.logger.error(t)}}})),Qe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Fe(),i=Be();t.getSubschema=function(t,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:h}){if(void 0!==r&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==r){const s=t.schema[r];return void 0===n?{schema:s,schemaPath:e._`${t.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:s[n],schemaPath:e._`${t.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${(0,i.escapeFragment)(n)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===h)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:h,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(t,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:h}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:h}=r;c(u.let("data",e._`${r.data}${(0,e.getProperty)(n)}`,!0)),t.errorPath=e.str`${o}${(0,i.getErrorPath)(n,s,h.jsPropertySyntax)}`,t.parentDataProperty=e._`${n}`,t.dataPathArr=[...a,t.parentDataProperty]}function c(e){t.data=e,t.dataLevel=r.dataLevel+1,t.dataTypes=[],r.definedProperties=new Set,t.parentData=r.data,t.dataNames=[...r.dataNames,e]}void 0!==o&&(c(o instanceof e.Name?o:u.let("data",o,!0)),void 0!==h&&(t.propertyName=h)),a&&(t.dataTypes=a)},t.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:i,compositeRule:r,createErrors:n,allErrors:s}){void 0!==r&&(t.compositeRule=r),void 0!==n&&(t.createErrors=n),void 0!==s&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=i}})),ti=Le((function(t,e){e.exports=function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var r,n,s;if(Array.isArray(e)){if((r=e.length)!=i.length)return!1;for(n=r;0!=n--;)if(!t(e[n],i[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((r=(s=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var o=s[n];if(!t(e[o],i[o]))return!1}return!0}return e!=e&&i!=i}})),ei=Le((function(t,e){var i=e.exports=function(t,e,i){"function"==typeof e&&(i=e,e={}),r(e,"function"==typeof(i=e.cb||i)?i:i.pre||function(){},i.post||function(){},t,"",t)};function r(t,e,n,s,o,a,h,u,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in e(s,o,a,h,u,c,f),s){var d=s[l];if(Array.isArray(d)){if(l in i.arrayKeywords)for(var p=0;p<d.length;p++)r(t,e,n,d[p],o+"/"+l+"/"+p,a,o,l,s,p)}else if(l in i.propsKeywords){if(d&&"object"==typeof d)for(var m in d)r(t,e,n,d[m],o+"/"+l+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,l,s,m)}else(l in i.keywords||t.allKeys&&!(l in i.skipKeywords))&&r(t,e,n,d,o+"/"+l,a,o,l,s)}n(s,o,a,h,u,c,f)}}i.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},i.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},i.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},i.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),ii=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Be(),i=ti(),r=ei(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!o(t):!!e&&a(t)<=e)};var s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(t){for(const e in t){if(s.has(e))return!0;const i=t[e];if(Array.isArray(i)&&i.some(o))return!0;if("object"==typeof i&&o(i))return!0}return!1}function a(t){let i=0;for(const r in t){if("$ref"===r)return 1/0;if(i++,!n.has(r)&&("object"==typeof t[r]&&(0,e.eachItem)(t[r],(t=>i+=a(t))),i===1/0))return 1/0}return i}function h(t,e="",i){!1!==i&&(e=f(e));const r=t.parse(e);return u(t,r)}function u(t,e){return t.serialize(e).split("#")[0]+"#"}t.getFullPath=h,t._getFullPath=u;var c=/#\/?$/;function f(t){return t?t.replace(c,""):""}t.normalizeId=f,t.resolveUrl=function(t,e,i){return i=f(i),t.resolve(e,i)};var l=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=f(t[n]||e),a={"":o},u=h(s,o,!1),c={},d=new Set;return r(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=u+e;let o=a[r];function h(e){if(e=f(o?(0,this.opts.uriResolver.resolve)(o,e):e),d.has(e))throw m(e);d.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?p(t,i.schema,e):e!==f(s)&&("#"===e[0]?(p(t,c[e],e),c[e]=t):this.refs[e]=s),e}function v(t){if("string"==typeof t){if(!l.test(t))throw new Error(`invalid anchor "${t}"`);h.call(this,`#${t}`)}}"string"==typeof t[n]&&(o=h.call(this,t[n])),v.call(this,t.$anchor),v.call(this,t.$dynamicAnchor),a[e]=o})),c;function p(t,e,r){if(void 0!==e&&!i(t,e))throw m(r)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}}})),ri=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=He(),i=We(),r=Je(),n=We(),s=Ze(),o=Ye(),a=Qe(),h=Fe(),u=Ve(),c=ii(),f=Be(),l=Ge();function d({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,h._`${u.default.data}, ${u.default.valCxt}`,r.$async,(()=>{t.code(h._`"use strict"; ${p(i,n)}`),function(t,e){t.if(u.default.valCxt,(()=>{t.var(u.default.instancePath,h._`${u.default.valCxt}.${u.default.instancePath}`),t.var(u.default.parentData,h._`${u.default.valCxt}.${u.default.parentData}`),t.var(u.default.parentDataProperty,h._`${u.default.valCxt}.${u.default.parentDataProperty}`),t.var(u.default.rootData,h._`${u.default.valCxt}.${u.default.rootData}`),e.dynamicRef&&t.var(u.default.dynamicAnchors,h._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{t.var(u.default.instancePath,h._`""`),t.var(u.default.parentData,h._`undefined`),t.var(u.default.parentDataProperty,h._`undefined`),t.var(u.default.rootData,u.default.data),e.dynamicRef&&t.var(u.default.dynamicAnchors,h._`{}`)}))}(t,n),t.code(s)})):t.func(e,h._`${u.default.data}, ${function(t){return h._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${t.dynamicRef?h._`, ${u.default.dynamicAnchors}={}`:h.nil}}={}`}(n)}`,r.$async,(()=>t.code(p(i,n)).code(s)))}function p(t,e){const i="object"==typeof t&&t[e.schemaId];return i&&(e.code.source||e.code.process)?h._`/*# sourceURL=${i} */`:h.nil}function m({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const i in t)if(e.RULES.all[i])return!0;return!1}function v(t){return"boolean"!=typeof t.schema}function y(t){(0,f.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:i,opts:r,self:n}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(t)}function g(t,e){if(t.opts.jtd)return $(t,[],!1,e);const r=(0,i.getSchemaTypes)(t.schema);$(t,r,!(0,i.coerceAndCheckDataType)(t,r),e)}function b({gen:t,schemaEnv:e,schema:i,errSchemaPath:r,opts:n}){const s=i.$comment;if(!0===n.$comment)t.code(h._`${u.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const i=h.str`${r}/$comment`,n=t.scopeValue("root",{ref:e.root});t.code(h._`${u.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function $(t,e,i,s){const{gen:o,schema:a,data:c,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(f){(0,r.shouldUseGroup)(a,f)&&(f.type?(o.if((0,n.checkDataType)(f.type,c,d.strictNumbers)),w(t,f),1===e.length&&e[0]===f.type&&i&&(o.else(),(0,n.reportTypeError)(t)),o.endIf()):w(t,f),l||o.if(h._`${u.default.errors} === ${s||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{_(t.dataTypes,e)||E(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)_(e,r)?i.push(r):e.includes("integer")&&"number"===r&&i.push("integer");t.dataTypes=i}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&E(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const i=t.self.RULES.all;for(const n in i){const s=i[n];if("object"==typeof s&&(0,r.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some((t=>{return(i=e).includes(r=t)||"number"===r&&i.includes("integer");var i,r}))&&E(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(t,t.dataTypes))}(t,e),o.block((()=>{for(const t of m.rules)v(t);v(m.post)}))):o.block((()=>S(t,"$ref",m.all.$ref.definition)))}function w(t,e){const{gen:i,schema:n,opts:{useDefaults:o}}=t;o&&(0,s.assignDefaults)(t,e.type),i.block((()=>{for(const i of e.rules)(0,r.shouldUseRule)(n,i)&&S(t,i.keyword,i.definition,e.type)}))}function _(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function E(t,e){(0,f.checkStrictMode)(t,e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,t.opts.strictTypes)}t.validateFunctionCode=function(t){v(t)&&(y(t),m(t))?function(t){const{schema:e,opts:i,gen:r}=t;d(t,(()=>{i.$comment&&e.$comment&&b(t),function(t){const{schema:e,opts:i}=t;void 0!==e.default&&i.useDefaults&&i.strictSchema&&(0,f.checkStrictMode)(t,"default is ignored in the schema root")}(t),r.let(u.default.vErrors,null),r.let(u.default.errors,0),i.unevaluated&&function(t){const{gen:e,validateName:i}=t;t.evaluated=e.const("evaluated",h._`${i}.evaluated`),e.if(h._`${t.evaluated}.dynamicProps`,(()=>e.assign(h._`${t.evaluated}.props`,h._`undefined`))),e.if(h._`${t.evaluated}.dynamicItems`,(()=>e.assign(h._`${t.evaluated}.items`,h._`undefined`)))}(t),g(t),function(t){const{gen:e,schemaEnv:i,validateName:r,ValidationError:n,opts:s}=t;i.$async?e.if(h._`${u.default.errors} === 0`,(()=>e.return(u.default.data)),(()=>e.throw(h._`new ${n}(${u.default.vErrors})`))):(e.assign(h._`${r}.errors`,u.default.vErrors),s.unevaluated&&function({gen:t,evaluated:e,props:i,items:r}){i instanceof h.Name&&t.assign(h._`${e}.props`,i),r instanceof h.Name&&t.assign(h._`${e}.items`,r)}(t),e.return(h._`${u.default.errors} === 0`))}(t)}))}(t):d(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class k{constructor(t,e,i){if((0,o.validateKeywordUsage)(t,e,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",O(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",u.default.errors))}result(t,e,i){this.failResult((0,h.not)(t),e,i)}failResult(t,e,i){this.gen.if(t),i?i():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,h.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(h._`${e} !== undefined && (${(0,h.or)(this.invalid$data(),t)})`)}error(t,e,i){if(e)return this.setParams(e),this._error(t,i),void this.setParams({});this._error(t,i)}_error(t,e){(t?l.reportExtraError:l.reportError)(this,this.def.error,e)}$dataError(){(0,l.reportError)(this,this.def.$dataError||l.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,l.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,i=h.nil){this.gen.block((()=>{this.check$data(t,i),e()}))}check$data(t=h.nil,e=h.nil){if(!this.$data)return;const{gen:i,schemaCode:r,schemaType:n,def:s}=this;i.if((0,h.or)(h._`${r} === undefined`,e)),t!==h.nil&&i.assign(t,!0),(n.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==h.nil&&i.assign(t,!1)),i.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:i,def:r,it:s}=this;return(0,h.or)(function(){if(i.length){if(!(e instanceof h.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return h._`${(0,n.checkDataTypes)(t,e,s.opts.strictNumbers,n.DataType.Wrong)}`}return h.nil}(),function(){if(r.validateSchema){const i=t.scopeValue("validate$data",{ref:r.validateSchema});return h._`!${i}(${e})`}return h.nil}())}subschema(t,i){const r=(0,a.getSubschema)(this.it,t);(0,a.extendSubschemaData)(r,this.it,t),(0,a.extendSubschemaMode)(r,t);const n={...this.it,...r,items:void 0,props:void 0};return function(t,i){v(t)&&(y(t),m(t))?function(t,e){const{schema:i,gen:r,opts:n}=t;n.$comment&&i.$comment&&b(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,c.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const s=r.const("_errs",u.default.errors);g(t,s),r.var(e,h._`${s} === ${u.default.errors}`)}(t,i):(0,e.boolOrEmptySchema)(t,i)}(n,i),n}mergeEvaluated(t,e){const{it:i,gen:r}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==t.props&&(i.props=f.mergeEvaluated.props(r,t.props,i.props,e)),!0!==i.items&&void 0!==t.items&&(i.items=f.mergeEvaluated.items(r,t.items,i.items,e)))}mergeValidEvaluated(t,e){const{it:i,gen:r}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return r.if(e,(()=>this.mergeEvaluated(t,h.Name))),!0}}function S(t,e,i,r){const n=new k(t,i,e);"code"in i?i.code(n,r):n.$data&&i.validate?(0,o.funcKeywordCode)(n,i):"macro"in i?(0,o.macroKeywordCode)(n,i):(i.compile||i.validate)&&(0,o.funcKeywordCode)(n,i)}t.KeywordCxt=k;var x=/^\/(?:[^~]|~0|~1)*$/,j=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return u.default.rootData;if("/"===t[0]){if(!x.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=u.default.rootData}else{const o=j.exec(t);if(!o)throw new Error(`Invalid JSON-pointer: ${t}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=e)throw new Error(c("property/index",a));return r[e-a]}if(a>e)throw new Error(c("data",a));if(s=i[e-a],!n)return s}let o=s;const a=n.split("/");for(const t of a)t&&(s=h._`${s}${(0,h.getProperty)((0,f.unescapeJsonPointer)(t))}`,o=h._`${o} && ${s}`);return o;function c(t,i){return`Cannot access ${t} ${i} levels up, current level is ${e}`}}t.getData=O})),ni=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}t.default=e})),si=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ii();class i extends Error{constructor(t,i,r,n){super(n||`can't resolve reference ${r} from id ${i}`),this.missingRef=(0,e.resolveUrl)(t,i,r),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}t.default=i})),oi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Fe(),i=ni(),r=Ve(),n=ii(),s=Be(),o=ri();class a{constructor(t){var e;let i;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,n.normalizeId)(null==i?void 0:i[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function h(t){const s=c.call(this,t);if(s)return s;const a=(0,n.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:h,lines:u}=this.opts.code,{ownProperties:f}=this.opts,l=new e.CodeGen(this.scope,{es5:h,lines:u,ownProperties:f});let d;t.$async&&(d=l.scopeValue("Error",{ref:i.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");t.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,e.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:d,schema:t.schema,schemaEnv:t,rootId:a,baseId:t.baseId||a,schemaPath:e.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(t),(0,o.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const i=l.toString();v=`${l.scopeRefs(r.default.scope)}return ${i}`,this.opts.code.process&&(v=this.opts.code.process(v,t));const n=new Function(`${r.default.self}`,`${r.default.scope}`,v)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:i,scopeValues:l._values}),this.opts.unevaluated){const{props:t,items:i}=m;n.evaluated={props:t instanceof e.Name?void 0:t,items:i instanceof e.Name?void 0:i,dynamicProps:t instanceof e.Name,dynamicItems:i instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return t.validate=n,t}catch(e){throw delete t.validate,delete t.validateName,v&&this.logger.error("Error compiling schema, function code:",v),e}finally{this._compilations.delete(t)}}function u(t){return(0,n.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:h.call(this,t)}function c(t){for(const r of this._compilations)if((e=r).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return r;var e,i}function f(t,e){let i;for(;"string"==typeof(i=this.refs[e]);)e=i;return i||this.schemas[e]||l.call(this,t,e)}function l(t,e){const i=this.opts.uriResolver.parse(e),r=(0,n._getFullPath)(this.opts.uriResolver,i);let s=(0,n.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===s)return p.call(this,i,t);const o=(0,n.normalizeId)(r),u=this.refs[o]||this.schemas[o];if("string"==typeof u){const e=l.call(this,t,u);if("object"!=typeof(null==e?void 0:e.schema))return;return p.call(this,i,e)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||h.call(this,u),o===(0,n.normalizeId)(e)){const{schema:e}=u,{schemaId:i}=this.opts,r=e[i];return r&&(s=(0,n.resolveUrl)(this.opts.uriResolver,s,r)),new a({schema:e,schemaId:i,root:t,baseId:s})}return p.call(this,i,u)}}t.SchemaEnv=a,t.compileSchema=h,t.resolveRef=function(t,e,i){var r;i=(0,n.resolveUrl)(this.opts.uriResolver,e,i);const s=t.refs[i];if(s)return s;let o=f.call(this,t,i);if(void 0===o){const n=null===(r=t.localRefs)||void 0===r?void 0:r[i],{schemaId:s}=this.opts;n&&(o=new a({schema:n,schemaId:s,root:t,baseId:e}))}return void 0!==o?t.refs[i]=u.call(this,o):void 0},t.getCompilingSchema=c,t.resolveSchema=l;var d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function p(t,{baseId:e,schema:i,root:r}){var o;if("/"!==(null===(o=t.fragment)||void 0===o?void 0:o[0]))return;for(const r of t.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const t=i[(0,s.unescapeFragment)(r)];if(void 0===t)return;const o="object"==typeof(i=t)&&i[this.opts.schemaId];!d.has(r)&&o&&(e=(0,n.resolveUrl)(this.opts.uriResolver,e,o))}let h;if("boolean"!=typeof i&&i.$ref&&!(0,s.schemaHasRulesButRef)(i,this.RULES)){const t=(0,n.resolveUrl)(this.opts.uriResolver,e,i.$ref);h=l.call(this,r,t)}const{schemaId:u}=this.opts;return h=h||new a({schema:i,schemaId:u,root:r,baseId:e}),h.schema!==h.root.schema?h:void 0}})),ai=Le((function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}})),hi=Le((function(t,e){var i=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(t){let e="",i=0,r=0;for(r=0;r<t.length;r++)if(i=t[r].charCodeAt(0),48!==i){if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(i=t[r].charCodeAt(0),!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r]}return e}var h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u(t){return t.length=0,!0}function c(t,e,i){if(t.length){const r=a(t);if(""===r)return i.error=!0,!1;e.push(r),t.length=0}return!0}function f(t){if(function(t){let e=0;for(let i=0;i<t.length;i++)":"===t[i]&&e++;return e}(t)<2)return{host:t,isIPV6:!1};const e=function(t){let e=0;const i={error:!1,address:"",zone:""},r=[],n=[];let s=!1,o=!1,h=c;for(let a=0;a<t.length;a++){const c=t[a];if("["!==c&&"]"!==c)if(":"!==c)if("%"===c){if(!h(n,r,i))break;h=u}else n.push(c);else{if(!0===s&&(o=!0),!h(n,r,i))break;if(++e>7){i.error=!0;break}a>0&&":"===t[a-1]&&(s=!0),r.push(":")}}return n.length&&(h===u?i.zone=n.join(""):r.push(o?n.join(""):a(n))),i.address=r.join(""),i}(t);if(e.error)return{host:t,isIPV6:!1};{let t=e.address,i=e.address;return e.zone&&(t+="%"+e.zone,i+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:i}}}var l={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},d=/[@/?#:]/g,p=/[@/?#]/g;function m(t,e){const i=e?p:d;return i.lastIndex=0,t.replace(i,(t=>l[t]))}e.exports={nonSimpleDomain:h,recomposeAuthority:function(t){const e=[];if(void 0!==t.userinfo&&(e.push(t.userinfo),e.push("@")),void 0!==t.host){let i=unescape(t.host);if(!r(i)){const t=f(i);i=!0===t.isIPV6?`[${t.escapedHost}]`:m(i,!1)}e.push(i)}return"number"!=typeof t.port&&"string"!=typeof t.port||(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0},reescapeHostDelimiters:m,normalizePercentEncoding:function(t,e=!1){if(-1===t.indexOf("%"))return t;let i="";for(let r=0;r<t.length;r++){if("%"===t[r]&&r+2<t.length){const o=t.slice(r+1,r+3);if(n(o)){const t=o.toUpperCase(),n=String.fromCharCode(parseInt(t,16));e&&s(n)?i+=n:i+="%"+t,r+=2;continue}}i+=t[r]}return i},normalizePathEncoding:function(t){let e="";for(let i=0;i<t.length;i++){if("%"===t[i]&&i+2<t.length){const r=t.slice(i+1,i+3);if(n(r)){const t=r.toUpperCase(),n=String.fromCharCode(parseInt(t,16));"."!==n&&s(n)?e+=n:e+="%"+t,i+=2;continue}}o(t[i])?e+=t[i]:e+=escape(t[i])}return e},escapePreservingEscapes:function(t){let e="";for(let i=0;i<t.length;i++){if("%"===t[i]&&i+2<t.length){const r=t.slice(i+1,i+3);if(n(r)){e+="%"+r.toUpperCase(),i+=2;continue}}e+=escape(t[i])}return e},removeDotSegments:function(t){let e=t;const i=[];let r=-1,n=0;for(;n=e.length;){if(1===n){if("."===e)break;if("/"===e){i.push("/");break}i.push(e);break}if(2===n){if("."===e[0]){if("."===e[1])break;if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&("."===e[1]||"/"===e[1])){i.push("/");break}}else if(3===n&&"/.."===e){0!==i.length&&i.pop(),i.push("/");break}if("."===e[0]){if("."===e[1]){if("/"===e[2]){e=e.slice(3);continue}}else if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&"."===e[1]){if("/"===e[2]){e=e.slice(2);continue}if("."===e[2]&&"/"===e[3]){e=e.slice(3),0!==i.length&&i.pop();continue}}if(-1===(r=e.indexOf("/",1))){i.push(e);break}i.push(e.slice(0,r)),e=e.slice(r)}return i.join("")},isIPv4:r,isUUID:i,normalizeIPv6:f,stringArrayToHexStripped:a}})),ui=Le((function(t,e){var{isUUID:i}=hi(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function s(t){return!0===t.secure||!1!==t.secure&&!!t.scheme&&!(3!==t.scheme.length||"w"!==t.scheme[0]&&"W"!==t.scheme[0]||"s"!==t.scheme[1]&&"S"!==t.scheme[1]||"s"!==t.scheme[2]&&"S"!==t.scheme[2])}function o(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function a(t){const e="https"===String(t.scheme).toLowerCase();return t.port!==(e?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}var h={scheme:"http",domainHost:!0,parse:o,serialize:a},u={scheme:"ws",domainHost:!0,parse:function(t){return t.secure=s(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(t){if(t.port!==(s(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,i]=t.resourceName.split("?");t.path=e&&"/"!==e?e:void 0,t.query=i,t.resourceName=void 0}return t.fragment=void 0,t}},c={http:h,https:{scheme:"https",domainHost:h.domainHost,parse:o,serialize:a},ws:u,wss:{scheme:"wss",domainHost:u.domainHost,parse:u.parse,serialize:u.serialize},urn:{scheme:"urn",parse:function(t,e){if(!t.path)return t.error="URN can not be parsed",t;const i=t.path.match(r);if(i){const r=e.scheme||t.scheme||"urn";t.nid=i[1].toLowerCase(),t.nss=i[2];const n=f(`${r}:${e.nid||t.nid}`);t.path=void 0,n&&(t=n.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(t,e){if(void 0===t.nid)throw new Error("URN without nid cannot be serialized");const i=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),n=f(`${i}:${e.nid||r}`);n&&(t=n.serialize(t,e));const s=t;return s.path=`${r||e.nid}:${t.nss}`,e.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,e){const r=t;return r.uuid=r.nss,r.nss=void 0,e.tolerant||r.uuid&&i(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e},skipNormalize:!0}};function f(t){return t&&(c[t]||c[t.toLowerCase()])||void 0}Object.setPrototypeOf(c,null),e.exports={wsIsSecure:s,SCHEMES:c,isValidSchemeName:function(t){return-1!==n.indexOf(t)},getSchemeHandler:f}})),ci=Le((function(t,e){var{normalizeIPv6:i,removeDotSegments:r,recomposeAuthority:n,normalizePercentEncoding:s,normalizePathEncoding:o,escapePreservingEscapes:a,reescapeHostDelimiters:h,isIPv4:u,nonSimpleDomain:c}=hi(),{SCHEMES:f,getSchemeHandler:l}=ui();function d(t,e,i,n){const s={};return n||(t=b(p(t,i),i),e=b(p(e,i),i)),!(i=i||{}).tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=r(e.path||""),s.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=r(e.path||""),s.query=e.query):(e.path?("/"===e.path[0]?s.path=r(e.path):(s.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:e.path:"/"+e.path,s.path=r(s.path)),s.query=e.query):(s.path=t.path,s.query=void 0!==e.query?e.query:t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function p(t,e){const i={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},o=Object.assign({},e),h=[],u=l(o.scheme||i.scheme);u&&u.serialize&&u.serialize(i,o),void 0!==i.path&&(o.skipEscape?i.path=s(i.path):(i.path=a(i.path),void 0!==i.scheme&&(i.path=i.path.split("%3A").join(":")))),"suffix"!==o.reference&&i.scheme&&h.push(i.scheme,":");const c=n(i);if(void 0!==c&&("suffix"!==o.reference&&h.push("//"),h.push(c),i.path&&"/"!==i.path[0]&&h.push("/")),void 0!==i.path){let t=i.path;o.absolutePath||u&&u.absolutePath||(t=r(t)),void 0===c&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),h.push(t)}return void 0!==i.query&&h.push("?",i.query),void 0!==i.fragment&&h.push("#",i.fragment),h.join("")}var m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,v=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,y=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function g(t,e){const r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1,a=!1;"suffix"===r.reference&&(t=r.scheme?r.scheme+":"+t:"//"+t);const f=t.match(v);null!==f&&-1!==f[1].indexOf("\\")&&(n.error="URI authority must not contain a literal backslash.",s=!0);const d=t.match(y);if(null!==d){const t=d[1],e=t.replace(/[\t\n\r]/g,"");e.length>=2&&("//"!==e.slice(0,2)?(n.error=n.error||"URI authority must not contain a literal backslash.",s=!0):t.length!==e.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",s=!0))}const p=t.match(m);if(p){n.scheme=p[1],n.userinfo=p[3],n.host=p[4],n.port=parseInt(p[5],10),n.path=p[6]||"",n.query=p[7],n.fragment=p[8],isNaN(n.port)&&(n.port=p[5]);const e=function(t,e){return void 0!==e[2]&&t.path&&"/"!==t.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof t.port&&(t.port<0||t.port>65535)?"URI port is malformed.":void 0}(n,p);if(void 0!==e&&(n.error=n.error||e,s=!0),n.host)if(!1===u(n.host)){const t=i(n.host);n.host=t.host.toLowerCase(),a=t.isIPV6}else a=!0;n.reference=void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||void 0!==n.query||n.path?void 0===n.scheme?"relative":void 0===n.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const f=l(r.scheme||n.scheme);if(!(r.unicodeSupport||f&&f.unicodeSupport)&&n.host&&(r.domainHost||f&&f.domainHost)&&!1===a&&c(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(t){n.error=n.error||"Host's domain name can not be converted to ASCII: "+t}if((!f||f&&!f.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),void 0!==n.host&&(n.host=h(unescape(n.host),a))),n.path&&(n.path=o(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}f&&f.parse&&f.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s}}function b(t,e){return g(t,e).parsed}function $(t,e){const{parsed:i,malformedAuthorityOrPort:r}=g(t,e);return{normalized:r?t:p(i,e),malformedAuthorityOrPort:r}}function w(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=$(t,e);return r?void 0:i}if("object"==typeof t)return p(t,e)}var _={SCHEMES:f,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return $(t,e).normalized}(t,e):"object"==typeof t&&(t=b(p(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:s}=g(t,r),{parsed:o,malformedAuthorityOrPort:a}=g(e,r);if(s||a)throw new Error(n.error||o.error||"URI is malformed.");const h=d(n,o,r,!0);return r.skipEscape=!0,p(h,r)},resolveComponent:d,equal:function(t,e,i){const r=w(t,i),n=w(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:p,parse:b};e.exports=_,e.exports.default=_,e.exports.fastUri=_})),fi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ci();e.code='require("ajv/dist/runtime/uri").default',t.default=e})),li=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ri();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=Fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});var r=ni(),n=si(),s=Ke(),o=oi(),a=Fe(),h=ii(),u=We(),c=Be(),f=ai(),l=fi(),d=(t,e)=>new RegExp(t,e);d.code="new RegExp";var p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function g(t){var e,i,r,n,s,o,a,h,u,c,f,p,m,v,y,g,b,$,w,_,E,k,S,x,j;const O=t.strict,P=null===(e=t.code)||void 0===e?void 0:e.optimize,I=!0===P||void 0===P?1:P||0,C=null!==(r=null===(i=t.code)||void 0===i?void 0:i.regExp)&&void 0!==r?r:d,A=null!==(n=t.uriResolver)&&void 0!==n?n:l.default;return{strictSchema:null===(o=null!==(s=t.strictSchema)&&void 0!==s?s:O)||void 0===o||o,strictNumbers:null===(h=null!==(a=t.strictNumbers)&&void 0!==a?a:O)||void 0===h||h,strictTypes:null!==(c=null!==(u=t.strictTypes)&&void 0!==u?u:O)&&void 0!==c?c:"log",strictTuples:null!==(p=null!==(f=t.strictTuples)&&void 0!==f?f:O)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=t.strictRequired)&&void 0!==m?m:O)&&void 0!==v&&v,code:t.code?{...t.code,optimize:I,regExp:C}:{optimize:I,regExp:C},loopRequired:null!==(y=t.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(g=t.loopEnum)&&void 0!==g?g:200,meta:null===(b=t.meta)||void 0===b||b,messages:null===($=t.messages)||void 0===$||$,inlineRefs:null===(w=t.inlineRefs)||void 0===w||w,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(E=t.addUsedSchema)||void 0===E||E,validateSchema:null===(k=t.validateSchema)||void 0===k||k,validateFormats:null===(S=t.validateFormats)||void 0===S||S,unicodeRegExp:null===(x=t.unicodeRegExp)||void 0===x||x,int32range:null===(j=t.int32range)||void 0===j||j,uriResolver:A}}class b{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...g(t)};const{es5:e,lines:i}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:e,lines:i}),this.logger=function(t){if(!1===t)return x;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,s.getRules)(),$.call(this,v,t,"NOT SUPPORTED"),$.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&k.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),_.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:i}=this.opts;let r=f;"id"===i&&(r={...f},r.id=r.$id,delete r.$id),e&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let i;if("string"==typeof t){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);const r=i(e);return"$async"in i||(this.errors=i.errors),r}compile(t,e){const i=this._addSchema(t,e);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return r.call(this,t,e);async function r(t,e){await s.call(this,t.$schema);const i=this._addSchema(t,e);return i.validate||o.call(this,i)}async function s(t){t&&!this.getSchema(t)&&await r.call(this,{$ref:t},!0)}async function o(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof n.default))throw e;return a.call(this,e),await h.call(this,e.missingSchema),o.call(this,t)}}function a({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function h(t){const i=await u.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function u(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,e,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,i,r);return this}let n;if("object"==typeof t){const{schemaId:e}=this.opts;if(n=t[e],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${e} must be string`)}return e=(0,h.normalizeId)(e||n),this._checkUnique(e),this.schemas[e]=this._addSchema(t,i,e,r,!0),this}addMetaSchema(t,e,i=this.opts.validateSchema){return this.addSchema(t,e,!0,i),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let i;if(i=t.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(i,t);if(!r&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return r}getSchema(t){let e;for(;"string"==typeof(e=w.call(this,t));)t=e;if(void 0===e){const{schemaId:i}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:i});if(e=o.resolveSchema.call(this,r,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=w.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{this._cache.delete(t);let e=t[this.opts.schemaId];return e&&(e=(0,h.normalizeId)(e),delete this.schemas[e],delete this.refs[e]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let i;if("string"==typeof t)i=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=i);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(i=(e=t).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(O.call(this,i,e),!e)return(0,c.eachItem)(i,(t=>P.call(this,t))),this;C.call(this,e);const r={...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)};return(0,c.eachItem)(i,0===r.type.length?t=>P.call(this,t,r):t=>r.type.forEach((e=>P.call(this,t,r,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const i of e.rules){const e=i.rules.findIndex((e=>e.keyword===t));e>=0&&i.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:i="data"}={}){return t&&0!==t.length?t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+e+i)):"No errors"}$dataMetaSchema(t,e){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const r of e){const e=r.split("/").slice(1);let n=t;for(const t of e)n=n[t];for(const t in i){const e=i[t];if("object"!=typeof e)continue;const{$data:r}=e.definition,s=n[t];r&&s&&(n[t]=N(s))}}return t}_removeAllSchemas(t,e){for(const i in t){const r=t[i];e&&!e.test(i)||("string"==typeof r?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,e,i,r=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof t)s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(void 0!==u)return u;i=(0,h.normalizeId)(s||i);const c=h.getSchemaRefs.call(this,t,i);return u=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(u.schema,u),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=u),r&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):o.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,t)}finally{this.opts=e}}}function $(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function w(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function _(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function E(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function k(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const i=t[e];i.keyword||(i.keyword=e),this.addKeyword(i)}}}function S(){const t={...this.opts};for(const e of p)delete t[e];return t}b.ValidationError=r.default,b.MissingRefError=n.default,t.default=b;var x={log(){},warn(){},error(){}},j=/^[a-z_$][a-z0-9_$:-]*$/i;function O(t,e){const{RULES:i}=this;if((0,c.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!j.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function P(t,e,i){var r;const n=null==e?void 0:e.post;if(i&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:t})=>t===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[t]=!0,!e)return;const a={keyword:t,definition:{...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)}};e.before?I.call(this,o,a,e.before):o.rules.push(a),s.all[t]=a,null===(r=e.implements)||void 0===r||r.forEach((t=>this.addKeyword(t)))}function I(t,e,i){const r=t.rules.findIndex((t=>t.keyword===i));r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${i} is not defined`))}function C(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=N(e)),t.validateSchema=this.compile(e,!0))}var A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(t){return{anyOf:[t,A]}}})),di=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}})),pi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=si(),i=Xe(),r=Fe(),n=Ve(),s=oi(),o=Be(),a={keyword:"$ref",schemaType:"string",code(t){const{gen:i,schema:n,it:o}=t,{baseId:a,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===n||"#/"===n)&&a===p.baseId)return function(){if(c===p)return u(t,f,c,c.$async);const e=i.scopeValue("root",{ref:p});return u(t,r._`${e}.validate`,p,p.$async)}();const m=s.resolveRef.call(d,p,a,n);if(void 0===m)throw new e.default(o.opts.uriResolver,a,n);return m instanceof s.SchemaEnv?function(e){const i=h(t,e);u(t,i,e,e.$async)}(m):function(e){const s=i.scopeValue("schema",!0===l.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),o=i.name("valid"),a=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:s,errSchemaPath:n},o);t.mergeEvaluated(a),t.ok(o)}(m)}};function h(t,e){const{gen:i}=t;return e.validate?i.scopeValue("validate",{ref:e.validate}):r._`${i.scopeValue("wrapper",{ref:e})}.validate`}function u(t,e,s,a){const{gen:h,it:u}=t,{allErrors:c,schemaEnv:f,opts:l}=u,d=l.passContext?n.default.this:r.nil;function p(t){const e=r._`${t}.errors`;h.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${e} : ${n.default.vErrors}.concat(${e})`),h.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function m(t){var e;if(!u.opts.unevaluated)return;const i=null===(e=null==s?void 0:s.validate)||void 0===e?void 0:e.evaluated;if(!0!==u.props)if(i&&!i.dynamicProps)void 0!==i.props&&(u.props=o.mergeEvaluated.props(h,i.props,u.props));else{const e=h.var("props",r._`${t}.evaluated.props`);u.props=o.mergeEvaluated.props(h,e,u.props,r.Name)}if(!0!==u.items)if(i&&!i.dynamicItems)void 0!==i.items&&(u.items=o.mergeEvaluated.items(h,i.items,u.items));else{const e=h.var("items",r._`${t}.evaluated.items`);u.items=o.mergeEvaluated.items(h,e,u.items,r.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const n=h.let("valid");h.try((()=>{h.code(r._`await ${(0,i.callValidateCode)(t,e,d)}`),m(e),c||h.assign(n,!0)}),(t=>{h.if(r._`!(${t} instanceof ${u.ValidationError})`,(()=>h.throw(t))),p(t),c||h.assign(n,!1)})),t.ok(n)}():t.result((0,i.callValidateCode)(t,e,d),(()=>m(e)),(()=>p(e)))}t.getValidate=h,t.callRef=u,t.default=a})),mi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=di(),i=pi();t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,i.default]})),vi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=e.operators,r={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},n={message:({keyword:t,schemaCode:i})=>e.str`must be ${r[t].okStr} ${i}`,params:({keyword:t,schemaCode:i})=>e._`{comparison: ${r[t].okStr}, limit: ${i}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:i,data:n,schemaCode:s}=t;t.fail$data(e._`${n} ${r[i].fail} ${s} || isNaN(${n})`)}};t.default=s})),yi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:i,data:r,schemaCode:n,it:s}=t,o=s.opts.multipleOfPrecision,a=i.let("res"),h=o?e._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:e._`${a} !== parseInt(${a})`;t.fail$data(e._`(${n} === 0 || (${a} = ${r}/${n}, ${h}))`)}};t.default=i})),gi=Le((function(t){function e(t){const e=t.length;let i,r=0,n=0;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),56320==(64512&i)&&n++);return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'})),bi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=gi(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxLength"===t?"more":"fewer"} than ${i} characters`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:n,data:s,schemaCode:o,it:a}=t,h="maxLength"===n?e.operators.GT:e.operators.LT,u=!1===a.opts.unicode?e._`${s}.length`:e._`${(0,i.useFunc)(t.gen,r.default)}(${s})`;t.fail$data(e._`${u} ${h} ${o}`)}};t.default=n})),$i=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),i=Be(),r=Fe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>r.str`must match pattern "${t}"`,params:({schemaCode:t})=>r._`{pattern: ${t}}`},code(t){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=t,c=u.opts.unicodeRegExp?"u":"";if(o){const{regExp:e}=u.opts.code,o="new RegExp"===e.code?r._`new RegExp`:(0,i.useFunc)(n,e),a=n.let("valid");n.try((()=>n.assign(a,r._`${o}(${h}, ${c}).test(${s})`)),(()=>n.assign(a,!1))),t.fail$data(r._`!${a}`)}else{const i=(0,e.usePattern)(t,a);t.fail$data(r._`!${i}.test(${s})`)}}};t.default=n})),wi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxProperties"===t?"more":"fewer"} than ${i} properties`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:i,data:r,schemaCode:n}=t;t.fail$data(e._`Object.keys(${r}).length ${"maxProperties"===i?e.operators.GT:e.operators.LT} ${n}`)}};t.default=i})),_i=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),i=Fe(),r=Be(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>i.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>i._`{missingProperty: ${t}}`},code(t){const{gen:n,schema:s,schemaCode:o,data:a,$data:h,it:u}=t,{opts:c}=u;if(!h&&0===s.length)return;const f=s.length>=c.loopRequired;if(u.allErrors?function(){if(f||h)t.block$data(i.nil,l);else for(const i of s)(0,e.checkReportMissingProp)(t,i)}():function(){const r=n.let("missing");if(f||h){const s=n.let("valid",!0);t.block$data(s,(()=>function(r,s){t.setParams({missingProperty:r}),n.forOf(r,o,(()=>{n.assign(s,(0,e.propertyInData)(n,a,r,c.ownProperties)),n.if((0,i.not)(s),(()=>{t.error(),n.break()}))}),i.nil)}(r,s))),t.ok(s)}else n.if((0,e.checkMissingProp)(t,s,r)),(0,e.reportMissingProp)(t,r),n.else()}(),c.strictRequired){const e=t.parentSchema.properties,{definedProperties:i}=t.it;for(const t of s)void 0!==(null==e?void 0:e[t])||i.has(t)||(0,r.checkStrictMode)(u,`required property "${t}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`,u.opts.strictRequired)}function l(){n.forOf("prop",o,(i=>{t.setParams({missingProperty:i}),n.if((0,e.noPropertyInData)(n,a,i,c.ownProperties),(()=>t.error()))}))}}};t.default=n})),Ei=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxItems"===t?"more":"fewer"} than ${i} items`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:i,data:r,schemaCode:n}=t;t.fail$data(e._`${r}.length ${"maxItems"===i?e.operators.GT:e.operators.LT} ${n}`)}};t.default=i})),ki=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ti();e.code='require("ajv/dist/runtime/equal").default',t.default=e})),Si=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=We(),i=Fe(),r=Be(),n=ki(),s={message:({params:{i:t,j:e}})=>i.str`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>i._`{i: ${t}, j: ${e}}`},o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s,code(t){const{gen:s,data:o,$data:a,schema:h,parentSchema:u,schemaCode:c,it:f}=t;if(!a&&!h)return;const l=s.let("valid"),d=u.items?(0,e.getSchemaTypes)(u.items):[];function p(r,n){const a=s.name("item"),h=(0,e.checkDataTypes)(d,a,f.opts.strictNumbers,e.DataType.Wrong),u=s.const("indices",i._`{}`);s.for(i._`;${r}--;`,(()=>{s.let(a,i._`${o}[${r}]`),s.if(h,i._`continue`),d.length>1&&s.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),s.if(i._`typeof ${u}[${a}] == "number"`,(()=>{s.assign(n,i._`${u}[${a}]`),t.error(),s.assign(l,!1).break()})).code(i._`${u}[${a}] = ${r}`)}))}function m(e,a){const h=(0,r.useFunc)(s,n.default),u=s.name("outer");s.label(u).for(i._`;${e}--;`,(()=>s.for(i._`${a} = ${e}; ${a}--;`,(()=>s.if(i._`${h}(${o}[${e}], ${o}[${a}])`,(()=>{t.error(),s.assign(l,!1).break(u)}))))))}t.block$data(l,(function(){const e=s.let("i",i._`${o}.length`),r=s.let("j");t.setParams({i:e,j:r}),s.assign(l,!0),s.if(i._`${e} > 1`,(()=>(d.length>0&&!d.some((t=>"object"===t||"array"===t))?p:m)(e,r)))}),i._`${c} === false`),t.ok(l)}};t.default=o})),xi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=ki(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(t){const{gen:n,data:s,$data:o,schemaCode:a,schema:h}=t;o||h&&"object"==typeof h?t.fail$data(e._`!${(0,i.useFunc)(n,r.default)}(${s}, ${a})`):t.fail(e._`${h} !== ${s}`)}};t.default=n})),ji=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=ki(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(t){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=t;if(!o&&0===a.length)throw new Error("enum must have non-empty array");let c;const f=()=>null!=c?c:c=(0,i.useFunc)(n,r.default);let l;if(a.length>=u.opts.loopEnum||o)l=n.let("valid"),t.block$data(l,(function(){n.assign(l,!1),n.forOf("v",h,(t=>n.if(e._`${f()}(${s}, ${t})`,(()=>n.assign(l,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const t=n.const("vSchema",h);l=(0,e.or)(...a.map(((i,r)=>function(t,i){const r=a[i];return"object"==typeof r&&null!==r?e._`${f()}(${s}, ${t}[${i}])`:e._`${s} === ${r}`}(t,r))))}t.pass(l)}};t.default=n})),Oi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=vi(),i=yi(),r=bi(),n=$i(),s=wi(),o=_i(),a=Ei(),h=Si(),u=xi(),c=ji();t.default=[e.default,i.default,r.default,n.default,s.default,o.default,a.default,h.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,c.default]})),Pi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Fe(),i=Be(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;Array.isArray(s)?n(t,s):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(t,r){const{gen:n,schema:s,data:o,keyword:a,it:h}=t;h.items=!0;const u=n.const("len",e._`${o}.length`);if(!1===s)t.setParams({len:r.length}),t.pass(e._`${u} <= ${r.length}`);else if("object"==typeof s&&!(0,i.alwaysValidSchema)(h,s)){const s=n.var("valid",e._`${u} <= ${r.length}`);n.if((0,e.not)(s),(()=>function(s){n.forRange("i",r.length,u,(r=>{t.subschema({keyword:a,dataProp:r,dataPropType:i.Type.Num},s),h.allErrors||n.if((0,e.not)(s),(()=>n.break()))}))}(s))),t.ok(s)}}t.validateAdditionalItems=n,t.default=r})),Ii=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Fe(),i=Be(),r=Xe(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return s(t,"additionalItems",e);n.items=!0,(0,i.alwaysValidSchema)(n,e)||t.ok((0,r.validateArray)(t))}};function s(t,r,n=t.schema){const{gen:s,parentSchema:o,data:a,keyword:h,it:u}=t;!function(t){const{opts:e,errSchemaPath:s}=u,o=n.length;e.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,i.checkStrictMode)(u,`"${h}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,e.strictTuples)}(o),u.opts.unevaluated&&n.length&&!0!==u.items&&(u.items=i.mergeEvaluated.items(s,n.length,u.items));const c=s.name("valid"),f=s.const("len",e._`${a}.length`);n.forEach(((r,n)=>{(0,i.alwaysValidSchema)(u,r)||(s.if(e._`${f} > ${n}`,(()=>t.subschema({keyword:h,schemaProp:n,dataProp:n},c))),t.ok(c))}))}t.validateTuple=s,t.default=n})),Ci=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ii();t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")}})),Ai=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=Xe(),n=Pi();t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(t){const{schema:e,parentSchema:s,it:o}=t,{prefixItems:a}=s;o.items=!0,(0,i.alwaysValidSchema)(o,e)||(a?(0,n.validateAdditionalItems)(t,a):t.ok((0,r.validateArray)(t)))}}})),Ni=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:i}})=>void 0===i?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${i} valid item(s)`,params:({params:{min:t,max:i}})=>void 0===i?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${i}}`},code(t){const{gen:r,schema:n,parentSchema:s,data:o,it:a}=t;let h,u;const{minContains:c,maxContains:f}=s;a.opts.next?(h=void 0===c?1:c,u=f):h=1;const l=r.const("len",e._`${o}.length`);if(t.setParams({min:h,max:u}),void 0===u&&0===h)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&h>u)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,i.alwaysValidSchema)(a,n)){let i=e._`${l} >= ${h}`;return void 0!==u&&(i=e._`${i} && ${l} <= ${u}`),void t.pass(i)}a.items=!0;const d=r.name("valid");function p(){const t=r.name("_valid"),i=r.let("count",0);m(t,(()=>r.if(t,(()=>function(t){r.code(e._`${t}++`),void 0===u?r.if(e._`${t} >= ${h}`,(()=>r.assign(d,!0).break())):(r.if(e._`${t} > ${u}`,(()=>r.assign(d,!1).break())),1===h?r.assign(d,!0):r.if(e._`${t} >= ${h}`,(()=>r.assign(d,!0))))}(i)))))}function m(e,n){r.forRange("i",0,l,(r=>{t.subschema({keyword:"contains",dataProp:r,dataPropType:i.Type.Num,compositeRule:!0},e),n()}))}void 0===u&&1===h?m(d,(()=>r.if(d,(()=>r.break())))):0===h?(r.let(d,!0),void 0!==u&&r.if(e._`${o}.length > 0`,p)):(r.let(d,!1),p()),t.result(d,(()=>t.reset()))}};t.default=r})),Ti=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Fe(),i=Be(),r=Xe();t.error={message:({params:{property:t,depsCount:i,deps:r}})=>e.str`must have ${1===i?"property":"properties"} ${r} when property ${t} is present`,params:({params:{property:t,depsCount:i,deps:r,missingProperty:n}})=>e._`{property: ${t},
|
|
11
|
+
*/function ke(t,e){e.unobserve()}function Se(t,e){var i,r=function(t){return we.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new _e(t),we.set(t,r);if(i)return i;if(i={},r.value=re(t),e){i.callback=e,i.next=null;var s=function(){xe(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){xe(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new Ee(e,i)),i}function xe(t,e){void 0===e&&(e=!1);var i=we.get(t.object);Oe(i.value,t.object,t.patches,"",e),t.patches.length&&me(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Oe(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=ie(e),o=ie(t),a=!1,u=o.length-1;u>=0;u--){var h=t[f=o[u]];if(!ee(e,f)||void 0===e[f]&&void 0!==h&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+se(f),value:re(h)}),i.push({op:"remove",path:r+"/"+se(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof h&&null!=h&&"object"==typeof c&&null!=c&&Array.isArray(h)===Array.isArray(c)?Oe(h,c,i,r+"/"+se(f),n):h!==c&&(n&&i.push({op:"test",path:r+"/"+se(f),value:re(h)}),i.push({op:"replace",path:r+"/"+se(f),value:re(c)}))}}if(a||s.length!=o.length)for(u=0;u<s.length;u++){var f;ee(t,f=s[u])||void 0===e[f]||i.push({op:"add",path:r+"/"+se(f),value:re(e[f])})}}}function je(t,e,i){void 0===i&&(i=!1);var r=[];return Oe(t,e,r,"",i),r}var Pe,Ie=Object.assign({},$e,Object.freeze({__proto__:null,compare:je,generate:xe,observe:Se,unobserve:ke}),{JsonPatchError:he,deepClone:re,escapePathComponent:se,unescapePathComponent:oe}),Ce=Object.freeze({__proto__:null,JsonPatchError:he,_areEquals:be,applyOperation:pe,applyPatch:me,applyReducer:ve,compare:je,deepClone:re,default:Ie,escapePathComponent:se,generate:xe,getValueByPointer:de,observe:Se,unescapePathComponent:oe,unobserve:ke,validate:ge,validator:ye}),Ae=Object.create,Ne=Object.getPrototypeOf,Te=Object.defineProperty,Me=Object.getOwnPropertyNames,Re=Object.prototype.hasOwnProperty;function De(t){return this[t]}var ze=(t,e,i)=>{var r=null!=t&&"object"==typeof t;if(r){var n=Pe??=new WeakMap,s=n.get(t);if(s)return s}i=null!=t?Ae(Ne(t)):{};const o=Te(i,"default",{value:t,enumerable:!0});if(t&&"object"==typeof t||"function"==typeof t)for(let e of Me(t))Re.call(o,e)||Te(o,e,{get:De.bind(t,e),enumerable:!0});return r&&n.set(t,o),o},Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ue=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function n(t,...e){const i=[t[0]];let n=0;for(;n<e.length;)a(i,e[n]),i.push(t[++n]);return new r(i)}t._Code=r,t.nil=new r(""),t._=n;var s=new r("+");function o(t,...e){const i=[h(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,h(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=u(t[e-1],t[e+1]);if(void 0!==i){t.splice(e-1,3,i);continue}t[e++]="+"}e++}}(i),new r(i)}function a(t,e){var n;e instanceof r?t.push(...e._items):t.push(e instanceof i?e:"number"==typeof(n=e)||"boolean"==typeof n||null===n?n:h(Array.isArray(n)?n.join(","):n))}function u(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function h(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=a,t.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:o`${t}${e}`},t.stringify=function(t){return new r(h(t))},t.safeStringify=h,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new r(`.${e}`):n`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new r(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(t){return new r(t.toString())}})),qe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e,i=Ue();class r extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(e||(t.UsedValueState=e={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class n{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,i;if((null===(i=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===i?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}t.Scope=n;class s extends i.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:e,itemIndex:r}){this.value=t,this.scopePath=i._`.${new i.Name(e)}[${r}]`}}t.ValueScopeName=s;var o=i._`\n`;t.ValueScope=class extends n{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?o:i.nil}}get(){return this._scope}name(t){return new s(t,this._newName(t))}value(t,e){var i;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(t),{prefix:n}=r,s=null!==(i=e.key)&&void 0!==i?i:e.ref;let o=this._values[n];if(o){const t=o.get(s);if(t)return t}else o=this._values[n]=new Map;o.set(s,r);const a=this._scope[n]||(this._scope[n]=[]),u=a.length;return a[u]=e.ref,r.setValue(e,{property:n,itemIndex:u}),r}getValue(t,e){const i=this._values[t];if(i)return i.get(e)}scopeRefs(t,e=this._values){return this._reduceValues(e,(e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return i._`${t}${e.scopePath}`}))}scopeCode(t=this._values,e,i){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,i)}_reduceValues(n,s,o={},a){let u=i.nil;for(const h in n){const c=n[h];if(!c)continue;const f=o[h]=o[h]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,e.Started);let o=s(n);if(o)u=i._`${u}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${n} = ${o};${this.opts._n}`;else{if(!(o=null==a?void 0:a(n)))throw new r(n);u=i._`${u}${o}${this.opts._n}`}f.set(n,e.Completed)}))}return u}}})),Fe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Ue(),i=qe(),r=Ue();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var n=qe();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(t,e){return this}}class o extends s{constructor(t,e,i){super(),this.varKind=t,this.name=e,this.rhs=i}render({es5:t,_n:e}){return`${t?i.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,t,e)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(t,e,i){super(),this.lhs=t,this.rhs=e,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof e.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,t,i),this}get names(){return j(this.lhs instanceof e.Name?{}:{...this.lhs.names},this.rhs)}}class u extends a{constructor(t,e,i,r){super(t,i,r),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class h extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class c extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class f extends s{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class l extends s{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=P(this.code,t,e),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class d extends s{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,i)=>e+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const i=t[e].optimizeNodes();Array.isArray(i)?t.splice(e,1,...i):i?t[e]=i:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:i}=this;let r=i.length;for(;r--;){const n=i[r];n.optimizeNames(t,e)||(I(t,n.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>O(t,e.names)),{})}}class p extends d{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class m extends d{}class v extends p{}v.kind="else";class y extends p{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new v(t):t}return e?!1===t?e instanceof y?e:e.nodes:this.nodes.length?this:new y(C(t),e instanceof y?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=P(this.condition,t,e),this}get names(){const t=super.names;return j(t,this.condition),this.else&&O(t,this.else.names),t}}y.kind="if";class g extends p{}g.kind="for";class b extends g{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=P(this.iteration,t,e),this}get names(){return O(super.names,this.iteration.names)}}class $ extends g{constructor(t,e,i,r){super(),this.varKind=t,this.name=e,this.from=i,this.to=r}render(t){const e=t.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${e} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(t)}get names(){const t=j(super.names,this.from);return j(t,this.to)}}class w extends g{constructor(t,e,i,r){super(),this.loop=t,this.varKind=e,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=P(this.iterable,t,e),this}get names(){return O(super.names,this.iterable.names)}}class _ extends p{constructor(t,e,i){super(),this.name=t,this.args=e,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}_.kind="func";class E extends d{render(t){return"return "+super.render(t)}}E.kind="return";class k extends p{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var i,r;return super.optimizeNames(t,e),null===(i=this.catch)||void 0===i||i.optimizeNames(t,e),null===(r=this.finally)||void 0===r||r.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&O(t,this.catch.names),this.finally&&O(t,this.finally.names),t}}class S extends p{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}S.kind="catch";class x extends p{render(t){return"finally"+super.render(t)}}function O(t,e){for(const i in e)t[i]=(t[i]||0)+(e[i]||0);return t}function j(t,i){return i instanceof e._CodeOrName?O(t,i.names):t}function P(t,i,r){return t instanceof e.Name?s(t):(n=t)instanceof e._Code&&n._items.some((t=>t instanceof e.Name&&1===i[t.str]&&void 0!==r[t.str]))?new e._Code(t._items.reduce(((t,i)=>(i instanceof e.Name&&(i=s(i)),i instanceof e._Code?t.push(...i._items):t.push(i),t)),[])):t;var n;function s(t){const e=r[t.str];return void 0===e||1!==i[t.str]?t:(delete i[t.str],e)}}function I(t,e){for(const i in e)t[i]=(t[i]||0)-(e[i]||0)}function C(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:e._`!${M(t)}`}x.kind="finally",t.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new i.Scope({parent:t}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const i=this._extScope.value(t,e);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,i,r){const n=this._scope.toName(e);return void 0!==i&&r&&(this._constants[n.str]=i),this._leafNode(new o(t,n,i)),n}const(t,e,r){return this._def(i.varKinds.const,t,e,r)}let(t,e,r){return this._def(i.varKinds.let,t,e,r)}var(t,e,r){return this._def(i.varKinds.var,t,e,r)}assign(t,e,i){return this._leafNode(new a(t,e,i))}add(e,i){return this._leafNode(new u(e,t.operators.ADD,i))}code(t){return"function"==typeof t?t():t!==e.nil&&this._leafNode(new l(t)),this}object(...t){const i=["{"];for(const[r,n]of t)i.length>1&&i.push(","),i.push(r),(r!==n||this.opts.es5)&&(i.push(":"),(0,e.addCodeArg)(i,n));return i.push("}"),new e._Code(i)}if(t,e,i){if(this._blockNode(new y(t)),e&&i)this.code(e).else().code(i).endIf();else if(e)this.code(e).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new y(t))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new b(t),e)}forRange(t,e,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(t);return this._for(new $(s,o,e,r),(()=>n(o)))}forOf(t,r,n,s=i.varKinds.const){const o=this._scope.toName(t);if(this.opts.es5){const t=r instanceof e.Name?r:this.var("_arr",r);return this.forRange("_i",0,e._`${t}.length`,(i=>{this.var(o,e._`${t}[${i}]`),n(o)}))}return this._for(new w("of",s,o,r),(()=>n(o)))}forIn(t,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,e._`Object.keys(${r})`,n);const o=this._scope.toName(t);return this._for(new w("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode(g)}label(t){return this._leafNode(new h(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new k;if(this._blockNode(r),this.code(t),e){const t=this.name("e");this._currNode=r.catch=new S(t),e(t)}return i&&(this._currNode=r.finally=new x,this.code(i)),this._endBlockNode(S,x)}throw(t){return this._leafNode(new f(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-e;if(i<0||void 0!==t&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=e,this}func(t,i=e.nil,r,n){return this._blockNode(new _(t,i,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const i=this._currNode;if(i instanceof t||e&&i instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},t.not=C;var A=T(t.operators.AND);t.and=function(...t){return t.reduce(A)};var N=T(t.operators.OR);function T(t){return(i,r)=>i===e.nil?r:r===e.nil?i:e._`${M(i)} ${t} ${M(r)}`}function M(t){return t instanceof e.Name?t:e._`(${t})`}t.or=function(...t){return t.reduce(N)}})),Be=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Fe(),i=Ue();function r(t,e=t.schema){const{opts:i,self:r}=t;if(!i.strictSchema)return;if("boolean"==typeof e)return;const n=r.RULES.keywords;for(const i in e)n[i]||l(t,`unknown keyword: "${i}"`)}function n(t,e){if("boolean"==typeof t)return!t;for(const i in t)if(e[i])return!0;return!1}function s(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function o(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function a({mergeNames:t,mergeToName:i,mergeValues:r,resultToName:n}){return(s,o,a,u)=>{const h=void 0===a?o:a instanceof e.Name?(o instanceof e.Name?t(s,o,a):i(s,o,a),a):o instanceof e.Name?(i(s,a,o),o):r(o,a);return u!==e.Name||h instanceof e.Name?h:n(s,h)}}function u(t,i){if(!0===i)return t.var("props",!0);const r=t.var("props",e._`{}`);return void 0!==i&&h(t,r,i),r}function h(t,i,r){Object.keys(r).forEach((r=>t.assign(e._`${i}${(0,e.getProperty)(r)}`,!0)))}t.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},t.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(r(t,e),!n(e,t.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=n,t.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const i in t)if("$ref"!==i&&e.all[i])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:t,schemaPath:i},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return e._`${r}`}return e._`${t}${i}${(0,e.getProperty)(n)}`},t.unescapeFragment=function(t){return o(decodeURIComponent(t))},t.escapeFragment=function(t){return encodeURIComponent(s(t))},t.escapeJsonPointer=s,t.unescapeJsonPointer=o,t.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},t.mergeEvaluated={props:a({mergeNames:(t,i,r)=>t.if(e._`${r} !== true && ${i} !== undefined`,(()=>{t.if(e._`${i} === true`,(()=>t.assign(r,!0)),(()=>t.assign(r,e._`${r} || {}`).code(e._`Object.assign(${r}, ${i})`)))})),mergeToName:(t,i,r)=>t.if(e._`${r} !== true`,(()=>{!0===i?t.assign(r,!0):(t.assign(r,e._`${r} || {}`),h(t,r,i))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:u}),items:a({mergeNames:(t,i,r)=>t.if(e._`${r} !== true && ${i} !== undefined`,(()=>t.assign(r,e._`${i} === true ? true : ${r} > ${i} ? ${r} : ${i}`))),mergeToName:(t,i,r)=>t.if(e._`${r} !== true`,(()=>t.assign(r,!0===i||e._`${r} > ${i} ? ${r} : ${i}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},t.evaluatedPropsToName=u,t.setEvaluated=h;var c,f={};function l(t,e,i=t.opts.strictSchema){if(i){if(e=`strict mode: ${e}`,!0===i)throw new Error(e);t.self.logger.warn(e)}}t.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:f[e.code]||(f[e.code]=new i._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(t.Type=c={})),t.getErrorPath=function(t,i,r){if(t instanceof e.Name){const n=i===c.Num;return r?n?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:n?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,e.getProperty)(t).toString():"/"+s(t)},t.checkStrictMode=l})),Ve=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=i})),Ge=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Fe(),i=Be(),r=Ve();function n(t,i){const n=t.const("err",i);t.if(e._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,e._`[${n}]`)),e._`${r.default.vErrors}.push(${n})`),t.code(e._`${r.default.errors}++`)}function s(t,i){const{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw(e._`new ${t.ValidationError}(${i})`):(r.assign(e._`${n}.errors`,i),r.return(!1))}t.keywordError={message:({keyword:t})=>e.str`must pass "${t}" keyword validation`},t.keyword$DataError={message:({keyword:t,schemaType:i})=>i?e.str`"${t}" keyword must be ${i} ($data)`:e.str`"${t}" keyword is invalid ($data)`},t.reportError=function(i,r=t.keywordError,o,u){const{it:h}=i,{gen:c,compositeRule:f,allErrors:l}=h,d=a(i,r,o);(null!=u?u:f||l)?n(c,d):s(h,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:u}=e,{gen:h,compositeRule:c,allErrors:f}=u;n(h,a(e,i,o)),c||f||s(u,r.default.vErrors)},t.resetErrorsCount=function(t,i){t.assign(r.default.errors,i),t.if(e._`${r.default.vErrors} !== null`,(()=>t.if(i,(()=>t.assign(e._`${r.default.vErrors}.length`,i)),(()=>t.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:t,keyword:i,schemaValue:n,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const u=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(u,e._`${r.default.vErrors}[${o}]`),t.if(e._`${u}.instancePath === undefined`,(()=>t.assign(e._`${u}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${u}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${u}.schema`,n),t.assign(e._`${u}.data`,s))}))};var o={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function a(t,i,n){const{createErrors:s}=t.it;return!1===s?e._`{}`:function(t,i,n={}){const{gen:s,it:a}=t,c=[u(a,n),h(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:u,schemaValue:h,it:c}=t,{opts:f,propertyName:l,topSchemaRef:d,schemaPath:p}=c;s.push([o.keyword,a],[o.params,"function"==typeof i?i(t):i||e._`{}`]),f.messages&&s.push([o.message,"function"==typeof n?n(t):n]),f.verbose&&s.push([o.schema,h],[o.parentSchema,e._`${d}${p}`],[r.default.data,u]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function u({errorPath:t},{instancePath:n}){const s=n?e.str`${t}${(0,i.getErrorPath)(n,i.Type.Str)}`:t;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,s)]}function h({keyword:t,it:{errSchemaPath:r}},{schemaPath:n,parentSchema:s}){let a=s?r:e.str`${r}/${t}`;return n&&(a=e.str`${a}${(0,i.getErrorPath)(n,i.Type.Str)}`),[o.schemaPath,a]}})),He=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Ge(),i=Fe(),r=Ve(),n={message:"boolean schema is false"};function s(t,i){const{gen:r,data:s}=t;(0,e.reportError)({gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t},n,void 0,i)}t.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:o}=t;!1===n?s(t,!1):"object"==typeof n&&!0===n.$async?e.return(r.default.data):(e.assign(i._`${o}.errors`,null),e.return(!0))},t.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),s(t)):i.var(e,!0)}})),Je=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(t){return"string"==typeof t&&e.has(t)},t.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}})),Ke=Le((function(t){function e(t,e){return e.rules.some((e=>i(t,e)))}function i(t,e){var i;return void 0!==t[e.keyword]||(null===(i=e.definition.implements)||void 0===i?void 0:i.some((e=>void 0!==t[e])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:t,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&e(t,n)},t.shouldUseGroup=e,t.shouldUseRule=i})),We=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e,i=Je(),r=Ke(),n=Ge(),s=Fe(),o=Be();function a(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(i.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(e||(t.DataType=e={})),t.getSchemaTypes=function(t){const e=a(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},t.getJSONTypes=a,t.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:a}=t,h=function(t,e){return e?t.filter((t=>u.has(t)||"array"===e&&"array"===t)):[]}(i,a.coerceTypes),f=i.length>0&&!(0===h.length&&1===i.length&&(0,r.schemaHasRulesForType)(t,i[0]));if(f){const r=c(i,o,a.strictNumbers,e.Wrong);n.if(r,(()=>{h.length?function(t,e,i){const{gen:r,data:n,opts:o}=t,a=r.let("dataType",s._`typeof ${n}`),h=r.let("coerced",s._`undefined`);"array"===o.coerceTypes&&r.if(s._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>r.assign(n,s._`${n}[0]`).assign(a,s._`typeof ${n}`).if(c(e,n,o.strictNumbers),(()=>r.assign(h,n))))),r.if(s._`${h} !== undefined`);for(const t of i)(u.has(t)||"array"===t&&"array"===o.coerceTypes)&&f(t);function f(t){switch(t){case"string":return void r.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(h,s._`"" + ${n}`).elseIf(s._`${n} === null`).assign(h,s._`""`);case"number":return void r.elseIf(s._`${a} == "boolean" || ${n} === null
|
|
12
|
+
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(h,s._`+${n}`);case"integer":return void r.elseIf(s._`${a} === "boolean" || ${n} === null
|
|
13
|
+
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(h,s._`+${n}`);case"boolean":return void r.elseIf(s._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(h,!1).elseIf(s._`${n} === "true" || ${n} === 1`).assign(h,!0);case"null":return r.elseIf(s._`${n} === "" || ${n} === 0 || ${n} === false`),void r.assign(h,null);case"array":r.elseIf(s._`${a} === "string" || ${a} === "number"
|
|
14
|
+
|| ${a} === "boolean" || ${n} === null`).assign(h,s._`[${n}]`)}}r.else(),l(t),r.endIf(),r.if(s._`${h} !== undefined`,(()=>{r.assign(n,h),function({gen:t,parentData:e,parentDataProperty:i},r){t.if(s._`${e} !== undefined`,(()=>t.assign(s._`${e}[${i}]`,r)))}(t,h)}))}(t,i,h):l(t)}))}return f};var u=new Set(["string","number","integer","boolean","null"]);function h(t,i,r,n=e.Correct){const o=n===e.Correct?s.operators.EQ:s.operators.NEQ;let a;switch(t){case"null":return s._`${i} ${o} null`;case"array":a=s._`Array.isArray(${i})`;break;case"object":a=s._`${i} && typeof ${i} == "object" && !Array.isArray(${i})`;break;case"integer":a=u(s._`!(${i} % 1) && !isNaN(${i})`);break;case"number":a=u();break;default:return s._`typeof ${i} ${o} ${t}`}return n===e.Correct?a:(0,s.not)(a);function u(t=s.nil){return(0,s.and)(s._`typeof ${i} == "number"`,t,r?s._`isFinite(${i})`:s.nil)}}function c(t,e,i,r){if(1===t.length)return h(t[0],e,i,r);let n;const a=(0,o.toHash)(t);if(a.array&&a.object){const t=s._`typeof ${e} != "object"`;n=a.null?t:s._`!${e} || ${t}`,delete a.null,delete a.array,delete a.object}else n=s.nil;a.number&&delete a.integer;for(const t in a)n=(0,s.and)(n,h(t,e,i,r));return n}t.checkDataType=h,t.checkDataTypes=c;var f={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?s._`{type: ${t}}`:s._`{type: ${e}}`};function l(t){const e=function(t){const{gen:e,data:i,schema:r}=t,n=(0,o.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:i,schema:r.type,schemaCode:n,schemaValue:n,parentSchema:r,params:{},it:t}}(t);(0,n.reportError)(e,f)}t.reportTypeError=l})),Ze=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Fe(),i=Be();function r(t,r,n){const{gen:s,compositeRule:o,data:a,opts:u}=t;if(void 0===n)return;const h=e._`${a}${(0,e.getProperty)(r)}`;if(o)return void(0,i.checkStrictMode)(t,`default is ignored for: ${h}`);let c=e._`${h} === undefined`;"empty"===u.useDefaults&&(c=e._`${c} || ${h} === null || ${h} === ""`),s.if(c,e._`${h} = ${(0,e.stringify)(n)}`)}t.assignDefaults=function(t,e){const{properties:i,items:n}=t.schema;if("object"===e&&i)for(const e in i)r(t,e,i[e].default);else"array"===e&&Array.isArray(n)&&n.forEach(((e,i)=>r(t,i,e.default)))}})),Ye=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Fe(),i=Be(),r=Ve(),n=Be();function s(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function o(t,i,r){return e._`${s(t)}.call(${i}, ${r})`}function a(t,i,r,n){const s=e._`${i}${(0,e.getProperty)(r)} === undefined`;return n?(0,e.or)(s,(0,e.not)(o(t,i,r))):s}function u(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}t.checkReportMissingProp=function(t,i){const{gen:r,data:n,it:s}=t;r.if(a(r,n,i,s.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${i}`},!0),t.error()}))},t.checkMissingProp=function({gen:t,data:i,it:{opts:r}},n,s){return(0,e.or)(...n.map((n=>(0,e.and)(a(t,i,n,r.ownProperties),e._`${s} = ${n}`))))},t.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},t.hasPropFunc=s,t.isOwnProperty=o,t.propertyInData=function(t,i,r,n){const s=e._`${i}${(0,e.getProperty)(r)} !== undefined`;return n?e._`${s} && ${o(t,i,r)}`:s},t.noPropertyInData=a,t.allSchemaProperties=u,t.schemaProperties=function(t,e){return u(e).filter((r=>!(0,i.alwaysValidSchema)(t,e[r])))},t.callValidateCode=function({schemaCode:t,data:i,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:u},h,c,f){const l=f?e._`${t}, ${i}, ${s}${o}`:i,d=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,a)],[r.default.parentData,u.parentData],[r.default.parentDataProperty,u.parentDataProperty],[r.default.rootData,r.default.rootData]];u.opts.dynamicRef&&d.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const p=e._`${l}, ${n.object(...d)}`;return c!==e.nil?e._`${h}.call(${c}, ${p})`:e._`${h}(${p})`};var h=e._`new RegExp`;t.usePattern=function({gen:t,it:{opts:i}},r){const s=i.unicodeRegExp?"u":"",{regExp:o}=i.code,a=o(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`${"new RegExp"===o.code?h:(0,n.useFunc)(t,o)}(${r}, ${s})`})},t.validateArray=function(t){const{gen:r,data:n,keyword:s,it:o}=t,a=r.name("valid");if(o.allErrors){const t=r.let("valid",!0);return u((()=>r.assign(t,!1))),t}return r.var(a,!0),u((()=>r.break())),a;function u(o){const u=r.const("len",e._`${n}.length`);r.forRange("i",0,u,(n=>{t.subschema({keyword:s,dataProp:n,dataPropType:i.Type.Num},a),r.if((0,e.not)(a),o)}))}},t.validateUnion=function(t){const{gen:r,schema:n,keyword:s,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((t=>(0,i.alwaysValidSchema)(o,t)))&&!o.opts.unevaluated)return;const a=r.let("valid",!1),u=r.name("_valid");r.block((()=>n.forEach(((i,n)=>{const o=t.subschema({keyword:s,schemaProp:n,compositeRule:!0},u);r.assign(a,e._`${a} || ${u}`),t.mergeValidEvaluated(o,u)||r.if((0,e.not)(a))})))),t.result(a,(()=>t.reset()),(()=>t.error(!0)))}})),Xe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Fe(),i=Ve(),r=Ye(),n=Ge();function s(t){const{gen:i,data:r,it:n}=t;i.if(n.parentData,(()=>i.assign(r,e._`${n.parentData}[${n.parentDataProperty}]`)))}function o(t,i,r){if(void 0===r)throw new Error(`keyword "${i}" failed to compile`);return t.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,e.stringify)(r)})}t.macroKeywordCode=function(t,i){const{gen:r,keyword:n,schema:s,parentSchema:a,it:u}=t,h=i.macro.call(u.self,s,a,u),c=o(r,n,h);!1!==u.opts.validateSchema&&u.self.validateSchema(h,!0);const f=r.name("valid");t.subschema({schema:h,schemaPath:e.nil,errSchemaPath:`${u.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),t.pass(f,(()=>t.error(!0)))},t.funcKeywordCode=function(t,a){var u;const{gen:h,keyword:c,schema:f,parentSchema:l,$data:d,it:p}=t;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(p,a);const m=!d&&a.compile?a.compile.call(p.self,f,l,p):a.validate,v=o(h,c,m),y=h.let("valid");function g(n=(a.async?e._`await `:e.nil)){h.assign(y,e._`${n}${(0,r.callValidateCode)(t,v,p.opts.passContext?i.default.this:i.default.self,!("compile"in a&&!d||!1===a.schema))}`,a.modifying)}function b(t){var i;h.if((0,e.not)(null!==(i=a.valid)&&void 0!==i?i:y),t)}t.block$data(y,(function(){if(!1===a.errors)g(),a.modifying&&s(t),b((()=>t.error()));else{const r=a.async?function(){const t=h.let("ruleErrs",null);return h.try((()=>g(e._`await `)),(i=>h.assign(y,!1).if(e._`${i} instanceof ${p.ValidationError}`,(()=>h.assign(t,e._`${i}.errors`)),(()=>h.throw(i))))),t}():function(){const t=e._`${v}.errors`;return h.assign(t,null),g(e.nil),t}();a.modifying&&s(t),b((()=>function(t,r){const{gen:s}=t;s.if(e._`Array.isArray(${r})`,(()=>{s.assign(i.default.vErrors,e._`${i.default.vErrors} === null ? ${r} : ${i.default.vErrors}.concat(${r})`).assign(i.default.errors,e._`${i.default.vErrors}.length`),(0,n.extendErrors)(t)}),(()=>t.error()))}(t,r)))}})),t.ok(null!==(u=a.valid)&&void 0!==u?u:y)},t.validSchemaType=function(t,e,i=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||i&&void 0===t))},t.validateKeywordUsage=function({schema:t,opts:e,self:i,errSchemaPath:r},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[s])){const t=`keyword "${s}" value is invalid at path "${r}": `+i.errorsText(n.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);i.logger.error(t)}}})),Qe=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Fe(),i=Be();t.getSubschema=function(t,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:u}){if(void 0!==r&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==r){const s=t.schema[r];return void 0===n?{schema:s,schemaPath:e._`${t.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:s[n],schemaPath:e._`${t.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${(0,i.escapeFragment)(n)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(t,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:u}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:u}=r;c(h.let("data",e._`${r.data}${(0,e.getProperty)(n)}`,!0)),t.errorPath=e.str`${o}${(0,i.getErrorPath)(n,s,u.jsPropertySyntax)}`,t.parentDataProperty=e._`${n}`,t.dataPathArr=[...a,t.parentDataProperty]}function c(e){t.data=e,t.dataLevel=r.dataLevel+1,t.dataTypes=[],r.definedProperties=new Set,t.parentData=r.data,t.dataNames=[...r.dataNames,e]}void 0!==o&&(c(o instanceof e.Name?o:h.let("data",o,!0)),void 0!==u&&(t.propertyName=u)),a&&(t.dataTypes=a)},t.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:i,compositeRule:r,createErrors:n,allErrors:s}){void 0!==r&&(t.compositeRule=r),void 0!==n&&(t.createErrors=n),void 0!==s&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=i}})),ti=Le((function(t,e){e.exports=function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var r,n,s;if(Array.isArray(e)){if((r=e.length)!=i.length)return!1;for(n=r;0!=n--;)if(!t(e[n],i[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((r=(s=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var o=s[n];if(!t(e[o],i[o]))return!1}return!0}return e!=e&&i!=i}})),ei=Le((function(t,e){var i=e.exports=function(t,e,i){"function"==typeof e&&(i=e,e={}),r(e,"function"==typeof(i=e.cb||i)?i:i.pre||function(){},i.post||function(){},t,"",t)};function r(t,e,n,s,o,a,u,h,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in e(s,o,a,u,h,c,f),s){var d=s[l];if(Array.isArray(d)){if(l in i.arrayKeywords)for(var p=0;p<d.length;p++)r(t,e,n,d[p],o+"/"+l+"/"+p,a,o,l,s,p)}else if(l in i.propsKeywords){if(d&&"object"==typeof d)for(var m in d)r(t,e,n,d[m],o+"/"+l+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,l,s,m)}else(l in i.keywords||t.allKeys&&!(l in i.skipKeywords))&&r(t,e,n,d,o+"/"+l,a,o,l,s)}n(s,o,a,u,h,c,f)}}i.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},i.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},i.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},i.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),ii=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Be(),i=ti(),r=ei(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!o(t):!!e&&a(t)<=e)};var s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(t){for(const e in t){if(s.has(e))return!0;const i=t[e];if(Array.isArray(i)&&i.some(o))return!0;if("object"==typeof i&&o(i))return!0}return!1}function a(t){let i=0;for(const r in t){if("$ref"===r)return 1/0;if(i++,!n.has(r)&&("object"==typeof t[r]&&(0,e.eachItem)(t[r],(t=>i+=a(t))),i===1/0))return 1/0}return i}function u(t,e="",i){!1!==i&&(e=f(e));const r=t.parse(e);return h(t,r)}function h(t,e){return t.serialize(e).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=h;var c=/#\/?$/;function f(t){return t?t.replace(c,""):""}t.normalizeId=f,t.resolveUrl=function(t,e,i){return i=f(i),t.resolve(e,i)};var l=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=f(t[n]||e),a={"":o},h=u(s,o,!1),c={},d=new Set;return r(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=h+e;let o=a[r];function u(e){if(e=f(o?(0,this.opts.uriResolver.resolve)(o,e):e),d.has(e))throw m(e);d.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?p(t,i.schema,e):e!==f(s)&&("#"===e[0]?(p(t,c[e],e),c[e]=t):this.refs[e]=s),e}function v(t){if("string"==typeof t){if(!l.test(t))throw new Error(`invalid anchor "${t}"`);u.call(this,`#${t}`)}}"string"==typeof t[n]&&(o=u.call(this,t[n])),v.call(this,t.$anchor),v.call(this,t.$dynamicAnchor),a[e]=o})),c;function p(t,e,r){if(void 0!==e&&!i(t,e))throw m(r)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}}})),ri=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=He(),i=We(),r=Ke(),n=We(),s=Ze(),o=Xe(),a=Qe(),u=Fe(),h=Ve(),c=ii(),f=Be(),l=Ge();function d({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,u._`${h.default.data}, ${h.default.valCxt}`,r.$async,(()=>{t.code(u._`"use strict"; ${p(i,n)}`),function(t,e){t.if(h.default.valCxt,(()=>{t.var(h.default.instancePath,u._`${h.default.valCxt}.${h.default.instancePath}`),t.var(h.default.parentData,u._`${h.default.valCxt}.${h.default.parentData}`),t.var(h.default.parentDataProperty,u._`${h.default.valCxt}.${h.default.parentDataProperty}`),t.var(h.default.rootData,u._`${h.default.valCxt}.${h.default.rootData}`),e.dynamicRef&&t.var(h.default.dynamicAnchors,u._`${h.default.valCxt}.${h.default.dynamicAnchors}`)}),(()=>{t.var(h.default.instancePath,u._`""`),t.var(h.default.parentData,u._`undefined`),t.var(h.default.parentDataProperty,u._`undefined`),t.var(h.default.rootData,h.default.data),e.dynamicRef&&t.var(h.default.dynamicAnchors,u._`{}`)}))}(t,n),t.code(s)})):t.func(e,u._`${h.default.data}, ${function(t){return u._`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${t.dynamicRef?u._`, ${h.default.dynamicAnchors}={}`:u.nil}}={}`}(n)}`,r.$async,(()=>t.code(p(i,n)).code(s)))}function p(t,e){const i="object"==typeof t&&t[e.schemaId];return i&&(e.code.source||e.code.process)?u._`/*# sourceURL=${i} */`:u.nil}function m({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const i in t)if(e.RULES.all[i])return!0;return!1}function v(t){return"boolean"!=typeof t.schema}function y(t){(0,f.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:i,opts:r,self:n}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(t)}function g(t,e){if(t.opts.jtd)return $(t,[],!1,e);const r=(0,i.getSchemaTypes)(t.schema);$(t,r,!(0,i.coerceAndCheckDataType)(t,r),e)}function b({gen:t,schemaEnv:e,schema:i,errSchemaPath:r,opts:n}){const s=i.$comment;if(!0===n.$comment)t.code(u._`${h.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const i=u.str`${r}/$comment`,n=t.scopeValue("root",{ref:e.root});t.code(u._`${h.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function $(t,e,i,s){const{gen:o,schema:a,data:c,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(f){(0,r.shouldUseGroup)(a,f)&&(f.type?(o.if((0,n.checkDataType)(f.type,c,d.strictNumbers)),w(t,f),1===e.length&&e[0]===f.type&&i&&(o.else(),(0,n.reportTypeError)(t)),o.endIf()):w(t,f),l||o.if(u._`${h.default.errors} === ${s||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{_(t.dataTypes,e)||E(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)_(e,r)?i.push(r):e.includes("integer")&&"number"===r&&i.push("integer");t.dataTypes=i}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&E(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const i=t.self.RULES.all;for(const n in i){const s=i[n];if("object"==typeof s&&(0,r.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some((t=>{return(i=e).includes(r=t)||"number"===r&&i.includes("integer");var i,r}))&&E(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(t,t.dataTypes))}(t,e),o.block((()=>{for(const t of m.rules)v(t);v(m.post)}))):o.block((()=>S(t,"$ref",m.all.$ref.definition)))}function w(t,e){const{gen:i,schema:n,opts:{useDefaults:o}}=t;o&&(0,s.assignDefaults)(t,e.type),i.block((()=>{for(const i of e.rules)(0,r.shouldUseRule)(n,i)&&S(t,i.keyword,i.definition,e.type)}))}function _(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function E(t,e){(0,f.checkStrictMode)(t,e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,t.opts.strictTypes)}t.validateFunctionCode=function(t){v(t)&&(y(t),m(t))?function(t){const{schema:e,opts:i,gen:r}=t;d(t,(()=>{i.$comment&&e.$comment&&b(t),function(t){const{schema:e,opts:i}=t;void 0!==e.default&&i.useDefaults&&i.strictSchema&&(0,f.checkStrictMode)(t,"default is ignored in the schema root")}(t),r.let(h.default.vErrors,null),r.let(h.default.errors,0),i.unevaluated&&function(t){const{gen:e,validateName:i}=t;t.evaluated=e.const("evaluated",u._`${i}.evaluated`),e.if(u._`${t.evaluated}.dynamicProps`,(()=>e.assign(u._`${t.evaluated}.props`,u._`undefined`))),e.if(u._`${t.evaluated}.dynamicItems`,(()=>e.assign(u._`${t.evaluated}.items`,u._`undefined`)))}(t),g(t),function(t){const{gen:e,schemaEnv:i,validateName:r,ValidationError:n,opts:s}=t;i.$async?e.if(u._`${h.default.errors} === 0`,(()=>e.return(h.default.data)),(()=>e.throw(u._`new ${n}(${h.default.vErrors})`))):(e.assign(u._`${r}.errors`,h.default.vErrors),s.unevaluated&&function({gen:t,evaluated:e,props:i,items:r}){i instanceof u.Name&&t.assign(u._`${e}.props`,i),r instanceof u.Name&&t.assign(u._`${e}.items`,r)}(t),e.return(u._`${h.default.errors} === 0`))}(t)}))}(t):d(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class k{constructor(t,e,i){if((0,o.validateKeywordUsage)(t,e,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",j(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",h.default.errors))}result(t,e,i){this.failResult((0,u.not)(t),e,i)}failResult(t,e,i){this.gen.if(t),i?i():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,u.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(u._`${e} !== undefined && (${(0,u.or)(this.invalid$data(),t)})`)}error(t,e,i){if(e)return this.setParams(e),this._error(t,i),void this.setParams({});this._error(t,i)}_error(t,e){(t?l.reportExtraError:l.reportError)(this,this.def.error,e)}$dataError(){(0,l.reportError)(this,this.def.$dataError||l.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,l.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,i=u.nil){this.gen.block((()=>{this.check$data(t,i),e()}))}check$data(t=u.nil,e=u.nil){if(!this.$data)return;const{gen:i,schemaCode:r,schemaType:n,def:s}=this;i.if((0,u.or)(u._`${r} === undefined`,e)),t!==u.nil&&i.assign(t,!0),(n.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==u.nil&&i.assign(t,!1)),i.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:i,def:r,it:s}=this;return(0,u.or)(function(){if(i.length){if(!(e instanceof u.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return u._`${(0,n.checkDataTypes)(t,e,s.opts.strictNumbers,n.DataType.Wrong)}`}return u.nil}(),function(){if(r.validateSchema){const i=t.scopeValue("validate$data",{ref:r.validateSchema});return u._`!${i}(${e})`}return u.nil}())}subschema(t,i){const r=(0,a.getSubschema)(this.it,t);(0,a.extendSubschemaData)(r,this.it,t),(0,a.extendSubschemaMode)(r,t);const n={...this.it,...r,items:void 0,props:void 0};return function(t,i){v(t)&&(y(t),m(t))?function(t,e){const{schema:i,gen:r,opts:n}=t;n.$comment&&i.$comment&&b(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,c.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const s=r.const("_errs",h.default.errors);g(t,s),r.var(e,u._`${s} === ${h.default.errors}`)}(t,i):(0,e.boolOrEmptySchema)(t,i)}(n,i),n}mergeEvaluated(t,e){const{it:i,gen:r}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==t.props&&(i.props=f.mergeEvaluated.props(r,t.props,i.props,e)),!0!==i.items&&void 0!==t.items&&(i.items=f.mergeEvaluated.items(r,t.items,i.items,e)))}mergeValidEvaluated(t,e){const{it:i,gen:r}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return r.if(e,(()=>this.mergeEvaluated(t,u.Name))),!0}}function S(t,e,i,r){const n=new k(t,i,e);"code"in i?i.code(n,r):n.$data&&i.validate?(0,o.funcKeywordCode)(n,i):"macro"in i?(0,o.macroKeywordCode)(n,i):(i.compile||i.validate)&&(0,o.funcKeywordCode)(n,i)}t.KeywordCxt=k;var x=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return h.default.rootData;if("/"===t[0]){if(!x.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=h.default.rootData}else{const o=O.exec(t);if(!o)throw new Error(`Invalid JSON-pointer: ${t}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=e)throw new Error(c("property/index",a));return r[e-a]}if(a>e)throw new Error(c("data",a));if(s=i[e-a],!n)return s}let o=s;const a=n.split("/");for(const t of a)t&&(s=u._`${s}${(0,u.getProperty)((0,f.unescapeJsonPointer)(t))}`,o=u._`${o} && ${s}`);return o;function c(t,i){return`Cannot access ${t} ${i} levels up, current level is ${e}`}}t.getData=j})),ni=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}t.default=e})),si=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ii();class i extends Error{constructor(t,i,r,n){super(n||`can't resolve reference ${r} from id ${i}`),this.missingRef=(0,e.resolveUrl)(t,i,r),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}t.default=i})),oi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Fe(),i=ni(),r=Ve(),n=ii(),s=Be(),o=ri();class a{constructor(t){var e;let i;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,n.normalizeId)(null==i?void 0:i[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function u(t){const s=c.call(this,t);if(s)return s;const a=(0,n.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:u,lines:h}=this.opts.code,{ownProperties:f}=this.opts,l=new e.CodeGen(this.scope,{es5:u,lines:h,ownProperties:f});let d;t.$async&&(d=l.scopeValue("Error",{ref:i.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");t.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,e.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:d,schema:t.schema,schemaEnv:t,rootId:a,baseId:t.baseId||a,schemaPath:e.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(t),(0,o.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const i=l.toString();v=`${l.scopeRefs(r.default.scope)}return ${i}`,this.opts.code.process&&(v=this.opts.code.process(v,t));const n=new Function(`${r.default.self}`,`${r.default.scope}`,v)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:i,scopeValues:l._values}),this.opts.unevaluated){const{props:t,items:i}=m;n.evaluated={props:t instanceof e.Name?void 0:t,items:i instanceof e.Name?void 0:i,dynamicProps:t instanceof e.Name,dynamicItems:i instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return t.validate=n,t}catch(e){throw delete t.validate,delete t.validateName,v&&this.logger.error("Error compiling schema, function code:",v),e}finally{this._compilations.delete(t)}}function h(t){return(0,n.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:u.call(this,t)}function c(t){for(const r of this._compilations)if((e=r).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return r;var e,i}function f(t,e){let i;for(;"string"==typeof(i=this.refs[e]);)e=i;return i||this.schemas[e]||l.call(this,t,e)}function l(t,e){const i=this.opts.uriResolver.parse(e),r=(0,n._getFullPath)(this.opts.uriResolver,i);let s=(0,n.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===s)return p.call(this,i,t);const o=(0,n.normalizeId)(r),h=this.refs[o]||this.schemas[o];if("string"==typeof h){const e=l.call(this,t,h);if("object"!=typeof(null==e?void 0:e.schema))return;return p.call(this,i,e)}if("object"==typeof(null==h?void 0:h.schema)){if(h.validate||u.call(this,h),o===(0,n.normalizeId)(e)){const{schema:e}=h,{schemaId:i}=this.opts,r=e[i];return r&&(s=(0,n.resolveUrl)(this.opts.uriResolver,s,r)),new a({schema:e,schemaId:i,root:t,baseId:s})}return p.call(this,i,h)}}t.SchemaEnv=a,t.compileSchema=u,t.resolveRef=function(t,e,i){var r;i=(0,n.resolveUrl)(this.opts.uriResolver,e,i);const s=t.refs[i];if(s)return s;let o=f.call(this,t,i);if(void 0===o){const n=null===(r=t.localRefs)||void 0===r?void 0:r[i],{schemaId:s}=this.opts;n&&(o=new a({schema:n,schemaId:s,root:t,baseId:e}))}return void 0!==o?t.refs[i]=h.call(this,o):void 0},t.getCompilingSchema=c,t.resolveSchema=l;var d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function p(t,{baseId:e,schema:i,root:r}){var o;if("/"!==(null===(o=t.fragment)||void 0===o?void 0:o[0]))return;for(const r of t.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const t=i[(0,s.unescapeFragment)(r)];if(void 0===t)return;const o="object"==typeof(i=t)&&i[this.opts.schemaId];!d.has(r)&&o&&(e=(0,n.resolveUrl)(this.opts.uriResolver,e,o))}let u;if("boolean"!=typeof i&&i.$ref&&!(0,s.schemaHasRulesButRef)(i,this.RULES)){const t=(0,n.resolveUrl)(this.opts.uriResolver,e,i.$ref);u=l.call(this,r,t)}const{schemaId:h}=this.opts;return u=u||new a({schema:i,schemaId:h,root:r,baseId:e}),u.schema!==u.root.schema?u:void 0}})),ai=Le((function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}})),ui=Le((function(t,e){var i=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(t){let e="",i=0,r=0;for(r=0;r<t.length;r++)if(i=t[r].charCodeAt(0),48!==i){if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(i=t[r].charCodeAt(0),!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r]}return e}var u=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function h(t){return t.length=0,!0}function c(t,e,i){if(t.length){const r=a(t);if(""===r)return i.error=!0,!1;e.push(r),t.length=0}return!0}function f(t){if(function(t){let e=0;for(let i=0;i<t.length;i++)":"===t[i]&&e++;return e}(t)<2)return{host:t,isIPV6:!1};const e=function(t){let e=0;const i={error:!1,address:"",zone:""},r=[],n=[];let s=!1,o=!1,u=c;for(let a=0;a<t.length;a++){const c=t[a];if("["!==c&&"]"!==c)if(":"!==c)if("%"===c){if(!u(n,r,i))break;u=h}else n.push(c);else{if(!0===s&&(o=!0),!u(n,r,i))break;if(++e>7){i.error=!0;break}a>0&&":"===t[a-1]&&(s=!0),r.push(":")}}return n.length&&(u===h?i.zone=n.join(""):r.push(o?n.join(""):a(n))),i.address=r.join(""),i}(t);if(e.error)return{host:t,isIPV6:!1};{let t=e.address,i=e.address;return e.zone&&(t+="%"+e.zone,i+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:i}}}var l={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},d=/[@/?#:]/g,p=/[@/?#]/g;function m(t,e){const i=e?p:d;return i.lastIndex=0,t.replace(i,(t=>l[t]))}e.exports={nonSimpleDomain:u,recomposeAuthority:function(t){const e=[];if(void 0!==t.userinfo&&(e.push(t.userinfo),e.push("@")),void 0!==t.host){let i=unescape(t.host);if(!r(i)){const t=f(i);i=!0===t.isIPV6?`[${t.escapedHost}]`:m(i,!1)}e.push(i)}return"number"!=typeof t.port&&"string"!=typeof t.port||(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0},reescapeHostDelimiters:m,normalizePercentEncoding:function(t,e=!1){if(-1===t.indexOf("%"))return t;let i="";for(let r=0;r<t.length;r++){if("%"===t[r]&&r+2<t.length){const o=t.slice(r+1,r+3);if(n(o)){const t=o.toUpperCase(),n=String.fromCharCode(parseInt(t,16));e&&s(n)?i+=n:i+="%"+t,r+=2;continue}}i+=t[r]}return i},normalizePathEncoding:function(t){let e="";for(let i=0;i<t.length;i++){if("%"===t[i]&&i+2<t.length){const r=t.slice(i+1,i+3);if(n(r)){const t=r.toUpperCase(),n=String.fromCharCode(parseInt(t,16));"."!==n&&s(n)?e+=n:e+="%"+t,i+=2;continue}}o(t[i])?e+=t[i]:e+=escape(t[i])}return e},escapePreservingEscapes:function(t){let e="";for(let i=0;i<t.length;i++){if("%"===t[i]&&i+2<t.length){const r=t.slice(i+1,i+3);if(n(r)){e+="%"+r.toUpperCase(),i+=2;continue}}e+=escape(t[i])}return e},removeDotSegments:function(t){let e=t;const i=[];let r=-1,n=0;for(;n=e.length;){if(1===n){if("."===e)break;if("/"===e){i.push("/");break}i.push(e);break}if(2===n){if("."===e[0]){if("."===e[1])break;if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&("."===e[1]||"/"===e[1])){i.push("/");break}}else if(3===n&&"/.."===e){0!==i.length&&i.pop(),i.push("/");break}if("."===e[0]){if("."===e[1]){if("/"===e[2]){e=e.slice(3);continue}}else if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&"."===e[1]){if("/"===e[2]){e=e.slice(2);continue}if("."===e[2]&&"/"===e[3]){e=e.slice(3),0!==i.length&&i.pop();continue}}if(-1===(r=e.indexOf("/",1))){i.push(e);break}i.push(e.slice(0,r)),e=e.slice(r)}return i.join("")},isIPv4:r,isUUID:i,normalizeIPv6:f,stringArrayToHexStripped:a}})),hi=Le((function(t,e){var{isUUID:i}=ui(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function s(t){return!0===t.secure||!1!==t.secure&&!!t.scheme&&!(3!==t.scheme.length||"w"!==t.scheme[0]&&"W"!==t.scheme[0]||"s"!==t.scheme[1]&&"S"!==t.scheme[1]||"s"!==t.scheme[2]&&"S"!==t.scheme[2])}function o(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function a(t){const e="https"===String(t.scheme).toLowerCase();return t.port!==(e?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}var u={scheme:"http",domainHost:!0,parse:o,serialize:a},h={scheme:"ws",domainHost:!0,parse:function(t){return t.secure=s(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(t){if(t.port!==(s(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,i]=t.resourceName.split("?");t.path=e&&"/"!==e?e:void 0,t.query=i,t.resourceName=void 0}return t.fragment=void 0,t}},c={http:u,https:{scheme:"https",domainHost:u.domainHost,parse:o,serialize:a},ws:h,wss:{scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},urn:{scheme:"urn",parse:function(t,e){if(!t.path)return t.error="URN can not be parsed",t;const i=t.path.match(r);if(i){const r=e.scheme||t.scheme||"urn";t.nid=i[1].toLowerCase(),t.nss=i[2];const n=f(`${r}:${e.nid||t.nid}`);t.path=void 0,n&&(t=n.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(t,e){if(void 0===t.nid)throw new Error("URN without nid cannot be serialized");const i=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),n=f(`${i}:${e.nid||r}`);n&&(t=n.serialize(t,e));const s=t;return s.path=`${r||e.nid}:${t.nss}`,e.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,e){const r=t;return r.uuid=r.nss,r.nss=void 0,e.tolerant||r.uuid&&i(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e},skipNormalize:!0}};function f(t){return t&&(c[t]||c[t.toLowerCase()])||void 0}Object.setPrototypeOf(c,null),e.exports={wsIsSecure:s,SCHEMES:c,isValidSchemeName:function(t){return-1!==n.indexOf(t)},getSchemeHandler:f}})),ci=Le((function(t,e){var{normalizeIPv6:i,removeDotSegments:r,recomposeAuthority:n,normalizePercentEncoding:s,normalizePathEncoding:o,escapePreservingEscapes:a,reescapeHostDelimiters:u,isIPv4:h,nonSimpleDomain:c}=ui(),{SCHEMES:f,getSchemeHandler:l}=hi();function d(t,e,i,n){const s={};return n||(t=b(p(t,i),i),e=b(p(e,i),i)),!(i=i||{}).tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=r(e.path||""),s.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=r(e.path||""),s.query=e.query):(e.path?("/"===e.path[0]?s.path=r(e.path):(s.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:e.path:"/"+e.path,s.path=r(s.path)),s.query=e.query):(s.path=t.path,s.query=void 0!==e.query?e.query:t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function p(t,e){const i={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},o=Object.assign({},e),u=[],h=l(o.scheme||i.scheme);h&&h.serialize&&h.serialize(i,o),void 0!==i.path&&(o.skipEscape?i.path=s(i.path):(i.path=a(i.path),void 0!==i.scheme&&(i.path=i.path.split("%3A").join(":")))),"suffix"!==o.reference&&i.scheme&&u.push(i.scheme,":");const c=n(i);if(void 0!==c&&("suffix"!==o.reference&&u.push("//"),u.push(c),i.path&&"/"!==i.path[0]&&u.push("/")),void 0!==i.path){let t=i.path;o.absolutePath||h&&h.absolutePath||(t=r(t)),void 0===c&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),u.push(t)}return void 0!==i.query&&u.push("?",i.query),void 0!==i.fragment&&u.push("#",i.fragment),u.join("")}var m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,v=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,y=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function g(t,e){const r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1,a=!1;"suffix"===r.reference&&(t=r.scheme?r.scheme+":"+t:"//"+t);const f=t.match(v);null!==f&&-1!==f[1].indexOf("\\")&&(n.error="URI authority must not contain a literal backslash.",s=!0);const d=t.match(y);if(null!==d){const t=d[1],e=t.replace(/[\t\n\r]/g,"");e.length>=2&&("//"!==e.slice(0,2)?(n.error=n.error||"URI authority must not contain a literal backslash.",s=!0):t.length!==e.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",s=!0))}const p=t.match(m);if(p){n.scheme=p[1],n.userinfo=p[3],n.host=p[4],n.port=parseInt(p[5],10),n.path=p[6]||"",n.query=p[7],n.fragment=p[8],isNaN(n.port)&&(n.port=p[5]);const e=function(t,e){return void 0!==e[2]&&t.path&&"/"!==t.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof t.port&&(t.port<0||t.port>65535)?"URI port is malformed.":void 0}(n,p);if(void 0!==e&&(n.error=n.error||e,s=!0),n.host)if(!1===h(n.host)){const t=i(n.host);n.host=t.host.toLowerCase(),a=t.isIPV6}else a=!0;n.reference=void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||void 0!==n.query||n.path?void 0===n.scheme?"relative":void 0===n.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const f=l(r.scheme||n.scheme);if(!(r.unicodeSupport||f&&f.unicodeSupport)&&n.host&&(r.domainHost||f&&f.domainHost)&&!1===a&&c(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(t){n.error=n.error||"Host's domain name can not be converted to ASCII: "+t}if((!f||f&&!f.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),void 0!==n.host&&(n.host=u(unescape(n.host),a))),n.path&&(n.path=o(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}f&&f.parse&&f.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s}}function b(t,e){return g(t,e).parsed}function $(t,e){const{parsed:i,malformedAuthorityOrPort:r}=g(t,e);return{normalized:r?t:p(i,e),malformedAuthorityOrPort:r}}function w(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=$(t,e);return r?void 0:i}if("object"==typeof t)return p(t,e)}var _={SCHEMES:f,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return $(t,e).normalized}(t,e):"object"==typeof t&&(t=b(p(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:s}=g(t,r),{parsed:o,malformedAuthorityOrPort:a}=g(e,r);if(s||a)throw new Error(n.error||o.error||"URI is malformed.");const u=d(n,o,r,!0);return r.skipEscape=!0,p(u,r)},resolveComponent:d,equal:function(t,e,i){const r=w(t,i),n=w(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:p,parse:b};e.exports=_,e.exports.default=_,e.exports.fastUri=_})),fi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ci();e.code='require("ajv/dist/runtime/uri").default',t.default=e})),li=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ri();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=Fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});var r=ni(),n=si(),s=Je(),o=oi(),a=Fe(),u=ii(),h=We(),c=Be(),f=ai(),l=fi(),d=(t,e)=>new RegExp(t,e);d.code="new RegExp";var p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function g(t){var e,i,r,n,s,o,a,u,h,c,f,p,m,v,y,g,b,$,w,_,E,k,S,x,O;const j=t.strict,P=null===(e=t.code)||void 0===e?void 0:e.optimize,I=!0===P||void 0===P?1:P||0,C=null!==(r=null===(i=t.code)||void 0===i?void 0:i.regExp)&&void 0!==r?r:d,A=null!==(n=t.uriResolver)&&void 0!==n?n:l.default;return{strictSchema:null===(o=null!==(s=t.strictSchema)&&void 0!==s?s:j)||void 0===o||o,strictNumbers:null===(u=null!==(a=t.strictNumbers)&&void 0!==a?a:j)||void 0===u||u,strictTypes:null!==(c=null!==(h=t.strictTypes)&&void 0!==h?h:j)&&void 0!==c?c:"log",strictTuples:null!==(p=null!==(f=t.strictTuples)&&void 0!==f?f:j)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=t.strictRequired)&&void 0!==m?m:j)&&void 0!==v&&v,code:t.code?{...t.code,optimize:I,regExp:C}:{optimize:I,regExp:C},loopRequired:null!==(y=t.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(g=t.loopEnum)&&void 0!==g?g:200,meta:null===(b=t.meta)||void 0===b||b,messages:null===($=t.messages)||void 0===$||$,inlineRefs:null===(w=t.inlineRefs)||void 0===w||w,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(E=t.addUsedSchema)||void 0===E||E,validateSchema:null===(k=t.validateSchema)||void 0===k||k,validateFormats:null===(S=t.validateFormats)||void 0===S||S,unicodeRegExp:null===(x=t.unicodeRegExp)||void 0===x||x,int32range:null===(O=t.int32range)||void 0===O||O,uriResolver:A}}class b{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...g(t)};const{es5:e,lines:i}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:e,lines:i}),this.logger=function(t){if(!1===t)return x;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,s.getRules)(),$.call(this,v,t,"NOT SUPPORTED"),$.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&k.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),_.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:i}=this.opts;let r=f;"id"===i&&(r={...f},r.id=r.$id,delete r.$id),e&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let i;if("string"==typeof t){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);const r=i(e);return"$async"in i||(this.errors=i.errors),r}compile(t,e){const i=this._addSchema(t,e);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return r.call(this,t,e);async function r(t,e){await s.call(this,t.$schema);const i=this._addSchema(t,e);return i.validate||o.call(this,i)}async function s(t){t&&!this.getSchema(t)&&await r.call(this,{$ref:t},!0)}async function o(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof n.default))throw e;return a.call(this,e),await u.call(this,e.missingSchema),o.call(this,t)}}function a({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function u(t){const i=await h.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function h(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,e,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,i,r);return this}let n;if("object"==typeof t){const{schemaId:e}=this.opts;if(n=t[e],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${e} must be string`)}return e=(0,u.normalizeId)(e||n),this._checkUnique(e),this.schemas[e]=this._addSchema(t,i,e,r,!0),this}addMetaSchema(t,e,i=this.opts.validateSchema){return this.addSchema(t,e,!0,i),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let i;if(i=t.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(i,t);if(!r&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return r}getSchema(t){let e;for(;"string"==typeof(e=w.call(this,t));)t=e;if(void 0===e){const{schemaId:i}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:i});if(e=o.resolveSchema.call(this,r,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=w.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{this._cache.delete(t);let e=t[this.opts.schemaId];return e&&(e=(0,u.normalizeId)(e),delete this.schemas[e],delete this.refs[e]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let i;if("string"==typeof t)i=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=i);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(i=(e=t).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,i,e),!e)return(0,c.eachItem)(i,(t=>P.call(this,t))),this;C.call(this,e);const r={...e,type:(0,h.getJSONTypes)(e.type),schemaType:(0,h.getJSONTypes)(e.schemaType)};return(0,c.eachItem)(i,0===r.type.length?t=>P.call(this,t,r):t=>r.type.forEach((e=>P.call(this,t,r,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const i of e.rules){const e=i.rules.findIndex((e=>e.keyword===t));e>=0&&i.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:i="data"}={}){return t&&0!==t.length?t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+e+i)):"No errors"}$dataMetaSchema(t,e){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const r of e){const e=r.split("/").slice(1);let n=t;for(const t of e)n=n[t];for(const t in i){const e=i[t];if("object"!=typeof e)continue;const{$data:r}=e.definition,s=n[t];r&&s&&(n[t]=N(s))}}return t}_removeAllSchemas(t,e){for(const i in t){const r=t[i];e&&!e.test(i)||("string"==typeof r?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,e,i,r=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof t)s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let h=this._cache.get(t);if(void 0!==h)return h;i=(0,u.normalizeId)(s||i);const c=u.getSchemaRefs.call(this,t,i);return h=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(h.schema,h),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=h),r&&this.validateSchema(t,!0),h}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):o.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,t)}finally{this.opts=e}}}function $(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function w(t){return t=(0,u.normalizeId)(t),this.schemas[t]||this.refs[t]}function _(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function E(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function k(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const i=t[e];i.keyword||(i.keyword=e),this.addKeyword(i)}}}function S(){const t={...this.opts};for(const e of p)delete t[e];return t}b.ValidationError=r.default,b.MissingRefError=n.default,t.default=b;var x={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function j(t,e){const{RULES:i}=this;if((0,c.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!O.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function P(t,e,i){var r;const n=null==e?void 0:e.post;if(i&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:t})=>t===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[t]=!0,!e)return;const a={keyword:t,definition:{...e,type:(0,h.getJSONTypes)(e.type),schemaType:(0,h.getJSONTypes)(e.schemaType)}};e.before?I.call(this,o,a,e.before):o.rules.push(a),s.all[t]=a,null===(r=e.implements)||void 0===r||r.forEach((t=>this.addKeyword(t)))}function I(t,e,i){const r=t.rules.findIndex((t=>t.keyword===i));r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${i} is not defined`))}function C(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=N(e)),t.validateSchema=this.compile(e,!0))}var A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(t){return{anyOf:[t,A]}}})),di=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}})),pi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=si(),i=Ye(),r=Fe(),n=Ve(),s=oi(),o=Be(),a={keyword:"$ref",schemaType:"string",code(t){const{gen:i,schema:n,it:o}=t,{baseId:a,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===n||"#/"===n)&&a===p.baseId)return function(){if(c===p)return h(t,f,c,c.$async);const e=i.scopeValue("root",{ref:p});return h(t,r._`${e}.validate`,p,p.$async)}();const m=s.resolveRef.call(d,p,a,n);if(void 0===m)throw new e.default(o.opts.uriResolver,a,n);return m instanceof s.SchemaEnv?function(e){const i=u(t,e);h(t,i,e,e.$async)}(m):function(e){const s=i.scopeValue("schema",!0===l.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),o=i.name("valid"),a=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:s,errSchemaPath:n},o);t.mergeEvaluated(a),t.ok(o)}(m)}};function u(t,e){const{gen:i}=t;return e.validate?i.scopeValue("validate",{ref:e.validate}):r._`${i.scopeValue("wrapper",{ref:e})}.validate`}function h(t,e,s,a){const{gen:u,it:h}=t,{allErrors:c,schemaEnv:f,opts:l}=h,d=l.passContext?n.default.this:r.nil;function p(t){const e=r._`${t}.errors`;u.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${e} : ${n.default.vErrors}.concat(${e})`),u.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function m(t){var e;if(!h.opts.unevaluated)return;const i=null===(e=null==s?void 0:s.validate)||void 0===e?void 0:e.evaluated;if(!0!==h.props)if(i&&!i.dynamicProps)void 0!==i.props&&(h.props=o.mergeEvaluated.props(u,i.props,h.props));else{const e=u.var("props",r._`${t}.evaluated.props`);h.props=o.mergeEvaluated.props(u,e,h.props,r.Name)}if(!0!==h.items)if(i&&!i.dynamicItems)void 0!==i.items&&(h.items=o.mergeEvaluated.items(u,i.items,h.items));else{const e=u.var("items",r._`${t}.evaluated.items`);h.items=o.mergeEvaluated.items(u,e,h.items,r.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const n=u.let("valid");u.try((()=>{u.code(r._`await ${(0,i.callValidateCode)(t,e,d)}`),m(e),c||u.assign(n,!0)}),(t=>{u.if(r._`!(${t} instanceof ${h.ValidationError})`,(()=>u.throw(t))),p(t),c||u.assign(n,!1)})),t.ok(n)}():t.result((0,i.callValidateCode)(t,e,d),(()=>m(e)),(()=>p(e)))}t.getValidate=u,t.callRef=h,t.default=a})),mi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=di(),i=pi();t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,i.default]})),vi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=e.operators,r={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},n={message:({keyword:t,schemaCode:i})=>e.str`must be ${r[t].okStr} ${i}`,params:({keyword:t,schemaCode:i})=>e._`{comparison: ${r[t].okStr}, limit: ${i}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:i,data:n,schemaCode:s}=t;t.fail$data(e._`${n} ${r[i].fail} ${s} || isNaN(${n})`)}};t.default=s})),yi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:i,data:r,schemaCode:n,it:s}=t,o=s.opts.multipleOfPrecision,a=i.let("res"),u=o?e._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:e._`${a} !== parseInt(${a})`;t.fail$data(e._`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};t.default=i})),gi=Le((function(t){function e(t){const e=t.length;let i,r=0,n=0;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),56320==(64512&i)&&n++);return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'})),bi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=gi(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxLength"===t?"more":"fewer"} than ${i} characters`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:n,data:s,schemaCode:o,it:a}=t,u="maxLength"===n?e.operators.GT:e.operators.LT,h=!1===a.opts.unicode?e._`${s}.length`:e._`${(0,i.useFunc)(t.gen,r.default)}(${s})`;t.fail$data(e._`${h} ${u} ${o}`)}};t.default=n})),$i=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ye(),i=Be(),r=Fe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>r.str`must match pattern "${t}"`,params:({schemaCode:t})=>r._`{pattern: ${t}}`},code(t){const{gen:n,data:s,$data:o,schema:a,schemaCode:u,it:h}=t,c=h.opts.unicodeRegExp?"u":"";if(o){const{regExp:e}=h.opts.code,o="new RegExp"===e.code?r._`new RegExp`:(0,i.useFunc)(n,e),a=n.let("valid");n.try((()=>n.assign(a,r._`${o}(${u}, ${c}).test(${s})`)),(()=>n.assign(a,!1))),t.fail$data(r._`!${a}`)}else{const i=(0,e.usePattern)(t,a);t.fail$data(r._`!${i}.test(${s})`)}}};t.default=n})),wi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxProperties"===t?"more":"fewer"} than ${i} properties`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:i,data:r,schemaCode:n}=t;t.fail$data(e._`Object.keys(${r}).length ${"maxProperties"===i?e.operators.GT:e.operators.LT} ${n}`)}};t.default=i})),_i=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ye(),i=Fe(),r=Be(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>i.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>i._`{missingProperty: ${t}}`},code(t){const{gen:n,schema:s,schemaCode:o,data:a,$data:u,it:h}=t,{opts:c}=h;if(!u&&0===s.length)return;const f=s.length>=c.loopRequired;if(h.allErrors?function(){if(f||u)t.block$data(i.nil,l);else for(const i of s)(0,e.checkReportMissingProp)(t,i)}():function(){const r=n.let("missing");if(f||u){const s=n.let("valid",!0);t.block$data(s,(()=>function(r,s){t.setParams({missingProperty:r}),n.forOf(r,o,(()=>{n.assign(s,(0,e.propertyInData)(n,a,r,c.ownProperties)),n.if((0,i.not)(s),(()=>{t.error(),n.break()}))}),i.nil)}(r,s))),t.ok(s)}else n.if((0,e.checkMissingProp)(t,s,r)),(0,e.reportMissingProp)(t,r),n.else()}(),c.strictRequired){const e=t.parentSchema.properties,{definedProperties:i}=t.it;for(const t of s)void 0!==(null==e?void 0:e[t])||i.has(t)||(0,r.checkStrictMode)(h,`required property "${t}" is not defined at "${h.schemaEnv.baseId+h.errSchemaPath}" (strictRequired)`,h.opts.strictRequired)}function l(){n.forOf("prop",o,(i=>{t.setParams({missingProperty:i}),n.if((0,e.noPropertyInData)(n,a,i,c.ownProperties),(()=>t.error()))}))}}};t.default=n})),Ei=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:i})=>e.str`must NOT have ${"maxItems"===t?"more":"fewer"} than ${i} items`,params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:i,data:r,schemaCode:n}=t;t.fail$data(e._`${r}.length ${"maxItems"===i?e.operators.GT:e.operators.LT} ${n}`)}};t.default=i})),ki=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ti();e.code='require("ajv/dist/runtime/equal").default',t.default=e})),Si=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=We(),i=Fe(),r=Be(),n=ki(),s={message:({params:{i:t,j:e}})=>i.str`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>i._`{i: ${t}, j: ${e}}`},o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s,code(t){const{gen:s,data:o,$data:a,schema:u,parentSchema:h,schemaCode:c,it:f}=t;if(!a&&!u)return;const l=s.let("valid"),d=h.items?(0,e.getSchemaTypes)(h.items):[];function p(r,n){const a=s.name("item"),u=(0,e.checkDataTypes)(d,a,f.opts.strictNumbers,e.DataType.Wrong),h=s.const("indices",i._`{}`);s.for(i._`;${r}--;`,(()=>{s.let(a,i._`${o}[${r}]`),s.if(u,i._`continue`),d.length>1&&s.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),s.if(i._`typeof ${h}[${a}] == "number"`,(()=>{s.assign(n,i._`${h}[${a}]`),t.error(),s.assign(l,!1).break()})).code(i._`${h}[${a}] = ${r}`)}))}function m(e,a){const u=(0,r.useFunc)(s,n.default),h=s.name("outer");s.label(h).for(i._`;${e}--;`,(()=>s.for(i._`${a} = ${e}; ${a}--;`,(()=>s.if(i._`${u}(${o}[${e}], ${o}[${a}])`,(()=>{t.error(),s.assign(l,!1).break(h)}))))))}t.block$data(l,(function(){const e=s.let("i",i._`${o}.length`),r=s.let("j");t.setParams({i:e,j:r}),s.assign(l,!0),s.if(i._`${e} > 1`,(()=>(d.length>0&&!d.some((t=>"object"===t||"array"===t))?p:m)(e,r)))}),i._`${c} === false`),t.ok(l)}};t.default=o})),xi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=ki(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(t){const{gen:n,data:s,$data:o,schemaCode:a,schema:u}=t;o||u&&"object"==typeof u?t.fail$data(e._`!${(0,i.useFunc)(n,r.default)}(${s}, ${a})`):t.fail(e._`${u} !== ${s}`)}};t.default=n})),Oi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=ki(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(t){const{gen:n,data:s,$data:o,schema:a,schemaCode:u,it:h}=t;if(!o&&0===a.length)throw new Error("enum must have non-empty array");let c;const f=()=>null!=c?c:c=(0,i.useFunc)(n,r.default);let l;if(a.length>=h.opts.loopEnum||o)l=n.let("valid"),t.block$data(l,(function(){n.assign(l,!1),n.forOf("v",u,(t=>n.if(e._`${f()}(${s}, ${t})`,(()=>n.assign(l,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const t=n.const("vSchema",u);l=(0,e.or)(...a.map(((i,r)=>function(t,i){const r=a[i];return"object"==typeof r&&null!==r?e._`${f()}(${s}, ${t}[${i}])`:e._`${s} === ${r}`}(t,r))))}t.pass(l)}};t.default=n})),ji=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=vi(),i=yi(),r=bi(),n=$i(),s=wi(),o=_i(),a=Ei(),u=Si(),h=xi(),c=Oi();t.default=[e.default,i.default,r.default,n.default,s.default,o.default,a.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,c.default]})),Pi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Fe(),i=Be(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;Array.isArray(s)?n(t,s):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(t,r){const{gen:n,schema:s,data:o,keyword:a,it:u}=t;u.items=!0;const h=n.const("len",e._`${o}.length`);if(!1===s)t.setParams({len:r.length}),t.pass(e._`${h} <= ${r.length}`);else if("object"==typeof s&&!(0,i.alwaysValidSchema)(u,s)){const s=n.var("valid",e._`${h} <= ${r.length}`);n.if((0,e.not)(s),(()=>function(s){n.forRange("i",r.length,h,(r=>{t.subschema({keyword:a,dataProp:r,dataPropType:i.Type.Num},s),u.allErrors||n.if((0,e.not)(s),(()=>n.break()))}))}(s))),t.ok(s)}}t.validateAdditionalItems=n,t.default=r})),Ii=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Fe(),i=Be(),r=Ye(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return s(t,"additionalItems",e);n.items=!0,(0,i.alwaysValidSchema)(n,e)||t.ok((0,r.validateArray)(t))}};function s(t,r,n=t.schema){const{gen:s,parentSchema:o,data:a,keyword:u,it:h}=t;!function(t){const{opts:e,errSchemaPath:s}=h,o=n.length;e.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,i.checkStrictMode)(h,`"${u}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,e.strictTuples)}(o),h.opts.unevaluated&&n.length&&!0!==h.items&&(h.items=i.mergeEvaluated.items(s,n.length,h.items));const c=s.name("valid"),f=s.const("len",e._`${a}.length`);n.forEach(((r,n)=>{(0,i.alwaysValidSchema)(h,r)||(s.if(e._`${f} > ${n}`,(()=>t.subschema({keyword:u,schemaProp:n,dataProp:n},c))),t.ok(c))}))}t.validateTuple=s,t.default=n})),Ci=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ii();t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")}})),Ai=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r=Ye(),n=Pi();t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(t){const{schema:e,parentSchema:s,it:o}=t,{prefixItems:a}=s;o.items=!0,(0,i.alwaysValidSchema)(o,e)||(a?(0,n.validateAdditionalItems)(t,a):t.ok((0,r.validateArray)(t)))}}})),Ni=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:i}})=>void 0===i?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${i} valid item(s)`,params:({params:{min:t,max:i}})=>void 0===i?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${i}}`},code(t){const{gen:r,schema:n,parentSchema:s,data:o,it:a}=t;let u,h;const{minContains:c,maxContains:f}=s;a.opts.next?(u=void 0===c?1:c,h=f):u=1;const l=r.const("len",e._`${o}.length`);if(t.setParams({min:u,max:h}),void 0===h&&0===u)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==h&&u>h)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,i.alwaysValidSchema)(a,n)){let i=e._`${l} >= ${u}`;return void 0!==h&&(i=e._`${i} && ${l} <= ${h}`),void t.pass(i)}a.items=!0;const d=r.name("valid");function p(){const t=r.name("_valid"),i=r.let("count",0);m(t,(()=>r.if(t,(()=>function(t){r.code(e._`${t}++`),void 0===h?r.if(e._`${t} >= ${u}`,(()=>r.assign(d,!0).break())):(r.if(e._`${t} > ${h}`,(()=>r.assign(d,!1).break())),1===u?r.assign(d,!0):r.if(e._`${t} >= ${u}`,(()=>r.assign(d,!0))))}(i)))))}function m(e,n){r.forRange("i",0,l,(r=>{t.subschema({keyword:"contains",dataProp:r,dataPropType:i.Type.Num,compositeRule:!0},e),n()}))}void 0===h&&1===u?m(d,(()=>r.if(d,(()=>r.break())))):0===u?(r.let(d,!0),void 0!==h&&r.if(e._`${o}.length > 0`,p)):(r.let(d,!1),p()),t.result(d,(()=>t.reset()))}};t.default=r})),Ti=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Fe(),i=Be(),r=Ye();t.error={message:({params:{property:t,depsCount:i,deps:r}})=>e.str`must have ${1===i?"property":"properties"} ${r} when property ${t} is present`,params:({params:{property:t,depsCount:i,deps:r,missingProperty:n}})=>e._`{property: ${t},
|
|
15
15
|
missingProperty: ${n},
|
|
16
16
|
depsCount: ${i},
|
|
17
|
-
deps: ${r}}`};var n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(t){const[e,i]=function({schema:t}){const e={},i={};for(const r in t)"__proto__"!==r&&((Array.isArray(t[r])?e:i)[r]=t[r]);return[e,i]}(t);s(t,e),o(t,i)}};function s(t,i=t.schema){const{gen:n,data:s,it:o}=t;if(0===Object.keys(i).length)return;const a=n.let("missing");for(const h in i){const u=i[h];if(0===u.length)continue;const c=(0,r.propertyInData)(n,s,h,o.opts.ownProperties);t.setParams({property:h,depsCount:u.length,deps:u.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of u)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,u,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,h=n.name("valid");for(const u in e)(0,i.alwaysValidSchema)(a,e[u])||(n.if((0,r.propertyInData)(n,s,u,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:u},h);t.mergeValidEvaluated(e,h)}),(()=>n.var(h,!0))),t.ok(h))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n})),Mi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(t){const{gen:r,schema:n,data:s,it:o}=t;if((0,i.alwaysValidSchema)(o,n))return;const a=r.name("valid");r.forIn("key",s,(i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),r.if((0,e.not)(a),(()=>{t.error(!0),o.allErrors||r.break()}))})),t.ok(a)}};t.default=r})),Ri=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),i=Fe(),r=Ve(),n=Be(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>i._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:s,schema:o,parentSchema:a,data:h,errsCount:u,it:c}=t;if(!u)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=c;if(c.props=!0,"all"!==l.removeAdditional&&(0,n.alwaysValidSchema)(c,o))return;const d=(0,e.allSchemaProperties)(a.properties),p=(0,e.allSchemaProperties)(a.patternProperties);function m(t){s.code(i._`delete ${h}[${t}]`)}function v(e){if("all"===l.removeAdditional||l.removeAdditional&&!1===o)m(e);else{if(!1===o)return t.setParams({additionalProperty:e}),t.error(),void(f||s.break());if("object"==typeof o&&!(0,n.alwaysValidSchema)(c,o)){const r=s.name("valid");"failing"===l.removeAdditional?(y(e,r,!1),s.if((0,i.not)(r),(()=>{t.reset(),m(e)}))):(y(e,r),f||s.if((0,i.not)(r),(()=>s.break())))}}}function y(e,i,r){const s={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(s,i)}s.forIn("key",h,(r=>{d.length||p.length?s.if(function(r){let o;if(d.length>8){const t=(0,n.schemaRefOrVal)(c,a.properties,"properties");o=(0,e.isOwnProperty)(s,t,r)}else o=d.length?(0,i.or)(...d.map((t=>i._`${r} === ${t}`))):i.nil;return p.length&&(o=(0,i.or)(o,...p.map((n=>i._`${(0,e.usePattern)(t,n)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),t.ok(i._`${u} === ${r.default.errors}`)}};t.default=s})),Di=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ri(),i=Xe(),r=Be(),n=Ri(),s={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:s,schema:o,parentSchema:a,data:h,it:u}=t;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const c=(0,i.allSchemaProperties)(o);for(const t of c)u.definedProperties.add(t);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(c),u.props));const f=c.filter((t=>!(0,r.alwaysValidSchema)(u,o[t])));if(0===f.length)return;const l=s.name("valid");for(const e of f)d(e)?p(e):(s.if((0,i.propertyInData)(s,h,e,u.opts.ownProperties)),p(e),u.allErrors||s.else().var(l,!0),s.endIf()),t.it.definedProperties.add(e),t.ok(l);function d(t){return u.opts.useDefaults&&!u.compositeRule&&void 0!==o[t].default}function p(e){t.subschema({keyword:"properties",schemaProp:e,dataProp:e},l)}}};t.default=s})),zi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),i=Fe(),r=Be(),n=Be(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:s,schema:o,data:a,parentSchema:h,it:u}=t,{opts:c}=u,f=(0,e.allSchemaProperties)(o),l=f.filter((t=>(0,r.alwaysValidSchema)(u,o[t])));if(0===f.length||l.length===f.length&&(!u.opts.unevaluated||!0===u.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&h.properties,p=s.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,n.evaluatedPropsToName)(s,u.props));const{props:m}=u;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,r.checkStrictMode)(u,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function y(r){s.forIn("key",a,(o=>{s.if(i._`${(0,e.usePattern)(t,r)}.test(${o})`,(()=>{const e=l.includes(r);e||t.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:n.Type.Str},p),u.opts.unevaluated&&!0!==m?s.assign(i._`${m}[${o}]`,!0):e||u.allErrors||s.if((0,i.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),u.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};t.default=s})),Li=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be();t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:i,schema:r,it:n}=t;if((0,e.alwaysValidSchema)(n,r))return void t.fail();const s=i.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}}})),Ui=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xe();t.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}}})),qi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(t){const{gen:r,schema:n,parentSchema:s,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=n,h=r.let("valid",!1),u=r.let("passing",null),c=r.name("_valid");t.setParams({passing:u}),r.block((function(){a.forEach(((n,s)=>{let a;(0,i.alwaysValidSchema)(o,n)?r.var(c,!0):a=t.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},c),s>0&&r.if(e._`${c} && ${h}`).assign(h,!1).assign(u,e._`[${u}, ${s}]`).else(),r.if(c,(()=>{r.assign(h,!0),r.assign(u,s),a&&t.mergeEvaluated(a,e.Name)}))}))})),t.result(h,(()=>t.reset()),(()=>t.error(!0)))}};t.default=r})),Fi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be(),i={keyword:"allOf",schemaType:"array",code(t){const{gen:i,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=i.name("valid");r.forEach(((i,r)=>{if((0,e.alwaysValidSchema)(n,i))return;const o=t.subschema({keyword:"allOf",schemaProp:r},s);t.ok(s),t.mergeEvaluated(o)}))}};t.default=i})),Bi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be();function r(t,e){const r=t.schema[e];return void 0!==r&&!(0,i.alwaysValidSchema)(t,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:n,parentSchema:s,it:o}=t;void 0===s.then&&void 0===s.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=r(o,"then"),h=r(o,"else");if(!a&&!h)return;const u=n.let("valid",!0),c=n.name("_valid");if(function(){const e=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(e)}(),t.reset(),a&&h){const e=n.let("ifClause");t.setParams({ifClause:e}),n.if(c,f("then",e),f("else",e))}else a?n.if(c,f("then")):n.if((0,e.not)(c),f("else"));function f(i,r){return()=>{const s=t.subschema({keyword:i},c);n.assign(u,c),t.mergeValidEvaluated(s,u),r?n.assign(r,e._`${i}`):t.setParams({ifClause:i})}}t.pass(u,(()=>t.error(!0)))}}})),Vi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be();t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:i,it:r}){void 0===i.if&&(0,e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}}})),Gi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Pi(),i=Ci(),r=Ii(),n=Ai(),s=Ni(),o=Ti(),a=Mi(),h=Ri(),u=Di(),c=zi(),f=Li(),l=Ui(),d=qi(),p=Fi(),m=Bi(),v=Vi();t.default=function(t=!1){const y=[f.default,l.default,d.default,p.default,m.default,v.default,a.default,h.default,o.default,u.default,c.default];return t?y.push(i.default,n.default):y.push(e.default,r.default),y.push(s.default),y}})),Hi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,i){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:h}=t,{opts:u,errSchemaPath:c,schemaEnv:f,self:l}=h;u.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),o=r.const("fDef",e._`${s}[${a}]`),h=r.let("fType"),c=r.let("format");r.if(e._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(h,e._`${o}.type || "string"`).assign(c,e._`${o}.validate`)),(()=>r.assign(h,e._`"string"`).assign(c,o))),t.fail$data((0,e.or)(!1===u.strictSchema?e.nil:e._`${a} && !${c}`,function(){const t=f.$async?e._`(${o}.async ? await ${c}(${n}) : ${c}(${n}))`:e._`${c}(${n})`,r=e._`(typeof ${c} == "function" ? ${t} : ${c}.test(${n}))`;return e._`${c} && ${c} !== true && ${h} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==u.strictSchema)throw new Error(t());function t(){return`unknown format "${o}" ignored in schema at path "${c}"`}l.logger.warn(t())}();if(!0===s)return;const[a,h,d]=function(t){const i=t instanceof RegExp?(0,e.regexpCode)(t):u.code.formats?e._`${u.code.formats}${(0,e.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:t,code:i});return"object"!=typeof t||t instanceof RegExp?["string",t,n]:[t.type||"string",t.validate,e._`${n}.validate`]}(s);a===i&&t.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return e._`await ${d}(${n})`}return"function"==typeof h?e._`${d}(${n})`:e._`${d}.test(${n})`}())}())}};t.default=i})),Ki=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Hi();t.default=[e.default]})),Ji=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),Wi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=mi(),i=Oi(),r=Gi(),n=Ki(),s=Ji(),o=[e.default,i.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];t.default=o})),Zi=Le((function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e||(t.DiscrError=e={}))})),Xi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Zi(),r=oi(),n=si(),s=Be(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===i.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:i,tagName:r}})=>e._`{error: ${t}, tag: ${r}, tagValue: ${i}}`},code(t){const{gen:o,data:a,schema:h,parentSchema:u,it:c}=t,{oneOf:f}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=h.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const d=o.let("valid",!1),p=o.const("tag",e._`${a}${(0,e.getProperty)(l)}`);function m(i){const r=o.name("valid"),n=t.subschema({keyword:"oneOf",schemaProp:i},r);return t.mergeEvaluated(n,e.Name),r}o.if(e._`typeof ${p} == "string"`,(()=>function(){const a=function(){var t;const e={},i=a(u);let o=!0;for(let e=0;e<f.length;e++){let u=f[e];if((null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)){const t=u.$ref;if(u=r.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),u instanceof r.SchemaEnv&&(u=u.schema),void 0===u)throw new n.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==u?void 0:u.properties)||void 0===t?void 0:t[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);o=o&&(i||a(u)),h(d,e)}if(!o)throw new Error(`discriminator: "${l}" must be required`);return e;function a({required:t}){return Array.isArray(t)&&t.includes(l)}function h(t,e){if(t.const)d(t.const,e);else{if(!t.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const i of t.enum)d(i,e)}}function d(t,i){if("string"!=typeof t||t in e)throw new Error(`discriminator: "${l}" values must be unique strings`);e[t]=i}}();o.if(!1);for(const t in a)o.elseIf(e._`${p} === ${t}`),o.assign(d,m(a[t]));o.else(),t.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:l}),o.endIf()}()),(()=>t.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:l}))),t.ok(d)}};t.default=o})),Yi=Le((function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}})),Qi=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var i=li(),r=Wi(),n=Xi(),s=Yi(),o=["/properties"],a="http://json-schema.org/draft-07/schema";class h extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(t,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=h,e.exports=t=h,e.exports.Ajv=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var u=ri();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=Fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=ni();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=si();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return l.default}})})),tr=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var i=Qi(),r=Fe(),n=Ue(),s=ri(),o=Ge(),a=Ve(),h="errorMessage",u=new i.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,l=/\$\{([^}]+)\}/g,d=/^""\s*\+\s*|\s*\+\s*""$/g;var p=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:h,schemaType:["string","object"],post:!0,code(e){const{gen:p,data:m,schema:v,schemaValue:y,it:g}=e;if(!1===g.createErrors)return;const b=v,$=r.strConcat(a.default.instancePath,g.errorPath);function w(t,e){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath === ${$}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${g.errSchemaPath.length}))`)}function _(t,e){const i=[];for(const r in t){const t=e[r];f.test(t)&&i.push([r,k(t)])}return p.object(...i)}function E(t){return f.test(t)?new n._Code(n.safeStringify(t).replace(l,((t,e)=>`" + JSON.stringify(${s.getData(e,g)}) + "`)).replace(d,"")):i.stringify(t)}function k(t){return i._`function(){return ${E(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof b){const[n,s]=function(t){let e,i;for(const r in t){if("properties"===r||"items"===r)continue;const n=t[r];if("object"==typeof n){e||(e={});const t=e[r]={};for(const e in n)t[e]=[]}else i||(i={}),i[r]=[]}return[e,i]}(b);s&&function(r){const n=p.const("emErrors",i.stringify(r)),s=p.const("templates",_(r,v));p.forOf("err",a.default.vErrors,(t=>p.if(w(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${u}`,!0)))));const{singleError:h}=t;if(h){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof h?h:";"}`))),p.code(i._`${t} += ${f(e)}`),p.assign(r,i._`${r}.concat(${n}[${e}])`)})),o.reportError(e,{message:t,params:i._`{errors: ${r}}`})}else c((t=>o.reportError(e,{message:f(t),params:i._`{errors: ${n}[${t}]}`})));function c(t){p.forIn("key",n,(e=>p.if(i._`${n}[${e}].length`,(()=>t(e)))))}function f(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),n&&function(t){const r=p.const("emErrors",i.stringify(t)),n=[];for(const e in t)n.push([e,_(t[e],v[e])]);const s=p.const("templates",p.object(...n)),h=p.scopeValue("obj",{ref:c,code:i.stringify(c)}),f=p.let("emPropParams"),l=p.let("emParamsErrors");p.forOf("err",a.default.vErrors,(t=>p.if(w(t,r),(()=>{p.assign(f,i._`${h}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${u}`,!0)))})))),p.forIn("key",r,(t=>p.forIn("keyProp",i._`${r}[${t}]`,(n=>{p.assign(l,i._`${r}[${t}][${n}]`),p.if(i._`${l}.length`,(()=>{const r=p.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${n}]`);o.reportError(e,{message:i._`${r} ? ${r}() : ${y}[${t}][${n}]`,params:i._`{errors: ${l}}`})}))}))))}(n),function(t){const{props:n,items:s}=t;if(!n&&!s)return;const c=i._`typeof ${m} == "object"`,f=i._`Array.isArray(${m})`,l=p.let("emErrors");let d,g;const b=p.let("templates");function w(t,e){p.assign(l,i.stringify(t)),p.assign(b,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{w(s,v.items),p.assign(d,i.str`items`)}),(()=>{w(n,v.properties),p.assign(d,i.str`properties`)})),g=i._`[${d}]`):s?(p.if(f),w(s,v.items),g=i._`.items`):n&&(p.if(r.and(c,r.not(f))),w(n,v.properties),g=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath.indexOf(${$}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${$}.length))`),o=p.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);p.if(i._`${o} !== undefined && ${o} in ${e}`,(()=>n(o)))}))}(t,l,(e=>p.code(i._`${l}[${e}].push(${t})`).assign(i._`${t}.${u}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${b} ? ${b}[${t}]() : ${y}${g}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${$} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),p.endIf()}(function({properties:t,items:e}){const i={};if(t){i.props={};for(const e in t)i.props[e]=[]}if(e){i.items={};for(let t=0;t<e.length;t++)i.items[t]=[]}return i}(b))}const n="string"==typeof b?b:b._;n&&function(t){const n=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(t=>p.if(function(t){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,r.or(i._`${t}.instancePath === ${$}`,r.and(i._`${t}.instancePath.indexOf(${$}) === 0`,i._`${t}.instancePath[${$}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`${t}.schemaPath[${g.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${u}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:E(t),params:i._`{errors: ${n}}`})))}(n),t.keepErrors||function(){const t=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(e=>p.if(i._`!${e}.${u}`,(()=>p.code(i._`${t}.push(${e})`))))),p.assign(a.default.vErrors,t).assign(a.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};t.default=p,e.exports=p,e.exports.default=p})),er=Le((function(t){function e(t,e){return{validate:t,compare:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:e(n,s),time:e(a(!0),h),"date-time":e(f(!0),l),"iso-time":e(a(),u),"iso-date-time":e(f(),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(t){return p.test(t)&&m.test(t)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(t){if($.test(t))return!1;try{return!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(t){return v.lastIndex=0,v.test(t)},int32:{type:"number",validate:function(t){return Number.isInteger(t)&&t<=g&&t>=y}},int64:{type:"number",validate:function(t){return Number.isInteger(t)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function n(t){const e=i.exec(t);if(!e)return!1;const n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(2!==n||((o=+e[1])%4!=0||o%100==0&&o%400!=0)?r[n]:29);var o}function s(t,e){if(t&&e)return t>e?1:t<e?-1:0}var o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function a(t){return function(e){const i=o.exec(e);if(!i)return!1;const r=+i[1],n=+i[2],s=+i[3],a="-"===i[5]?-1:1,h=+(i[6]||0),u=+(i[7]||0);if(h>23||u>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-u*a,f=r-h*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function h(t,e){if(!t||!e)return;const i=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();return i&&r?i-r:void 0}function u(t,e){if(!t||!e)return;const i=o.exec(t),r=o.exec(e);return i&&r?(t=i[1]+i[2]+i[3])>(e=r[1]+r[2]+r[3])?1:t<e?-1:0:void 0}var c=/t|\s/i;function f(t){const e=a(t);return function(t){const i=t.split(c);return 2===i.length&&n(i[0])&&e(i[1])}}function l(t,e){if(!t||!e)return;const i=new Date(t).valueOf(),r=new Date(e).valueOf();return i&&r?i-r:void 0}function d(t,e){if(!t||!e)return;const[i,r]=t.split(c),[n,o]=e.split(c),a=s(i,n);return void 0!==a?a||h(r,o):void 0}var p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,y=-2147483648,g=2**31-1;function b(){return!0}var $=/[^\\]\\Z/})),ir=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Qi(),i=Fe(),r=i.operators,n={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:t,schemaCode:e})=>i.str`should be ${n[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>i._`{comparison: ${n[t].okStr}, limit: ${e}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:s,code(t){const{gen:r,data:s,schemaCode:o,keyword:a,it:h}=t,{opts:u,self:c}=h;if(!u.validateFormats)return;const f=new e.KeywordCxt(h,c.RULES.all.format.definition,"format");function l(t){return i._`${t}.compare(${s}, ${o}) ${n[a].fail} 0`}f.$data?function(){const e=r.scopeValue("formats",{ref:c.formats,code:u.code.formats}),n=r.const("fmt",i._`${e}[${f.schemaCode}]`);t.fail$data((0,i.or)(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,l(n)))}():function(){const e=f.schema,n=c.formats[e];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${e}" does not define "compare" function`);const s=r.scopeValue("formats",{key:e,ref:n,code:u.code.formats?i._`${u.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)})),rr=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var i=er(),r=ir(),n=Fe(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return h(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return h(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function h(t,e,i,r){var s,o;null!==(s=(o=t.opts.code).formats)&&void 0!==s||(o.formats=n._`require("ajv-formats/dist/formats").${r}`);for(const r of e)t.addFormat(r,i[r])}a.get=(t,e="full")=>{const r=("fast"===e?i.fastFormats:i.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}));function nr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function sr(t,e){return nr(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function or(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=sr(n,e);return i}var ar={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value",identity:"Invalid identifier for this format",iban:"Invalid IBAN",mrz:"Machine-readable zone unreadable or inconsistent"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide",identity:"Identifiant invalide pour ce format",iban:"IBAN invalide",mrz:"Zone de lecture illisible ou incohérente"}};function hr(t,e,i){return((ar[e??"en"]??ar.en)[t]??ar.en[t]??"Invalid value").replace("{value}",String(i??""))}function*ur(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*ur(r,`${e}.${i}`)}}function*cr(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*cr(e)}function fr(t){const e={};for(const i of cr(t)){const t=i.configs?.key,r=i.configs?.defaultValue;t&&void 0!==r&&!(t in e)&&(e[t]=r)}return e}function lr(t,e){if(t.configs?.key&&e)return t.unWrapData?e:e[t.configs.key]}function dr(t,e){if(t.configs?.key)return t.unWrapData?e:{[t.configs.key]:e}}var pr=(t,e)=>{if(!e.includes("."))return t[e];let i=t;for(const t of e.split(".")){if("object"!=typeof i||null===i)return;i=i[t]}return i};function mr(t,e="label",i="value"){return Array.isArray(t)?t.map((t=>{if("object"==typeof t&&null!==t){const r=t,n=pr(r,e)??pr(r,i),s=pr(r,i)??pr(r,e);return{label:String(n??""),value:String(s??"")}}return{label:String(t),value:String(t)}})).filter((t=>""!==t.label)):String(t??"").split("\n").map((t=>t.trim())).filter(Boolean).map((t=>({label:t,value:t})))}var vr={"palette.search":"Search bricks…","palette.empty":"No brick matches “{query}”","builder.undo":"Undo","builder.redo":"Redo","builder.editLocale":"Editing language","builder.copyJson":"Copy JSON","builder.importJson":"Import JSON","builder.importInvalid":"Invalid form JSON","builder.pasteHint":"Press Ctrl+V to paste a spec","builder.copied":"Copied!","builder.downloadJson":"Download .json","builder.hint":"Select a brick to edit its properties","drop.hint":"Drop a brick here","empty.title":"Your form is empty","empty.hint":"Drag a brick from the palette to get started","actions.move":"Move","actions.duplicate":"Duplicate","actions.delete":"Delete","stepper.back":"← Back","stepper.next":"Next →","stepper.submit":"Submit","form.submit":"Submit","field.required":"(required)","form.invalid":"This form has missing or invalid fields","panel.cfg.validateSteps":"Validate each step","panel.cfg.allowStepClick":"Allow clicking steps to jump","panel.cfg.showSubmit":"Submit button on last step","panel.cfg.validateTabs":"Validate tab before leaving it","signature.clear":"Clear","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Rules","panel.key":"Key","panel.label":"Label","panel.placeholder":"Placeholder","panel.prefix":"Prefix","panel.suffix":"Suffix","panel.accept":"Accepted file types","panel.mask":"Input mask (9=digit, a=letter, *=any)","panel.uploadUrl":"Upload URL","panel.cfg.multiple":"Allow multiple files","panel.optionsSource":"Options source","panel.options":"Options (one per line)","panel.content":"Content","panel.dataKey":"Data key","panel.url":"URL","panel.responsePath":"Response path (optional)","panel.headers":"Headers ({token} reads form data)","panel.searchParam":"Server search param","panel.labelKey":"Label key","panel.valueKey":"Value key","panel.errorMessage":"Error message","panel.required":"Required","panel.minLength":"Min length","panel.maxLength":"Max length","panel.min":"Min","panel.max":"Max","panel.pattern":"Pattern (regex)","panel.minItems":"Min items","panel.maxItems":"Max items","panel.emailFormat":"Email format","panel.urlFormat":"URL format","panel.custom":"Custom (JavaScript)","panel.fallbackMessage":"Fallback message","panel.styleProperty":"property","panel.styleValue":"value","file.choose":"Choose a file…","file.uploading":"Uploading…","file.remove":"Remove file","file.addAnother":"+ Add a file","address.street":"Street","address.city":"City","address.zip":"Postal code","address.country":"Country","grid.addRow":"+ Add row","grid.moveUp":"Move row up","grid.moveDown":"Move row down","grid.removeRow":"Remove row","grid.empty":"No rows yet","grid.columns":"Row template","select.search":"Search…","select.empty":"No options","select.clear":"Clear","rules.when":"When","rules.then":"Then","rules.addRule":"+ Add rule","rules.addEffect":"+ Effect","rules.removeRule":"Remove rule","rules.removeEffect":"Remove effect","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Inputs","category.Layout":"Layout","category.Data":"Data","category.Geo":"Map","brick.text.name":"Text","brick.email.name":"Email","brick.password.name":"Password","brick.url.name":"URL","brick.phone.name":"Phone","brick.textarea.name":"Text area","brick.number.name":"Number","brick.date.name":"Date","brick.time.name":"Time","brick.datetime.name":"Date / Time","brick.select.name":"Select","brick.multi-select.name":"Multi select","brick.radio.name":"Radio","brick.select-boxes.name":"Select boxes","brick.checkbox.name":"Checkbox","brick.tags.name":"Tags","brick.signature.name":"Signature","brick.data-grid.name":"Data grid","brick.address.name":"Address","brick.file.name":"File","brick.hidden.name":"Hidden","brick.content.name":"Content","brick.recap.name":"Recap","brick.nested-form.name":"Nested form","brick.code.name":"Code","nestedForm.ref":"Referenced form","nestedForm.missing":"Set the specRef config to reference a form.","nestedForm.loading":"Loading nested forms…","panel.specRef":"Referenced form (specRef)","panel.optionsRef":"Options catalog (optionsRef)","recap.empty":"Nothing to summarize yet.","recap.yes":"Yes","recap.no":"No","panel.cfg.showEmpty":"Show empty fields","panel.cfg.groupBySections":"Group by section","brick.group.name":"Group","brick.row.name":"Row","brick.column.name":"Column","brick.stepper.name":"Stepper","brick.tabs.name":"Tabs","review.incorrect":"Incorrect","review.comment":"Comment for the person who corrects it","review.flagged":"To correct","review.previous":"Flagged in the previous review","variables.empty":"No matching variable","geo.latitude":"Latitude","geo.longitude":"Longitude","geo.points":"points","geo.clear":"Clear","geo.hintPoint":"Click the map to place the point, drag it to move it.","geo.hintArea":"Click the map to add points, drag one to move it, right-click to remove it.","geo.unavailable":"Map unavailable","geo.nativeReadOnly":"Drawn on the web version","panel.center":"Initial center (lat, lng)","panel.zoom":"Initial zoom","panel.height":"Height (px)","panel.tileUrl":"Tile URL","panel.shape":"Shape (polygon or line)","panel.searchUrl":"Geocoding URL ({q} = query)","panel.countryCodes":"Country codes (bj, tg)","address.search":"Search an address","address.searching":"Searching…","address.located":"Address located","address.notLocated":"Address not located: pick a match to place it","address.noResult":"No matching address","address.unavailable":"Address search unavailable","layer.pick":"Choose a zone…","layer.pickMany":"Click the zones on the map","layer.hint":"Click a zone on the map to select it","layer.unavailable":"Reference layer unavailable","panel.layerUrl":"Reference layer URL (GeoJSON)","panel.codeProperty":"Code property","panel.nameProperty":"Name property","panel.idFormat":"Identifier format (fr-nir, bj-npi, digits-10…)","mrz.placeholder":"Paste or type the two or three lines of the machine-readable zone","mrz.unreadable":"Zone not recognised: 2 lines of 44 (passport) or 3 lines of 30 (identity card)","mrz.invalid":"Check digits do not match for:","mrz.documentNumber":"Document number","mrz.nationality":"Nationality","mrz.surname":"Surname","mrz.givenNames":"Given names","mrz.birthDate":"Date of birth","mrz.sex":"Sex","mrz.expiryDate":"Expiry date","category.Identity":"Identity","category.Finance":"Finance","money.amount":"Amount","money.currency":"Currency","panel.currencies":"Currencies offered (XOF, EUR, USD)","panel.currency":"Default currency"},yr={"palette.search":"Rechercher une brique…","palette.empty":"Aucune brique ne correspond à « {query} »","builder.undo":"Annuler","builder.editLocale":"Langue d'édition","builder.redo":"Rétablir","builder.copyJson":"Copier le JSON","builder.importJson":"Importer le JSON","builder.importInvalid":"JSON de formulaire invalide","builder.pasteHint":"Collez avec Ctrl+V pour importer une spec","builder.copied":"Copié !","builder.downloadJson":"Télécharger le .json","builder.hint":"Sélectionnez une brique pour éditer ses propriétés","drop.hint":"Déposez une brique ici","empty.title":"Votre formulaire est vide","empty.hint":"Glissez une brique depuis la palette pour commencer","actions.move":"Déplacer","actions.duplicate":"Dupliquer","actions.delete":"Supprimer","stepper.back":"← Précédent","stepper.next":"Suivant →","stepper.submit":"Envoyer","form.submit":"Envoyer","field.required":"(obligatoire)","form.invalid":"Ce formulaire a des champs manquants ou invalides","panel.cfg.validateSteps":"Valider chaque étape","panel.cfg.allowStepClick":"Autoriser le saut d’étapes au clic","panel.cfg.showSubmit":"Bouton d’envoi à la dernière étape","panel.cfg.validateTabs":"Valider l’onglet avant de le quitter","signature.clear":"Effacer","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Règles","panel.key":"Clé","panel.label":"Libellé","panel.placeholder":"Placeholder","panel.prefix":"Préfixe","panel.suffix":"Suffixe","panel.accept":"Types de fichiers acceptés","panel.mask":"Masque de saisie (9=chiffre, a=lettre, *=tout)","panel.uploadUrl":"URL d'upload","panel.cfg.multiple":"Autoriser plusieurs fichiers","panel.optionsSource":"Source des options","panel.options":"Options (une par ligne)","panel.content":"Contenu","panel.dataKey":"Clé de données","panel.url":"URL","panel.responsePath":"Chemin dans la réponse (optionnel)","panel.headers":"En-têtes ({token} lit les données du formulaire)","panel.searchParam":"Paramètre de recherche serveur","panel.labelKey":"Clé du libellé","panel.valueKey":"Clé de la valeur","panel.errorMessage":"Message d'erreur","panel.required":"Obligatoire","panel.minLength":"Longueur min","panel.maxLength":"Longueur max","panel.min":"Min","panel.max":"Max","panel.pattern":"Motif (regex)","panel.minItems":"Éléments min","panel.maxItems":"Éléments max","panel.emailFormat":"Format email","panel.urlFormat":"Format URL","panel.custom":"Personnalisé (JavaScript)","panel.fallbackMessage":"Message par défaut","panel.styleProperty":"propriété","panel.styleValue":"valeur","file.choose":"Choisir un fichier…","file.uploading":"Envoi en cours…","file.remove":"Retirer le fichier","file.addAnother":"+ Ajouter un fichier","address.street":"Rue","address.city":"Ville","address.zip":"Code postal","address.country":"Pays","grid.addRow":"+ Ajouter une ligne","grid.moveUp":"Monter la ligne","grid.moveDown":"Descendre la ligne","grid.removeRow":"Supprimer la ligne","grid.empty":"Aucune ligne","grid.columns":"Modèle de ligne","select.search":"Rechercher…","select.empty":"Aucune option","select.clear":"Effacer","rules.when":"Quand","rules.then":"Alors","rules.addRule":"+ Ajouter une règle","rules.addEffect":"+ Effet","rules.removeRule":"Supprimer la règle","rules.removeEffect":"Supprimer l'effet","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Champs","category.Layout":"Mise en page","category.Data":"Données","category.Geo":"Carte","brick.text.name":"Texte","brick.email.name":"Email","brick.password.name":"Mot de passe","brick.url.name":"URL","brick.phone.name":"Téléphone","brick.textarea.name":"Zone de texte","brick.number.name":"Nombre","brick.date.name":"Date","brick.time.name":"Heure","brick.datetime.name":"Date / Heure","brick.select.name":"Liste déroulante","brick.multi-select.name":"Sélection multiple","brick.radio.name":"Boutons radio","brick.select-boxes.name":"Cases à cocher","brick.checkbox.name":"Case à cocher","brick.tags.name":"Étiquettes","brick.signature.name":"Signature","brick.data-grid.name":"Grille de données","brick.address.name":"Adresse","brick.file.name":"Fichier","brick.hidden.name":"Caché","brick.content.name":"Contenu","brick.recap.name":"Récapitulatif","brick.nested-form.name":"Formulaire imbriqué","brick.code.name":"Code","nestedForm.ref":"Formulaire référencé","nestedForm.missing":"Renseignez la config specRef pour référencer un formulaire.","nestedForm.loading":"Chargement des formulaires imbriqués…","panel.specRef":"Formulaire référencé (specRef)","panel.optionsRef":"Catalogue d'options (optionsRef)","recap.empty":"Rien à récapituler pour le moment.","recap.yes":"Oui","recap.no":"Non","panel.cfg.showEmpty":"Afficher les champs vides","panel.cfg.groupBySections":"Regrouper par section","brick.group.name":"Groupe","brick.row.name":"Ligne","brick.column.name":"Colonne","brick.stepper.name":"Étapes","brick.tabs.name":"Onglets","review.incorrect":"Incorrect","review.comment":"Commentaire pour la personne qui corrige","review.flagged":"À corriger","review.previous":"Signalé lors de la revue précédente","variables.empty":"Aucune variable ne correspond","geo.latitude":"Latitude","geo.longitude":"Longitude","geo.points":"points","geo.clear":"Effacer","geo.hintPoint":"Cliquez sur la carte pour placer le point, glissez-le pour le déplacer.","geo.hintArea":"Cliquez sur la carte pour ajouter des points, glissez-en un pour le déplacer, clic droit pour le retirer.","geo.unavailable":"Carte indisponible","geo.nativeReadOnly":"Tracé sur la version web","panel.center":"Centre initial (lat, lng)","panel.zoom":"Zoom initial","panel.height":"Hauteur (px)","panel.tileUrl":"URL des tuiles","panel.shape":"Forme (polygon ou line)","panel.searchUrl":"URL de géocodage ({q} = recherche)","panel.countryCodes":"Codes pays (bj, tg)","address.search":"Rechercher une adresse","address.searching":"Recherche…","address.located":"Adresse localisée","address.notLocated":"Adresse non localisée : choisissez une proposition pour la placer","address.noResult":"Aucune adresse ne correspond","address.unavailable":"Recherche d’adresse indisponible","layer.pick":"Choisir une zone…","layer.pickMany":"Cliquez les zones sur la carte","layer.hint":"Cliquez une zone sur la carte pour la choisir","layer.unavailable":"Couche de référence indisponible","panel.layerUrl":"URL de la couche de référence (GeoJSON)","panel.codeProperty":"Propriété du code","panel.nameProperty":"Propriété du nom","panel.idFormat":"Format de l’identifiant (fr-nir, bj-npi, digits-10…)","mrz.placeholder":"Collez ou saisissez les deux ou trois lignes de la zone de lecture","mrz.unreadable":"Zone non reconnue : 2 lignes de 44 (passeport) ou 3 lignes de 30 (carte d’identité)","mrz.invalid":"Chiffres de contrôle incohérents pour :","mrz.documentNumber":"Numéro du document","mrz.nationality":"Nationalité","mrz.surname":"Nom","mrz.givenNames":"Prénoms","mrz.birthDate":"Date de naissance","mrz.sex":"Sexe","mrz.expiryDate":"Date d’expiration","category.Identity":"Identité","category.Finance":"Finance","money.amount":"Montant","money.currency":"Devise","panel.currencies":"Devises proposées (XOF, EUR, USD)","panel.currency":"Devise par défaut"},gr=Symbol.for("formkrafter.i18n"),br=globalThis,$r=br[gr]??={current:{...vr}};function wr(t={}){$r.current={...vr,...t}}function _r(t,e){let i=$r.current[t]??t;for(const[t,r]of Object.entries(e??{}))i=i.replace(`{${t}}`,String(r));return i}function Er(t,e){return $r.current[t]??e}var kr=new Set(["__proto__","constructor","prototype"]);class Sr{value;constructor(t){this.value=t}}var xr=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},jr=t=>{if("number"==typeof t)return t;const e=String(t);if(kr.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Or=(t,e)=>({object:Pr(t,e.object),prop:jr(e.computed?Pr(t,e.property):e.property.name),optional:!0===e.optional}),Pr=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Pr(t,i);if(e instanceof Sr)return e}return;case"ReturnStatement":return new Sr(e.argument?Pr(t,e.argument):void 0);case"IfStatement":return Pr(t,e.test)?Pr(t,e.consequent):e.alternate?Pr(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");xr(t,e.name,i.init?Pr(t,i.init):void 0)}return;case"ExpressionStatement":return void Pr(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Pr(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Pr(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Or(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Pr(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Pr(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Or(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Pr(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},h=Pr(a,r);return t.steps=a.steps,h instanceof Sr?h.value:!0===e.expression?h:void 0}}case"BinaryExpression":{const i=Pr(t,e.left),r=Pr(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Pr(t,e.left);switch(e.operator){case"&&":return i&&Pr(t,e.right);case"||":return i||Pr(t,e.right);case"??":return i??Pr(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Pr(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Pr(t,e.test)?Pr(t,e.consequent):Pr(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Pr(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Pr(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Pr(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Pr(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(jr(t))]=r;continue}const e=r.key,n=jr(r.computed?Pr(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Pr(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},Ir={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite};function Cr(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let i=t;for(const t of e.split(".")){if(null===i||"object"!=typeof i)return;if(!Object.prototype.hasOwnProperty.call(i,t))return;i=i[t]}return i}function Ar(t,e){return t.replace(/\{([\w.]+)\}/g,((t,i)=>{const r=e&&Cr(e,i);return null==r?"":String(r)}))}function Nr(t,e){if("string"!=typeof t||!t.trim())return;const i={};for(const r of t.split("\n")){const t=r.indexOf(":");if(t<=0)continue;const n=r.slice(0,t).trim(),s=Ar(r.slice(t+1).trim(),e);n&&(i[n]=s)}return Object.keys(i).length?i:void 0}function Tr(t,e,i){if(!i)return t;const r=t.includes("?")?"&":"?";return`${t}${r}${encodeURIComponent(e)}=${encodeURIComponent(i)}`}class Mr{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchSpec(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load spec "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}class Rr{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchOptions(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load options "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}var Dr=Symbol.for("formkrafter.core.services"),zr=globalThis,Lr=zr[Dr]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Xt(t,e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Xt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...Ir,...e})),new Map]},n=Pr(r,i);return n instanceof Sr?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}|${e?.path??""}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((i=>function(t,e,i){if(i){const r=null!==t&&"object"==typeof t?Cr(t,i):void 0;if(!Array.isArray(r))throw new Error(`Data source has no array at "${i}": ${e}`);return r}if(Array.isArray(t))return t;if(null!==t&&"object"==typeof t){const e=t.data;if(Array.isArray(e))return e}throw new Error(`Data source did not return an array: ${e}`)}(i,t,e?.path))).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}},specSourceService:new Mr,optionSourceService:new Rr};Lr.specSourceService??=new Mr,Lr.optionSourceService??=new Rr;var Ur=(t,e)=>{try{return Lr.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},qr=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Ur(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Ur(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Fr=(t,e)=>{if(Array.isArray(e))return e.map((e=>Fr(t,e))).filter(Boolean).join(", ");if(!0===e)return Er("recap.yes","Yes");if(!1===e)return Er("recap.no","No");if(e&&"object"==typeof e)return"string"==typeof e.name&&"url"in e?e.name:Object.values(e).filter((t=>"string"==typeof t&&t)).join(" ");const i=String(e??"");if(null!=t.configs?.options){const e=mr(t.configs.options,"string"==typeof t.configs.labelKey?t.configs.labelKey:"label","string"==typeof t.configs.valueKey?t.configs.valueKey:"value").find((t=>t.value===i));if(e)return e.label}return i},Br=t=>null==t||""===t||Array.isArray(t)&&0===t.length,Vr=(t,e)=>String(sr(t.configs?.label,e)??t.name??t.configs?.key??""),Gr=t=>{const e=[];for(const i of t.children??[]){const t=i.configs?.key;"input"===i.type&&t&&!t.startsWith("_")&&e.push(i)}return e},Hr=(t,e,i,r,n=!1)=>{if(!t)return[];const s=[];for(const o of t.children??[]){if("recap"===o.id||"action"===o.type)continue;if(!0===qr(o.rules,e).hidden)continue;const t=o.configs?.key,a=Vr(o,i);if("collection"===o.type){const n=t&&Array.isArray(e?.[t])?e[t]:[];if(!n.length&&!r)continue;const h=Gr(o);s.push({kind:"collection",label:a,columns:h.map((t=>Vr(t,i))),rows:n.map((t=>h.map((e=>{const i=t?.[e.configs.key];return Br(i)?"—":Fr(e,i)}))))});continue}if("panel"===o.type){const t=sr(o.configs?.label,i);if(n&&"string"==typeof t&&t.trim()){const n=Hr(o,e,i,r);n.length&&(s.push({kind:"section",label:t}),s.push(...n));continue}s.push(...Hr(o,e,i,r,n));continue}if("input"!==o.type||!t||t.startsWith("_"))continue;const h=e?.[t];Br(h)&&!r||s.push({kind:"field",label:a,value:Br(h)?"—":Fr(o,h)})}return s},Kr=t=>t.replace(/[\s.-]/g,"").toUpperCase();function Jr(t){if(!/^[0-9]+$/.test(t))return!1;let e=0;for(let i=0;i<t.length;i++){let r=Number(t[t.length-1-i]);i%2==1&&(r*=2,r>9&&(r-=9)),e+=r}return e%10==0}function Wr(t,e){if("fr-nir"===t)return function(t){const e=Kr(t);if(!/^[12][0-9]{2}(0[1-9]|1[0-2]|[2-9][0-9])(2A|2B|[0-9]{2})[0-9]{6}[0-9]{2}$/.test(e))return!1;const i=e.slice(0,13).replace("2A","19").replace("2B","18");return Number(e.slice(13))===97-Number(BigInt(i)%97n)}(e);if("bj-npi"===t)return function(t){return/^[0-9]{10}$/.test(Kr(t))}(e);if("fr-siren"===t)return function(t){const e=Kr(t);return/^[0-9]{9}$/.test(e)&&Jr(e)}(e);if("fr-siret"===t)return function(t){const e=Kr(t);return/^[0-9]{14}$/.test(e)&&Jr(e)}(e);if("bj-ifu"===t)return function(t){return/^[0-9]{13}$/.test(Kr(t))}(e);if("iban"===t)return function(t){const e=Kr(t);if(!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/.test(e))return!1;const i=(e.slice(4)+e.slice(0,4)).replace(/[A-Z]/g,(t=>String(t.charCodeAt(0)-55)));return 1===Number(BigInt(i)%97n)}(e);const i=/^digits-([0-9]{1,3})$/.exec(t);return i?function(t,e){return new RegExp(`^[0-9]{${e}}$`).test(Kr(t))}(e,Number(i[1])):e.trim().length>0}var Zr=t=>Kr(t).replace(/(.{4})(?=.)/g,"$1 "),Xr=[7,3,1],Yr=(t,e)=>/[0-9]/.test(e)&&function(t){let e=0;for(let r=0;r<t.length;r++)e+=("<"===(i=t[r])?0:/[0-9]/.test(i)?Number(i):/[A-Z]/.test(i)?i.charCodeAt(0)-55:0)*Xr[r%3];var i;return e%10}(t)===Number(e),Qr=t=>t.replace(/</g," ").trim().replace(/\s+/g," "),tn=t=>{const[e="",i=""]=t.split("<<");return{surname:Qr(e),givenNames:Qr(i)}},en=(t,e)=>{if(!/^[0-9]{6}$/.test(t))return null;const i=Number(t.slice(0,2)),r=t.slice(2,4),n=t.slice(4,6),s=(new Date).getFullYear();let o=100*Math.floor(s/100)+i;return"birth"===e&&o>s&&(o-=100),"expiry"===e&&o<s-20&&(o+=100),`${o}-${r}-${n}`},rn=t=>"M"===t?"M":"F"===t?"F":"X";function nn(t){const e=function(t){return t.split(/\r?\n/).map((t=>t.replace(/\s+/g,"").toUpperCase())).filter((t=>t.length>0))}(t);return 2===e.length&&e.every((t=>44===t.length))?function(t,e,i){const r=[],n=e.slice(0,9);Yr(n,e[9])||r.push("documentNumber");const s=e.slice(13,19);Yr(s,e[19])||r.push("birthDate");const o=e.slice(21,27);Yr(o,e[27])||r.push("expiryDate");const a=e.slice(28,42);a.replace(/</g,"")&&!Yr(a,e[42])&&r.push("optional");const h=e.slice(0,10)+e.slice(13,20)+e.slice(21,43);return Yr(h,e[43])||r.push("composite"),{raw:i,format:"TD3",documentType:Qr(t.slice(0,2)),issuingCountry:Qr(t.slice(2,5)),documentNumber:Qr(n),nationality:Qr(e.slice(10,13)),...tn(t.slice(5)),birthDate:en(s,"birth"),sex:rn(e[20]),expiryDate:en(o,"expiry"),optional:Qr(a),valid:0===r.length,errors:r}}(e[0],e[1],t):3===e.length&&e.every((t=>30===t.length))?function(t,e,i,r){const n=[],s=t.slice(5,14);Yr(s,t[14])||n.push("documentNumber");const o=e.slice(0,6);Yr(o,e[6])||n.push("birthDate");const a=e.slice(8,14);Yr(a,e[14])||n.push("expiryDate");const h=t.slice(5,30)+e.slice(0,7)+e.slice(8,15)+e.slice(18,29);return Yr(h,e[29])||n.push("composite"),{raw:r,format:"TD1",documentType:Qr(t.slice(0,2)),issuingCountry:Qr(t.slice(2,5)),documentNumber:Qr(s),nationality:Qr(e.slice(15,18)),...tn(i),birthDate:en(o,"birth"),sex:rn(e[7]),expiryDate:en(a,"expiry"),optional:Qr(t.slice(15,30)+e.slice(18,29)),valid:0===n.length,errors:n}}(e[0],e[1],e[2],t):null}var sn=t=>Object.entries(t??{}).filter((([,t])=>!0===t?.incorrect)).map((([t])=>t)),on=(t,e)=>{const i=e(t),r=t.children?.map((t=>on(t,e)));if(i===t.configs&&r===t.children)return t;const n={...t};return void 0===i?delete n.configs:n.configs=i,r&&(n.children=r),n};function an(t){return on(t,(t=>t.configs?.uid?t.configs:{...t.configs,uid:crypto.randomUUID()}))}function hn(t){return on(t,(t=>{if(!t.configs||!("uid"in t.configs))return t.configs;const{uid:e,...i}=t.configs;return Object.keys(i).length>0?i:void 0}))}var un=(t,e)=>Array.isArray(t)?t.map((t=>un(t,e))):(t=>null!=t&&"object"==typeof t&&!Array.isArray(t)&&"string"==typeof t.type&&"string"==typeof t.id)(t)?hn(t):e.endsWith("/configs")&&null!=t&&"object"==typeof t?(t=>{const{uid:e,...i}=t;return i})(t):t;function cn(t){return t.map((t=>"value"in t?{...t,value:un(t.value,t.path)}:t))}class fn{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var ln=ze(Qi()),dn=ze(tr()),pn=ze(rr()),mn=new ln.Ajv({allErrors:!0});pn.default(mn,["email","uri"]),dn.default(mn);for(const t of["fr-nir","bj-npi","fr-siren","fr-siret","bj-ifu","iban",...Array.from({length:20},((t,e)=>`digits-${e+1}`))])mn.addFormat(`identity-${t}`,(e=>Wr(t,e)));mn.addKeyword({keyword:"mrzValid",type:"object",schemaType:"boolean",validate:(t,e)=>!t||!0===e?.valid});var vn=new WeakMap,yn=new WeakMap,gn=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?gn(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},bn=(t,e,i,r)=>{const n={},s=((t,e)=>{let i=vn.get(t);i||(i=new Map,vn.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=sr(t,e);return"string"==typeof i?i:void 0};for(const o of cr(t)){const t=o.configs?.key,a=!0===o.configs?.multiple&&"object"===o.dataType?"array":o.dataType;if(!t||!a||"void"===a)continue;const h=o.validations?.find((t=>"required"===t.validator)),u={type:a,nullable:!h},c={type:hr("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??hr(i,e,r);"minLength"===i&&null!=r?(u.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(u.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(u.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(u.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(u.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(u.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(u.maxItems=Number(r),c.maxItems=n):"email"===i?(u.format="email",c.format=n):"url"===i&&(u.format="uri",c.format=n)}"iban"===o.id&&(u.format="identity-iban",c.format=hr("iban",e)),"national-id"!==o.id&&"tax-id"!==o.id||"string"!=typeof o.configs?.idFormat||!o.configs.idFormat||(u.format=`identity-${o.configs.idFormat}`,c.format=hr("identity",e)),"mrz"===o.id&&(u.mrzValid=!0,c.mrzValid=hr("mrz",e)),u.errorMessage=c,i[t]=u,h&&(r.push(t),n[t]=s(h.message)??hr("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=mn.compile(s)}catch(e){return void((t,e)=>{const i=e instanceof Error?e.message:String(e);yn.set(t,`the validation schema failed to compile, so no rule was enforced: ${i}`)})(t,e)}i.set(r,n)}return n})(t,i);if(s&&!s(e))for(const t of s.errors??[]){const e=gn(t);e&&!(e in n)&&t.message&&(n[e]=t.message)}for(const[r,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of cr(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Ur(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=sr(s.message,i);r[t]="string"==typeof e?e:hr("custom",i)}}}return r})(t,e,i)))r in n||(n[r]=s);const o=r??("object"==typeof e&&null!==e?e:void 0);for(const e of((t,e)=>{const i=new Set,r=(t,n)=>{const s=n||!!t.rules?.length&&!0===qr(t.rules,e).hidden,o=t.configs?.key;if(s&&o&&i.add(o),"collection"!==t.type)for(const e of t.children??[])r(e,s)};return r(t,!1),i})(t,o))delete n[e];return{valid:0===Object.keys(n).length,errors:n}};function $n(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function wn(t,e){const[i,...r]=e.split(".");if("0"!==i)return;let n=t;for(const t of r){if(!/^\d+$/.test(t))return;n=n?.children?.[Number(t)]}return n}var _n=(Ie??Ce).applyPatch,En=(t,e,i)=>({spec:_n(t,e,!0,!1).newDocument,patches:e,inverse:i}),kn=(t,e)=>{const i=wn(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},Sn=(t,e)=>({pointer:$n(e),brick:kn(t,e)}),xn=t=>JSON.parse(JSON.stringify(t));function jn(t,e,i,r){const n=kn(t,i),s=$n(i),o=xn(e);if(!n.children){const e=`${s}/children`;return En(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return En(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function On(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=kn(t,e),r=$n(e);return En(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function Pn(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=kn(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],h=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),u=[...s];if(h){if(u[o]===a&&u.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);u[o]>a&&(u[o]-=1)}const c=$n(e),f=$n(u.join("."));return En(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var In=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(In)}:{}});function Cn(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=kn(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=$n([...r.slice(0,-1),String(n)].join(".")),o=In(xn(i));return En(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var An=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?En(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):En(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function Nn(t,e,i){const{pointer:r,brick:n}=Sn(t,e),s={...n.configs,...i};return An(t,r,"configs",s,n.configs)}function Tn(t,e,i){const{pointer:r,brick:n}=Sn(t,e),s={...n.styles,...i};return An(t,r,"styles",s,n.styles)}function Mn(t,e,i){const{pointer:r,brick:n}=Sn(t,e);return An(t,r,"validations",i,n.validations)}function Rn(t,e,i){const{pointer:r,brick:n}=Sn(t,e);return An(t,r,"rules",i,n.rules)}class Dn{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),_n(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),_n(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}var zn=t=>"nested-form"===t.id&&"string"==typeof t.configs?.specRef,Ln=t=>{if(!t)return!1;for(const{brick:e}of ur(t))if(zn(e)&&e.configs?.specRef)return!0;return!1};async function Un(t,e={}){const i=e.specSourceService??Lr.specSourceService,r=e.maxDepth??5,n=async(t,e)=>{if(zn(t)&&t.configs?.specRef){const s=String(t.configs.specRef);if(e.includes(s))throw new Error(`Circular nested form reference: ${[...e,s].join(" → ")}`);if(e.length>=r)throw new Error(`Nested forms exceed the maximum depth of ${r} (${s})`);const o=await i.fetchSpec(s),a=await n(structuredClone(o),[...e,s]);return{type:"panel",id:"group",name:t.name,configs:{...t.configs,label:t.configs.label??a.name},styles:t.styles,rules:t.rules,children:a.children??[]}}return t.children?.length?{...t,children:await Promise.all(t.children.map((t=>n(t,e))))}:t};return n(structuredClone(t),[])}export{nr as A,Ar as B,Tr as C,Nr as D,mr as E,Ur as F,cr as G,fn as H,Hr as I,sr as J,nn as K,Zr as L,wr as M,yr as N,Dn as S,_r as a,Er as b,qr as c,lr as d,an as e,sn as f,t as g,jn as h,wn as i,On as j,Cn as k,Tn as l,Pn as m,Mn as n,Rn as o,ur as p,cn as q,or as r,Lr as s,hn as t,Nn as u,bn as v,dr as w,fr as x,Ln as y,Un as z}
|
|
17
|
+
deps: ${r}}`};var n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(t){const[e,i]=function({schema:t}){const e={},i={};for(const r in t)"__proto__"!==r&&((Array.isArray(t[r])?e:i)[r]=t[r]);return[e,i]}(t);s(t,e),o(t,i)}};function s(t,i=t.schema){const{gen:n,data:s,it:o}=t;if(0===Object.keys(i).length)return;const a=n.let("missing");for(const u in i){const h=i[u];if(0===h.length)continue;const c=(0,r.propertyInData)(n,s,u,o.opts.ownProperties);t.setParams({property:u,depsCount:h.length,deps:h.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of h)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,h,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,u=n.name("valid");for(const h in e)(0,i.alwaysValidSchema)(a,e[h])||(n.if((0,r.propertyInData)(n,s,h,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:h},u);t.mergeValidEvaluated(e,u)}),(()=>n.var(u,!0))),t.ok(u))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n})),Mi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(t){const{gen:r,schema:n,data:s,it:o}=t;if((0,i.alwaysValidSchema)(o,n))return;const a=r.name("valid");r.forIn("key",s,(i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),r.if((0,e.not)(a),(()=>{t.error(!0),o.allErrors||r.break()}))})),t.ok(a)}};t.default=r})),Ri=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ye(),i=Fe(),r=Ve(),n=Be(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>i._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:s,schema:o,parentSchema:a,data:u,errsCount:h,it:c}=t;if(!h)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=c;if(c.props=!0,"all"!==l.removeAdditional&&(0,n.alwaysValidSchema)(c,o))return;const d=(0,e.allSchemaProperties)(a.properties),p=(0,e.allSchemaProperties)(a.patternProperties);function m(t){s.code(i._`delete ${u}[${t}]`)}function v(e){if("all"===l.removeAdditional||l.removeAdditional&&!1===o)m(e);else{if(!1===o)return t.setParams({additionalProperty:e}),t.error(),void(f||s.break());if("object"==typeof o&&!(0,n.alwaysValidSchema)(c,o)){const r=s.name("valid");"failing"===l.removeAdditional?(y(e,r,!1),s.if((0,i.not)(r),(()=>{t.reset(),m(e)}))):(y(e,r),f||s.if((0,i.not)(r),(()=>s.break())))}}}function y(e,i,r){const s={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(s,i)}s.forIn("key",u,(r=>{d.length||p.length?s.if(function(r){let o;if(d.length>8){const t=(0,n.schemaRefOrVal)(c,a.properties,"properties");o=(0,e.isOwnProperty)(s,t,r)}else o=d.length?(0,i.or)(...d.map((t=>i._`${r} === ${t}`))):i.nil;return p.length&&(o=(0,i.or)(o,...p.map((n=>i._`${(0,e.usePattern)(t,n)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),t.ok(i._`${h} === ${r.default.errors}`)}};t.default=s})),Di=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ri(),i=Ye(),r=Be(),n=Ri(),s={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:s,schema:o,parentSchema:a,data:u,it:h}=t;"all"===h.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(h,n.default,"additionalProperties"));const c=(0,i.allSchemaProperties)(o);for(const t of c)h.definedProperties.add(t);h.opts.unevaluated&&c.length&&!0!==h.props&&(h.props=r.mergeEvaluated.props(s,(0,r.toHash)(c),h.props));const f=c.filter((t=>!(0,r.alwaysValidSchema)(h,o[t])));if(0===f.length)return;const l=s.name("valid");for(const e of f)d(e)?p(e):(s.if((0,i.propertyInData)(s,u,e,h.opts.ownProperties)),p(e),h.allErrors||s.else().var(l,!0),s.endIf()),t.it.definedProperties.add(e),t.ok(l);function d(t){return h.opts.useDefaults&&!h.compositeRule&&void 0!==o[t].default}function p(e){t.subschema({keyword:"properties",schemaProp:e,dataProp:e},l)}}};t.default=s})),zi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ye(),i=Fe(),r=Be(),n=Be(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:s,schema:o,data:a,parentSchema:u,it:h}=t,{opts:c}=h,f=(0,e.allSchemaProperties)(o),l=f.filter((t=>(0,r.alwaysValidSchema)(h,o[t])));if(0===f.length||l.length===f.length&&(!h.opts.unevaluated||!0===h.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&u.properties,p=s.name("valid");!0===h.props||h.props instanceof i.Name||(h.props=(0,n.evaluatedPropsToName)(s,h.props));const{props:m}=h;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,r.checkStrictMode)(h,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function y(r){s.forIn("key",a,(o=>{s.if(i._`${(0,e.usePattern)(t,r)}.test(${o})`,(()=>{const e=l.includes(r);e||t.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:n.Type.Str},p),h.opts.unevaluated&&!0!==m?s.assign(i._`${m}[${o}]`,!0):e||h.allErrors||s.if((0,i.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),h.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};t.default=s})),Li=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be();t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:i,schema:r,it:n}=t;if((0,e.alwaysValidSchema)(n,r))return void t.fail();const s=i.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}}})),Ui=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ye();t.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}}})),qi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(t){const{gen:r,schema:n,parentSchema:s,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=n,u=r.let("valid",!1),h=r.let("passing",null),c=r.name("_valid");t.setParams({passing:h}),r.block((function(){a.forEach(((n,s)=>{let a;(0,i.alwaysValidSchema)(o,n)?r.var(c,!0):a=t.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},c),s>0&&r.if(e._`${c} && ${u}`).assign(u,!1).assign(h,e._`[${h}, ${s}]`).else(),r.if(c,(()=>{r.assign(u,!0),r.assign(h,s),a&&t.mergeEvaluated(a,e.Name)}))}))})),t.result(u,(()=>t.reset()),(()=>t.error(!0)))}};t.default=r})),Fi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be(),i={keyword:"allOf",schemaType:"array",code(t){const{gen:i,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=i.name("valid");r.forEach(((i,r)=>{if((0,e.alwaysValidSchema)(n,i))return;const o=t.subschema({keyword:"allOf",schemaProp:r},s);t.ok(s),t.mergeEvaluated(o)}))}};t.default=i})),Bi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Be();function r(t,e){const r=t.schema[e];return void 0!==r&&!(0,i.alwaysValidSchema)(t,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:n,parentSchema:s,it:o}=t;void 0===s.then&&void 0===s.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=r(o,"then"),u=r(o,"else");if(!a&&!u)return;const h=n.let("valid",!0),c=n.name("_valid");if(function(){const e=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(e)}(),t.reset(),a&&u){const e=n.let("ifClause");t.setParams({ifClause:e}),n.if(c,f("then",e),f("else",e))}else a?n.if(c,f("then")):n.if((0,e.not)(c),f("else"));function f(i,r){return()=>{const s=t.subschema({keyword:i},c);n.assign(h,c),t.mergeValidEvaluated(s,h),r?n.assign(r,e._`${i}`):t.setParams({ifClause:i})}}t.pass(h,(()=>t.error(!0)))}}})),Vi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be();t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:i,it:r}){void 0===i.if&&(0,e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}}})),Gi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Pi(),i=Ci(),r=Ii(),n=Ai(),s=Ni(),o=Ti(),a=Mi(),u=Ri(),h=Di(),c=zi(),f=Li(),l=Ui(),d=qi(),p=Fi(),m=Bi(),v=Vi();t.default=function(t=!1){const y=[f.default,l.default,d.default,p.default,m.default,v.default,a.default,u.default,o.default,h.default,c.default];return t?y.push(i.default,n.default):y.push(e.default,r.default),y.push(s.default),y}})),Hi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,i){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:u}=t,{opts:h,errSchemaPath:c,schemaEnv:f,self:l}=u;h.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:h.code.formats}),o=r.const("fDef",e._`${s}[${a}]`),u=r.let("fType"),c=r.let("format");r.if(e._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(u,e._`${o}.type || "string"`).assign(c,e._`${o}.validate`)),(()=>r.assign(u,e._`"string"`).assign(c,o))),t.fail$data((0,e.or)(!1===h.strictSchema?e.nil:e._`${a} && !${c}`,function(){const t=f.$async?e._`(${o}.async ? await ${c}(${n}) : ${c}(${n}))`:e._`${c}(${n})`,r=e._`(typeof ${c} == "function" ? ${t} : ${c}.test(${n}))`;return e._`${c} && ${c} !== true && ${u} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==h.strictSchema)throw new Error(t());function t(){return`unknown format "${o}" ignored in schema at path "${c}"`}l.logger.warn(t())}();if(!0===s)return;const[a,u,d]=function(t){const i=t instanceof RegExp?(0,e.regexpCode)(t):h.code.formats?e._`${h.code.formats}${(0,e.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:t,code:i});return"object"!=typeof t||t instanceof RegExp?["string",t,n]:[t.type||"string",t.validate,e._`${n}.validate`]}(s);a===i&&t.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return e._`await ${d}(${n})`}return"function"==typeof u?e._`${d}(${n})`:e._`${d}.test(${n})`}())}())}};t.default=i})),Ji=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Hi();t.default=[e.default]})),Ki=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),Wi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=mi(),i=ji(),r=Gi(),n=Ji(),s=Ki(),o=[e.default,i.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];t.default=o})),Zi=Le((function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e||(t.DiscrError=e={}))})),Yi=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),i=Zi(),r=oi(),n=si(),s=Be(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===i.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:i,tagName:r}})=>e._`{error: ${t}, tag: ${r}, tagValue: ${i}}`},code(t){const{gen:o,data:a,schema:u,parentSchema:h,it:c}=t,{oneOf:f}=h;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=u.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const d=o.let("valid",!1),p=o.const("tag",e._`${a}${(0,e.getProperty)(l)}`);function m(i){const r=o.name("valid"),n=t.subschema({keyword:"oneOf",schemaProp:i},r);return t.mergeEvaluated(n,e.Name),r}o.if(e._`typeof ${p} == "string"`,(()=>function(){const a=function(){var t;const e={},i=a(h);let o=!0;for(let e=0;e<f.length;e++){let h=f[e];if((null==h?void 0:h.$ref)&&!(0,s.schemaHasRulesButRef)(h,c.self.RULES)){const t=h.$ref;if(h=r.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),h instanceof r.SchemaEnv&&(h=h.schema),void 0===h)throw new n.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==h?void 0:h.properties)||void 0===t?void 0:t[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);o=o&&(i||a(h)),u(d,e)}if(!o)throw new Error(`discriminator: "${l}" must be required`);return e;function a({required:t}){return Array.isArray(t)&&t.includes(l)}function u(t,e){if(t.const)d(t.const,e);else{if(!t.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const i of t.enum)d(i,e)}}function d(t,i){if("string"!=typeof t||t in e)throw new Error(`discriminator: "${l}" values must be unique strings`);e[t]=i}}();o.if(!1);for(const t in a)o.elseIf(e._`${p} === ${t}`),o.assign(d,m(a[t]));o.else(),t.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:l}),o.endIf()}()),(()=>t.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:l}))),t.ok(d)}};t.default=o})),Xi=Le((function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}})),Qi=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var i=li(),r=Wi(),n=Yi(),s=Xi(),o=["/properties"],a="http://json-schema.org/draft-07/schema";class u extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(t,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var h=ri();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var c=Fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=ni();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=si();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return l.default}})})),tr=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var i=Qi(),r=Fe(),n=Ue(),s=ri(),o=Ge(),a=Ve(),u="errorMessage",h=new i.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,l=/\$\{([^}]+)\}/g,d=/^""\s*\+\s*|\s*\+\s*""$/g;var p=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:u,schemaType:["string","object"],post:!0,code(e){const{gen:p,data:m,schema:v,schemaValue:y,it:g}=e;if(!1===g.createErrors)return;const b=v,$=r.strConcat(a.default.instancePath,g.errorPath);function w(t,e){return r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${$}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${g.errSchemaPath.length}))`)}function _(t,e){const i=[];for(const r in t){const t=e[r];f.test(t)&&i.push([r,k(t)])}return p.object(...i)}function E(t){return f.test(t)?new n._Code(n.safeStringify(t).replace(l,((t,e)=>`" + JSON.stringify(${s.getData(e,g)}) + "`)).replace(d,"")):i.stringify(t)}function k(t){return i._`function(){return ${E(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof b){const[n,s]=function(t){let e,i;for(const r in t){if("properties"===r||"items"===r)continue;const n=t[r];if("object"==typeof n){e||(e={});const t=e[r]={};for(const e in n)t[e]=[]}else i||(i={}),i[r]=[]}return[e,i]}(b);s&&function(r){const n=p.const("emErrors",i.stringify(r)),s=p.const("templates",_(r,v));p.forOf("err",a.default.vErrors,(t=>p.if(w(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:u}=t;if(u){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof u?u:";"}`))),p.code(i._`${t} += ${f(e)}`),p.assign(r,i._`${r}.concat(${n}[${e}])`)})),o.reportError(e,{message:t,params:i._`{errors: ${r}}`})}else c((t=>o.reportError(e,{message:f(t),params:i._`{errors: ${n}[${t}]}`})));function c(t){p.forIn("key",n,(e=>p.if(i._`${n}[${e}].length`,(()=>t(e)))))}function f(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),n&&function(t){const r=p.const("emErrors",i.stringify(t)),n=[];for(const e in t)n.push([e,_(t[e],v[e])]);const s=p.const("templates",p.object(...n)),u=p.scopeValue("obj",{ref:c,code:i.stringify(c)}),f=p.let("emPropParams"),l=p.let("emParamsErrors");p.forOf("err",a.default.vErrors,(t=>p.if(w(t,r),(()=>{p.assign(f,i._`${u}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${h}`,!0)))})))),p.forIn("key",r,(t=>p.forIn("keyProp",i._`${r}[${t}]`,(n=>{p.assign(l,i._`${r}[${t}][${n}]`),p.if(i._`${l}.length`,(()=>{const r=p.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${n}]`);o.reportError(e,{message:i._`${r} ? ${r}() : ${y}[${t}][${n}]`,params:i._`{errors: ${l}}`})}))}))))}(n),function(t){const{props:n,items:s}=t;if(!n&&!s)return;const c=i._`typeof ${m} == "object"`,f=i._`Array.isArray(${m})`,l=p.let("emErrors");let d,g;const b=p.let("templates");function w(t,e){p.assign(l,i.stringify(t)),p.assign(b,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{w(s,v.items),p.assign(d,i.str`items`)}),(()=>{w(n,v.properties),p.assign(d,i.str`properties`)})),g=i._`[${d}]`):s?(p.if(f),w(s,v.items),g=i._`.items`):n&&(p.if(r.and(c,r.not(f))),w(n,v.properties),g=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${$}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${$}.length))`),o=p.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);p.if(i._`${o} !== undefined && ${o} in ${e}`,(()=>n(o)))}))}(t,l,(e=>p.code(i._`${l}[${e}].push(${t})`).assign(i._`${t}.${h}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${b} ? ${b}[${t}]() : ${y}${g}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${$} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),p.endIf()}(function({properties:t,items:e}){const i={};if(t){i.props={};for(const e in t)i.props[e]=[]}if(e){i.items={};for(let t=0;t<e.length;t++)i.items[t]=[]}return i}(b))}const n="string"==typeof b?b:b._;n&&function(t){const n=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(t=>p.if(function(t){return r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,r.or(i._`${t}.instancePath === ${$}`,r.and(i._`${t}.instancePath.indexOf(${$}) === 0`,i._`${t}.instancePath[${$}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`${t}.schemaPath[${g.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${h}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:E(t),params:i._`{errors: ${n}}`})))}(n),t.keepErrors||function(){const t=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(e=>p.if(i._`!${e}.${h}`,(()=>p.code(i._`${t}.push(${e})`))))),p.assign(a.default.vErrors,t).assign(a.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};t.default=p,e.exports=p,e.exports.default=p})),er=Le((function(t){function e(t,e){return{validate:t,compare:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:e(n,s),time:e(a(!0),u),"date-time":e(f(!0),l),"iso-time":e(a(),h),"iso-date-time":e(f(),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(t){return p.test(t)&&m.test(t)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(t){if($.test(t))return!1;try{return!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(t){return v.lastIndex=0,v.test(t)},int32:{type:"number",validate:function(t){return Number.isInteger(t)&&t<=g&&t>=y}},int64:{type:"number",validate:function(t){return Number.isInteger(t)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function n(t){const e=i.exec(t);if(!e)return!1;const n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(2!==n||((o=+e[1])%4!=0||o%100==0&&o%400!=0)?r[n]:29);var o}function s(t,e){if(t&&e)return t>e?1:t<e?-1:0}var o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function a(t){return function(e){const i=o.exec(e);if(!i)return!1;const r=+i[1],n=+i[2],s=+i[3],a="-"===i[5]?-1:1,u=+(i[6]||0),h=+(i[7]||0);if(u>23||h>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-h*a,f=r-u*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function u(t,e){if(!t||!e)return;const i=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();return i&&r?i-r:void 0}function h(t,e){if(!t||!e)return;const i=o.exec(t),r=o.exec(e);return i&&r?(t=i[1]+i[2]+i[3])>(e=r[1]+r[2]+r[3])?1:t<e?-1:0:void 0}var c=/t|\s/i;function f(t){const e=a(t);return function(t){const i=t.split(c);return 2===i.length&&n(i[0])&&e(i[1])}}function l(t,e){if(!t||!e)return;const i=new Date(t).valueOf(),r=new Date(e).valueOf();return i&&r?i-r:void 0}function d(t,e){if(!t||!e)return;const[i,r]=t.split(c),[n,o]=e.split(c),a=s(i,n);return void 0!==a?a||u(r,o):void 0}var p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,y=-2147483648,g=2**31-1;function b(){return!0}var $=/[^\\]\\Z/})),ir=Le((function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Qi(),i=Fe(),r=i.operators,n={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:t,schemaCode:e})=>i.str`should be ${n[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>i._`{comparison: ${n[t].okStr}, limit: ${e}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:s,code(t){const{gen:r,data:s,schemaCode:o,keyword:a,it:u}=t,{opts:h,self:c}=u;if(!h.validateFormats)return;const f=new e.KeywordCxt(u,c.RULES.all.format.definition,"format");function l(t){return i._`${t}.compare(${s}, ${o}) ${n[a].fail} 0`}f.$data?function(){const e=r.scopeValue("formats",{ref:c.formats,code:h.code.formats}),n=r.const("fmt",i._`${e}[${f.schemaCode}]`);t.fail$data((0,i.or)(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,l(n)))}():function(){const e=f.schema,n=c.formats[e];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${e}" does not define "compare" function`);const s=r.scopeValue("formats",{key:e,ref:n,code:h.code.formats?i._`${h.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)})),rr=Le((function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var i=er(),r=ir(),n=Fe(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return u(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return u(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function u(t,e,i,r){var s,o;null!==(s=(o=t.opts.code).formats)&&void 0!==s||(o.formats=n._`require("ajv-formats/dist/formats").${r}`);for(const r of e)t.addFormat(r,i[r])}a.get=(t,e="full")=>{const r=("fast"===e?i.fastFormats:i.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}));function nr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function sr(t,e){return nr(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function or(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=sr(n,e);return i}var ar={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value",identity:"Invalid identifier for this format",iban:"Invalid IBAN",dateRange:"The end before the start is not allowed",mrz:"Machine-readable zone unreadable or inconsistent"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide",identity:"Identifiant invalide pour ce format",iban:"IBAN invalide",dateRange:"La fin ne peut pas précéder le début",mrz:"Zone de lecture illisible ou incohérente"}};function ur(t,e,i){return((ar[e??"en"]??ar.en)[t]??ar.en[t]??"Invalid value").replace("{value}",String(i??""))}function*hr(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*hr(r,`${e}.${i}`)}}function*cr(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*cr(e)}function fr(t){const e={};for(const i of cr(t)){const t=i.configs?.key,r=i.configs?.defaultValue;t&&void 0!==r&&!(t in e)&&(e[t]=r)}return e}function lr(t,e){if(t.configs?.key&&e)return t.unWrapData?e:e[t.configs.key]}function dr(t,e){if(t.configs?.key)return t.unWrapData?e:{[t.configs.key]:e}}var pr=(t,e)=>{if(!e.includes("."))return t[e];let i=t;for(const t of e.split(".")){if("object"!=typeof i||null===i)return;i=i[t]}return i};function mr(t,e="label",i="value"){return Array.isArray(t)?t.map((t=>{if("object"==typeof t&&null!==t){const r=t,n=pr(r,e)??pr(r,i),s=pr(r,i)??pr(r,e);return{label:String(n??""),value:String(s??"")}}return{label:String(t),value:String(t)}})).filter((t=>""!==t.label)):String(t??"").split("\n").map((t=>t.trim())).filter(Boolean).map((t=>({label:t,value:t})))}var vr={"palette.search":"Search bricks…","palette.empty":"No brick matches “{query}”","builder.undo":"Undo","builder.redo":"Redo","builder.editLocale":"Editing language","builder.copyJson":"Copy JSON","builder.importJson":"Import JSON","builder.importInvalid":"Invalid form JSON","builder.pasteHint":"Press Ctrl+V to paste a spec","builder.copied":"Copied!","builder.downloadJson":"Download .json","builder.hint":"Select a brick to edit its properties","drop.hint":"Drop a brick here","empty.title":"Your form is empty","empty.hint":"Drag a brick from the palette to get started","actions.move":"Move","actions.duplicate":"Duplicate","actions.delete":"Delete","stepper.back":"← Back","stepper.next":"Next →","stepper.submit":"Submit","form.submit":"Submit","field.required":"(required)","form.invalid":"This form has missing or invalid fields","panel.cfg.validateSteps":"Validate each step","panel.cfg.allowStepClick":"Allow clicking steps to jump","panel.cfg.showSubmit":"Submit button on last step","panel.cfg.validateTabs":"Validate tab before leaving it","signature.clear":"Clear","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Rules","panel.key":"Key","panel.label":"Label","panel.placeholder":"Placeholder","panel.prefix":"Prefix","panel.suffix":"Suffix","panel.accept":"Accepted file types","panel.mask":"Input mask (9=digit, a=letter, *=any)","panel.uploadUrl":"Upload URL","panel.cfg.multiple":"Allow multiple files","panel.optionsSource":"Options source","panel.options":"Options (one per line)","panel.content":"Content","panel.dataKey":"Data key","panel.url":"URL","panel.responsePath":"Response path (optional)","panel.headers":"Headers ({token} reads form data)","panel.searchParam":"Server search param","panel.labelKey":"Label key","panel.valueKey":"Value key","panel.errorMessage":"Error message","panel.required":"Required","panel.minLength":"Min length","panel.maxLength":"Max length","panel.min":"Min","panel.max":"Max","panel.pattern":"Pattern (regex)","panel.minItems":"Min items","panel.maxItems":"Max items","panel.emailFormat":"Email format","panel.urlFormat":"URL format","panel.custom":"Custom (JavaScript)","panel.fallbackMessage":"Fallback message","panel.styleProperty":"property","panel.styleValue":"value","file.choose":"Choose a file…","file.uploading":"Uploading…","file.remove":"Remove file","file.addAnother":"+ Add a file","address.street":"Street","address.city":"City","address.zip":"Postal code","address.country":"Country","grid.addRow":"+ Add row","grid.moveUp":"Move row up","grid.moveDown":"Move row down","grid.removeRow":"Remove row","grid.empty":"No rows yet","grid.columns":"Row template","select.search":"Search…","select.empty":"No options","select.clear":"Clear","rules.when":"When","rules.then":"Then","rules.addRule":"+ Add rule","rules.addEffect":"+ Effect","rules.removeRule":"Remove rule","rules.removeEffect":"Remove effect","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Inputs","category.Layout":"Layout","category.Data":"Data","category.Geo":"Map","brick.text.name":"Text","brick.email.name":"Email","brick.password.name":"Password","brick.url.name":"URL","brick.phone.name":"Phone","brick.textarea.name":"Text area","brick.number.name":"Number","brick.date.name":"Date","brick.time.name":"Time","brick.datetime.name":"Date / Time","brick.select.name":"Select","brick.multi-select.name":"Multi select","brick.radio.name":"Radio","brick.select-boxes.name":"Select boxes","brick.checkbox.name":"Checkbox","brick.tags.name":"Tags","brick.signature.name":"Signature","brick.data-grid.name":"Data grid","brick.address.name":"Address","brick.file.name":"File","brick.hidden.name":"Hidden","brick.content.name":"Content","brick.recap.name":"Recap","brick.nested-form.name":"Nested form","brick.code.name":"Code","nestedForm.ref":"Referenced form","nestedForm.missing":"Set the specRef config to reference a form.","nestedForm.loading":"Loading nested forms…","panel.specRef":"Referenced form (specRef)","panel.optionsRef":"Options catalog (optionsRef)","recap.empty":"Nothing to summarize yet.","recap.yes":"Yes","recap.no":"No","panel.cfg.showEmpty":"Show empty fields","panel.cfg.groupBySections":"Group by section","brick.group.name":"Group","brick.row.name":"Row","brick.column.name":"Column","brick.stepper.name":"Stepper","brick.tabs.name":"Tabs","review.incorrect":"Incorrect","review.comment":"Comment for the person who corrects it","review.flagged":"To correct","review.previous":"Flagged in the previous review","variables.empty":"No matching variable","geo.latitude":"Latitude","geo.longitude":"Longitude","geo.points":"points","geo.clear":"Clear","geo.hintPoint":"Click the map to place the point, drag it to move it.","geo.hintArea":"Click the map to add points, drag one to move it, right-click to remove it.","geo.unavailable":"Map unavailable","geo.nativeReadOnly":"Drawn on the web version","panel.center":"Initial center (lat, lng)","panel.zoom":"Initial zoom","panel.height":"Height (px)","panel.tileUrl":"Tile URL","panel.shape":"Shape (polygon or line)","panel.searchUrl":"Geocoding URL ({q} = query)","panel.countryCodes":"Country codes (bj, tg)","address.search":"Search an address","address.searching":"Searching…","address.located":"Address located","address.notLocated":"Address not located: pick a match to place it","address.noResult":"No matching address","address.unavailable":"Address search unavailable","layer.pick":"Choose a zone…","layer.pickMany":"Click the zones on the map","layer.hint":"Click a zone on the map to select it","layer.unavailable":"Reference layer unavailable","panel.layerUrl":"Reference layer URL (GeoJSON)","panel.codeProperty":"Code property","panel.nameProperty":"Name property","panel.idFormat":"Identifier format (fr-nir, bj-npi, digits-10…)","mrz.placeholder":"Paste or type the two or three lines of the machine-readable zone","mrz.unreadable":"Zone not recognised: 2 lines of 44 (passport) or 3 lines of 30 (identity card)","mrz.invalid":"Check digits do not match for:","mrz.documentNumber":"Document number","mrz.nationality":"Nationality","mrz.surname":"Surname","mrz.givenNames":"Given names","mrz.birthDate":"Date of birth","mrz.sex":"Sex","mrz.expiryDate":"Expiry date","category.Identity":"Identity","category.Finance":"Finance","category.Time":"Time","slots.loading":"Loading slots…","slots.unavailable":"Slots unavailable","slots.empty":"No slot available","slots.none":"No slot chosen","slots.picked":"Chosen slot:","range.from":"From","range.to":"To","panel.slotsUrl":"Slots URL (empty = opening rules)","panel.slotDays":"Open days (1 = Monday … 7 = Sunday)","panel.slotFrom":"Opens at","panel.slotTo":"Closes at","panel.slotDuration":"Slot length (minutes)","panel.slotHorizon":"Bookable days ahead","panel.slotNotice":"Notice (hours)","panel.slotExclude":"Closed dates (YYYY-MM-DD, comma-separated)","money.amount":"Amount","money.currency":"Currency","panel.currencies":"Currencies offered (XOF, EUR, USD)","panel.currency":"Default currency"},yr={"palette.search":"Rechercher une brique…","palette.empty":"Aucune brique ne correspond à « {query} »","builder.undo":"Annuler","builder.editLocale":"Langue d'édition","builder.redo":"Rétablir","builder.copyJson":"Copier le JSON","builder.importJson":"Importer le JSON","builder.importInvalid":"JSON de formulaire invalide","builder.pasteHint":"Collez avec Ctrl+V pour importer une spec","builder.copied":"Copié !","builder.downloadJson":"Télécharger le .json","builder.hint":"Sélectionnez une brique pour éditer ses propriétés","drop.hint":"Déposez une brique ici","empty.title":"Votre formulaire est vide","empty.hint":"Glissez une brique depuis la palette pour commencer","actions.move":"Déplacer","actions.duplicate":"Dupliquer","actions.delete":"Supprimer","stepper.back":"← Précédent","stepper.next":"Suivant →","stepper.submit":"Envoyer","form.submit":"Envoyer","field.required":"(obligatoire)","form.invalid":"Ce formulaire a des champs manquants ou invalides","panel.cfg.validateSteps":"Valider chaque étape","panel.cfg.allowStepClick":"Autoriser le saut d’étapes au clic","panel.cfg.showSubmit":"Bouton d’envoi à la dernière étape","panel.cfg.validateTabs":"Valider l’onglet avant de le quitter","signature.clear":"Effacer","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Règles","panel.key":"Clé","panel.label":"Libellé","panel.placeholder":"Placeholder","panel.prefix":"Préfixe","panel.suffix":"Suffixe","panel.accept":"Types de fichiers acceptés","panel.mask":"Masque de saisie (9=chiffre, a=lettre, *=tout)","panel.uploadUrl":"URL d'upload","panel.cfg.multiple":"Autoriser plusieurs fichiers","panel.optionsSource":"Source des options","panel.options":"Options (une par ligne)","panel.content":"Contenu","panel.dataKey":"Clé de données","panel.url":"URL","panel.responsePath":"Chemin dans la réponse (optionnel)","panel.headers":"En-têtes ({token} lit les données du formulaire)","panel.searchParam":"Paramètre de recherche serveur","panel.labelKey":"Clé du libellé","panel.valueKey":"Clé de la valeur","panel.errorMessage":"Message d'erreur","panel.required":"Obligatoire","panel.minLength":"Longueur min","panel.maxLength":"Longueur max","panel.min":"Min","panel.max":"Max","panel.pattern":"Motif (regex)","panel.minItems":"Éléments min","panel.maxItems":"Éléments max","panel.emailFormat":"Format email","panel.urlFormat":"Format URL","panel.custom":"Personnalisé (JavaScript)","panel.fallbackMessage":"Message par défaut","panel.styleProperty":"propriété","panel.styleValue":"valeur","file.choose":"Choisir un fichier…","file.uploading":"Envoi en cours…","file.remove":"Retirer le fichier","file.addAnother":"+ Ajouter un fichier","address.street":"Rue","address.city":"Ville","address.zip":"Code postal","address.country":"Pays","grid.addRow":"+ Ajouter une ligne","grid.moveUp":"Monter la ligne","grid.moveDown":"Descendre la ligne","grid.removeRow":"Supprimer la ligne","grid.empty":"Aucune ligne","grid.columns":"Modèle de ligne","select.search":"Rechercher…","select.empty":"Aucune option","select.clear":"Effacer","rules.when":"Quand","rules.then":"Alors","rules.addRule":"+ Ajouter une règle","rules.addEffect":"+ Effet","rules.removeRule":"Supprimer la règle","rules.removeEffect":"Supprimer l'effet","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Champs","category.Layout":"Mise en page","category.Data":"Données","category.Geo":"Carte","brick.text.name":"Texte","brick.email.name":"Email","brick.password.name":"Mot de passe","brick.url.name":"URL","brick.phone.name":"Téléphone","brick.textarea.name":"Zone de texte","brick.number.name":"Nombre","brick.date.name":"Date","brick.time.name":"Heure","brick.datetime.name":"Date / Heure","brick.select.name":"Liste déroulante","brick.multi-select.name":"Sélection multiple","brick.radio.name":"Boutons radio","brick.select-boxes.name":"Cases à cocher","brick.checkbox.name":"Case à cocher","brick.tags.name":"Étiquettes","brick.signature.name":"Signature","brick.data-grid.name":"Grille de données","brick.address.name":"Adresse","brick.file.name":"Fichier","brick.hidden.name":"Caché","brick.content.name":"Contenu","brick.recap.name":"Récapitulatif","brick.nested-form.name":"Formulaire imbriqué","brick.code.name":"Code","nestedForm.ref":"Formulaire référencé","nestedForm.missing":"Renseignez la config specRef pour référencer un formulaire.","nestedForm.loading":"Chargement des formulaires imbriqués…","panel.specRef":"Formulaire référencé (specRef)","panel.optionsRef":"Catalogue d'options (optionsRef)","recap.empty":"Rien à récapituler pour le moment.","recap.yes":"Oui","recap.no":"Non","panel.cfg.showEmpty":"Afficher les champs vides","panel.cfg.groupBySections":"Regrouper par section","brick.group.name":"Groupe","brick.row.name":"Ligne","brick.column.name":"Colonne","brick.stepper.name":"Étapes","brick.tabs.name":"Onglets","review.incorrect":"Incorrect","review.comment":"Commentaire pour la personne qui corrige","review.flagged":"À corriger","review.previous":"Signalé lors de la revue précédente","variables.empty":"Aucune variable ne correspond","geo.latitude":"Latitude","geo.longitude":"Longitude","geo.points":"points","geo.clear":"Effacer","geo.hintPoint":"Cliquez sur la carte pour placer le point, glissez-le pour le déplacer.","geo.hintArea":"Cliquez sur la carte pour ajouter des points, glissez-en un pour le déplacer, clic droit pour le retirer.","geo.unavailable":"Carte indisponible","geo.nativeReadOnly":"Tracé sur la version web","panel.center":"Centre initial (lat, lng)","panel.zoom":"Zoom initial","panel.height":"Hauteur (px)","panel.tileUrl":"URL des tuiles","panel.shape":"Forme (polygon ou line)","panel.searchUrl":"URL de géocodage ({q} = recherche)","panel.countryCodes":"Codes pays (bj, tg)","address.search":"Rechercher une adresse","address.searching":"Recherche…","address.located":"Adresse localisée","address.notLocated":"Adresse non localisée : choisissez une proposition pour la placer","address.noResult":"Aucune adresse ne correspond","address.unavailable":"Recherche d’adresse indisponible","layer.pick":"Choisir une zone…","layer.pickMany":"Cliquez les zones sur la carte","layer.hint":"Cliquez une zone sur la carte pour la choisir","layer.unavailable":"Couche de référence indisponible","panel.layerUrl":"URL de la couche de référence (GeoJSON)","panel.codeProperty":"Propriété du code","panel.nameProperty":"Propriété du nom","panel.idFormat":"Format de l’identifiant (fr-nir, bj-npi, digits-10…)","mrz.placeholder":"Collez ou saisissez les deux ou trois lignes de la zone de lecture","mrz.unreadable":"Zone non reconnue : 2 lignes de 44 (passeport) ou 3 lignes de 30 (carte d’identité)","mrz.invalid":"Chiffres de contrôle incohérents pour :","mrz.documentNumber":"Numéro du document","mrz.nationality":"Nationalité","mrz.surname":"Nom","mrz.givenNames":"Prénoms","mrz.birthDate":"Date de naissance","mrz.sex":"Sexe","mrz.expiryDate":"Date d’expiration","category.Identity":"Identité","category.Finance":"Finance","category.Time":"Temps","slots.loading":"Chargement des créneaux…","slots.unavailable":"Créneaux indisponibles","slots.empty":"Aucun créneau disponible","slots.none":"Aucun créneau choisi","slots.picked":"Créneau choisi :","range.from":"Du","range.to":"Au","panel.slotsUrl":"URL des créneaux (vide = règles d’ouverture)","panel.slotDays":"Jours ouverts (1 = lundi … 7 = dimanche)","panel.slotFrom":"Ouverture","panel.slotTo":"Fermeture","panel.slotDuration":"Durée d’un créneau (minutes)","panel.slotHorizon":"Jours réservables à l’avance","panel.slotNotice":"Préavis (heures)","panel.slotExclude":"Dates fermées (AAAA-MM-JJ, séparées par des virgules)","money.amount":"Montant","money.currency":"Devise","panel.currencies":"Devises proposées (XOF, EUR, USD)","panel.currency":"Devise par défaut"},gr=Symbol.for("formkrafter.i18n"),br=globalThis,$r=br[gr]??={current:{...vr}};function wr(t={}){$r.current={...vr,...t}}function _r(t,e){let i=$r.current[t]??t;for(const[t,r]of Object.entries(e??{}))i=i.replace(`{${t}}`,String(r));return i}function Er(t,e){return $r.current[t]??e}var kr=new Set(["__proto__","constructor","prototype"]);class Sr{value;constructor(t){this.value=t}}var xr=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},Or=t=>{if("number"==typeof t)return t;const e=String(t);if(kr.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},jr=(t,e)=>({object:Pr(t,e.object),prop:Or(e.computed?Pr(t,e.property):e.property.name),optional:!0===e.optional}),Pr=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Pr(t,i);if(e instanceof Sr)return e}return;case"ReturnStatement":return new Sr(e.argument?Pr(t,e.argument):void 0);case"IfStatement":return Pr(t,e.test)?Pr(t,e.consequent):e.alternate?Pr(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");xr(t,e.name,i.init?Pr(t,i.init):void 0)}return;case"ExpressionStatement":return void Pr(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Pr(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Pr(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=jr(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Pr(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Pr(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=jr(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Pr(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},u=Pr(a,r);return t.steps=a.steps,u instanceof Sr?u.value:!0===e.expression?u:void 0}}case"BinaryExpression":{const i=Pr(t,e.left),r=Pr(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Pr(t,e.left);switch(e.operator){case"&&":return i&&Pr(t,e.right);case"||":return i||Pr(t,e.right);case"??":return i??Pr(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Pr(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Pr(t,e.test)?Pr(t,e.consequent):Pr(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Pr(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Pr(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Pr(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Pr(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(Or(t))]=r;continue}const e=r.key,n=Or(r.computed?Pr(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Pr(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},Ir={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite};function Cr(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let i=t;for(const t of e.split(".")){if(null===i||"object"!=typeof i)return;if(!Object.prototype.hasOwnProperty.call(i,t))return;i=i[t]}return i}function Ar(t,e){return t.replace(/\{([\w.]+)\}/g,((t,i)=>{const r=e&&Cr(e,i);return null==r?"":String(r)}))}function Nr(t,e){if("string"!=typeof t||!t.trim())return;const i={};for(const r of t.split("\n")){const t=r.indexOf(":");if(t<=0)continue;const n=r.slice(0,t).trim(),s=Ar(r.slice(t+1).trim(),e);n&&(i[n]=s)}return Object.keys(i).length?i:void 0}function Tr(t,e,i){if(!i)return t;const r=t.includes("?")?"&":"?";return`${t}${r}${encodeURIComponent(e)}=${encodeURIComponent(i)}`}class Mr{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchSpec(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load spec "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}class Rr{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchOptions(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load options "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}var Dr=Symbol.for("formkrafter.core.services"),zr=globalThis,Lr=zr[Dr]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Yt(t,e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Yt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...Ir,...e})),new Map]},n=Pr(r,i);return n instanceof Sr?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}|${e?.path??""}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((i=>function(t,e,i){if(i){const r=null!==t&&"object"==typeof t?Cr(t,i):void 0;if(!Array.isArray(r))throw new Error(`Data source has no array at "${i}": ${e}`);return r}if(Array.isArray(t))return t;if(null!==t&&"object"==typeof t){const e=t.data;if(Array.isArray(e))return e}throw new Error(`Data source did not return an array: ${e}`)}(i,t,e?.path))).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}},specSourceService:new Mr,optionSourceService:new Rr};Lr.specSourceService??=new Mr,Lr.optionSourceService??=new Rr;var Ur=(t,e)=>{try{return Lr.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},qr=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Ur(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Ur(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Fr=(t,e)=>{if(Array.isArray(e))return e.map((e=>Fr(t,e))).filter(Boolean).join(", ");if(!0===e)return Er("recap.yes","Yes");if(!1===e)return Er("recap.no","No");if(e&&"object"==typeof e)return"string"==typeof e.name&&"url"in e?e.name:Object.values(e).filter((t=>"string"==typeof t&&t)).join(" ");const i=String(e??"");if(null!=t.configs?.options){const e=mr(t.configs.options,"string"==typeof t.configs.labelKey?t.configs.labelKey:"label","string"==typeof t.configs.valueKey?t.configs.valueKey:"value").find((t=>t.value===i));if(e)return e.label}return i},Br=t=>null==t||""===t||Array.isArray(t)&&0===t.length,Vr=(t,e)=>String(sr(t.configs?.label,e)??t.name??t.configs?.key??""),Gr=t=>{const e=[];for(const i of t.children??[]){const t=i.configs?.key;"input"===i.type&&t&&!t.startsWith("_")&&e.push(i)}return e},Hr=(t,e,i,r,n=!1)=>{if(!t)return[];const s=[];for(const o of t.children??[]){if("recap"===o.id||"action"===o.type)continue;if(!0===qr(o.rules,e).hidden)continue;const t=o.configs?.key,a=Vr(o,i);if("collection"===o.type){const n=t&&Array.isArray(e?.[t])?e[t]:[];if(!n.length&&!r)continue;const u=Gr(o);s.push({kind:"collection",label:a,columns:u.map((t=>Vr(t,i))),rows:n.map((t=>u.map((e=>{const i=t?.[e.configs.key];return Br(i)?"—":Fr(e,i)}))))});continue}if("panel"===o.type){const t=sr(o.configs?.label,i);if(n&&"string"==typeof t&&t.trim()){const n=Hr(o,e,i,r);n.length&&(s.push({kind:"section",label:t}),s.push(...n));continue}s.push(...Hr(o,e,i,r,n));continue}if("input"!==o.type||!t||t.startsWith("_"))continue;const u=e?.[t];Br(u)&&!r||s.push({kind:"field",label:a,value:Br(u)?"—":Fr(o,u)})}return s},Jr=t=>t.replace(/[\s.-]/g,"").toUpperCase();function Kr(t){if(!/^[0-9]+$/.test(t))return!1;let e=0;for(let i=0;i<t.length;i++){let r=Number(t[t.length-1-i]);i%2==1&&(r*=2,r>9&&(r-=9)),e+=r}return e%10==0}function Wr(t,e){if("fr-nir"===t)return function(t){const e=Jr(t);if(!/^[12][0-9]{2}(0[1-9]|1[0-2]|[2-9][0-9])(2A|2B|[0-9]{2})[0-9]{6}[0-9]{2}$/.test(e))return!1;const i=e.slice(0,13).replace("2A","19").replace("2B","18");return Number(e.slice(13))===97-Number(BigInt(i)%97n)}(e);if("bj-npi"===t)return function(t){return/^[0-9]{10}$/.test(Jr(t))}(e);if("fr-siren"===t)return function(t){const e=Jr(t);return/^[0-9]{9}$/.test(e)&&Kr(e)}(e);if("fr-siret"===t)return function(t){const e=Jr(t);return/^[0-9]{14}$/.test(e)&&Kr(e)}(e);if("bj-ifu"===t)return function(t){return/^[0-9]{13}$/.test(Jr(t))}(e);if("iban"===t)return function(t){const e=Jr(t);if(!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/.test(e))return!1;const i=(e.slice(4)+e.slice(0,4)).replace(/[A-Z]/g,(t=>String(t.charCodeAt(0)-55)));return 1===Number(BigInt(i)%97n)}(e);const i=/^digits-([0-9]{1,3})$/.exec(t);return i?function(t,e){return new RegExp(`^[0-9]{${e}}$`).test(Jr(t))}(e,Number(i[1])):e.trim().length>0}var Zr=t=>Jr(t).replace(/(.{4})(?=.)/g,"$1 "),Yr=[7,3,1],Xr=(t,e)=>/[0-9]/.test(e)&&function(t){let e=0;for(let r=0;r<t.length;r++)e+=("<"===(i=t[r])?0:/[0-9]/.test(i)?Number(i):/[A-Z]/.test(i)?i.charCodeAt(0)-55:0)*Yr[r%3];var i;return e%10}(t)===Number(e),Qr=t=>t.replace(/</g," ").trim().replace(/\s+/g," "),tn=t=>{const[e="",i=""]=t.split("<<");return{surname:Qr(e),givenNames:Qr(i)}},en=(t,e)=>{if(!/^[0-9]{6}$/.test(t))return null;const i=Number(t.slice(0,2)),r=t.slice(2,4),n=t.slice(4,6),s=(new Date).getFullYear();let o=100*Math.floor(s/100)+i;return"birth"===e&&o>s&&(o-=100),"expiry"===e&&o<s-20&&(o+=100),`${o}-${r}-${n}`},rn=t=>"M"===t?"M":"F"===t?"F":"X";function nn(t){const e=function(t){return t.split(/\r?\n/).map((t=>t.replace(/\s+/g,"").toUpperCase())).filter((t=>t.length>0))}(t);return 2===e.length&&e.every((t=>44===t.length))?function(t,e,i){const r=[],n=e.slice(0,9);Xr(n,e[9])||r.push("documentNumber");const s=e.slice(13,19);Xr(s,e[19])||r.push("birthDate");const o=e.slice(21,27);Xr(o,e[27])||r.push("expiryDate");const a=e.slice(28,42);a.replace(/</g,"")&&!Xr(a,e[42])&&r.push("optional");const u=e.slice(0,10)+e.slice(13,20)+e.slice(21,43);return Xr(u,e[43])||r.push("composite"),{raw:i,format:"TD3",documentType:Qr(t.slice(0,2)),issuingCountry:Qr(t.slice(2,5)),documentNumber:Qr(n),nationality:Qr(e.slice(10,13)),...tn(t.slice(5)),birthDate:en(s,"birth"),sex:rn(e[20]),expiryDate:en(o,"expiry"),optional:Qr(a),valid:0===r.length,errors:r}}(e[0],e[1],t):3===e.length&&e.every((t=>30===t.length))?function(t,e,i,r){const n=[],s=t.slice(5,14);Xr(s,t[14])||n.push("documentNumber");const o=e.slice(0,6);Xr(o,e[6])||n.push("birthDate");const a=e.slice(8,14);Xr(a,e[14])||n.push("expiryDate");const u=t.slice(5,30)+e.slice(0,7)+e.slice(8,15)+e.slice(18,29);return Xr(u,e[29])||n.push("composite"),{raw:r,format:"TD1",documentType:Qr(t.slice(0,2)),issuingCountry:Qr(t.slice(2,5)),documentNumber:Qr(s),nationality:Qr(e.slice(15,18)),...tn(i),birthDate:en(o,"birth"),sex:rn(e[7]),expiryDate:en(a,"expiry"),optional:Qr(t.slice(15,30)+e.slice(18,29)),valid:0===n.length,errors:n}}(e[0],e[1],e[2],t):null}var sn=t=>String(t).padStart(2,"0"),on=t=>`${t.getFullYear()}-${sn(t.getMonth()+1)}-${sn(t.getDate())}T${sn(t.getHours())}:${sn(t.getMinutes())}`,an=t=>{const[e,i]=t.split(":").map(Number);return 60*(e??0)+(i??0)},un=t=>(t.getDay()+6)%7+1;function hn(t,e=new Date){const i=t.days?.length?t.days:[1,2,3,4,5],r=an(t.from??"08:00"),n=an(t.to??"17:00"),s=Math.max(5,t.duration??30),o=Math.max(1,t.horizonDays??14),a=60*(t.noticeHours??0),u=new Set(t.exclude??[]),h=new Date(e.getTime()+6e4*a),c=[];for(let t=0;t<o;t++){const o=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t);if(i.includes(un(o))&&!u.has(on(o).slice(0,10)))for(let t=r;t+s<=n;t+=s){const e=new Date(o.getFullYear(),o.getMonth(),o.getDate(),Math.floor(t/60),t%60);if(e<h)continue;const i=new Date(e.getTime()+6e4*s),r=on(e);c.push({id:r,start:r,end:on(i)})}}return c}function cn(t){const e=Array.isArray(t)?t:t&&"object"==typeof t?t.slots??t.data:void 0;return Array.isArray(e)?e.filter((t=>!!t&&"object"==typeof t)).map((t=>({id:String(t.id??t.start??""),start:String(t.start??""),end:String(t.end??""),..."number"==typeof t.remaining?{remaining:t.remaining}:{}}))).filter((t=>t.id&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(t.start))):[]}function fn(t){const e=new Map;for(const i of[...t].sort(((t,e)=>t.start.localeCompare(e.start)))){if(void 0!==i.remaining&&i.remaining<=0)continue;const t=i.start.slice(0,10);e.set(t,[...e.get(t)??[],i])}return[...e.entries()].map((([t,e])=>({day:t,slots:e})))}var ln=t=>Object.entries(t??{}).filter((([,t])=>!0===t?.incorrect)).map((([t])=>t)),dn=(t,e)=>{const i=e(t),r=t.children?.map((t=>dn(t,e)));if(i===t.configs&&r===t.children)return t;const n={...t};return void 0===i?delete n.configs:n.configs=i,r&&(n.children=r),n};function pn(t){return dn(t,(t=>t.configs?.uid?t.configs:{...t.configs,uid:crypto.randomUUID()}))}function mn(t){return dn(t,(t=>{if(!t.configs||!("uid"in t.configs))return t.configs;const{uid:e,...i}=t.configs;return Object.keys(i).length>0?i:void 0}))}var vn=(t,e)=>Array.isArray(t)?t.map((t=>vn(t,e))):(t=>null!=t&&"object"==typeof t&&!Array.isArray(t)&&"string"==typeof t.type&&"string"==typeof t.id)(t)?mn(t):e.endsWith("/configs")&&null!=t&&"object"==typeof t?(t=>{const{uid:e,...i}=t;return i})(t):t;function yn(t){return t.map((t=>"value"in t?{...t,value:vn(t.value,t.path)}:t))}class gn{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var bn=ze(Qi()),$n=ze(tr()),wn=ze(rr()),_n=new bn.Ajv({allErrors:!0});wn.default(_n,["email","uri"]),$n.default(_n);for(const t of["fr-nir","bj-npi","fr-siren","fr-siret","bj-ifu","iban",...Array.from({length:20},((t,e)=>`digits-${e+1}`))])_n.addFormat(`identity-${t}`,(e=>Wr(t,e)));_n.addKeyword({keyword:"dateRange",type:"object",schemaType:"boolean",validate:(t,e)=>!t||!e?.from||!e?.to||e.from<=e.to}),_n.addKeyword({keyword:"mrzValid",type:"object",schemaType:"boolean",validate:(t,e)=>!t||!0===e?.valid});var En=new WeakMap,kn=new WeakMap,Sn=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?Sn(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},xn=(t,e,i,r)=>{const n={},s=((t,e)=>{let i=En.get(t);i||(i=new Map,En.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=sr(t,e);return"string"==typeof i?i:void 0};for(const o of cr(t)){const t=o.configs?.key,a=!0===o.configs?.multiple&&"object"===o.dataType?"array":o.dataType;if(!t||!a||"void"===a)continue;const u=o.validations?.find((t=>"required"===t.validator)),h={type:a,nullable:!u},c={type:ur("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??ur(i,e,r);"minLength"===i&&null!=r?(h.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(h.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(h.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(h.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(h.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(h.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(h.maxItems=Number(r),c.maxItems=n):"email"===i?(h.format="email",c.format=n):"url"===i&&(h.format="uri",c.format=n)}"iban"===o.id&&(h.format="identity-iban",c.format=ur("iban",e)),"national-id"!==o.id&&"tax-id"!==o.id||"string"!=typeof o.configs?.idFormat||!o.configs.idFormat||(h.format=`identity-${o.configs.idFormat}`,c.format=ur("identity",e)),"date-range"===o.id&&(h.dateRange=!0,c.dateRange=ur("dateRange",e)),"mrz"===o.id&&(h.mrzValid=!0,c.mrzValid=ur("mrz",e)),h.errorMessage=c,i[t]=h,u&&(r.push(t),n[t]=s(u.message)??ur("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=_n.compile(s)}catch(e){return void((t,e)=>{const i=e instanceof Error?e.message:String(e);kn.set(t,`the validation schema failed to compile, so no rule was enforced: ${i}`)})(t,e)}i.set(r,n)}return n})(t,i);if(s&&!s(e))for(const t of s.errors??[]){const e=Sn(t);e&&!(e in n)&&t.message&&(n[e]=t.message)}for(const[r,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of cr(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Ur(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=sr(s.message,i);r[t]="string"==typeof e?e:ur("custom",i)}}}return r})(t,e,i)))r in n||(n[r]=s);const o=r??("object"==typeof e&&null!==e?e:void 0);for(const e of((t,e)=>{const i=new Set,r=(t,n)=>{const s=n||!!t.rules?.length&&!0===qr(t.rules,e).hidden,o=t.configs?.key;if(s&&o&&i.add(o),"collection"!==t.type)for(const e of t.children??[])r(e,s)};return r(t,!1),i})(t,o))delete n[e];return{valid:0===Object.keys(n).length,errors:n}};function On(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function jn(t,e){const[i,...r]=e.split(".");if("0"!==i)return;let n=t;for(const t of r){if(!/^\d+$/.test(t))return;n=n?.children?.[Number(t)]}return n}var Pn=(Ie??Ce).applyPatch,In=(t,e,i)=>({spec:Pn(t,e,!0,!1).newDocument,patches:e,inverse:i}),Cn=(t,e)=>{const i=jn(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},An=(t,e)=>({pointer:On(e),brick:Cn(t,e)}),Nn=t=>JSON.parse(JSON.stringify(t));function Tn(t,e,i,r){const n=Cn(t,i),s=On(i),o=Nn(e);if(!n.children){const e=`${s}/children`;return In(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return In(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function Mn(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=Cn(t,e),r=On(e);return In(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function Rn(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=Cn(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],u=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),h=[...s];if(u){if(h[o]===a&&h.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);h[o]>a&&(h[o]-=1)}const c=On(e),f=On(h.join("."));return In(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var Dn=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(Dn)}:{}});function zn(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=Cn(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=On([...r.slice(0,-1),String(n)].join(".")),o=Dn(Nn(i));return In(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var Ln=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?In(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):In(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function Un(t,e,i){const{pointer:r,brick:n}=An(t,e),s={...n.configs,...i};return Ln(t,r,"configs",s,n.configs)}function qn(t,e,i){const{pointer:r,brick:n}=An(t,e),s={...n.styles,...i};return Ln(t,r,"styles",s,n.styles)}function Fn(t,e,i){const{pointer:r,brick:n}=An(t,e);return Ln(t,r,"validations",i,n.validations)}function Bn(t,e,i){const{pointer:r,brick:n}=An(t,e);return Ln(t,r,"rules",i,n.rules)}class Vn{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),Pn(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),Pn(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}var Gn=t=>"nested-form"===t.id&&"string"==typeof t.configs?.specRef,Hn=t=>{if(!t)return!1;for(const{brick:e}of hr(t))if(Gn(e)&&e.configs?.specRef)return!0;return!1};async function Jn(t,e={}){const i=e.specSourceService??Lr.specSourceService,r=e.maxDepth??5,n=async(t,e)=>{if(Gn(t)&&t.configs?.specRef){const s=String(t.configs.specRef);if(e.includes(s))throw new Error(`Circular nested form reference: ${[...e,s].join(" → ")}`);if(e.length>=r)throw new Error(`Nested forms exceed the maximum depth of ${r} (${s})`);const o=await i.fetchSpec(s),a=await n(structuredClone(o),[...e,s]);return{type:"panel",id:"group",name:t.name,configs:{...t.configs,label:t.configs.label??a.name},styles:t.styles,rules:t.rules,children:a.children??[]}}return t.children?.length?{...t,children:await Promise.all(t.children.map((t=>n(t,e))))}:t};return n(structuredClone(t),[])}export{nr as A,Ar as B,Tr as C,Nr as D,mr as E,Ur as F,hn as G,cn as H,fn as I,cr as J,gn as K,Hr as L,sr as M,nn as N,Zr as O,wr as P,yr as Q,Vn as S,_r as a,Er as b,qr as c,lr as d,pn as e,ln as f,t as g,Tn as h,jn as i,Mn as j,zn as k,qn as l,Rn as m,Fn as n,Bn as o,hr as p,yn as q,or as r,Lr as s,mn as t,Un as u,xn as v,dr as w,fr as x,Hn as y,Jn as z}
|