From ee4693eaefc2fcbc2b4187cf9750b80ba183501d Mon Sep 17 00:00:00 2001 From: "Damian A. Pastorini" Date: Fri, 22 Nov 2024 21:29:26 +0100 Subject: [PATCH] - Reldens - Skeleton - Beta.38.2 --- dist/es-index.3928b1e6.js | 50 ++++++------ dist/index.3928b1e6.js | 50 ++++++------ dist/reldens-admin-client.js | 2 +- package-lock.json | 120 ++++++++++++++++++++++------ package.json | 6 +- theme/admin/reldens-admin-client.js | 2 +- 6 files changed, 151 insertions(+), 79 deletions(-) diff --git a/dist/es-index.3928b1e6.js b/dist/es-index.3928b1e6.js index b6eee29..4d4097b 100644 --- a/dist/es-index.3928b1e6.js +++ b/dist/es-index.3928b1e6.js @@ -1,4 +1,4 @@ -!function(e,t,i,n,r){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],o=a.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!o[t]){if(!e[t]){var r="function"==typeof s[n]&&s[n];if(!i&&r)return r(t,!0);if(a)return a(t,!0);if(h&&"string"==typeof t)return h(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return o[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=a,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return s[n]}}),s[n]=c;for(var l=0;l{s.clientStart()}),s.events.on("reldens.afterInitEngineAndStartGame",()=>{s.gameDom.getElement("#current-version").innerHTML=s.config.client.gameEngine.version+" -"}),s.events.on("reldens.startGameAfter",()=>{s.gameDom.getElement(".row-disclaimer")?.remove()}),s.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{if("rski.Bc"!==e.act)return;let t=(e.data?.skillKey||"").toString(),i=Number(e.data?.extraData?.sd||0);if(""!==t&&0=r){e.style.setProperty("--angle","360deg"),e.classList.remove("cooldown");return}e.style.setProperty("--angle",`${(i-r)/i*360}deg`),requestAnimationFrame(t)}()}})}),window.reldens=s},{f6a573e6a894b077:"blTPb","22d25a4cea3c3bc":"7ASKi"}],blTPb:[function(e,t,i){e("684699bf663c3eb9"),e("8524ab6b767fe50d");let{GameManager:n}=e("163628b93f1bf46b");t.exports.GameManager=n},{"684699bf663c3eb9":"6H8Vf","8524ab6b767fe50d":"ikKUq","163628b93f1bf46b":"eDoZE"}],"6H8Vf":[function(e,t,i){e("1784995cff40f4ee"),e("3db84f65815009e9"),e("eaee9f5716583d73"),e("375d8cdc37856052"),e("b97ac47c987ae87a"),e("a021542673f3dca5"),e("4917cb57871d338e"),e("32b253e39e74d8bb"),e("389e51d5714f687f"),e("f5e993e561fd02cd"),e("bb2bc4d4414bdde6"),e("efe695102c445413"),e("ccd56f09b115e545"),e("fcaf4e6617f043bc"),e("653d106c82dca6c3"),e("e3cead5be66b9f0d"),e("f0a4c78fa0016f60"),e("1d68ebee0b3f96f0"),e("af40359e9eb052ec"),e("b57c55c586369faa"),e("6e929cb8fa33300f"),e("a021c9c924d06b99"),e("c3a2ae3c387d24da"),e("4b806e1bc40e42a5"),e("4e1bbb4edd22e0ae"),e("716f90fa84e1f77c"),e("a4c895062bc52ef"),e("ab8b1e642f069677"),e("1c9c9c4583180611"),e("f74bd522ba638140"),e("161807fa85856503"),e("f48a3c099ac8e2b5"),e("8cf2e5f73ade81b4"),e("a9422cf3f5275913"),e("cc95b5c4842b3cba"),e("d5f0f9adde262121"),e("c2de5cf351f42e3e"),e("9b044f9dbdd9a543"),e("2c6c7828d3cbd4f7"),e("e4df5de4d418cbbb"),e("914cd91ef0bfb6f9"),e("6f128d6969e825b2"),e("f4ead5d4eb2af5d5"),e("b35e2d13cb589276"),e("c410e1b69fdd7adf"),e("312dd5f9138d6e43"),e("38530968f16263a0"),e("14af908df009beac"),e("dcd91f07678eb4c9"),e("c69d702ec59c2500"),e("4725bcb6f24869b3"),e("3cf52eabf83551bf"),e("c9cbfc3b3c78d70d"),e("6b0227180c3df38c"),e("e0fd70d02f07a4a0"),e("31a608e674c817eb"),e("b880a9dbebb02a2e"),e("46b1ee4ddc311f0"),e("8cf2fe9261c818db"),e("52fba706500b4b2d"),e("ffbe65a8f5be01e6"),e("e1e627d3acaf8d18"),e("f4d9392585892a5b"),e("b04a1a032c30e8d5"),e("c1de8697c29b0da"),e("16d0f8a09ff973a0"),e("a48b7fc982febaf8"),e("b40fbc8703ed802d"),e("71533dcee95bced0"),e("38d8d405ad51cb0c"),e("c8503c219bf01ed1"),e("bc082cafa79546ad"),e("204a0882af55ce2b"),e("a3152d34d8dd7b45"),e("873b1b5c61bcd33"),e("16d6ef4f50e3e6e9"),e("e872f08087c6cb33"),e("657cbbcd48650779"),e("4252d65d3677af5a"),e("281c6fd1d9df7324"),e("c31154b4d54b87f"),e("610034140e218c33"),e("1bc59f7bc4d02b94"),e("1ac49ff73550904e"),e("8fd22c15c1dc3fdb"),e("722244e22d484cd4"),e("d7ec35bad14a1f3f"),e("9bb45158b3bb60e5"),e("dbfda47097dcdc05"),e("62df99a6374ea8e7"),e("30f5c44d5b0c5882"),e("fa34aad1a54cb74f"),e("6e7dfd5f426811ae"),e("f6587d23159bb2e"),e("bb688511262fa331"),e("4ba8f97c77fe72fb"),e("d400d9af20e5e158"),e("89eb5ddf4e423e14"),e("cfeb658fb1129c7d"),e("cf52518d7e23221c"),e("593d4e7884fc0918"),e("30b35f30b6dba51d"),e("24519596b23105e8"),e("69b53c2db51c07c6"),e("cd51cbb6a384e947"),e("b2bec95e117c35ff"),e("e02033538de8d8c6"),e("bb0f24f71db75179"),e("7334e4338273fd72"),e("a00519108abb0534"),e("2835a3239b6a1bc4"),e("f5faf41ae9cf1c5"),e("5e6fa649046f5df2"),e("84775698f8fef6c0"),e("8c2455e35e11d959"),e("1cee7874e0ff2b2b"),e("6d098447a1b2abdc"),e("7d7d81ff5b818a49"),e("c33461c993e8e491"),e("64a89b8cfcf7ab12"),e("300ca7e5c4ba71de"),e("5ea06ea856112f5d"),e("2f95ea182a42efc3"),e("7e00e0c0121e6a90"),e("43c70c31a61cc402"),e("7f64762e2c0d0f2e"),e("7a6c9bba2845dabe"),e("73d9d26ef5a08f08"),e("f671014547fe0e5e"),e("b36c3c3b6e78e925"),e("a7f5dbf9fb623d0a"),e("465fceaf1bde589b"),e("7766539bc795a94"),e("4faee6716fa8629d"),e("7737fbcafb7ce523"),e("e90b0a3a493c0ede"),e("26317a793dea7e9a"),e("9f5e020a3549a118"),e("9d0bfe01231db1a7"),e("b1221eae0bc5f9b"),e("c5352c47687ac7c"),e("34fe45ae8ed17da0"),e("781c619e0cad12e2"),e("7c6b58bad8dc3b81"),e("736ca46bafb50f8f"),e("4a8b2b3ca7e4d0f0"),e("3fd33a4a9e23fb29"),e("88ad2704384a1a6e"),e("1c6c6da898bf18bb"),e("d239d0cd4a8ca65b"),e("11eae3d8cd132ecd"),e("31d0c33ce951164f"),e("55fc79bd0e9015ff"),e("4c7f59100f9f15df"),e("45eab59e8e26538d"),e("46220f971d58285"),e("37e3f8df977640b7"),e("4449d13eae7996a8"),e("197d7cc5dd2340b0"),e("1ec03223143b45c0"),e("b3160300f21af751"),e("efbae5e5ed53d7a4"),e("78d707d60e5ff2ef"),e("6aa1c963ba0fa26a"),e("29093847653ffb17"),e("b0554b151edd2f4"),e("c5299b37711c29ed"),e("334e6eea450261d0"),e("12c4df9fff4b4031"),e("9121fee042bcac7e"),e("5d62685ef5ad6e57"),e("3e4b4c735ca60ab9"),e("bb7017f5a1be1e59"),e("e8e708482f11c7ff"),e("74095422c65e093c"),e("6d6ea5c3920f0ba9"),e("3447041b04906440"),e("90c4a005313bad84"),e("4769b7aec07e6de3"),e("925b64021990cd94"),e("6b93322692746037"),e("faa76facff418618"),e("c9933e8bbe42bd93"),e("8689abb82cc2e305"),e("2b087e045ed8c999"),e("5345958572918685"),e("3be5275c466b41f8"),e("8aac76b9f2cbbdb5"),e("be9c14095a58943"),e("43202def26bf6f4d"),e("2d80f533903ef8af"),e("218de58a047e4122"),e("e9c3dc5d87196314"),e("e941f90445a42817"),e("5ec6c25f739e2e3"),e("dcf33a0bfc9dbd80"),e("11e994014f9ea4ef"),e("d3d2c1ecea6b651e"),e("2942bfa075e0734"),e("d33b293dd98ee251"),e("4d67970b1d16e278"),e("ea23a5ff87e419a"),e("a4ec7d06d49f6770"),e("68de4d9a4e90a51d"),e("91a33ef14a8f152c"),e("55178304aaa34b5d"),e("100585ac292d4d0a"),e("11bb9bd5ef85c385"),e("6985fc4c13b8c019"),e("9632a736fdb17734"),e("645f58b86974fd27"),e("679ce5136028bc60"),e("16129f94bb5d1db1"),e("4a20575877b9aa9"),e("f493cf27dec8fda2"),e("9455107212c82097"),e("7abb352823d027e3"),e("23cd38aa92bb5713"),e("7fa171f672c06c5"),e("d6c3f6742b067ddd"),e("687e66ea18227d4f"),e("4be9f7f33ab31972"),e("4b97ceec572fb5ac"),e("6962fb765acff151"),e("1a45d71179cc6824"),e("546ab40a97e46161"),e("b9d67d5f8399a961"),e("4d6a7c1e95ef8439"),e("61fca23ef75aa33f"),e("1c1cdf9b06016701"),e("397bfa6741ea05a1"),e("ec6da7c8737ed287"),e("9a3b23b9904e7580"),e("42c1ca9f44d09740"),e("6c230af164d5e531"),e("a1fd07c504fbd6e2"),e("c5418e31406f900c"),e("6bd1db6cc401cbae"),e("5cc85e0e2e9dc320"),e("e50d5b519a148fce"),e("57eafc4eec0ed5ad"),e("9f4e766b833041e1"),e("51d5ec10d288761f"),e("3df881631b0076c1"),e("6446691a409777d1"),e("65a0e8ac0e64097a"),e("ad09ac1fd0978c3"),e("c80f8d7a3d38c630"),e("c0e2fa2805edb141"),e("52fea7a5cc5e8460"),e("676052465cde8b83"),e("46e3f0ef3febe378"),e("901f94f4ed6ef4d5"),e("2f2afc7fe70ef5f"),e("fa4d7e950018d69e"),e("d0d844c58571e80e"),e("570e34e061eaecd7"),e("557af6dc34fe070e"),e("5dd137372fb5b1ae"),e("812633ee0adaf5e"),e("5be5bf591a25d61c"),e("c98746bc7e199094"),e("52278c0a5be7b19f"),e("fde31c759e8e1c42"),e("5254289c25b91dcf"),e("48ca9e9993ba0327"),e("72aac35e49a6d4bd"),e("37312397abe6d28c"),e("12be35b2aeed3ca4"),e("647a7c082cca257b"),e("a0e00f30db9559ea"),e("6c3ebd0eef294356"),e("a66668b79822160a"),e("72aa7e00c8a7b68f"),e("b1d489d5f98dd626"),e("687c365e52ca4b5b"),e("eedef7a537267c12"),e("f888c4da93185eae"),e("69fc7ceed4f23a4b"),e("a70b9f7f981f56ed"),e("698834137971c6a0"),e("6cbcff253173613e"),e("2d4e83632877e8a1"),e("1f6030e01de03bb8"),e("9e73dc5e3d85a023"),e("d24e5da7655d31c6"),e("e2c547d0925efa21"),e("9cb64708d269ee4d"),e("bad110743800027a"),t.exports=e("b02006442da3179e")},{"1784995cff40f4ee":"emAqF","3db84f65815009e9":"h8vRJ",eaee9f5716583d73:"1JQKT","375d8cdc37856052":"58q3y",b97ac47c987ae87a:"5NvUG",a021542673f3dca5:"lG7CT","4917cb57871d338e":"507Fo","32b253e39e74d8bb":"8PIx1","389e51d5714f687f":"a2cUC",f5e993e561fd02cd:"1yLDd",bb2bc4d4414bdde6:"9Ujdq",efe695102c445413:"45PgI",ccd56f09b115e545:"bJ9qS",fcaf4e6617f043bc:"3tmT4","653d106c82dca6c3":"lbpGg",e3cead5be66b9f0d:"hHHDm",f0a4c78fa0016f60:"aSTrG","1d68ebee0b3f96f0":"8nyV3",af40359e9eb052ec:"j1ABh",b57c55c586369faa:"3LJSA","6e929cb8fa33300f":"jYNHr",a021c9c924d06b99:"9D9sM",c3a2ae3c387d24da:"c1k6c","4b806e1bc40e42a5":"lbPxO","4e1bbb4edd22e0ae":"jKklH","716f90fa84e1f77c":"lMNyP",a4c895062bc52ef:"hPNfA",ab8b1e642f069677:"fURyF","1c9c9c4583180611":"6XyUS",f74bd522ba638140:"d83iu","161807fa85856503":"lc4NN",f48a3c099ac8e2b5:"gjqcj","8cf2e5f73ade81b4":"j3v3L",a9422cf3f5275913:"3rrfH",cc95b5c4842b3cba:"b10MD",d5f0f9adde262121:"2JgXG",c2de5cf351f42e3e:"3prNk","9b044f9dbdd9a543":"le1uL","2c6c7828d3cbd4f7":"eli4M",e4df5de4d418cbbb:"zkrYn","914cd91ef0bfb6f9":"6cM5k","6f128d6969e825b2":"j9q44",f4ead5d4eb2af5d5:"k2yB7",b35e2d13cb589276:"YvN4R",c410e1b69fdd7adf:"eqr1I","312dd5f9138d6e43":"gW4UQ","38530968f16263a0":"joaAA","14af908df009beac":"g2wAi",dcd91f07678eb4c9:"iJYnd",c69d702ec59c2500:"dnmIv","4725bcb6f24869b3":"i9xty","3cf52eabf83551bf":"iGG3n",c9cbfc3b3c78d70d:"iJJcs","6b0227180c3df38c":"afcZD",e0fd70d02f07a4a0:"dpjAZ","31a608e674c817eb":"dI1Cn",b880a9dbebb02a2e:"4XBJJ","46b1ee4ddc311f0":"4u8Zq","8cf2fe9261c818db":"9DwR1","52fba706500b4b2d":"hihCW",ffbe65a8f5be01e6:"cl0wd",e1e627d3acaf8d18:"kDbyn",f4d9392585892a5b:"v0oet",b04a1a032c30e8d5:"ilodQ",c1de8697c29b0da:"3sjfy","16d0f8a09ff973a0":"aJQbh",a48b7fc982febaf8:"cl2UC",b40fbc8703ed802d:"l89H5","71533dcee95bced0":"cHGz3","38d8d405ad51cb0c":"6OeqH",c8503c219bf01ed1:"j16TA",bc082cafa79546ad:"ltluo","204a0882af55ce2b":"l0eoZ",a3152d34d8dd7b45:"40OpE","873b1b5c61bcd33":"bC9Ow","16d6ef4f50e3e6e9":"dHKDg",e872f08087c6cb33:"giNSP","657cbbcd48650779":"1HJ0t","4252d65d3677af5a":"gfJCq","281c6fd1d9df7324":"2vgpU",c31154b4d54b87f:"aan7W","610034140e218c33":"h9LbS","1bc59f7bc4d02b94":"ldCGF","1ac49ff73550904e":"6gXbc","8fd22c15c1dc3fdb":"7deV1","722244e22d484cd4":"inQWU",d7ec35bad14a1f3f:"2qLeT","9bb45158b3bb60e5":"c3ILr",dbfda47097dcdc05:"223lQ","62df99a6374ea8e7":"f8Q6z","30f5c44d5b0c5882":"fKGrW",fa34aad1a54cb74f:"7o3jD","6e7dfd5f426811ae":"hXIP7",f6587d23159bb2e:"1aJqY",bb688511262fa331:"DQpS3","4ba8f97c77fe72fb":"9m0ga",d400d9af20e5e158:"6OW8r","89eb5ddf4e423e14":"8Ipne",cfeb658fb1129c7d:"bbe5P",cf52518d7e23221c:"giuXg","593d4e7884fc0918":"4Dfiq","30b35f30b6dba51d":"cIxH8","24519596b23105e8":"khz6l","69b53c2db51c07c6":"flBRC",cd51cbb6a384e947:"OdIjN",b2bec95e117c35ff:"5N41O",e02033538de8d8c6:"gqwBy",bb0f24f71db75179:"cjDQT","7334e4338273fd72":"hjxfV",a00519108abb0534:"lGEJr","2835a3239b6a1bc4":"8Egu9",f5faf41ae9cf1c5:"jWST5","5e6fa649046f5df2":"hrnKP","84775698f8fef6c0":"aXsIP","8c2455e35e11d959":"lsaNY","1cee7874e0ff2b2b":"8eW4I","6d098447a1b2abdc":"h5WTU","7d7d81ff5b818a49":"glrUF",c33461c993e8e491:"91CVe","64a89b8cfcf7ab12":"5JCvB","300ca7e5c4ba71de":"1UYJO","5ea06ea856112f5d":"966g1","2f95ea182a42efc3":"2u6nF","7e00e0c0121e6a90":"3Zya8","43c70c31a61cc402":"kEs9R","7f64762e2c0d0f2e":"czjHQ","7a6c9bba2845dabe":"9DWg9","73d9d26ef5a08f08":"8uazT",f671014547fe0e5e:"dLOib",b36c3c3b6e78e925:"bVBB2",a7f5dbf9fb623d0a:"9laFo","465fceaf1bde589b":"1E3wB","7766539bc795a94":"cCotT","4faee6716fa8629d":"htZZS","7737fbcafb7ce523":"b3JIq",e90b0a3a493c0ede:"kPfIJ","26317a793dea7e9a":"9ERxS","9f5e020a3549a118":"6T09z","9d0bfe01231db1a7":"nZQfS",b1221eae0bc5f9b:"6GBQI",c5352c47687ac7c:"g4f9X","34fe45ae8ed17da0":"eNC2R","781c619e0cad12e2":"czmee","7c6b58bad8dc3b81":"96RAZ","736ca46bafb50f8f":"3SReg","4a8b2b3ca7e4d0f0":"dOXap","3fd33a4a9e23fb29":"evHBo","88ad2704384a1a6e":"liWu9","1c6c6da898bf18bb":"a2AOJ",d239d0cd4a8ca65b:"yqtQx","11eae3d8cd132ecd":"4M7RG","31d0c33ce951164f":"7ybM1","55fc79bd0e9015ff":"csFkS","4c7f59100f9f15df":"6V0HA","45eab59e8e26538d":"26fdt","46220f971d58285":"8nI8r","37e3f8df977640b7":"dPzjA","4449d13eae7996a8":"50y6Q","197d7cc5dd2340b0":"cv1IN","1ec03223143b45c0":"g4HyM",b3160300f21af751:"fDjj9",efbae5e5ed53d7a4:"dejPc","78d707d60e5ff2ef":"kL7gw","6aa1c963ba0fa26a":"lQsQz","29093847653ffb17":"jy0xe",b0554b151edd2f4:"N0A9g",c5299b37711c29ed:"bnSd3","334e6eea450261d0":"hCLFJ","12c4df9fff4b4031":"jFiZs","9121fee042bcac7e":"1BYUa","5d62685ef5ad6e57":"3gYE0","3e4b4c735ca60ab9":"8Ariw",bb7017f5a1be1e59:"fpMBl",e8e708482f11c7ff:"5tIGd","74095422c65e093c":"14MkC","6d6ea5c3920f0ba9":"2JQK3","3447041b04906440":"9radj","90c4a005313bad84":"4cips","4769b7aec07e6de3":"eNQOe","925b64021990cd94":"5K8rr","6b93322692746037":"kdtyD",faa76facff418618:"aGaAQ",c9933e8bbe42bd93:"4l0Mz","8689abb82cc2e305":"1W6O8","2b087e045ed8c999":"iIMfF","5345958572918685":"ebh58","3be5275c466b41f8":"5aq0U","8aac76b9f2cbbdb5":"8hV4V",be9c14095a58943:"aU3RB","43202def26bf6f4d":"9kNJt","2d80f533903ef8af":"if1fM","218de58a047e4122":"g0fSy",e9c3dc5d87196314:"eKkbH",e941f90445a42817:"dLJLG","5ec6c25f739e2e3":"cDQpr",dcf33a0bfc9dbd80:"kFTda","11e994014f9ea4ef":"i2qFG",d3d2c1ecea6b651e:"6dNpA","2942bfa075e0734":"5JfZw",d33b293dd98ee251:"fU7MD","4d67970b1d16e278":"iz82g",ea23a5ff87e419a:"5PH9s",a4ec7d06d49f6770:"f2AVd","68de4d9a4e90a51d":"j2dUp","91a33ef14a8f152c":"2HEOd","55178304aaa34b5d":"4kyL0","100585ac292d4d0a":"fx5cJ","11bb9bd5ef85c385":"9GM5b","6985fc4c13b8c019":"ilZVq","9632a736fdb17734":"hUcmJ","645f58b86974fd27":"l2p2s","679ce5136028bc60":"3o3Gk","16129f94bb5d1db1":"4Lt39","4a20575877b9aa9":"3qZNd",f493cf27dec8fda2:"20tl2","9455107212c82097":"ahutJ","7abb352823d027e3":"f2UI4","23cd38aa92bb5713":"4XIfF","7fa171f672c06c5":"l1rs2",d6c3f6742b067ddd:"adYvn","687e66ea18227d4f":"gidCX","4be9f7f33ab31972":"bv1yh","4b97ceec572fb5ac":"kO1Zg","6962fb765acff151":"bgZU7","1a45d71179cc6824":"jgQND","546ab40a97e46161":"hB11V",b9d67d5f8399a961:"31EdS","4d6a7c1e95ef8439":"5PjpG","61fca23ef75aa33f":"fxnuD","1c1cdf9b06016701":"6jDOT","397bfa6741ea05a1":"gG1e8",ec6da7c8737ed287:"17kvf","9a3b23b9904e7580":"9B0y9","42c1ca9f44d09740":"3kbwg","6c230af164d5e531":"5wzd5",a1fd07c504fbd6e2:"1dCBn",c5418e31406f900c:"2Mqsz","6bd1db6cc401cbae":"eZZyP","5cc85e0e2e9dc320":"go8ZW",e50d5b519a148fce:"iCErC","57eafc4eec0ed5ad":"e8hfX","9f4e766b833041e1":"2kMmr","51d5ec10d288761f":"212MV","3df881631b0076c1":"9AC43","6446691a409777d1":"aqoug","65a0e8ac0e64097a":"iuJoY",ad09ac1fd0978c3:"czX8g",c80f8d7a3d38c630:"9XxKn",c0e2fa2805edb141:"7aRDd","52fea7a5cc5e8460":"k5Rlo","676052465cde8b83":"f3FBF","46e3f0ef3febe378":"4ZhIs","901f94f4ed6ef4d5":"9uG4h","2f2afc7fe70ef5f":"ccgrY",fa4d7e950018d69e:"dESGS",d0d844c58571e80e:"7G7OX","570e34e061eaecd7":"lGF1i","557af6dc34fe070e":"6biAe","5dd137372fb5b1ae":"8qlqb","812633ee0adaf5e":"lGQwY","5be5bf591a25d61c":"5EgJz",c98746bc7e199094:"hUSBX","52278c0a5be7b19f":"bN7du",fde31c759e8e1c42:"accWj","5254289c25b91dcf":"8zMXu","48ca9e9993ba0327":"bwjPE","72aac35e49a6d4bd":"4AZtq","37312397abe6d28c":"8EnX5","12be35b2aeed3ca4":"4Puey","647a7c082cca257b":"jxrdF",a0e00f30db9559ea:"jwPXF","6c3ebd0eef294356":"khTY5",a66668b79822160a:"a2DYE","72aa7e00c8a7b68f":"6bhjG",b1d489d5f98dd626:"fJnNi","687c365e52ca4b5b":"4teOf",eedef7a537267c12:"lCP8o",f888c4da93185eae:"1mZsz","69fc7ceed4f23a4b":"f5KUv",a70b9f7f981f56ed:"kONpx","698834137971c6a0":"h5L1l","6cbcff253173613e":"4J9Kt","2d4e83632877e8a1":"6WXZj","1f6030e01de03bb8":"jUFLb","9e73dc5e3d85a023":"fisJQ",d24e5da7655d31c6:"drhch",e2c547d0925efa21:"k5k9P","9cb64708d269ee4d":"eZzIO",bad110743800027a:"RkUgQ",b02006442da3179e:"iwjHr"}],emAqF:[function(e,t,i){e("9907e25c4a0aca96"),e("6ca7b218a3c5142b"),e("733763f50161f4ff"),e("c7e8ec39e8a501c2"),e("c7f11a8d456724")},{"9907e25c4a0aca96":"jpVKZ","6ca7b218a3c5142b":"epSXE","733763f50161f4ff":"k89ua",c7e8ec39e8a501c2:"fKGrW",c7f11a8d456724:"dZVa2"}],jpVKZ:[function(e,t,i){var n=e("aa5b0a4df7071e1c"),r=e("8c408afdfdfd6dab"),s=e("ec29447784c0114a"),a=e("2ae82c68e0ae40f"),o=e("33b2452838c11281"),h=e("fe806d898b4ac536"),c=e("22d83c4d1a79086a"),l=e("4d2b1c3a38702ef3"),u=e("e759feb93fde3dec"),d=e("5787c74359c86565"),f=e("cb32a2177bbbabaa"),p=e("20c01e2a38c99bca"),g=e("db20fe52e48e74e7"),m=e("62c50d67351dd58a"),v=e("22cebb6457d12409"),y=e("31dc62cd3a5d2fda"),b=e("14509c82c4f3e2e9"),x=e("e62ee144604e88fa"),E=e("d7fe574b8ddea4e9"),w=e("fc2b88a87581c564"),T=e("7260979738a18766"),S=e("c58a10205146713c"),A=e("a86b1c2861165466"),C=e("dfca683f72250bcc"),_=e("55a26bb040d83918"),I=e("97712bd669b06ccf"),O=e("b2130786c0cb0f80"),P=e("aaac558287b5aa94"),M=e("c6ea7d7218c4c1f0"),R=e("f4a251fc6a0ec32a"),L=e("2d3c3a8ae405672f"),D=e("a99e55c559023f8b"),k=e("baa63ea979fa51ca"),N=e("ecef47c4fbdd606b"),F=e("f57a8c7fd7d84ffb"),B=e("37236ad9fe95a3e"),U=e("c50230ad6eef7275").forEach,V=P("hidden"),G="Symbol",j="prototype",W=B.set,Y=B.getterFor(G),H=Object[j],z=r.Symbol,X=z&&z[j],q=r.RangeError,K=r.TypeError,J=r.QObject,$=T.f,Q=S.f,Z=E.f,ee=C.f,et=a([].push),ei=O("symbols"),en=O("op-symbols"),er=O("wks"),es=!J||!J[j]||!J[j].findChild,ea=function(e,t,i){var n=$(H,t);n&&delete H[t],Q(e,t,i),n&&e!==H&&Q(H,t,n)},eo=h&&l(function(){return 7!==y(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?ea:Q,eh=function(e,t){var i=ei[e]=y(X);return W(i,{type:G,tag:e,description:t}),h||(i.description=t),i},ec=function(e,t,i){e===H&&ec(en,t,i),f(e);var n=g(t);return(f(i),u(ei,n))?(i.enumerable?(u(e,V)&&e[V][n]&&(e[V][n]=!1),i=y(i,{enumerable:v(0,!1)})):(u(e,V)||Q(e,V,v(1,y(null))),e[V][n]=!0),eo(e,n,i)):Q(e,n,i)},el=function(e,t){f(e);var i=p(t);return U(b(i).concat(ep(i)),function(t){(!h||s(eu,i,t))&&ec(e,t,i[t])}),e},eu=function(e){var t=g(e),i=s(ee,this,t);return(!(this===H&&u(ei,t))||!!u(en,t))&&(!(i||!u(this,t)||!u(ei,t)||u(this,V)&&this[V][t])||i)},ed=function(e,t){var i=p(e),n=g(t);if(!(i===H&&u(ei,n))||u(en,n)){var r=$(i,n);return r&&u(ei,n)&&!(u(i,V)&&i[V][n])&&(r.enumerable=!0),r}},ef=function(e){var t=Z(p(e)),i=[];return U(t,function(e){u(ei,e)||u(M,e)||et(i,e)}),i},ep=function(e){var t=e===H,i=Z(t?en:p(e)),n=[];return U(i,function(e){u(ei,e)&&(!t||u(H,e))&&et(n,ei[e])}),n};c||(_(X=(z=function(){if(d(X,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=R(e),i=function(e){var n=void 0===this?r:this;n===H&&s(i,en,e),u(n,V)&&u(n[V],t)&&(n[V][t]=!1);var a=v(1,e);try{eo(n,t,a)}catch(e){if(!(e instanceof q))throw e;ea(n,t,a)}};return h&&es&&eo(H,t,{configurable:!0,set:i}),eh(t,e)})[j],"toString",function(){return Y(this).tag}),_(z,"withoutSetter",function(e){return eh(R(e),e)}),C.f=eu,S.f=ec,A.f=el,T.f=ed,x.f=E.f=ef,w.f=ep,D.f=function(e){return eh(L(e),e)},h&&(I(X,"description",{configurable:!0,get:function(){return Y(this).description}}),o||_(H,"propertyIsEnumerable",eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),U(b(er),function(e){k(e)}),n({target:G,stat:!0,forced:!c},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!h},{create:function(e,t){return void 0===t?y(e):el(y(e),t)},defineProperty:ec,defineProperties:el,getOwnPropertyDescriptor:ed}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ef}),N(),F(z,G),M[V]=!0},{aa5b0a4df7071e1c:"gJg5v","8c408afdfdfd6dab":"7Z171",ec29447784c0114a:"bOssl","2ae82c68e0ae40f":"2iJ57","33b2452838c11281":"jHRGA",fe806d898b4ac536:"6mXK1","22d83c4d1a79086a":"kkRwC","4d2b1c3a38702ef3":"cXVrS",e759feb93fde3dec:"9JWVX","5787c74359c86565":"d5bNd",cb32a2177bbbabaa:"dPzbI","20c01e2a38c99bca":"h9ut0",db20fe52e48e74e7:"gvuJs","62c50d67351dd58a":"4x6uB","22cebb6457d12409":"5toj2","31dc62cd3a5d2fda":"7isQ3","14509c82c4f3e2e9":"kQgZQ",e62ee144604e88fa:"dDV3S",d7fe574b8ddea4e9:"bBGHM",fc2b88a87581c564:"f3eHQ","7260979738a18766":"aRu9T",c58a10205146713c:"hvqCQ",a86b1c2861165466:"ePigI",dfca683f72250bcc:"7Av2Z","55a26bb040d83918":"4CPdc","97712bd669b06ccf":"3NI4M",b2130786c0cb0f80:"i30ST",aaac558287b5aa94:"k5X1l",c6ea7d7218c4c1f0:"4qgYA",f4a251fc6a0ec32a:"55cC0","2d3c3a8ae405672f":"5CuF7",a99e55c559023f8b:"cwsJo",baa63ea979fa51ca:"jiIFu",ecef47c4fbdd606b:"3ujL7",f57a8c7fd7d84ffb:"dkhk9","37236ad9fe95a3e":"ixHS2",c50230ad6eef7275:"daQdc"}],gJg5v:[function(e,t,i){var n=e("23dea28abc8414d1"),r=e("2ec751f39e500b85").f,s=e("b4567636b28a3b3a"),a=e("50460aa43dd4048a"),o=e("581238c99f8c2c30"),h=e("566a383894c688bc"),c=e("f0e2e697f04e8ad9");t.exports=function(e,t){var i,l,u,d,f,p=e.target,g=e.global,m=e.stat;if(i=g?n:m?n[p]||o(p,{}):n[p]&&n[p].prototype)for(l in t){if(d=t[l],u=e.dontCallGetSet?(f=r(i,l))&&f.value:i[l],!c(g?l:p+(m?".":"#")+l,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;h(d,u)}(e.sham||u&&u.sham)&&s(d,"sham",!0),a(i,l,d,e)}}},{"23dea28abc8414d1":"7Z171","2ec751f39e500b85":"aRu9T",b4567636b28a3b3a:"gKM90","50460aa43dd4048a":"4CPdc","581238c99f8c2c30":"huhcf","566a383894c688bc":"d9xyM",f0e2e697f04e8ad9:"gE5NQ"}],"7Z171":[function(e,t,i){var n=arguments[3],r=function(e){return e&&e.Math===Math&&e};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},{}],aRu9T:[function(e,t,i){var n=e("c04e6fb248689dba"),r=e("553ec943aa2a4554"),s=e("bbc5e69071aa2fbd"),a=e("1d2ffbfd99e01f41"),o=e("c4ea69a78a643d87"),h=e("8ab18ff766aa2ab9"),c=e("3761c5d34b7aa48f"),l=e("c4dfcc26308f1b4a"),u=Object.getOwnPropertyDescriptor;i.f=n?u:function(e,t){if(e=o(e),t=h(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!r(s.f,e,t),e[t])}},{c04e6fb248689dba:"6mXK1","553ec943aa2a4554":"bOssl",bbc5e69071aa2fbd:"7Av2Z","1d2ffbfd99e01f41":"5toj2",c4ea69a78a643d87:"h9ut0","8ab18ff766aa2ab9":"gvuJs","3761c5d34b7aa48f":"9JWVX",c4dfcc26308f1b4a:"lahqe"}],"6mXK1":[function(e,t,i){var n=e("735b783268fd06c0");t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"735b783268fd06c0":"cXVrS"}],cXVrS:[function(e,t,i){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],bOssl:[function(e,t,i){var n=e("44e025d030d66023"),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},{"44e025d030d66023":"3p5v0"}],"3p5v0":[function(e,t,i){var n=e("2642aa7619056f20");t.exports=!n(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"2642aa7619056f20":"cXVrS"}],"7Av2Z":[function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);i.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},{}],"5toj2":[function(e,t,i){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],h9ut0:[function(e,t,i){var n=e("9d8f8f50ac9468eb"),r=e("f7224aed72953ac4");t.exports=function(e){return n(r(e))}},{"9d8f8f50ac9468eb":"kuAas",f7224aed72953ac4:"cHxZN"}],kuAas:[function(e,t,i){var n=e("7ba7e65983d7b662"),r=e("df551e12a7c872dd"),s=e("1d34ea813cebff9c"),a=Object,o=n("".split);t.exports=r(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):a(e)}:a},{"7ba7e65983d7b662":"2iJ57",df551e12a7c872dd:"cXVrS","1d34ea813cebff9c":"161sQ"}],"2iJ57":[function(e,t,i){var n=e("829dd7a4e960cf9e"),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);t.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},{"829dd7a4e960cf9e":"3p5v0"}],"161sQ":[function(e,t,i){var n=e("1c71c3f6daac476c"),r=n({}.toString),s=n("".slice);t.exports=function(e){return s(r(e),8,-1)}},{"1c71c3f6daac476c":"2iJ57"}],cHxZN:[function(e,t,i){var n=e("74607922ed30019f"),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},{"74607922ed30019f":"8AxCV"}],"8AxCV":[function(e,t,i){t.exports=function(e){return null==e}},{}],gvuJs:[function(e,t,i){var n=e("53a3a67ac381c4e8"),r=e("b992ca9cdcf7937b");t.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},{"53a3a67ac381c4e8":"cCley",b992ca9cdcf7937b:"2ZU2p"}],cCley:[function(e,t,i){var n=e("70235907dc93b4b0"),r=e("46fb53dace408c8e"),s=e("677bdc4d74d2f983"),a=e("80395bcde336a28b"),o=e("49552a7324952190"),h=e("aea01c71276624bf"),c=TypeError,l=h("toPrimitive");t.exports=function(e,t){if(!r(e)||s(e))return e;var i,h=a(e,l);if(h){if(void 0===t&&(t="default"),!r(i=n(h,e,t))||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},{"70235907dc93b4b0":"bOssl","46fb53dace408c8e":"8mxCV","677bdc4d74d2f983":"2ZU2p","80395bcde336a28b":"2qR8N","49552a7324952190":"6aMZM",aea01c71276624bf:"5CuF7"}],"8mxCV":[function(e,t,i){var n=e("f87cee1cb79cbcca");t.exports=function(e){return"object"==typeof e?null!==e:n(e)}},{f87cee1cb79cbcca:"h1Wnr"}],h1Wnr:[function(e,t,i){var n="object"==typeof document&&document.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},{}],"2ZU2p":[function(e,t,i){var n=e("6b6c481cdfb7df35"),r=e("2af44fcbdbf14c83"),s=e("76e903e830c40e7c"),a=e("7e2fe930b3598e22"),o=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},{"6b6c481cdfb7df35":"e5ie6","2af44fcbdbf14c83":"h1Wnr","76e903e830c40e7c":"d5bNd","7e2fe930b3598e22":"6doR5"}],e5ie6:[function(e,t,i){var n=e("e057fc33d60763c1"),r=e("f1d62079325906cb");t.exports=function(e,t){var i;return arguments.length<2?r(i=n[e])?i:void 0:n[e]&&n[e][t]}},{e057fc33d60763c1:"7Z171",f1d62079325906cb:"h1Wnr"}],d5bNd:[function(e,t,i){var n=e("83f14842ef67e16a");t.exports=n({}.isPrototypeOf)},{"83f14842ef67e16a":"2iJ57"}],"6doR5":[function(e,t,i){var n=e("da4a972af0214ea0");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{da4a972af0214ea0:"kkRwC"}],kkRwC:[function(e,t,i){var n=e("53b951dfb9de4d22"),r=e("b37df495bcdc1d99"),s=e("e5929e9affd2affc").String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"53b951dfb9de4d22":"co76c",b37df495bcdc1d99:"cXVrS",e5929e9affd2affc:"7Z171"}],co76c:[function(e,t,i){var n,r,s=e("d049c1c2aa0eee5b"),a=e("4eb5796bbafe334d"),o=s.process,h=s.Deno,c=o&&o.versions||h&&h.version,l=c&&c.v8;l&&(r=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},{d049c1c2aa0eee5b:"7Z171","4eb5796bbafe334d":"5hj4U"}],"5hj4U":[function(e,t,i){var n=e("888bcb4c75dc4ad").navigator,r=n&&n.userAgent;t.exports=r?String(r):""},{"888bcb4c75dc4ad":"7Z171"}],"2qR8N":[function(e,t,i){var n=e("bbfed17b24e215f4"),r=e("492a86e2970f6a26");t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},{bbfed17b24e215f4:"alrlv","492a86e2970f6a26":"8AxCV"}],alrlv:[function(e,t,i){var n=e("4094667126ecac05"),r=e("fce2a7573db493fa"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},{"4094667126ecac05":"h1Wnr",fce2a7573db493fa:"3zerS"}],"3zerS":[function(e,t,i){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],"6aMZM":[function(e,t,i){var n=e("abe9ca006f56626e"),r=e("c96b3a89fec6248a"),s=e("551615fda0214f1b"),a=TypeError;t.exports=function(e,t){var i,o;if("string"===t&&r(i=e.toString)&&!s(o=n(i,e))||r(i=e.valueOf)&&!s(o=n(i,e))||"string"!==t&&r(i=e.toString)&&!s(o=n(i,e)))return o;throw new a("Can't convert object to primitive value")}},{abe9ca006f56626e:"bOssl",c96b3a89fec6248a:"h1Wnr","551615fda0214f1b":"8mxCV"}],"5CuF7":[function(e,t,i){var n=e("ad5ef4474219c101"),r=e("6a2cda01df6b4c79"),s=e("dccc28ffa5beeb54"),a=e("48d6af1225853d44"),o=e("9f762329148684"),h=e("1ce268781e409df2"),c=n.Symbol,l=r("wks"),u=h?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return s(l,e)||(l[e]=o&&s(c,e)?c[e]:u("Symbol."+e)),l[e]}},{ad5ef4474219c101:"7Z171","6a2cda01df6b4c79":"i30ST",dccc28ffa5beeb54:"9JWVX","48d6af1225853d44":"55cC0","9f762329148684":"kkRwC","1ce268781e409df2":"6doR5"}],i30ST:[function(e,t,i){var n=e("84eeed9891aafe14");t.exports=function(e,t){return n[e]||(n[e]=t||{})}},{"84eeed9891aafe14":"jKWHg"}],jKWHg:[function(e,t,i){var n=e("7b43004672b1879f"),r=e("bc8329e77dc2c1cc"),s=e("dfb72a1d809f7b02"),a="__core-js_shared__",o=t.exports=r[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"7b43004672b1879f":"jHRGA",bc8329e77dc2c1cc:"7Z171",dfb72a1d809f7b02:"huhcf"}],jHRGA:[function(e,t,i){t.exports=!1},{}],huhcf:[function(e,t,i){var n=e("2d1c29655635b9ea"),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},{"2d1c29655635b9ea":"7Z171"}],"9JWVX":[function(e,t,i){var n=e("f5dcaa60a713971f"),r=e("ab17c4f45fcf0841"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},{f5dcaa60a713971f:"2iJ57",ab17c4f45fcf0841:"6oQEu"}],"6oQEu":[function(e,t,i){var n=e("f45a7b5dcdc4a410"),r=Object;t.exports=function(e){return r(n(e))}},{f45a7b5dcdc4a410:"cHxZN"}],"55cC0":[function(e,t,i){var n=e("5da0fe4507da20a3"),r=0,s=Math.random(),a=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+s,36)}},{"5da0fe4507da20a3":"2iJ57"}],lahqe:[function(e,t,i){var n=e("9b4278b13c076bf"),r=e("8aee5d88a5f9b6b5"),s=e("1db4d60148afcf21");t.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"9b4278b13c076bf":"6mXK1","8aee5d88a5f9b6b5":"cXVrS","1db4d60148afcf21":"SppDD"}],SppDD:[function(e,t,i){var n=e("845bcece0e6d354"),r=e("824df78b2e007250"),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"845bcece0e6d354":"7Z171","824df78b2e007250":"8mxCV"}],gKM90:[function(e,t,i){var n=e("a8753383ef98ee18"),r=e("189ab650b8f71085"),s=e("1168c8162aa30435");t.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},{a8753383ef98ee18:"6mXK1","189ab650b8f71085":"hvqCQ","1168c8162aa30435":"5toj2"}],hvqCQ:[function(e,t,i){var n=e("ca50eb9163928400"),r=e("d482f9e5478795e8"),s=e("b6ad7537efb06f4b"),a=e("16365a73399e7fe7"),o=e("fab1d366c47796d9"),h=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";i.f=n?s?function(e,t,i){if(a(e),t=o(t),a(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=l(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(a(e),t=o(t),a(i),r)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},{ca50eb9163928400:"6mXK1",d482f9e5478795e8:"lahqe",b6ad7537efb06f4b:"e457x","16365a73399e7fe7":"dPzbI",fab1d366c47796d9:"gvuJs"}],e457x:[function(e,t,i){var n=e("b22a5a2de93e3ad2"),r=e("249a5b857c2dfccd");t.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{b22a5a2de93e3ad2:"6mXK1","249a5b857c2dfccd":"cXVrS"}],dPzbI:[function(e,t,i){var n=e("2b6c6258a0a6082f"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},{"2b6c6258a0a6082f":"8mxCV"}],"4CPdc":[function(e,t,i){var n=e("99ee13632b3fa68"),r=e("9ebb3e3004fccc0a"),s=e("f10cc812a3094053"),a=e("d354802d852d9c2b");t.exports=function(e,t,i,o){o||(o={});var h=o.enumerable,c=void 0!==o.name?o.name:t;if(n(i)&&s(i,c,o),o.global)h?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(h=!0):delete e[t]}catch(e){}h?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},{"99ee13632b3fa68":"h1Wnr","9ebb3e3004fccc0a":"hvqCQ",f10cc812a3094053:"1fkJp",d354802d852d9c2b:"huhcf"}],"1fkJp":[function(e,t,i){var n=e("ca84677f1ebd1804"),r=e("13360f2842eba261"),s=e("103e488c0928755a"),a=e("cbf9b0e0779cc368"),o=e("3f2eb7efeae2f72b"),h=e("548b10f284264c72").CONFIGURABLE,c=e("358f00f3103bd55b"),l=e("9b2ce14119fd2412"),u=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=o&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=t.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+m(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||h&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&i&&a(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return a(n,"source")||(n.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function(){return s(this)&&d(this).source||c(this)},"toString")},{ca84677f1ebd1804:"2iJ57","13360f2842eba261":"cXVrS","103e488c0928755a":"h1Wnr",cbf9b0e0779cc368:"9JWVX","3f2eb7efeae2f72b":"6mXK1","548b10f284264c72":"jmu0n","358f00f3103bd55b":"3JJEO","9b2ce14119fd2412":"ixHS2"}],jmu0n:[function(e,t,i){var n=e("8ad2bacb0e20b95c"),r=e("4eabfd8f83afc9d5"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),h=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:o&&"something"===(function(){}).name,CONFIGURABLE:h}},{"8ad2bacb0e20b95c":"6mXK1","4eabfd8f83afc9d5":"9JWVX"}],"3JJEO":[function(e,t,i){var n=e("26e26db98367212e"),r=e("40ed9a4f6ae66648"),s=e("485d48d6f4c6739e"),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),t.exports=s.inspectSource},{"26e26db98367212e":"2iJ57","40ed9a4f6ae66648":"h1Wnr","485d48d6f4c6739e":"jKWHg"}],ixHS2:[function(e,t,i){var n,r,s,a=e("d3f0c9f3327b2fd6"),o=e("28c3574d0c39fe7e"),h=e("f82e6cc0ac249fa5"),c=e("c0ae163eea4ef97"),l=e("6dea7358344877bb"),u=e("3e035a1241da2f0"),d=e("88d6ccc27e779e5a"),f=e("d40b9b3abdbb956e"),p="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||u.state){var v=u.state||(u.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(p);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(l(e,y))throw new g(p);return t.facade=e,c(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},s=function(e){return l(e,y)}}t.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!h(t)||(i=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}}}},{d3f0c9f3327b2fd6:"lIC7p","28c3574d0c39fe7e":"7Z171",f82e6cc0ac249fa5:"8mxCV",c0ae163eea4ef97:"gKM90","6dea7358344877bb":"9JWVX","3e035a1241da2f0":"jKWHg","88d6ccc27e779e5a":"k5X1l",d40b9b3abdbb956e:"4qgYA"}],lIC7p:[function(e,t,i){var n=e("8b1a8c1dbfd18eb5"),r=e("aa77fff8d5ef0565"),s=n.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},{"8b1a8c1dbfd18eb5":"7Z171",aa77fff8d5ef0565:"h1Wnr"}],k5X1l:[function(e,t,i){var n=e("dbc8182adeb8c92f"),r=e("90b4ffb58508a6e5"),s=n("keys");t.exports=function(e){return s[e]||(s[e]=r(e))}},{dbc8182adeb8c92f:"i30ST","90b4ffb58508a6e5":"55cC0"}],"4qgYA":[function(e,t,i){t.exports={}},{}],d9xyM:[function(e,t,i){var n=e("d91d786cc71453ce"),r=e("88cb809f98beddc6"),s=e("10ea642aad5f7c21"),a=e("39ff598ce822187e");t.exports=function(e,t,i){for(var o=r(t),h=a.f,c=s.f,l=0;lc;)r(n,i=t[c++])&&(~a(l,i)||h(l,i));return l}},{"363ee0e6bb4f46a7":"2iJ57","3183fe0b0bf6f6ac":"9JWVX","28192ac12e934672":"h9ut0",a5f9c5d8e993ccd6:"7HT32","57775908f1581bc6":"4qgYA"}],"7HT32":[function(e,t,i){var n=e("d5dcbcd68ac5acd0"),r=e("212b13aecfa48226"),s=e("e5a8b3e1da4c5637"),a=function(e){return function(t,i,a){var o,h=n(t),c=s(h);if(0===c)return!e&&-1;var l=r(a,c);if(e&&i!=i){for(;c>l;)if((o=h[l++])!=o)return!0}else for(;c>l;l++)if((e||l in h)&&h[l]===i)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{d5dcbcd68ac5acd0:"h9ut0","212b13aecfa48226":"47gaI",e5a8b3e1da4c5637:"kHSes"}],"47gaI":[function(e,t,i){var n=e("72fe0a53ad43912c"),r=Math.max,s=Math.min;t.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},{"72fe0a53ad43912c":"gAgUH"}],gAgUH:[function(e,t,i){var n=e("3403cba02b5f61d8");t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},{"3403cba02b5f61d8":"8w9Yn"}],"8w9Yn":[function(e,t,i){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}},{}],kHSes:[function(e,t,i){var n=e("23d9716c54a2ab90");t.exports=function(e){return n(e.length)}},{"23d9716c54a2ab90":"lQsU7"}],lQsU7:[function(e,t,i){var n=e("c48d3a8b8ac52b0b"),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},{c48d3a8b8ac52b0b:"gAgUH"}],"7POW9":[function(e,t,i){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],f3eHQ:[function(e,t,i){i.f=Object.getOwnPropertySymbols},{}],gE5NQ:[function(e,t,i){var n=e("10299561ea0c7870"),r=e("8b1ecdaf59f07210"),s=/#|\.prototype\./,a=function(e,t){var i=h[o(e)];return i===l||i!==c&&(r(t)?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},h=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},{"10299561ea0c7870":"cXVrS","8b1ecdaf59f07210":"h1Wnr"}],"4x6uB":[function(e,t,i){var n=e("3e4265f3f6994add"),r=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},{"3e4265f3f6994add":"cRCRk"}],cRCRk:[function(e,t,i){var n=e("397e535b3976d304"),r=e("eebd8012c2d2c3ae"),s=e("8da113eeaf06c4ba"),a=e("df252844008f634")("toStringTag"),o=Object,h="Arguments"===s(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};t.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=o(e),a))?i:h?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},{"397e535b3976d304":"9axlf",eebd8012c2d2c3ae:"h1Wnr","8da113eeaf06c4ba":"161sQ",df252844008f634:"5CuF7"}],"9axlf":[function(e,t,i){var n=e("6306cd4835715127")("toStringTag"),r={};r[n]="z",t.exports="[object z]"===String(r)},{"6306cd4835715127":"5CuF7"}],"7isQ3":[function(e,t,i){var n,r=e("3bbe31d8f504111f"),s=e("a9712f03fc468b49"),a=e("d9e0c389f84efa79"),o=e("8a43b6a211717cde"),h=e("78d31e3a50d79c6e"),c=e("e29f7e32a0583f3"),l=e("a6edaba97f293fc9"),u="prototype",d="script",f=l("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe");return t.style.display="none",h.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},y=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}y="undefined"!=typeof document?document.domain&&n?m(n):v():m(n);for(var e=a.length;e--;)delete y[u][a[e]];return y()};o[f]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(p[u]=r(e),i=new p,p[u]=null,i[f]=e):i=y(),void 0===t?i:s.f(i,t)}},{"3bbe31d8f504111f":"dPzbI",a9712f03fc468b49:"ePigI",d9e0c389f84efa79:"7POW9","8a43b6a211717cde":"4qgYA","78d31e3a50d79c6e":"23b1K",e29f7e32a0583f3:"SppDD",a6edaba97f293fc9:"k5X1l"}],ePigI:[function(e,t,i){var n=e("aa39c539d0a1ec3f"),r=e("2e9118dcee7eb93e"),s=e("d88f5f00164c2da2"),a=e("12ac356c5e06e57d"),o=e("3cbdc44082c2f8b8"),h=e("634da70e74fce29b");i.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=o(t),r=h(t),c=r.length,l=0;c>l;)s.f(e,i=r[l++],n[i]);return e}},{aa39c539d0a1ec3f:"6mXK1","2e9118dcee7eb93e":"e457x",d88f5f00164c2da2:"hvqCQ","12ac356c5e06e57d":"dPzbI","3cbdc44082c2f8b8":"h9ut0","634da70e74fce29b":"kQgZQ"}],kQgZQ:[function(e,t,i){var n=e("fb982c683f43ec98"),r=e("7cabc30df1982d48");t.exports=Object.keys||function(e){return n(e,r)}},{fb982c683f43ec98:"4o1p7","7cabc30df1982d48":"7POW9"}],"23b1K":[function(e,t,i){var n=e("14cb391fa4a0dda8");t.exports=n("document","documentElement")},{"14cb391fa4a0dda8":"e5ie6"}],bBGHM:[function(e,t,i){var n=e("279dbc8649868a7a"),r=e("430d7ab8977dd85e"),s=e("a5a6278a4291e239").f,a=e("a0e199be640bf61f"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(e){try{return s(e)}catch(e){return a(o)}};t.exports.f=function(e){return o&&"Window"===n(e)?h(e):s(r(e))}},{"279dbc8649868a7a":"161sQ","430d7ab8977dd85e":"h9ut0",a5a6278a4291e239:"dDV3S",a0e199be640bf61f:"eO8Ta"}],eO8Ta:[function(e,t,i){var n=e("5250b5c9324ccbe");t.exports=n([].slice)},{"5250b5c9324ccbe":"2iJ57"}],"3NI4M":[function(e,t,i){var n=e("5bd1cd8472955124"),r=e("1413185c6323bbbc");t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},{"5bd1cd8472955124":"1fkJp","1413185c6323bbbc":"hvqCQ"}],cwsJo:[function(e,t,i){var n=e("2e34ececd06658d9");i.f=n},{"2e34ececd06658d9":"5CuF7"}],jiIFu:[function(e,t,i){var n=e("8d5159b7d317832f"),r=e("42a3ea18819bfbb"),s=e("7ec639749e279eeb"),a=e("cbbe4becefd5c21c").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:s.f(e)})}},{"8d5159b7d317832f":"iwjHr","42a3ea18819bfbb":"9JWVX","7ec639749e279eeb":"cwsJo",cbbe4becefd5c21c:"hvqCQ"}],iwjHr:[function(e,t,i){var n=e("34c09090b9638032");t.exports=n},{"34c09090b9638032":"7Z171"}],"3ujL7":[function(e,t,i){var n=e("b56ca5a55bb4c0e1"),r=e("f5359b167e9be384"),s=e("e7eef3415c62682d"),a=e("8cc59229c8e85f40");t.exports=function(){var e=r("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,o=s("toPrimitive");t&&!t[o]&&a(t,o,function(e){return n(i,this)},{arity:1})}},{b56ca5a55bb4c0e1:"bOssl",f5359b167e9be384:"e5ie6",e7eef3415c62682d:"5CuF7","8cc59229c8e85f40":"4CPdc"}],dkhk9:[function(e,t,i){var n=e("93a3d85da48077c").f,r=e("2ebf7179e87d878f"),s=e("5b1eb5d1639e9eb7")("toStringTag");t.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!r(e,s)&&n(e,s,{configurable:!0,value:t})}},{"93a3d85da48077c":"hvqCQ","2ebf7179e87d878f":"9JWVX","5b1eb5d1639e9eb7":"5CuF7"}],daQdc:[function(e,t,i){var n=e("13e0747865316a42"),r=e("99224cc18a4a792e"),s=e("57aaeabd9d30911"),a=e("3acffc809f3b03fb"),o=e("1fc4c4e55871562c"),h=e("76c922b575fbf7bd"),c=r([].push),l=function(e){var t=1===e,i=2===e,r=3===e,l=4===e,u=6===e,d=7===e,f=5===e||u;return function(p,g,m,v){for(var y,b,x=a(p),E=s(x),w=o(E),T=n(g,m),S=0,A=v||h,C=t?A(p,w):i||d?A(p,0):void 0;w>S;S++)if((f||S in E)&&(b=T(y=E[S],S,x),e)){if(t)C[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}}return u?-1:r||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},{"13e0747865316a42":"f1CxE","99224cc18a4a792e":"2iJ57","57aaeabd9d30911":"kuAas","3acffc809f3b03fb":"6oQEu","1fc4c4e55871562c":"kHSes","76c922b575fbf7bd":"kfoQr"}],f1CxE:[function(e,t,i){var n=e("92f6f475baa85665"),r=e("547ee4f9dab0cc76"),s=e("5acd31cba656d393"),a=n(n.bind);t.exports=function(e,t){return r(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},{"92f6f475baa85665":"c4z5p","547ee4f9dab0cc76":"alrlv","5acd31cba656d393":"3p5v0"}],c4z5p:[function(e,t,i){var n=e("8e77093015e1e67f"),r=e("9daa4dbbca634c9e");t.exports=function(e){if("Function"===n(e))return r(e)}},{"8e77093015e1e67f":"161sQ","9daa4dbbca634c9e":"2iJ57"}],kfoQr:[function(e,t,i){var n=e("4580767bbbe40f0b");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"4580767bbbe40f0b":"3SXid"}],"3SXid":[function(e,t,i){var n=e("a9e5b9af57e551f6"),r=e("2b4d84c184e08f4f"),s=e("f4bec83e8d6008c9"),a=e("4a13cf47b259a825")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(r(t=e.constructor)&&(t===o||n(t.prototype))?t=void 0:s(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?o:t}},{a9e5b9af57e551f6:"7GYYD","2b4d84c184e08f4f":"eytEI",f4bec83e8d6008c9:"8mxCV","4a13cf47b259a825":"5CuF7"}],"7GYYD":[function(e,t,i){var n=e("ccb261b2d73a4fca");t.exports=Array.isArray||function(e){return"Array"===n(e)}},{ccb261b2d73a4fca:"161sQ"}],eytEI:[function(e,t,i){var n=e("3b3e7fa8cfe4b3ac"),r=e("84df2127d2d40501"),s=e("ae35eceee587c4bc"),a=e("7bd40df22601ee7e"),o=e("271ff92378cbc486"),h=e("74840ba4357c1c30"),c=function(){},l=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!s(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},g=function(e){if(!s(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(u,h(e))}catch(e){return!0}};g.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?g:p},{"3b3e7fa8cfe4b3ac":"2iJ57","84df2127d2d40501":"cXVrS",ae35eceee587c4bc:"h1Wnr","7bd40df22601ee7e":"cRCRk","271ff92378cbc486":"e5ie6","74840ba4357c1c30":"3JJEO"}],epSXE:[function(e,t,i){var n=e("5bb0291a1de27cc2"),r=e("8e0d0366f8700097"),s=e("1d19a51e347c2d9e"),a=e("eab6cb58642f38b1"),o=e("41937bc543544e22"),h=e("8877198f0deded1d"),c=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{for:function(e){var t=a(e);if(s(c,t))return c[t];var i=r("Symbol")(t);return c[t]=i,l[i]=t,i}})},{"5bb0291a1de27cc2":"gJg5v","8e0d0366f8700097":"e5ie6","1d19a51e347c2d9e":"9JWVX",eab6cb58642f38b1:"4x6uB","41937bc543544e22":"i30ST","8877198f0deded1d":"lqpzY"}],lqpzY:[function(e,t,i){var n=e("a735884940a2eb73");t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},{a735884940a2eb73:"kkRwC"}],k89ua:[function(e,t,i){var n=e("8dbad7485118eaf8"),r=e("9fce8a9af4b186a4"),s=e("4e16fd56c67f82fb"),a=e("59b7b3dea7d1b71d"),o=e("77b2ea800463b7d6"),h=e("ca42326fb3cb6e68"),c=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{keyFor:function(e){if(!s(e))throw TypeError(a(e)+" is not a symbol");if(r(c,e))return c[e]}})},{"8dbad7485118eaf8":"gJg5v","9fce8a9af4b186a4":"9JWVX","4e16fd56c67f82fb":"2ZU2p","59b7b3dea7d1b71d":"3zerS","77b2ea800463b7d6":"i30ST",ca42326fb3cb6e68:"lqpzY"}],fKGrW:[function(e,t,i){var n=e("c758539029f56af9"),r=e("cd08b356bcae0b47"),s=e("2f13fa715711850"),a=e("4cfb95fb9a0e28fc"),o=e("50b40a77c21daf7f"),h=e("56cf5d4bc1afd666"),c=e("42bed86e3e73f3d2"),l=e("bca8b9ce5f71243b"),u=e("1bb05f05134df4c2"),d=e("1136e300bbee8f1e"),f=e("d8156a48adf3010b"),p=String,g=r("JSON","stringify"),m=o(/./.exec),v=o("".charAt),y=o("".charCodeAt),b=o("".replace),x=o(1..toString),E=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,S=!f||h(function(){var e=r("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),A=h(function(){return'"\udf06\ud834"'!==g("\uDF06\uD834")||'"\udead"'!==g("\uDEAD")}),C=function(e,t){var i=u(arguments),n=d(t);if(!(!c(n)&&(void 0===e||l(e))))return i[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},s(g,null,i)},_=function(e,t,i){var n=v(i,t-1),r=v(i,t+1);return m(w,e)&&!m(T,r)||m(T,e)&&!m(w,n)?"\\u"+x(y(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:S||A},{stringify:function(e,t,i){var n=u(arguments),r=s(S?C:g,null,n);return A&&"string"==typeof r?b(r,E,_):r}})},{c758539029f56af9:"gJg5v",cd08b356bcae0b47:"e5ie6","2f13fa715711850":"2fjXG","4cfb95fb9a0e28fc":"bOssl","50b40a77c21daf7f":"2iJ57","56cf5d4bc1afd666":"cXVrS","42bed86e3e73f3d2":"h1Wnr",bca8b9ce5f71243b:"2ZU2p","1bb05f05134df4c2":"eO8Ta","1136e300bbee8f1e":"gQett",d8156a48adf3010b:"kkRwC"}],"2fjXG":[function(e,t,i){var n=e("d07466971ded2aca"),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},{d07466971ded2aca:"3p5v0"}],gQett:[function(e,t,i){var n=e("d58a1810bb01cb9f"),r=e("fc692ad896e8fbbf"),s=e("78f870626b97cbe9"),a=e("1da5109b0acae5a0"),o=e("71deb4f6b3f33cf0"),h=n([].push);t.exports=function(e){if(s(e))return e;if(r(e)){for(var t=e.length,i=[],n=0;ny&&d(n,arguments[y]),n});if(S.prototype=w,"Error"!==x?o?o(S,T):h(S,T,{name:!0}):p&&v in E&&(c(S,E,v),c(S,E,"prepareStackTrace")),h(S,E),!g)try{w.name!==x&&s(w,"name",x),w.constructor=S}catch(e){}return S}}},{a06eacb797618572:"e5ie6","665a8da8d6942429":"9JWVX","1eafe025967456f7":"gKM90","56a7065490020014":"d5bNd","4950e85505e95dbc":"arrdQ","6c7bc1a190dc31c1":"d9xyM","84e57d08170f4fac":"7fWkz",a85bdac1120897b:"30not",efb60f912a162fda:"dwhvK","30c8c4978beb6a3c":"5QVLO",f4c1a33f96dc17e0:"1H0Ar","9afe587c962877da":"6mXK1","74e210db508a9809":"jHRGA"}],arrdQ:[function(e,t,i){var n=e("995a94425a563d6"),r=e("caa27fe2635f1f44"),s=e("a751660a0fcdf70"),a=e("6e2c833ee2a62cf6");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return s(i),a(n),r(i)&&(t?e(i,n):i.__proto__=n),i}}():void 0)},{"995a94425a563d6":"j4YhT",caa27fe2635f1f44:"8mxCV",a751660a0fcdf70:"cHxZN","6e2c833ee2a62cf6":"hEWXk"}],j4YhT:[function(e,t,i){var n=e("27a2d181325e1926"),r=e("36b26076b1e2fac1");t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},{"27a2d181325e1926":"2iJ57","36b26076b1e2fac1":"alrlv"}],hEWXk:[function(e,t,i){var n=e("fcc5bbb526d602c6"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},{fcc5bbb526d602c6:"6XW5L"}],"6XW5L":[function(e,t,i){var n=e("a504c97d35bacd6c");t.exports=function(e){return n(e)||null===e}},{a504c97d35bacd6c:"8mxCV"}],"7fWkz":[function(e,t,i){var n=e("e52fa9ee07db5896").f;t.exports=function(e,t,i){i in e||n(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},{e52fa9ee07db5896:"hvqCQ"}],"30not":[function(e,t,i){var n=e("9f474ed504af79a9"),r=e("bd2a6951ff768696"),s=e("972057e738a2788f");t.exports=function(e,t,i){var a,o;return s&&n(a=t.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&s(e,o),e}},{"9f474ed504af79a9":"h1Wnr",bd2a6951ff768696:"8mxCV","972057e738a2788f":"arrdQ"}],dwhvK:[function(e,t,i){var n=e("c9fe0c0d0cc00953");t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},{c9fe0c0d0cc00953:"4x6uB"}],"5QVLO":[function(e,t,i){var n=e("b476c95c984a6a8d"),r=e("3c6bf72ab0382560");t.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},{b476c95c984a6a8d:"8mxCV","3c6bf72ab0382560":"gKM90"}],"1H0Ar":[function(e,t,i){var n=e("6a8c56dba61494ec"),r=e("a58d6d3fbc24091c"),s=e("13a68d58956ea123"),a=Error.captureStackTrace;t.exports=function(e,t,i,o){s&&(a?a(e,t):n(e,"stack",r(i,o)))}},{"6a8c56dba61494ec":"gKM90",a58d6d3fbc24091c:"7dart","13a68d58956ea123":"3Scc5"}],"7dart":[function(e,t,i){var n=e("eabcb03034bf2114"),r=Error,s=n("".replace),a=String(new r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,h=o.test(a);t.exports=function(e,t){if(h&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},{eabcb03034bf2114:"2iJ57"}],"3Scc5":[function(e,t,i){var n=e("89db331f671f42e0"),r=e("df11a3c4166c3491");t.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)})},{"89db331f671f42e0":"cXVrS",df11a3c4166c3491:"5toj2"}],aSTrG:[function(e,t,i){var n=e("f781bd5f2d18cfa7"),r=e("3eb4aef2f58a6fea"),s=Error.prototype;s.toString!==r&&n(s,"toString",r)},{f781bd5f2d18cfa7:"4CPdc","3eb4aef2f58a6fea":"9hDDf"}],"9hDDf":[function(e,t,i){var n=e("ea2a4236860a8cd8"),r=e("e3d0938fe2af7a6b"),s=e("10baca5ba543cdd8"),a=e("b4dc1328db6268c"),o=Error.prototype.toString,h=r(function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})});t.exports=h?function(){var e=s(this),t=a(e.name,"Error"),i=a(e.message);return t?i?t+": "+i:t:i}:o},{ea2a4236860a8cd8:"6mXK1",e3d0938fe2af7a6b:"cXVrS","10baca5ba543cdd8":"dPzbI",b4dc1328db6268c:"dwhvK"}],"8nyV3":[function(e,t,i){e("84cae8994b2a2f5")},{"84cae8994b2a2f5":"esMFt"}],esMFt:[function(e,t,i){var n=e("c0cc68e328095af5"),r=e("faa2bddf0ac478ea"),s=e("4413a40f7d436a10"),a=e("6bef4cb0d407baac"),o=e("16d669a6cb07e14c"),h=e("44313d9c6ae01d88"),c=e("fa987207071f401e"),l=e("e46f2df37a9caee7"),u=e("6f34595d479a3d16"),d=e("971d0ec70b5cd696"),f=e("8cb104a68ce09b9a"),p=e("57c5336285df243"),g=e("2e2daca8a25d7233")("toStringTag"),m=Error,v=[].push,y=function(e,t){var i,n=r(b,this);a?i=a(new m,n?s(this):b):c(i=n?this:h(b),g,"Error"),void 0!==t&&c(i,"message",p(t)),d(i,y,i.stack,1),arguments.length>2&&u(i,arguments[2]);var o=[];return f(e,v,{that:o}),c(i,"errors",o),i};a?a(y,m):o(y,m,{name:!0});var b=y.prototype=h(m.prototype,{constructor:l(1,y),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:y})},{c0cc68e328095af5:"gJg5v",faa2bddf0ac478ea:"d5bNd","4413a40f7d436a10":"e8mfS","6bef4cb0d407baac":"arrdQ","16d669a6cb07e14c":"d9xyM","44313d9c6ae01d88":"7isQ3",fa987207071f401e:"gKM90",e46f2df37a9caee7:"5toj2","6f34595d479a3d16":"5QVLO","971d0ec70b5cd696":"1H0Ar","8cb104a68ce09b9a":"dCEHX","57c5336285df243":"dwhvK","2e2daca8a25d7233":"5CuF7"}],e8mfS:[function(e,t,i){var n=e("da54a59ea207dd"),r=e("71ab2a7bcc8c8fc8"),s=e("7a3afd2bb40b0292"),a=e("296d7a2db8e23969"),o=e("58de29d5e883862f"),h=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=s(e);if(n(t,h))return t[h];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof c?l:null}},{da54a59ea207dd:"9JWVX","71ab2a7bcc8c8fc8":"h1Wnr","7a3afd2bb40b0292":"6oQEu","296d7a2db8e23969":"k5X1l","58de29d5e883862f":"2SHZm"}],"2SHZm":[function(e,t,i){var n=e("85ffc28af2e8afc1");t.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"85ffc28af2e8afc1":"cXVrS"}],dCEHX:[function(e,t,i){var n=e("2f267ed50e670495"),r=e("c0af58bb1ef1cc62"),s=e("7fa6542c03ca9239"),a=e("fa596d1a4c07b72a"),o=e("fd753cc641a6f10a"),h=e("2a15dee148d3db96"),c=e("417f9a13deeb58a6"),l=e("43af53be1b24dae5"),u=e("bf7ad32b21aed0b4"),d=e("5241389e1d6eeb73"),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;t.exports=function(e,t,i){var m,v,y,b,x,E,w,T=i&&i.that,S=!!(i&&i.AS_ENTRIES),A=!!(i&&i.IS_RECORD),C=!!(i&&i.IS_ITERATOR),_=!!(i&&i.INTERRUPTED),I=n(t,T),O=function(e){return m&&d(m,"normal",e),new p(!0,e)},P=function(e){return S?(s(e),_?I(e[0],e[1],O):I(e[0],e[1])):_?I(e,O):I(e)};if(A)m=e.iterator;else if(C)m=e;else{if(!(v=u(e)))throw new f(a(e)+" is not iterable");if(o(v)){for(y=0,b=h(e);b>y;y++)if((x=P(e[y]))&&c(g,x))return x;return new p(!1)}m=l(e,v)}for(E=A?e.next:m.next;!(w=r(E,m)).done;){try{x=P(w.value)}catch(e){d(m,"throw",e)}if("object"==typeof x&&x&&c(g,x))return x}return new p(!1)}},{"2f267ed50e670495":"f1CxE",c0af58bb1ef1cc62:"bOssl","7fa6542c03ca9239":"dPzbI",fa596d1a4c07b72a:"3zerS",fd753cc641a6f10a:"88nHe","2a15dee148d3db96":"kHSes","417f9a13deeb58a6":"d5bNd","43af53be1b24dae5":"kBMjp",bf7ad32b21aed0b4:"3624P","5241389e1d6eeb73":"58eij"}],"88nHe":[function(e,t,i){var n=e("85b004b6ab4bc5da"),r=e("6de391ad2976ca02"),s=n("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||a[s]===e)}},{"85b004b6ab4bc5da":"5CuF7","6de391ad2976ca02":"bABtS"}],bABtS:[function(e,t,i){t.exports={}},{}],kBMjp:[function(e,t,i){var n=e("132ebf774107ae29"),r=e("e248489b4825ceb7"),s=e("18a343d2ef625577"),a=e("7e576a1564cef99e"),o=e("4a7b0311be0471b2"),h=TypeError;t.exports=function(e,t){var i=arguments.length<2?o(e):t;if(r(i))return s(n(i,e));throw new h(a(e)+" is not iterable")}},{"132ebf774107ae29":"bOssl",e248489b4825ceb7:"alrlv","18a343d2ef625577":"dPzbI","7e576a1564cef99e":"3zerS","4a7b0311be0471b2":"3624P"}],"3624P":[function(e,t,i){var n=e("32d61dafd81dde78"),r=e("84e24a6ac7559d3a"),s=e("f0707282c0d93eeb"),a=e("1c181d5c49efd5d1"),o=e("d10d0e0ae49498c5")("iterator");t.exports=function(e){if(!s(e))return r(e,o)||r(e,"@@iterator")||a[n(e)]}},{"32d61dafd81dde78":"cRCRk","84e24a6ac7559d3a":"2qR8N",f0707282c0d93eeb:"8AxCV","1c181d5c49efd5d1":"bABtS",d10d0e0ae49498c5:"5CuF7"}],"58eij":[function(e,t,i){var n=e("a4a3a7d4a45c4219"),r=e("feb876e7da2df7bd"),s=e("2e660cdfabd9c61f");t.exports=function(e,t,i){var a,o;r(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw i;return i}a=n(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw i;if(o)throw a;return r(a),i}},{a4a3a7d4a45c4219:"bOssl",feb876e7da2df7bd:"dPzbI","2e660cdfabd9c61f":"2qR8N"}],j1ABh:[function(e,t,i){var n=e("1051ab5946792444"),r=e("901806552daaa9d1"),s=e("c2da5f9111ec0d0d"),a=e("bbf9283d8426dd54"),o=e("2df6383956d55950"),h="AggregateError",c=r(h),l=!a(function(){return 1!==c([1]).errors[0]})&&a(function(){return 7!==c([1],h,{cause:7}).cause});n({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:o(h,function(e){return function(t,i){return s(e,this,arguments)}},l,!0)})},{"1051ab5946792444":"gJg5v","901806552daaa9d1":"e5ie6",c2da5f9111ec0d0d:"2fjXG",bbf9283d8426dd54:"cXVrS","2df6383956d55950":"ja1ZQ"}],"3LJSA":[function(e,t,i){var n=e("17b6274b31efea6a"),r=e("bd1f09a15df9c54b"),s=e("aeeef420262f9436"),a=e("d3a5a5518b6afdf1"),o=e("a3c99fc0a91390b5");n({target:"Array",proto:!0},{at:function(e){var t=r(this),i=s(t),n=a(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]}}),o("at")},{"17b6274b31efea6a":"gJg5v",bd1f09a15df9c54b:"6oQEu",aeeef420262f9436:"kHSes",d3a5a5518b6afdf1:"gAgUH",a3c99fc0a91390b5:"4jzvR"}],"4jzvR":[function(e,t,i){var n=e("d4032cdcc50314e7"),r=e("3ca2a6909ac2dcef"),s=e("545ab457bf71d338").f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}},{d4032cdcc50314e7:"5CuF7","3ca2a6909ac2dcef":"7isQ3","545ab457bf71d338":"hvqCQ"}],jYNHr:[function(e,t,i){var n=e("ae9bcc3c886d2e43"),r=e("320b7f8f99977d72"),s=e("c9c4d35908c64a9b"),a=e("e40ffb4fd8cdd6ef"),o=e("600c6b55241cb08d"),h=e("c35064fc908d412e"),c=e("d3e233a6dd5508d7"),l=e("4da7fb5e70719532"),u=e("706ee6e3130d3c44"),d=e("76c3a5d37e98bd2f"),f=e("210a9ec1468bd8f4"),p=e("64448af9c74a3ff5"),g=f("isConcatSpreadable"),m=p>=51||!r(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),v=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:s(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!d("concat")},{concat:function(e){var t,i,n,r,s,a=o(this),d=u(a,0),f=0;for(t=-1,n=arguments.length;t9007199254740991)throw n("Maximum allowed index exceeded");return e}},{}],SVTZV:[function(e,t,i){var n=e("667a2d5a858194a6"),r=e("2daa2f41b7310fd4"),s=e("7bb9efd811e3f83f");t.exports=function(e,t,i){n?r.f(e,t,s(0,i)):e[t]=i}},{"667a2d5a858194a6":"6mXK1","2daa2f41b7310fd4":"hvqCQ","7bb9efd811e3f83f":"5toj2"}],ca1EV:[function(e,t,i){var n=e("bbe4de7ca7a1c6be"),r=e("6cb3e4ca309911dc"),s=e("4d1dd9e6baf7a81f"),a=r("species");t.exports=function(e){return s>=51||!n(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},{bbe4de7ca7a1c6be:"cXVrS","6cb3e4ca309911dc":"5CuF7","4d1dd9e6baf7a81f":"co76c"}],"9D9sM":[function(e,t,i){var n=e("4890937a7e7c636b"),r=e("7256897b95da01b3"),s=e("4c4cc4b0d9ea98ec");n({target:"Array",proto:!0},{copyWithin:r}),s("copyWithin")},{"4890937a7e7c636b":"gJg5v","7256897b95da01b3":"toMXb","4c4cc4b0d9ea98ec":"4jzvR"}],toMXb:[function(e,t,i){var n=e("67e19c72f7fbebd0"),r=e("5063d303bf924d87"),s=e("e3d01b6d6197aedd"),a=e("6ffaf2643c0abf62"),o=Math.min;t.exports=[].copyWithin||function(e,t){var i=n(this),h=s(i),c=r(e,h),l=r(t,h),u=arguments.length>2?arguments[2]:void 0,d=o((void 0===u?h:r(u,h))-l,h-c),f=1;for(l0;)l in i?i[c]=i[l]:a(i,c),c+=f,l+=f;return i}},{"67e19c72f7fbebd0":"6oQEu","5063d303bf924d87":"47gaI",e3d01b6d6197aedd:"kHSes","6ffaf2643c0abf62":"hb7MO"}],hb7MO:[function(e,t,i){var n=e("49f65044bb4dad7f"),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw new r("Cannot delete property "+n(t)+" of "+n(e))}},{"49f65044bb4dad7f":"3zerS"}],c1k6c:[function(e,t,i){var n=e("c1238b63d9c8719e"),r=e("f6644a21f0f5983").every;n({target:"Array",proto:!0,forced:!e("8bc22f42d8ee353c")("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{c1238b63d9c8719e:"gJg5v",f6644a21f0f5983:"daQdc","8bc22f42d8ee353c":"lz8BN"}],lz8BN:[function(e,t,i){var n=e("77f0d106558781f");t.exports=function(e,t){var i=[][e];return!!i&&n(function(){i.call(null,t||function(){return 1},1)})}},{"77f0d106558781f":"cXVrS"}],lbPxO:[function(e,t,i){var n=e("52cb142d804aabd3"),r=e("daf335b8230cfcc7"),s=e("3e31c661bed82a2d");n({target:"Array",proto:!0},{fill:r}),s("fill")},{"52cb142d804aabd3":"gJg5v",daf335b8230cfcc7:"9XPgi","3e31c661bed82a2d":"4jzvR"}],"9XPgi":[function(e,t,i){var n=e("45e35cf118865951"),r=e("ae17acf5d72570ed"),s=e("94aaef7256431b15");t.exports=function(e){for(var t=n(this),i=s(t),a=arguments.length,o=r(a>1?arguments[1]:void 0,i),h=a>2?arguments[2]:void 0,c=void 0===h?i:r(h,i);c>o;)t[o++]=e;return t}},{"45e35cf118865951":"6oQEu",ae17acf5d72570ed:"47gaI","94aaef7256431b15":"kHSes"}],jKklH:[function(e,t,i){var n=e("a465bc55e057d26f"),r=e("fa9926c68c33923f").filter;n({target:"Array",proto:!0,forced:!e("9232c94be2f9c639")("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{a465bc55e057d26f:"gJg5v",fa9926c68c33923f:"daQdc","9232c94be2f9c639":"ca1EV"}],lMNyP:[function(e,t,i){var n=e("a6cb3a492b52d21c"),r=e("ad97e1511b32e588").find,s=e("62fd950aac3d5249"),a="find",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{a6cb3a492b52d21c:"gJg5v",ad97e1511b32e588:"daQdc","62fd950aac3d5249":"4jzvR"}],hPNfA:[function(e,t,i){var n=e("dcce3e96aeb32c26"),r=e("25f2fe0b92321096").findIndex,s=e("1c93cc746ac8ffb1"),a="findIndex",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{dcce3e96aeb32c26:"gJg5v","25f2fe0b92321096":"daQdc","1c93cc746ac8ffb1":"4jzvR"}],fURyF:[function(e,t,i){var n=e("7c9570dd28371e00"),r=e("43d20d51fd072b05").findLast,s=e("8c5f13eb9efbfd84");n({target:"Array",proto:!0},{findLast:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLast")},{"7c9570dd28371e00":"gJg5v","43d20d51fd072b05":"cyWXz","8c5f13eb9efbfd84":"4jzvR"}],cyWXz:[function(e,t,i){var n=e("c1d87d2297f1acca"),r=e("e5df4a29c897e724"),s=e("42c314ae435e3665"),a=e("a64fff03b4e929f6"),o=function(e){var t=1===e;return function(i,o,h){for(var c,l=s(i),u=r(l),d=a(u),f=n(o,h);d-- >0;)if(f(c=u[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};t.exports={findLast:o(0),findLastIndex:o(1)}},{c1d87d2297f1acca:"f1CxE",e5df4a29c897e724:"kuAas","42c314ae435e3665":"6oQEu",a64fff03b4e929f6:"kHSes"}],"6XyUS":[function(e,t,i){var n=e("bba50227ea399df7"),r=e("c196d65aab15955b").findLastIndex,s=e("5f02d29251865622");n({target:"Array",proto:!0},{findLastIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLastIndex")},{bba50227ea399df7:"gJg5v",c196d65aab15955b:"cyWXz","5f02d29251865622":"4jzvR"}],d83iu:[function(e,t,i){var n=e("eea83811f9bf5b44"),r=e("d9157408980dcae4"),s=e("1603b1d7d71c6d78"),a=e("95d7017c9e9cedeb"),o=e("9b0770c8bd20c0f9"),h=e("4c36764bcb49234f");n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=s(this),i=a(t),n=h(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:o(e)),n}})},{eea83811f9bf5b44:"gJg5v",d9157408980dcae4:"2QW86","1603b1d7d71c6d78":"6oQEu","95d7017c9e9cedeb":"kHSes","9b0770c8bd20c0f9":"gAgUH","4c36764bcb49234f":"kfoQr"}],"2QW86":[function(e,t,i){var n=e("ebb82f00ac94e25c"),r=e("d2ce61b77ec49b3f"),s=e("d3f4210cd620e3d6"),a=e("a7c8b8651480c6c9"),o=function(e,t,i,h,c,l,u,d){for(var f,p,g=c,m=0,v=!!u&&a(u,d);m0&&n(f)?(p=r(f),g=o(e,t,f,p,g,l-1)-1):(s(g+1),e[g]=f),g++),m++;return g};t.exports=o},{ebb82f00ac94e25c:"7GYYD",d2ce61b77ec49b3f:"kHSes",d3f4210cd620e3d6:"6TggQ",a7c8b8651480c6c9:"f1CxE"}],lc4NN:[function(e,t,i){var n=e("e4ee3b9d2bc1ffb2"),r=e("378c1e23131cdaae"),s=e("74e7f70118e2a778"),a=e("1a2d0561d09775b8"),o=e("f7bbb0ab5ee7446c"),h=e("51d35c0066e59cdb");n({target:"Array",proto:!0},{flatMap:function(e){var t,i=a(this),n=o(i);return s(e),(t=h(i,0)).length=r(t,i,i,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},{e4ee3b9d2bc1ffb2:"gJg5v","378c1e23131cdaae":"2QW86","74e7f70118e2a778":"alrlv","1a2d0561d09775b8":"6oQEu",f7bbb0ab5ee7446c:"kHSes","51d35c0066e59cdb":"kfoQr"}],gjqcj:[function(e,t,i){var n=e("214b5a111591d046"),r=e("658aa5ae0eee38b0");n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},{"214b5a111591d046":"gJg5v","658aa5ae0eee38b0":"4w3Nn"}],"4w3Nn":[function(e,t,i){var n=e("1a0535b754110eb5").forEach,r=e("df61bc1b7a92de0f")("forEach");t.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},{"1a0535b754110eb5":"daQdc",df61bc1b7a92de0f:"lz8BN"}],j3v3L:[function(e,t,i){var n=e("76f1b3b688a029fa"),r=e("55358907c05b685d");n({target:"Array",stat:!0,forced:!e("98fd99047e51c8be")(function(e){Array.from(e)})},{from:r})},{"76f1b3b688a029fa":"gJg5v","55358907c05b685d":"lrrJd","98fd99047e51c8be":"dR8Bu"}],lrrJd:[function(e,t,i){var n=e("c006aee3ec90867f"),r=e("bdaed06b86eeb767"),s=e("ca05db7523b31410"),a=e("47fe223c8f6c2dd5"),o=e("75eba7673a242ae6"),h=e("188dc0b37c140076"),c=e("32c4effc8b33b2c2"),l=e("a6ed280c439df9d0"),u=e("3faaa09a63a90825"),d=e("13cbec27e4dd055f"),f=Array;t.exports=function(e){var t,i,p,g,m,v,y=s(e),b=h(this),x=arguments.length,E=x>1?arguments[1]:void 0,w=void 0!==E;w&&(E=n(E,x>2?arguments[2]:void 0));var T=d(y),S=0;if(T&&!(this===f&&o(T)))for(i=b?new this:[],m=(g=u(y,T)).next;!(p=r(m,g)).done;S++)v=w?a(g,E,[p.value,S],!0):p.value,l(i,S,v);else for(t=c(y),i=b?new this(t):f(t);t>S;S++)v=w?E(y[S],S):y[S],l(i,S,v);return i.length=S,i}},{c006aee3ec90867f:"f1CxE",bdaed06b86eeb767:"bOssl",ca05db7523b31410:"6oQEu","47fe223c8f6c2dd5":"hyn7H","75eba7673a242ae6":"88nHe","188dc0b37c140076":"eytEI","32c4effc8b33b2c2":"kHSes",a6ed280c439df9d0:"SVTZV","3faaa09a63a90825":"kBMjp","13cbec27e4dd055f":"3624P"}],hyn7H:[function(e,t,i){var n=e("4afbb4be48dcf066"),r=e("d24fa1ffea48fa52");t.exports=function(e,t,i,s){try{return s?t(n(i)[0],i[1]):t(i)}catch(t){r(e,"throw",t)}}},{"4afbb4be48dcf066":"dPzbI",d24fa1ffea48fa52:"58eij"}],dR8Bu:[function(e,t,i){var n=e("a5154de5c7fcf21e")("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){try{if(!t&&!r)return!1}catch(e){return!1}var i=!1;try{var s={};s[n]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(e){}return i}},{a5154de5c7fcf21e:"5CuF7"}],"3rrfH":[function(e,t,i){var n=e("ffa5d46bdab873f9"),r=e("abe71b6f5a2c149").includes,s=e("119354898116a770"),a=e("9a828f869e1adf81");n({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{ffa5d46bdab873f9:"gJg5v",abe71b6f5a2c149:"7HT32","119354898116a770":"cXVrS","9a828f869e1adf81":"4jzvR"}],b10MD:[function(e,t,i){var n=e("9d4bf984c01e8ef7"),r=e("ff94ec157dbe45f"),s=e("84db9b100b66a9f4").indexOf,a=e("928c12f9f760e965"),o=r([].indexOf),h=!!o&&1/o([1],1,-0)<0;n({target:"Array",proto:!0,forced:h||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return h?o(this,e,t)||0:s(this,e,t)}})},{"9d4bf984c01e8ef7":"gJg5v",ff94ec157dbe45f:"c4z5p","84db9b100b66a9f4":"7HT32","928c12f9f760e965":"lz8BN"}],"2JgXG":[function(e,t,i){e("e1a67b4aafecad9a")({target:"Array",stat:!0},{isArray:e("1fa49986380c79ad")})},{e1a67b4aafecad9a:"gJg5v","1fa49986380c79ad":"7GYYD"}],"3prNk":[function(e,t,i){var n=e("c8e067881939a0cb"),r=e("275b8f0cb65b77aa"),s=e("21f4d3653c90f049"),a=e("85efa8d5848315f6"),o=e("94a17682acfdceb4").f,h=e("bb30bdef31147b17"),c=e("d8384af5151f994c"),l=e("fdcc207797f592fe"),u=e("11e42ff2bbda8d0a"),d="Array Iterator",f=a.set,p=a.getterFor(d);t.exports=h(Array,"Array",function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(i,!1);case"values":return c(t[i],!1)}return c([i,t[i]],!1)},"values");var g=s.Arguments=s.Array;if(r("keys"),r("values"),r("entries"),!l&&u&&"values"!==g.name)try{o(g,"name",{value:"values"})}catch(e){}},{c8e067881939a0cb:"h9ut0","275b8f0cb65b77aa":"4jzvR","21f4d3653c90f049":"bABtS","85efa8d5848315f6":"ixHS2","94a17682acfdceb4":"hvqCQ",bb30bdef31147b17:"klSVb",d8384af5151f994c:"dwU83",fdcc207797f592fe:"jHRGA","11e42ff2bbda8d0a":"6mXK1"}],klSVb:[function(e,t,i){var n=e("923c1bf4a39ae90c"),r=e("46a3f73465955199"),s=e("c1577e63189cf935"),a=e("dc625e1bb584faf6"),o=e("d55d91c410baca17"),h=e("3e4ae607dbb6e78b"),c=e("48ca4ae1d4998232"),l=e("1263258b63630933"),u=e("9b61caf69f87dfde"),d=e("7f30a3ab1bf5e1c1"),f=e("c027b4da648348d3"),p=e("d4ad91965213ee1"),g=e("b616a206eb405268"),m=e("4f9ec7e9f5d20965"),v=a.PROPER,y=a.CONFIGURABLE,b=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,E=p("iterator"),w="keys",T="values",S="entries",A=function(){return this};t.exports=function(e,t,i,a,p,m,C){h(i,t,a);var _,I,O,P=function(e){if(e===p&&k)return k;if(!x&&e&&e in L)return L[e];switch(e){case w:case T:case S:return function(){return new i(this,e)}}return function(){return new i(this)}},M=t+" Iterator",R=!1,L=e.prototype,D=L[E]||L["@@iterator"]||p&&L[p],k=!x&&D||P(p),N="Array"===t&&L.entries||D;if(N&&(_=c(N.call(new e)))!==Object.prototype&&_.next&&(s||c(_)===b||(l?l(_,b):o(_[E])||f(_,E,A)),u(_,M,!0,!0),s&&(g[M]=A)),v&&p===T&&D&&D.name!==T&&(!s&&y?d(L,"name",T):(R=!0,k=function(){return r(D,this)})),p){if(I={values:P(T),keys:m?k:P(w),entries:P(S)},C)for(O in I)!x&&!R&&O in L||f(L,O,I[O]);else n({target:t,proto:!0,forced:x||R},I)}return(!s||C)&&L[E]!==k&&f(L,E,k,{name:p}),g[t]=k,I}},{"923c1bf4a39ae90c":"gJg5v","46a3f73465955199":"bOssl",c1577e63189cf935:"jHRGA",dc625e1bb584faf6:"jmu0n",d55d91c410baca17:"h1Wnr","3e4ae607dbb6e78b":"1Abii","48ca4ae1d4998232":"e8mfS","1263258b63630933":"arrdQ","9b61caf69f87dfde":"dkhk9","7f30a3ab1bf5e1c1":"gKM90",c027b4da648348d3:"4CPdc",d4ad91965213ee1:"5CuF7",b616a206eb405268:"bABtS","4f9ec7e9f5d20965":"6nE00"}],"1Abii":[function(e,t,i){var n=e("6d3197d79123a33d").IteratorPrototype,r=e("f19338a88747fb05"),s=e("cc176dfbf6ea0553"),a=e("bc433e6ab6880430"),o=e("2f833e0e1738e7e0"),h=function(){return this};t.exports=function(e,t,i,c){var l=t+" Iterator";return e.prototype=r(n,{next:s(+!c,i)}),a(e,l,!1,!0),o[l]=h,e}},{"6d3197d79123a33d":"6nE00",f19338a88747fb05:"7isQ3",cc176dfbf6ea0553:"5toj2",bc433e6ab6880430:"dkhk9","2f833e0e1738e7e0":"bABtS"}],"6nE00":[function(e,t,i){var n,r,s,a=e("cdb9dcd93b52b3fc"),o=e("db955145706fc55a"),h=e("83e5df3d56e8834f"),c=e("45d6f1a3c372cdf6"),l=e("a97459767d74fdc3"),u=e("3bdf78f362001d7c"),d=e("d3901e60df7842c9"),f=e("e736fd193ddc96e5"),p=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(r=l(l(s)))!==Object.prototype&&(n=r):g=!0),!h(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:f&&(n=c(n)),o(n[p])||u(n,p,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},{cdb9dcd93b52b3fc:"cXVrS",db955145706fc55a:"h1Wnr","83e5df3d56e8834f":"8mxCV","45d6f1a3c372cdf6":"7isQ3",a97459767d74fdc3:"e8mfS","3bdf78f362001d7c":"4CPdc",d3901e60df7842c9:"5CuF7",e736fd193ddc96e5:"jHRGA"}],dwU83:[function(e,t,i){t.exports=function(e,t){return{value:e,done:t}}},{}],le1uL:[function(e,t,i){var n=e("1fd3a81d59354079"),r=e("878a42cfd07db75d"),s=e("c417af28e9abb2b"),a=e("cdcc2dbc58a28c02"),o=e("733e226e143494d1"),h=r([].join);n({target:"Array",proto:!0,forced:s!==Object||!o("join",",")},{join:function(e){return h(a(this),void 0===e?",":e)}})},{"1fd3a81d59354079":"gJg5v","878a42cfd07db75d":"2iJ57",c417af28e9abb2b:"kuAas",cdcc2dbc58a28c02:"h9ut0","733e226e143494d1":"lz8BN"}],eli4M:[function(e,t,i){var n=e("962fe7a81cad1a6"),r=e("9a92cbcc02ff28cd");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},{"962fe7a81cad1a6":"gJg5v","9a92cbcc02ff28cd":"cfsWk"}],cfsWk:[function(e,t,i){var n=e("4ca7787412cb919d"),r=e("883419ed27232d44"),s=e("ec6d0c7c9b243b67"),a=e("f185a9d11d03524a"),o=e("6d58dcee43d16a4d"),h=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf");t.exports=l||!u?function(e){if(l)return n(c,this,arguments)||0;var t=r(this),i=a(t);if(0===i)return -1;var o=i-1;for(arguments.length>1&&(o=h(o,s(arguments[1]))),o<0&&(o=i+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return -1}:c},{"4ca7787412cb919d":"2fjXG","883419ed27232d44":"h9ut0",ec6d0c7c9b243b67:"gAgUH",f185a9d11d03524a:"kHSes","6d58dcee43d16a4d":"lz8BN"}],zkrYn:[function(e,t,i){var n=e("5fce1361821ac187"),r=e("a7a3b0905c6ea58c").map;n({target:"Array",proto:!0,forced:!e("869912db050ffcc6")("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"5fce1361821ac187":"gJg5v",a7a3b0905c6ea58c:"daQdc","869912db050ffcc6":"ca1EV"}],"6cM5k":[function(e,t,i){var n=e("c49bbaeadf669473"),r=e("2b7c23018838f50"),s=e("5ca03f92538fd001"),a=e("d87cf2a2bcbb5c2c"),o=Array;n({target:"Array",stat:!0,forced:r(function(){function e(){}return!(o.of.call(e) instanceof e)})},{of:function(){for(var e=0,t=arguments.length,i=new(s(this)?this:o)(t);t>e;)a(i,e,arguments[e++]);return i.length=t,i}})},{c49bbaeadf669473:"gJg5v","2b7c23018838f50":"cXVrS","5ca03f92538fd001":"eytEI",d87cf2a2bcbb5c2c:"SVTZV"}],j9q44:[function(e,t,i){var n=e("b6ccafca6520a091"),r=e("617fddde3018a247"),s=e("59103d39edb4650b"),a=e("92e23121d8e92745"),o=e("e72c330067644bc");n({target:"Array",proto:!0,arity:1,forced:e("a33adf7f040c3b17")(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=r(this),i=s(t),n=arguments.length;o(i+n);for(var h=0;h79&&a<83||!s("reduce")},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},{aa6d80bc3b697f48:"gJg5v","1ee240c0462acdf8":"dEdT1","161424d627b72094":"lz8BN",bc7f601de74ac73e:"co76c",fbcc11805e216a7d:"hdoIk"}],dEdT1:[function(e,t,i){var n=e("93e7a99f8d3bc817"),r=e("915d05570b61a3c9"),s=e("da310552be96f5db"),a=e("f4209260f2003c23"),o=TypeError,h="Reduce of empty array with no initial value",c=function(e){return function(t,i,c,l){var u=r(t),d=s(u),f=a(u);if(n(i),0===f&&c<2)throw new o(h);var p=e?f-1:0,g=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=g;break}if(p+=g,e?p<0:f<=p)throw new o(h)}for(;e?p>=0:f>p;p+=g)p in d&&(l=i(l,d[p],p,u));return l}};t.exports={left:c(!1),right:c(!0)}},{"93e7a99f8d3bc817":"alrlv","915d05570b61a3c9":"6oQEu",da310552be96f5db:"kuAas",f4209260f2003c23:"kHSes"}],hdoIk:[function(e,t,i){var n=e("5fac34e3c4c0e043");t.exports="NODE"===n},{"5fac34e3c4c0e043":"ah0ZS"}],ah0ZS:[function(e,t,i){var n=e("7dc361f46ecde901"),r=e("9f6e24ecbba66a9e"),s=e("a008a59fdc341842"),a=function(e){return r.slice(0,e.length)===e};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},{"7dc361f46ecde901":"7Z171","9f6e24ecbba66a9e":"5hj4U",a008a59fdc341842:"161sQ"}],YvN4R:[function(e,t,i){var n=e("fce4aa67eb1fe4da"),r=e("9bb83011bb72081c").right,s=e("86ebd8f03f19e7b"),a=e("c87ecf8f0d069a25");n({target:"Array",proto:!0,forced:!e("ceeda59dcd941a57")&&a>79&&a<83||!s("reduceRight")},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},{fce4aa67eb1fe4da:"gJg5v","9bb83011bb72081c":"dEdT1","86ebd8f03f19e7b":"lz8BN",c87ecf8f0d069a25:"co76c",ceeda59dcd941a57:"hdoIk"}],eqr1I:[function(e,t,i){var n=e("96e1bf170d634a10"),r=e("ccf1d267c2b85a6"),s=e("683c722e26101e35"),a=r([].reverse),o=[1,2];n({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return s(this)&&(this.length=this.length),a(this)}})},{"96e1bf170d634a10":"gJg5v",ccf1d267c2b85a6:"2iJ57","683c722e26101e35":"7GYYD"}],gW4UQ:[function(e,t,i){var n=e("f4626508f1e86a5e"),r=e("c55f884cac32042"),s=e("c7ab28f7c42930d4"),a=e("d62f4c68d4a29c88"),o=e("598be77178793bf1"),h=e("f9b9299dc750b2dd"),c=e("ff620c60ded20435"),l=e("49168568b59df51b"),u=e("f02f140688adf449"),d=e("eb9bbc0536d1f202"),f=e("88cb1064f5f88f9e"),p=d("slice"),g=u("species"),m=Array,v=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var i,n,u,d=c(this),p=h(d),y=o(e,p),b=o(void 0===t?p:t,p);if(r(d)&&(s(i=d.constructor)&&(i===m||r(i.prototype))?i=void 0:a(i)&&null===(i=i[g])&&(i=void 0),i===m||void 0===i))return f(d,y,b);for(u=0,n=new(void 0===i?m:i)(v(b-y,0));y1?arguments[1]:void 0)}})},{"7d2f6f3fe52919ae":"gJg5v",b1828f452e0c06d:"daQdc","2a793f2ccd9f7f4e":"lz8BN"}],g2wAi:[function(e,t,i){var n=e("bcbafe2730da3578"),r=e("45fd6781824a0ecc"),s=e("227e835045b72b76"),a=e("d460a9dbedc2e639"),o=e("eb5d266a4b580e05"),h=e("ab9af39e90a45cab"),c=e("2874e3c4ed670355"),l=e("b077ecec4e3b8790"),u=e("b1c0993c5b4a0232"),d=e("fc67c1f531962716"),f=e("5463fbeb0c308d9"),p=e("44ffda3b5c0f4b25"),g=e("f9fbdc3cf34ed30"),m=e("f4067f6b9a5e38cb"),v=[],y=r(v.sort),b=r(v.push),x=l(function(){v.sort(void 0)}),E=l(function(){v.sort(null)}),w=d("sort"),T=!l(function(){if(g)return g<70;if(!f||!(f>3)){if(p)return!0;if(m)return m<603;var e,t,i,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)v.push({k:t+n,v:i})}for(v.sort(function(e,t){return t.v-e.v}),n=0;nc(i)?1:-1}),t=o(r),i=0;i0;)e[o]=e[--o];o!==h++&&(e[o]=a)}else for(var c=r(i/2),l=s(n(e,0,c),t),u=s(n(e,c),t),d=l.length,f=u.length,p=0,g=0;p=t(l[p],u[g])?l[p++]:u[g++]:px-n+i;m--)d(b,m-1)}else if(i>n)for(m=x-n;m>E;m--)v=m+n-1,y=m+i-1,v in b?b[y]=b[v]:d(b,y);for(m=0;m2?i:n(t),a=new e(s);s>r;)a[r]=t[r++];return a}},{"2dee1f257e46a7db":"kHSes"}],"6NIFY":[function(e,t,i){var n=e("63ff55de103c0dc5");t.exports=function(e,t){var i=n[e],r=i&&i.prototype;return r&&r[t]}},{"63ff55de103c0dc5":"7Z171"}],iJJcs:[function(e,t,i){var n=e("c44d9276f6e49c66"),r=e("ccd8819e12261215"),s=e("95891e25a6f53375"),a=e("71fb5de0045d079d"),o=e("150c173e099ddbe3"),h=e("bc8453913d7979ca"),c=e("a4502cc79d58ffee"),l=Array,u=Math.max,d=Math.min;n({target:"Array",proto:!0},{toSpliced:function(e,t){var i,n,r,f,p=h(this),g=a(p),m=o(e,g),v=arguments.length,y=0;for(0===v?i=n=0:1===v?(i=0,n=g-m):(i=v-2,n=d(u(c(t),0),g-m)),f=l(r=s(g+i-n));y=o||c<0)throw new s("Incorrect index");for(var l=new t(o),u=0;u>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},J=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return H(m(e),23,4)},Q=function(e){return H(e,52,8)},Z=function(e,t,i){c(e[P],t,{configurable:!0,get:function(){return i(this)[t]}})},ee=function(e,t,i,n){var r=L(e),s=g(i);if(s+t>r.byteLength)throw new j(M);var a=r.bytes,o=s+r.byteOffset,h=E(a,o,o+t);return n?h:Y(h)},et=function(e,t,i,n,r,s){var a=L(e),o=g(i),h=n(+r),c=!!s;if(o+t>a.byteLength)throw new j(M);for(var l=a.bytes,u=o+a.byteOffset,d=0;d>24)},setUint8:function(e,t){er(this,e,t<<24>>24)}},{unsafe:!0})}else F=(N=function(e){d(this,F);var t=g(e);D(this,{type:I,bytes:W(G(t),0),byteLength:t}),s||(this.byteLength=t,this.detached=!1)})[P],U=(B=function(e,t,i){d(this,U),d(e,F);var n=R(e),r=n.byteLength,a=f(t);if(a<0||a>r)throw new j("Wrong offset");if(i=void 0===i?r-a:p(i),a+i>r)throw new j("Wrong length");D(this,{type:O,buffer:e,byteLength:i,byteOffset:a,bytes:n.bytes}),s||(this.buffer=e,this.byteLength=i,this.byteOffset=a)})[P],s&&(Z(N,"byteLength",R),Z(B,"buffer",L),Z(B,"byteLength",L),Z(B,"byteOffset",L)),l(U,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){et(this,1,e,X,t)},setUint8:function(e,t){et(this,1,e,X,t)},setInt16:function(e,t){et(this,2,e,q,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){et(this,2,e,q,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){et(this,4,e,K,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){et(this,4,e,K,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){et(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){et(this,8,e,Q,t,arguments.length>2&&arguments[2])}});S(N,I),S(B,O),t.exports={ArrayBuffer:N,DataView:B}},{b2866645d252be10:"7Z171","6f1278f8f2a16115":"2iJ57","82c590a9dd8cc3ac":"6mXK1","923679fae99d4d2f":"i5ikG","9840ef06cc46dddb":"jmu0n","78ca6eb037349755":"gKM90",e693d9164e48343:"3NI4M","649a7a39c0607d74":"43JWW","57aab94a1cd1d913":"cXVrS","7333f43e52f40b38":"95yA1","1fd77d2940b4fd75":"gAgUH","8739fe5c743af579":"lQsU7",e3fc7a8bc754578a:"g2ruQ","93dd6846d2a65063":"lyxmB",d85071d33c34155a:"7M4Fp",eae7b83555f02284:"e8mfS",fd01028813b4814f:"arrdQ","8fdeb7296fb95696":"9XPgi",c0dac2bdd3636e95:"eO8Ta","3606a69f7ceacab3":"30not","5a0e685d057e2415":"d9xyM",dd3d1adef426fc5:"dkhk9",ea12fbd2f22b2f25:"ixHS2"}],i5ikG:[function(e,t,i){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],"43JWW":[function(e,t,i){var n=e("e34e683e23dcb4bb");t.exports=function(e,t,i){for(var r in t)n(e,r,t[r],i);return e}},{e34e683e23dcb4bb:"4CPdc"}],"95yA1":[function(e,t,i){var n=e("55f8840091c5bf21"),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},{"55f8840091c5bf21":"d5bNd"}],g2ruQ:[function(e,t,i){var n=e("10a259b760ce2864"),r=e("f24767d66362404d"),s=RangeError;t.exports=function(e){if(void 0===e)return 0;var t=n(e),i=r(t);if(t!==i)throw new s("Wrong length or index");return i}},{"10a259b760ce2864":"gAgUH",f24767d66362404d:"lQsU7"}],lyxmB:[function(e,t,i){var n=e("8f9dfe0502a74d7");t.exports=Math.fround||function(e){return n(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)}},{"8f9dfe0502a74d7":"b6uSw"}],b6uSw:[function(e,t,i){var n=e("9113322676fa66ef"),r=Math.abs;t.exports=function(e,t,i,s){var a=+e,o=r(a),h=n(a);if(oi||l!=l?1/0*h:h*l}},{"9113322676fa66ef":"9QHoq"}],"9QHoq":[function(e,t,i){t.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},{}],"7M4Fp":[function(e,t,i){var n=Array,r=Math.abs,s=Math.pow,a=Math.floor,o=Math.log,h=Math.LN2;t.exports={pack:function(e,t,i){var c,l,u,d=n(i),f=8*i-t-1,p=(1<>1,m=23===t?s(2,-24)-s(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(u=s(2,-(c=a(o(e)/h))),e*u<1&&(c--,u*=2),c+g>=1?e+=m/u:e+=m*s(2,1-g),e*u>=2&&(c++,u/=2),c+g>=p?(l=0,c=p):c+g>=1?(l=(e*u-1)*s(2,t),c+=g):(l=e*s(2,g-1)*s(2,t),c=0));t>=8;)d[y++]=255&l,l/=256,t-=8;for(c=c<0;)d[y++]=255&c,c/=256,f-=8;return d[y-1]|=128*v,d},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<>1,h=r-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;h>0;)u=256*u+e[c--],h-=8;for(i=u&(1<<-h)-1,u>>=-h,h+=t;h>0;)i=256*i+e[c--],h-=8;if(0===u)u=1-o;else{if(u===a)return i?NaN:l?-1/0:1/0;i+=s(2,t),u-=o}return(l?-1:1)*i*s(2,u-t)}}},{}],"9DwR1":[function(e,t,i){var n=e("46c87ab471833e50"),r=e("3efc956d746e3978");n({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},{"46c87ab471833e50":"gJg5v","3efc956d746e3978":"b6692"}],b6692:[function(e,t,i){var n,r,s,a=e("4142cc1b1f950662"),o=e("fa237bbf2050dd6d"),h=e("9603af1373955d3d"),c=e("1b44b7e19e6f660d"),l=e("af39713fe0cf7587"),u=e("dd5eec94b1519471"),d=e("b9eebb2d4c13b0d6"),f=e("36a2290066710aa0"),p=e("fdfbb82e20f81a19"),g=e("81ef6d90bc6acdce"),m=e("96421c541af03be5"),v=e("ab8263bb2af6274"),y=e("ba5da2480b30b79"),b=e("b6e4d282cbe3e34a"),x=e("3d5af0d43aa6e42b"),E=e("8007fa7370557b8e"),w=e("82848943f937d383"),T=w.enforce,S=w.get,A=h.Int8Array,C=A&&A.prototype,_=h.Uint8ClampedArray,I=_&&_.prototype,O=A&&y(A),P=C&&y(C),M=Object.prototype,R=h.TypeError,L=x("toStringTag"),D=E("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",N=a&&!!b&&"Opera"!==d(h.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},V=function(e){var t=y(e);if(l(t)){var i=S(t);return i&&u(i,k)?i[k]:V(t)}},G=function(e){if(!l(e))return!1;var t=d(e);return u(B,t)||u(U,t)};for(n in B)(s=(r=h[n])&&r.prototype)?T(s)[k]=r:N=!1;for(n in U)(s=(r=h[n])&&r.prototype)&&(T(s)[k]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw new R("Incorrect invocation")},N))for(n in B)h[n]&&b(h[n],O);if((!N||!P||P===M)&&(P=O.prototype,N))for(n in B)h[n]&&b(h[n].prototype,P);if(N&&y(I)!==P&&b(I,P),o&&!u(P,L))for(n in F=!0,m(P,L,{configurable:!0,get:function(){return l(this)?this[D]:void 0}}),B)h[n]&&p(h[n],D,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&D,aTypedArray:function(e){if(G(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||v(O,e)))return e;throw new R(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,n){if(o){if(i)for(var r in B){var s=h[r];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}(!P[e]||i)&&g(P,e,i?t:N&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(o){if(b){if(i){for(n in B)if((r=h[n])&&u(r,e))try{delete r[e]}catch(e){}}if(O[e]&&!i)return;try{return g(O,e,i?t:N&&O[e]||t)}catch(e){}}for(n in B)(r=h[n])&&(!r[e]||i)&&g(r,e,t)}},getTypedArrayConstructor:V,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||u(B,t)||u(U,t)},isTypedArray:G,TypedArray:O,TypedArrayPrototype:P}},{"4142cc1b1f950662":"i5ikG",fa237bbf2050dd6d:"6mXK1","9603af1373955d3d":"7Z171","1b44b7e19e6f660d":"h1Wnr",af39713fe0cf7587:"8mxCV",dd5eec94b1519471:"9JWVX",b9eebb2d4c13b0d6:"cRCRk","36a2290066710aa0":"3zerS",fdfbb82e20f81a19:"gKM90","81ef6d90bc6acdce":"4CPdc","96421c541af03be5":"3NI4M",ab8263bb2af6274:"d5bNd",ba5da2480b30b79:"e8mfS",b6e4d282cbe3e34a:"arrdQ","3d5af0d43aa6e42b":"5CuF7","8007fa7370557b8e":"55cC0","82848943f937d383":"ixHS2"}],hihCW:[function(e,t,i){var n=e("de35f4868f3fe074"),r=e("41f3b5783dddf1cc"),s=e("da813d2481635a75"),a=e("7ac9e92946b0cbd8"),o=e("d8dca2550bf1cdc9"),h=e("881de7865554c8ed"),c=e("9f7b0710000cb4e4"),l=a.ArrayBuffer,u=a.DataView,d=u.prototype,f=r(l.prototype.slice),p=r(d.getUint8),g=r(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:s(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(f&&void 0===t)return f(o(this),e);for(var i=o(this).byteLength,n=h(e,i),r=h(void 0===t?i:t,i),s=new l(c(r-n)),a=new u(this),d=new u(s),m=0;n=s&&(!i||g))n=v(e,0,s);else{n=new d(s,i&&!g&&b?{maxByteLength:b(e)}:void 0);for(var m=new f(e),w=new f(n),T=p(s,r),S=0;S92||"NODE"===a&&s>94||"BROWSER"===a&&s>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},{"6bcfdfa15a0af40c":"7Z171","5bfa734fa18d01bd":"cXVrS","504e63b697c2418c":"co76c","2f39a8269e626373":"ah0ZS"}],ilodQ:[function(e,t,i){var n=e("2ee97e669ed348d2"),r=e("6010ab662274272a");r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},{"2ee97e669ed348d2":"gJg5v","6010ab662274272a":"dmTWg"}],"3sjfy":[function(e,t,i){var n=e("cf63881ba58455e7"),r=e("712c5b724e238772"),s=e("9542983db09542aa")(function(){return 120!==new Date(16e11).getYear()}),a=r(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:s},{getYear:function(){return a(this)-1900}})},{cf63881ba58455e7:"gJg5v","712c5b724e238772":"2iJ57","9542983db09542aa":"cXVrS"}],aJQbh:[function(e,t,i){var n=e("1b76219dfd05b069"),r=e("9cd428d337baa08f"),s=Date,a=r(s.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new s)}})},{"1b76219dfd05b069":"gJg5v","9cd428d337baa08f":"2iJ57"}],cl2UC:[function(e,t,i){var n=e("45b3958e6ed27545"),r=e("bb0b969d98296e93"),s=e("1bfaa736b448a80b"),a=Date.prototype,o=r(a.getTime),h=r(a.setFullYear);n({target:"Date",proto:!0},{setYear:function(e){o(this);var t=s(e);return h(this,t>=0&&t<=99?t+1900:t)}})},{"45b3958e6ed27545":"gJg5v",bb0b969d98296e93:"2iJ57","1bfaa736b448a80b":"gAgUH"}],l89H5:[function(e,t,i){e("382df40000aa3419")({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},{"382df40000aa3419":"gJg5v"}],cHGz3:[function(e,t,i){var n=e("ce28eb9d99ee133e"),r=e("f6428e9a2d433b20");n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},{ce28eb9d99ee133e:"gJg5v",f6428e9a2d433b20:"jjIBo"}],jjIBo:[function(e,t,i){var n=e("8ef03d8aa78a1a05"),r=e("d77f9603e3197abc"),s=e("de264358de0ee0b0").start,a=RangeError,o=isFinite,h=Math.abs,c=Date.prototype,l=c.toISOString,u=n(c.getTime),d=n(c.getUTCDate),f=n(c.getUTCFullYear),p=n(c.getUTCHours),g=n(c.getUTCMilliseconds),m=n(c.getUTCMinutes),v=n(c.getUTCMonth),y=n(c.getUTCSeconds);t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))})||!r(function(){l.call(new Date(NaN))})?function(){if(!o(u(this)))throw new a("Invalid time value");var e=f(this),t=g(this),i=e<0?"-":e>9999?"+":"";return i+s(h(e),i?6:4,0)+"-"+s(v(this)+1,2,0)+"-"+s(d(this),2,0)+"T"+s(p(this),2,0)+":"+s(m(this),2,0)+":"+s(y(this),2,0)+"."+s(t,3,0)+"Z"}:l},{"8ef03d8aa78a1a05":"2iJ57",d77f9603e3197abc:"cXVrS",de264358de0ee0b0:"15Fl7"}],"15Fl7":[function(e,t,i){var n=e("3f3ae64f3613324a"),r=e("86f2220ab33aea88"),s=e("ce16e4ba37e115ac"),a=e("3fe5759e7801b635"),o=e("3c8ec8ea0d5bc9c"),h=n(a),c=n("".slice),l=Math.ceil,u=function(e){return function(t,i,n){var a,u,d=s(o(t)),f=r(i),p=d.length,g=void 0===n?" ":s(n);return f<=p||""===g?d:((u=h(g,l((a=f-p)/g.length))).length>a&&(u=c(u,0,a)),e?d+u:u+d)}};t.exports={start:u(!1),end:u(!0)}},{"3f3ae64f3613324a":"2iJ57","86f2220ab33aea88":"lQsU7",ce16e4ba37e115ac:"4x6uB","3fe5759e7801b635":"dsk9g","3c8ec8ea0d5bc9c":"cHxZN"}],dsk9g:[function(e,t,i){var n=e("810ed4f57c077da5"),r=e("f870ae4664ae9b8c"),s=e("b05eac101d7c2112"),a=RangeError;t.exports=function(e){var t=r(s(this)),i="",o=n(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(i+=t);return i}},{"810ed4f57c077da5":"gAgUH",f870ae4664ae9b8c:"4x6uB",b05eac101d7c2112:"cHxZN"}],"6OeqH":[function(e,t,i){var n=e("a9ca9c4e2bd47ff4"),r=e("b11d0c7c0b2675d5"),s=e("60b061d7c8f57ad8"),a=e("e362bf7168d77860");n({target:"Date",proto:!0,arity:1,forced:r(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=s(this),i=a(t,"number");return"number"!=typeof i||isFinite(i)?t.toISOString():null}})},{a9ca9c4e2bd47ff4:"gJg5v",b11d0c7c0b2675d5:"cXVrS","60b061d7c8f57ad8":"6oQEu",e362bf7168d77860:"cCley"}],j16TA:[function(e,t,i){var n=e("af14b1f4d994a127"),r=e("53d6ff102d14faf"),s=e("5ca81c5eeb540a34"),a=e("5e5f3eb0bfd879e9")("toPrimitive"),o=Date.prototype;n(o,a)||r(o,a,s)},{af14b1f4d994a127:"9JWVX","53d6ff102d14faf":"4CPdc","5ca81c5eeb540a34":"5DgYa","5e5f3eb0bfd879e9":"5CuF7"}],"5DgYa":[function(e,t,i){var n=e("38c74c72615b5acf"),r=e("474ad3f08d0bd65b"),s=TypeError;t.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new s("Incorrect hint");return r(this,e)}},{"38c74c72615b5acf":"dPzbI","474ad3f08d0bd65b":"6aMZM"}],ltluo:[function(e,t,i){var n=e("be835518f2abbc78"),r=e("7997503c8dda7ce0"),s=Date.prototype,a="Invalid Date",o="toString",h=n(s[o]),c=n(s.getTime);String(new Date(NaN))!==a&&r(s,o,function(){var e=c(this);return e==e?h(this):a})},{be835518f2abbc78:"2iJ57","7997503c8dda7ce0":"4CPdc"}],l0eoZ:[function(e,t,i){var n=e("ffabd3103ccbbe88"),r=e("3b0c6b91d4084705"),s=e("9544189b2ef4f6a8"),a=r("".charAt),o=r("".charCodeAt),h=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),u=/[\w*+\-./@]/,d=function(e,t){for(var i=c(e,16);i.length1?arguments[1]:void 0);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),s(d,i?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&r(d,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var n=t+" Iterator",r=v(t),s=v(n);l(e,t,function(e,t){m(this,{type:n,target:e,state:r(e),kind:t,last:null})},function(){for(var e=s(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"===t?u(i.key,!1):"values"===t?u(i.value,!1):u([i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),d(t)}}},{"4087699e0041f387":"7isQ3","1731ca06a03e84a3":"3NI4M",c048d7069b65e14b:"43JWW","5aecbe8fa3c5a74e":"f1CxE",d3ad95b3aaf27c8a:"95yA1",cac009f0bbf34bb8:"8AxCV",a9a2814559569c97:"dCEHX",eb2045e367047a1c:"klSVb","14b36f47f4e70181":"dwU83",dfd8ed3bea972a50:"c7jXZ",b83fb10f1c8587e6:"6mXK1","77d5ccb3a2fbc893":"3Q1Z8","79afb9c26314edc8":"ixHS2"}],"1aJqY":[function(e,t,i){var n=e("6567f4dade5d8960"),r=e("f35d7393646ad055"),s=e("c4503f7eb1018306"),a=e("d7c6ba4f404b5360"),o=e("ff883ec9010d6328"),h=e("f9f796f22480c881"),c=e("dc5cfe657d3f962b"),l=e("59f5d275c85c76"),u=h.Map,d=h.has,f=h.get,p=h.set,g=r([].push),m=c||l(function(){return 1!==u.groupBy("ab",function(e){return e}).get("a").length});n({target:"Map",stat:!0,forced:c||m},{groupBy:function(e,t){a(e),s(t);var i=new u,n=0;return o(e,function(e){var r=t(e,n++);d(i,r)?g(f(i,r),e):p(i,r,[e])}),i}})},{"6567f4dade5d8960":"gJg5v",f35d7393646ad055:"2iJ57",c4503f7eb1018306:"alrlv",d7c6ba4f404b5360:"cHxZN",ff883ec9010d6328:"dCEHX",f9f796f22480c881:"fY40v",dc5cfe657d3f962b:"jHRGA","59f5d275c85c76":"cXVrS"}],fY40v:[function(e,t,i){var n=e("89734044d2e98b8d"),r=Map.prototype;t.exports={Map:Map,set:n(r.set),get:n(r.get),has:n(r.has),remove:n(r.delete),proto:r}},{"89734044d2e98b8d":"2iJ57"}],DQpS3:[function(e,t,i){var n=e("902411673b5fb2fc"),r=e("a4cfbc2e86c91e88"),s=Math.acosh,a=Math.log,o=Math.sqrt,h=Math.LN2;n({target:"Math",stat:!0,forced:!s||710!==Math.floor(s(Number.MAX_VALUE))||s(1/0)!==1/0},{acosh:function(e){var t=+e;return t<1?NaN:t>94906265.62425156?a(t)+h:r(t-1+o(t-1)*o(t+1))}})},{"902411673b5fb2fc":"gJg5v",a4cfbc2e86c91e88:"fdW4O"}],fdW4O:[function(e,t,i){var n=Math.log;t.exports=Math.log1p||function(e){var t=+e;return t>-.00000001&&t<1e-8?t-t*t/2:n(1+t)}},{}],"9m0ga":[function(e,t,i){var n=e("7dffb6067574667e"),r=Math.asinh,s=Math.log,a=Math.sqrt;n({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function e(t){var i=+t;return isFinite(i)&&0!==i?i<0?-e(-i):s(i+a(i*i+1)):i}})},{"7dffb6067574667e":"gJg5v"}],"6OW8r":[function(e,t,i){var n=e("852dfc47c3d9c449"),r=Math.atanh,s=Math.log;n({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){var t=+e;return 0===t?t:s((1+t)/(1-t))/2}})},{"852dfc47c3d9c449":"gJg5v"}],"8Ipne":[function(e,t,i){var n=e("387aa8b70c72a94d"),r=e("dac8a302b6d1f627"),s=Math.abs,a=Math.pow;n({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return r(t)*a(s(t),1/3)}})},{"387aa8b70c72a94d":"gJg5v",dac8a302b6d1f627:"9QHoq"}],bbe5P:[function(e,t,i){var n=e("2c4d345d25b6d18c"),r=Math.floor,s=Math.log,a=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-r(s(t+.5)*a):32}})},{"2c4d345d25b6d18c":"gJg5v"}],giuXg:[function(e,t,i){var n=e("f8f6f4e4d2e4cfe0"),r=e("c0bbc641191a15a9"),s=Math.cosh,a=Math.abs,o=Math.E;n({target:"Math",stat:!0,forced:!s||s(710)===1/0},{cosh:function(e){var t=r(a(e)-1)+1;return o/2*(t+1/(t*o*o))}})},{f8f6f4e4d2e4cfe0:"gJg5v",c0bbc641191a15a9:"fQMM6"}],fQMM6:[function(e,t,i){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||22025.465794806718>n(10)||-.00000000000000002!==n(-.00000000000000002)?function(e){var t=+e;return 0===t?t:t>-.000001&&t<1e-6?t+t*t/2:r(t)-1}:n},{}],"4Dfiq":[function(e,t,i){var n=e("54b4d24b57e9de25"),r=e("5648f7662bee3fb6");n({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},{"54b4d24b57e9de25":"gJg5v","5648f7662bee3fb6":"fQMM6"}],cIxH8:[function(e,t,i){e("1c1b96b0ca7c4a89")({target:"Math",stat:!0},{fround:e("47950f9c73209332")})},{"1c1b96b0ca7c4a89":"gJg5v","47950f9c73209332":"lyxmB"}],khz6l:[function(e,t,i){var n=e("bf5ef278fe0c2a2d"),r=Math.hypot,s=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i,n,r=0,o=0,h=arguments.length,c=0;o0?r+=(n=i/c)*n:r+=i;return c===1/0?1/0:c*a(r)}})},{bf5ef278fe0c2a2d:"gJg5v"}],flBRC:[function(e,t,i){var n=e("26821e3060ae31ef"),r=e("4ae16bb469711695"),s=Math.imul;n({target:"Math",stat:!0,forced:r(function(){return -5!==s(4294967295,5)||2!==s.length})},{imul:function(e,t){var i=+e,n=+t,r=65535&i,s=65535&n;return 0|r*s+((65535&i>>>16)*s+r*(65535&n>>>16)<<16>>>0)}})},{"26821e3060ae31ef":"gJg5v","4ae16bb469711695":"cXVrS"}],OdIjN:[function(e,t,i){e("e28aca710c97445a")({target:"Math",stat:!0},{log10:e("e386fc2f96575e54")})},{e28aca710c97445a:"gJg5v",e386fc2f96575e54:"7QVwX"}],"7QVwX":[function(e,t,i){var n=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(e){return n(e)*r}},{}],"5N41O":[function(e,t,i){e("ec799bb6317cd425")({target:"Math",stat:!0},{log1p:e("a686ef564d9d2882")})},{ec799bb6317cd425:"gJg5v",a686ef564d9d2882:"fdW4O"}],gqwBy:[function(e,t,i){var n=e("266355161c4f030d"),r=Math.log,s=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return r(e)/s}})},{"266355161c4f030d":"gJg5v"}],cjDQT:[function(e,t,i){e("69e2ea3a560b4a42")({target:"Math",stat:!0},{sign:e("22dfbc4f803ce611")})},{"69e2ea3a560b4a42":"gJg5v","22dfbc4f803ce611":"9QHoq"}],hjxfV:[function(e,t,i){var n=e("ebfcc20cba7b1e4e"),r=e("e96ed0b70941abe1"),s=e("cfb0aa3c75dc889"),a=Math.abs,o=Math.exp,h=Math.E;n({target:"Math",stat:!0,forced:r(function(){return -.00000000000000002!==Math.sinh(-.00000000000000002)})},{sinh:function(e){var t=+e;return 1>a(t)?(s(t)-s(-t))/2:(o(t-1)-o(-t-1))*(h/2)}})},{ebfcc20cba7b1e4e:"gJg5v",e96ed0b70941abe1:"cXVrS",cfb0aa3c75dc889:"fQMM6"}],lGEJr:[function(e,t,i){var n=e("75ca6aa3ab3c490c"),r=e("fbda4dec68bbb02f"),s=Math.exp;n({target:"Math",stat:!0},{tanh:function(e){var t=+e,i=r(t),n=r(-t);return i===1/0?1:n===1/0?-1:(i-n)/(s(t)+s(-t))}})},{"75ca6aa3ab3c490c":"gJg5v",fbda4dec68bbb02f:"fQMM6"}],"8Egu9":[function(e,t,i){e("8c4fc1e6a65b6d2f")(Math,"Math",!0)},{"8c4fc1e6a65b6d2f":"dkhk9"}],jWST5:[function(e,t,i){e("f97de92e01c210b9")({target:"Math",stat:!0},{trunc:e("15d9fc8fa50b9dc3")})},{f97de92e01c210b9:"gJg5v","15d9fc8fa50b9dc3":"8w9Yn"}],hrnKP:[function(e,t,i){var n=e("6a137a118d1bb06a"),r=e("6befc110db857fa5"),s=e("dac0f49ddd258f02"),a=e("be627f07e88786cb"),o=e("2945e9e965681f9c"),h=e("d6ad03f4a8d178a7"),c=e("b7d12a59a0877cf0"),l=e("a63fe8ba771ddd66"),u=e("1fa70215a385f43f"),d=e("ac9a98828b299940"),f=e("a2f71c36cf1dfa06"),p=e("1398c779e833098a"),g=e("58c10e766b715db4"),m=e("eae30770a8520200").f,v=e("a3f2314ca43c8870").f,y=e("673bf972e777267f").f,b=e("dc2cfe6c86ab9553"),x=e("27f6d5a76060ef23").trim,E="Number",w=a[E],T=o[E],S=w.prototype,A=a.TypeError,C=h("".slice),_=h("".charCodeAt),I=function(e){var t=p(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,i,n,r,s,a,o,h,c=p(e,"number");if(f(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2){if(43===(t=_(c=x(c),0))||45===t){if(88===(i=_(c,2))||120===i)return NaN}else if(48===t){switch(_(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(o=0,a=(s=C(c,2)).length;or)return NaN;return parseInt(s,n)}}return+c},P=c(E,!w(" 0o1")||!w("0b1")||w("+0x1")),M=function(e){var t,i=arguments.length<1?0:w(I(e));return(t=this,d(S,t)&&g(function(){b(t)}))?u(Object(i),this,M):i};M.prototype=S,P&&!r&&(S.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:P},{Number:M});var R=function(e,t){for(var i,n=s?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;n.length>r;r++)l(t,i=n[r])&&!l(e,i)&&y(e,i,v(t,i))};r&&T&&R(o[E],T),(P||r)&&R(o[E],w)},{"6a137a118d1bb06a":"gJg5v","6befc110db857fa5":"jHRGA",dac0f49ddd258f02:"6mXK1",be627f07e88786cb:"7Z171","2945e9e965681f9c":"iwjHr",d6ad03f4a8d178a7:"2iJ57",b7d12a59a0877cf0:"gE5NQ",a63fe8ba771ddd66:"9JWVX","1fa70215a385f43f":"30not",ac9a98828b299940:"d5bNd",a2f71c36cf1dfa06:"2ZU2p","1398c779e833098a":"cCley","58c10e766b715db4":"cXVrS",eae30770a8520200:"dDV3S",a3f2314ca43c8870:"aRu9T","673bf972e777267f":"hvqCQ",dc2cfe6c86ab9553:"gPsjs","27f6d5a76060ef23":"jX5uQ"}],gPsjs:[function(e,t,i){var n=e("4875831adea9aec3");t.exports=n(1..valueOf)},{"4875831adea9aec3":"2iJ57"}],jX5uQ:[function(e,t,i){var n=e("17f5a3ff1a1c6ce6"),r=e("56083d5e0450dab9"),s=e("3c5616504c7d56e9"),a=e("eacd32ca91d3c555"),o=n("".replace),h=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var i=s(r(t));return 1&e&&(i=o(i,h,"")),2&e&&(i=o(i,c,"$1")),i}};t.exports={start:l(1),end:l(2),trim:l(3)}},{"17f5a3ff1a1c6ce6":"2iJ57","56083d5e0450dab9":"cHxZN","3c5616504c7d56e9":"4x6uB",eacd32ca91d3c555:"heeAP"}],heeAP:[function(e,t,i){t.exports=" \n\v\f\r                 \u2028\u2029\uFEFF"},{}],aXsIP:[function(e,t,i){e("6a152397506f58aa")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:2220446049250313e-31})},{"6a152397506f58aa":"gJg5v"}],lsaNY:[function(e,t,i){e("1cd8bc612ab8a9aa")({target:"Number",stat:!0},{isFinite:e("2741aaae50f5c5db")})},{"1cd8bc612ab8a9aa":"gJg5v","2741aaae50f5c5db":"jGkAe"}],jGkAe:[function(e,t,i){var n=e("7a63d25015bc275e").isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},{"7a63d25015bc275e":"7Z171"}],"8eW4I":[function(e,t,i){e("ce2c3fa51ce7a2b6")({target:"Number",stat:!0},{isInteger:e("3e3a085edc93c707")})},{ce2c3fa51ce7a2b6:"gJg5v","3e3a085edc93c707":"3kBvt"}],"3kBvt":[function(e,t,i){var n=e("de18539dea9401a"),r=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},{de18539dea9401a:"8mxCV"}],h5WTU:[function(e,t,i){e("677c53d72f4dc4b5")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"677c53d72f4dc4b5":"gJg5v"}],glrUF:[function(e,t,i){var n=e("dab33bcdb73caa98"),r=e("3e8bd2979ca91bb4"),s=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&9007199254740991>=s(e)}})},{dab33bcdb73caa98:"gJg5v","3e8bd2979ca91bb4":"3kBvt"}],"91CVe":[function(e,t,i){e("f08cf5dcc31074a6")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},{f08cf5dcc31074a6:"gJg5v"}],"5JCvB":[function(e,t,i){e("d7c9fce3c9d3d189")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},{d7c9fce3c9d3d189:"gJg5v"}],"1UYJO":[function(e,t,i){var n=e("6edfd3b7fb98ea3e"),r=e("bae0a47a096d7522");n({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},{"6edfd3b7fb98ea3e":"gJg5v",bae0a47a096d7522:"guYqF"}],guYqF:[function(e,t,i){var n=e("69bd3378e63391c8"),r=e("842d738e09e8ac6b"),s=e("1779e25eab454452"),a=e("a6c37474f58f0739"),o=e("595d7b3426fbca88").trim,h=e("3acff994bd3a41b1"),c=s("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,f=1/l(h+"-0")!=-1/0||d&&!r(function(){l(Object(d))});t.exports=f?function(e){var t=o(a(e)),i=l(t);return 0===i&&"-"===c(t,0)?-0:i}:l},{"69bd3378e63391c8":"7Z171","842d738e09e8ac6b":"cXVrS","1779e25eab454452":"2iJ57",a6c37474f58f0739:"4x6uB","595d7b3426fbca88":"jX5uQ","3acff994bd3a41b1":"heeAP"}],"966g1":[function(e,t,i){var n=e("3882f0ce9a7bc56f"),r=e("f2f29cbfccb05e47");n({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},{"3882f0ce9a7bc56f":"gJg5v",f2f29cbfccb05e47:"9rXua"}],"9rXua":[function(e,t,i){var n=e("272fde501e24d305"),r=e("48c528ae508d02e"),s=e("7e7198f2f1540a47"),a=e("dd517d0a64474028"),o=e("b0ec8b6ceac29d85").trim,h=e("5252068313c033be"),c=n.parseInt,l=n.Symbol,u=l&&l.iterator,d=/^[+-]?0x/i,f=s(d.exec),p=8!==c(h+"08")||22!==c(h+"0x16")||u&&!r(function(){c(Object(u))});t.exports=p?function(e,t){var i=o(a(e));return c(i,t>>>0||(f(d,i)?16:10))}:c},{"272fde501e24d305":"7Z171","48c528ae508d02e":"cXVrS","7e7198f2f1540a47":"2iJ57",dd517d0a64474028:"4x6uB",b0ec8b6ceac29d85:"jX5uQ","5252068313c033be":"heeAP"}],"2u6nF":[function(e,t,i){var n=e("8acff5e43ec1ac00"),r=e("a791fae730bb52f8"),s=e("eaaedcaf85694da0"),a=e("5cfce35661f01b6f"),o=e("6c8e5def45c211a1"),h=e("876da316e0a42221"),c=e("2c3e63cad4b974da"),l=RangeError,u=String,d=isFinite,f=Math.abs,p=Math.floor,g=Math.pow,m=Math.round,v=r(1..toExponential),y=r(o),b=r("".slice),x="-6.9000e-11"===v(-.000000000069,4)&&"1.25e+0"===v(1.255,2)&&"1.235e+4"===v(12345,3)&&"3e+1"===v(25,0);n({target:"Number",proto:!0,forced:!x||!(c(function(){v(1,1/0)})&&c(function(){v(1,-1/0)}))||!!c(function(){v(1/0,1/0),v(NaN,1/0)})},{toExponential:function(e){var t,i,n,r,o=a(this);if(void 0===e)return v(o);var c=s(e);if(!d(o))return String(o);if(c<0||c>20)throw new l("Incorrect fraction digits");if(x)return v(o,c);var E="";if(o<0&&(E="-",o=-o),0===o)i=0,t=y("0",c+1);else{var w=g(10,(i=p(h(o)))-c),T=m(o/w);2*o>=(2*T+1)*w&&(T+=1),T>=g(10,c+1)&&(T/=10,i+=1),t=u(T)}return 0!==c&&(t=b(t,0,1)+"."+b(t,1)),0===i?(n="+",r="0"):(n=i>0?"+":"-",r=u(f(i))),E+(t+="e"+n+r)}})},{"8acff5e43ec1ac00":"gJg5v",a791fae730bb52f8:"2iJ57",eaaedcaf85694da0:"gAgUH","5cfce35661f01b6f":"gPsjs","6c8e5def45c211a1":"dsk9g","876da316e0a42221":"7QVwX","2c3e63cad4b974da":"cXVrS"}],"3Zya8":[function(e,t,i){var n=e("cd4f6c8df33e40b4"),r=e("46d8af161e2dc0d6"),s=e("fb6b6174bcfa90f"),a=e("a88d9905e1f83adc"),o=e("9b93ef6d7f240c15"),h=e("d57e63cfa5cbb68e"),c=RangeError,l=String,u=Math.floor,d=r(o),f=r("".slice),p=r(1..toFixed),g=function(e,t,i){return 0===t?i:t%2==1?g(e,t-1,i*e):g(e*e,t/2,i)},m=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=u(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=u(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=l(e[t]);i=""===i?n:i+d("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:h(function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)})||!h(function(){p({})})},{toFixed:function(e){var t,i,n,r,o=a(this),h=s(e),u=[0,0,0,0,0,0],p="",x="0";if(h<0||h>20)throw new c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return l(o);if(o<0&&(p="-",o=-o),o>1e-21){if(i=((t=m(o*g(2,69,1))-69)<0?o*g(2,-t,1):o/g(2,t,1))*4503599627370496,(t=52-t)>0){for(v(u,0,i),n=h;n>=7;)v(u,1e7,0),n-=7;for(v(u,g(10,n,1),0),n=t-1;n>=23;)y(u,8388608),n-=23;y(u,1<0?p+((r=x.length)<=h?"0."+d("0",h-r)+x:f(x,0,r-h)+"."+f(x,r-h)):p+x}})},{cd4f6c8df33e40b4:"gJg5v","46d8af161e2dc0d6":"2iJ57",fb6b6174bcfa90f:"gAgUH",a88d9905e1f83adc:"gPsjs","9b93ef6d7f240c15":"dsk9g",d57e63cfa5cbb68e:"cXVrS"}],kEs9R:[function(e,t,i){var n=e("a8898a73ab91d290"),r=e("ce4a637ab8de47ca"),s=e("4308932cb74d1989"),a=e("b09e8a0929dbee09"),o=r(1..toPrecision);n({target:"Number",proto:!0,forced:s(function(){return"1"!==o(1,void 0)})||!s(function(){o({})})},{toPrecision:function(e){return void 0===e?o(a(this)):o(a(this),e)}})},{a8898a73ab91d290:"gJg5v",ce4a637ab8de47ca:"2iJ57","4308932cb74d1989":"cXVrS",b09e8a0929dbee09:"gPsjs"}],czjHQ:[function(e,t,i){var n=e("9e39c36176ea9027"),r=e("eca15ea3e03a62cf");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},{"9e39c36176ea9027":"gJg5v",eca15ea3e03a62cf:"cKgWo"}],cKgWo:[function(e,t,i){var n=e("6bef1f1b71c0d15f"),r=e("d01fdbe6acf1dc69"),s=e("152344c6f1cc0727"),a=e("e500b6660dae4ed2"),o=e("a51f09aa538cbbc9"),h=e("1e00e3b82b1b3cb6"),c=e("df8aa13044dccc97"),l=e("fb90ba2f91e5c029"),u=e("33842bab271c4900"),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||a(function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach(function(e){t[e]=e}),7!==d({},e)[i]||o(d({},t)).join("")!==r})?function(e,t){for(var i=l(e),r=arguments.length,a=1,d=h.f,f=c.f;r>a;)for(var g,m=u(arguments[a++]),v=d?p(o(m),d(m)):o(m),y=v.length,b=0;y>b;)g=v[b++],(!n||s(f,m,g))&&(i[g]=m[g]);return i}:d},{"6bef1f1b71c0d15f":"6mXK1",d01fdbe6acf1dc69:"2iJ57","152344c6f1cc0727":"bOssl",e500b6660dae4ed2:"cXVrS",a51f09aa538cbbc9:"kQgZQ","1e00e3b82b1b3cb6":"f3eHQ",df8aa13044dccc97:"7Av2Z",fb90ba2f91e5c029:"6oQEu","33842bab271c4900":"kuAas"}],"9DWg9":[function(e,t,i){e("17cb8072b960d33f")({target:"Object",stat:!0,sham:!e("b7e43977f87f28a2")},{create:e("af73c0503e5e2dd8")})},{"17cb8072b960d33f":"gJg5v",b7e43977f87f28a2:"6mXK1",af73c0503e5e2dd8:"7isQ3"}],"8uazT":[function(e,t,i){var n=e("8f6b558a4e940099"),r=e("96523e310a3fe908"),s=e("67741c7cd2815bff"),a=e("60e72fdc0dc9cee8"),o=e("81722f8311309945"),h=e("e74b2be534174483");r&&n({target:"Object",proto:!0,forced:s},{__defineGetter__:function(e,t){h.f(o(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},{"8f6b558a4e940099":"gJg5v","96523e310a3fe908":"6mXK1","67741c7cd2815bff":"hh3RM","60e72fdc0dc9cee8":"alrlv","81722f8311309945":"6oQEu",e74b2be534174483:"hvqCQ"}],hh3RM:[function(e,t,i){var n=e("8edc7d10fd60cc1f"),r=e("199488e7120262f2"),s=e("67c1b3060370d6f1"),a=e("a7f7bf4b6fabffe9");t.exports=n||!s(function(){if(!a||!(a<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r[e]}})},{"8edc7d10fd60cc1f":"jHRGA","199488e7120262f2":"7Z171","67c1b3060370d6f1":"cXVrS",a7f7bf4b6fabffe9:"1CWLZ"}],dLOib:[function(e,t,i){var n=e("79249a239f48e2d4"),r=e("b64da2842e228b05"),s=e("45e48b7437d67551").f;n({target:"Object",stat:!0,forced:Object.defineProperties!==s,sham:!r},{defineProperties:s})},{"79249a239f48e2d4":"gJg5v",b64da2842e228b05:"6mXK1","45e48b7437d67551":"ePigI"}],bVBB2:[function(e,t,i){var n=e("b118adf01477032"),r=e("a3127abbf747d8e2"),s=e("dec8f826adb685fc").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!r},{defineProperty:s})},{b118adf01477032:"gJg5v",a3127abbf747d8e2:"6mXK1",dec8f826adb685fc:"hvqCQ"}],"9laFo":[function(e,t,i){var n=e("9bd3ca02d43a34c6"),r=e("14adf2205f0de0f1"),s=e("25f3087f814cb2fd"),a=e("8f5516e8b83f7c81"),o=e("1864c5e0fe7b94e4"),h=e("fbfc447cbc7c8274");r&&n({target:"Object",proto:!0,forced:s},{__defineSetter__:function(e,t){h.f(o(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},{"9bd3ca02d43a34c6":"gJg5v","14adf2205f0de0f1":"6mXK1","25f3087f814cb2fd":"hh3RM","8f5516e8b83f7c81":"alrlv","1864c5e0fe7b94e4":"6oQEu",fbfc447cbc7c8274:"hvqCQ"}],"1E3wB":[function(e,t,i){var n=e("f61a79561ef771d5"),r=e("f45db476330e9273").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},{f61a79561ef771d5:"gJg5v",f45db476330e9273:"iwcqE"}],iwcqE:[function(e,t,i){var n=e("d3708b44f56d5dbe"),r=e("41285041ee215b4b"),s=e("fae894139558d631"),a=e("d1ebe3ffdc898f92"),o=e("8ca7d570e80b9ce7"),h=e("cd0bc0f155d9ce86"),c=s(e("8a6b90d3c1a4843d").f),l=s([].push),u=n&&r(function(){var e=Object.create(null);return e[2]=2,!c(e,2)}),d=function(e){return function(t){for(var i,r=h(t),s=o(r),d=u&&null===a(r),f=s.length,p=0,g=[];f>p;)i=s[p++],(!n||(d?i in r:c(r,i)))&&l(g,e?[i,r[i]]:r[i]);return g}};t.exports={entries:d(!0),values:d(!1)}},{d3708b44f56d5dbe:"6mXK1","41285041ee215b4b":"cXVrS",fae894139558d631:"2iJ57",d1ebe3ffdc898f92:"e8mfS","8ca7d570e80b9ce7":"kQgZQ",cd0bc0f155d9ce86:"h9ut0","8a6b90d3c1a4843d":"7Av2Z"}],cCotT:[function(e,t,i){var n=e("41df7dcb1db288e9"),r=e("fff8fcdf7f021ed"),s=e("349eb9a58219946d"),a=e("aba4dbd0c2e0df38"),o=e("83d388d2147293dd").onFreeze,h=Object.freeze;n({target:"Object",stat:!0,forced:s(function(){h(1)}),sham:!r},{freeze:function(e){return h&&a(e)?h(o(e)):e}})},{"41df7dcb1db288e9":"gJg5v",fff8fcdf7f021ed:"cPqlV","349eb9a58219946d":"cXVrS",aba4dbd0c2e0df38:"8mxCV","83d388d2147293dd":"3Q1Z8"}],htZZS:[function(e,t,i){var n=e("48c4d449b4b6a74e"),r=e("ee4e4a7ea4b35347"),s=e("34466cd01816d06a");n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,function(e,i){s(t,e,i)},{AS_ENTRIES:!0}),t}})},{"48c4d449b4b6a74e":"gJg5v",ee4e4a7ea4b35347:"dCEHX","34466cd01816d06a":"SVTZV"}],b3JIq:[function(e,t,i){var n=e("5e9e720f67356476"),r=e("c8df38aee3cb5769"),s=e("10375c86bad61030"),a=e("3b00a68c12a1896c").f,o=e("76539d9475dc0bf0");n({target:"Object",stat:!0,forced:!o||r(function(){a(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return a(s(e),t)}})},{"5e9e720f67356476":"gJg5v",c8df38aee3cb5769:"cXVrS","10375c86bad61030":"h9ut0","3b00a68c12a1896c":"aRu9T","76539d9475dc0bf0":"6mXK1"}],kPfIJ:[function(e,t,i){var n=e("40e7403e4fec8fc5"),r=e("4e8e0ded689e341a"),s=e("ca8e12f795281afd"),a=e("2a0629723aea50a6"),o=e("d8f1f7a76c234914"),h=e("d34666d556a98edd");n({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,i,n=a(e),r=o.f,c=s(n),l={},u=0;c.length>u;)void 0!==(i=r(n,t=c[u++]))&&h(l,t,i);return l}})},{"40e7403e4fec8fc5":"gJg5v","4e8e0ded689e341a":"6mXK1",ca8e12f795281afd:"k5rhT","2a0629723aea50a6":"h9ut0",d8f1f7a76c234914:"aRu9T",d34666d556a98edd:"SVTZV"}],"9ERxS":[function(e,t,i){var n=e("effeafa72fa4fcc2"),r=e("9f4f815a609d62de"),s=e("4a158a7faad2d27f").f;n({target:"Object",stat:!0,forced:r(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:s})},{effeafa72fa4fcc2:"gJg5v","9f4f815a609d62de":"cXVrS","4a158a7faad2d27f":"bBGHM"}],"6T09z":[function(e,t,i){var n=e("9b00c005c1d693fb"),r=e("ffe585e19c7a1096"),s=e("a7cc68351642ae12"),a=e("46d7a597f20859a8"),o=e("765be3ffdd1dfa5d");n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!o},{getPrototypeOf:function(e){return a(s(e))}})},{"9b00c005c1d693fb":"gJg5v",ffe585e19c7a1096:"cXVrS",a7cc68351642ae12:"6oQEu","46d7a597f20859a8":"e8mfS","765be3ffdd1dfa5d":"2SHZm"}],nZQfS:[function(e,t,i){var n=e("b06b32f47a30ec7f"),r=e("6a46da92f3f73121"),s=e("af1ec4f8b421ab5c"),a=e("2ef79b8f3bb016c7"),o=e("a668398ad3de0d7d"),h=e("70005dfdb718ef94"),c=e("972dd804937bc18f"),l=e("281c63cf55e8b57b"),u=Object.groupBy,d=r("Object","create"),f=s([].push);n({target:"Object",stat:!0,forced:!u||l(function(){return 1!==u("ab",function(e){return e}).a.length})},{groupBy:function(e,t){o(e),a(t);var i=d(null),n=0;return c(e,function(e){var r=h(t(e,n++));r in i?f(i[r],e):i[r]=[e]}),i}})},{b06b32f47a30ec7f:"gJg5v","6a46da92f3f73121":"e5ie6",af1ec4f8b421ab5c:"2iJ57","2ef79b8f3bb016c7":"alrlv",a668398ad3de0d7d:"cHxZN","70005dfdb718ef94":"gvuJs","972dd804937bc18f":"dCEHX","281c63cf55e8b57b":"cXVrS"}],"6GBQI":[function(e,t,i){e("98e893e3166a4362")({target:"Object",stat:!0},{hasOwn:e("12a9e94ed897fcaf")})},{"98e893e3166a4362":"gJg5v","12a9e94ed897fcaf":"9JWVX"}],g4f9X:[function(e,t,i){e("451600d6bdd8e576")({target:"Object",stat:!0},{is:e("56b2e52d42ffd002")})},{"451600d6bdd8e576":"gJg5v","56b2e52d42ffd002":"3Lhyq"}],"3Lhyq":[function(e,t,i){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],eNC2R:[function(e,t,i){var n=e("435e06d616210775"),r=e("cdaf74e91df56e60");n({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},{"435e06d616210775":"gJg5v",cdaf74e91df56e60:"kKQ3P"}],czmee:[function(e,t,i){var n=e("d0fbaa7eb6b5ad4d"),r=e("421049f6c11462a7"),s=e("9ed59196a9b50c30"),a=e("590e67d09aaa38f"),o=e("c1ee6c6b89bec975"),h=Object.isFrozen;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isFrozen:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{d0fbaa7eb6b5ad4d:"gJg5v","421049f6c11462a7":"cXVrS","9ed59196a9b50c30":"8mxCV","590e67d09aaa38f":"161sQ",c1ee6c6b89bec975:"fKJ3g"}],"96RAZ":[function(e,t,i){var n=e("e0d9427683afd111"),r=e("8b49b6806ae62eca"),s=e("97ad0f68c00a1ff0"),a=e("7f6c54dd5bc88c64"),o=e("c8a04ae167e7ad37"),h=Object.isSealed;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isSealed:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{e0d9427683afd111:"gJg5v","8b49b6806ae62eca":"cXVrS","97ad0f68c00a1ff0":"8mxCV","7f6c54dd5bc88c64":"161sQ",c8a04ae167e7ad37:"fKJ3g"}],"3SReg":[function(e,t,i){var n=e("928eae3c9269318e"),r=e("bffeb5a63b3d1ddc"),s=e("4e7619f3294f09c8");n({target:"Object",stat:!0,forced:e("16ceb2cf691ec6a8")(function(){s(1)})},{keys:function(e){return s(r(e))}})},{"928eae3c9269318e":"gJg5v",bffeb5a63b3d1ddc:"6oQEu","4e7619f3294f09c8":"kQgZQ","16ceb2cf691ec6a8":"cXVrS"}],dOXap:[function(e,t,i){var n=e("3213681dc3c35763"),r=e("4aa54b730f2d3e5b"),s=e("f722ba9b4a4e493a"),a=e("d9187b4f4abc84a2"),o=e("a283188d11fd1310"),h=e("81f1f2335bc409e6"),c=e("73cff62f53644df3").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupGetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.get;while(i=h(i))}})},{"3213681dc3c35763":"gJg5v","4aa54b730f2d3e5b":"6mXK1",f722ba9b4a4e493a:"hh3RM",d9187b4f4abc84a2:"6oQEu",a283188d11fd1310:"gvuJs","81f1f2335bc409e6":"e8mfS","73cff62f53644df3":"aRu9T"}],evHBo:[function(e,t,i){var n=e("cfcc7acaa30d169a"),r=e("95cf98e445e49077"),s=e("32af9c4b10e71d8a"),a=e("a3a2f8d0bb0d269a"),o=e("fc6f1b0f9f6a3207"),h=e("4f72764854999276"),c=e("940efcd169764424").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupSetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.set;while(i=h(i))}})},{cfcc7acaa30d169a:"gJg5v","95cf98e445e49077":"6mXK1","32af9c4b10e71d8a":"hh3RM",a3a2f8d0bb0d269a:"6oQEu",fc6f1b0f9f6a3207:"gvuJs","4f72764854999276":"e8mfS","940efcd169764424":"aRu9T"}],liWu9:[function(e,t,i){var n=e("dd30e23e7eea933c"),r=e("16f89a44f17d8f35"),s=e("4ddba3dd9dcca781").onFreeze,a=e("fa786d6ffa5b300e"),o=e("3a7088156a6b24b9"),h=Object.preventExtensions;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{preventExtensions:function(e){return h&&r(e)?h(s(e)):e}})},{dd30e23e7eea933c:"gJg5v","16f89a44f17d8f35":"8mxCV","4ddba3dd9dcca781":"3Q1Z8",fa786d6ffa5b300e:"cPqlV","3a7088156a6b24b9":"cXVrS"}],a2AOJ:[function(e,t,i){var n=e("12120dafa98cd91b"),r=e("8a5ee5120083625d"),s=e("dacee5d02a7d8660"),a=e("9f80f8e0960690f0"),o=e("f3ab8c15cd26e8b0"),h=e("cf1c31853a2dbd73"),c=Object.getPrototypeOf,l=Object.setPrototypeOf,u=Object.prototype,d="__proto__";if(n&&c&&l&&!(d in u))try{r(u,d,{configurable:!0,get:function(){return c(o(this))},set:function(e){var t=h(this);a(e)&&s(t)&&l(t,e)}})}catch(e){}},{"12120dafa98cd91b":"6mXK1","8a5ee5120083625d":"3NI4M",dacee5d02a7d8660:"8mxCV","9f80f8e0960690f0":"6XW5L",f3ab8c15cd26e8b0:"6oQEu",cf1c31853a2dbd73:"cHxZN"}],yqtQx:[function(e,t,i){var n=e("7431c9c36c061192"),r=e("254eb19750975bda"),s=e("2f01f54810b729a0").onFreeze,a=e("f352701af16ccb01"),o=e("c5798f0bf47c2f71"),h=Object.seal;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{seal:function(e){return h&&r(e)?h(s(e)):e}})},{"7431c9c36c061192":"gJg5v","254eb19750975bda":"8mxCV","2f01f54810b729a0":"3Q1Z8",f352701af16ccb01:"cPqlV",c5798f0bf47c2f71:"cXVrS"}],"4M7RG":[function(e,t,i){e("9b49024ba2cb31fd")({target:"Object",stat:!0},{setPrototypeOf:e("3492d4712278eb46")})},{"9b49024ba2cb31fd":"gJg5v","3492d4712278eb46":"arrdQ"}],"7ybM1":[function(e,t,i){var n=e("2f5378debd330ed5"),r=e("5e0718aecf12f1e8"),s=e("6b32f4accffdcba8");n||r(Object.prototype,"toString",s,{unsafe:!0})},{"2f5378debd330ed5":"9axlf","5e0718aecf12f1e8":"4CPdc","6b32f4accffdcba8":"a9Vf3"}],a9Vf3:[function(e,t,i){var n=e("312e54676af41375"),r=e("2dbce13c946fe9d0");t.exports=n?({}).toString:function(){return"[object "+r(this)+"]"}},{"312e54676af41375":"9axlf","2dbce13c946fe9d0":"cRCRk"}],csFkS:[function(e,t,i){var n=e("eb35dc894cb42ba5"),r=e("f1b9830bcb61759d").values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},{eb35dc894cb42ba5:"gJg5v",f1b9830bcb61759d:"iwcqE"}],"6V0HA":[function(e,t,i){var n=e("c1505c05c57d39cb"),r=e("fd7eb946ed597b55");n({global:!0,forced:parseFloat!==r},{parseFloat:r})},{c1505c05c57d39cb:"gJg5v",fd7eb946ed597b55:"guYqF"}],"26fdt":[function(e,t,i){var n=e("3ca2a8550b205bbe"),r=e("f57aad6998179c26");n({global:!0,forced:parseInt!==r},{parseInt:r})},{"3ca2a8550b205bbe":"gJg5v",f57aad6998179c26:"9rXua"}],"8nI8r":[function(e,t,i){e("71201fb984fca5e2"),e("944d2d67bf4aa279"),e("259dee16b78a9293"),e("bac68e84460cf44d"),e("35807fabff0322bf"),e("8713c69981abff7e")},{"71201fb984fca5e2":"dkJyI","944d2d67bf4aa279":"2zMO8","259dee16b78a9293":"bizKp",bac68e84460cf44d:"fDY5E","35807fabff0322bf":"2dUxj","8713c69981abff7e":"6tXif"}],dkJyI:[function(e,t,i){var n,r,s,a,o=e("cdd137752c5b4a8e"),h=e("27c8c7e1f0444fd2"),c=e("e9cf171cc5f9ff78"),l=e("d198a89966b49f7a"),u=e("643c25bd5b0dfc21"),d=e("76c41f8cfb7124b7"),f=e("6f7c1c1190868f98"),p=e("8b9ff6cd5f4bf470"),g=e("e2d999cd3139e29e"),m=e("37ba5f9496a9ce6f"),v=e("c754acf38f3fbf83"),y=e("f9d3438feb00503"),b=e("eea1cec1753c28d3"),x=e("2b3f8c9a01947fd4"),E=e("d7da4b96347ff949").set,w=e("5967e7e0ab765b55"),T=e("45c77ce65cdfa56e"),S=e("ed2bd3e4981b5b7f"),A=e("67a62e6e19993e50"),C=e("d047e80fbdc4abaf"),_=e("cb21f79465bb7a4f"),I=e("d92ec88829ba956d"),O=e("f518fe10c60b8bee"),P="Promise",M=I.CONSTRUCTOR,R=I.REJECTION_EVENT,L=I.SUBCLASSING,D=C.getterFor(P),k=C.set,N=_&&_.prototype,F=_,B=N,U=l.TypeError,V=l.document,G=l.process,j=O.f,W=j,Y=!!(V&&V.createEvent&&l.dispatchEvent),H="unhandledrejection",z=function(e){var t;return!!(y(e)&&v(t=e.then))&&t},X=function(e,t){var i,n,r,s=t.value,a=1===t.state,o=a?e.ok:e.fail,h=e.resolve,c=e.reject,l=e.domain;try{o?(a||(2===t.rejection&&Q(t),t.rejection=1),!0===o?i=s:(l&&l.enter(),i=o(s),l&&(l.exit(),r=!0)),i===e.promise?c(new U("Promise-chain cycle")):(n=z(i))?u(n,i,h,c):h(i)):c(s)}catch(e){l&&!r&&l.exit(),c(e)}},q=function(e,t){e.notified||(e.notified=!0,w(function(){for(var i,n=e.reactions;i=n.get();)X(i,e);e.notified=!1,t&&!e.rejection&&J(e)}))},K=function(e,t,i){var n,r;Y?((n=V.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:i},!R&&(r=l["on"+e])?r(n):e===H&&T("Unhandled promise rejection",i)},J=function(e){u(E,l,function(){var t,i=e.facade,n=e.value;if($(e)&&(t=S(function(){c?G.emit("unhandledRejection",n,i):K(H,i,n)}),e.rejection=c||$(e)?2:1,t.error))throw t.value})},$=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){u(E,l,function(){var t=e.facade;c?G.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)})},Z=function(e,t,i){return function(n){e(t,n,i)}},ee=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,q(e,!0))},et=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new U("Promise can't be resolved itself");var n=z(t);n?w(function(){var i={done:!1};try{u(n,t,Z(et,i,e),Z(ee,i,e))}catch(t){ee(i,t,e)}}):(e.value=t,e.state=1,q(e,!1))}catch(t){ee({done:!1},t,e)}}};if(M&&(B=(F=function(e){b(this,B),m(e),u(n,this);var t=D(this);try{e(Z(et,t),Z(ee,t))}catch(e){ee(t,e)}}).prototype,(n=function(e){k(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:null})}).prototype=d(B,"then",function(e,t){var i=D(this),n=j(x(this,F));return i.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=c?G.domain:void 0,0===i.state?i.reactions.add(n):w(function(){X(n,i)}),n.promise}),r=function(){var e=new n,t=D(e);this.promise=e,this.resolve=Z(et,t),this.reject=Z(ee,t)},O.f=j=function(e){return e===F||e===s?new r(e):W(e)},!h&&v(_)&&N!==Object.prototype)){a=N.then,L||d(N,"then",function(e,t){var i=this;return new F(function(e,t){u(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}f&&f(N,B)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:F}),p(F,P,!1,!0),g(P)},{cdd137752c5b4a8e:"gJg5v","27c8c7e1f0444fd2":"jHRGA",e9cf171cc5f9ff78:"hdoIk",d198a89966b49f7a:"7Z171","643c25bd5b0dfc21":"bOssl","76c41f8cfb7124b7":"4CPdc","6f7c1c1190868f98":"arrdQ","8b9ff6cd5f4bf470":"dkhk9",e2d999cd3139e29e:"c7jXZ","37ba5f9496a9ce6f":"alrlv",c754acf38f3fbf83:"h1Wnr",f9d3438feb00503:"8mxCV",eea1cec1753c28d3:"95yA1","2b3f8c9a01947fd4":"CaSkn",d7da4b96347ff949:"iEUCI","5967e7e0ab765b55":"fhIs0","45c77ce65cdfa56e":"8UxN2",ed2bd3e4981b5b7f:"7qEEW","67a62e6e19993e50":"74jUI",d047e80fbdc4abaf:"ixHS2",cb21f79465bb7a4f:"BGWp5",d92ec88829ba956d:"cAqqZ",f518fe10c60b8bee:"iq5DC"}],CaSkn:[function(e,t,i){var n=e("1dd3546388607f52"),r=e("1407b26f20411731"),s=e("e59a7a10597b8e96"),a=e("16c256a8cc3c03fd")("species");t.exports=function(e,t){var i,o=n(e).constructor;return void 0===o||s(i=n(o)[a])?t:r(i)}},{"1dd3546388607f52":"dPzbI","1407b26f20411731":"euAEP",e59a7a10597b8e96:"8AxCV","16c256a8cc3c03fd":"5CuF7"}],euAEP:[function(e,t,i){var n=e("f0753b26326019c1"),r=e("8e6a26f37529644e"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a constructor")}},{f0753b26326019c1:"eytEI","8e6a26f37529644e":"3zerS"}],iEUCI:[function(e,t,i){var n,r,s,a,o=e("629a4d99f4fe5b2e"),h=e("e574be68c288c7c8"),c=e("df212787338802d3"),l=e("afdf018c2d01bbc6"),u=e("35a3e849940fd612"),d=e("b8bf5434d2248ca7"),f=e("731f9370cc21fc3b"),p=e("ec358060964e4bde"),g=e("907adb6d219da7a3"),m=e("f398561ebd49a798"),v=e("8a8e342aaad83bb"),y=e("6eef8b4e43dd6731"),b=o.setImmediate,x=o.clearImmediate,E=o.process,w=o.Dispatch,T=o.Function,S=o.MessageChannel,A=o.String,C=0,_={},I="onreadystatechange";d(function(){n=o.location});var O=function(e){if(u(_,e)){var t=_[e];delete _[e],t()}},P=function(e){return function(){O(e)}},M=function(e){O(e.data)},R=function(e){o.postMessage(A(e),n.protocol+"//"+n.host)};b&&x||(b=function(e){m(arguments.length,1);var t=l(e)?e:T(e),i=p(arguments,1);return _[++C]=function(){h(t,void 0,i)},r(C),C},x=function(e){delete _[e]},y?r=function(e){E.nextTick(P(e))}:w&&w.now?r=function(e){w.now(P(e))}:S&&!v?(a=(s=new S).port2,s.port1.onmessage=M,r=c(a.postMessage,a)):o.addEventListener&&l(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(r=R,o.addEventListener("message",M,!1)):r=I in g("script")?function(e){f.appendChild(g("script"))[I]=function(){f.removeChild(this),O(e)}}:function(e){setTimeout(P(e),0)}),t.exports={set:b,clear:x}},{"629a4d99f4fe5b2e":"7Z171",e574be68c288c7c8:"2fjXG",df212787338802d3:"f1CxE",afdf018c2d01bbc6:"h1Wnr","35a3e849940fd612":"9JWVX",b8bf5434d2248ca7:"cXVrS","731f9370cc21fc3b":"23b1K",ec358060964e4bde:"eO8Ta","907adb6d219da7a3":"SppDD",f398561ebd49a798:"h3DcZ","8a8e342aaad83bb":"bUue9","6eef8b4e43dd6731":"hdoIk"}],h3DcZ:[function(e,t,i){var n=TypeError;t.exports=function(e,t){if(e1?a(arguments,1):[],i=o.f(this),n=c(function(){return s(h(e),void 0,t)});return(n.error?i.reject:i.resolve)(n.value),i.promise}})},{e891936b921586ce:"gJg5v",be55d0d9787f386c:"7Z171","53a5a11417313428":"2fjXG",b6f9059ddb81e98b:"eO8Ta","4e74861c17e890c3":"iq5DC","7900efa3cdb7a624":"alrlv","1fb2dc6087d1e9d5":"7qEEW"}],fDjj9:[function(e,t,i){var n=e("c539d5627c4a86aa"),r=e("f3ae7f423c78fd60");n({target:"Promise",stat:!0},{withResolvers:function(){var e=r.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},{c539d5627c4a86aa:"gJg5v",f3ae7f423c78fd60:"iq5DC"}],dejPc:[function(e,t,i){var n=e("1c621266486af366"),r=e("8dc2c7c905c7079"),s=e("65b541dabe35d529"),a=e("536113b176a05b60");n({target:"Reflect",stat:!0,forced:!e("e032bfdb61e2620b")(function(){Reflect.apply(function(){})})},{apply:function(e,t,i){return r(s(e),t,a(i))}})},{"1c621266486af366":"gJg5v","8dc2c7c905c7079":"2fjXG","65b541dabe35d529":"alrlv","536113b176a05b60":"dPzbI",e032bfdb61e2620b:"cXVrS"}],kL7gw:[function(e,t,i){var n=e("df593a7c66399ae2"),r=e("aa786cd255199284"),s=e("c585a7fc86970645"),a=e("d05ce57b271ff568"),o=e("488fff441ba5bfef"),h=e("688b651555d83b8f"),c=e("c7a921b7c24a97c"),l=e("2ff4acc7df7eb046"),u=e("2ad48193afce6a95"),d=r("Reflect","construct"),f=Object.prototype,p=[].push,g=u(function(){function e(){}return!(d(function(){},[],e) instanceof e)}),m=!u(function(){d(function(){})}),v=g||m;n({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){o(e),h(t);var i=arguments.length<3?e:o(arguments[2]);if(m&&!g)return d(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return s(p,n,t),new(s(a,e,n))}var r=i.prototype,u=l(c(r)?r:f),v=s(e,u,t);return c(v)?v:u}})},{df593a7c66399ae2:"gJg5v",aa786cd255199284:"e5ie6",c585a7fc86970645:"2fjXG",d05ce57b271ff568:"7PoYT","488fff441ba5bfef":"euAEP","688b651555d83b8f":"dPzbI",c7a921b7c24a97c:"8mxCV","2ff4acc7df7eb046":"7isQ3","2ad48193afce6a95":"cXVrS"}],lQsQz:[function(e,t,i){var n=e("dc2eaf4c122f82d4"),r=e("55416992b3cdb7ec"),s=e("c2c755875e2adbfa"),a=e("578d27629d28889e"),o=e("426724837dbcc1e9");n({target:"Reflect",stat:!0,forced:e("71d0ba7a21c21fc7")(function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})}),sham:!r},{defineProperty:function(e,t,i){s(e);var n=a(t);s(i);try{return o.f(e,n,i),!0}catch(e){return!1}}})},{dc2eaf4c122f82d4:"gJg5v","55416992b3cdb7ec":"6mXK1",c2c755875e2adbfa:"dPzbI","578d27629d28889e":"gvuJs","426724837dbcc1e9":"hvqCQ","71d0ba7a21c21fc7":"cXVrS"}],jy0xe:[function(e,t,i){var n=e("6dcb929d30bdbfde"),r=e("3dedf4d14121a863"),s=e("fbd53ec455a05b95").f;n({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var i=s(r(e),t);return(!i||!!i.configurable)&&delete e[t]}})},{"6dcb929d30bdbfde":"gJg5v","3dedf4d14121a863":"dPzbI",fbd53ec455a05b95:"aRu9T"}],N0A9g:[function(e,t,i){var n=e("36af64a139a04a9f"),r=e("2b0e8e0105e0ccfb"),s=e("c12275a56fb80891"),a=e("8afae34daed2ddfd"),o=e("a0fe3971b7cb6675"),h=e("64fb71955ccea62a"),c=e("42f515e0257c869d");n({target:"Reflect",stat:!0},{get:function e(t,i){var n,l,u=arguments.length<3?t:arguments[2];return a(t)===u?t[i]:(n=h.f(t,i))?o(n)?n.value:void 0===n.get?void 0:r(n.get,u):s(l=c(t))?e(l,i,u):void 0}})},{"36af64a139a04a9f":"gJg5v","2b0e8e0105e0ccfb":"bOssl",c12275a56fb80891:"8mxCV","8afae34daed2ddfd":"dPzbI",a0fe3971b7cb6675:"gi9DO","64fb71955ccea62a":"aRu9T","42f515e0257c869d":"e8mfS"}],gi9DO:[function(e,t,i){var n=e("50fb4bd8f6d0c370");t.exports=function(e){return void 0!==e&&(n(e,"value")||n(e,"writable"))}},{"50fb4bd8f6d0c370":"9JWVX"}],bnSd3:[function(e,t,i){var n=e("d7bd54e98aaffcc7"),r=e("7232f0c071c940d0"),s=e("10cdead7a28df296"),a=e("de341026ceb57ac3");n({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(s(e),t)}})},{d7bd54e98aaffcc7:"gJg5v","7232f0c071c940d0":"6mXK1","10cdead7a28df296":"dPzbI",de341026ceb57ac3:"aRu9T"}],hCLFJ:[function(e,t,i){var n=e("e0d7bd3b2cd5e427"),r=e("28c21999f76acbe2"),s=e("5d4e809754fe7c85");n({target:"Reflect",stat:!0,sham:!e("b7b6a27574b33ffc")},{getPrototypeOf:function(e){return s(r(e))}})},{e0d7bd3b2cd5e427:"gJg5v","28c21999f76acbe2":"dPzbI","5d4e809754fe7c85":"e8mfS",b7b6a27574b33ffc:"2SHZm"}],jFiZs:[function(e,t,i){e("f5a4987d6328de60")({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},{f5a4987d6328de60:"gJg5v"}],"1BYUa":[function(e,t,i){var n=e("f1cf95331dac0a5c"),r=e("6ffd352ee2b78315"),s=e("ec1223a1980707d0");n({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),s(e)}})},{f1cf95331dac0a5c:"gJg5v","6ffd352ee2b78315":"dPzbI",ec1223a1980707d0:"kKQ3P"}],"3gYE0":[function(e,t,i){e("e6256b53ff8e7ff7")({target:"Reflect",stat:!0},{ownKeys:e("62694a198a2d39f1")})},{e6256b53ff8e7ff7:"gJg5v","62694a198a2d39f1":"k5rhT"}],"8Ariw":[function(e,t,i){var n=e("21a794712b7c3b28"),r=e("b2540e28cfeb7421"),s=e("5c89b74916f5e3f1");n({target:"Reflect",stat:!0,sham:!e("368dee480fe6c03a")},{preventExtensions:function(e){s(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(e){return!1}}})},{"21a794712b7c3b28":"gJg5v",b2540e28cfeb7421:"e5ie6","5c89b74916f5e3f1":"dPzbI","368dee480fe6c03a":"cPqlV"}],fpMBl:[function(e,t,i){var n=e("ecfb0dd8a941692d"),r=e("ff301a827b8a1848"),s=e("2c02940a559ef1bc"),a=e("7a2e80973762c50c"),o=e("21efaf46e8fea96f"),h=e("8f78be83a230ea4a"),c=e("acf3c26369354b83"),l=e("4893e43c9a11fc63"),u=e("48482fa6862b803a"),d=e("de1987fde7f85915");n({target:"Reflect",stat:!0,forced:h(function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)})},{set:function e(t,i,n){var h,f,p,g=arguments.length<4?t:arguments[3],m=l.f(s(t),i);if(!m){if(a(f=u(t)))return e(f,i,n,g);m=d(0)}if(o(m)){if(!1===m.writable||!a(g))return!1;if(h=l.f(g,i)){if(h.get||h.set||!1===h.writable)return!1;h.value=n,c.f(g,i,h)}else c.f(g,i,d(0,n))}else{if(void 0===(p=m.set))return!1;r(p,g,n)}return!0}})},{ecfb0dd8a941692d:"gJg5v",ff301a827b8a1848:"bOssl","2c02940a559ef1bc":"dPzbI","7a2e80973762c50c":"8mxCV","21efaf46e8fea96f":"gi9DO","8f78be83a230ea4a":"cXVrS",acf3c26369354b83:"hvqCQ","4893e43c9a11fc63":"aRu9T","48482fa6862b803a":"e8mfS",de1987fde7f85915:"5toj2"}],"5tIGd":[function(e,t,i){var n=e("1901fc8accbc2376"),r=e("1c4ec63b43256656"),s=e("2fee865898c5ee13"),a=e("f549073ca7dfb3d2");a&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),s(t);try{return a(e,t),!0}catch(e){return!1}}})},{"1901fc8accbc2376":"gJg5v","1c4ec63b43256656":"dPzbI","2fee865898c5ee13":"hEWXk",f549073ca7dfb3d2:"arrdQ"}],"14MkC":[function(e,t,i){var n=e("9aa7ab2c6cbf6701"),r=e("28bf5c0ba6cfd67b"),s=e("717556d45c34d721");n({global:!0},{Reflect:{}}),s(r.Reflect,"Reflect",!0)},{"9aa7ab2c6cbf6701":"gJg5v","28bf5c0ba6cfd67b":"7Z171","717556d45c34d721":"dkhk9"}],"2JQK3":[function(e,t,i){var n=e("c8639d3a74e6bb07"),r=e("31e10ac977d93a17"),s=e("7f079a60fe35f235"),a=e("66b0d772c6e443af"),o=e("11d7cdfa8687037e"),h=e("5fcf789712ec006"),c=e("488fe57e39be2d0d"),l=e("8b1d3e9ebc10b376").f,u=e("6c4ec99bc7b85243"),d=e("28b4ed60c7ffe147"),f=e("f00c99d31179ed39"),p=e("867ea555b957a0aa"),g=e("86e9756a5a6a0176"),m=e("438bf11983e20900"),v=e("818c2b1aecf93017"),y=e("5b540f0dbf00266f"),b=e("5cfbf10059a84a33"),x=e("2ff319236881379d").enforce,E=e("7f2183994b17a7e8"),w=e("7edc7513ec6ac4d0"),T=e("fbaf905791cdbfe"),S=e("28f5087d79ccd92a"),A=w("match"),C=r.RegExp,_=C.prototype,I=r.SyntaxError,O=s(_.exec),P=s("".charAt),M=s("".replace),R=s("".indexOf),L=s("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,k=/a/g,N=/a/g,F=new C(k)!==k,B=g.MISSED_STICKY,U=g.UNSUPPORTED_Y,V=n&&(!F||B||T||S||y(function(){return N[A]=!1,C(k)!==k||C(N)===N||"/a/i"!==String(C(k,"i"))})),G=function(e){for(var t,i=e.length,n=0,r="",s=!1;n<=i;n++){if("\\"===(t=P(e,n))){r+=t+P(e,++n);continue}s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),r+=t):r+="[\\s\\S]"}return r},j=function(e){for(var t,i=e.length,n=0,r="",s=[],a=c(null),o=!1,h=!1,l=0,u="";n<=i;n++){if("\\"===(t=P(e,n)))t+=P(e,++n);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(r+=t,"?:"===L(e,n+1,n+3))continue;O(D,L(e,n+1))&&(n+=2,h=!0),l++;continue;case">"===t&&h:if(""===u||b(a,u))throw new I("Invalid capture group name");a[u]=!0,s[s.length]=[u,l],h=!1,u="";continue}h?u+=t:r+=t}return[r,s]};if(a("RegExp",V)){for(var W=function(e,t){var i,n,r,s,a,c,l=u(_,this),g=d(e),m=void 0===t,v=[],y=e;if(!l&&g&&m&&e.constructor===W)return e;if((g||u(_,e))&&(e=e.source,m&&(t=p(y))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),y=e,T&&"dotAll"in k&&(n=!!t&&R(t,"s")>-1)&&(t=M(t,/s/g,"")),i=t,B&&"sticky"in k&&(r=!!t&&R(t,"y")>-1)&&U&&(t=M(t,/y/g,"")),S&&(e=(s=j(e))[0],v=s[1]),a=o(C(e,t),l?this:_,W),(n||r||v.length)&&(c=x(a),n&&(c.dotAll=!0,c.raw=W(G(e),i)),r&&(c.sticky=!0),v.length&&(c.groups=v)),e!==y)try{h(a,"source",""===y?"(?:)":y)}catch(e){}return a},Y=l(C),H=0;Y.length>H;)m(W,C,Y[H++]);_.constructor=W,W.prototype=_,v(r,"RegExp",W,{constructor:!0})}E("RegExp")},{c8639d3a74e6bb07:"6mXK1","31e10ac977d93a17":"7Z171","7f079a60fe35f235":"2iJ57","66b0d772c6e443af":"gE5NQ","11d7cdfa8687037e":"30not","5fcf789712ec006":"gKM90","488fe57e39be2d0d":"7isQ3","8b1d3e9ebc10b376":"dDV3S","6c4ec99bc7b85243":"d5bNd","28b4ed60c7ffe147":"4WTYw",f00c99d31179ed39:"4x6uB","867ea555b957a0aa":"iG8db","86e9756a5a6a0176":"arHMc","438bf11983e20900":"7fWkz","818c2b1aecf93017":"4CPdc","5b540f0dbf00266f":"cXVrS","5cfbf10059a84a33":"9JWVX","2ff319236881379d":"ixHS2","7f2183994b17a7e8":"c7jXZ","7edc7513ec6ac4d0":"5CuF7",fbaf905791cdbfe:"9jBfE","28f5087d79ccd92a":"9XBEq"}],"4WTYw":[function(e,t,i){var n=e("4ca57df9821dbfa3"),r=e("b867bee476fc5018"),s=e("42cd33b6dbd61bee")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===r(e))}},{"4ca57df9821dbfa3":"8mxCV",b867bee476fc5018:"161sQ","42cd33b6dbd61bee":"5CuF7"}],iG8db:[function(e,t,i){var n=e("fd54476372f3a204"),r=e("a12d2126c329f45"),s=e("815509f48e0b1e36"),a=e("37fba4854c4ab846"),o=RegExp.prototype;t.exports=function(e){var t=e.flags;return!(void 0===t&&!("flags"in o)&&!r(e,"flags")&&s(o,e))?t:n(a,e)}},{fd54476372f3a204:"bOssl",a12d2126c329f45:"9JWVX","815509f48e0b1e36":"d5bNd","37fba4854c4ab846":"jjoUH"}],jjoUH:[function(e,t,i){var n=e("136abace0aec2b5c");t.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},{"136abace0aec2b5c":"dPzbI"}],arHMc:[function(e,t,i){var n=e("797bef35e651cb5e"),r=e("d87f6288614c07bc").RegExp,s=n(function(){var e=r("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=s||n(function(){return!r("a","y").sticky}),o=s||n(function(){var e=r("^r","gy");return e.lastIndex=2,null!==e.exec("str")});t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},{"797bef35e651cb5e":"cXVrS",d87f6288614c07bc:"7Z171"}],"9jBfE":[function(e,t,i){var n=e("e4784e58ea762065"),r=e("ea51a856230c58ac").RegExp;t.exports=n(function(){var e=r(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},{e4784e58ea762065:"cXVrS",ea51a856230c58ac:"7Z171"}],"9XBEq":[function(e,t,i){var n=e("b9b1a0fbdd999ded"),r=e("f47a97b0c4cfeafc").RegExp;t.exports=n(function(){var e=r("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},{b9b1a0fbdd999ded:"cXVrS",f47a97b0c4cfeafc:"7Z171"}],"9radj":[function(e,t,i){var n=e("a9f8f60f2f751fb4"),r=e("f4bf414038137d54"),s=e("f6019dcdb547562c"),a=e("ca788245c2356b08"),o=e("ff536bd90d3c7c05").get,h=RegExp.prototype,c=TypeError;n&&r&&a(h,"dotAll",{configurable:!0,get:function(){if(this!==h){if("RegExp"===s(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},{a9f8f60f2f751fb4:"6mXK1",f4bf414038137d54:"9jBfE",f6019dcdb547562c:"161sQ",ca788245c2356b08:"3NI4M",ff536bd90d3c7c05:"ixHS2"}],"4cips":[function(e,t,i){var n=e("72ba4de9841213e"),r=e("d4ebaff1663cc5b9");n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},{"72ba4de9841213e":"gJg5v",d4ebaff1663cc5b9:"gpoGl"}],gpoGl:[function(e,t,i){var n,r,s=e("698f504b4733b02d"),a=e("6d0d2df39383a10b"),o=e("382af5492ddc18e6"),h=e("96e0244464229d3"),c=e("3bd1d72d4987e0ff"),l=e("12c3e6e355312395"),u=e("38d060dff8e4ab54"),d=e("aec1e11e2cd92d19").get,f=e("7d9db6b4177b833a"),p=e("b26a8ca5152d0a8d"),g=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,v=m,y=a("".charAt),b=a("".indexOf),x=a("".replace),E=a("".slice),w=(r=/b*/g,s(m,n=/a/,"a"),s(m,r,"a"),0!==n.lastIndex||0!==r.lastIndex),T=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(w||S||T||f||p)&&(v=function(e){var t,i,n,r,a,c,l,f=d(this),p=o(e),A=f.raw;if(A)return A.lastIndex=this.lastIndex,t=s(v,A,p),this.lastIndex=A.lastIndex,t;var C=f.groups,_=T&&this.sticky,I=s(h,this),O=this.source,P=0,M=p;if(_&&(-1===b(I=x(I,"y",""),"g")&&(I+="g"),M=E(p,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==y(p,this.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,P++),i=RegExp("^(?:"+O+")",I)),S&&(i=RegExp("^"+O+"$(?!\\s)",I)),w&&(n=this.lastIndex),r=s(m,_?i:this,M),_?r?(r.input=E(r.input,P),r[0]=E(r[0],P),r.index=this.lastIndex,this.lastIndex+=r[0].length):this.lastIndex=0:w&&r&&(this.lastIndex=this.global?r.index+r[0].length:n),S&&r&&r.length>1&&s(g,r[0],i,function(){for(a=1;ai.size?h(i.getIterator(),function(e){u(t,e)&&l(r,e)}):o(t,function(e){i.includes(e)&&l(r,e)}),r}},{"7bfb130f16b8292a":"1uHXp","47146aea8f1cd561":"aKtSD",d1a604e694f4d1c9:"dDfau",cd0f29a36bce3c77:"2mzII","569d3010c2a051bc":"dSeD9",f15171665078c946:"hUCXP"}],ebh58:[function(e,t,i){var n=e("a1707a0c61f5a536"),r=e("cb8bc5c7a60da2c0");n({target:"Set",proto:!0,real:!0,forced:!e("d245d89a0dca71e2")("isDisjointFrom")},{isDisjointFrom:r})},{a1707a0c61f5a536:"gJg5v",cb8bc5c7a60da2c0:"fsPLP",d245d89a0dca71e2:"cAght"}],fsPLP:[function(e,t,i){var n=e("4bcf2c126f0ee7e9"),r=e("5f2538d74cbdf8b3").has,s=e("edcd27260fbf6ef5"),a=e("9b207c4104d5301c"),o=e("bae422673873a59e"),h=e("ba88aed3f0227034"),c=e("11af6bfd4840cc69");t.exports=function(e){var t=n(this),i=a(e);if(s(t)<=i.size)return!1!==o(t,function(e){if(i.includes(e))return!1},!0);var l=i.getIterator();return!1!==h(l,function(e){if(r(t,e))return c(l,"normal",!1)})}},{"4bcf2c126f0ee7e9":"1uHXp","5f2538d74cbdf8b3":"aKtSD",edcd27260fbf6ef5:"dDfau","9b207c4104d5301c":"2mzII",bae422673873a59e:"dSeD9",ba88aed3f0227034:"hUCXP","11af6bfd4840cc69":"58eij"}],"5aq0U":[function(e,t,i){var n=e("67c95d67210a1f28"),r=e("ad07e334c2be4c40");n({target:"Set",proto:!0,real:!0,forced:!e("87c6020e8c27ff9d")("isSubsetOf")},{isSubsetOf:r})},{"67c95d67210a1f28":"gJg5v",ad07e334c2be4c40:"6M8p1","87c6020e8c27ff9d":"cAght"}],"6M8p1":[function(e,t,i){var n=e("3d5a277c60f35ee0"),r=e("8b5056cb353b9363"),s=e("5c8afb92d90a7afe"),a=e("5d0efb34cef239d0");t.exports=function(e){var t=n(this),i=a(e);return!(r(t)>i.size)&&!1!==s(t,function(e){if(!i.includes(e))return!1},!0)}},{"3d5a277c60f35ee0":"1uHXp","8b5056cb353b9363":"dDfau","5c8afb92d90a7afe":"dSeD9","5d0efb34cef239d0":"2mzII"}],"8hV4V":[function(e,t,i){var n=e("709d88585366e67"),r=e("56957227e511c32f");n({target:"Set",proto:!0,real:!0,forced:!e("96eae72d49b9b957")("isSupersetOf")},{isSupersetOf:r})},{"709d88585366e67":"gJg5v","56957227e511c32f":"eyhzP","96eae72d49b9b957":"cAght"}],eyhzP:[function(e,t,i){var n=e("93254e314b2e5736"),r=e("be41c371321728ce").has,s=e("95f22a3e4ec3e3cd"),a=e("3cd91641e66e9eeb"),o=e("9565d7b14e850c29"),h=e("9f7dd30215d71bc9");t.exports=function(e){var t=n(this),i=a(e);if(s(t)=0?n:i+n;return r<0||r>=i?void 0:c(t,r)}})},{"473defaa8915e9e4":"gJg5v",dd4afa154631abab:"2iJ57",d699b04e9a9f7a28:"cHxZN",df1114985710f2b3:"gAgUH","3b247286b7d8c4d5":"4x6uB",da5b773a057f92aa:"cXVrS"}],g0fSy:[function(e,t,i){var n=e("4793fe8f86582840"),r=e("785f7a78d0dffe20").codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},{"4793fe8f86582840":"gJg5v","785f7a78d0dffe20":"fVu0j"}],fVu0j:[function(e,t,i){var n=e("8b9beff9818f042"),r=e("d3e375e7697978fb"),s=e("545a72c28133c459"),a=e("5bafa9e5b372669c"),o=n("".charAt),h=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,i){var n,l,u=s(a(t)),d=r(i),f=u.length;return d<0||d>=f?e?"":void 0:(n=h(u,d))<55296||n>56319||d+1===f||(l=h(u,d+1))<56320||l>57343?e?o(u,d):n:e?c(u,d,d+2):(n-55296<<10)+(l-56320)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},{"8b9beff9818f042":"2iJ57",d3e375e7697978fb:"gAgUH","545a72c28133c459":"4x6uB","5bafa9e5b372669c":"cHxZN"}],eKkbH:[function(e,t,i){var n,r=e("b3cd31deb9d32a8c"),s=e("c719ddda901eac13"),a=e("e75304a6599a5e3c").f,o=e("99883df659b0f5cb"),h=e("e5d8defa036db553"),c=e("4c78f4ce8264459e"),l=e("da4ce5f132e95194"),u=e("58da9c5323c25a0f"),d=e("e85ff4c5cebafc14"),f=s("".slice),p=Math.min,g=u("endsWith");r({target:"String",proto:!0,forced:!(!d&&!g&&(n=a(String.prototype,"endsWith"))&&!n.writable)&&!g},{endsWith:function(e){var t=h(l(this));c(e);var i=arguments.length>1?arguments[1]:void 0,n=t.length,r=void 0===i?n:p(o(i),n),s=h(e);return f(t,r-s.length,r)===s}})},{b3cd31deb9d32a8c:"gJg5v",c719ddda901eac13:"c4z5p",e75304a6599a5e3c:"aRu9T","99883df659b0f5cb":"lQsU7",e5d8defa036db553:"4x6uB","4c78f4ce8264459e":"6Sz3M",da4ce5f132e95194:"cHxZN","58da9c5323c25a0f":"i38lK",e85ff4c5cebafc14:"jHRGA"}],"6Sz3M":[function(e,t,i){var n=e("7b932b7711b6ae16"),r=TypeError;t.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},{"7b932b7711b6ae16":"4WTYw"}],i38lK:[function(e,t,i){var n=e("303b9f26f388462e")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},{"303b9f26f388462e":"5CuF7"}],dLJLG:[function(e,t,i){var n=e("f7ab90f668dfed5f"),r=e("f19d1a907413c68d"),s=e("6914a342ea61c319"),a=RangeError,o=String.fromCharCode,h=String.fromCodePoint,c=r([].join);n({target:"String",stat:!0,arity:1,forced:!!h&&1!==h.length},{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,r=0;n>r;){if(t=+arguments[r++],s(t,1114111)!==t)throw new a(t+" is not a valid code point");i[r]=t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320)}return c(i,"")}})},{f7ab90f668dfed5f:"gJg5v",f19d1a907413c68d:"2iJ57","6914a342ea61c319":"47gaI"}],cDQpr:[function(e,t,i){var n=e("1cde7a4fbe24deb1"),r=e("d9ff51b37cd276ef"),s=e("b1c9b74814a0e4ee"),a=e("36f262aff4650984"),o=e("c6f2de0a65cb2a09"),h=e("30dec888dfe829e2"),c=r("".indexOf);n({target:"String",proto:!0,forced:!h("includes")},{includes:function(e){return!!~c(o(a(this)),o(s(e)),arguments.length>1?arguments[1]:void 0)}})},{"1cde7a4fbe24deb1":"gJg5v",d9ff51b37cd276ef:"2iJ57",b1c9b74814a0e4ee:"6Sz3M","36f262aff4650984":"cHxZN",c6f2de0a65cb2a09:"4x6uB","30dec888dfe829e2":"i38lK"}],kFTda:[function(e,t,i){var n=e("119056f2894f6d80"),r=e("5d2e4bc1718ad78f"),s=e("9410272c8796c548"),a=e("8f81c73916cb66a4"),o=r("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var e=a(s(this)),t=e.length,i=0;i=56320||++i>=t||(64512&o(e,i))!=56320))return!1}return!0}})},{"119056f2894f6d80":"gJg5v","5d2e4bc1718ad78f":"2iJ57","9410272c8796c548":"cHxZN","8f81c73916cb66a4":"4x6uB"}],i2qFG:[function(e,t,i){var n=e("e8b36e9e8f60deb1").charAt,r=e("99724183e9ac759e"),s=e("75c45c226da41a58"),a=e("5bce8e62b9ff7984"),o=e("cab4a14c8e102263"),h="String Iterator",c=s.set,l=s.getterFor(h);a(String,"String",function(e){c(this,{type:h,string:r(e),index:0})},function(){var e,t=l(this),i=t.string,r=t.index;return r>=i.length?o(void 0,!0):(e=n(i,r),t.index+=e.length,o(e,!1))})},{e8b36e9e8f60deb1:"fVu0j","99724183e9ac759e":"4x6uB","75c45c226da41a58":"ixHS2","5bce8e62b9ff7984":"klSVb",cab4a14c8e102263:"dwU83"}],"6dNpA":[function(e,t,i){var n=e("1a72ba86dc4099cd"),r=e("3e8300c8dcd37861"),s=e("4e367ba2e602279b"),a=e("a9817085717103ac"),o=e("3ad5c9f9719d1735"),h=e("a1912f278569b4e6"),c=e("d83ac9e10edfa0ef"),l=e("4fa13f5559b9cbba"),u=e("357167b0f8a6ba45"),d=e("3b40f00a568e6a6b");r("match",function(e,t,i){return[function(t){var i=c(this),r=a(t)?void 0:l(t,e);return r?n(r,t,i):new RegExp(t)[e](h(i))},function(e){var n,r=s(this),a=h(e),c=i(t,r,a);if(c.done)return c.value;if(!r.global)return d(r,a);var l=r.unicode;r.lastIndex=0;for(var f=[],p=0;null!==(n=d(r,a));){var g=h(n[0]);f[p]=g,""===g&&(r.lastIndex=u(a,o(r.lastIndex),l)),p++}return 0===p?null:f}]})},{"1a72ba86dc4099cd":"bOssl","3e8300c8dcd37861":"a7eSP","4e367ba2e602279b":"dPzbI",a9817085717103ac:"8AxCV","3ad5c9f9719d1735":"lQsU7",a1912f278569b4e6:"4x6uB",d83ac9e10edfa0ef:"cHxZN","4fa13f5559b9cbba":"2qR8N","357167b0f8a6ba45":"jbkzM","3b40f00a568e6a6b":"gcJzM"}],a7eSP:[function(e,t,i){e("a7057ee05361671");var n=e("771b9a32e3d08596"),r=e("5a9ef6cc43262548"),s=e("b286e3fd8e91d745"),a=e("f56adef42dd3c42"),o=e("39c5bea895574e43"),h=e("1c6881441295e4f4"),c=o("species"),l=RegExp.prototype;t.exports=function(e,t,i,u){var d=o(e),f=!a(function(){var t={};return t[d]=function(){return 7},7!==""[e](t)}),p=f&&!a(function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[c]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return t=!0,null},i[d](""),!t});if(!f||!p||i){var g=/./[d],m=t(d,""[e],function(e,t,i,r,a){var o=t.exec;return o===s||o===l.exec?f&&!a?{done:!0,value:n(g,t,i,r)}:{done:!0,value:n(e,i,t,r)}:{done:!1}});r(String.prototype,e,m[0]),r(l,d,m[1])}u&&h(l[d],"sham",!0)}},{a7057ee05361671:"4cips","771b9a32e3d08596":"bOssl","5a9ef6cc43262548":"4CPdc",b286e3fd8e91d745:"gpoGl",f56adef42dd3c42:"cXVrS","39c5bea895574e43":"5CuF7","1c6881441295e4f4":"gKM90"}],jbkzM:[function(e,t,i){var n=e("7830b1b106fe9c2f").charAt;t.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},{"7830b1b106fe9c2f":"fVu0j"}],gcJzM:[function(e,t,i){var n=e("fe012fd0e62b041c"),r=e("953f0ef3a583db2e"),s=e("7b1bebb22aa6d09f"),a=e("41458309d054e6d9"),o=e("2da13aa8500d5870"),h=TypeError;t.exports=function(e,t){var i=e.exec;if(s(i)){var c=n(i,e,t);return null!==c&&r(c),c}if("RegExp"===a(e))return n(o,e,t);throw new h("RegExp#exec called on incompatible receiver")}},{fe012fd0e62b041c:"bOssl","953f0ef3a583db2e":"dPzbI","7b1bebb22aa6d09f":"h1Wnr","41458309d054e6d9":"161sQ","2da13aa8500d5870":"gpoGl"}],"5JfZw":[function(e,t,i){var n=e("ab7506693563188f"),r=e("bc392a1870cac46c"),s=e("518f2de578425815"),a=e("5413f14f6fa8d586"),o=e("b080d5b6d2874bb9"),h=e("500412608beb0fa4"),c=e("d27dba1be9ae2ec7"),l=e("304a5dfbef2eca6a"),u=e("c369a3c8053cdec1"),d=e("c7ae38c574bac52a"),f=e("f127fd901a8322fa"),p=e("3da774f1ac5cef39"),g=e("5e13bde3b69470d3"),m=e("d67b0fe73b3441f6"),v=e("c3d9a3b5ce1a0134"),y=e("f824fce70460b786"),b=e("fe46150a38a85a5d"),x=e("c158ae31b64e4ec2"),E=e("2eeb2389fe600209"),w=e("a803aed269f0019b"),T=e("e9503db7c8f89e91"),S=e("d919927dacd61c64"),A=b("matchAll"),C="RegExp String",_=C+" Iterator",I=T.set,O=T.getterFor(_),P=RegExp.prototype,M=TypeError,R=s("".indexOf),L=s("".matchAll),D=!!L&&!y(function(){L("a",/./)}),k=a(function(e,t,i,n){I(this,{type:_,regexp:e,string:t,global:i,unicode:n,done:!1})},C,function(){var e=O(this);if(e.done)return o(void 0,!0);var t=e.regexp,i=e.string,n=w(t,i);return null===n?(e.done=!0,o(void 0,!0)):(e.global?""===l(n[0])&&(t.lastIndex=E(i,c(t.lastIndex),e.unicode)):e.done=!0,o(n,!1))}),N=function(e){var t,i,n,r=u(this),s=l(e),a=x(r,RegExp),o=l(g(r));return t=new a(a===RegExp?r.source:r,o),i=!!~R(o,"g"),n=!!~R(o,"u"),t.lastIndex=c(r.lastIndex),new k(t,s,i,n)};n({target:"String",proto:!0,forced:D},{matchAll:function(e){var t,i,n,s=h(this);if(d(e)){if(D)return L(s,e)}else{if(p(e)&&!~R(l(h(g(e))),"g"))throw new M("`.matchAll` does not allow non-global regexes");if(D)return L(s,e);if(void 0===(i=m(e,A))&&S&&"RegExp"===f(e)&&(i=N),i)return r(i,e,s)}return t=l(s),n=RegExp(e,"g"),S?r(N,n,t):n[A](t)}}),S||A in P||v(P,A,N)},{ab7506693563188f:"gJg5v",bc392a1870cac46c:"bOssl","518f2de578425815":"c4z5p","5413f14f6fa8d586":"1Abii",b080d5b6d2874bb9:"dwU83","500412608beb0fa4":"cHxZN",d27dba1be9ae2ec7:"lQsU7","304a5dfbef2eca6a":"4x6uB",c369a3c8053cdec1:"dPzbI",c7ae38c574bac52a:"8AxCV",f127fd901a8322fa:"161sQ","3da774f1ac5cef39":"4WTYw","5e13bde3b69470d3":"iG8db",d67b0fe73b3441f6:"2qR8N",c3d9a3b5ce1a0134:"4CPdc",f824fce70460b786:"cXVrS",fe46150a38a85a5d:"5CuF7",c158ae31b64e4ec2:"CaSkn","2eeb2389fe600209":"jbkzM",a803aed269f0019b:"gcJzM",e9503db7c8f89e91:"ixHS2",d919927dacd61c64:"jHRGA"}],fU7MD:[function(e,t,i){var n=e("bde41783ec0f17a4"),r=e("794108b869e92a52").end;n({target:"String",proto:!0,forced:e("271b5f05be76b6dd")},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{bde41783ec0f17a4:"gJg5v","794108b869e92a52":"15Fl7","271b5f05be76b6dd":"38Jla"}],"38Jla":[function(e,t,i){var n=e("ea42f18a4a6e86a9");t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},{ea42f18a4a6e86a9:"5hj4U"}],iz82g:[function(e,t,i){var n=e("31f9b30345fd3179"),r=e("10950b9580001d1d").start;n({target:"String",proto:!0,forced:e("c86924140d1ee1af")},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"31f9b30345fd3179":"gJg5v","10950b9580001d1d":"15Fl7",c86924140d1ee1af:"38Jla"}],"5PH9s":[function(e,t,i){var n=e("d77bea9ed21ff4bc"),r=e("7ed823ef2298b758"),s=e("1210aa921fc34970"),a=e("4320a1855b3e38fb"),o=e("c2348ecf591fb82d"),h=e("4b1f320aa7c99da8"),c=r([].push),l=r([].join);n({target:"String",stat:!0},{raw:function(e){var t=s(a(e).raw),i=h(t);if(!i)return"";for(var n=arguments.length,r=[],u=0;;){if(c(r,o(t[u++])),u===i)return l(r,"");u=_&&(C+=A(o,_,D)+R,_=D+L.length)}return C+A(o,_)}]},!!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})||!C||_)},{f8fd16f994f85406:"2fjXG",b5234e1018cb2916:"bOssl",c3560c75b4ad1ef2:"2iJ57",c4a2369a79c5aaa2:"a7eSP",daa534dec0372986:"cXVrS","317f495e148be81e":"dPzbI","36464dd17d2a7224":"h1Wnr",cea091f017783d94:"8AxCV","3847a5ff118f8ebb":"gAgUH",effd88adfbb6b4bc:"lQsU7","953b724c90cd8db6":"4x6uB","154963922e7c9354":"cHxZN","90f011aa61b831b4":"jbkzM",af552ab4c89e35be:"2qR8N","3726cfd8dc51c82c":"gSNtK","6de55154ce28598":"gcJzM","4b6a0c7e75a1080a":"5CuF7"}],gSNtK:[function(e,t,i){var n=e("3cf51fea5d34c201"),r=e("999f669befd62c27"),s=Math.floor,a=n("".charAt),o=n("".replace),h=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,n,u,d){var f=i+e.length,p=n.length,g=l;return void 0!==u&&(u=r(u),g=c),o(d,g,function(r,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"`":return h(t,0,i);case"'":return h(t,f);case"<":c=u[h(o,1,-1)];break;default:var l=+o;if(0===l)return r;if(l>p){var d=s(l/10);if(0===d)return r;if(d<=p)return void 0===n[d-1]?a(o,1):n[d-1]+a(o,1);return r}c=n[l-1]}return void 0===c?"":c})}},{"3cf51fea5d34c201":"2iJ57","999f669befd62c27":"6oQEu"}],"2HEOd":[function(e,t,i){var n=e("69381acad0f1f180"),r=e("be2b5a787b4341ed"),s=e("70979a707458e2bc"),a=e("ede342a754b29b08"),o=e("7b33c58d7c6a633e"),h=e("bc393499bad934a6"),c=e("1f633e1cea7bfece"),l=e("5a07dc19106ad672"),u=e("40b88ab8d2a68602"),d=e("c009564a6e08e49f"),f=e("49118a84cede6c94"),p=e("d9c85063e2fa18d1"),g=e("179cb9efb80dcae1"),m=p("replace"),v=TypeError,y=s("".indexOf),b=s("".replace),x=s("".slice),E=Math.max;n({target:"String",proto:!0},{replaceAll:function(e,t){var i,n,s,p,w,T,S,A,C,_=a(this),I=0,O="";if(!h(e)){if((i=c(e))&&!~y(l(a(d(e))),"g"))throw new v("`.replaceAll` does not allow non-global regexes");if(n=u(e,m))return r(n,e,_,t);if(g&&i)return b(l(_),e,t)}for(s=l(_),p=l(e),(w=o(t))||(t=l(t)),S=E(1,T=p.length),A=y(s,p);-1!==A;)C=w?l(t(p,A,s)):f(p,s,A,[],void 0,t),O+=x(s,I,A)+C,I=A+T,A=A+S>s.length?-1:y(s,p,A+S);return I1||"".split(/.?/).length;s("split",function(e,t,i){var r="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n(t,this,e,i)}:t;return[function(t,i){var s=h(this),a=o(t)?void 0:f(t,e);return a?n(a,t,s,i):n(r,d(s),t,i)},function(e,n){var s=a(this),o=d(e);if(!w){var h=i(r,s,o,n,r!==t);if(h.done)return h.value}var f=c(s,RegExp),g=s.unicode,m=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(v?"g":"y"),E=new f(v?"^(?:"+s.source+")":s,m),T=void 0===n?4294967295:n>>>0;if(0===T)return[];if(0===o.length)return null===p(E,o)?[o]:[];for(var S=0,A=0,C=[];A1?arguments[1]:void 0,t.length)),n=h(e);return f(t,i,i+n.length)===n}})},{dde854d8a76d436d:"gJg5v","75ef62d12e51b46c":"c4z5p",ff3b80c156be6132:"aRu9T","573cc620487e2f6b":"lQsU7","3d6be1b7c00bafd":"4x6uB","40ed833d044b85cd":"6Sz3M","7b57b8afdd10d7e4":"cHxZN","80ffa3ecff44b920":"i38lK",d76fe9fb1319d805:"jHRGA"}],ilZVq:[function(e,t,i){var n=e("e3f052c25e9ce7a0"),r=e("79d87d02e012ddb6"),s=e("d9b0f8ef34c7f588"),a=e("7684d557cb0eafb9"),o=e("a0c96765c2fd3918"),h=r("".slice),c=Math.max,l=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var i,n,r=o(s(this)),u=r.length,d=a(e);return(d===1/0&&(d=0),d<0&&(d=c(u+d,0)),(i=void 0===t?u:a(t))<=0||i===1/0)?"":(n=l(d+i,u),d>=n?"":h(r,d,n))}})},{e3f052c25e9ce7a0:"gJg5v","79d87d02e012ddb6":"2iJ57",d9b0f8ef34c7f588:"cHxZN","7684d557cb0eafb9":"gAgUH",a0c96765c2fd3918:"4x6uB"}],hUcmJ:[function(e,t,i){var n=e("abdac43301199021"),r=e("46e4a85192f95918"),s=e("63c730f9593a416e"),a=e("2fb31922ea5ff27d"),o=e("6f82048edf356822"),h=e("2f2665d060e5f6a1"),c=Array,l=s("".charAt),u=s("".charCodeAt),d=s([].join),f="".toWellFormed,p=f&&h(function(){return"1"!==r(f,1)});n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var e=o(a(this));if(p)return r(f,e);for(var t=e.length,i=c(t),n=0;n=56320||n+1>=t||(64512&u(e,n+1))!=56320?i[n]="�":(i[n]=l(e,n),i[++n]=l(e,n))}return d(i,"")}})},{abdac43301199021:"gJg5v","46e4a85192f95918":"bOssl","63c730f9593a416e":"2iJ57","2fb31922ea5ff27d":"cHxZN","6f82048edf356822":"4x6uB","2f2665d060e5f6a1":"cXVrS"}],l2p2s:[function(e,t,i){var n=e("4a60febef79e9fd2"),r=e("aa85dc53780a7a31").trim;n({target:"String",proto:!0,forced:e("d62e07fb0a0f0c26")("trim")},{trim:function(){return r(this)}})},{"4a60febef79e9fd2":"gJg5v",aa85dc53780a7a31:"jX5uQ",d62e07fb0a0f0c26:"cZ2PC"}],cZ2PC:[function(e,t,i){var n=e("9e0c4c0dbddf03dd").PROPER,r=e("92328d780355dc79"),s=e("8c0d7fed4094a2b6"),a="​…᠎";t.exports=function(e){return r(function(){return!!s[e]()||a[e]()!==a||n&&s[e].name!==e})}},{"9e0c4c0dbddf03dd":"jmu0n","92328d780355dc79":"cXVrS","8c0d7fed4094a2b6":"heeAP"}],"3o3Gk":[function(e,t,i){e("251a593a444ed436");var n=e("91f4001402f2b9ee"),r=e("c6b02e29a67a6f26");n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},{"251a593a444ed436":"94n2Q","91f4001402f2b9ee":"gJg5v",c6b02e29a67a6f26:"eV55a"}],"94n2Q":[function(e,t,i){var n=e("de7842587ae70a42"),r=e("324b25d4226efe2d");n({target:"String",proto:!0,name:"trimEnd",forced:void 0!==r},{trimRight:r})},{de7842587ae70a42:"gJg5v","324b25d4226efe2d":"eV55a"}],eV55a:[function(e,t,i){var n=e("bc94349b4fc95bb3").end,r=e("71fc76130b4f9a6");t.exports=r("trimEnd")?function(){return n(this)}:"".trimEnd},{bc94349b4fc95bb3:"jX5uQ","71fc76130b4f9a6":"cZ2PC"}],"4Lt39":[function(e,t,i){e("654c60d6d97014cd");var n=e("26b6a882a1c5bba9"),r=e("b5f2740011c04718");n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},{"654c60d6d97014cd":"7XL4A","26b6a882a1c5bba9":"gJg5v",b5f2740011c04718:"lOELU"}],"7XL4A":[function(e,t,i){var n=e("2da1b55d02d90d4a"),r=e("8b6aefe7df6c88a");n({target:"String",proto:!0,name:"trimStart",forced:void 0!==r},{trimLeft:r})},{"2da1b55d02d90d4a":"gJg5v","8b6aefe7df6c88a":"lOELU"}],lOELU:[function(e,t,i){var n=e("a3878f82301e4d4").start,r=e("ee8e5c2b54df0ba4");t.exports=r("trimStart")?function(){return n(this)}:"".trimStart},{a3878f82301e4d4:"jX5uQ",ee8e5c2b54df0ba4:"cZ2PC"}],"3qZNd":[function(e,t,i){var n=e("e7d648b06f4dd9c6"),r=e("8b0114ba5e653efc");n({target:"String",proto:!0,forced:e("1caf9e0d6204ce0a")("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},{e7d648b06f4dd9c6:"gJg5v","8b0114ba5e653efc":"8K5FK","1caf9e0d6204ce0a":"ftpai"}],"8K5FK":[function(e,t,i){var n=e("427762aaf6075552"),r=e("3a91b63413ffe383"),s=e("515bd1582fb5b4c0"),a=/"/g,o=n("".replace);t.exports=function(e,t,i,n){var h=s(r(e)),c="<"+t;return""!==i&&(c+=" "+i+'="'+o(s(n),a,""")+'"'),c+">"+h+""}},{"427762aaf6075552":"2iJ57","3a91b63413ffe383":"cHxZN","515bd1582fb5b4c0":"4x6uB"}],ftpai:[function(e,t,i){var n=e("b7fe2964c39bac");t.exports=function(e){return n(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},{b7fe2964c39bac:"cXVrS"}],"20tl2":[function(e,t,i){var n=e("c559cd7b113e236e"),r=e("5a30563bc26230a8");n({target:"String",proto:!0,forced:e("eec66acdfc1a2a7d")("big")},{big:function(){return r(this,"big","","")}})},{c559cd7b113e236e:"gJg5v","5a30563bc26230a8":"8K5FK",eec66acdfc1a2a7d:"ftpai"}],ahutJ:[function(e,t,i){var n=e("676512d3c55a414"),r=e("7e21be1f712bc51d");n({target:"String",proto:!0,forced:e("46de4ecf79c13e")("blink")},{blink:function(){return r(this,"blink","","")}})},{"676512d3c55a414":"gJg5v","7e21be1f712bc51d":"8K5FK","46de4ecf79c13e":"ftpai"}],f2UI4:[function(e,t,i){var n=e("48f4b5d0c5a6a4fb"),r=e("e17c07d10b887dd3");n({target:"String",proto:!0,forced:e("5287465832c168a5")("bold")},{bold:function(){return r(this,"b","","")}})},{"48f4b5d0c5a6a4fb":"gJg5v",e17c07d10b887dd3:"8K5FK","5287465832c168a5":"ftpai"}],"4XIfF":[function(e,t,i){var n=e("6490db7677e8f73e"),r=e("e6e19e0e56c49b86");n({target:"String",proto:!0,forced:e("bb7b77345df5335f")("fixed")},{fixed:function(){return r(this,"tt","","")}})},{"6490db7677e8f73e":"gJg5v",e6e19e0e56c49b86:"8K5FK",bb7b77345df5335f:"ftpai"}],l1rs2:[function(e,t,i){var n=e("138910cd530370a2"),r=e("d72a479e3b3815bd");n({target:"String",proto:!0,forced:e("5690c1466282cf0f")("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},{"138910cd530370a2":"gJg5v",d72a479e3b3815bd:"8K5FK","5690c1466282cf0f":"ftpai"}],adYvn:[function(e,t,i){var n=e("f502df9771a160ae"),r=e("ee2ef8461dec89b6");n({target:"String",proto:!0,forced:e("2a2e9c2933145580")("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},{f502df9771a160ae:"gJg5v",ee2ef8461dec89b6:"8K5FK","2a2e9c2933145580":"ftpai"}],gidCX:[function(e,t,i){var n=e("24cfbc86c4210c6b"),r=e("e302ce8a79ba595b");n({target:"String",proto:!0,forced:e("3ecf3c8b0c95d02f")("italics")},{italics:function(){return r(this,"i","","")}})},{"24cfbc86c4210c6b":"gJg5v",e302ce8a79ba595b:"8K5FK","3ecf3c8b0c95d02f":"ftpai"}],bv1yh:[function(e,t,i){var n=e("bab8a92d9901152a"),r=e("252613bc1bb91720");n({target:"String",proto:!0,forced:e("3fb7b9ac770c40c")("link")},{link:function(e){return r(this,"a","href",e)}})},{bab8a92d9901152a:"gJg5v","252613bc1bb91720":"8K5FK","3fb7b9ac770c40c":"ftpai"}],kO1Zg:[function(e,t,i){var n=e("d3ac4973e86c28f9"),r=e("8bd5ccba40c1dac2");n({target:"String",proto:!0,forced:e("8a5bdd05bf3f9b34")("small")},{small:function(){return r(this,"small","","")}})},{d3ac4973e86c28f9:"gJg5v","8bd5ccba40c1dac2":"8K5FK","8a5bdd05bf3f9b34":"ftpai"}],bgZU7:[function(e,t,i){var n=e("4d6202cdf03d0d61"),r=e("ec6f6be679741e37");n({target:"String",proto:!0,forced:e("1920bc41bac741db")("strike")},{strike:function(){return r(this,"strike","","")}})},{"4d6202cdf03d0d61":"gJg5v",ec6f6be679741e37:"8K5FK","1920bc41bac741db":"ftpai"}],jgQND:[function(e,t,i){var n=e("5ac641dbd7ba3f29"),r=e("ef70fadb3bd40f3e");n({target:"String",proto:!0,forced:e("2b14944b2c33ed44")("sub")},{sub:function(){return r(this,"sub","","")}})},{"5ac641dbd7ba3f29":"gJg5v",ef70fadb3bd40f3e:"8K5FK","2b14944b2c33ed44":"ftpai"}],hB11V:[function(e,t,i){var n=e("783c2c194676a06b"),r=e("bca2bfdd086dcdc1");n({target:"String",proto:!0,forced:e("36843058161d815a")("sup")},{sup:function(){return r(this,"sup","","")}})},{"783c2c194676a06b":"gJg5v",bca2bfdd086dcdc1:"8K5FK","36843058161d815a":"ftpai"}],"31EdS":[function(e,t,i){e("6371023cd6dad94a")("Float32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"6371023cd6dad94a":"8VOru"}],"8VOru":[function(e,t,i){var n=e("c9bb9be26763d5d6"),r=e("f3461bcb45a0da3b"),s=e("513171f829dcf492"),a=e("9195003f05246e2"),o=e("5c32747745583fde"),h=e("f129cadcdd085794"),c=e("14a230ba5c5e071a"),l=e("848002acbadbae2c"),u=e("c540a4ec697b43da"),d=e("8248ffc9c9f95531"),f=e("aa784a976357a5bd"),p=e("da59162d19efb47d"),g=e("30e058c823038e07"),m=e("c43d9ac9910fd1d"),v=e("ac65ec03272627eb"),y=e("9477a245724234e7"),b=e("9d37aa52098c7b96"),x=e("361c9958906a5ff0"),E=e("4f80387d0e9c94a2"),w=e("d414fa9976906f9c"),T=e("97d75eb5fba6dc4c"),S=e("c3126acc51f6b7f5"),A=e("402069064923c62e"),C=e("442bd1b967e53ad0").f,_=e("e60d2aff236b9889"),I=e("5464ebf657a71f52").forEach,O=e("e76408bbdddedcb"),P=e("a6c477e34b27b3ce"),M=e("3b65fa2a837fee2b"),R=e("2db4073983cef2bc"),L=e("76805b4ea64de991"),D=e("7ab72b6c1b29c546"),k=e("1d46546a1b5897a9"),N=D.get,F=D.set,B=D.enforce,U=M.f,V=R.f,G=r.RangeError,j=c.ArrayBuffer,W=j.prototype,Y=c.DataView,H=h.NATIVE_ARRAY_BUFFER_VIEWS,z=h.TYPED_ARRAY_TAG,X=h.TypedArray,q=h.TypedArrayPrototype,K=h.isTypedArray,J="BYTES_PER_ELEMENT",$="Wrong length",Q=function(e,t){P(e,t,{configurable:!0,get:function(){return N(this)[t]}})},Z=function(e){var t;return S(W,e)||"ArrayBuffer"===(t=x(e))||"SharedArrayBuffer"===t},ee=function(e,t){return K(e)&&!w(t)&&t in e&&f(+t)&&t>=0},et=function(e,t){return ee(e,t=y(t))?u(2,e[t]):V(e,t)},ei=function(e,t,i){return ee(e,t=y(t))&&E(i)&&b(i,"value")&&!b(i,"get")&&!b(i,"set")&&!i.configurable&&(!b(i,"writable")||i.writable)&&(!b(i,"enumerable")||i.enumerable)?(e[t]=i.value,e):U(e,t,i)};a?(H||(R.f=et,M.f=ei,Q(q,"buffer"),Q(q,"byteOffset"),Q(q,"byteLength"),Q(q,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:et,defineProperty:ei}),t.exports=function(e,t,i){var a=e.match(/\d+/)[0]/8,h=e+(i?"Clamped":"")+"Array",c="get"+e,u="set"+e,f=r[h],y=f,b=y&&y.prototype,x={},w=function(e,t){var i=N(e);return i.view[c](t*a+i.byteOffset,!0)},S=function(e,t,n){var r=N(e);r.view[u](t*a+r.byteOffset,i?v(n):n,!0)},P=function(e,t){U(e,t,{get:function(){return w(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};H?o&&(y=t(function(e,t,i,n){return l(e,b),k(E(t)?Z(t)?void 0!==n?new f(t,m(i,a),n):void 0!==i?new f(t,m(i,a)):new f(t):K(t)?L(y,t):s(_,y,t):new f(g(t)),e,y)}),A&&A(y,X),I(C(f),function(e){e in y||d(y,e,f[e])}),y.prototype=b):(y=t(function(e,t,i,n){l(e,b);var r,o,h,c=0,u=0;if(E(t)){if(Z(t)){r=t,u=m(i,a);var d=t.byteLength;if(void 0===n){if(d%a||(o=d-u)<0)throw new G($)}else if((o=p(n)*a)+u>d)throw new G($);h=o/a}else if(K(t))return L(y,t);else return s(_,y,t)}else r=new j(o=(h=g(t))*a);for(F(e,{buffer:r,byteOffset:u,byteLength:o,length:h,view:new Y(r)});c255?255:255&t}},{}],"2HI7b":[function(e,t,i){var n=e("2b6f4dcfa87227c8"),r=e("a99e72870b261c00"),s=e("6fedb000997de8c9"),a=e("5d2230babf0781b0"),o=e("224522d7906614b9"),h=e("fa7f27b53f48b0c9"),c=e("244fea79be1425e4"),l=e("c86f6f22440f76d6"),u=e("a9c73ae28faf529e"),d=e("1213d44fe73ec45d").aTypedArrayConstructor,f=e("17f40af3180f13f6");t.exports=function(e){var t,i,p,g,m,v,y,b,x=s(this),E=a(e),w=arguments.length,T=w>1?arguments[1]:void 0,S=void 0!==T,A=c(E);if(A&&!l(A))for(b=(y=h(E,A)).next,E=[];!(v=r(b,y)).done;)E.push(v.value);for(S&&w>2&&(T=n(T,arguments[2])),i=o(E),g=u(p=new(d(x))(i)),t=0;i>t;t++)m=S?T(E[t],t):E[t],p[t]=g?f(m):+m;return p}},{"2b6f4dcfa87227c8":"f1CxE",a99e72870b261c00:"bOssl","6fedb000997de8c9":"euAEP","5d2230babf0781b0":"6oQEu","224522d7906614b9":"kHSes",fa7f27b53f48b0c9:"kBMjp","244fea79be1425e4":"3624P",c86f6f22440f76d6:"88nHe",a9c73ae28faf529e:"7TPqP","1213d44fe73ec45d":"b6692","17f40af3180f13f6":"hYKQy"}],"7TPqP":[function(e,t,i){var n=e("4eaea61d57855c23");t.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},{"4eaea61d57855c23":"cRCRk"}],hYKQy:[function(e,t,i){var n=e("e84ff6c898741836"),r=TypeError;t.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},{e84ff6c898741836:"cCley"}],"5PjpG":[function(e,t,i){e("5afb75924dde7be2")("Float64",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"5afb75924dde7be2":"8VOru"}],fxnuD:[function(e,t,i){e("f65338540449e43b")("Int8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{f65338540449e43b:"8VOru"}],"6jDOT":[function(e,t,i){e("618af5c93cf1cc05")("Int16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"618af5c93cf1cc05":"8VOru"}],gG1e8:[function(e,t,i){e("c7ce36d83e80a30f")("Int32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{c7ce36d83e80a30f:"8VOru"}],"17kvf":[function(e,t,i){e("1fba800ad35b335f")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"1fba800ad35b335f":"8VOru"}],"9B0y9":[function(e,t,i){e("2cd7a1d58fa59b7d")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}},!0)},{"2cd7a1d58fa59b7d":"8VOru"}],"3kbwg":[function(e,t,i){e("ca953ee05f39cdaa")("Uint16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{ca953ee05f39cdaa:"8VOru"}],"5wzd5":[function(e,t,i){e("682a05de60a0a1e1")("Uint32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"682a05de60a0a1e1":"8VOru"}],"1dCBn":[function(e,t,i){var n=e("bad3bf9fd10c3d3e"),r=e("f3046f328b82c495"),s=e("6efc916402e96e15"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",function(e){var t=a(this),i=r(t),n=s(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]})},{bad3bf9fd10c3d3e:"b6692",f3046f328b82c495:"kHSes","6efc916402e96e15":"gAgUH"}],"2Mqsz":[function(e,t,i){var n=e("9998fdf0f56ef0da"),r=e("3136ffe0165b4705"),s=n(e("45547c073d8e02f")),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",function(e,t){return s(a(this),e,t,arguments.length>2?arguments[2]:void 0)})},{"9998fdf0f56ef0da":"2iJ57","3136ffe0165b4705":"b6692","45547c073d8e02f":"toMXb"}],eZZyP:[function(e,t,i){var n=e("cb5a1a9d977d55c8"),r=e("9bc5b51fcf1b899f").every,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{cb5a1a9d977d55c8:"b6692","9bc5b51fcf1b899f":"daQdc"}],go8ZW:[function(e,t,i){var n=e("24d20a7fba3c1708"),r=e("3a12c8f811e83e62"),s=e("bec3653efa2d8600"),a=e("ff46ad00880fddaa"),o=e("5e0ee530611ef38d"),h=e("800a47a98b497e55"),c=e("faaaddc6a409cf90"),l=n.aTypedArray,u=n.exportTypedArrayMethod,d=h("".slice);u("fill",function(e){var t=arguments.length;return l(this),o(r,this,"Big"===d(a(this),0,3)?s(e):+e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},c(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}))},{"24d20a7fba3c1708":"b6692","3a12c8f811e83e62":"9XPgi",bec3653efa2d8600:"hYKQy",ff46ad00880fddaa:"cRCRk","5e0ee530611ef38d":"bOssl","800a47a98b497e55":"2iJ57",faaaddc6a409cf90:"cXVrS"}],iCErC:[function(e,t,i){var n=e("6846524790b14a7c"),r=e("69eb0f28238e9173").filter,s=e("d404a3c06ca3bb3e"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return s(this,t)})},{"6846524790b14a7c":"b6692","69eb0f28238e9173":"daQdc",d404a3c06ca3bb3e:"1lBSP"}],"1lBSP":[function(e,t,i){var n=e("b597c909ed514557"),r=e("671cb65500632ecc").getTypedArrayConstructor;t.exports=function(e,t){return n(r(e),t)}},{b597c909ed514557:"5QV4b","671cb65500632ecc":"b6692"}],e8hfX:[function(e,t,i){var n=e("2ee42d54019723d0"),r=e("f74f952feb3fa9ac").find,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"2ee42d54019723d0":"b6692",f74f952feb3fa9ac:"daQdc"}],"2kMmr":[function(e,t,i){var n=e("8a1e1a9ff0bdb479"),r=e("faaa2d0f518f9401").findIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"8a1e1a9ff0bdb479":"b6692",faaa2d0f518f9401:"daQdc"}],"212MV":[function(e,t,i){var n=e("1d1b09a81097f4c9"),r=e("e815e97cf844ecb").findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"1d1b09a81097f4c9":"b6692",e815e97cf844ecb:"cyWXz"}],"9AC43":[function(e,t,i){var n=e("de1e827bc87ccb28"),r=e("1d3fb19f3f3cea6a").findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{de1e827bc87ccb28:"b6692","1d3fb19f3f3cea6a":"cyWXz"}],aqoug:[function(e,t,i){var n=e("905afd384f4e3de6"),r=e("d55109422f6a63d3").forEach,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",function(e){r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"905afd384f4e3de6":"b6692",d55109422f6a63d3:"daQdc"}],iuJoY:[function(e,t,i){var n=e("e24f9b87534e32a3");(0,e("9358eeabcbb18f49").exportTypedArrayStaticMethod)("from",e("49819eabcb3ccea1"),n)},{e24f9b87534e32a3:"5UnGw","9358eeabcbb18f49":"b6692","49819eabcb3ccea1":"2HI7b"}],czX8g:[function(e,t,i){var n=e("7cf07194bf630e10"),r=e("6783fff4c8e274ff").includes,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"7cf07194bf630e10":"b6692","6783fff4c8e274ff":"7HT32"}],"9XxKn":[function(e,t,i){var n=e("19c9cea2a3392f92"),r=e("728bfde1b6b9fa8c").indexOf,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"19c9cea2a3392f92":"b6692","728bfde1b6b9fa8c":"7HT32"}],"7aRDd":[function(e,t,i){var n=e("3da36adbfe4f1c5e"),r=e("87513a57210d794"),s=e("ab6b74db00db51f7"),a=e("21e9ae10aded4ff7"),o=e("fe81c4288afbe8ee"),h=e("ddb435c2e5bdfda1")("iterator"),c=n.Uint8Array,l=s(o.values),u=s(o.keys),d=s(o.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=c&&c.prototype,m=!r(function(){g[h].call([1])}),v=!!g&&g.values&&g[h]===g.values&&"values"===g.values.name,y=function(){return l(f(this))};p("entries",function(){return d(f(this))},m),p("keys",function(){return u(f(this))},m),p("values",y,m||!v,{name:"values"}),p(h,y,m||!v,{name:"values"})},{"3da36adbfe4f1c5e":"7Z171","87513a57210d794":"cXVrS",ab6b74db00db51f7:"2iJ57","21e9ae10aded4ff7":"b6692",fe81c4288afbe8ee:"3prNk",ddb435c2e5bdfda1:"5CuF7"}],k5Rlo:[function(e,t,i){var n=e("4a1cb40dad4dd1ac"),r=e("68cfb4a8ab57e7b8"),s=n.aTypedArray,a=n.exportTypedArrayMethod,o=r([].join);a("join",function(e){return o(s(this),e)})},{"4a1cb40dad4dd1ac":"b6692","68cfb4a8ab57e7b8":"2iJ57"}],f3FBF:[function(e,t,i){var n=e("83d52c5c09010d50"),r=e("a5b16a6fc92268b4"),s=e("9b20398976dd53df"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return r(s,a(this),t>1?[e,arguments[1]]:[e])})},{"83d52c5c09010d50":"b6692",a5b16a6fc92268b4:"2fjXG","9b20398976dd53df":"cfsWk"}],"4ZhIs":[function(e,t,i){var n=e("47e7bb602930e61a"),r=e("8e0cd2bb3fe997bb").map,s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(a(e))(t)})})},{"47e7bb602930e61a":"b6692","8e0cd2bb3fe997bb":"daQdc"}],"9uG4h":[function(e,t,i){var n=e("8205d0df207de27c"),r=e("ff4c68a63e37d828"),s=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",function(){for(var e=0,t=arguments.length,i=new(s(this))(t);t>e;)i[e]=arguments[e++];return i},r)},{"8205d0df207de27c":"b6692",ff4c68a63e37d828:"5UnGw"}],ccgrY:[function(e,t,i){var n=e("44c8794ad6be555f"),r=e("1163c739252ce603").left,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{"44c8794ad6be555f":"b6692","1163c739252ce603":"dEdT1"}],dESGS:[function(e,t,i){var n=e("b70766ffaffbfa51"),r=e("5f58f990e3d5d551").right,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{b70766ffaffbfa51:"b6692","5f58f990e3d5d551":"dEdT1"}],"7G7OX":[function(e,t,i){var n=e("2692a9613069388b"),r=n.aTypedArray,s=n.exportTypedArrayMethod,a=Math.floor;s("reverse",function(){for(var e,t=r(this).length,i=a(t/2),n=0;n1?arguments[1]:void 0,1),i=h(e);if(m)return r(f,this,i,t);var n=this.length,s=a(i),c=0;if(s+t>n)throw new l("Wrong length");for(;cr;)c[r]=i[r++];return c},r(function(){new Int8Array(1).slice()}))},{d8cf74b619b99d16:"b6692",cde6d683247bdb44:"cXVrS",a6442c63e141a126:"eO8Ta"}],"8qlqb":[function(e,t,i){var n=e("78c3191738d81c4d"),r=e("b1ba67becb59f503").some,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"78c3191738d81c4d":"b6692",b1ba67becb59f503:"daQdc"}],lGQwY:[function(e,t,i){var n=e("1319b11c96d7a212"),r=e("443f315e07e91c29"),s=e("8dc6cee8a97e45cb"),a=e("d6c4034c4939c7d5"),o=e("f3e3e1c809574ce3"),h=e("cab25e21cd947849"),c=e("c53adf7878431ec6"),l=e("90728397db1428a3"),u=e("c20e84b46e983c4f"),d=e("8b919df81d7fcf47"),f=h.aTypedArray,p=h.exportTypedArrayMethod,g=n.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(s(function(){m(new g(2),null)})&&s(function(){m(new g(2),{})})),y=!!m&&!s(function(){if(u)return u<74;if(c)return c<67;if(l)return!0;if(d)return d<602;var e,t,i=new g(516),n=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(m(i,function(e,t){return(e/4|0)-(t/4|0)}),e=0;e<516;e++)if(i[e]!==n[e])return!0});p("sort",function(e){return(void 0!==e&&a(e),y)?m(this,e):o(f(this),function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i})},!y||v)},{"1319b11c96d7a212":"7Z171","443f315e07e91c29":"c4z5p","8dc6cee8a97e45cb":"cXVrS",d6c4034c4939c7d5:"alrlv",f3e3e1c809574ce3:"5Mqp3",cab25e21cd947849:"b6692",c53adf7878431ec6:"inWxb","90728397db1428a3":"5I4FT",c20e84b46e983c4f:"co76c","8b919df81d7fcf47":"1CWLZ"}],"5EgJz":[function(e,t,i){var n=e("d3219a9d813dfae3"),r=e("815a66ab54718368"),s=e("576f4ad682879893"),a=n.aTypedArray,o=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",function(e,t){var i=a(this),n=i.length,h=s(e,n);return new(o(i))(i.buffer,i.byteOffset+h*i.BYTES_PER_ELEMENT,r((void 0===t?n:s(t,n))-h))})},{d3219a9d813dfae3:"b6692","815a66ab54718368":"lQsU7","576f4ad682879893":"47gaI"}],hUSBX:[function(e,t,i){var n=e("d23c9dad2cb3d012"),r=e("961a14c04c94ca8e"),s=e("aa830556bb66a52b"),a=e("1477df799d469d0c"),o=e("6bdde3bff05f534b"),h=n.Int8Array,c=s.aTypedArray,l=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!h&&a(function(){u.call(new h(1))});l("toLocaleString",function(){return r(u,d?o(c(this)):c(this),o(arguments))},a(function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()})||!a(function(){h.prototype.toLocaleString.call([1,2])}))},{d23c9dad2cb3d012:"7Z171","961a14c04c94ca8e":"2fjXG",aa830556bb66a52b:"b6692","1477df799d469d0c":"cXVrS","6bdde3bff05f534b":"eO8Ta"}],bN7du:[function(e,t,i){var n=e("aee14a288ff10704"),r=e("77f370038a7e7dac"),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",function(){return n(s(this),o(this))})},{aee14a288ff10704:"2dsKr","77f370038a7e7dac":"b6692"}],accWj:[function(e,t,i){var n=e("7a241707bf041790"),r=e("ab9301a002e94347"),s=e("e1b15c081f5438dc"),a=e("50268bbb02cbbbc4"),o=n.aTypedArray,h=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=r(n.TypedArrayPrototype.sort);c("toSorted",function(e){void 0!==e&&s(e);var t=o(this);return l(a(h(t),t),e)})},{"7a241707bf041790":"b6692",ab9301a002e94347:"2iJ57",e1b15c081f5438dc:"alrlv","50268bbb02cbbbc4":"5QV4b"}],"8zMXu":[function(e,t,i){var n=e("ba1ad98ce5955ae6").exportTypedArrayMethod,r=e("7fb7589d87925c0e"),s=e("9ae1b5b748ef0512"),a=e("9d0cad3ff385c8e1"),o=s.Uint8Array,h=o&&o.prototype||{},c=[].toString,l=a([].join);r(function(){c.call({})})&&(c=function(){return l(this)});var u=h.toString!==c;n("toString",c,u)},{ba1ad98ce5955ae6:"b6692","7fb7589d87925c0e":"cXVrS","9ae1b5b748ef0512":"7Z171","9d0cad3ff385c8e1":"2iJ57"}],bwjPE:[function(e,t,i){var n=e("5428fa832663517b"),r=e("472f91950b838d4c"),s=e("cd9beaafe2ae7a70"),a=e("b4b145cf5a7fc46d"),o=e("3cca7f61fa3b5db7"),h=r.aTypedArray,c=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("with",{with:function(e,t){var i=h(this),r=a(e),l=s(i)?o(t):+t;return n(i,c(i),r,l)}}.with,!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}())},{"5428fa832663517b":"ebcI0","472f91950b838d4c":"b6692",cd9beaafe2ae7a70:"7TPqP",b4b145cf5a7fc46d:"gAgUH","3cca7f61fa3b5db7":"hYKQy"}],"4AZtq":[function(e,t,i){var n=e("b25f2dc62f86f185"),r=e("f98894072ee354c2"),s=e("e8f3df77e99ec93e"),a=String.fromCharCode,o=r("".charAt),h=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,u=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(e){for(var t,i,n=s(e),r="",d=n.length,f=0;f>(-2*S&6)));return h}})},{f57c57075be2f036:"gJg5v","1beb501bad2a77ab":"7Z171","54160fb760cf47b6":"e5ie6",b8fdd5e59791f323:"2iJ57","2b6100c225ada6":"bOssl",fb00c1d39c9bf14c:"cXVrS","93407030a6bacce1":"4x6uB","48ccfe93995f906":"h3DcZ",bed47900de2f9889:"jseHN"}],jseHN:[function(e,t,i){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n+"+/",s=n+"-_",a=function(e){for(var t={},i=0;i<64;i++)t[e.charAt(i)]=i;return t};t.exports={i2c:r,c2i:a(r),i2cUrl:s,c2iUrl:a(s)}},{}],jwPXF:[function(e,t,i){var n=e("ff535db334027cb3"),r=e("d2af88b3a42b7d50"),s=e("a166328697ff9969"),a=e("ccb7079059953540"),o=e("5424850d1e2e873d"),h=e("61b2b23f28dc6ce7"),c=e("48ec8439e6a9901c"),l=e("96982b02e51db61c"),u=e("e084452184a62fe5").i2c,d=s("btoa"),f=a("".charAt),p=a("".charCodeAt),g=!!d&&!h(function(){return"aGk="!==d("hi")}),m=g&&!h(function(){d()}),v=g&&h(function(){return"bnVsbA=="!==d(null)}),y=g&&1!==d.length;n({global:!0,bind:!0,enumerable:!0,forced:!g||m||v||y},{btoa:function(e){if(l(arguments.length,1),g)return o(d,r,c(e));for(var t,i,n=c(e),a="",h=0,m=u;f(n,h)||(m="=",h%1);){if((i=p(n,h+=3/4))>255)throw new(s("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a+=f(m,63&(t=t<<8|i)>>8-h%1*8)}return a}})},{ff535db334027cb3:"gJg5v",d2af88b3a42b7d50:"7Z171",a166328697ff9969:"e5ie6",ccb7079059953540:"2iJ57","5424850d1e2e873d":"bOssl","61b2b23f28dc6ce7":"cXVrS","48ec8439e6a9901c":"4x6uB","96982b02e51db61c":"h3DcZ",e084452184a62fe5:"jseHN"}],khTY5:[function(e,t,i){var n=e("f2983879ab6ef4f"),r=e("74a037ab8118876"),s=e("a3359ffcd052df79"),a=e("9e6862fbf1bc54d2"),o=e("833a1c6e8a10b1ff"),h=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in r)r[c]&&h(n[c]&&n[c].prototype);h(s)},{f2983879ab6ef4f:"7Z171","74a037ab8118876":"1xZhu",a3359ffcd052df79:"fVoiV","9e6862fbf1bc54d2":"4w3Nn","833a1c6e8a10b1ff":"gKM90"}],"1xZhu":[function(e,t,i){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],fVoiV:[function(e,t,i){var n=e("a6fc44eba1875331")("span").classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r},{a6fc44eba1875331:"SppDD"}],a2DYE:[function(e,t,i){var n=e("c051336c9ece485c"),r=e("b1dd6223fec045b2"),s=e("2927608065790e8a"),a=e("107ef5eaf95c92b0"),o=e("2f02b421bbdb9eb4"),h=e("46e3db6eb678f758"),c=e("6a4d2091548e6557")("iterator"),l=a.values,u=function(e,t){if(e){if(e[c]!==l)try{o(e,c,l)}catch(t){e[c]=l}if(h(e,t,!0),r[t]){for(var i in a)if(e[i]!==a[i])try{o(e,i,a[i])}catch(t){e[i]=a[i]}}}};for(var d in r)u(n[d]&&n[d].prototype,d);u(s,"DOMTokenList")},{c051336c9ece485c:"7Z171",b1dd6223fec045b2:"1xZhu","2927608065790e8a":"fVoiV","107ef5eaf95c92b0":"3prNk","2f02b421bbdb9eb4":"gKM90","46e3db6eb678f758":"dkhk9","6a4d2091548e6557":"5CuF7"}],"6bhjG":[function(e,t,i){var n=e("3d0510e49183901c"),r=e("63b7b93fc4a7238a"),s=e("1c5b62f756d3eaff"),a=e("eb1c50ea6315321b"),o=e("4ca71918e5a2016a"),h=e("c21d001acfae7cd"),c=e("75fac16725379a32").f,l=e("b34fbc760b0520d4"),u=e("ed9170165790e778"),d=e("f6f97990397d9c00"),f=e("9b1e92218f8d993"),p=e("fdfe3ed8e9adb72c"),g=e("9c0ec21dd5e9a70b"),m=e("5a4b6c79c088bdfe"),v=e("b32d1eeacf68845c"),y=e("8ef37a97ffa6fa2e"),b=e("fc770dee153f9182"),x=e("617636ad1c3548bd"),E=e("391d43a74d1595a0"),w="DOMException",T="DATA_CLONE_ERR",S=r("Error"),A=r(w)||function(){try{new(r("MessageChannel")||s("worker_threads").MessageChannel)().port1.postMessage(new WeakMap)}catch(e){if(e.name===T&&25===e.code)return e.constructor}}(),C=A&&A.prototype,_=S.prototype,I=b.set,O=b.getterFor(w),P="stack"in new S(w),M=function(e){return d(v,e)&&v[e].m?v[e].c:0},R=function(){f(this,L);var e=arguments.length,t=m(e<1?void 0:arguments[0]),i=m(e<2?void 0:arguments[1],"Error"),n=M(i);if(I(this,{type:w,name:i,message:t,code:n}),x||(this.name=i,this.message=t,this.code=n),P){var r=new S(t);r.name=w,c(this,"stack",h(1,y(r.stack,1)))}},L=R.prototype=o(_),D=function(e){return{enumerable:!0,configurable:!0,get:e}},k=function(e){return D(function(){return O(this)[e]})};x&&(u(L,"code",k("code")),u(L,"message",k("message")),u(L,"name",k("name"))),c(L,"constructor",h(1,R));var N=a(function(){return!(new A instanceof S)}),F=N||a(function(){return _.toString!==g||"2: 1"!==String(new A(1,2))}),B=N||a(function(){return 25!==new A(1,"DataCloneError").code}),U=N||25!==A[T]||25!==C[T],V=E?F||B||U:N;n({global:!0,constructor:!0,forced:V},{DOMException:V?R:A});var G=r(w),j=G.prototype;for(var W in F&&(E||A===G)&&l(j,"toString",g),B&&x&&A===G&&u(j,"code",D(function(){return M(p(this).name)})),v)if(d(v,W)){var Y=v[W],H=Y.s,z=h(6,Y.c);d(G,H)||c(G,H,z),d(j,H)||c(j,H,z)}},{"3d0510e49183901c":"gJg5v","63b7b93fc4a7238a":"e5ie6","1c5b62f756d3eaff":"fjtLr",eb1c50ea6315321b:"cXVrS","4ca71918e5a2016a":"7isQ3",c21d001acfae7cd:"5toj2","75fac16725379a32":"hvqCQ",b34fbc760b0520d4:"4CPdc",ed9170165790e778:"3NI4M",f6f97990397d9c00:"9JWVX","9b1e92218f8d993":"95yA1",fdfe3ed8e9adb72c:"dPzbI","9c0ec21dd5e9a70b":"9hDDf","5a4b6c79c088bdfe":"dwhvK",b32d1eeacf68845c:"I3hyF","8ef37a97ffa6fa2e":"7dart",fc770dee153f9182:"ixHS2","617636ad1c3548bd":"6mXK1","391d43a74d1595a0":"jHRGA"}],I3hyF:[function(e,t,i){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},{}],fJnNi:[function(e,t,i){var n=e("5538d4aa2e26797c"),r=e("15f622cde07e3e8f"),s=e("6dca64203ef6b4d1"),a=e("30cb5b59df4e77c6"),o=e("64c91a24ef31e303").f,h=e("a56ea2d80c8496ae"),c=e("e54ce0361d637752"),l=e("5e15de01309c5057"),u=e("fccd891af3c8103d"),d=e("2db1f0a6b3bd6dfd"),f=e("176edbe2885d9f01"),p=e("3f4d27281e93627e"),g=e("95f892709744ad29"),m="DOMException",v=s("Error"),y=s(m),b=function(){c(this,x);var e=arguments.length,t=u(e<1?void 0:arguments[0]),i=u(e<2?void 0:arguments[1],"Error"),n=new y(t,i),r=new v(t);return r.name=m,o(n,"stack",a(1,f(r.stack,1))),l(n,this,b),n},x=b.prototype=y.prototype,E="stack"in new v(m),w="stack"in new y(1,2),T=y&&p&&Object.getOwnPropertyDescriptor(r,m),S=!!T&&!(T.writable&&T.configurable),A=E&&!S&&!w;n({global:!0,constructor:!0,forced:g||A},{DOMException:A?b:y});var C=s(m),_=C.prototype;if(_.constructor!==C){for(var I in g||o(_,"constructor",a(1,C)),d)if(h(d,I)){var O=d[I],P=O.s;h(C,P)||o(C,P,a(6,O.c))}}},{"5538d4aa2e26797c":"gJg5v","15f622cde07e3e8f":"7Z171","6dca64203ef6b4d1":"e5ie6","30cb5b59df4e77c6":"5toj2","64c91a24ef31e303":"hvqCQ",a56ea2d80c8496ae:"9JWVX",e54ce0361d637752:"95yA1","5e15de01309c5057":"30not",fccd891af3c8103d:"dwhvK","2db1f0a6b3bd6dfd":"I3hyF","176edbe2885d9f01":"7dart","3f4d27281e93627e":"6mXK1","95f892709744ad29":"jHRGA"}],"4teOf":[function(e,t,i){var n=e("db380432183a20e4"),r=e("9f1a1fb33df853f"),s="DOMException";r(n(s),s)},{db380432183a20e4:"e5ie6","9f1a1fb33df853f":"dkhk9"}],lCP8o:[function(e,t,i){e("52e9b3eefbbce1ed"),e("292fa64716f5b39e")},{"52e9b3eefbbce1ed":"idFPB","292fa64716f5b39e":"1nu2V"}],idFPB:[function(e,t,i){var n=e("79389288a80b279c"),r=e("e4d64249a0133d14"),s=e("84ba5ca62b8b14c9").clear;n({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==s},{clearImmediate:s})},{"79389288a80b279c":"gJg5v",e4d64249a0133d14:"7Z171","84ba5ca62b8b14c9":"iEUCI"}],"1nu2V":[function(e,t,i){var n=e("33581c362196ed1f"),r=e("503bb555249cad41"),s=e("4219ce460223bd08").set,a=e("738dc378e6a94c64"),o=r.setImmediate?a(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==o},{setImmediate:o})},{"33581c362196ed1f":"gJg5v","503bb555249cad41":"7Z171","4219ce460223bd08":"iEUCI","738dc378e6a94c64":"LAeE1"}],LAeE1:[function(e,t,i){var n,r=e("aa6765693e58a0fe"),s=e("a68ecfcbf29c46f6"),a=e("7087588d33667af2"),o=e("864edee099e8affb"),h=e("3a3a5a2cfab86f21"),c=e("cff2c830bdea4f24"),l=e("58a74f00cee1ac64"),u=r.Function,d=/MSIE .\./.test(h)||"BUN"===o&&((n=r.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(e,t){var i=t?2:1;return d?function(n,r){var o=l(arguments.length,1)>i,h=a(n)?n:u(n),d=o?c(arguments,i):[],f=o?function(){s(h,this,d)}:h;return t?e(f,r):e(f)}:e}},{aa6765693e58a0fe:"7Z171",a68ecfcbf29c46f6:"2fjXG","7087588d33667af2":"h1Wnr","864edee099e8affb":"ah0ZS","3a3a5a2cfab86f21":"5hj4U",cff2c830bdea4f24:"eO8Ta","58a74f00cee1ac64":"h3DcZ"}],"1mZsz":[function(e,t,i){var n=e("6f7278673cd963e5"),r=e("4f851b5e5b332d48"),s=e("b80db4539abf09d9"),a=e("889c274f5e23b39"),o=e("15983ab5c2fbc059"),h=e("c36112b7edfed618"),c=e("74b26aee0ae17038");n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:h(function(){return c&&1!==Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length})},{queueMicrotask:function(e){o(arguments.length,1),s(a(e))}})},{"6f7278673cd963e5":"gJg5v","4f851b5e5b332d48":"7Z171",b80db4539abf09d9:"fhIs0","889c274f5e23b39":"alrlv","15983ab5c2fbc059":"h3DcZ",c36112b7edfed618:"cXVrS","74b26aee0ae17038":"6mXK1"}],f5KUv:[function(e,t,i){var n=e("9a97a510092b7d72"),r=e("bfbbd7ba4e233a15"),s=e("dadc1a7ad6bec203"),a=e("8d7f4453ff13e12d"),o=TypeError,h=Object.defineProperty,c=r.self!==r;try{if(a){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||s(r,"self",{get:function(){return r},set:function(e){if(this!==r)throw new o("Illegal invocation");h(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:r})}catch(e){}},{"9a97a510092b7d72":"gJg5v",bfbbd7ba4e233a15:"7Z171",dadc1a7ad6bec203:"3NI4M","8d7f4453ff13e12d":"6mXK1"}],kONpx:[function(e,t,i){var n=e("46a94df747165a08"),r=e("3e04e2f4e7f87918"),s=e("6e1ac61205678af6"),a=e("c95079dcb9321b5f"),o=e("b30c4be405e55cd1"),h=e("d2759cd31961ec5f"),c=e("b28324366ed35694"),l=e("51b2af7ff9e786d2"),u=e("dbc30081dcfdeb22"),d=e("88e551d63448111"),f=e("748c1e7b84b5d0b6"),p=e("9b6dd1d113f04b93"),g=e("5236c862010bd4cc"),m=e("47c7a4ba5ff3ba9"),v=e("ea5539f8b43d1a17"),y=e("64004e8c5f5d0ef3"),b=e("9971f98ded0a259"),x=e("66bbcc11f1e948a"),E=e("a9cdcd120539bbe8"),w=e("be347fa71d60a5eb"),T=e("4868328f7e546c6"),S=e("1e6645abd1a2b421"),A=e("d0363fc9d9cfdd8c"),C=e("3275f5da850ac759"),_=e("3feae2e57ec01a12"),I=e("9575a353cf8e050f"),O=e("a675c54ae6442127"),P=s.Object,M=s.Array,R=s.Date,L=s.Error,D=s.TypeError,k=s.PerformanceMark,N=a("DOMException"),F=S.Map,B=S.has,U=S.get,V=S.set,G=A.Set,j=A.add,W=A.has,Y=a("Object","keys"),H=o([].push),z=o((!0).valueOf),X=o(1..valueOf),q=o("".valueOf),K=o(R.prototype.getTime),J=c("structuredClone"),$="DataCloneError",Q="Transferring",Z=function(e){return!h(function(){var t=new s.Set([7]),i=e(t),n=e(P(7));return i===t||!i.has(7)||!f(n)||7!=+n})&&e},ee=function(e,t){return!h(function(){var i=new t,n=e({a:i,b:i});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===i.stack)})},et=s.structuredClone,ei=n||!ee(et,L)||!ee(et,N)||!!h(function(){var e=et(new s.AggregateError([1],J,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==J||3!==e.cause}),en=!et&&Z(function(e){return new k(J,{detail:e}).detail}),er=Z(et)||en,es=function(e){throw new N("Uncloneable type: "+e,$)},ea=function(e,t){throw new N((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",$)},eo=function(e,t){return er||ea(t),er(e)},eh=function(){var e;try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null},ec=function(e,t,i){if(B(t,e))return U(t,e);if("SharedArrayBuffer"===(i||v(e)))n=er?er(e):e;else{var n,r,a,o,h,c,u=s.DataView;u||l(e.slice)||ea("ArrayBuffer");try{if(l(e.slice)&&!e.resizable)n=e.slice(0);else for(c=0,r=e.byteLength,a=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(r,a),o=new u(e),h=new u(n);c1&&!d(arguments[1])?m(arguments[1]):void 0,r=n?n.transfer:void 0;void 0!==r&&(i=ed(r,t=new F));var s=eu(e,t);return i&&ef(i),s}})},{"46a94df747165a08":"jHRGA","3e04e2f4e7f87918":"gJg5v","6e1ac61205678af6":"7Z171",c95079dcb9321b5f:"e5ie6",b30c4be405e55cd1:"2iJ57",d2759cd31961ec5f:"cXVrS",b28324366ed35694:"55cC0","51b2af7ff9e786d2":"h1Wnr",dbc30081dcfdeb22:"eytEI","88e551d63448111":"8AxCV","748c1e7b84b5d0b6":"8mxCV","9b6dd1d113f04b93":"2ZU2p","5236c862010bd4cc":"dCEHX","47c7a4ba5ff3ba9":"dPzbI",ea5539f8b43d1a17:"cRCRk","64004e8c5f5d0ef3":"9JWVX","9971f98ded0a259":"SVTZV","66bbcc11f1e948a":"gKM90",a9cdcd120539bbe8:"kHSes",be347fa71d60a5eb:"h3DcZ","4868328f7e546c6":"iG8db","1e6645abd1a2b421":"fY40v",d0363fc9d9cfdd8c:"aKtSD","3275f5da850ac759":"dSeD9","3feae2e57ec01a12":"edpRG","9575a353cf8e050f":"3Scc5",a675c54ae6442127:"2emOi"}],h5L1l:[function(e,t,i){e("9453fdd92aad151a"),e("c303d63f9a1c5be5")},{"9453fdd92aad151a":"98PJR",c303d63f9a1c5be5:"ydvxy"}],"98PJR":[function(e,t,i){var n=e("a9d1c09227b9596"),r=e("8f238f56192273e4"),s=e("87cb4ec54c39341e")(r.setInterval,!0);n({global:!0,bind:!0,forced:r.setInterval!==s},{setInterval:s})},{a9d1c09227b9596:"gJg5v","8f238f56192273e4":"7Z171","87cb4ec54c39341e":"LAeE1"}],ydvxy:[function(e,t,i){var n=e("6060be99991be48a"),r=e("f9d851aba3178e79"),s=e("ae4294be5adb39a1")(r.setTimeout,!0);n({global:!0,bind:!0,forced:r.setTimeout!==s},{setTimeout:s})},{"6060be99991be48a":"gJg5v",f9d851aba3178e79:"7Z171",ae4294be5adb39a1:"LAeE1"}],"4J9Kt":[function(e,t,i){e("99544a7edcd747a5")},{"99544a7edcd747a5":"7XU3f"}],"7XU3f":[function(e,t,i){e("19928ff2abfc3536");var n,r=e("d446e2097c7c2b23"),s=e("cd0458003d61a323"),a=e("592c96d240ad401c"),o=e("2e7550752ce99b71"),h=e("c128b8cb3e38a436"),c=e("9ee66bece60e18c5"),l=e("763c39a8b521ff54"),u=e("1c9277bbea264bc7"),d=e("f0dd676601f7cb0b"),f=e("deee7b2fe3c1e96f"),p=e("ff3437c5b86d6c26"),g=e("3c2f033d1a197fd6"),m=e("9fdfccae2d327739"),v=e("8ba5b2695179827").codeAt,y=e("23751b8f28dcd37"),b=e("5f808b1954b24403"),x=e("f969f30083a50975"),E=e("b15c5243fe0e0f6"),w=e("e8b262dfe3e4c989"),T=e("9a3ca045fbb43248"),S=T.set,A=T.getterFor("URL"),C=w.URLSearchParams,_=w.getState,I=o.URL,O=o.TypeError,P=o.parseInt,M=Math.floor,R=Math.pow,L=c("".charAt),D=c(/./.exec),k=c([].join),N=c(1..toString),F=c([].pop),B=c([].push),U=c("".replace),V=c([].shift),G=c("".split),j=c("".slice),W=c("".toLowerCase),Y=c([].unshift),H="Invalid scheme",z="Invalid host",X="Invalid port",q=/[a-z]/i,K=/[\d+-.a-z]/i,J=/\d/,$=/^0x/i,Q=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ei=/[\0\t\n\r #/:<>?@[\\\]^|]/,en=/^[\u0000-\u0020]+/,er=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,es=/[\t\n\r]/g,ea=function(e){var t,i,n,r,s,a,o,h=G(e,".");if(h.length&&""===h[h.length-1]&&h.length--,(t=h.length)>4)return e;for(n=0,i=[];n1&&"0"===L(r,0)&&(s=D($,r)?16:8,r=j(r,8===s?1:2)),""===r)a=0;else{if(!D(10===s?Z:8===s?Q:ee,r))return e;a=P(r,s)}B(i,a)}for(n=0;n=R(256,5-t))return null}else if(a>255)return null;for(n=0,o=F(i);n6))return;for(n=0;d();){if(r=null,n>0){if("."!==d()||!(n<4))return;u++}if(!D(J,d()))return;for(;D(J,d());){if(s=P(d(),10),null===r)r=s;else{if(0===r)return;r=10*r+s}if(r>255)return;u++}h[c]=256*h[c]+r,(2==++n||4===n)&&c++}if(4!==n)return;break}if(":"===d()){if(u++,!d())return}else if(d())return;h[c++]=t}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)o=h[c],h[c--]=h[l+a-1],h[l+--a]=o;else if(8!==c)return;return h},eh=function(e){for(var t=null,i=1,n=null,r=0,s=0;s<8;s++)0!==e[s]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=s),++r);return r>i?n:t},ec=function(e){var t,i,n,r;if("number"==typeof e){for(i=0,t=[];i<4;i++)Y(t,e%256),e=M(e/256);return k(t,".")}if("object"==typeof e){for(i=0,t="",n=eh(e);i<8;i++)(!r||0!==e[i])&&(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=N(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},el={},eu=p({},el,{" ":1,'"':1,"<":1,">":1,"`":1}),ed=p({},eu,{"#":1,"?":1,"{":1,"}":1}),ef=p({},ed,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ep=function(e,t){var i=v(e,0);return i>32&&i<127&&!f(t,e)?e:encodeURIComponent(e)},eg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},em=function(e,t){var i;return 2===e.length&&D(q,L(e,0))&&(":"===(i=L(e,1))||!t&&"|"===i)},ev=function(e){var t;return e.length>1&&em(j(e,0,2))&&(2===e.length||"/"===(t=L(e,2))||"\\"===t||"?"===t||"#"===t)},ey={},eb={},ex={},eE={},ew={},eT={},eS={},eA={},eC={},e_={},eI={},eO={},eP={},eM={},eR={},eL={},eD={},ek={},eN={},eF={},eB={},eU=function(e,t,i){var n,r,s,a=b(e);if(t){if(r=this.parse(a))throw new O(r);this.searchParams=null}else{if(void 0!==i&&(n=new eU(i,!0)),r=this.parse(a,null,n))throw new O(r);(s=_(new C)).bindURL(this),this.searchParams=s}};eU.prototype={type:"URL",parse:function(e,t,i){var r=t||ey,s=0,a="",o=!1,h=!1,c=!1;for(e=b(e),t||(this.scheme="",this.username="",this.password="",this.host=null,this.port=null,this.path=[],this.query=null,this.fragment=null,this.cannotBeABaseURL=!1,e=U(e,en,""),e=U(e,er,"$1")),l=g(e=U(e,es,""));s<=l.length;){switch(u=l[s],r){case ey:if(u&&D(q,u))a+=W(u),r=eb;else{if(t)return H;r=ex;continue}break;case eb:if(u&&(D(K,u)||"+"===u||"-"===u||"."===u))a+=W(u);else if(":"===u){if(t&&(this.isSpecial()!==f(eg,a)||"file"===a&&(this.includesCredentials()||null!==this.port)||"file"===this.scheme&&!this.host))return;if(this.scheme=a,t){this.isSpecial()&&eg[this.scheme]===this.port&&(this.port=null);return}a="","file"===this.scheme?r=eM:this.isSpecial()&&i&&i.scheme===this.scheme?r=eE:this.isSpecial()?r=eA:"/"===l[s+1]?(r=ew,s++):(this.cannotBeABaseURL=!0,B(this.path,""),r=eN)}else{if(t)return H;a="",r=ex,s=0;continue}break;case ex:if(!i||i.cannotBeABaseURL&&"#"!==u)return H;if(i.cannotBeABaseURL&&"#"===u){this.scheme=i.scheme,this.path=m(i.path),this.query=i.query,this.fragment="",this.cannotBeABaseURL=!0,r=eB;break}r="file"===i.scheme?eM:eT;continue;case eE:if("/"===u&&"/"===l[s+1])r=eC,s++;else{r=eT;continue}break;case ew:if("/"===u){r=e_;break}r=ek;continue;case eT:if(this.scheme=i.scheme,u===n)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query;else if("/"===u||"\\"===u&&this.isSpecial())r=eS;else if("?"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query="",r=eF;else if("#"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.path.length--,r=ek;continue}break;case eS:if(this.isSpecial()&&("/"===u||"\\"===u))r=eC;else if("/"===u)r=e_;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,r=ek;continue}break;case eA:if(r=eC,"/"!==u||"/"!==L(a,s+1))continue;s++;break;case eC:if("/"!==u&&"\\"!==u){r=e_;continue}break;case e_:if("@"===u){o&&(a="%40"+a),o=!0,d=g(a);for(var l,u,d,p,v,y,x=0;x65535)return X;this.port=this.isSpecial()&&T===eg[this.scheme]?null:T,a=""}if(t)return;r=eD;continue}break;case eM:if(this.scheme="file","/"===u||"\\"===u)r=eR;else if(i&&"file"===i.scheme)switch(u){case n:this.host=i.host,this.path=m(i.path),this.query=i.query;break;case"?":this.host=i.host,this.path=m(i.path),this.query="",r=eF;break;case"#":this.host=i.host,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;break;default:ev(k(m(l,s),""))||(this.host=i.host,this.path=m(i.path),this.shortenPath()),r=ek;continue}else{r=ek;continue}break;case eR:if("/"===u||"\\"===u){r=eL;break}i&&"file"===i.scheme&&!ev(k(m(l,s),""))&&(em(i.path[0],!0)?B(this.path,i.path[0]):this.host=i.host),r=ek;continue;case eL:if(u===n||"/"===u||"\\"===u||"?"===u||"#"===u){if(!t&&em(a))r=ek;else if(""===a){if(this.host="",t)return;r=eD}else{if(p=this.parseHost(a))return p;if("localhost"===this.host&&(this.host=""),t)return;a="",r=eD}continue}a+=u;break;case eD:if(this.isSpecial()){if(r=ek,"/"!==u&&"\\"!==u)continue}else if(t||"?"!==u){if(t||"#"!==u){if(u!==n&&(r=ek,"/"!==u))continue}else this.fragment="",r=eB}else this.query="",r=eF;break;case ek:if(u===n||"/"===u||"\\"===u&&this.isSpecial()||!t&&("?"===u||"#"===u)){if(".."===(v=W(v=a))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(this.shortenPath(),"/"===u||"\\"===u&&this.isSpecial()||B(this.path,"")):"."===(y=a)||"%2e"===W(y)?"/"===u||"\\"===u&&this.isSpecial()||B(this.path,""):("file"===this.scheme&&!this.path.length&&em(a)&&(this.host&&(this.host=""),a=L(a,0)+":"),B(this.path,a)),a="","file"===this.scheme&&(u===n||"?"===u||"#"===u))for(;this.path.length>1&&""===this.path[0];)V(this.path);"?"===u?(this.query="",r=eF):"#"===u&&(this.fragment="",r=eB)}else a+=ep(u,ed);break;case eN:"?"===u?(this.query="",r=eF):"#"===u?(this.fragment="",r=eB):u!==n&&(this.path[0]+=ep(u,el));break;case eF:t||"#"!==u?u!==n&&("'"===u&&this.isSpecial()?this.query+="%27":"#"===u?this.query+="%23":this.query+=ep(u,el)):(this.fragment="",r=eB);break;case eB:u!==n&&(this.fragment+=ep(u,eu))}s++}},parseHost:function(e){var t,i,n;if("["===L(e,0)){if("]"!==L(e,e.length-1)||!(t=eo(j(e,1,-1))))return z;this.host=t}else if(this.isSpecial()){if(D(et,e=y(e))||null===(t=ea(e)))return z;this.host=t}else{if(D(ei,e))return z;for(n=0,t="",i=g(e);n1?arguments[1]:void 0,n=S(t,new eU(e,!1,i));s||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},eG=eV.prototype,ej=function(e,t){return{get:function(){return A(this)[e]()},set:t&&function(e){return A(this)[t](e)},configurable:!0,enumerable:!0}};if(s&&(u(eG,"href",ej("serialize","setHref")),u(eG,"origin",ej("getOrigin")),u(eG,"protocol",ej("getProtocol","setProtocol")),u(eG,"username",ej("getUsername","setUsername")),u(eG,"password",ej("getPassword","setPassword")),u(eG,"host",ej("getHost","setHost")),u(eG,"hostname",ej("getHostname","setHostname")),u(eG,"port",ej("getPort","setPort")),u(eG,"pathname",ej("getPathname","setPathname")),u(eG,"search",ej("getSearch","setSearch")),u(eG,"searchParams",ej("getSearchParams")),u(eG,"hash",ej("getHash","setHash"))),l(eG,"toJSON",function(){return A(this).serialize()},{enumerable:!0}),l(eG,"toString",function(){return A(this).serialize()},{enumerable:!0}),I){var eW=I.createObjectURL,eY=I.revokeObjectURL;eW&&l(eV,"createObjectURL",h(eW,I)),eY&&l(eV,"revokeObjectURL",h(eY,I))}x(eV,"URL"),r({global:!0,constructor:!0,forced:!a,sham:!s},{URL:eV})},{"19928ff2abfc3536":"i2qFG",d446e2097c7c2b23:"gJg5v",cd0458003d61a323:"6mXK1","592c96d240ad401c":"azO8L","2e7550752ce99b71":"7Z171",c128b8cb3e38a436:"f1CxE","9ee66bece60e18c5":"2iJ57","763c39a8b521ff54":"4CPdc","1c9277bbea264bc7":"3NI4M",f0dd676601f7cb0b:"95yA1",deee7b2fe3c1e96f:"9JWVX",ff3437c5b86d6c26:"cKgWo","3c2f033d1a197fd6":"lrrJd","9fdfccae2d327739":"eO8Ta","8ba5b2695179827":"fVu0j","23751b8f28dcd37":"lUDfY","5f808b1954b24403":"4x6uB",f969f30083a50975:"dkhk9",b15c5243fe0e0f6:"h3DcZ",e8b262dfe3e4c989:"dIaqI","9a3ca045fbb43248":"ixHS2"}],azO8L:[function(e,t,i){var n=e("b638e4b55492b349"),r=e("d3a18943af316a4c"),s=e("f39eaf2672eb61e1"),a=e("f816319c57ebd10b"),o=r("iterator");t.exports=!n(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(e,i){t.delete("b"),n+=i+e}),i.delete("a",2),i.delete("b",void 0),a&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(a||!s)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},{b638e4b55492b349:"cXVrS",d3a18943af316a4c:"5CuF7",f39eaf2672eb61e1:"6mXK1",f816319c57ebd10b:"jHRGA"}],lUDfY:[function(e,t,i){var n=e("5fc1d380e4ee310c"),r=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=RangeError,h=n(s.exec),c=Math.floor,l=String.fromCharCode,u=n("".charCodeAt),d=n([].join),f=n([].push),p=n("".replace),g=n("".split),m=n("".toLowerCase),v=function(e){for(var t=[],i=0,n=e.length;i=55296&&r<=56319&&i>1,e+=c(e/t);e>455;)e=c(e/35),n+=36;return c(n+36*e/(e+38))},x=function(e){var t,i,n=[],r=(e=v(e)).length,s=128,h=0,u=72;for(t=0;t=s&&ic((2147483647-h)/x))throw new o(a);for(h+=(m-s)*x,s=m,t=0;t2147483647)throw new o(a);if(i===s){for(var E=h,w=36;;){var T=w<=u?1:w>=u+26?26:w-u;if(E0&&(e&i)!=0;i>>=1)t++;return t},eh=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ec=function(e){for(var t=(e=Q(e,er," ")).length,i="",n=0;nt){i+="%",n++;continue}var s=ea(e,n+1);if(s!=s){i+=r,n++;continue}n+=2;var a=eo(s);if(0===a)r=z(s);else{if(1===a||a>4){i+="�",n++;continue}for(var o=[s],h=1;ht)&&"%"===K(e,n);){var c=ea(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;$(o,c),n+=2,h++}if(o.length!==a){i+="�";continue}var l=eh(o);null===l?i+="�":r=X(l)}}i+=r,n++}return i},el=/[!'()~]|%20/g,eu={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ed=function(e){return eu[e]},ef=function(e){return Q(H(e),el,ed)},ep=g(function(e,t){N(this,{type:k,target:F(e).entries,index:0,kind:t})},D,function(){var e=B(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,O(void 0,!0);var n=t[i];switch(e.kind){case"keys":return O(n.key,!1);case"values":return O(n.value,!1)}return O([n.key,n.value],!1)},!0),eg=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?ei(e,1):e:S(e)))};eg.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,n,r,s,a,h,c=this.entries,l=I(e);if(l)for(i=(t=_(e,l)).next;!(n=o(i,t)).done;){if((a=o(s=(r=_(w(n.value))).next,r)).done||(h=o(s,r)).done||!o(s,r).done)throw new Y("Expected sequence with length 2");$(c,{key:S(a.value),value:S(h.value)})}else for(var u in e)b(e,u)&&$(c,{key:u,value:S(e[u])})},parseQuery:function(e){if(e)for(var t,i,n=this.entries,r=et(e,"&"),s=0;s0?arguments[0]:void 0,t=N(this,new eg(e));c||(this.size=t.entries.length)},ev=em.prototype;if(f(ev,{append:function(e,t){var i=F(this);P(arguments.length,2),$(i.entries,{key:S(e),value:S(t)}),!c&&this.length++,i.updateURL()},delete:function(e){for(var t=F(this),i=P(arguments.length,1),n=t.entries,r=S(e),s=i<2?void 0:arguments[1],a=void 0===s?s:S(s),o=0;ot.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,i=F(this).entries,n=x(e,arguments.length>1?arguments[1]:void 0),r=0;r1?ex(arguments[1]):{})}}),y(V)){var eE=function(e){return v(this,j),new V(e,arguments.length>1?ex(arguments[1]):{})};j.constructor=eE,eE.prototype=j,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:eE})}}t.exports={URLSearchParams:em,getState:F}},{"12e7a75121005a18":"3prNk",aed1dbd908154980:"dLJLG","2c283453b2df07f7":"gJg5v",f8300b17f61c07ea:"7Z171",c6afc8e42ff4d861:"aXhrH",c5226e6ac6c1a4ca:"e5ie6",c70bfc3d71513918:"bOssl",a30c0c0ecacbf883:"2iJ57","9dc980ea97e54f2d":"6mXK1","34e5e214071de9f5":"azO8L",d5c866a8dfde6bfe:"4CPdc",cfb67c7a1a4f1af9:"3NI4M",f0c2290e210049d5:"43JWW",c7a2f88a5440a541:"dkhk9",fb2d9f4ac91c2856:"1Abii","5e8fcf76ef17aca5":"ixHS2","486653683495e4a1":"95yA1","34563d35f35f9929":"h1Wnr",b866aa0bde936df4:"9JWVX",b5970b9126e1d395:"f1CxE","71cd06e9ca4a93a2":"cRCRk","7e16c364467ce62d":"dPzbI","9a0912d2261bbada":"8mxCV","9d062cdf188403bf":"4x6uB","1caa2aad22025751":"7isQ3",bf766970034bde82:"5toj2",c6d4d2a85cdef35a:"kBMjp","6668155f748c33e9":"3624P","982e5845e606dff7":"dwU83","9a407fe1b80ba6f5":"h3DcZ","778323e4214f089d":"5CuF7","83b87fb1800baf72":"5Mqp3"}],"6WXZj":[function(e,t,i){var n=e("e013012b2638fef2"),r=e("9496ef9db0f82491"),s=e("21b7d0d94de855c8"),a=e("8147b48bed1193b9"),o=e("209fab1bb25c54f1"),h=e("fc6b642936976470"),c=r("URL"),l=h&&s(function(){c.canParse()}),u=s(function(){return 1!==c.canParse.length});n({target:"URL",stat:!0,forced:!l||u},{canParse:function(e){var t=a(arguments.length,1),i=o(e),n=t<2||void 0===arguments[1]?void 0:o(arguments[1]);try{return new c(i,n),!0}catch(e){return!1}}})},{e013012b2638fef2:"gJg5v","9496ef9db0f82491":"e5ie6","21b7d0d94de855c8":"cXVrS","8147b48bed1193b9":"h3DcZ","209fab1bb25c54f1":"4x6uB",fc6b642936976470:"azO8L"}],jUFLb:[function(e,t,i){var n=e("ca194031c7296753"),r=e("349abd465922c360"),s=e("4631d0a34bc5d157"),a=e("aa32995cacd33b44"),o=e("be99ff6f8e610b1"),h=r("URL");n({target:"URL",stat:!0,forced:!o},{parse:function(e){var t=s(arguments.length,1),i=a(e),n=t<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return new h(i,n)}catch(e){return null}}})},{ca194031c7296753:"gJg5v","349abd465922c360":"e5ie6","4631d0a34bc5d157":"h3DcZ",aa32995cacd33b44:"4x6uB",be99ff6f8e610b1:"azO8L"}],fisJQ:[function(e,t,i){var n=e("bfa898e24eaaf3ba"),r=e("f2e0e6e15a74c3f4");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},{bfa898e24eaaf3ba:"gJg5v",f2e0e6e15a74c3f4:"bOssl"}],drhch:[function(e,t,i){e("d31c1e63d588cf96")},{d31c1e63d588cf96:"dIaqI"}],k5k9P:[function(e,t,i){var n=e("5e6ccc0840d93f4d"),r=e("cef48d325e9fb1df"),s=e("669131fee6eafcca"),a=e("1de5920376d9b739"),o=URLSearchParams,h=o.prototype,c=r(h.append),l=r(h.delete),u=r(h.forEach),d=r([].push),f=new o("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&n(h,"delete",function(e){var t,i=arguments.length,n=i<2?void 0:arguments[1];if(i&&void 0===n)return l(this,e);var r=[];u(this,function(e,t){d(r,{key:t,value:e})}),a(i,1);for(var o=s(e),h=s(n),f=0,p=0,g=!1,m=r.length;f=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var h=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(h&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),C(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:I(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(t.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],eDoZE:[function(e,t,i){let{GameClient:n}=e("c0142d4e41395f84"),{GameEngine:r}=e("18a1ed1c4bf17b4d"),{RoomEvents:s}=e("dceef5f4a6a9e8ba"),{ClientStartHandler:a}=e("ec0d66055e408699"),{FeaturesManager:o}=e("7e4eea7c2d38167d"),{FirebaseConnector:h}=e("96ad1970faff6b57"),{ConfigManager:c}=e("f699c89d645cbfaf"),{TranslationsMapper:l}=e("92bd008077187dc5"),u=e("5f809829afd075a"),{GameDom:d}=e("aeb0ac1bb4c645c8"),{RoomsConst:f}=e("b21bf1f3f93cb5d9"),{GameConst:p}=e("f6b922b1a92a11c2"),{ErrorManager:g,EventsManagerSingleton:m,Logger:v,sc:y}=e("33884cbf240ef975");t.exports.GameManager=class{constructor(){this.gameEngine=!1,this.activeRoomEvents=null,this.events=m,this.gameDom=d,this.config=new c;let e=this.gameDom.getWindow()?.reldensInitialConfig||{};y.deepMergeProperties(this.config,e),this.features=new o({gameManager:this,events:this.events}),this.firebase=new h(this),this.joinedRooms={},this.userData={},this.plugins={},this.services={},this.elements={},this.playerData=!1,this.gameOver=!1,this.forcedDisconnection=!1,this.isChangingScene=!1,this.canInitEngine=!0,this.appServerUrl="",this.gameServerUrl="",this.locale="",l.forConfig(this.config.client,u,p.MESSAGE.DATA_VALUES)}setupCustomClientPlugin(e,t){this.plugins[e]=new t,this.plugins[e].setup({gameManager:this,events:this.events})}clientStart(){this.events.emitSync("reldens.clientStartBefore",this),this.startHandler=new a(this),this.startHandler.clientStart()}startGame(e,t){this.events.emitSync("reldens.startGameBefore",this);let i=this.joinGame(e,t),n=this.gameDom.getElement("#"+e.formId+" "+p.SELECTORS.RESPONSE_ERROR);n.innerHTML="";let r=this.gameDom.getElement(p.SELECTORS.BODY);i.then(()=>{r.classList.add(p.CLASSES.GAME_STARTED),r.classList.remove(p.CLASSES.GAME_ERROR),this.gameDom.getElement(p.SELECTORS.FORMS_CONTAINER).remove(),this.gameDom.getElement(p.SELECTORS.GAME_CONTAINER).classList.remove(p.CLASSES.HIDDEN)}).catch(t=>{r.classList.remove(p.CLASSES.GAME_STARTED),r.classList.add(p.CLASSES.GAME_ERROR),this.submitedForm=!1,n&&(v.error(t),n.innerHTML=t.message||t),this.events.emitSync("reldens.gameRoomError",this,t),this.firebase&&"firebase-login"===e.formId&&this.firebase.app.auth().signOut()}),this.events.emitSync("reldens.startGameAfter",this)}async joinGame(e,t=!1){return(this.userData={},await this.events.emit("reldens.beforeJoinGame",{gameManager:this,formData:e,isNewUser:t}),y.hasOwn(e,"forgot")&&(this.userData.forgot=1,this.userData.email=e.email),this.initializeClient(),e.isGuest&&(this.userData.isGuest=!0,this.userData.isNewUser=!0),t&&(this.userData.isNewUser=!0,this.userData.email=e.email),this.userData.username=e.username,this.userData.password=e.password,this.gameRoom=await this.gameClient.joinOrCreate(p.ROOM_GAME,this.userData),this.gameRoom)?(await this.events.emit("reldens.beforeJoinGameRoom",this.gameRoom),this.gameRoom.onMessage("*",async e=>{if(e.error)return this.displayPlayerCreateError(e),!1;if(p.START_GAME===e.act)return this.initialGameData=e,await this.beforeStartGame();if(p.CREATE_PLAYER_RESULT!==e.act)return!1;this.initialGameData.player=e.player;let t=this.gameDom.getElement(p.SELECTORS.PLAYER_SELECTION);t&&t.classList.add("hidden"),await this.initEngine()}),this.events.on("reldens.afterSceneDynamicCreate",async()=>{this.config.get("client/ui/screen/responsive")&&(this.gameEngine.updateGameSize(this),this.gameDom.getWindow().addEventListener("resize",()=>{this.gameEngine.updateGameSize(this)}))}),this.gameRoom):(this.displayPlayerCreateError("GameRoom not available, try again later please."),!1)}displayPlayerCreateError(e){let t=this.gameDom.getElement(p.SELECTORS.PLAYER_CREATE_FORM+" "+p.SELECTORS.RESPONSE_ERROR);return!!t&&(t.innerHTML=e.message,!0)}initializeClient(){this.appServerUrl=this.getAppServerUrl(),this.gameServerUrl=this.getGameServerUrl(),this.gameClient=new n(this.gameServerUrl,this.config)}async beforeStartGame(){return await this.events.emit("reldens.beforeInitEngineAndStartGame",this.initialGameData,this),y.hasOwn(this.initialGameData,"gameConfig")||g.error("Missing game configuration."),y.deepMergeProperties(this.config,this.initialGameData?.gameConfig||{}),await this.features.loadFeatures(this.initialGameData?.features||{}),await this.events.emit("reldens.beforeCreateEngine",this.initialGameData,this),!!this.canInitEngine&&await this.initEngine()}async initEngine(){if(this.playerData=this.initialGameData?.player||!1,!this.playerData||!this.playerData.state)return this.gameDom.alertReload(this.services?.translator.t("game.errors.missingPlayerData"));this.userData.selectedPlayer=this.playerData.id;let e=this.initialGameData?.selectedScene||"";this.userData.selectedScene=e;let t=this.initialGameData?.gameConfig||{};this.gameEngine=new r({config:t.client.gameEngine,events:this.events}),this.userData.isNewUser=!1,this.userData.isGuest&&(this.initialGameData?.guestPassword&&(this.userData.password=this.initialGameData.guestPassword),this.initialGameData?.userName&&(this.userData.username=this.initialGameData.userName)),await this.joinFeaturesRooms();let i=""!==e&&e!==f.ROOM_LAST_LOCATION_KEY?e:this.playerData.state.scene;this.playerData.state.scene=i;let n=await this.gameClient.joinOrCreate(i,this.userData);return n?(this.gameDom.getElement(p.SELECTORS.BODY).classList.add(p.CLASSES.GAME_ENGINE_STARTED),delete this.initialGameData.selectedScene,delete this.userData.selectedScene,await this.emitJoinedRoom(n,i),this.activeRoomEvents=this.createRoomEventsInstance(i,this.events),await this.events.emit("reldens.createdRoomsEventsInstance",n,this),await this.activeRoomEvents.activateRoom(n),await this.emitActivatedRoom(n,i),await this.events.emit("reldens.afterInitEngineAndStartGame",this.initialGameData,n),n):this.gameDom.alertReload(this.services?.translator.t("game.errors.joiningRoom",{joinRoomName:i}))}async joinFeaturesRooms(){let e=Object.keys(this.features.featuresList);if(0===e.length)return;let t=[];for(let i of e){let e=this.features.featuresList[i];if(y.hasOwn(e,"joinRooms"))for(let i of e.joinRooms){let e=await this.gameClient.joinOrCreate(i,this.userData);if(!e)return this.gameDom.alertReload(this.services.translator.t("game.errors.joiningFeatureRoom",{joinRoomName:i}));this.joinedRooms[i]=e,await this.emitJoinedRoom(e,i),t.push(i)}}y.deepMergeProperties(this.config,{client:{rooms:{featuresRoomsNames:t}}})}async reconnectGameClient(e,t){this.isChangingScene=!0;let i=this.createRoomEventsInstance(e.player.state.scene);this.gameClient.joinOrCreate(i.roomName,this.userData).then(async n=>{t.leave(),this.activeRoomEvents=i,this.room=n,await this.emitJoinedRoom(n,e.player.state.scene),await i.activateRoom(n,e.prev),await this.emitActivatedRoom(n,e.player.state.scene)}).catch(i=>{v.error("Reconnect Game Client error.",{error:i,message:e,previousRoom:t}),this.gameDom.alertReload(this.services.translator.t("game.errors.reconnectClient"))})}async emitActivatedRoom(e,t){await this.events.emit("reldens.activatedRoom",e,this),await this.events.emit("reldens.activatedRoom_"+t,e,this)}async emitJoinedRoom(e,t){await this.events.emit("reldens.joinedRoom",e,this),await this.events.emit("reldens.joinedRoom_"+t,e,this)}createRoomEventsInstance(e){return new s(e,this)}getAppServerUrl(){return""===this.appServerUrl&&(this.appServerUrl=this.getUrlFromCurrentReferer()),this.appServerUrl}getGameServerUrl(){return""===this.gameServerUrl&&(this.gameServerUrl=this.getUrlFromCurrentReferer(!0)),this.gameServerUrl}getUrlFromCurrentReferer(e=!1){let t=this.gameDom.getWindow().location,i=t.protocol;return e&&(i=0===i.indexOf("https")?"wss:":"ws:"),i+"//"+t.hostname+(t.port?":"+t.port:"")}getActiveScene(){return this.activeRoomEvents.getActiveScene()}getActiveScenePreloader(){let e=this.getActiveScene().key;return this.gameEngine.scene.getScene("ScenePreloader"+e)}getCurrentPlayer(){let e=this.getActiveScene();return!!e&&e.player}currentPlayerName(){let e=this.getCurrentPlayer();return e?e.player_id+" - "+e.playerName:""}getCurrentPlayerAnimation(){let e=this.getCurrentPlayer();return e.players[e.playerId]}getUiElement(e,t=!0){let i=y.get(this.gameEngine,"uiScene",!1);return i?i.getUiElement(e,t):(t&&v.error("UI Scene not defined."),!1)}getFeature(e){let t=this.features.featuresList;return y.hasOwn(t,e)?t[e]:(v.error("Feature key not defined.",e),!1)}getAnimationByKey(e){return this.getActiveScene().getAnimationByKey(e)}}},{c0142d4e41395f84:"44RMi","18a1ed1c4bf17b4d":"fVZ41",dceef5f4a6a9e8ba:"7XAJ0",ec0d66055e408699:"401GU","7e4eea7c2d38167d":"3ZqP5","96ad1970faff6b57":"dkVHA",f699c89d645cbfaf:"6v2bg","92bd008077187dc5":"1fcQw","5f809829afd075a":"CtFH5",aeb0ac1bb4c645c8:"bqEy7",b21bf1f3f93cb5d9:"9vHHC",f6b922b1a92a11c2:"93TbC","33884cbf240ef975":"3lwy5"}],"44RMi":[function(e,t,i){let{Client:n}=e("7318eff88b436af1"),{RoomsConst:r}=e("25de65df7e751073"),{GameConst:s}=e("6f1338761bdf0493"),{Logger:a}=e("c4efa48e92b2f02b");t.exports.GameClient=class{constructor(e,t){this.serverUrl=e,this.config=t,this.autoConnectServerGameRoom=this.config.getWithoutLogs("client/rooms/autoConnectServerGameRoom",!0),this.autoConnectServerFeatureRooms=this.config.getWithoutLogs("client/rooms/autoConnectServerFeatureRooms",!0),this.roomsUrls={},this.roomClients={},this.gameRoomsByServer={},this.featuresByServerFlag={},this.featuresRoomsByServer={}}async joinOrCreate(e,t){try{let i=this.roomClient(e);if(!i)return a.error('Client not found for room name "'+e+'".'),!1;let n=this.roomsUrls[e];return await this.connectToGlobalGameRoom(n,i,t),await this.connectToGlobalFeaturesRooms(n,i,t),await i.joinOrCreate(e,t)}catch(i){if(r.ERRORS.CREATING_ROOM_AWAIT===i.message)return await new Promise(e=>setTimeout(e,500)),await this.joinOrCreate(e,t);a.error("Joining room error: "+i.message)}}async connectToGlobalGameRoom(e,t,i){if(this.autoConnectServerGameRoom){if(""===e||this.serverUrl===e){a.debug("Avoid connect to global game room.",this.serverUrl,e);return}this.gameRoomsByServer[e]||(a.debug("Registering GameRoom for server: "+e),this.gameRoomsByServer[e]=await t.joinOrCreate(s.ROOM_GAME,i),this.gameRoomsByServer[e].onMessage("*",()=>{}))}}async connectToGlobalFeaturesRooms(e,t,i){if(!this.autoConnectServerFeatureRooms)return;if(""===e||this.serverUrl===e){a.debug("Avoid connect to features rooms.",this.serverUrl,e);return}if(this.featuresByServerFlag[e])return;a.debug("Registering features rooms for server: "+e),this.featuresByServerFlag[e]=!0;let n=this.config.getWithoutLogs("client/rooms/featuresRoomsNames",[]);if(!(00&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}(this._view,this._offset,e);return this._offset+=e,t},T.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},T.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),i=0,n=0,r=0,s=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-((255-t+1)*1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return i=this._view.getUint8(this._offset),this._offset+=1,this._bin(i);case 197:return i=this._view.getUint16(this._offset),this._offset+=2,this._bin(i);case 198:return i=this._view.getUint32(this._offset),this._offset+=4,this._bin(i);case 199:if(i=this._view.getUint8(this._offset),n=this._view.getInt8(this._offset+1),this._offset+=2,-1===n){var a=this._view.getUint32(this._offset);return r=this._view.getInt32(this._offset+4),s=this._view.getUint32(this._offset+8),this._offset+=12,new Date((4294967296*r+s)*1e3+a/1e6)}return[n,this._bin(i)];case 200:return i=this._view.getUint16(this._offset),n=this._view.getInt8(this._offset+2),this._offset+=3,[n,this._bin(i)];case 201:return i=this._view.getUint32(this._offset),n=this._view.getInt8(this._offset+4),this._offset+=5,[n,this._bin(i)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return r=4294967296*this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 212:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n){this._offset+=1;return}return[n,this._bin(1)];case 213:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(2)];case 214:if(n=this._view.getInt8(this._offset),this._offset+=1,-1===n)return e=this._view.getUint32(this._offset),this._offset+=4,new Date(1e3*e);return[n,this._bin(4)];case 215:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n)return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(r+s);if(-1===n)return r=this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(1e3*((3&r)*4294967296+s)+(r>>>2)/1e6);return[n,this._bin(8)];case 216:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(16)];case 217:return i=this._view.getUint8(this._offset),this._offset+=1,this._str(i);case 218:return i=this._view.getUint16(this._offset),this._offset+=2,this._str(i);case 219:return i=this._view.getUint32(this._offset),this._offset+=4,this._str(i);case 220:return i=this._view.getUint16(this._offset),this._offset+=2,this._array(i);case 221:return i=this._view.getUint32(this._offset),this._offset+=4,this._array(i);case 222:return i=this._view.getUint16(this._offset),this._offset+=2,this._map(i);case 223:return i=this._view.getUint32(this._offset),this._offset+=4,this._map(i)}throw Error("Could not parse")};var S=globalThis.WebSocket||function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},A=function(){function e(e){this.events=e}return e.prototype.send=function(e){e instanceof ArrayBuffer?this.ws.send(e):Array.isArray(e)&&this.ws.send(new Uint8Array(e).buffer)},e.prototype.connect=function(e){this.ws=new S(e,this.protocols),this.ws.binaryType="arraybuffer",this.ws.onopen=this.events.onopen,this.ws.onmessage=this.events.onmessage,this.ws.onclose=this.events.onclose,this.ws.onerror=this.events.onerror},e.prototype.close=function(e,t){this.ws.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.ws.readyState===S.OPEN},enumerable:!1,configurable:!0}),e}(),C=function(){function e(){this.events={},this.transport=new A(this.events)}return e.prototype.send=function(e){this.transport.send(e)},e.prototype.connect=function(e){this.transport.connect(e)},e.prototype.close=function(e,t){this.transport.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.transport.isOpen},enumerable:!1,configurable:!0}),e}();function _(e,t){for(var i=e[t++],n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}function I(e){void 0===e&&(e="");for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i+1}e.Protocol=void 0,(r=e.Protocol||(e.Protocol={}))[r.HANDSHAKE=9]="HANDSHAKE",r[r.JOIN_ROOM=10]="JOIN_ROOM",r[r.ERROR=11]="ERROR",r[r.LEAVE_ROOM=12]="LEAVE_ROOM",r[r.ROOM_DATA=13]="ROOM_DATA",r[r.ROOM_STATE=14]="ROOM_STATE",r[r.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",r[r.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA",r[r.ROOM_DATA_BYTES=17]="ROOM_DATA_BYTES",e.ErrorCode=void 0,(s=e.ErrorCode||(e.ErrorCode={}))[s.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",s[s.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",s[s.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",s[s.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",s[s.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",s[s.AUTH_FAILED=4215]="AUTH_FAILED",s[s.APPLICATION_ERROR=4216]="APPLICATION_ERROR";var O={};function P(e){var t=O[e];if(!t)throw Error("missing serializer: "+e);return t}var M=function(){return{emit:function(e){for(var t=[],i=1;i=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,utf8Write:w,int8:T,uint8:S,int16:A,uint16:C,int32:_,uint32:I,int64:O,uint64:P,float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},writeFloat32:D,writeFloat64:k,boolean:function(e,t){return S(e,t?1:0)},string:N,number:F});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),q=new Float32Array(X.buffer),K=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),q[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),K[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,int8:U,uint8:V,int16:G,uint16:j,int32:W,uint32:Y,float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int64:H,uint64:z,readFloat32:J,readFloat64:$,boolean:function(e,t){return V(e,t)>0},string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},arrayCheck:function(e,t){return e[t.offset]<160},switchStructureCheck:ee}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){this.refCounts[e]=this.refCounts[e]-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:u;if(y===e.OPERATION.CLEAR){r.clear(a);continue}var b=p?u%(y||255):Z(i,n),x=p?r._definition.fieldsByIndex[b]:"",E=f.getType(b),w=void 0,T=void 0,S=void 0;if(p?T=r["_".concat(x)]:(T=r.getByIndex(b),(y&e.OPERATION.ADD)===e.OPERATION.ADD?(S=r instanceof m?Q(i,n):b,r.setIndex(b,S)):S=r.getIndex(b)),(y&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(y!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(b),T&&T.$changes&&o.removeRef(T.$changes.refId),w=null),void 0===x){console.warn("@colyseus/schema: definition mismatch");for(var A={offset:n.offset};n.offset (".concat(e,") ").concat(t))}),this.onLeave(function(){return i.removeAllListeners()})}return Object.defineProperty(t.prototype,"id",{get:function(){return this.roomId},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,i,n){void 0===n&&(n=this);var r=new C;n.connection=r,r.events.onmessage=t.prototype.onMessageCallback.bind(n),r.events.onclose=function(e){var t;if(!n.hasJoined){null===(t=console.warn)||void 0===t||t.call(console,"Room connection was closed unexpectedly (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason);return}e.code===h.DEVMODE_RESTART&&i?i():(n.onLeave.invoke(e.code),n.destroy())},r.events.onerror=function(e){var t;null===(t=console.warn)||void 0===t||t.call(console,"Room, onError (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason)},r.connect(e)},t.prototype.leave=function(t){var i=this;return void 0===t&&(t=!0),new Promise(function(n){i.onLeave(function(e){return n(e)}),i.connection?t?i.connection.send([e.Protocol.LEAVE_ROOM]):i.connection.close():i.onLeave.invoke(h.CONSENTED)})},t.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},t.prototype.send=function(t,i){var n,r=[e.Protocol.ROOM_DATA];if("string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),void 0!==i){var s=function(e){var t=[],i=[],n=new ArrayBuffer(function e(t,i,n){var r=typeof n,s=0,a=0,o=0,h=0,c=0,l=0;if("string"===r){if((c=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(n))<32)t.push(160|c),l=1;else if(c<256)t.push(217,c),l=2;else if(c<65536)t.push(218,c>>8,c),l=3;else if(c<4294967296)t.push(219,c>>24,c>>16,c>>8,c),l=5;else throw Error("String too long");return i.push({_str:n,_length:c,_offset:t.length}),l+c}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(t.push(n),1):n<256?(t.push(204,n),2):n<65536?(t.push(205,n>>8,n),3):n<4294967296?(t.push(206,n>>24,n>>16,n>>8,n),5):(o=n/4294967296>>0,h=n>>>0,t.push(207,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):n>=-32?(t.push(n),1):n>=-128?(t.push(208,n),2):n>=-32768?(t.push(209,n>>8,n),3):n>=-2147483648?(t.push(210,n>>24,n>>16,n>>8,n),5):(o=Math.floor(n/4294967296),h=n>>>0,t.push(211,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):(t.push(203),i.push({_float:n,_length:8,_offset:t.length}),9);if("object"===r){if(null===n)return t.push(192),1;if(Array.isArray(n)){if((c=n.length)<16)t.push(144|c),l=1;else if(c<65536)t.push(220,c>>8,c),l=3;else if(c<4294967296)t.push(221,c>>24,c>>16,c>>8,c),l=5;else throw Error("Array too large");for(s=0;s=0&&f>=0&&d<=17179869183?0===f&&d<=4294967295?(t.push(214,255,d>>24,d>>16,d>>8,d),6):(o=d/4294967296,h=4294967295&d,t.push(215,255,f>>22,f>>14,f>>6,o,h>>24,h>>16,h>>8,h),10):(o=Math.floor(d/4294967296),h=d>>>0,t.push(199,12,255,f>>24,f>>16,f>>8,f,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),15)}if(n instanceof ArrayBuffer){if((c=n.byteLength)<256)t.push(196,c),l=2;else if(c<65536)t.push(197,c>>8,c),l=3;else if(c<4294967296)t.push(198,c>>24,c>>16,c>>8,c),l=5;else throw Error("Buffer too large");return i.push({_bin:n,_length:c,_offset:t.length}),l+c}if("function"==typeof n.toJSON)return e(t,i,n.toJSON());var p=[],g="",m=Object.keys(n);for(s=0,a=m.length;s>8,c),l=3;else if(c<4294967296)t.push(223,c>>24,c>>16,c>>8,c),l=5;else throw Error("Object too large");for(s=0;s0&&(o=i[0]._offset);for(var h,c=0,l=0,u=0,d=t.length;u>6):(n<55296||n>=57344?e.setUint8(t++,224|n>>12):(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e.setUint8(t++,240|n>>18),e.setUint8(t++,128|n>>12&63)),e.setUint8(t++,128|n>>6&63)),e.setUint8(t++,128|63&n))}(r,l,h._str):void 0!==h._float&&r.setFloat64(l,h._float);s++,a+=c,i[s]&&(o=i[s]._offset)}return n}(i);(n=new Uint8Array(r.length+s.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(s),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},t.prototype.sendBytes=function(t,i){var n,r=[e.Protocol.ROOM_DATA_BYTES];"string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),(n=new Uint8Array(r.length+(i.byteLength||i.length))).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length),this.connection.send(n.buffer)},Object.defineProperty(t.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),t.prototype.removeAllListeners=function(){this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},t.prototype.onMessageCallback=function(t){var i=Array.from(new Uint8Array(t.data)),n=i[0];if(n===e.Protocol.JOIN_ROOM){var r=1,s=_(i,1);if(r+=I(s),this.serializerId=_(i,r),r+=I(this.serializerId),!this.serializer){var a=P(this.serializerId);this.serializer=new a}i.length>r&&this.serializer.handshake&&this.serializer.handshake(i,{offset:r}),this.reconnectionToken="".concat(this.roomId,":").concat(s),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([e.Protocol.JOIN_ROOM])}else if(n===e.Protocol.ERROR){var o={offset:1},h=D.decode.number(i,o),c=D.decode.string(i,o);this.onError.invoke(h,c)}else if(n===e.Protocol.LEAVE_ROOM)this.leave();else if(n===e.Protocol.ROOM_DATA_SCHEMA){var l={offset:1},u=this.serializer.getState().constructor._context.get(D.decode.number(i,l)),c=new u;c.decode(i,l),this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_STATE)i.shift(),this.setState(i);else if(n===e.Protocol.ROOM_STATE_PATCH)i.shift(),this.patch(i);else if(n===e.Protocol.ROOM_DATA){var d={offset:1},u=D.decode.stringCheck(i,d)?D.decode.string(i,d):D.decode.number(i,d),c=i.length>d.offset?function(e,t){void 0===t&&(t=0);var i=new T(e,t),n=i._parse();if(i._offset!==e.byteLength)throw Error(e.byteLength-i._offset+" trailing bytes");return n}(t.data,d.offset):void 0;this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_DATA_BYTES){var f={offset:1},u=D.decode.stringCheck(i,f)?D.decode.string(i,f):D.decode.number(i,f);this.dispatchMessage(u,new Uint8Array(i.slice(f.offset)))}},t.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.dispatchMessage=function(e,t){var i,n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):null===(i=console.warn)||void 0===i||i.call(console,"colyseus.js: onMessage() not registered for type '".concat(e,"'."))},t.prototype.destroy=function(){this.serializer&&this.serializer.teardown()},t.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$".concat(e._typeid);case"string":return e;case"number":return"i".concat(e);default:throw Error("invalid message type.")}},t}();function N(e,t){t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function F(e,t,i){var n,r,s=(i=i||{}).body;return i.method=e,i.headers=i.headers||{},s instanceof FormData||s&&"object"==typeof s&&(i.headers["content-type"]="application/json",i.body=JSON.stringify(s)),i.withCredentials&&(i.credentials="include"),i.timeout&&(r=new AbortController,i.signal=r.signal,n=setTimeout(r.abort,i.timeout)),new Promise((e,a)=>{fetch(t,i).then((t,r)=>{clearTimeout(n),N(t,t),r=t.status>=400?a:e,(s=t.headers.get("content-type"))&&~s.indexOf("application/json")?t.text().then(e=>{try{t.data=JSON.parse(e,i.reviver),r(t)}catch(e){e.headers=t.headers,N(t,e),a(e)}}):r(t)}).catch(e=>{e.timeout=r&&r.signal.aborted,a(e)})})}var B=F.bind(F,"GET"),U=F.bind(F,"POST"),V=F.bind(F,"PATCH"),G=F.bind(F,"DELETE"),j=F.bind(F,"PUT"),W={del:G,get:B,patch:V,post:U,put:j,send:F},Y=(o={__proto__:null,default:W,del:G,get:B,patch:V,post:U,put:j,send:F},[W].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in o)){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(o)),H=function(){function e(e){this.client=e}return e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("get",e,t)},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.request("post",e,t)},e.prototype.del=function(e,t){return void 0===t&&(t={}),this.request("del",e,t)},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.request("put",e,t)},e.prototype.request=function(e,t,i){return void 0===i&&(i={}),Y[e](this.client.getHttpEndpoint(t),this.getOptions(i)).catch(function(e){var t,i=e.statusCode,n=(null===(t=e.data)||void 0===t?void 0:t.error)||e.statusMessage||e.message;if(!i&&!n)throw e;throw new w(i,n)})},e.prototype.getOptions=function(e){return this.authToken&&(e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(this.authToken)),"undefined"!=typeof cc&&cc.sys&&cc.sys.isNative||(e.withCredentials=!0),e},e}();function z(){if(!c)try{c="undefined"!=typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:window.localStorage}catch(e){}return c||(c={cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),c}var X=function(){function e(e){var t,i,n,r=this;this.http=e,this.settings={path:"/auth",key:"colyseus-auth-token"},l.set(this,!1),u.set(this,void 0),d.set(this,void 0),f.set(this,M()),t=this.settings.key,i=function(e){return r.token=e},n=z().getItem(t),"undefined"!=typeof Promise&&n instanceof Promise?n.then(function(e){return i(e)}):i(n)}return Object.defineProperty(e.prototype,"token",{get:function(){return this.http.authToken},set:function(e){this.http.authToken=e},enumerable:!1,configurable:!0}),e.prototype.onChange=function(e){var t=this,i=x(this,f,"f").on("change",e);return x(this,l,"f")||E(this,u,new Promise(function(e,i){t.getUserData().then(function(e){t.emitChange(v(v({},e),{token:t.token}))}).catch(function(e){t.emitChange({user:null,token:void 0})}).finally(function(){e()})}),"f"),E(this,l,!0,"f"),i},e.prototype.getUserData=function(){return y(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(!this.token)return[3,2];return[4,this.http.get("".concat(this.settings.path,"/userdata"))];case 1:return[2,e.sent().data];case 2:throw Error("missing auth.token")}})})},e.prototype.registerWithEmailAndPassword=function(e,t,i){return y(this,void 0,void 0,function(){var n;return b(this,function(r){switch(r.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/register"),{body:{email:e,password:t,options:i}})];case 1:return n=r.sent().data,this.emitChange(n),[2,n]}})})},e.prototype.signInWithEmailAndPassword=function(e,t){return y(this,void 0,void 0,function(){var i;return b(this,function(n){switch(n.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/login"),{body:{email:e,password:t}})];case 1:return i=n.sent().data,this.emitChange(i),[2,i]}})})},e.prototype.signInAnonymously=function(e){return y(this,void 0,void 0,function(){var t;return b(this,function(i){switch(i.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/anonymous"),{body:{options:e}})];case 1:return t=i.sent().data,this.emitChange(t),[2,t]}})})},e.prototype.sendPasswordResetEmail=function(e){return y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/forgot-password"),{body:{email:e}})];case 1:return[2,t.sent().data]}})})},e.prototype.signInWithProvider=function(e,t){return void 0===t&&(t={}),y(this,void 0,void 0,function(){var i=this;return b(this,function(n){return[2,new Promise(function(n,r){var s=t.width||480,a=t.height||768,o=i.token?"?token=".concat(i.token):"",h="Login with ".concat(e[0].toUpperCase()+e.substring(1)),c=i.http.client.getHttpEndpoint("".concat(t.prefix||"".concat(i.settings.path,"/provider"),"/").concat(e).concat(o)),l=screen.width/2-s/2,u=screen.height/2-a/2;E(i,d,window.open(c,h,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+s+", height="+a+", top="+u+", left="+l),"f");var f=function(e){(void 0!==e.data.user||void 0!==e.data.token)&&(clearInterval(p),x(i,d,"f").close(),E(i,d,void 0,"f"),window.removeEventListener("message",f),void 0!==e.data.error?r(e.data.error):(n(e.data),i.emitChange(e.data)))},p=setInterval(function(){(!x(i,d,"f")||x(i,d,"f").closed)&&(E(i,d,void 0,"f"),r("cancelled"),window.removeEventListener("message",f))},200);window.addEventListener("message",f)})]})})},e.prototype.signOut=function(){return y(this,void 0,void 0,function(){return b(this,function(e){return this.emitChange({user:null,token:null}),[2]})})},e.prototype.emitChange=function(e){if(void 0!==e.token){var t,i,n;(this.token=e.token,null===e.token)?(t=this.settings.key,z().removeItem(t)):(i=this.settings.key,n=e.token,z().setItem(i,n))}x(this,f,"f").emit("change",e)},e}();function q(e){var t,i=(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hostname)||"localhost",n=e.hostname.split("."),r=e.hostname.includes("trycloudflare.com")||e.hostname.includes("discordsays.com")||!(n.length>2)?"":"/".concat(n[0]);return e.pathname.startsWith("/.proxy")?"".concat(e.protocol,"//").concat(i).concat(r).concat(e.pathname).concat(e.search):"".concat(e.protocol,"//").concat(i,"/.proxy/colyseus").concat(r).concat(e.pathname).concat(e.search)}l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap;var K=function(e){function t(i,n){var r=e.call(this,i)||this;return r.code=n,Object.setPrototypeOf(r,t.prototype),r}return m(t,e),t}(Error),J="undefined"!=typeof window&&void 0!==(null===(p=null==window?void 0:window.location)||void 0===p?void 0:p.hostname)?"".concat(window.location.protocol.replace("http","ws"),"//").concat(window.location.hostname).concat(window.location.port&&":".concat(window.location.port)):"ws://127.0.0.1:2567",$=function(){function e(e,t){if(void 0===e&&(e=J),"string"==typeof e){var i,n,r=e.startsWith("/")?new URL(e,J):new URL(e),s="https:"===r.protocol||"wss:"===r.protocol,a=Number(r.port||(s?443:80));this.settings={hostname:r.hostname,pathname:r.pathname,port:a,secure:s}}else void 0===e.port&&(e.port=e.secure?443:80),void 0===e.pathname&&(e.pathname=""),this.settings=e;this.settings.pathname.endsWith("/")&&(this.settings.pathname=this.settings.pathname.slice(0,-1)),this.http=new H(this),this.auth=new X(this.http),this.urlBuilder=t,!this.urlBuilder&&"undefined"!=typeof window&&(null===(n=null===(i=null==window?void 0:window.location)||void 0===i?void 0:i.hostname)||void 0===n?void 0:n.includes("discordsays.com"))&&(this.urlBuilder=q,console.log("Colyseus SDK: Discord Embedded SDK detected. Using custom URL builder."))}return e.prototype.joinOrCreate=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.create=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.join=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.joinById=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.reconnect=function(e,t){return y(this,void 0,void 0,function(){var i,n,r;return b(this,function(s){switch(s.label){case 0:if("string"==typeof e&&"string"==typeof t)throw Error("DEPRECATED: .reconnect() now only accepts 'reconnectionToken' as argument.\nYou can get this token from previously connected `room.reconnectionToken`");if(n=(i=e.split(":"))[0],r=i[1],!n||!r)throw Error("Invalid reconnection token format.\nThe format should be roomId:reconnectionToken");return[4,this.createMatchMakeRequest("reconnect",n,{reconnectionToken:r},t)];case 1:return[2,s.sent()]}})})},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.get("matchmake/".concat(e),{headers:{Accept:"application/json"}})];case 1:return[2,t.sent().data]}})})},e.prototype.consumeSeatReservation=function(e,t,i){return y(this,void 0,void 0,function(){var n,r,s,a=this;return b(this,function(o){return(n=this.createRoom(e.room.name,t)).roomId=e.room.roomId,n.sessionId=e.sessionId,r={sessionId:n.sessionId},e.reconnectionToken&&(r.reconnectionToken=e.reconnectionToken),s=i||n,n.connect(this.buildEndpoint(e.room,r),e.devMode&&function(){return y(a,void 0,void 0,function(){var i,r,a=this;return b(this,function(o){return console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," Re-establishing connection with room id '").concat(n.roomId,"'...")),i=0,setTimeout(r=function(){return y(a,void 0,void 0,function(){return b(this,function(a){switch(a.label){case 0:i++,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.consumeSeatReservation(e,t,s)];case 2:return a.sent(),console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(9989)," Successfully re-established connection with room '").concat(n.roomId,"'")),[3,4];case 3:return a.sent(),i<8?(console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," retrying... (").concat(i," out of ").concat(8,")")),setTimeout(r,2e3)):console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(10060)," Failed to reconnect. Is your server running? Please check server logs.")),[3,4];case 4:return[2]}})})},2e3),[2]})})},s),[2,new Promise(function(e,t){var i=function(e,i){return t(new w(e,i))};s.onError.once(i),s.onJoin.once(function(){s.onError.remove(i),e(s)})})]})})},e.prototype.createMatchMakeRequest=function(e,t,i,n,r){return void 0===i&&(i={}),y(this,void 0,void 0,function(){var s;return b(this,function(a){switch(a.label){case 0:return[4,this.http.post("matchmake/".concat(e,"/").concat(t),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})];case 1:if((s=a.sent().data).error)throw new K(s.error,s.code);return"reconnect"===e&&(s.reconnectionToken=i.reconnectionToken),[4,this.consumeSeatReservation(s,n,r)];case 2:return[2,a.sent()]}})})},e.prototype.createRoom=function(e,t){return new k(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push("".concat(n,"=").concat(t[n]));var r=this.settings.secure?"wss://":"ws://";e.publicAddress?r+="".concat(e.publicAddress):r+="".concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname);var s="".concat(r,"/").concat(e.processId,"/").concat(e.roomId,"?").concat(i.join("&"));return this.urlBuilder?this.urlBuilder(new URL(s)):s},e.prototype.getHttpEndpoint=function(e){void 0===e&&(e="");var t=e.startsWith("/")?e:"/".concat(e),i="".concat(this.settings.secure?"https":"http","://").concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname).concat(t);return this.urlBuilder?this.urlBuilder(new URL(i)):i},e.prototype.getEndpointPort=function(){return 80!==this.settings.port&&443!==this.settings.port?":".concat(this.settings.port):""},e}(),Q=function(){function e(){}return e.prototype.setState=function(e){return this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){return this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?new D.Reflection().decode(e,t):this.state=D.Reflection.decode(e,t)},e}(),Z=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();O.schema=Q,O.none=Z,e.Auth=X,e.Client=$,e.Room=k,e.SchemaSerializer=Q,e.registerSerializer=function(e,t){O[e]=t},Object.defineProperty(e,"__esModule",{value:!0})}(i)},{}],"9vHHC":[function(e,t,i){t.exports.RoomsConst={ROOM_TYPE_SCENE:"scene",ROOM_TYPE_LOGIN:"login",ROOM_TYPE_GAME:"game",TILE_INDEX:"i",NEXT_SCENE:"n",MAPS_BUCKET:"/assets/maps",ROOM_LAST_LOCATION_KEY:"@lastLocation",RETURN_POINT_KEYS:{DIRECTION:"d",X:"x",Y:"y",DEFAULT:"de",PREVIOUS:"p"},ERRORS:{CREATING_ROOM_AWAIT:"CREATING-ROOM-AWAIT"}}},{}],"93TbC":[function(e,t,i){t.exports.GameConst={START_GAME:"s",ACTION_KEY:"act",CREATE_PLAYER:"cp",CREATE_PLAYER_RESULT:"cps",CHANGING_SCENE:"cgs",CHANGED_SCENE:"cs",RECONNECT:"r",ROOM_GAME:"room_game",ROOM_NAME_MAP:"Map",SCENE_PRELOADER:"ScenePreloader",PLAYER_STATS:"ps",ICON_STATS:"player-stats",CLIENT_JOINED:"cj",UI:"ui",CLOSE_UI_ACTION:"closeUi",TYPE_PLAYER:"pj",GAME_OVER:"go",REVIVED:"rv",BUTTON_OPTION:"btn-opt",UI_BOX:"box",UI_CLOSE:"-close",UI_OPEN:"-open",UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right",STOP:"stop",POINTER:"mp",ARROW_DOWN:"ard",IMAGE_PLAYER:"player",ACTIONS:{LOGIN_UPDATE_ERROR:"luer"},STATUS:{ACTIVE:1,DISABLED:2,DEATH:3,AVOID_INTERPOLATION:4},STRUCTURE:{DEFAULT:"default",ASSETS:"assets",CSS:"css",DIST:"dist",THEME:"theme",LIB:"lib",SERVER:"server",CLIENT:"client",PLUGINS:"plugins",INDEX:"index.html",SCSS_FILE:"styles.scss",CSS_FILE:"styles.css",ADMIN:"admin",TEMPLATES:"templates",ADMIN_JS_FILE:"reldens-admin-client.js",ADMIN_SCSS_FILE:"reldens-admin-client.scss",ADMIN_CSS_FILE:"reldens-admin-client.css",INSTALLER_FOLDER:"install",INSTALL_LOCK:"install.lock"},ROUTE_PATHS:{DISCONNECT_USER:"/reldens-disconnect-user",TERMS_AND_CONDITIONS:"/terms-and-conditions",MAILER:"/reldens-mailer-enabled",FIREBASE:"/reldens-firebase"},SELECTORS:{BODY:"body",CANVAS:"CANVAS",INPUT:"input",FORMS_CONTAINER:".forms-container",REGISTER_FORM:"#register-form",GUEST_FORM:"#guest-form",LOGIN_FORM:"#login-form",FORGOT_PASSWORD_FORM:"#forgot-form",PLAYER_CREATE_FORM:".player-create-form",PLAYER_SELECTION:"#player-selection",FULL_SCREEN_BUTTON:".full-screen-btn",RESPONSE_ERROR:".response-error",LOADING_CONTAINER:".loading-container",REGISTRATION:{PASSWORD:"#reg-password",RE_PASSWORD:"#reg-re-password",EMAIL:"#reg-email",USERNAME:"#reg-username"},GUEST:{USERNAME:"#guest-username"},LOGIN:{USERNAME:"#username",PASSWORD:"#password"},FORGOT_PASSWORD:{EMAIL:"#forgot-email",CONTAINER:".forgot-password-container"},TERMS:{BOX:"#terms-and-conditions",CONTAINER:".terms-and-conditions-container",LINK_CONTAINER:".terms-and-conditions-link-container",LINK:".terms-and-conditions-link",ACCEPT:"#accept-terms-and-conditions",ACCEPT_LABEL:".accept-terms-and-conditions-label",HEADING:".terms-heading",BODY:".terms-body",CLOSE:"#terms-and-conditions-close"},GAME_CONTAINER:".game-container"},CLASSES:{HIDDEN:"hidden",GAME_STARTED:"game-started",GAME_ERROR:"game-error",GAME_ENGINE_STARTED:"game-engine-started",FULL_SCREEN_ON:"full-screen-on"},MESSAGE:{DATA_VALUES:{NAMESPACE:"game"}},LABELS:{YES:"Yes",NO:"No"},ANIMATIONS_TYPE:{SPRITESHEET:"spritesheet"},FILES:{EXTENSIONS:{PNG:".png"}},GRAPHICS:{FRAME_WIDTH:32,FRAME_HEIGHT:32},SHOW_PLAYER_TIME:{NONE:-1,ONLY_OWN_PLAYER:0,ALL_PLAYERS:2}}},{}],"3lwy5":[function(e,t,i){let n=e("a4ab2983c9d35fd8");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("1695e46110f15942"),InteractionArea:e("8fd16851c34338c4"),SchemaValidator:e("adcc322a4503ef19"),Logger:e("a5fec30b90d89350"),sc:e("859c680ee2b5bef8")}},{a4ab2983c9d35fd8:"faFOz","1695e46110f15942":"ijj7O","8fd16851c34338c4":"hLS4d",adcc322a4503ef19:"5l910",a5fec30b90d89350:"lJWkj","859c680ee2b5bef8":"2vvao"}],faFOz:[function(e,t,i){let n=e("7cdb1283b540f52c").default,r=e("53a92d7fd4d1ab5e"),s=e("fb3dac7fa90fc435");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"7cdb1283b540f52c":"46bZC","53a92d7fd4d1ab5e":"lJWkj",fb3dac7fa90fc435:"2vvao"}],"46bZC":[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);let n=e("e8bdbc586c5c4645"),r="function"==typeof Symbol?Symbol.for("--[[await-event-emitter]]--"):"--[[await-event-emitter]]--";function s(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("type is not type of string or symbol!")}function a(e){if("function"!=typeof e)throw TypeError("fn is not type of Function!")}function o(e){return{[r]:"always",fn:e}}function h(e){return{[r]:"once",fn:e}}i.default=class{constructor(){this._events={}}addListener(e,t){return this.on(e,t)}on(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(o(t)),this}prependListener(e,t){return this.prepend(e,t)}prepend(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(o(t)),this}prependOnceListener(e,t){return this.prependOnce(e,t)}prependOnce(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(h(t)),this}listeners(e){return(this._events[e]||[]).map(e=>e.fn)}once(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(h(t)),this}removeAllListeners(){this._events={}}off(e,t){return this.removeListener(e,t)}removeListener(e,t){s(e);let i=this.listeners(e);if("function"!=typeof t)return delete this._events[e];{let n=-1,r=!1;for(;(n=i.indexOf(t))>=0;)i.splice(n,1),this._events[e].splice(n,1),r=!0;return r}}emit(e,...t){var i,a,o,h;return i=this,a=void 0,o=void 0,h=function*(){s(e);let i=this.listeners(e),a=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1},new(o||(o=Promise))(function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function r(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):((i=t.value)instanceof o?i:new o(function(e){e(i)})).then(n,r)}s((h=h.apply(i,a||[])).next())})}emitSync(e,...t){s(e);let i=this.listeners(e),n=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1}}},{e8bdbc586c5c4645:"kaCjt","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],kaCjt:[function(e,t,i){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n},{}],"2SoND":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}],lJWkj:[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"2vvao":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t{this.clearTarget()}),this.eventsManager.on("reldens.beforeSceneDynamicCreate",e=>{this.setupTabTarget(e)})}parseTemplate(e,t,i,n){return this.TemplateEngine.render(e,t,i,n)}updateGameSize(e){let{newWidth:t,newHeight:i}=this.getCurrentScreenSize(e);setTimeout(()=>{for(let e of(this.eventsManager.emit("reldens.updateGameSizeBefore",this,t,i),this.scale.setGameSize(t,i),Object.keys(this.uiScene.elementsUi))){let n=this.uiScene.elementsUi[e],r=l.get(this.uiScene.userInterfaces[e],"uiPositionKey",e),{uiX:s,uiY:a}=this.uiScene.getUiConfig(r,t,i);n.x=s,n.y=a}this.eventsManager.emit("reldens.updateGameSizeAfter",this,t,i)},e.config.getWithoutLogs("client/general/gameEngine/updateGameSizeTimeOut",500))}getCurrentScreenSize(e){let t=e.gameDom.getElement(".game-container").offsetWidth,i=e.gameDom.getElement(".game-container").offsetHeight,n=t,r=i,s=e.getActiveScene();return s&&s.map&&(n=Math.min(t,s.map.width*s.map.tileWidth),r=Math.min(i,s.map.height*s.map.tileHeight)),{newWidth:n=Math.min(n,Number(e.config.get("client/ui/maximum/x"))),newHeight:r=Math.min(r,Number(e.config.get("client/ui/maximum/y")))}}showTarget(e,t,i){l.hasOwn(this.uiScene,"uiTarget")&&(this.uiScene.uiTarget.getChildByID("box-target").style.display="block",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=this.targetDisplay(e,t)),this.eventsManager.emit("reldens.gameEngineShowTarget",this,t,i,e)}targetDisplay(e,t){let i=e;return o.TYPE_PLAYER===t.type&&(i+=this.generateTargetPlayedTime(t)),i}generateTargetPlayedTime(e){let t="",i=this.uiScene.gameManager.config.getWithoutLogs("client/players/playedTime/show",o.SHOW_PLAYER_TIME.ONLY_OWN_PLAYER);if(o.SHOW_PLAYER_TIME.NONE===i)return t;let n=this.uiScene.gameManager.getCurrentPlayer();if(o.SHOW_PLAYER_TIME.ALL_PLAYERS===i||n.playerId===e.id){let i=this.obtainPlayedTime(e,n);t+=this.createPlayedTimeLabel(i)}return t}createPlayedTimeLabel(e){let t=this.uiScene.gameManager.gameDom.createElement("p");return t.innerHTML=this.uiScene.gameManager.config.get("client/players/playedTime/label").replace("%playedTimeInHs",e),t.outerHTML}obtainPlayedTime(e,t){return(t.players[e.id].playedTime/60/60).toFixed(1)}clearTarget(){let e=this.uiScene.gameManager.activeRoomEvents.getActiveScene(),t=Object.assign({},e.player.currentTarget);l.hasOwn(this.uiScene,"uiTarget")&&(e.player.currentTarget=!1,this.uiScene.uiTarget.getChildByID("box-target").style.display="none",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=""),this.eventsManager.emit("reldens.gameEngineClearTarget",this,t)}setupTabTarget(e){e.keyTab=e.input.keyboard.addKey(s.Keyboard.KeyCodes.TAB),e.input.keyboard.addCapture(s.Keyboard.KeyCodes.TAB),e.input.keyboard.on("keydown",e=>{9===e.keyCode&&this.tabTarget()})}tabTarget(){let e=this.uiScene.gameManager.getCurrentPlayer(),t=this.uiScene.gameManager.getActiveScene().objectsAnimations,i=e.players,n=!1,r="",s=!!e.currentTarget&&Object.assign({},e.currentTarget);for(let i of Object.keys(t)){if(!t[i].targetName)continue;let s=Math.hypot(t[i].x-e.state.x,t[i].y-e.state.y);e.currentTarget.id!==t[i].key&&(!n||n.dist>s)&&(n={id:t[i].key,type:h.TYPE_OBJECT,dist:s},r=t[i].targetName)}for(let t of Object.keys(i)){if(e.playerName===i[t].playerName)continue;let s=Math.hypot(i[t].x-e.state.x,i[t].y-e.state.y);e.currentTarget.id!==i[t].id&&(!n||n.dist>s)&&(n={id:t,type:o.TYPE_PLAYER,dist:s},r=i[t].playerName)}e.currentTarget=n,this.showTarget(r,n,s),this.eventsManager.emit("reldens.gameEngineTabTarget",this,n,s)}showFPS(){this.fpsCounter=new a(this.uiScene.gameManager.gameDom),this.fpsCounter.start()}}},{ba5852f7a848a882:"kOY07",de87093dc78fab7a:"8S6DV",cb52d956827ba0f7:"e7OdC",ef9f208014f49bfb:"93TbC","74f28c3d4fc67c29":"izuLV","2aadc4f845e0da5b":"3lwy5"}],kOY07:[function(e,t,i){var n;n=function(){/*! +!function(e,t,i,n,r){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],o=a.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!o[t]){if(!e[t]){var r="function"==typeof s[n]&&s[n];if(!i&&r)return r(t,!0);if(a)return a(t,!0);if(h&&"string"==typeof t)return h(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return o[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=a,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return s[n]}}),s[n]=c;for(var l=0;l{s.clientStart()}),s.events.on("reldens.afterInitEngineAndStartGame",()=>{s.gameDom.getElement("#current-version").innerHTML=s.config.client.gameEngine.version+" -"}),s.events.on("reldens.startGameAfter",()=>{s.gameDom.getElement(".row-disclaimer")?.remove()}),s.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{if("rski.Bc"!==e.act)return;let t=(e.data?.skillKey||"").toString(),i=Number(e.data?.extraData?.sd||0);if(""!==t&&0=r){e.style.setProperty("--angle","360deg"),e.classList.remove("cooldown");return}e.style.setProperty("--angle",`${(i-r)/i*360}deg`),requestAnimationFrame(t)}()}})}),window.reldens=s},{f6a573e6a894b077:"blTPb","22d25a4cea3c3bc":"7ASKi"}],blTPb:[function(e,t,i){e("684699bf663c3eb9"),e("8524ab6b767fe50d");let{GameManager:n}=e("163628b93f1bf46b");t.exports.GameManager=n},{"684699bf663c3eb9":"6H8Vf","8524ab6b767fe50d":"ikKUq","163628b93f1bf46b":"eDoZE"}],"6H8Vf":[function(e,t,i){e("1784995cff40f4ee"),e("3db84f65815009e9"),e("eaee9f5716583d73"),e("375d8cdc37856052"),e("b97ac47c987ae87a"),e("a021542673f3dca5"),e("4917cb57871d338e"),e("32b253e39e74d8bb"),e("389e51d5714f687f"),e("f5e993e561fd02cd"),e("bb2bc4d4414bdde6"),e("efe695102c445413"),e("ccd56f09b115e545"),e("fcaf4e6617f043bc"),e("653d106c82dca6c3"),e("e3cead5be66b9f0d"),e("f0a4c78fa0016f60"),e("1d68ebee0b3f96f0"),e("af40359e9eb052ec"),e("b57c55c586369faa"),e("6e929cb8fa33300f"),e("a021c9c924d06b99"),e("c3a2ae3c387d24da"),e("4b806e1bc40e42a5"),e("4e1bbb4edd22e0ae"),e("716f90fa84e1f77c"),e("a4c895062bc52ef"),e("ab8b1e642f069677"),e("1c9c9c4583180611"),e("f74bd522ba638140"),e("161807fa85856503"),e("f48a3c099ac8e2b5"),e("8cf2e5f73ade81b4"),e("a9422cf3f5275913"),e("cc95b5c4842b3cba"),e("d5f0f9adde262121"),e("c2de5cf351f42e3e"),e("9b044f9dbdd9a543"),e("2c6c7828d3cbd4f7"),e("e4df5de4d418cbbb"),e("914cd91ef0bfb6f9"),e("6f128d6969e825b2"),e("f4ead5d4eb2af5d5"),e("b35e2d13cb589276"),e("c410e1b69fdd7adf"),e("312dd5f9138d6e43"),e("38530968f16263a0"),e("14af908df009beac"),e("dcd91f07678eb4c9"),e("c69d702ec59c2500"),e("4725bcb6f24869b3"),e("3cf52eabf83551bf"),e("c9cbfc3b3c78d70d"),e("6b0227180c3df38c"),e("e0fd70d02f07a4a0"),e("31a608e674c817eb"),e("b880a9dbebb02a2e"),e("46b1ee4ddc311f0"),e("8cf2fe9261c818db"),e("52fba706500b4b2d"),e("ffbe65a8f5be01e6"),e("e1e627d3acaf8d18"),e("f4d9392585892a5b"),e("b04a1a032c30e8d5"),e("c1de8697c29b0da"),e("16d0f8a09ff973a0"),e("a48b7fc982febaf8"),e("b40fbc8703ed802d"),e("71533dcee95bced0"),e("38d8d405ad51cb0c"),e("c8503c219bf01ed1"),e("bc082cafa79546ad"),e("204a0882af55ce2b"),e("a3152d34d8dd7b45"),e("873b1b5c61bcd33"),e("16d6ef4f50e3e6e9"),e("e872f08087c6cb33"),e("657cbbcd48650779"),e("4252d65d3677af5a"),e("281c6fd1d9df7324"),e("c31154b4d54b87f"),e("610034140e218c33"),e("1bc59f7bc4d02b94"),e("1ac49ff73550904e"),e("8fd22c15c1dc3fdb"),e("722244e22d484cd4"),e("d7ec35bad14a1f3f"),e("9bb45158b3bb60e5"),e("dbfda47097dcdc05"),e("62df99a6374ea8e7"),e("30f5c44d5b0c5882"),e("fa34aad1a54cb74f"),e("6e7dfd5f426811ae"),e("f6587d23159bb2e"),e("bb688511262fa331"),e("4ba8f97c77fe72fb"),e("d400d9af20e5e158"),e("89eb5ddf4e423e14"),e("cfeb658fb1129c7d"),e("cf52518d7e23221c"),e("593d4e7884fc0918"),e("30b35f30b6dba51d"),e("24519596b23105e8"),e("69b53c2db51c07c6"),e("cd51cbb6a384e947"),e("b2bec95e117c35ff"),e("e02033538de8d8c6"),e("bb0f24f71db75179"),e("7334e4338273fd72"),e("a00519108abb0534"),e("2835a3239b6a1bc4"),e("f5faf41ae9cf1c5"),e("5e6fa649046f5df2"),e("84775698f8fef6c0"),e("8c2455e35e11d959"),e("1cee7874e0ff2b2b"),e("6d098447a1b2abdc"),e("7d7d81ff5b818a49"),e("c33461c993e8e491"),e("64a89b8cfcf7ab12"),e("300ca7e5c4ba71de"),e("5ea06ea856112f5d"),e("2f95ea182a42efc3"),e("7e00e0c0121e6a90"),e("43c70c31a61cc402"),e("7f64762e2c0d0f2e"),e("7a6c9bba2845dabe"),e("73d9d26ef5a08f08"),e("f671014547fe0e5e"),e("b36c3c3b6e78e925"),e("a7f5dbf9fb623d0a"),e("465fceaf1bde589b"),e("7766539bc795a94"),e("4faee6716fa8629d"),e("7737fbcafb7ce523"),e("e90b0a3a493c0ede"),e("26317a793dea7e9a"),e("9f5e020a3549a118"),e("9d0bfe01231db1a7"),e("b1221eae0bc5f9b"),e("c5352c47687ac7c"),e("34fe45ae8ed17da0"),e("781c619e0cad12e2"),e("7c6b58bad8dc3b81"),e("736ca46bafb50f8f"),e("4a8b2b3ca7e4d0f0"),e("3fd33a4a9e23fb29"),e("88ad2704384a1a6e"),e("1c6c6da898bf18bb"),e("d239d0cd4a8ca65b"),e("11eae3d8cd132ecd"),e("31d0c33ce951164f"),e("55fc79bd0e9015ff"),e("4c7f59100f9f15df"),e("45eab59e8e26538d"),e("46220f971d58285"),e("37e3f8df977640b7"),e("4449d13eae7996a8"),e("197d7cc5dd2340b0"),e("1ec03223143b45c0"),e("b3160300f21af751"),e("efbae5e5ed53d7a4"),e("78d707d60e5ff2ef"),e("6aa1c963ba0fa26a"),e("29093847653ffb17"),e("b0554b151edd2f4"),e("c5299b37711c29ed"),e("334e6eea450261d0"),e("12c4df9fff4b4031"),e("9121fee042bcac7e"),e("5d62685ef5ad6e57"),e("3e4b4c735ca60ab9"),e("bb7017f5a1be1e59"),e("e8e708482f11c7ff"),e("74095422c65e093c"),e("6d6ea5c3920f0ba9"),e("3447041b04906440"),e("90c4a005313bad84"),e("4769b7aec07e6de3"),e("925b64021990cd94"),e("6b93322692746037"),e("faa76facff418618"),e("c9933e8bbe42bd93"),e("8689abb82cc2e305"),e("2b087e045ed8c999"),e("5345958572918685"),e("3be5275c466b41f8"),e("8aac76b9f2cbbdb5"),e("be9c14095a58943"),e("43202def26bf6f4d"),e("2d80f533903ef8af"),e("218de58a047e4122"),e("e9c3dc5d87196314"),e("e941f90445a42817"),e("5ec6c25f739e2e3"),e("dcf33a0bfc9dbd80"),e("11e994014f9ea4ef"),e("d3d2c1ecea6b651e"),e("2942bfa075e0734"),e("d33b293dd98ee251"),e("4d67970b1d16e278"),e("ea23a5ff87e419a"),e("a4ec7d06d49f6770"),e("68de4d9a4e90a51d"),e("91a33ef14a8f152c"),e("55178304aaa34b5d"),e("100585ac292d4d0a"),e("11bb9bd5ef85c385"),e("6985fc4c13b8c019"),e("9632a736fdb17734"),e("645f58b86974fd27"),e("679ce5136028bc60"),e("16129f94bb5d1db1"),e("4a20575877b9aa9"),e("f493cf27dec8fda2"),e("9455107212c82097"),e("7abb352823d027e3"),e("23cd38aa92bb5713"),e("7fa171f672c06c5"),e("d6c3f6742b067ddd"),e("687e66ea18227d4f"),e("4be9f7f33ab31972"),e("4b97ceec572fb5ac"),e("6962fb765acff151"),e("1a45d71179cc6824"),e("546ab40a97e46161"),e("b9d67d5f8399a961"),e("4d6a7c1e95ef8439"),e("61fca23ef75aa33f"),e("1c1cdf9b06016701"),e("397bfa6741ea05a1"),e("ec6da7c8737ed287"),e("9a3b23b9904e7580"),e("42c1ca9f44d09740"),e("6c230af164d5e531"),e("a1fd07c504fbd6e2"),e("c5418e31406f900c"),e("6bd1db6cc401cbae"),e("5cc85e0e2e9dc320"),e("e50d5b519a148fce"),e("57eafc4eec0ed5ad"),e("9f4e766b833041e1"),e("51d5ec10d288761f"),e("3df881631b0076c1"),e("6446691a409777d1"),e("65a0e8ac0e64097a"),e("ad09ac1fd0978c3"),e("c80f8d7a3d38c630"),e("c0e2fa2805edb141"),e("52fea7a5cc5e8460"),e("676052465cde8b83"),e("46e3f0ef3febe378"),e("901f94f4ed6ef4d5"),e("2f2afc7fe70ef5f"),e("fa4d7e950018d69e"),e("d0d844c58571e80e"),e("570e34e061eaecd7"),e("557af6dc34fe070e"),e("5dd137372fb5b1ae"),e("812633ee0adaf5e"),e("5be5bf591a25d61c"),e("c98746bc7e199094"),e("52278c0a5be7b19f"),e("fde31c759e8e1c42"),e("5254289c25b91dcf"),e("48ca9e9993ba0327"),e("72aac35e49a6d4bd"),e("37312397abe6d28c"),e("12be35b2aeed3ca4"),e("647a7c082cca257b"),e("a0e00f30db9559ea"),e("6c3ebd0eef294356"),e("a66668b79822160a"),e("72aa7e00c8a7b68f"),e("b1d489d5f98dd626"),e("687c365e52ca4b5b"),e("eedef7a537267c12"),e("f888c4da93185eae"),e("69fc7ceed4f23a4b"),e("a70b9f7f981f56ed"),e("698834137971c6a0"),e("6cbcff253173613e"),e("2d4e83632877e8a1"),e("1f6030e01de03bb8"),e("9e73dc5e3d85a023"),e("d24e5da7655d31c6"),e("e2c547d0925efa21"),e("9cb64708d269ee4d"),e("bad110743800027a"),t.exports=e("b02006442da3179e")},{"1784995cff40f4ee":"emAqF","3db84f65815009e9":"h8vRJ",eaee9f5716583d73:"1JQKT","375d8cdc37856052":"58q3y",b97ac47c987ae87a:"5NvUG",a021542673f3dca5:"lG7CT","4917cb57871d338e":"507Fo","32b253e39e74d8bb":"8PIx1","389e51d5714f687f":"a2cUC",f5e993e561fd02cd:"1yLDd",bb2bc4d4414bdde6:"9Ujdq",efe695102c445413:"45PgI",ccd56f09b115e545:"bJ9qS",fcaf4e6617f043bc:"3tmT4","653d106c82dca6c3":"lbpGg",e3cead5be66b9f0d:"hHHDm",f0a4c78fa0016f60:"aSTrG","1d68ebee0b3f96f0":"8nyV3",af40359e9eb052ec:"j1ABh",b57c55c586369faa:"3LJSA","6e929cb8fa33300f":"jYNHr",a021c9c924d06b99:"9D9sM",c3a2ae3c387d24da:"c1k6c","4b806e1bc40e42a5":"lbPxO","4e1bbb4edd22e0ae":"jKklH","716f90fa84e1f77c":"lMNyP",a4c895062bc52ef:"hPNfA",ab8b1e642f069677:"fURyF","1c9c9c4583180611":"6XyUS",f74bd522ba638140:"d83iu","161807fa85856503":"lc4NN",f48a3c099ac8e2b5:"gjqcj","8cf2e5f73ade81b4":"j3v3L",a9422cf3f5275913:"3rrfH",cc95b5c4842b3cba:"b10MD",d5f0f9adde262121:"2JgXG",c2de5cf351f42e3e:"3prNk","9b044f9dbdd9a543":"le1uL","2c6c7828d3cbd4f7":"eli4M",e4df5de4d418cbbb:"zkrYn","914cd91ef0bfb6f9":"6cM5k","6f128d6969e825b2":"j9q44",f4ead5d4eb2af5d5:"k2yB7",b35e2d13cb589276:"YvN4R",c410e1b69fdd7adf:"eqr1I","312dd5f9138d6e43":"gW4UQ","38530968f16263a0":"joaAA","14af908df009beac":"g2wAi",dcd91f07678eb4c9:"iJYnd",c69d702ec59c2500:"dnmIv","4725bcb6f24869b3":"i9xty","3cf52eabf83551bf":"iGG3n",c9cbfc3b3c78d70d:"iJJcs","6b0227180c3df38c":"afcZD",e0fd70d02f07a4a0:"dpjAZ","31a608e674c817eb":"dI1Cn",b880a9dbebb02a2e:"4XBJJ","46b1ee4ddc311f0":"4u8Zq","8cf2fe9261c818db":"9DwR1","52fba706500b4b2d":"hihCW",ffbe65a8f5be01e6:"cl0wd",e1e627d3acaf8d18:"kDbyn",f4d9392585892a5b:"v0oet",b04a1a032c30e8d5:"ilodQ",c1de8697c29b0da:"3sjfy","16d0f8a09ff973a0":"aJQbh",a48b7fc982febaf8:"cl2UC",b40fbc8703ed802d:"l89H5","71533dcee95bced0":"cHGz3","38d8d405ad51cb0c":"6OeqH",c8503c219bf01ed1:"j16TA",bc082cafa79546ad:"ltluo","204a0882af55ce2b":"l0eoZ",a3152d34d8dd7b45:"40OpE","873b1b5c61bcd33":"bC9Ow","16d6ef4f50e3e6e9":"dHKDg",e872f08087c6cb33:"giNSP","657cbbcd48650779":"1HJ0t","4252d65d3677af5a":"gfJCq","281c6fd1d9df7324":"2vgpU",c31154b4d54b87f:"aan7W","610034140e218c33":"h9LbS","1bc59f7bc4d02b94":"ldCGF","1ac49ff73550904e":"6gXbc","8fd22c15c1dc3fdb":"7deV1","722244e22d484cd4":"inQWU",d7ec35bad14a1f3f:"2qLeT","9bb45158b3bb60e5":"c3ILr",dbfda47097dcdc05:"223lQ","62df99a6374ea8e7":"f8Q6z","30f5c44d5b0c5882":"fKGrW",fa34aad1a54cb74f:"7o3jD","6e7dfd5f426811ae":"hXIP7",f6587d23159bb2e:"1aJqY",bb688511262fa331:"DQpS3","4ba8f97c77fe72fb":"9m0ga",d400d9af20e5e158:"6OW8r","89eb5ddf4e423e14":"8Ipne",cfeb658fb1129c7d:"bbe5P",cf52518d7e23221c:"giuXg","593d4e7884fc0918":"4Dfiq","30b35f30b6dba51d":"cIxH8","24519596b23105e8":"khz6l","69b53c2db51c07c6":"flBRC",cd51cbb6a384e947:"OdIjN",b2bec95e117c35ff:"5N41O",e02033538de8d8c6:"gqwBy",bb0f24f71db75179:"cjDQT","7334e4338273fd72":"hjxfV",a00519108abb0534:"lGEJr","2835a3239b6a1bc4":"8Egu9",f5faf41ae9cf1c5:"jWST5","5e6fa649046f5df2":"hrnKP","84775698f8fef6c0":"aXsIP","8c2455e35e11d959":"lsaNY","1cee7874e0ff2b2b":"8eW4I","6d098447a1b2abdc":"h5WTU","7d7d81ff5b818a49":"glrUF",c33461c993e8e491:"91CVe","64a89b8cfcf7ab12":"5JCvB","300ca7e5c4ba71de":"1UYJO","5ea06ea856112f5d":"966g1","2f95ea182a42efc3":"2u6nF","7e00e0c0121e6a90":"3Zya8","43c70c31a61cc402":"kEs9R","7f64762e2c0d0f2e":"czjHQ","7a6c9bba2845dabe":"9DWg9","73d9d26ef5a08f08":"8uazT",f671014547fe0e5e:"dLOib",b36c3c3b6e78e925:"bVBB2",a7f5dbf9fb623d0a:"9laFo","465fceaf1bde589b":"1E3wB","7766539bc795a94":"cCotT","4faee6716fa8629d":"htZZS","7737fbcafb7ce523":"b3JIq",e90b0a3a493c0ede:"kPfIJ","26317a793dea7e9a":"9ERxS","9f5e020a3549a118":"6T09z","9d0bfe01231db1a7":"nZQfS",b1221eae0bc5f9b:"6GBQI",c5352c47687ac7c:"g4f9X","34fe45ae8ed17da0":"eNC2R","781c619e0cad12e2":"czmee","7c6b58bad8dc3b81":"96RAZ","736ca46bafb50f8f":"3SReg","4a8b2b3ca7e4d0f0":"dOXap","3fd33a4a9e23fb29":"evHBo","88ad2704384a1a6e":"liWu9","1c6c6da898bf18bb":"a2AOJ",d239d0cd4a8ca65b:"yqtQx","11eae3d8cd132ecd":"4M7RG","31d0c33ce951164f":"7ybM1","55fc79bd0e9015ff":"csFkS","4c7f59100f9f15df":"6V0HA","45eab59e8e26538d":"26fdt","46220f971d58285":"8nI8r","37e3f8df977640b7":"dPzjA","4449d13eae7996a8":"50y6Q","197d7cc5dd2340b0":"cv1IN","1ec03223143b45c0":"g4HyM",b3160300f21af751:"fDjj9",efbae5e5ed53d7a4:"dejPc","78d707d60e5ff2ef":"kL7gw","6aa1c963ba0fa26a":"lQsQz","29093847653ffb17":"jy0xe",b0554b151edd2f4:"N0A9g",c5299b37711c29ed:"bnSd3","334e6eea450261d0":"hCLFJ","12c4df9fff4b4031":"jFiZs","9121fee042bcac7e":"1BYUa","5d62685ef5ad6e57":"3gYE0","3e4b4c735ca60ab9":"8Ariw",bb7017f5a1be1e59:"fpMBl",e8e708482f11c7ff:"5tIGd","74095422c65e093c":"14MkC","6d6ea5c3920f0ba9":"2JQK3","3447041b04906440":"9radj","90c4a005313bad84":"4cips","4769b7aec07e6de3":"eNQOe","925b64021990cd94":"5K8rr","6b93322692746037":"kdtyD",faa76facff418618:"aGaAQ",c9933e8bbe42bd93:"4l0Mz","8689abb82cc2e305":"1W6O8","2b087e045ed8c999":"iIMfF","5345958572918685":"ebh58","3be5275c466b41f8":"5aq0U","8aac76b9f2cbbdb5":"8hV4V",be9c14095a58943:"aU3RB","43202def26bf6f4d":"9kNJt","2d80f533903ef8af":"if1fM","218de58a047e4122":"g0fSy",e9c3dc5d87196314:"eKkbH",e941f90445a42817:"dLJLG","5ec6c25f739e2e3":"cDQpr",dcf33a0bfc9dbd80:"kFTda","11e994014f9ea4ef":"i2qFG",d3d2c1ecea6b651e:"6dNpA","2942bfa075e0734":"5JfZw",d33b293dd98ee251:"fU7MD","4d67970b1d16e278":"iz82g",ea23a5ff87e419a:"5PH9s",a4ec7d06d49f6770:"f2AVd","68de4d9a4e90a51d":"j2dUp","91a33ef14a8f152c":"2HEOd","55178304aaa34b5d":"4kyL0","100585ac292d4d0a":"fx5cJ","11bb9bd5ef85c385":"9GM5b","6985fc4c13b8c019":"ilZVq","9632a736fdb17734":"hUcmJ","645f58b86974fd27":"l2p2s","679ce5136028bc60":"3o3Gk","16129f94bb5d1db1":"4Lt39","4a20575877b9aa9":"3qZNd",f493cf27dec8fda2:"20tl2","9455107212c82097":"ahutJ","7abb352823d027e3":"f2UI4","23cd38aa92bb5713":"4XIfF","7fa171f672c06c5":"l1rs2",d6c3f6742b067ddd:"adYvn","687e66ea18227d4f":"gidCX","4be9f7f33ab31972":"bv1yh","4b97ceec572fb5ac":"kO1Zg","6962fb765acff151":"bgZU7","1a45d71179cc6824":"jgQND","546ab40a97e46161":"hB11V",b9d67d5f8399a961:"31EdS","4d6a7c1e95ef8439":"5PjpG","61fca23ef75aa33f":"fxnuD","1c1cdf9b06016701":"6jDOT","397bfa6741ea05a1":"gG1e8",ec6da7c8737ed287:"17kvf","9a3b23b9904e7580":"9B0y9","42c1ca9f44d09740":"3kbwg","6c230af164d5e531":"5wzd5",a1fd07c504fbd6e2:"1dCBn",c5418e31406f900c:"2Mqsz","6bd1db6cc401cbae":"eZZyP","5cc85e0e2e9dc320":"go8ZW",e50d5b519a148fce:"iCErC","57eafc4eec0ed5ad":"e8hfX","9f4e766b833041e1":"2kMmr","51d5ec10d288761f":"212MV","3df881631b0076c1":"9AC43","6446691a409777d1":"aqoug","65a0e8ac0e64097a":"iuJoY",ad09ac1fd0978c3:"czX8g",c80f8d7a3d38c630:"9XxKn",c0e2fa2805edb141:"7aRDd","52fea7a5cc5e8460":"k5Rlo","676052465cde8b83":"f3FBF","46e3f0ef3febe378":"4ZhIs","901f94f4ed6ef4d5":"9uG4h","2f2afc7fe70ef5f":"ccgrY",fa4d7e950018d69e:"dESGS",d0d844c58571e80e:"7G7OX","570e34e061eaecd7":"lGF1i","557af6dc34fe070e":"6biAe","5dd137372fb5b1ae":"8qlqb","812633ee0adaf5e":"lGQwY","5be5bf591a25d61c":"5EgJz",c98746bc7e199094:"hUSBX","52278c0a5be7b19f":"bN7du",fde31c759e8e1c42:"accWj","5254289c25b91dcf":"8zMXu","48ca9e9993ba0327":"bwjPE","72aac35e49a6d4bd":"4AZtq","37312397abe6d28c":"8EnX5","12be35b2aeed3ca4":"4Puey","647a7c082cca257b":"jxrdF",a0e00f30db9559ea:"jwPXF","6c3ebd0eef294356":"khTY5",a66668b79822160a:"a2DYE","72aa7e00c8a7b68f":"6bhjG",b1d489d5f98dd626:"fJnNi","687c365e52ca4b5b":"4teOf",eedef7a537267c12:"lCP8o",f888c4da93185eae:"1mZsz","69fc7ceed4f23a4b":"f5KUv",a70b9f7f981f56ed:"kONpx","698834137971c6a0":"h5L1l","6cbcff253173613e":"4J9Kt","2d4e83632877e8a1":"6WXZj","1f6030e01de03bb8":"jUFLb","9e73dc5e3d85a023":"fisJQ",d24e5da7655d31c6:"drhch",e2c547d0925efa21:"k5k9P","9cb64708d269ee4d":"eZzIO",bad110743800027a:"RkUgQ",b02006442da3179e:"iwjHr"}],emAqF:[function(e,t,i){e("9907e25c4a0aca96"),e("6ca7b218a3c5142b"),e("733763f50161f4ff"),e("c7e8ec39e8a501c2"),e("c7f11a8d456724")},{"9907e25c4a0aca96":"jpVKZ","6ca7b218a3c5142b":"epSXE","733763f50161f4ff":"k89ua",c7e8ec39e8a501c2:"fKGrW",c7f11a8d456724:"dZVa2"}],jpVKZ:[function(e,t,i){var n=e("aa5b0a4df7071e1c"),r=e("8c408afdfdfd6dab"),s=e("ec29447784c0114a"),a=e("2ae82c68e0ae40f"),o=e("33b2452838c11281"),h=e("fe806d898b4ac536"),c=e("22d83c4d1a79086a"),l=e("4d2b1c3a38702ef3"),u=e("e759feb93fde3dec"),d=e("5787c74359c86565"),f=e("cb32a2177bbbabaa"),p=e("20c01e2a38c99bca"),g=e("db20fe52e48e74e7"),m=e("62c50d67351dd58a"),v=e("22cebb6457d12409"),y=e("31dc62cd3a5d2fda"),b=e("14509c82c4f3e2e9"),x=e("e62ee144604e88fa"),E=e("d7fe574b8ddea4e9"),w=e("fc2b88a87581c564"),T=e("7260979738a18766"),S=e("c58a10205146713c"),A=e("a86b1c2861165466"),C=e("dfca683f72250bcc"),_=e("55a26bb040d83918"),I=e("97712bd669b06ccf"),O=e("b2130786c0cb0f80"),P=e("aaac558287b5aa94"),M=e("c6ea7d7218c4c1f0"),R=e("f4a251fc6a0ec32a"),L=e("2d3c3a8ae405672f"),D=e("a99e55c559023f8b"),k=e("baa63ea979fa51ca"),N=e("ecef47c4fbdd606b"),F=e("f57a8c7fd7d84ffb"),B=e("37236ad9fe95a3e"),U=e("c50230ad6eef7275").forEach,V=P("hidden"),G="Symbol",j="prototype",W=B.set,Y=B.getterFor(G),H=Object[j],z=r.Symbol,X=z&&z[j],K=r.RangeError,q=r.TypeError,J=r.QObject,$=T.f,Q=S.f,Z=E.f,ee=C.f,et=a([].push),ei=O("symbols"),en=O("op-symbols"),er=O("wks"),es=!J||!J[j]||!J[j].findChild,ea=function(e,t,i){var n=$(H,t);n&&delete H[t],Q(e,t,i),n&&e!==H&&Q(H,t,n)},eo=h&&l(function(){return 7!==y(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?ea:Q,eh=function(e,t){var i=ei[e]=y(X);return W(i,{type:G,tag:e,description:t}),h||(i.description=t),i},ec=function(e,t,i){e===H&&ec(en,t,i),f(e);var n=g(t);return(f(i),u(ei,n))?(i.enumerable?(u(e,V)&&e[V][n]&&(e[V][n]=!1),i=y(i,{enumerable:v(0,!1)})):(u(e,V)||Q(e,V,v(1,y(null))),e[V][n]=!0),eo(e,n,i)):Q(e,n,i)},el=function(e,t){f(e);var i=p(t);return U(b(i).concat(ep(i)),function(t){(!h||s(eu,i,t))&&ec(e,t,i[t])}),e},eu=function(e){var t=g(e),i=s(ee,this,t);return(!(this===H&&u(ei,t))||!!u(en,t))&&(!(i||!u(this,t)||!u(ei,t)||u(this,V)&&this[V][t])||i)},ed=function(e,t){var i=p(e),n=g(t);if(!(i===H&&u(ei,n))||u(en,n)){var r=$(i,n);return r&&u(ei,n)&&!(u(i,V)&&i[V][n])&&(r.enumerable=!0),r}},ef=function(e){var t=Z(p(e)),i=[];return U(t,function(e){u(ei,e)||u(M,e)||et(i,e)}),i},ep=function(e){var t=e===H,i=Z(t?en:p(e)),n=[];return U(i,function(e){u(ei,e)&&(!t||u(H,e))&&et(n,ei[e])}),n};c||(_(X=(z=function(){if(d(X,this))throw new q("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=R(e),i=function(e){var n=void 0===this?r:this;n===H&&s(i,en,e),u(n,V)&&u(n[V],t)&&(n[V][t]=!1);var a=v(1,e);try{eo(n,t,a)}catch(e){if(!(e instanceof K))throw e;ea(n,t,a)}};return h&&es&&eo(H,t,{configurable:!0,set:i}),eh(t,e)})[j],"toString",function(){return Y(this).tag}),_(z,"withoutSetter",function(e){return eh(R(e),e)}),C.f=eu,S.f=ec,A.f=el,T.f=ed,x.f=E.f=ef,w.f=ep,D.f=function(e){return eh(L(e),e)},h&&(I(X,"description",{configurable:!0,get:function(){return Y(this).description}}),o||_(H,"propertyIsEnumerable",eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),U(b(er),function(e){k(e)}),n({target:G,stat:!0,forced:!c},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!h},{create:function(e,t){return void 0===t?y(e):el(y(e),t)},defineProperty:ec,defineProperties:el,getOwnPropertyDescriptor:ed}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ef}),N(),F(z,G),M[V]=!0},{aa5b0a4df7071e1c:"gJg5v","8c408afdfdfd6dab":"7Z171",ec29447784c0114a:"bOssl","2ae82c68e0ae40f":"2iJ57","33b2452838c11281":"jHRGA",fe806d898b4ac536:"6mXK1","22d83c4d1a79086a":"kkRwC","4d2b1c3a38702ef3":"cXVrS",e759feb93fde3dec:"9JWVX","5787c74359c86565":"d5bNd",cb32a2177bbbabaa:"dPzbI","20c01e2a38c99bca":"h9ut0",db20fe52e48e74e7:"gvuJs","62c50d67351dd58a":"4x6uB","22cebb6457d12409":"5toj2","31dc62cd3a5d2fda":"7isQ3","14509c82c4f3e2e9":"kQgZQ",e62ee144604e88fa:"dDV3S",d7fe574b8ddea4e9:"bBGHM",fc2b88a87581c564:"f3eHQ","7260979738a18766":"aRu9T",c58a10205146713c:"hvqCQ",a86b1c2861165466:"ePigI",dfca683f72250bcc:"7Av2Z","55a26bb040d83918":"4CPdc","97712bd669b06ccf":"3NI4M",b2130786c0cb0f80:"i30ST",aaac558287b5aa94:"k5X1l",c6ea7d7218c4c1f0:"4qgYA",f4a251fc6a0ec32a:"55cC0","2d3c3a8ae405672f":"5CuF7",a99e55c559023f8b:"cwsJo",baa63ea979fa51ca:"jiIFu",ecef47c4fbdd606b:"3ujL7",f57a8c7fd7d84ffb:"dkhk9","37236ad9fe95a3e":"ixHS2",c50230ad6eef7275:"daQdc"}],gJg5v:[function(e,t,i){var n=e("23dea28abc8414d1"),r=e("2ec751f39e500b85").f,s=e("b4567636b28a3b3a"),a=e("50460aa43dd4048a"),o=e("581238c99f8c2c30"),h=e("566a383894c688bc"),c=e("f0e2e697f04e8ad9");t.exports=function(e,t){var i,l,u,d,f,p=e.target,g=e.global,m=e.stat;if(i=g?n:m?n[p]||o(p,{}):n[p]&&n[p].prototype)for(l in t){if(d=t[l],u=e.dontCallGetSet?(f=r(i,l))&&f.value:i[l],!c(g?l:p+(m?".":"#")+l,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;h(d,u)}(e.sham||u&&u.sham)&&s(d,"sham",!0),a(i,l,d,e)}}},{"23dea28abc8414d1":"7Z171","2ec751f39e500b85":"aRu9T",b4567636b28a3b3a:"gKM90","50460aa43dd4048a":"4CPdc","581238c99f8c2c30":"huhcf","566a383894c688bc":"d9xyM",f0e2e697f04e8ad9:"gE5NQ"}],"7Z171":[function(e,t,i){var n=arguments[3],r=function(e){return e&&e.Math===Math&&e};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},{}],aRu9T:[function(e,t,i){var n=e("c04e6fb248689dba"),r=e("553ec943aa2a4554"),s=e("bbc5e69071aa2fbd"),a=e("1d2ffbfd99e01f41"),o=e("c4ea69a78a643d87"),h=e("8ab18ff766aa2ab9"),c=e("3761c5d34b7aa48f"),l=e("c4dfcc26308f1b4a"),u=Object.getOwnPropertyDescriptor;i.f=n?u:function(e,t){if(e=o(e),t=h(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!r(s.f,e,t),e[t])}},{c04e6fb248689dba:"6mXK1","553ec943aa2a4554":"bOssl",bbc5e69071aa2fbd:"7Av2Z","1d2ffbfd99e01f41":"5toj2",c4ea69a78a643d87:"h9ut0","8ab18ff766aa2ab9":"gvuJs","3761c5d34b7aa48f":"9JWVX",c4dfcc26308f1b4a:"lahqe"}],"6mXK1":[function(e,t,i){var n=e("735b783268fd06c0");t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"735b783268fd06c0":"cXVrS"}],cXVrS:[function(e,t,i){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],bOssl:[function(e,t,i){var n=e("44e025d030d66023"),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},{"44e025d030d66023":"3p5v0"}],"3p5v0":[function(e,t,i){var n=e("2642aa7619056f20");t.exports=!n(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"2642aa7619056f20":"cXVrS"}],"7Av2Z":[function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);i.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},{}],"5toj2":[function(e,t,i){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],h9ut0:[function(e,t,i){var n=e("9d8f8f50ac9468eb"),r=e("f7224aed72953ac4");t.exports=function(e){return n(r(e))}},{"9d8f8f50ac9468eb":"kuAas",f7224aed72953ac4:"cHxZN"}],kuAas:[function(e,t,i){var n=e("7ba7e65983d7b662"),r=e("df551e12a7c872dd"),s=e("1d34ea813cebff9c"),a=Object,o=n("".split);t.exports=r(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):a(e)}:a},{"7ba7e65983d7b662":"2iJ57",df551e12a7c872dd:"cXVrS","1d34ea813cebff9c":"161sQ"}],"2iJ57":[function(e,t,i){var n=e("829dd7a4e960cf9e"),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);t.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},{"829dd7a4e960cf9e":"3p5v0"}],"161sQ":[function(e,t,i){var n=e("1c71c3f6daac476c"),r=n({}.toString),s=n("".slice);t.exports=function(e){return s(r(e),8,-1)}},{"1c71c3f6daac476c":"2iJ57"}],cHxZN:[function(e,t,i){var n=e("74607922ed30019f"),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},{"74607922ed30019f":"8AxCV"}],"8AxCV":[function(e,t,i){t.exports=function(e){return null==e}},{}],gvuJs:[function(e,t,i){var n=e("53a3a67ac381c4e8"),r=e("b992ca9cdcf7937b");t.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},{"53a3a67ac381c4e8":"cCley",b992ca9cdcf7937b:"2ZU2p"}],cCley:[function(e,t,i){var n=e("70235907dc93b4b0"),r=e("46fb53dace408c8e"),s=e("677bdc4d74d2f983"),a=e("80395bcde336a28b"),o=e("49552a7324952190"),h=e("aea01c71276624bf"),c=TypeError,l=h("toPrimitive");t.exports=function(e,t){if(!r(e)||s(e))return e;var i,h=a(e,l);if(h){if(void 0===t&&(t="default"),!r(i=n(h,e,t))||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},{"70235907dc93b4b0":"bOssl","46fb53dace408c8e":"8mxCV","677bdc4d74d2f983":"2ZU2p","80395bcde336a28b":"2qR8N","49552a7324952190":"6aMZM",aea01c71276624bf:"5CuF7"}],"8mxCV":[function(e,t,i){var n=e("f87cee1cb79cbcca");t.exports=function(e){return"object"==typeof e?null!==e:n(e)}},{f87cee1cb79cbcca:"h1Wnr"}],h1Wnr:[function(e,t,i){var n="object"==typeof document&&document.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},{}],"2ZU2p":[function(e,t,i){var n=e("6b6c481cdfb7df35"),r=e("2af44fcbdbf14c83"),s=e("76e903e830c40e7c"),a=e("7e2fe930b3598e22"),o=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},{"6b6c481cdfb7df35":"e5ie6","2af44fcbdbf14c83":"h1Wnr","76e903e830c40e7c":"d5bNd","7e2fe930b3598e22":"6doR5"}],e5ie6:[function(e,t,i){var n=e("e057fc33d60763c1"),r=e("f1d62079325906cb");t.exports=function(e,t){var i;return arguments.length<2?r(i=n[e])?i:void 0:n[e]&&n[e][t]}},{e057fc33d60763c1:"7Z171",f1d62079325906cb:"h1Wnr"}],d5bNd:[function(e,t,i){var n=e("83f14842ef67e16a");t.exports=n({}.isPrototypeOf)},{"83f14842ef67e16a":"2iJ57"}],"6doR5":[function(e,t,i){var n=e("da4a972af0214ea0");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{da4a972af0214ea0:"kkRwC"}],kkRwC:[function(e,t,i){var n=e("53b951dfb9de4d22"),r=e("b37df495bcdc1d99"),s=e("e5929e9affd2affc").String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"53b951dfb9de4d22":"co76c",b37df495bcdc1d99:"cXVrS",e5929e9affd2affc:"7Z171"}],co76c:[function(e,t,i){var n,r,s=e("d049c1c2aa0eee5b"),a=e("4eb5796bbafe334d"),o=s.process,h=s.Deno,c=o&&o.versions||h&&h.version,l=c&&c.v8;l&&(r=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},{d049c1c2aa0eee5b:"7Z171","4eb5796bbafe334d":"5hj4U"}],"5hj4U":[function(e,t,i){var n=e("888bcb4c75dc4ad").navigator,r=n&&n.userAgent;t.exports=r?String(r):""},{"888bcb4c75dc4ad":"7Z171"}],"2qR8N":[function(e,t,i){var n=e("bbfed17b24e215f4"),r=e("492a86e2970f6a26");t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},{bbfed17b24e215f4:"alrlv","492a86e2970f6a26":"8AxCV"}],alrlv:[function(e,t,i){var n=e("4094667126ecac05"),r=e("fce2a7573db493fa"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},{"4094667126ecac05":"h1Wnr",fce2a7573db493fa:"3zerS"}],"3zerS":[function(e,t,i){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],"6aMZM":[function(e,t,i){var n=e("abe9ca006f56626e"),r=e("c96b3a89fec6248a"),s=e("551615fda0214f1b"),a=TypeError;t.exports=function(e,t){var i,o;if("string"===t&&r(i=e.toString)&&!s(o=n(i,e))||r(i=e.valueOf)&&!s(o=n(i,e))||"string"!==t&&r(i=e.toString)&&!s(o=n(i,e)))return o;throw new a("Can't convert object to primitive value")}},{abe9ca006f56626e:"bOssl",c96b3a89fec6248a:"h1Wnr","551615fda0214f1b":"8mxCV"}],"5CuF7":[function(e,t,i){var n=e("ad5ef4474219c101"),r=e("6a2cda01df6b4c79"),s=e("dccc28ffa5beeb54"),a=e("48d6af1225853d44"),o=e("9f762329148684"),h=e("1ce268781e409df2"),c=n.Symbol,l=r("wks"),u=h?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return s(l,e)||(l[e]=o&&s(c,e)?c[e]:u("Symbol."+e)),l[e]}},{ad5ef4474219c101:"7Z171","6a2cda01df6b4c79":"i30ST",dccc28ffa5beeb54:"9JWVX","48d6af1225853d44":"55cC0","9f762329148684":"kkRwC","1ce268781e409df2":"6doR5"}],i30ST:[function(e,t,i){var n=e("84eeed9891aafe14");t.exports=function(e,t){return n[e]||(n[e]=t||{})}},{"84eeed9891aafe14":"jKWHg"}],jKWHg:[function(e,t,i){var n=e("7b43004672b1879f"),r=e("bc8329e77dc2c1cc"),s=e("dfb72a1d809f7b02"),a="__core-js_shared__",o=t.exports=r[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"7b43004672b1879f":"jHRGA",bc8329e77dc2c1cc:"7Z171",dfb72a1d809f7b02:"huhcf"}],jHRGA:[function(e,t,i){t.exports=!1},{}],huhcf:[function(e,t,i){var n=e("2d1c29655635b9ea"),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},{"2d1c29655635b9ea":"7Z171"}],"9JWVX":[function(e,t,i){var n=e("f5dcaa60a713971f"),r=e("ab17c4f45fcf0841"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},{f5dcaa60a713971f:"2iJ57",ab17c4f45fcf0841:"6oQEu"}],"6oQEu":[function(e,t,i){var n=e("f45a7b5dcdc4a410"),r=Object;t.exports=function(e){return r(n(e))}},{f45a7b5dcdc4a410:"cHxZN"}],"55cC0":[function(e,t,i){var n=e("5da0fe4507da20a3"),r=0,s=Math.random(),a=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+s,36)}},{"5da0fe4507da20a3":"2iJ57"}],lahqe:[function(e,t,i){var n=e("9b4278b13c076bf"),r=e("8aee5d88a5f9b6b5"),s=e("1db4d60148afcf21");t.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"9b4278b13c076bf":"6mXK1","8aee5d88a5f9b6b5":"cXVrS","1db4d60148afcf21":"SppDD"}],SppDD:[function(e,t,i){var n=e("845bcece0e6d354"),r=e("824df78b2e007250"),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"845bcece0e6d354":"7Z171","824df78b2e007250":"8mxCV"}],gKM90:[function(e,t,i){var n=e("a8753383ef98ee18"),r=e("189ab650b8f71085"),s=e("1168c8162aa30435");t.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},{a8753383ef98ee18:"6mXK1","189ab650b8f71085":"hvqCQ","1168c8162aa30435":"5toj2"}],hvqCQ:[function(e,t,i){var n=e("ca50eb9163928400"),r=e("d482f9e5478795e8"),s=e("b6ad7537efb06f4b"),a=e("16365a73399e7fe7"),o=e("fab1d366c47796d9"),h=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";i.f=n?s?function(e,t,i){if(a(e),t=o(t),a(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=l(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(a(e),t=o(t),a(i),r)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},{ca50eb9163928400:"6mXK1",d482f9e5478795e8:"lahqe",b6ad7537efb06f4b:"e457x","16365a73399e7fe7":"dPzbI",fab1d366c47796d9:"gvuJs"}],e457x:[function(e,t,i){var n=e("b22a5a2de93e3ad2"),r=e("249a5b857c2dfccd");t.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{b22a5a2de93e3ad2:"6mXK1","249a5b857c2dfccd":"cXVrS"}],dPzbI:[function(e,t,i){var n=e("2b6c6258a0a6082f"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},{"2b6c6258a0a6082f":"8mxCV"}],"4CPdc":[function(e,t,i){var n=e("99ee13632b3fa68"),r=e("9ebb3e3004fccc0a"),s=e("f10cc812a3094053"),a=e("d354802d852d9c2b");t.exports=function(e,t,i,o){o||(o={});var h=o.enumerable,c=void 0!==o.name?o.name:t;if(n(i)&&s(i,c,o),o.global)h?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(h=!0):delete e[t]}catch(e){}h?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},{"99ee13632b3fa68":"h1Wnr","9ebb3e3004fccc0a":"hvqCQ",f10cc812a3094053:"1fkJp",d354802d852d9c2b:"huhcf"}],"1fkJp":[function(e,t,i){var n=e("ca84677f1ebd1804"),r=e("13360f2842eba261"),s=e("103e488c0928755a"),a=e("cbf9b0e0779cc368"),o=e("3f2eb7efeae2f72b"),h=e("548b10f284264c72").CONFIGURABLE,c=e("358f00f3103bd55b"),l=e("9b2ce14119fd2412"),u=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=o&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=t.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+m(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||h&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&i&&a(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return a(n,"source")||(n.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function(){return s(this)&&d(this).source||c(this)},"toString")},{ca84677f1ebd1804:"2iJ57","13360f2842eba261":"cXVrS","103e488c0928755a":"h1Wnr",cbf9b0e0779cc368:"9JWVX","3f2eb7efeae2f72b":"6mXK1","548b10f284264c72":"jmu0n","358f00f3103bd55b":"3JJEO","9b2ce14119fd2412":"ixHS2"}],jmu0n:[function(e,t,i){var n=e("8ad2bacb0e20b95c"),r=e("4eabfd8f83afc9d5"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),h=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:o&&"something"===(function(){}).name,CONFIGURABLE:h}},{"8ad2bacb0e20b95c":"6mXK1","4eabfd8f83afc9d5":"9JWVX"}],"3JJEO":[function(e,t,i){var n=e("26e26db98367212e"),r=e("40ed9a4f6ae66648"),s=e("485d48d6f4c6739e"),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),t.exports=s.inspectSource},{"26e26db98367212e":"2iJ57","40ed9a4f6ae66648":"h1Wnr","485d48d6f4c6739e":"jKWHg"}],ixHS2:[function(e,t,i){var n,r,s,a=e("d3f0c9f3327b2fd6"),o=e("28c3574d0c39fe7e"),h=e("f82e6cc0ac249fa5"),c=e("c0ae163eea4ef97"),l=e("6dea7358344877bb"),u=e("3e035a1241da2f0"),d=e("88d6ccc27e779e5a"),f=e("d40b9b3abdbb956e"),p="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||u.state){var v=u.state||(u.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(p);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(l(e,y))throw new g(p);return t.facade=e,c(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},s=function(e){return l(e,y)}}t.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!h(t)||(i=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}}}},{d3f0c9f3327b2fd6:"lIC7p","28c3574d0c39fe7e":"7Z171",f82e6cc0ac249fa5:"8mxCV",c0ae163eea4ef97:"gKM90","6dea7358344877bb":"9JWVX","3e035a1241da2f0":"jKWHg","88d6ccc27e779e5a":"k5X1l",d40b9b3abdbb956e:"4qgYA"}],lIC7p:[function(e,t,i){var n=e("8b1a8c1dbfd18eb5"),r=e("aa77fff8d5ef0565"),s=n.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},{"8b1a8c1dbfd18eb5":"7Z171",aa77fff8d5ef0565:"h1Wnr"}],k5X1l:[function(e,t,i){var n=e("dbc8182adeb8c92f"),r=e("90b4ffb58508a6e5"),s=n("keys");t.exports=function(e){return s[e]||(s[e]=r(e))}},{dbc8182adeb8c92f:"i30ST","90b4ffb58508a6e5":"55cC0"}],"4qgYA":[function(e,t,i){t.exports={}},{}],d9xyM:[function(e,t,i){var n=e("d91d786cc71453ce"),r=e("88cb809f98beddc6"),s=e("10ea642aad5f7c21"),a=e("39ff598ce822187e");t.exports=function(e,t,i){for(var o=r(t),h=a.f,c=s.f,l=0;lc;)r(n,i=t[c++])&&(~a(l,i)||h(l,i));return l}},{"363ee0e6bb4f46a7":"2iJ57","3183fe0b0bf6f6ac":"9JWVX","28192ac12e934672":"h9ut0",a5f9c5d8e993ccd6:"7HT32","57775908f1581bc6":"4qgYA"}],"7HT32":[function(e,t,i){var n=e("d5dcbcd68ac5acd0"),r=e("212b13aecfa48226"),s=e("e5a8b3e1da4c5637"),a=function(e){return function(t,i,a){var o,h=n(t),c=s(h);if(0===c)return!e&&-1;var l=r(a,c);if(e&&i!=i){for(;c>l;)if((o=h[l++])!=o)return!0}else for(;c>l;l++)if((e||l in h)&&h[l]===i)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{d5dcbcd68ac5acd0:"h9ut0","212b13aecfa48226":"47gaI",e5a8b3e1da4c5637:"kHSes"}],"47gaI":[function(e,t,i){var n=e("72fe0a53ad43912c"),r=Math.max,s=Math.min;t.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},{"72fe0a53ad43912c":"gAgUH"}],gAgUH:[function(e,t,i){var n=e("3403cba02b5f61d8");t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},{"3403cba02b5f61d8":"8w9Yn"}],"8w9Yn":[function(e,t,i){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}},{}],kHSes:[function(e,t,i){var n=e("23d9716c54a2ab90");t.exports=function(e){return n(e.length)}},{"23d9716c54a2ab90":"lQsU7"}],lQsU7:[function(e,t,i){var n=e("c48d3a8b8ac52b0b"),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},{c48d3a8b8ac52b0b:"gAgUH"}],"7POW9":[function(e,t,i){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],f3eHQ:[function(e,t,i){i.f=Object.getOwnPropertySymbols},{}],gE5NQ:[function(e,t,i){var n=e("10299561ea0c7870"),r=e("8b1ecdaf59f07210"),s=/#|\.prototype\./,a=function(e,t){var i=h[o(e)];return i===l||i!==c&&(r(t)?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},h=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},{"10299561ea0c7870":"cXVrS","8b1ecdaf59f07210":"h1Wnr"}],"4x6uB":[function(e,t,i){var n=e("3e4265f3f6994add"),r=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},{"3e4265f3f6994add":"cRCRk"}],cRCRk:[function(e,t,i){var n=e("397e535b3976d304"),r=e("eebd8012c2d2c3ae"),s=e("8da113eeaf06c4ba"),a=e("df252844008f634")("toStringTag"),o=Object,h="Arguments"===s(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};t.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=o(e),a))?i:h?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},{"397e535b3976d304":"9axlf",eebd8012c2d2c3ae:"h1Wnr","8da113eeaf06c4ba":"161sQ",df252844008f634:"5CuF7"}],"9axlf":[function(e,t,i){var n=e("6306cd4835715127")("toStringTag"),r={};r[n]="z",t.exports="[object z]"===String(r)},{"6306cd4835715127":"5CuF7"}],"7isQ3":[function(e,t,i){var n,r=e("3bbe31d8f504111f"),s=e("a9712f03fc468b49"),a=e("d9e0c389f84efa79"),o=e("8a43b6a211717cde"),h=e("78d31e3a50d79c6e"),c=e("e29f7e32a0583f3"),l=e("a6edaba97f293fc9"),u="prototype",d="script",f=l("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe");return t.style.display="none",h.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},y=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}y="undefined"!=typeof document?document.domain&&n?m(n):v():m(n);for(var e=a.length;e--;)delete y[u][a[e]];return y()};o[f]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(p[u]=r(e),i=new p,p[u]=null,i[f]=e):i=y(),void 0===t?i:s.f(i,t)}},{"3bbe31d8f504111f":"dPzbI",a9712f03fc468b49:"ePigI",d9e0c389f84efa79:"7POW9","8a43b6a211717cde":"4qgYA","78d31e3a50d79c6e":"23b1K",e29f7e32a0583f3:"SppDD",a6edaba97f293fc9:"k5X1l"}],ePigI:[function(e,t,i){var n=e("aa39c539d0a1ec3f"),r=e("2e9118dcee7eb93e"),s=e("d88f5f00164c2da2"),a=e("12ac356c5e06e57d"),o=e("3cbdc44082c2f8b8"),h=e("634da70e74fce29b");i.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=o(t),r=h(t),c=r.length,l=0;c>l;)s.f(e,i=r[l++],n[i]);return e}},{aa39c539d0a1ec3f:"6mXK1","2e9118dcee7eb93e":"e457x",d88f5f00164c2da2:"hvqCQ","12ac356c5e06e57d":"dPzbI","3cbdc44082c2f8b8":"h9ut0","634da70e74fce29b":"kQgZQ"}],kQgZQ:[function(e,t,i){var n=e("fb982c683f43ec98"),r=e("7cabc30df1982d48");t.exports=Object.keys||function(e){return n(e,r)}},{fb982c683f43ec98:"4o1p7","7cabc30df1982d48":"7POW9"}],"23b1K":[function(e,t,i){var n=e("14cb391fa4a0dda8");t.exports=n("document","documentElement")},{"14cb391fa4a0dda8":"e5ie6"}],bBGHM:[function(e,t,i){var n=e("279dbc8649868a7a"),r=e("430d7ab8977dd85e"),s=e("a5a6278a4291e239").f,a=e("a0e199be640bf61f"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(e){try{return s(e)}catch(e){return a(o)}};t.exports.f=function(e){return o&&"Window"===n(e)?h(e):s(r(e))}},{"279dbc8649868a7a":"161sQ","430d7ab8977dd85e":"h9ut0",a5a6278a4291e239:"dDV3S",a0e199be640bf61f:"eO8Ta"}],eO8Ta:[function(e,t,i){var n=e("5250b5c9324ccbe");t.exports=n([].slice)},{"5250b5c9324ccbe":"2iJ57"}],"3NI4M":[function(e,t,i){var n=e("5bd1cd8472955124"),r=e("1413185c6323bbbc");t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},{"5bd1cd8472955124":"1fkJp","1413185c6323bbbc":"hvqCQ"}],cwsJo:[function(e,t,i){var n=e("2e34ececd06658d9");i.f=n},{"2e34ececd06658d9":"5CuF7"}],jiIFu:[function(e,t,i){var n=e("8d5159b7d317832f"),r=e("42a3ea18819bfbb"),s=e("7ec639749e279eeb"),a=e("cbbe4becefd5c21c").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:s.f(e)})}},{"8d5159b7d317832f":"iwjHr","42a3ea18819bfbb":"9JWVX","7ec639749e279eeb":"cwsJo",cbbe4becefd5c21c:"hvqCQ"}],iwjHr:[function(e,t,i){var n=e("34c09090b9638032");t.exports=n},{"34c09090b9638032":"7Z171"}],"3ujL7":[function(e,t,i){var n=e("b56ca5a55bb4c0e1"),r=e("f5359b167e9be384"),s=e("e7eef3415c62682d"),a=e("8cc59229c8e85f40");t.exports=function(){var e=r("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,o=s("toPrimitive");t&&!t[o]&&a(t,o,function(e){return n(i,this)},{arity:1})}},{b56ca5a55bb4c0e1:"bOssl",f5359b167e9be384:"e5ie6",e7eef3415c62682d:"5CuF7","8cc59229c8e85f40":"4CPdc"}],dkhk9:[function(e,t,i){var n=e("93a3d85da48077c").f,r=e("2ebf7179e87d878f"),s=e("5b1eb5d1639e9eb7")("toStringTag");t.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!r(e,s)&&n(e,s,{configurable:!0,value:t})}},{"93a3d85da48077c":"hvqCQ","2ebf7179e87d878f":"9JWVX","5b1eb5d1639e9eb7":"5CuF7"}],daQdc:[function(e,t,i){var n=e("13e0747865316a42"),r=e("99224cc18a4a792e"),s=e("57aaeabd9d30911"),a=e("3acffc809f3b03fb"),o=e("1fc4c4e55871562c"),h=e("76c922b575fbf7bd"),c=r([].push),l=function(e){var t=1===e,i=2===e,r=3===e,l=4===e,u=6===e,d=7===e,f=5===e||u;return function(p,g,m,v){for(var y,b,x=a(p),E=s(x),w=o(E),T=n(g,m),S=0,A=v||h,C=t?A(p,w):i||d?A(p,0):void 0;w>S;S++)if((f||S in E)&&(b=T(y=E[S],S,x),e)){if(t)C[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}}return u?-1:r||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},{"13e0747865316a42":"f1CxE","99224cc18a4a792e":"2iJ57","57aaeabd9d30911":"kuAas","3acffc809f3b03fb":"6oQEu","1fc4c4e55871562c":"kHSes","76c922b575fbf7bd":"kfoQr"}],f1CxE:[function(e,t,i){var n=e("92f6f475baa85665"),r=e("547ee4f9dab0cc76"),s=e("5acd31cba656d393"),a=n(n.bind);t.exports=function(e,t){return r(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},{"92f6f475baa85665":"c4z5p","547ee4f9dab0cc76":"alrlv","5acd31cba656d393":"3p5v0"}],c4z5p:[function(e,t,i){var n=e("8e77093015e1e67f"),r=e("9daa4dbbca634c9e");t.exports=function(e){if("Function"===n(e))return r(e)}},{"8e77093015e1e67f":"161sQ","9daa4dbbca634c9e":"2iJ57"}],kfoQr:[function(e,t,i){var n=e("4580767bbbe40f0b");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"4580767bbbe40f0b":"3SXid"}],"3SXid":[function(e,t,i){var n=e("a9e5b9af57e551f6"),r=e("2b4d84c184e08f4f"),s=e("f4bec83e8d6008c9"),a=e("4a13cf47b259a825")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(r(t=e.constructor)&&(t===o||n(t.prototype))?t=void 0:s(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?o:t}},{a9e5b9af57e551f6:"7GYYD","2b4d84c184e08f4f":"eytEI",f4bec83e8d6008c9:"8mxCV","4a13cf47b259a825":"5CuF7"}],"7GYYD":[function(e,t,i){var n=e("ccb261b2d73a4fca");t.exports=Array.isArray||function(e){return"Array"===n(e)}},{ccb261b2d73a4fca:"161sQ"}],eytEI:[function(e,t,i){var n=e("3b3e7fa8cfe4b3ac"),r=e("84df2127d2d40501"),s=e("ae35eceee587c4bc"),a=e("7bd40df22601ee7e"),o=e("271ff92378cbc486"),h=e("74840ba4357c1c30"),c=function(){},l=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!s(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},g=function(e){if(!s(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(u,h(e))}catch(e){return!0}};g.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?g:p},{"3b3e7fa8cfe4b3ac":"2iJ57","84df2127d2d40501":"cXVrS",ae35eceee587c4bc:"h1Wnr","7bd40df22601ee7e":"cRCRk","271ff92378cbc486":"e5ie6","74840ba4357c1c30":"3JJEO"}],epSXE:[function(e,t,i){var n=e("5bb0291a1de27cc2"),r=e("8e0d0366f8700097"),s=e("1d19a51e347c2d9e"),a=e("eab6cb58642f38b1"),o=e("41937bc543544e22"),h=e("8877198f0deded1d"),c=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{for:function(e){var t=a(e);if(s(c,t))return c[t];var i=r("Symbol")(t);return c[t]=i,l[i]=t,i}})},{"5bb0291a1de27cc2":"gJg5v","8e0d0366f8700097":"e5ie6","1d19a51e347c2d9e":"9JWVX",eab6cb58642f38b1:"4x6uB","41937bc543544e22":"i30ST","8877198f0deded1d":"lqpzY"}],lqpzY:[function(e,t,i){var n=e("a735884940a2eb73");t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},{a735884940a2eb73:"kkRwC"}],k89ua:[function(e,t,i){var n=e("8dbad7485118eaf8"),r=e("9fce8a9af4b186a4"),s=e("4e16fd56c67f82fb"),a=e("59b7b3dea7d1b71d"),o=e("77b2ea800463b7d6"),h=e("ca42326fb3cb6e68"),c=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{keyFor:function(e){if(!s(e))throw TypeError(a(e)+" is not a symbol");if(r(c,e))return c[e]}})},{"8dbad7485118eaf8":"gJg5v","9fce8a9af4b186a4":"9JWVX","4e16fd56c67f82fb":"2ZU2p","59b7b3dea7d1b71d":"3zerS","77b2ea800463b7d6":"i30ST",ca42326fb3cb6e68:"lqpzY"}],fKGrW:[function(e,t,i){var n=e("c758539029f56af9"),r=e("cd08b356bcae0b47"),s=e("2f13fa715711850"),a=e("4cfb95fb9a0e28fc"),o=e("50b40a77c21daf7f"),h=e("56cf5d4bc1afd666"),c=e("42bed86e3e73f3d2"),l=e("bca8b9ce5f71243b"),u=e("1bb05f05134df4c2"),d=e("1136e300bbee8f1e"),f=e("d8156a48adf3010b"),p=String,g=r("JSON","stringify"),m=o(/./.exec),v=o("".charAt),y=o("".charCodeAt),b=o("".replace),x=o(1..toString),E=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,S=!f||h(function(){var e=r("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),A=h(function(){return'"\udf06\ud834"'!==g("\uDF06\uD834")||'"\udead"'!==g("\uDEAD")}),C=function(e,t){var i=u(arguments),n=d(t);if(!(!c(n)&&(void 0===e||l(e))))return i[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},s(g,null,i)},_=function(e,t,i){var n=v(i,t-1),r=v(i,t+1);return m(w,e)&&!m(T,r)||m(T,e)&&!m(w,n)?"\\u"+x(y(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:S||A},{stringify:function(e,t,i){var n=u(arguments),r=s(S?C:g,null,n);return A&&"string"==typeof r?b(r,E,_):r}})},{c758539029f56af9:"gJg5v",cd08b356bcae0b47:"e5ie6","2f13fa715711850":"2fjXG","4cfb95fb9a0e28fc":"bOssl","50b40a77c21daf7f":"2iJ57","56cf5d4bc1afd666":"cXVrS","42bed86e3e73f3d2":"h1Wnr",bca8b9ce5f71243b:"2ZU2p","1bb05f05134df4c2":"eO8Ta","1136e300bbee8f1e":"gQett",d8156a48adf3010b:"kkRwC"}],"2fjXG":[function(e,t,i){var n=e("d07466971ded2aca"),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},{d07466971ded2aca:"3p5v0"}],gQett:[function(e,t,i){var n=e("d58a1810bb01cb9f"),r=e("fc692ad896e8fbbf"),s=e("78f870626b97cbe9"),a=e("1da5109b0acae5a0"),o=e("71deb4f6b3f33cf0"),h=n([].push);t.exports=function(e){if(s(e))return e;if(r(e)){for(var t=e.length,i=[],n=0;ny&&d(n,arguments[y]),n});if(S.prototype=w,"Error"!==x?o?o(S,T):h(S,T,{name:!0}):p&&v in E&&(c(S,E,v),c(S,E,"prepareStackTrace")),h(S,E),!g)try{w.name!==x&&s(w,"name",x),w.constructor=S}catch(e){}return S}}},{a06eacb797618572:"e5ie6","665a8da8d6942429":"9JWVX","1eafe025967456f7":"gKM90","56a7065490020014":"d5bNd","4950e85505e95dbc":"arrdQ","6c7bc1a190dc31c1":"d9xyM","84e57d08170f4fac":"7fWkz",a85bdac1120897b:"30not",efb60f912a162fda:"dwhvK","30c8c4978beb6a3c":"5QVLO",f4c1a33f96dc17e0:"1H0Ar","9afe587c962877da":"6mXK1","74e210db508a9809":"jHRGA"}],arrdQ:[function(e,t,i){var n=e("995a94425a563d6"),r=e("caa27fe2635f1f44"),s=e("a751660a0fcdf70"),a=e("6e2c833ee2a62cf6");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return s(i),a(n),r(i)&&(t?e(i,n):i.__proto__=n),i}}():void 0)},{"995a94425a563d6":"j4YhT",caa27fe2635f1f44:"8mxCV",a751660a0fcdf70:"cHxZN","6e2c833ee2a62cf6":"hEWXk"}],j4YhT:[function(e,t,i){var n=e("27a2d181325e1926"),r=e("36b26076b1e2fac1");t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},{"27a2d181325e1926":"2iJ57","36b26076b1e2fac1":"alrlv"}],hEWXk:[function(e,t,i){var n=e("fcc5bbb526d602c6"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},{fcc5bbb526d602c6:"6XW5L"}],"6XW5L":[function(e,t,i){var n=e("a504c97d35bacd6c");t.exports=function(e){return n(e)||null===e}},{a504c97d35bacd6c:"8mxCV"}],"7fWkz":[function(e,t,i){var n=e("e52fa9ee07db5896").f;t.exports=function(e,t,i){i in e||n(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},{e52fa9ee07db5896:"hvqCQ"}],"30not":[function(e,t,i){var n=e("9f474ed504af79a9"),r=e("bd2a6951ff768696"),s=e("972057e738a2788f");t.exports=function(e,t,i){var a,o;return s&&n(a=t.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&s(e,o),e}},{"9f474ed504af79a9":"h1Wnr",bd2a6951ff768696:"8mxCV","972057e738a2788f":"arrdQ"}],dwhvK:[function(e,t,i){var n=e("c9fe0c0d0cc00953");t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},{c9fe0c0d0cc00953:"4x6uB"}],"5QVLO":[function(e,t,i){var n=e("b476c95c984a6a8d"),r=e("3c6bf72ab0382560");t.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},{b476c95c984a6a8d:"8mxCV","3c6bf72ab0382560":"gKM90"}],"1H0Ar":[function(e,t,i){var n=e("6a8c56dba61494ec"),r=e("a58d6d3fbc24091c"),s=e("13a68d58956ea123"),a=Error.captureStackTrace;t.exports=function(e,t,i,o){s&&(a?a(e,t):n(e,"stack",r(i,o)))}},{"6a8c56dba61494ec":"gKM90",a58d6d3fbc24091c:"7dart","13a68d58956ea123":"3Scc5"}],"7dart":[function(e,t,i){var n=e("eabcb03034bf2114"),r=Error,s=n("".replace),a=String(new r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,h=o.test(a);t.exports=function(e,t){if(h&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},{eabcb03034bf2114:"2iJ57"}],"3Scc5":[function(e,t,i){var n=e("89db331f671f42e0"),r=e("df11a3c4166c3491");t.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)})},{"89db331f671f42e0":"cXVrS",df11a3c4166c3491:"5toj2"}],aSTrG:[function(e,t,i){var n=e("f781bd5f2d18cfa7"),r=e("3eb4aef2f58a6fea"),s=Error.prototype;s.toString!==r&&n(s,"toString",r)},{f781bd5f2d18cfa7:"4CPdc","3eb4aef2f58a6fea":"9hDDf"}],"9hDDf":[function(e,t,i){var n=e("ea2a4236860a8cd8"),r=e("e3d0938fe2af7a6b"),s=e("10baca5ba543cdd8"),a=e("b4dc1328db6268c"),o=Error.prototype.toString,h=r(function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})});t.exports=h?function(){var e=s(this),t=a(e.name,"Error"),i=a(e.message);return t?i?t+": "+i:t:i}:o},{ea2a4236860a8cd8:"6mXK1",e3d0938fe2af7a6b:"cXVrS","10baca5ba543cdd8":"dPzbI",b4dc1328db6268c:"dwhvK"}],"8nyV3":[function(e,t,i){e("84cae8994b2a2f5")},{"84cae8994b2a2f5":"esMFt"}],esMFt:[function(e,t,i){var n=e("c0cc68e328095af5"),r=e("faa2bddf0ac478ea"),s=e("4413a40f7d436a10"),a=e("6bef4cb0d407baac"),o=e("16d669a6cb07e14c"),h=e("44313d9c6ae01d88"),c=e("fa987207071f401e"),l=e("e46f2df37a9caee7"),u=e("6f34595d479a3d16"),d=e("971d0ec70b5cd696"),f=e("8cb104a68ce09b9a"),p=e("57c5336285df243"),g=e("2e2daca8a25d7233")("toStringTag"),m=Error,v=[].push,y=function(e,t){var i,n=r(b,this);a?i=a(new m,n?s(this):b):c(i=n?this:h(b),g,"Error"),void 0!==t&&c(i,"message",p(t)),d(i,y,i.stack,1),arguments.length>2&&u(i,arguments[2]);var o=[];return f(e,v,{that:o}),c(i,"errors",o),i};a?a(y,m):o(y,m,{name:!0});var b=y.prototype=h(m.prototype,{constructor:l(1,y),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:y})},{c0cc68e328095af5:"gJg5v",faa2bddf0ac478ea:"d5bNd","4413a40f7d436a10":"e8mfS","6bef4cb0d407baac":"arrdQ","16d669a6cb07e14c":"d9xyM","44313d9c6ae01d88":"7isQ3",fa987207071f401e:"gKM90",e46f2df37a9caee7:"5toj2","6f34595d479a3d16":"5QVLO","971d0ec70b5cd696":"1H0Ar","8cb104a68ce09b9a":"dCEHX","57c5336285df243":"dwhvK","2e2daca8a25d7233":"5CuF7"}],e8mfS:[function(e,t,i){var n=e("da54a59ea207dd"),r=e("71ab2a7bcc8c8fc8"),s=e("7a3afd2bb40b0292"),a=e("296d7a2db8e23969"),o=e("58de29d5e883862f"),h=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=s(e);if(n(t,h))return t[h];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof c?l:null}},{da54a59ea207dd:"9JWVX","71ab2a7bcc8c8fc8":"h1Wnr","7a3afd2bb40b0292":"6oQEu","296d7a2db8e23969":"k5X1l","58de29d5e883862f":"2SHZm"}],"2SHZm":[function(e,t,i){var n=e("85ffc28af2e8afc1");t.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"85ffc28af2e8afc1":"cXVrS"}],dCEHX:[function(e,t,i){var n=e("2f267ed50e670495"),r=e("c0af58bb1ef1cc62"),s=e("7fa6542c03ca9239"),a=e("fa596d1a4c07b72a"),o=e("fd753cc641a6f10a"),h=e("2a15dee148d3db96"),c=e("417f9a13deeb58a6"),l=e("43af53be1b24dae5"),u=e("bf7ad32b21aed0b4"),d=e("5241389e1d6eeb73"),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;t.exports=function(e,t,i){var m,v,y,b,x,E,w,T=i&&i.that,S=!!(i&&i.AS_ENTRIES),A=!!(i&&i.IS_RECORD),C=!!(i&&i.IS_ITERATOR),_=!!(i&&i.INTERRUPTED),I=n(t,T),O=function(e){return m&&d(m,"normal",e),new p(!0,e)},P=function(e){return S?(s(e),_?I(e[0],e[1],O):I(e[0],e[1])):_?I(e,O):I(e)};if(A)m=e.iterator;else if(C)m=e;else{if(!(v=u(e)))throw new f(a(e)+" is not iterable");if(o(v)){for(y=0,b=h(e);b>y;y++)if((x=P(e[y]))&&c(g,x))return x;return new p(!1)}m=l(e,v)}for(E=A?e.next:m.next;!(w=r(E,m)).done;){try{x=P(w.value)}catch(e){d(m,"throw",e)}if("object"==typeof x&&x&&c(g,x))return x}return new p(!1)}},{"2f267ed50e670495":"f1CxE",c0af58bb1ef1cc62:"bOssl","7fa6542c03ca9239":"dPzbI",fa596d1a4c07b72a:"3zerS",fd753cc641a6f10a:"88nHe","2a15dee148d3db96":"kHSes","417f9a13deeb58a6":"d5bNd","43af53be1b24dae5":"kBMjp",bf7ad32b21aed0b4:"3624P","5241389e1d6eeb73":"58eij"}],"88nHe":[function(e,t,i){var n=e("85b004b6ab4bc5da"),r=e("6de391ad2976ca02"),s=n("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||a[s]===e)}},{"85b004b6ab4bc5da":"5CuF7","6de391ad2976ca02":"bABtS"}],bABtS:[function(e,t,i){t.exports={}},{}],kBMjp:[function(e,t,i){var n=e("132ebf774107ae29"),r=e("e248489b4825ceb7"),s=e("18a343d2ef625577"),a=e("7e576a1564cef99e"),o=e("4a7b0311be0471b2"),h=TypeError;t.exports=function(e,t){var i=arguments.length<2?o(e):t;if(r(i))return s(n(i,e));throw new h(a(e)+" is not iterable")}},{"132ebf774107ae29":"bOssl",e248489b4825ceb7:"alrlv","18a343d2ef625577":"dPzbI","7e576a1564cef99e":"3zerS","4a7b0311be0471b2":"3624P"}],"3624P":[function(e,t,i){var n=e("32d61dafd81dde78"),r=e("84e24a6ac7559d3a"),s=e("f0707282c0d93eeb"),a=e("1c181d5c49efd5d1"),o=e("d10d0e0ae49498c5")("iterator");t.exports=function(e){if(!s(e))return r(e,o)||r(e,"@@iterator")||a[n(e)]}},{"32d61dafd81dde78":"cRCRk","84e24a6ac7559d3a":"2qR8N",f0707282c0d93eeb:"8AxCV","1c181d5c49efd5d1":"bABtS",d10d0e0ae49498c5:"5CuF7"}],"58eij":[function(e,t,i){var n=e("a4a3a7d4a45c4219"),r=e("feb876e7da2df7bd"),s=e("2e660cdfabd9c61f");t.exports=function(e,t,i){var a,o;r(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw i;return i}a=n(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw i;if(o)throw a;return r(a),i}},{a4a3a7d4a45c4219:"bOssl",feb876e7da2df7bd:"dPzbI","2e660cdfabd9c61f":"2qR8N"}],j1ABh:[function(e,t,i){var n=e("1051ab5946792444"),r=e("901806552daaa9d1"),s=e("c2da5f9111ec0d0d"),a=e("bbf9283d8426dd54"),o=e("2df6383956d55950"),h="AggregateError",c=r(h),l=!a(function(){return 1!==c([1]).errors[0]})&&a(function(){return 7!==c([1],h,{cause:7}).cause});n({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:o(h,function(e){return function(t,i){return s(e,this,arguments)}},l,!0)})},{"1051ab5946792444":"gJg5v","901806552daaa9d1":"e5ie6",c2da5f9111ec0d0d:"2fjXG",bbf9283d8426dd54:"cXVrS","2df6383956d55950":"ja1ZQ"}],"3LJSA":[function(e,t,i){var n=e("17b6274b31efea6a"),r=e("bd1f09a15df9c54b"),s=e("aeeef420262f9436"),a=e("d3a5a5518b6afdf1"),o=e("a3c99fc0a91390b5");n({target:"Array",proto:!0},{at:function(e){var t=r(this),i=s(t),n=a(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]}}),o("at")},{"17b6274b31efea6a":"gJg5v",bd1f09a15df9c54b:"6oQEu",aeeef420262f9436:"kHSes",d3a5a5518b6afdf1:"gAgUH",a3c99fc0a91390b5:"4jzvR"}],"4jzvR":[function(e,t,i){var n=e("d4032cdcc50314e7"),r=e("3ca2a6909ac2dcef"),s=e("545ab457bf71d338").f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}},{d4032cdcc50314e7:"5CuF7","3ca2a6909ac2dcef":"7isQ3","545ab457bf71d338":"hvqCQ"}],jYNHr:[function(e,t,i){var n=e("ae9bcc3c886d2e43"),r=e("320b7f8f99977d72"),s=e("c9c4d35908c64a9b"),a=e("e40ffb4fd8cdd6ef"),o=e("600c6b55241cb08d"),h=e("c35064fc908d412e"),c=e("d3e233a6dd5508d7"),l=e("4da7fb5e70719532"),u=e("706ee6e3130d3c44"),d=e("76c3a5d37e98bd2f"),f=e("210a9ec1468bd8f4"),p=e("64448af9c74a3ff5"),g=f("isConcatSpreadable"),m=p>=51||!r(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),v=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:s(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!d("concat")},{concat:function(e){var t,i,n,r,s,a=o(this),d=u(a,0),f=0;for(t=-1,n=arguments.length;t9007199254740991)throw n("Maximum allowed index exceeded");return e}},{}],SVTZV:[function(e,t,i){var n=e("667a2d5a858194a6"),r=e("2daa2f41b7310fd4"),s=e("7bb9efd811e3f83f");t.exports=function(e,t,i){n?r.f(e,t,s(0,i)):e[t]=i}},{"667a2d5a858194a6":"6mXK1","2daa2f41b7310fd4":"hvqCQ","7bb9efd811e3f83f":"5toj2"}],ca1EV:[function(e,t,i){var n=e("bbe4de7ca7a1c6be"),r=e("6cb3e4ca309911dc"),s=e("4d1dd9e6baf7a81f"),a=r("species");t.exports=function(e){return s>=51||!n(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},{bbe4de7ca7a1c6be:"cXVrS","6cb3e4ca309911dc":"5CuF7","4d1dd9e6baf7a81f":"co76c"}],"9D9sM":[function(e,t,i){var n=e("4890937a7e7c636b"),r=e("7256897b95da01b3"),s=e("4c4cc4b0d9ea98ec");n({target:"Array",proto:!0},{copyWithin:r}),s("copyWithin")},{"4890937a7e7c636b":"gJg5v","7256897b95da01b3":"toMXb","4c4cc4b0d9ea98ec":"4jzvR"}],toMXb:[function(e,t,i){var n=e("67e19c72f7fbebd0"),r=e("5063d303bf924d87"),s=e("e3d01b6d6197aedd"),a=e("6ffaf2643c0abf62"),o=Math.min;t.exports=[].copyWithin||function(e,t){var i=n(this),h=s(i),c=r(e,h),l=r(t,h),u=arguments.length>2?arguments[2]:void 0,d=o((void 0===u?h:r(u,h))-l,h-c),f=1;for(l0;)l in i?i[c]=i[l]:a(i,c),c+=f,l+=f;return i}},{"67e19c72f7fbebd0":"6oQEu","5063d303bf924d87":"47gaI",e3d01b6d6197aedd:"kHSes","6ffaf2643c0abf62":"hb7MO"}],hb7MO:[function(e,t,i){var n=e("49f65044bb4dad7f"),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw new r("Cannot delete property "+n(t)+" of "+n(e))}},{"49f65044bb4dad7f":"3zerS"}],c1k6c:[function(e,t,i){var n=e("c1238b63d9c8719e"),r=e("f6644a21f0f5983").every;n({target:"Array",proto:!0,forced:!e("8bc22f42d8ee353c")("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{c1238b63d9c8719e:"gJg5v",f6644a21f0f5983:"daQdc","8bc22f42d8ee353c":"lz8BN"}],lz8BN:[function(e,t,i){var n=e("77f0d106558781f");t.exports=function(e,t){var i=[][e];return!!i&&n(function(){i.call(null,t||function(){return 1},1)})}},{"77f0d106558781f":"cXVrS"}],lbPxO:[function(e,t,i){var n=e("52cb142d804aabd3"),r=e("daf335b8230cfcc7"),s=e("3e31c661bed82a2d");n({target:"Array",proto:!0},{fill:r}),s("fill")},{"52cb142d804aabd3":"gJg5v",daf335b8230cfcc7:"9XPgi","3e31c661bed82a2d":"4jzvR"}],"9XPgi":[function(e,t,i){var n=e("45e35cf118865951"),r=e("ae17acf5d72570ed"),s=e("94aaef7256431b15");t.exports=function(e){for(var t=n(this),i=s(t),a=arguments.length,o=r(a>1?arguments[1]:void 0,i),h=a>2?arguments[2]:void 0,c=void 0===h?i:r(h,i);c>o;)t[o++]=e;return t}},{"45e35cf118865951":"6oQEu",ae17acf5d72570ed:"47gaI","94aaef7256431b15":"kHSes"}],jKklH:[function(e,t,i){var n=e("a465bc55e057d26f"),r=e("fa9926c68c33923f").filter;n({target:"Array",proto:!0,forced:!e("9232c94be2f9c639")("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{a465bc55e057d26f:"gJg5v",fa9926c68c33923f:"daQdc","9232c94be2f9c639":"ca1EV"}],lMNyP:[function(e,t,i){var n=e("a6cb3a492b52d21c"),r=e("ad97e1511b32e588").find,s=e("62fd950aac3d5249"),a="find",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{a6cb3a492b52d21c:"gJg5v",ad97e1511b32e588:"daQdc","62fd950aac3d5249":"4jzvR"}],hPNfA:[function(e,t,i){var n=e("dcce3e96aeb32c26"),r=e("25f2fe0b92321096").findIndex,s=e("1c93cc746ac8ffb1"),a="findIndex",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{dcce3e96aeb32c26:"gJg5v","25f2fe0b92321096":"daQdc","1c93cc746ac8ffb1":"4jzvR"}],fURyF:[function(e,t,i){var n=e("7c9570dd28371e00"),r=e("43d20d51fd072b05").findLast,s=e("8c5f13eb9efbfd84");n({target:"Array",proto:!0},{findLast:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLast")},{"7c9570dd28371e00":"gJg5v","43d20d51fd072b05":"cyWXz","8c5f13eb9efbfd84":"4jzvR"}],cyWXz:[function(e,t,i){var n=e("c1d87d2297f1acca"),r=e("e5df4a29c897e724"),s=e("42c314ae435e3665"),a=e("a64fff03b4e929f6"),o=function(e){var t=1===e;return function(i,o,h){for(var c,l=s(i),u=r(l),d=a(u),f=n(o,h);d-- >0;)if(f(c=u[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};t.exports={findLast:o(0),findLastIndex:o(1)}},{c1d87d2297f1acca:"f1CxE",e5df4a29c897e724:"kuAas","42c314ae435e3665":"6oQEu",a64fff03b4e929f6:"kHSes"}],"6XyUS":[function(e,t,i){var n=e("bba50227ea399df7"),r=e("c196d65aab15955b").findLastIndex,s=e("5f02d29251865622");n({target:"Array",proto:!0},{findLastIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLastIndex")},{bba50227ea399df7:"gJg5v",c196d65aab15955b:"cyWXz","5f02d29251865622":"4jzvR"}],d83iu:[function(e,t,i){var n=e("eea83811f9bf5b44"),r=e("d9157408980dcae4"),s=e("1603b1d7d71c6d78"),a=e("95d7017c9e9cedeb"),o=e("9b0770c8bd20c0f9"),h=e("4c36764bcb49234f");n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=s(this),i=a(t),n=h(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:o(e)),n}})},{eea83811f9bf5b44:"gJg5v",d9157408980dcae4:"2QW86","1603b1d7d71c6d78":"6oQEu","95d7017c9e9cedeb":"kHSes","9b0770c8bd20c0f9":"gAgUH","4c36764bcb49234f":"kfoQr"}],"2QW86":[function(e,t,i){var n=e("ebb82f00ac94e25c"),r=e("d2ce61b77ec49b3f"),s=e("d3f4210cd620e3d6"),a=e("a7c8b8651480c6c9"),o=function(e,t,i,h,c,l,u,d){for(var f,p,g=c,m=0,v=!!u&&a(u,d);m0&&n(f)?(p=r(f),g=o(e,t,f,p,g,l-1)-1):(s(g+1),e[g]=f),g++),m++;return g};t.exports=o},{ebb82f00ac94e25c:"7GYYD",d2ce61b77ec49b3f:"kHSes",d3f4210cd620e3d6:"6TggQ",a7c8b8651480c6c9:"f1CxE"}],lc4NN:[function(e,t,i){var n=e("e4ee3b9d2bc1ffb2"),r=e("378c1e23131cdaae"),s=e("74e7f70118e2a778"),a=e("1a2d0561d09775b8"),o=e("f7bbb0ab5ee7446c"),h=e("51d35c0066e59cdb");n({target:"Array",proto:!0},{flatMap:function(e){var t,i=a(this),n=o(i);return s(e),(t=h(i,0)).length=r(t,i,i,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},{e4ee3b9d2bc1ffb2:"gJg5v","378c1e23131cdaae":"2QW86","74e7f70118e2a778":"alrlv","1a2d0561d09775b8":"6oQEu",f7bbb0ab5ee7446c:"kHSes","51d35c0066e59cdb":"kfoQr"}],gjqcj:[function(e,t,i){var n=e("214b5a111591d046"),r=e("658aa5ae0eee38b0");n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},{"214b5a111591d046":"gJg5v","658aa5ae0eee38b0":"4w3Nn"}],"4w3Nn":[function(e,t,i){var n=e("1a0535b754110eb5").forEach,r=e("df61bc1b7a92de0f")("forEach");t.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},{"1a0535b754110eb5":"daQdc",df61bc1b7a92de0f:"lz8BN"}],j3v3L:[function(e,t,i){var n=e("76f1b3b688a029fa"),r=e("55358907c05b685d");n({target:"Array",stat:!0,forced:!e("98fd99047e51c8be")(function(e){Array.from(e)})},{from:r})},{"76f1b3b688a029fa":"gJg5v","55358907c05b685d":"lrrJd","98fd99047e51c8be":"dR8Bu"}],lrrJd:[function(e,t,i){var n=e("c006aee3ec90867f"),r=e("bdaed06b86eeb767"),s=e("ca05db7523b31410"),a=e("47fe223c8f6c2dd5"),o=e("75eba7673a242ae6"),h=e("188dc0b37c140076"),c=e("32c4effc8b33b2c2"),l=e("a6ed280c439df9d0"),u=e("3faaa09a63a90825"),d=e("13cbec27e4dd055f"),f=Array;t.exports=function(e){var t,i,p,g,m,v,y=s(e),b=h(this),x=arguments.length,E=x>1?arguments[1]:void 0,w=void 0!==E;w&&(E=n(E,x>2?arguments[2]:void 0));var T=d(y),S=0;if(T&&!(this===f&&o(T)))for(i=b?new this:[],m=(g=u(y,T)).next;!(p=r(m,g)).done;S++)v=w?a(g,E,[p.value,S],!0):p.value,l(i,S,v);else for(t=c(y),i=b?new this(t):f(t);t>S;S++)v=w?E(y[S],S):y[S],l(i,S,v);return i.length=S,i}},{c006aee3ec90867f:"f1CxE",bdaed06b86eeb767:"bOssl",ca05db7523b31410:"6oQEu","47fe223c8f6c2dd5":"hyn7H","75eba7673a242ae6":"88nHe","188dc0b37c140076":"eytEI","32c4effc8b33b2c2":"kHSes",a6ed280c439df9d0:"SVTZV","3faaa09a63a90825":"kBMjp","13cbec27e4dd055f":"3624P"}],hyn7H:[function(e,t,i){var n=e("4afbb4be48dcf066"),r=e("d24fa1ffea48fa52");t.exports=function(e,t,i,s){try{return s?t(n(i)[0],i[1]):t(i)}catch(t){r(e,"throw",t)}}},{"4afbb4be48dcf066":"dPzbI",d24fa1ffea48fa52:"58eij"}],dR8Bu:[function(e,t,i){var n=e("a5154de5c7fcf21e")("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){try{if(!t&&!r)return!1}catch(e){return!1}var i=!1;try{var s={};s[n]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(e){}return i}},{a5154de5c7fcf21e:"5CuF7"}],"3rrfH":[function(e,t,i){var n=e("ffa5d46bdab873f9"),r=e("abe71b6f5a2c149").includes,s=e("119354898116a770"),a=e("9a828f869e1adf81");n({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{ffa5d46bdab873f9:"gJg5v",abe71b6f5a2c149:"7HT32","119354898116a770":"cXVrS","9a828f869e1adf81":"4jzvR"}],b10MD:[function(e,t,i){var n=e("9d4bf984c01e8ef7"),r=e("ff94ec157dbe45f"),s=e("84db9b100b66a9f4").indexOf,a=e("928c12f9f760e965"),o=r([].indexOf),h=!!o&&1/o([1],1,-0)<0;n({target:"Array",proto:!0,forced:h||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return h?o(this,e,t)||0:s(this,e,t)}})},{"9d4bf984c01e8ef7":"gJg5v",ff94ec157dbe45f:"c4z5p","84db9b100b66a9f4":"7HT32","928c12f9f760e965":"lz8BN"}],"2JgXG":[function(e,t,i){e("e1a67b4aafecad9a")({target:"Array",stat:!0},{isArray:e("1fa49986380c79ad")})},{e1a67b4aafecad9a:"gJg5v","1fa49986380c79ad":"7GYYD"}],"3prNk":[function(e,t,i){var n=e("c8e067881939a0cb"),r=e("275b8f0cb65b77aa"),s=e("21f4d3653c90f049"),a=e("85efa8d5848315f6"),o=e("94a17682acfdceb4").f,h=e("bb30bdef31147b17"),c=e("d8384af5151f994c"),l=e("fdcc207797f592fe"),u=e("11e42ff2bbda8d0a"),d="Array Iterator",f=a.set,p=a.getterFor(d);t.exports=h(Array,"Array",function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(i,!1);case"values":return c(t[i],!1)}return c([i,t[i]],!1)},"values");var g=s.Arguments=s.Array;if(r("keys"),r("values"),r("entries"),!l&&u&&"values"!==g.name)try{o(g,"name",{value:"values"})}catch(e){}},{c8e067881939a0cb:"h9ut0","275b8f0cb65b77aa":"4jzvR","21f4d3653c90f049":"bABtS","85efa8d5848315f6":"ixHS2","94a17682acfdceb4":"hvqCQ",bb30bdef31147b17:"klSVb",d8384af5151f994c:"dwU83",fdcc207797f592fe:"jHRGA","11e42ff2bbda8d0a":"6mXK1"}],klSVb:[function(e,t,i){var n=e("923c1bf4a39ae90c"),r=e("46a3f73465955199"),s=e("c1577e63189cf935"),a=e("dc625e1bb584faf6"),o=e("d55d91c410baca17"),h=e("3e4ae607dbb6e78b"),c=e("48ca4ae1d4998232"),l=e("1263258b63630933"),u=e("9b61caf69f87dfde"),d=e("7f30a3ab1bf5e1c1"),f=e("c027b4da648348d3"),p=e("d4ad91965213ee1"),g=e("b616a206eb405268"),m=e("4f9ec7e9f5d20965"),v=a.PROPER,y=a.CONFIGURABLE,b=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,E=p("iterator"),w="keys",T="values",S="entries",A=function(){return this};t.exports=function(e,t,i,a,p,m,C){h(i,t,a);var _,I,O,P=function(e){if(e===p&&k)return k;if(!x&&e&&e in L)return L[e];switch(e){case w:case T:case S:return function(){return new i(this,e)}}return function(){return new i(this)}},M=t+" Iterator",R=!1,L=e.prototype,D=L[E]||L["@@iterator"]||p&&L[p],k=!x&&D||P(p),N="Array"===t&&L.entries||D;if(N&&(_=c(N.call(new e)))!==Object.prototype&&_.next&&(s||c(_)===b||(l?l(_,b):o(_[E])||f(_,E,A)),u(_,M,!0,!0),s&&(g[M]=A)),v&&p===T&&D&&D.name!==T&&(!s&&y?d(L,"name",T):(R=!0,k=function(){return r(D,this)})),p){if(I={values:P(T),keys:m?k:P(w),entries:P(S)},C)for(O in I)!x&&!R&&O in L||f(L,O,I[O]);else n({target:t,proto:!0,forced:x||R},I)}return(!s||C)&&L[E]!==k&&f(L,E,k,{name:p}),g[t]=k,I}},{"923c1bf4a39ae90c":"gJg5v","46a3f73465955199":"bOssl",c1577e63189cf935:"jHRGA",dc625e1bb584faf6:"jmu0n",d55d91c410baca17:"h1Wnr","3e4ae607dbb6e78b":"1Abii","48ca4ae1d4998232":"e8mfS","1263258b63630933":"arrdQ","9b61caf69f87dfde":"dkhk9","7f30a3ab1bf5e1c1":"gKM90",c027b4da648348d3:"4CPdc",d4ad91965213ee1:"5CuF7",b616a206eb405268:"bABtS","4f9ec7e9f5d20965":"6nE00"}],"1Abii":[function(e,t,i){var n=e("6d3197d79123a33d").IteratorPrototype,r=e("f19338a88747fb05"),s=e("cc176dfbf6ea0553"),a=e("bc433e6ab6880430"),o=e("2f833e0e1738e7e0"),h=function(){return this};t.exports=function(e,t,i,c){var l=t+" Iterator";return e.prototype=r(n,{next:s(+!c,i)}),a(e,l,!1,!0),o[l]=h,e}},{"6d3197d79123a33d":"6nE00",f19338a88747fb05:"7isQ3",cc176dfbf6ea0553:"5toj2",bc433e6ab6880430:"dkhk9","2f833e0e1738e7e0":"bABtS"}],"6nE00":[function(e,t,i){var n,r,s,a=e("cdb9dcd93b52b3fc"),o=e("db955145706fc55a"),h=e("83e5df3d56e8834f"),c=e("45d6f1a3c372cdf6"),l=e("a97459767d74fdc3"),u=e("3bdf78f362001d7c"),d=e("d3901e60df7842c9"),f=e("e736fd193ddc96e5"),p=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(r=l(l(s)))!==Object.prototype&&(n=r):g=!0),!h(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:f&&(n=c(n)),o(n[p])||u(n,p,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},{cdb9dcd93b52b3fc:"cXVrS",db955145706fc55a:"h1Wnr","83e5df3d56e8834f":"8mxCV","45d6f1a3c372cdf6":"7isQ3",a97459767d74fdc3:"e8mfS","3bdf78f362001d7c":"4CPdc",d3901e60df7842c9:"5CuF7",e736fd193ddc96e5:"jHRGA"}],dwU83:[function(e,t,i){t.exports=function(e,t){return{value:e,done:t}}},{}],le1uL:[function(e,t,i){var n=e("1fd3a81d59354079"),r=e("878a42cfd07db75d"),s=e("c417af28e9abb2b"),a=e("cdcc2dbc58a28c02"),o=e("733e226e143494d1"),h=r([].join);n({target:"Array",proto:!0,forced:s!==Object||!o("join",",")},{join:function(e){return h(a(this),void 0===e?",":e)}})},{"1fd3a81d59354079":"gJg5v","878a42cfd07db75d":"2iJ57",c417af28e9abb2b:"kuAas",cdcc2dbc58a28c02:"h9ut0","733e226e143494d1":"lz8BN"}],eli4M:[function(e,t,i){var n=e("962fe7a81cad1a6"),r=e("9a92cbcc02ff28cd");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},{"962fe7a81cad1a6":"gJg5v","9a92cbcc02ff28cd":"cfsWk"}],cfsWk:[function(e,t,i){var n=e("4ca7787412cb919d"),r=e("883419ed27232d44"),s=e("ec6d0c7c9b243b67"),a=e("f185a9d11d03524a"),o=e("6d58dcee43d16a4d"),h=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf");t.exports=l||!u?function(e){if(l)return n(c,this,arguments)||0;var t=r(this),i=a(t);if(0===i)return -1;var o=i-1;for(arguments.length>1&&(o=h(o,s(arguments[1]))),o<0&&(o=i+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return -1}:c},{"4ca7787412cb919d":"2fjXG","883419ed27232d44":"h9ut0",ec6d0c7c9b243b67:"gAgUH",f185a9d11d03524a:"kHSes","6d58dcee43d16a4d":"lz8BN"}],zkrYn:[function(e,t,i){var n=e("5fce1361821ac187"),r=e("a7a3b0905c6ea58c").map;n({target:"Array",proto:!0,forced:!e("869912db050ffcc6")("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"5fce1361821ac187":"gJg5v",a7a3b0905c6ea58c:"daQdc","869912db050ffcc6":"ca1EV"}],"6cM5k":[function(e,t,i){var n=e("c49bbaeadf669473"),r=e("2b7c23018838f50"),s=e("5ca03f92538fd001"),a=e("d87cf2a2bcbb5c2c"),o=Array;n({target:"Array",stat:!0,forced:r(function(){function e(){}return!(o.of.call(e) instanceof e)})},{of:function(){for(var e=0,t=arguments.length,i=new(s(this)?this:o)(t);t>e;)a(i,e,arguments[e++]);return i.length=t,i}})},{c49bbaeadf669473:"gJg5v","2b7c23018838f50":"cXVrS","5ca03f92538fd001":"eytEI",d87cf2a2bcbb5c2c:"SVTZV"}],j9q44:[function(e,t,i){var n=e("b6ccafca6520a091"),r=e("617fddde3018a247"),s=e("59103d39edb4650b"),a=e("92e23121d8e92745"),o=e("e72c330067644bc");n({target:"Array",proto:!0,arity:1,forced:e("a33adf7f040c3b17")(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=r(this),i=s(t),n=arguments.length;o(i+n);for(var h=0;h79&&a<83||!s("reduce")},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},{aa6d80bc3b697f48:"gJg5v","1ee240c0462acdf8":"dEdT1","161424d627b72094":"lz8BN",bc7f601de74ac73e:"co76c",fbcc11805e216a7d:"hdoIk"}],dEdT1:[function(e,t,i){var n=e("93e7a99f8d3bc817"),r=e("915d05570b61a3c9"),s=e("da310552be96f5db"),a=e("f4209260f2003c23"),o=TypeError,h="Reduce of empty array with no initial value",c=function(e){return function(t,i,c,l){var u=r(t),d=s(u),f=a(u);if(n(i),0===f&&c<2)throw new o(h);var p=e?f-1:0,g=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=g;break}if(p+=g,e?p<0:f<=p)throw new o(h)}for(;e?p>=0:f>p;p+=g)p in d&&(l=i(l,d[p],p,u));return l}};t.exports={left:c(!1),right:c(!0)}},{"93e7a99f8d3bc817":"alrlv","915d05570b61a3c9":"6oQEu",da310552be96f5db:"kuAas",f4209260f2003c23:"kHSes"}],hdoIk:[function(e,t,i){var n=e("5fac34e3c4c0e043");t.exports="NODE"===n},{"5fac34e3c4c0e043":"ah0ZS"}],ah0ZS:[function(e,t,i){var n=e("7dc361f46ecde901"),r=e("9f6e24ecbba66a9e"),s=e("a008a59fdc341842"),a=function(e){return r.slice(0,e.length)===e};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},{"7dc361f46ecde901":"7Z171","9f6e24ecbba66a9e":"5hj4U",a008a59fdc341842:"161sQ"}],YvN4R:[function(e,t,i){var n=e("fce4aa67eb1fe4da"),r=e("9bb83011bb72081c").right,s=e("86ebd8f03f19e7b"),a=e("c87ecf8f0d069a25");n({target:"Array",proto:!0,forced:!e("ceeda59dcd941a57")&&a>79&&a<83||!s("reduceRight")},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},{fce4aa67eb1fe4da:"gJg5v","9bb83011bb72081c":"dEdT1","86ebd8f03f19e7b":"lz8BN",c87ecf8f0d069a25:"co76c",ceeda59dcd941a57:"hdoIk"}],eqr1I:[function(e,t,i){var n=e("96e1bf170d634a10"),r=e("ccf1d267c2b85a6"),s=e("683c722e26101e35"),a=r([].reverse),o=[1,2];n({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return s(this)&&(this.length=this.length),a(this)}})},{"96e1bf170d634a10":"gJg5v",ccf1d267c2b85a6:"2iJ57","683c722e26101e35":"7GYYD"}],gW4UQ:[function(e,t,i){var n=e("f4626508f1e86a5e"),r=e("c55f884cac32042"),s=e("c7ab28f7c42930d4"),a=e("d62f4c68d4a29c88"),o=e("598be77178793bf1"),h=e("f9b9299dc750b2dd"),c=e("ff620c60ded20435"),l=e("49168568b59df51b"),u=e("f02f140688adf449"),d=e("eb9bbc0536d1f202"),f=e("88cb1064f5f88f9e"),p=d("slice"),g=u("species"),m=Array,v=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var i,n,u,d=c(this),p=h(d),y=o(e,p),b=o(void 0===t?p:t,p);if(r(d)&&(s(i=d.constructor)&&(i===m||r(i.prototype))?i=void 0:a(i)&&null===(i=i[g])&&(i=void 0),i===m||void 0===i))return f(d,y,b);for(u=0,n=new(void 0===i?m:i)(v(b-y,0));y1?arguments[1]:void 0)}})},{"7d2f6f3fe52919ae":"gJg5v",b1828f452e0c06d:"daQdc","2a793f2ccd9f7f4e":"lz8BN"}],g2wAi:[function(e,t,i){var n=e("bcbafe2730da3578"),r=e("45fd6781824a0ecc"),s=e("227e835045b72b76"),a=e("d460a9dbedc2e639"),o=e("eb5d266a4b580e05"),h=e("ab9af39e90a45cab"),c=e("2874e3c4ed670355"),l=e("b077ecec4e3b8790"),u=e("b1c0993c5b4a0232"),d=e("fc67c1f531962716"),f=e("5463fbeb0c308d9"),p=e("44ffda3b5c0f4b25"),g=e("f9fbdc3cf34ed30"),m=e("f4067f6b9a5e38cb"),v=[],y=r(v.sort),b=r(v.push),x=l(function(){v.sort(void 0)}),E=l(function(){v.sort(null)}),w=d("sort"),T=!l(function(){if(g)return g<70;if(!f||!(f>3)){if(p)return!0;if(m)return m<603;var e,t,i,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)v.push({k:t+n,v:i})}for(v.sort(function(e,t){return t.v-e.v}),n=0;nc(i)?1:-1}),t=o(r),i=0;i0;)e[o]=e[--o];o!==h++&&(e[o]=a)}else for(var c=r(i/2),l=s(n(e,0,c),t),u=s(n(e,c),t),d=l.length,f=u.length,p=0,g=0;p=t(l[p],u[g])?l[p++]:u[g++]:px-n+i;m--)d(b,m-1)}else if(i>n)for(m=x-n;m>E;m--)v=m+n-1,y=m+i-1,v in b?b[y]=b[v]:d(b,y);for(m=0;m2?i:n(t),a=new e(s);s>r;)a[r]=t[r++];return a}},{"2dee1f257e46a7db":"kHSes"}],"6NIFY":[function(e,t,i){var n=e("63ff55de103c0dc5");t.exports=function(e,t){var i=n[e],r=i&&i.prototype;return r&&r[t]}},{"63ff55de103c0dc5":"7Z171"}],iJJcs:[function(e,t,i){var n=e("c44d9276f6e49c66"),r=e("ccd8819e12261215"),s=e("95891e25a6f53375"),a=e("71fb5de0045d079d"),o=e("150c173e099ddbe3"),h=e("bc8453913d7979ca"),c=e("a4502cc79d58ffee"),l=Array,u=Math.max,d=Math.min;n({target:"Array",proto:!0},{toSpliced:function(e,t){var i,n,r,f,p=h(this),g=a(p),m=o(e,g),v=arguments.length,y=0;for(0===v?i=n=0:1===v?(i=0,n=g-m):(i=v-2,n=d(u(c(t),0),g-m)),f=l(r=s(g+i-n));y=o||c<0)throw new s("Incorrect index");for(var l=new t(o),u=0;u>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},J=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return H(m(e),23,4)},Q=function(e){return H(e,52,8)},Z=function(e,t,i){c(e[P],t,{configurable:!0,get:function(){return i(this)[t]}})},ee=function(e,t,i,n){var r=L(e),s=g(i);if(s+t>r.byteLength)throw new j(M);var a=r.bytes,o=s+r.byteOffset,h=E(a,o,o+t);return n?h:Y(h)},et=function(e,t,i,n,r,s){var a=L(e),o=g(i),h=n(+r),c=!!s;if(o+t>a.byteLength)throw new j(M);for(var l=a.bytes,u=o+a.byteOffset,d=0;d>24)},setUint8:function(e,t){er(this,e,t<<24>>24)}},{unsafe:!0})}else F=(N=function(e){d(this,F);var t=g(e);D(this,{type:I,bytes:W(G(t),0),byteLength:t}),s||(this.byteLength=t,this.detached=!1)})[P],U=(B=function(e,t,i){d(this,U),d(e,F);var n=R(e),r=n.byteLength,a=f(t);if(a<0||a>r)throw new j("Wrong offset");if(i=void 0===i?r-a:p(i),a+i>r)throw new j("Wrong length");D(this,{type:O,buffer:e,byteLength:i,byteOffset:a,bytes:n.bytes}),s||(this.buffer=e,this.byteLength=i,this.byteOffset=a)})[P],s&&(Z(N,"byteLength",R),Z(B,"buffer",L),Z(B,"byteLength",L),Z(B,"byteOffset",L)),l(U,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){et(this,1,e,X,t)},setUint8:function(e,t){et(this,1,e,X,t)},setInt16:function(e,t){et(this,2,e,K,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){et(this,2,e,K,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){et(this,4,e,q,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){et(this,4,e,q,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){et(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){et(this,8,e,Q,t,arguments.length>2&&arguments[2])}});S(N,I),S(B,O),t.exports={ArrayBuffer:N,DataView:B}},{b2866645d252be10:"7Z171","6f1278f8f2a16115":"2iJ57","82c590a9dd8cc3ac":"6mXK1","923679fae99d4d2f":"i5ikG","9840ef06cc46dddb":"jmu0n","78ca6eb037349755":"gKM90",e693d9164e48343:"3NI4M","649a7a39c0607d74":"43JWW","57aab94a1cd1d913":"cXVrS","7333f43e52f40b38":"95yA1","1fd77d2940b4fd75":"gAgUH","8739fe5c743af579":"lQsU7",e3fc7a8bc754578a:"g2ruQ","93dd6846d2a65063":"lyxmB",d85071d33c34155a:"7M4Fp",eae7b83555f02284:"e8mfS",fd01028813b4814f:"arrdQ","8fdeb7296fb95696":"9XPgi",c0dac2bdd3636e95:"eO8Ta","3606a69f7ceacab3":"30not","5a0e685d057e2415":"d9xyM",dd3d1adef426fc5:"dkhk9",ea12fbd2f22b2f25:"ixHS2"}],i5ikG:[function(e,t,i){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],"43JWW":[function(e,t,i){var n=e("e34e683e23dcb4bb");t.exports=function(e,t,i){for(var r in t)n(e,r,t[r],i);return e}},{e34e683e23dcb4bb:"4CPdc"}],"95yA1":[function(e,t,i){var n=e("55f8840091c5bf21"),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},{"55f8840091c5bf21":"d5bNd"}],g2ruQ:[function(e,t,i){var n=e("10a259b760ce2864"),r=e("f24767d66362404d"),s=RangeError;t.exports=function(e){if(void 0===e)return 0;var t=n(e),i=r(t);if(t!==i)throw new s("Wrong length or index");return i}},{"10a259b760ce2864":"gAgUH",f24767d66362404d:"lQsU7"}],lyxmB:[function(e,t,i){var n=e("8f9dfe0502a74d7");t.exports=Math.fround||function(e){return n(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)}},{"8f9dfe0502a74d7":"b6uSw"}],b6uSw:[function(e,t,i){var n=e("9113322676fa66ef"),r=Math.abs;t.exports=function(e,t,i,s){var a=+e,o=r(a),h=n(a);if(oi||l!=l?1/0*h:h*l}},{"9113322676fa66ef":"9QHoq"}],"9QHoq":[function(e,t,i){t.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},{}],"7M4Fp":[function(e,t,i){var n=Array,r=Math.abs,s=Math.pow,a=Math.floor,o=Math.log,h=Math.LN2;t.exports={pack:function(e,t,i){var c,l,u,d=n(i),f=8*i-t-1,p=(1<>1,m=23===t?s(2,-24)-s(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(u=s(2,-(c=a(o(e)/h))),e*u<1&&(c--,u*=2),c+g>=1?e+=m/u:e+=m*s(2,1-g),e*u>=2&&(c++,u/=2),c+g>=p?(l=0,c=p):c+g>=1?(l=(e*u-1)*s(2,t),c+=g):(l=e*s(2,g-1)*s(2,t),c=0));t>=8;)d[y++]=255&l,l/=256,t-=8;for(c=c<0;)d[y++]=255&c,c/=256,f-=8;return d[y-1]|=128*v,d},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<>1,h=r-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;h>0;)u=256*u+e[c--],h-=8;for(i=u&(1<<-h)-1,u>>=-h,h+=t;h>0;)i=256*i+e[c--],h-=8;if(0===u)u=1-o;else{if(u===a)return i?NaN:l?-1/0:1/0;i+=s(2,t),u-=o}return(l?-1:1)*i*s(2,u-t)}}},{}],"9DwR1":[function(e,t,i){var n=e("46c87ab471833e50"),r=e("3efc956d746e3978");n({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},{"46c87ab471833e50":"gJg5v","3efc956d746e3978":"b6692"}],b6692:[function(e,t,i){var n,r,s,a=e("4142cc1b1f950662"),o=e("fa237bbf2050dd6d"),h=e("9603af1373955d3d"),c=e("1b44b7e19e6f660d"),l=e("af39713fe0cf7587"),u=e("dd5eec94b1519471"),d=e("b9eebb2d4c13b0d6"),f=e("36a2290066710aa0"),p=e("fdfbb82e20f81a19"),g=e("81ef6d90bc6acdce"),m=e("96421c541af03be5"),v=e("ab8263bb2af6274"),y=e("ba5da2480b30b79"),b=e("b6e4d282cbe3e34a"),x=e("3d5af0d43aa6e42b"),E=e("8007fa7370557b8e"),w=e("82848943f937d383"),T=w.enforce,S=w.get,A=h.Int8Array,C=A&&A.prototype,_=h.Uint8ClampedArray,I=_&&_.prototype,O=A&&y(A),P=C&&y(C),M=Object.prototype,R=h.TypeError,L=x("toStringTag"),D=E("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",N=a&&!!b&&"Opera"!==d(h.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},V=function(e){var t=y(e);if(l(t)){var i=S(t);return i&&u(i,k)?i[k]:V(t)}},G=function(e){if(!l(e))return!1;var t=d(e);return u(B,t)||u(U,t)};for(n in B)(s=(r=h[n])&&r.prototype)?T(s)[k]=r:N=!1;for(n in U)(s=(r=h[n])&&r.prototype)&&(T(s)[k]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw new R("Incorrect invocation")},N))for(n in B)h[n]&&b(h[n],O);if((!N||!P||P===M)&&(P=O.prototype,N))for(n in B)h[n]&&b(h[n].prototype,P);if(N&&y(I)!==P&&b(I,P),o&&!u(P,L))for(n in F=!0,m(P,L,{configurable:!0,get:function(){return l(this)?this[D]:void 0}}),B)h[n]&&p(h[n],D,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&D,aTypedArray:function(e){if(G(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||v(O,e)))return e;throw new R(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,n){if(o){if(i)for(var r in B){var s=h[r];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}(!P[e]||i)&&g(P,e,i?t:N&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(o){if(b){if(i){for(n in B)if((r=h[n])&&u(r,e))try{delete r[e]}catch(e){}}if(O[e]&&!i)return;try{return g(O,e,i?t:N&&O[e]||t)}catch(e){}}for(n in B)(r=h[n])&&(!r[e]||i)&&g(r,e,t)}},getTypedArrayConstructor:V,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||u(B,t)||u(U,t)},isTypedArray:G,TypedArray:O,TypedArrayPrototype:P}},{"4142cc1b1f950662":"i5ikG",fa237bbf2050dd6d:"6mXK1","9603af1373955d3d":"7Z171","1b44b7e19e6f660d":"h1Wnr",af39713fe0cf7587:"8mxCV",dd5eec94b1519471:"9JWVX",b9eebb2d4c13b0d6:"cRCRk","36a2290066710aa0":"3zerS",fdfbb82e20f81a19:"gKM90","81ef6d90bc6acdce":"4CPdc","96421c541af03be5":"3NI4M",ab8263bb2af6274:"d5bNd",ba5da2480b30b79:"e8mfS",b6e4d282cbe3e34a:"arrdQ","3d5af0d43aa6e42b":"5CuF7","8007fa7370557b8e":"55cC0","82848943f937d383":"ixHS2"}],hihCW:[function(e,t,i){var n=e("de35f4868f3fe074"),r=e("41f3b5783dddf1cc"),s=e("da813d2481635a75"),a=e("7ac9e92946b0cbd8"),o=e("d8dca2550bf1cdc9"),h=e("881de7865554c8ed"),c=e("9f7b0710000cb4e4"),l=a.ArrayBuffer,u=a.DataView,d=u.prototype,f=r(l.prototype.slice),p=r(d.getUint8),g=r(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:s(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(f&&void 0===t)return f(o(this),e);for(var i=o(this).byteLength,n=h(e,i),r=h(void 0===t?i:t,i),s=new l(c(r-n)),a=new u(this),d=new u(s),m=0;n=s&&(!i||g))n=v(e,0,s);else{n=new d(s,i&&!g&&b?{maxByteLength:b(e)}:void 0);for(var m=new f(e),w=new f(n),T=p(s,r),S=0;S92||"NODE"===a&&s>94||"BROWSER"===a&&s>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},{"6bcfdfa15a0af40c":"7Z171","5bfa734fa18d01bd":"cXVrS","504e63b697c2418c":"co76c","2f39a8269e626373":"ah0ZS"}],ilodQ:[function(e,t,i){var n=e("2ee97e669ed348d2"),r=e("6010ab662274272a");r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},{"2ee97e669ed348d2":"gJg5v","6010ab662274272a":"dmTWg"}],"3sjfy":[function(e,t,i){var n=e("cf63881ba58455e7"),r=e("712c5b724e238772"),s=e("9542983db09542aa")(function(){return 120!==new Date(16e11).getYear()}),a=r(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:s},{getYear:function(){return a(this)-1900}})},{cf63881ba58455e7:"gJg5v","712c5b724e238772":"2iJ57","9542983db09542aa":"cXVrS"}],aJQbh:[function(e,t,i){var n=e("1b76219dfd05b069"),r=e("9cd428d337baa08f"),s=Date,a=r(s.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new s)}})},{"1b76219dfd05b069":"gJg5v","9cd428d337baa08f":"2iJ57"}],cl2UC:[function(e,t,i){var n=e("45b3958e6ed27545"),r=e("bb0b969d98296e93"),s=e("1bfaa736b448a80b"),a=Date.prototype,o=r(a.getTime),h=r(a.setFullYear);n({target:"Date",proto:!0},{setYear:function(e){o(this);var t=s(e);return h(this,t>=0&&t<=99?t+1900:t)}})},{"45b3958e6ed27545":"gJg5v",bb0b969d98296e93:"2iJ57","1bfaa736b448a80b":"gAgUH"}],l89H5:[function(e,t,i){e("382df40000aa3419")({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},{"382df40000aa3419":"gJg5v"}],cHGz3:[function(e,t,i){var n=e("ce28eb9d99ee133e"),r=e("f6428e9a2d433b20");n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},{ce28eb9d99ee133e:"gJg5v",f6428e9a2d433b20:"jjIBo"}],jjIBo:[function(e,t,i){var n=e("8ef03d8aa78a1a05"),r=e("d77f9603e3197abc"),s=e("de264358de0ee0b0").start,a=RangeError,o=isFinite,h=Math.abs,c=Date.prototype,l=c.toISOString,u=n(c.getTime),d=n(c.getUTCDate),f=n(c.getUTCFullYear),p=n(c.getUTCHours),g=n(c.getUTCMilliseconds),m=n(c.getUTCMinutes),v=n(c.getUTCMonth),y=n(c.getUTCSeconds);t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))})||!r(function(){l.call(new Date(NaN))})?function(){if(!o(u(this)))throw new a("Invalid time value");var e=f(this),t=g(this),i=e<0?"-":e>9999?"+":"";return i+s(h(e),i?6:4,0)+"-"+s(v(this)+1,2,0)+"-"+s(d(this),2,0)+"T"+s(p(this),2,0)+":"+s(m(this),2,0)+":"+s(y(this),2,0)+"."+s(t,3,0)+"Z"}:l},{"8ef03d8aa78a1a05":"2iJ57",d77f9603e3197abc:"cXVrS",de264358de0ee0b0:"15Fl7"}],"15Fl7":[function(e,t,i){var n=e("3f3ae64f3613324a"),r=e("86f2220ab33aea88"),s=e("ce16e4ba37e115ac"),a=e("3fe5759e7801b635"),o=e("3c8ec8ea0d5bc9c"),h=n(a),c=n("".slice),l=Math.ceil,u=function(e){return function(t,i,n){var a,u,d=s(o(t)),f=r(i),p=d.length,g=void 0===n?" ":s(n);return f<=p||""===g?d:((u=h(g,l((a=f-p)/g.length))).length>a&&(u=c(u,0,a)),e?d+u:u+d)}};t.exports={start:u(!1),end:u(!0)}},{"3f3ae64f3613324a":"2iJ57","86f2220ab33aea88":"lQsU7",ce16e4ba37e115ac:"4x6uB","3fe5759e7801b635":"dsk9g","3c8ec8ea0d5bc9c":"cHxZN"}],dsk9g:[function(e,t,i){var n=e("810ed4f57c077da5"),r=e("f870ae4664ae9b8c"),s=e("b05eac101d7c2112"),a=RangeError;t.exports=function(e){var t=r(s(this)),i="",o=n(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(i+=t);return i}},{"810ed4f57c077da5":"gAgUH",f870ae4664ae9b8c:"4x6uB",b05eac101d7c2112:"cHxZN"}],"6OeqH":[function(e,t,i){var n=e("a9ca9c4e2bd47ff4"),r=e("b11d0c7c0b2675d5"),s=e("60b061d7c8f57ad8"),a=e("e362bf7168d77860");n({target:"Date",proto:!0,arity:1,forced:r(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=s(this),i=a(t,"number");return"number"!=typeof i||isFinite(i)?t.toISOString():null}})},{a9ca9c4e2bd47ff4:"gJg5v",b11d0c7c0b2675d5:"cXVrS","60b061d7c8f57ad8":"6oQEu",e362bf7168d77860:"cCley"}],j16TA:[function(e,t,i){var n=e("af14b1f4d994a127"),r=e("53d6ff102d14faf"),s=e("5ca81c5eeb540a34"),a=e("5e5f3eb0bfd879e9")("toPrimitive"),o=Date.prototype;n(o,a)||r(o,a,s)},{af14b1f4d994a127:"9JWVX","53d6ff102d14faf":"4CPdc","5ca81c5eeb540a34":"5DgYa","5e5f3eb0bfd879e9":"5CuF7"}],"5DgYa":[function(e,t,i){var n=e("38c74c72615b5acf"),r=e("474ad3f08d0bd65b"),s=TypeError;t.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new s("Incorrect hint");return r(this,e)}},{"38c74c72615b5acf":"dPzbI","474ad3f08d0bd65b":"6aMZM"}],ltluo:[function(e,t,i){var n=e("be835518f2abbc78"),r=e("7997503c8dda7ce0"),s=Date.prototype,a="Invalid Date",o="toString",h=n(s[o]),c=n(s.getTime);String(new Date(NaN))!==a&&r(s,o,function(){var e=c(this);return e==e?h(this):a})},{be835518f2abbc78:"2iJ57","7997503c8dda7ce0":"4CPdc"}],l0eoZ:[function(e,t,i){var n=e("ffabd3103ccbbe88"),r=e("3b0c6b91d4084705"),s=e("9544189b2ef4f6a8"),a=r("".charAt),o=r("".charCodeAt),h=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),u=/[\w*+\-./@]/,d=function(e,t){for(var i=c(e,16);i.length1?arguments[1]:void 0);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),s(d,i?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&r(d,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var n=t+" Iterator",r=v(t),s=v(n);l(e,t,function(e,t){m(this,{type:n,target:e,state:r(e),kind:t,last:null})},function(){for(var e=s(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"===t?u(i.key,!1):"values"===t?u(i.value,!1):u([i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),d(t)}}},{"4087699e0041f387":"7isQ3","1731ca06a03e84a3":"3NI4M",c048d7069b65e14b:"43JWW","5aecbe8fa3c5a74e":"f1CxE",d3ad95b3aaf27c8a:"95yA1",cac009f0bbf34bb8:"8AxCV",a9a2814559569c97:"dCEHX",eb2045e367047a1c:"klSVb","14b36f47f4e70181":"dwU83",dfd8ed3bea972a50:"c7jXZ",b83fb10f1c8587e6:"6mXK1","77d5ccb3a2fbc893":"3Q1Z8","79afb9c26314edc8":"ixHS2"}],"1aJqY":[function(e,t,i){var n=e("6567f4dade5d8960"),r=e("f35d7393646ad055"),s=e("c4503f7eb1018306"),a=e("d7c6ba4f404b5360"),o=e("ff883ec9010d6328"),h=e("f9f796f22480c881"),c=e("dc5cfe657d3f962b"),l=e("59f5d275c85c76"),u=h.Map,d=h.has,f=h.get,p=h.set,g=r([].push),m=c||l(function(){return 1!==u.groupBy("ab",function(e){return e}).get("a").length});n({target:"Map",stat:!0,forced:c||m},{groupBy:function(e,t){a(e),s(t);var i=new u,n=0;return o(e,function(e){var r=t(e,n++);d(i,r)?g(f(i,r),e):p(i,r,[e])}),i}})},{"6567f4dade5d8960":"gJg5v",f35d7393646ad055:"2iJ57",c4503f7eb1018306:"alrlv",d7c6ba4f404b5360:"cHxZN",ff883ec9010d6328:"dCEHX",f9f796f22480c881:"fY40v",dc5cfe657d3f962b:"jHRGA","59f5d275c85c76":"cXVrS"}],fY40v:[function(e,t,i){var n=e("89734044d2e98b8d"),r=Map.prototype;t.exports={Map:Map,set:n(r.set),get:n(r.get),has:n(r.has),remove:n(r.delete),proto:r}},{"89734044d2e98b8d":"2iJ57"}],DQpS3:[function(e,t,i){var n=e("902411673b5fb2fc"),r=e("a4cfbc2e86c91e88"),s=Math.acosh,a=Math.log,o=Math.sqrt,h=Math.LN2;n({target:"Math",stat:!0,forced:!s||710!==Math.floor(s(Number.MAX_VALUE))||s(1/0)!==1/0},{acosh:function(e){var t=+e;return t<1?NaN:t>94906265.62425156?a(t)+h:r(t-1+o(t-1)*o(t+1))}})},{"902411673b5fb2fc":"gJg5v",a4cfbc2e86c91e88:"fdW4O"}],fdW4O:[function(e,t,i){var n=Math.log;t.exports=Math.log1p||function(e){var t=+e;return t>-.00000001&&t<1e-8?t-t*t/2:n(1+t)}},{}],"9m0ga":[function(e,t,i){var n=e("7dffb6067574667e"),r=Math.asinh,s=Math.log,a=Math.sqrt;n({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function e(t){var i=+t;return isFinite(i)&&0!==i?i<0?-e(-i):s(i+a(i*i+1)):i}})},{"7dffb6067574667e":"gJg5v"}],"6OW8r":[function(e,t,i){var n=e("852dfc47c3d9c449"),r=Math.atanh,s=Math.log;n({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){var t=+e;return 0===t?t:s((1+t)/(1-t))/2}})},{"852dfc47c3d9c449":"gJg5v"}],"8Ipne":[function(e,t,i){var n=e("387aa8b70c72a94d"),r=e("dac8a302b6d1f627"),s=Math.abs,a=Math.pow;n({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return r(t)*a(s(t),1/3)}})},{"387aa8b70c72a94d":"gJg5v",dac8a302b6d1f627:"9QHoq"}],bbe5P:[function(e,t,i){var n=e("2c4d345d25b6d18c"),r=Math.floor,s=Math.log,a=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-r(s(t+.5)*a):32}})},{"2c4d345d25b6d18c":"gJg5v"}],giuXg:[function(e,t,i){var n=e("f8f6f4e4d2e4cfe0"),r=e("c0bbc641191a15a9"),s=Math.cosh,a=Math.abs,o=Math.E;n({target:"Math",stat:!0,forced:!s||s(710)===1/0},{cosh:function(e){var t=r(a(e)-1)+1;return o/2*(t+1/(t*o*o))}})},{f8f6f4e4d2e4cfe0:"gJg5v",c0bbc641191a15a9:"fQMM6"}],fQMM6:[function(e,t,i){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||22025.465794806718>n(10)||-.00000000000000002!==n(-.00000000000000002)?function(e){var t=+e;return 0===t?t:t>-.000001&&t<1e-6?t+t*t/2:r(t)-1}:n},{}],"4Dfiq":[function(e,t,i){var n=e("54b4d24b57e9de25"),r=e("5648f7662bee3fb6");n({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},{"54b4d24b57e9de25":"gJg5v","5648f7662bee3fb6":"fQMM6"}],cIxH8:[function(e,t,i){e("1c1b96b0ca7c4a89")({target:"Math",stat:!0},{fround:e("47950f9c73209332")})},{"1c1b96b0ca7c4a89":"gJg5v","47950f9c73209332":"lyxmB"}],khz6l:[function(e,t,i){var n=e("bf5ef278fe0c2a2d"),r=Math.hypot,s=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i,n,r=0,o=0,h=arguments.length,c=0;o0?r+=(n=i/c)*n:r+=i;return c===1/0?1/0:c*a(r)}})},{bf5ef278fe0c2a2d:"gJg5v"}],flBRC:[function(e,t,i){var n=e("26821e3060ae31ef"),r=e("4ae16bb469711695"),s=Math.imul;n({target:"Math",stat:!0,forced:r(function(){return -5!==s(4294967295,5)||2!==s.length})},{imul:function(e,t){var i=+e,n=+t,r=65535&i,s=65535&n;return 0|r*s+((65535&i>>>16)*s+r*(65535&n>>>16)<<16>>>0)}})},{"26821e3060ae31ef":"gJg5v","4ae16bb469711695":"cXVrS"}],OdIjN:[function(e,t,i){e("e28aca710c97445a")({target:"Math",stat:!0},{log10:e("e386fc2f96575e54")})},{e28aca710c97445a:"gJg5v",e386fc2f96575e54:"7QVwX"}],"7QVwX":[function(e,t,i){var n=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(e){return n(e)*r}},{}],"5N41O":[function(e,t,i){e("ec799bb6317cd425")({target:"Math",stat:!0},{log1p:e("a686ef564d9d2882")})},{ec799bb6317cd425:"gJg5v",a686ef564d9d2882:"fdW4O"}],gqwBy:[function(e,t,i){var n=e("266355161c4f030d"),r=Math.log,s=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return r(e)/s}})},{"266355161c4f030d":"gJg5v"}],cjDQT:[function(e,t,i){e("69e2ea3a560b4a42")({target:"Math",stat:!0},{sign:e("22dfbc4f803ce611")})},{"69e2ea3a560b4a42":"gJg5v","22dfbc4f803ce611":"9QHoq"}],hjxfV:[function(e,t,i){var n=e("ebfcc20cba7b1e4e"),r=e("e96ed0b70941abe1"),s=e("cfb0aa3c75dc889"),a=Math.abs,o=Math.exp,h=Math.E;n({target:"Math",stat:!0,forced:r(function(){return -.00000000000000002!==Math.sinh(-.00000000000000002)})},{sinh:function(e){var t=+e;return 1>a(t)?(s(t)-s(-t))/2:(o(t-1)-o(-t-1))*(h/2)}})},{ebfcc20cba7b1e4e:"gJg5v",e96ed0b70941abe1:"cXVrS",cfb0aa3c75dc889:"fQMM6"}],lGEJr:[function(e,t,i){var n=e("75ca6aa3ab3c490c"),r=e("fbda4dec68bbb02f"),s=Math.exp;n({target:"Math",stat:!0},{tanh:function(e){var t=+e,i=r(t),n=r(-t);return i===1/0?1:n===1/0?-1:(i-n)/(s(t)+s(-t))}})},{"75ca6aa3ab3c490c":"gJg5v",fbda4dec68bbb02f:"fQMM6"}],"8Egu9":[function(e,t,i){e("8c4fc1e6a65b6d2f")(Math,"Math",!0)},{"8c4fc1e6a65b6d2f":"dkhk9"}],jWST5:[function(e,t,i){e("f97de92e01c210b9")({target:"Math",stat:!0},{trunc:e("15d9fc8fa50b9dc3")})},{f97de92e01c210b9:"gJg5v","15d9fc8fa50b9dc3":"8w9Yn"}],hrnKP:[function(e,t,i){var n=e("6a137a118d1bb06a"),r=e("6befc110db857fa5"),s=e("dac0f49ddd258f02"),a=e("be627f07e88786cb"),o=e("2945e9e965681f9c"),h=e("d6ad03f4a8d178a7"),c=e("b7d12a59a0877cf0"),l=e("a63fe8ba771ddd66"),u=e("1fa70215a385f43f"),d=e("ac9a98828b299940"),f=e("a2f71c36cf1dfa06"),p=e("1398c779e833098a"),g=e("58c10e766b715db4"),m=e("eae30770a8520200").f,v=e("a3f2314ca43c8870").f,y=e("673bf972e777267f").f,b=e("dc2cfe6c86ab9553"),x=e("27f6d5a76060ef23").trim,E="Number",w=a[E],T=o[E],S=w.prototype,A=a.TypeError,C=h("".slice),_=h("".charCodeAt),I=function(e){var t=p(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,i,n,r,s,a,o,h,c=p(e,"number");if(f(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2){if(43===(t=_(c=x(c),0))||45===t){if(88===(i=_(c,2))||120===i)return NaN}else if(48===t){switch(_(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(o=0,a=(s=C(c,2)).length;or)return NaN;return parseInt(s,n)}}return+c},P=c(E,!w(" 0o1")||!w("0b1")||w("+0x1")),M=function(e){var t,i=arguments.length<1?0:w(I(e));return(t=this,d(S,t)&&g(function(){b(t)}))?u(Object(i),this,M):i};M.prototype=S,P&&!r&&(S.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:P},{Number:M});var R=function(e,t){for(var i,n=s?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;n.length>r;r++)l(t,i=n[r])&&!l(e,i)&&y(e,i,v(t,i))};r&&T&&R(o[E],T),(P||r)&&R(o[E],w)},{"6a137a118d1bb06a":"gJg5v","6befc110db857fa5":"jHRGA",dac0f49ddd258f02:"6mXK1",be627f07e88786cb:"7Z171","2945e9e965681f9c":"iwjHr",d6ad03f4a8d178a7:"2iJ57",b7d12a59a0877cf0:"gE5NQ",a63fe8ba771ddd66:"9JWVX","1fa70215a385f43f":"30not",ac9a98828b299940:"d5bNd",a2f71c36cf1dfa06:"2ZU2p","1398c779e833098a":"cCley","58c10e766b715db4":"cXVrS",eae30770a8520200:"dDV3S",a3f2314ca43c8870:"aRu9T","673bf972e777267f":"hvqCQ",dc2cfe6c86ab9553:"gPsjs","27f6d5a76060ef23":"jX5uQ"}],gPsjs:[function(e,t,i){var n=e("4875831adea9aec3");t.exports=n(1..valueOf)},{"4875831adea9aec3":"2iJ57"}],jX5uQ:[function(e,t,i){var n=e("17f5a3ff1a1c6ce6"),r=e("56083d5e0450dab9"),s=e("3c5616504c7d56e9"),a=e("eacd32ca91d3c555"),o=n("".replace),h=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var i=s(r(t));return 1&e&&(i=o(i,h,"")),2&e&&(i=o(i,c,"$1")),i}};t.exports={start:l(1),end:l(2),trim:l(3)}},{"17f5a3ff1a1c6ce6":"2iJ57","56083d5e0450dab9":"cHxZN","3c5616504c7d56e9":"4x6uB",eacd32ca91d3c555:"heeAP"}],heeAP:[function(e,t,i){t.exports=" \n\v\f\r                 \u2028\u2029\uFEFF"},{}],aXsIP:[function(e,t,i){e("6a152397506f58aa")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:2220446049250313e-31})},{"6a152397506f58aa":"gJg5v"}],lsaNY:[function(e,t,i){e("1cd8bc612ab8a9aa")({target:"Number",stat:!0},{isFinite:e("2741aaae50f5c5db")})},{"1cd8bc612ab8a9aa":"gJg5v","2741aaae50f5c5db":"jGkAe"}],jGkAe:[function(e,t,i){var n=e("7a63d25015bc275e").isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},{"7a63d25015bc275e":"7Z171"}],"8eW4I":[function(e,t,i){e("ce2c3fa51ce7a2b6")({target:"Number",stat:!0},{isInteger:e("3e3a085edc93c707")})},{ce2c3fa51ce7a2b6:"gJg5v","3e3a085edc93c707":"3kBvt"}],"3kBvt":[function(e,t,i){var n=e("de18539dea9401a"),r=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},{de18539dea9401a:"8mxCV"}],h5WTU:[function(e,t,i){e("677c53d72f4dc4b5")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"677c53d72f4dc4b5":"gJg5v"}],glrUF:[function(e,t,i){var n=e("dab33bcdb73caa98"),r=e("3e8bd2979ca91bb4"),s=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&9007199254740991>=s(e)}})},{dab33bcdb73caa98:"gJg5v","3e8bd2979ca91bb4":"3kBvt"}],"91CVe":[function(e,t,i){e("f08cf5dcc31074a6")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},{f08cf5dcc31074a6:"gJg5v"}],"5JCvB":[function(e,t,i){e("d7c9fce3c9d3d189")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},{d7c9fce3c9d3d189:"gJg5v"}],"1UYJO":[function(e,t,i){var n=e("6edfd3b7fb98ea3e"),r=e("bae0a47a096d7522");n({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},{"6edfd3b7fb98ea3e":"gJg5v",bae0a47a096d7522:"guYqF"}],guYqF:[function(e,t,i){var n=e("69bd3378e63391c8"),r=e("842d738e09e8ac6b"),s=e("1779e25eab454452"),a=e("a6c37474f58f0739"),o=e("595d7b3426fbca88").trim,h=e("3acff994bd3a41b1"),c=s("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,f=1/l(h+"-0")!=-1/0||d&&!r(function(){l(Object(d))});t.exports=f?function(e){var t=o(a(e)),i=l(t);return 0===i&&"-"===c(t,0)?-0:i}:l},{"69bd3378e63391c8":"7Z171","842d738e09e8ac6b":"cXVrS","1779e25eab454452":"2iJ57",a6c37474f58f0739:"4x6uB","595d7b3426fbca88":"jX5uQ","3acff994bd3a41b1":"heeAP"}],"966g1":[function(e,t,i){var n=e("3882f0ce9a7bc56f"),r=e("f2f29cbfccb05e47");n({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},{"3882f0ce9a7bc56f":"gJg5v",f2f29cbfccb05e47:"9rXua"}],"9rXua":[function(e,t,i){var n=e("272fde501e24d305"),r=e("48c528ae508d02e"),s=e("7e7198f2f1540a47"),a=e("dd517d0a64474028"),o=e("b0ec8b6ceac29d85").trim,h=e("5252068313c033be"),c=n.parseInt,l=n.Symbol,u=l&&l.iterator,d=/^[+-]?0x/i,f=s(d.exec),p=8!==c(h+"08")||22!==c(h+"0x16")||u&&!r(function(){c(Object(u))});t.exports=p?function(e,t){var i=o(a(e));return c(i,t>>>0||(f(d,i)?16:10))}:c},{"272fde501e24d305":"7Z171","48c528ae508d02e":"cXVrS","7e7198f2f1540a47":"2iJ57",dd517d0a64474028:"4x6uB",b0ec8b6ceac29d85:"jX5uQ","5252068313c033be":"heeAP"}],"2u6nF":[function(e,t,i){var n=e("8acff5e43ec1ac00"),r=e("a791fae730bb52f8"),s=e("eaaedcaf85694da0"),a=e("5cfce35661f01b6f"),o=e("6c8e5def45c211a1"),h=e("876da316e0a42221"),c=e("2c3e63cad4b974da"),l=RangeError,u=String,d=isFinite,f=Math.abs,p=Math.floor,g=Math.pow,m=Math.round,v=r(1..toExponential),y=r(o),b=r("".slice),x="-6.9000e-11"===v(-.000000000069,4)&&"1.25e+0"===v(1.255,2)&&"1.235e+4"===v(12345,3)&&"3e+1"===v(25,0);n({target:"Number",proto:!0,forced:!x||!(c(function(){v(1,1/0)})&&c(function(){v(1,-1/0)}))||!!c(function(){v(1/0,1/0),v(NaN,1/0)})},{toExponential:function(e){var t,i,n,r,o=a(this);if(void 0===e)return v(o);var c=s(e);if(!d(o))return String(o);if(c<0||c>20)throw new l("Incorrect fraction digits");if(x)return v(o,c);var E="";if(o<0&&(E="-",o=-o),0===o)i=0,t=y("0",c+1);else{var w=g(10,(i=p(h(o)))-c),T=m(o/w);2*o>=(2*T+1)*w&&(T+=1),T>=g(10,c+1)&&(T/=10,i+=1),t=u(T)}return 0!==c&&(t=b(t,0,1)+"."+b(t,1)),0===i?(n="+",r="0"):(n=i>0?"+":"-",r=u(f(i))),E+(t+="e"+n+r)}})},{"8acff5e43ec1ac00":"gJg5v",a791fae730bb52f8:"2iJ57",eaaedcaf85694da0:"gAgUH","5cfce35661f01b6f":"gPsjs","6c8e5def45c211a1":"dsk9g","876da316e0a42221":"7QVwX","2c3e63cad4b974da":"cXVrS"}],"3Zya8":[function(e,t,i){var n=e("cd4f6c8df33e40b4"),r=e("46d8af161e2dc0d6"),s=e("fb6b6174bcfa90f"),a=e("a88d9905e1f83adc"),o=e("9b93ef6d7f240c15"),h=e("d57e63cfa5cbb68e"),c=RangeError,l=String,u=Math.floor,d=r(o),f=r("".slice),p=r(1..toFixed),g=function(e,t,i){return 0===t?i:t%2==1?g(e,t-1,i*e):g(e*e,t/2,i)},m=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=u(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=u(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=l(e[t]);i=""===i?n:i+d("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:h(function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)})||!h(function(){p({})})},{toFixed:function(e){var t,i,n,r,o=a(this),h=s(e),u=[0,0,0,0,0,0],p="",x="0";if(h<0||h>20)throw new c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return l(o);if(o<0&&(p="-",o=-o),o>1e-21){if(i=((t=m(o*g(2,69,1))-69)<0?o*g(2,-t,1):o/g(2,t,1))*4503599627370496,(t=52-t)>0){for(v(u,0,i),n=h;n>=7;)v(u,1e7,0),n-=7;for(v(u,g(10,n,1),0),n=t-1;n>=23;)y(u,8388608),n-=23;y(u,1<0?p+((r=x.length)<=h?"0."+d("0",h-r)+x:f(x,0,r-h)+"."+f(x,r-h)):p+x}})},{cd4f6c8df33e40b4:"gJg5v","46d8af161e2dc0d6":"2iJ57",fb6b6174bcfa90f:"gAgUH",a88d9905e1f83adc:"gPsjs","9b93ef6d7f240c15":"dsk9g",d57e63cfa5cbb68e:"cXVrS"}],kEs9R:[function(e,t,i){var n=e("a8898a73ab91d290"),r=e("ce4a637ab8de47ca"),s=e("4308932cb74d1989"),a=e("b09e8a0929dbee09"),o=r(1..toPrecision);n({target:"Number",proto:!0,forced:s(function(){return"1"!==o(1,void 0)})||!s(function(){o({})})},{toPrecision:function(e){return void 0===e?o(a(this)):o(a(this),e)}})},{a8898a73ab91d290:"gJg5v",ce4a637ab8de47ca:"2iJ57","4308932cb74d1989":"cXVrS",b09e8a0929dbee09:"gPsjs"}],czjHQ:[function(e,t,i){var n=e("9e39c36176ea9027"),r=e("eca15ea3e03a62cf");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},{"9e39c36176ea9027":"gJg5v",eca15ea3e03a62cf:"cKgWo"}],cKgWo:[function(e,t,i){var n=e("6bef1f1b71c0d15f"),r=e("d01fdbe6acf1dc69"),s=e("152344c6f1cc0727"),a=e("e500b6660dae4ed2"),o=e("a51f09aa538cbbc9"),h=e("1e00e3b82b1b3cb6"),c=e("df8aa13044dccc97"),l=e("fb90ba2f91e5c029"),u=e("33842bab271c4900"),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||a(function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach(function(e){t[e]=e}),7!==d({},e)[i]||o(d({},t)).join("")!==r})?function(e,t){for(var i=l(e),r=arguments.length,a=1,d=h.f,f=c.f;r>a;)for(var g,m=u(arguments[a++]),v=d?p(o(m),d(m)):o(m),y=v.length,b=0;y>b;)g=v[b++],(!n||s(f,m,g))&&(i[g]=m[g]);return i}:d},{"6bef1f1b71c0d15f":"6mXK1",d01fdbe6acf1dc69:"2iJ57","152344c6f1cc0727":"bOssl",e500b6660dae4ed2:"cXVrS",a51f09aa538cbbc9:"kQgZQ","1e00e3b82b1b3cb6":"f3eHQ",df8aa13044dccc97:"7Av2Z",fb90ba2f91e5c029:"6oQEu","33842bab271c4900":"kuAas"}],"9DWg9":[function(e,t,i){e("17cb8072b960d33f")({target:"Object",stat:!0,sham:!e("b7e43977f87f28a2")},{create:e("af73c0503e5e2dd8")})},{"17cb8072b960d33f":"gJg5v",b7e43977f87f28a2:"6mXK1",af73c0503e5e2dd8:"7isQ3"}],"8uazT":[function(e,t,i){var n=e("8f6b558a4e940099"),r=e("96523e310a3fe908"),s=e("67741c7cd2815bff"),a=e("60e72fdc0dc9cee8"),o=e("81722f8311309945"),h=e("e74b2be534174483");r&&n({target:"Object",proto:!0,forced:s},{__defineGetter__:function(e,t){h.f(o(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},{"8f6b558a4e940099":"gJg5v","96523e310a3fe908":"6mXK1","67741c7cd2815bff":"hh3RM","60e72fdc0dc9cee8":"alrlv","81722f8311309945":"6oQEu",e74b2be534174483:"hvqCQ"}],hh3RM:[function(e,t,i){var n=e("8edc7d10fd60cc1f"),r=e("199488e7120262f2"),s=e("67c1b3060370d6f1"),a=e("a7f7bf4b6fabffe9");t.exports=n||!s(function(){if(!a||!(a<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r[e]}})},{"8edc7d10fd60cc1f":"jHRGA","199488e7120262f2":"7Z171","67c1b3060370d6f1":"cXVrS",a7f7bf4b6fabffe9:"1CWLZ"}],dLOib:[function(e,t,i){var n=e("79249a239f48e2d4"),r=e("b64da2842e228b05"),s=e("45e48b7437d67551").f;n({target:"Object",stat:!0,forced:Object.defineProperties!==s,sham:!r},{defineProperties:s})},{"79249a239f48e2d4":"gJg5v",b64da2842e228b05:"6mXK1","45e48b7437d67551":"ePigI"}],bVBB2:[function(e,t,i){var n=e("b118adf01477032"),r=e("a3127abbf747d8e2"),s=e("dec8f826adb685fc").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!r},{defineProperty:s})},{b118adf01477032:"gJg5v",a3127abbf747d8e2:"6mXK1",dec8f826adb685fc:"hvqCQ"}],"9laFo":[function(e,t,i){var n=e("9bd3ca02d43a34c6"),r=e("14adf2205f0de0f1"),s=e("25f3087f814cb2fd"),a=e("8f5516e8b83f7c81"),o=e("1864c5e0fe7b94e4"),h=e("fbfc447cbc7c8274");r&&n({target:"Object",proto:!0,forced:s},{__defineSetter__:function(e,t){h.f(o(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},{"9bd3ca02d43a34c6":"gJg5v","14adf2205f0de0f1":"6mXK1","25f3087f814cb2fd":"hh3RM","8f5516e8b83f7c81":"alrlv","1864c5e0fe7b94e4":"6oQEu",fbfc447cbc7c8274:"hvqCQ"}],"1E3wB":[function(e,t,i){var n=e("f61a79561ef771d5"),r=e("f45db476330e9273").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},{f61a79561ef771d5:"gJg5v",f45db476330e9273:"iwcqE"}],iwcqE:[function(e,t,i){var n=e("d3708b44f56d5dbe"),r=e("41285041ee215b4b"),s=e("fae894139558d631"),a=e("d1ebe3ffdc898f92"),o=e("8ca7d570e80b9ce7"),h=e("cd0bc0f155d9ce86"),c=s(e("8a6b90d3c1a4843d").f),l=s([].push),u=n&&r(function(){var e=Object.create(null);return e[2]=2,!c(e,2)}),d=function(e){return function(t){for(var i,r=h(t),s=o(r),d=u&&null===a(r),f=s.length,p=0,g=[];f>p;)i=s[p++],(!n||(d?i in r:c(r,i)))&&l(g,e?[i,r[i]]:r[i]);return g}};t.exports={entries:d(!0),values:d(!1)}},{d3708b44f56d5dbe:"6mXK1","41285041ee215b4b":"cXVrS",fae894139558d631:"2iJ57",d1ebe3ffdc898f92:"e8mfS","8ca7d570e80b9ce7":"kQgZQ",cd0bc0f155d9ce86:"h9ut0","8a6b90d3c1a4843d":"7Av2Z"}],cCotT:[function(e,t,i){var n=e("41df7dcb1db288e9"),r=e("fff8fcdf7f021ed"),s=e("349eb9a58219946d"),a=e("aba4dbd0c2e0df38"),o=e("83d388d2147293dd").onFreeze,h=Object.freeze;n({target:"Object",stat:!0,forced:s(function(){h(1)}),sham:!r},{freeze:function(e){return h&&a(e)?h(o(e)):e}})},{"41df7dcb1db288e9":"gJg5v",fff8fcdf7f021ed:"cPqlV","349eb9a58219946d":"cXVrS",aba4dbd0c2e0df38:"8mxCV","83d388d2147293dd":"3Q1Z8"}],htZZS:[function(e,t,i){var n=e("48c4d449b4b6a74e"),r=e("ee4e4a7ea4b35347"),s=e("34466cd01816d06a");n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,function(e,i){s(t,e,i)},{AS_ENTRIES:!0}),t}})},{"48c4d449b4b6a74e":"gJg5v",ee4e4a7ea4b35347:"dCEHX","34466cd01816d06a":"SVTZV"}],b3JIq:[function(e,t,i){var n=e("5e9e720f67356476"),r=e("c8df38aee3cb5769"),s=e("10375c86bad61030"),a=e("3b00a68c12a1896c").f,o=e("76539d9475dc0bf0");n({target:"Object",stat:!0,forced:!o||r(function(){a(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return a(s(e),t)}})},{"5e9e720f67356476":"gJg5v",c8df38aee3cb5769:"cXVrS","10375c86bad61030":"h9ut0","3b00a68c12a1896c":"aRu9T","76539d9475dc0bf0":"6mXK1"}],kPfIJ:[function(e,t,i){var n=e("40e7403e4fec8fc5"),r=e("4e8e0ded689e341a"),s=e("ca8e12f795281afd"),a=e("2a0629723aea50a6"),o=e("d8f1f7a76c234914"),h=e("d34666d556a98edd");n({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,i,n=a(e),r=o.f,c=s(n),l={},u=0;c.length>u;)void 0!==(i=r(n,t=c[u++]))&&h(l,t,i);return l}})},{"40e7403e4fec8fc5":"gJg5v","4e8e0ded689e341a":"6mXK1",ca8e12f795281afd:"k5rhT","2a0629723aea50a6":"h9ut0",d8f1f7a76c234914:"aRu9T",d34666d556a98edd:"SVTZV"}],"9ERxS":[function(e,t,i){var n=e("effeafa72fa4fcc2"),r=e("9f4f815a609d62de"),s=e("4a158a7faad2d27f").f;n({target:"Object",stat:!0,forced:r(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:s})},{effeafa72fa4fcc2:"gJg5v","9f4f815a609d62de":"cXVrS","4a158a7faad2d27f":"bBGHM"}],"6T09z":[function(e,t,i){var n=e("9b00c005c1d693fb"),r=e("ffe585e19c7a1096"),s=e("a7cc68351642ae12"),a=e("46d7a597f20859a8"),o=e("765be3ffdd1dfa5d");n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!o},{getPrototypeOf:function(e){return a(s(e))}})},{"9b00c005c1d693fb":"gJg5v",ffe585e19c7a1096:"cXVrS",a7cc68351642ae12:"6oQEu","46d7a597f20859a8":"e8mfS","765be3ffdd1dfa5d":"2SHZm"}],nZQfS:[function(e,t,i){var n=e("b06b32f47a30ec7f"),r=e("6a46da92f3f73121"),s=e("af1ec4f8b421ab5c"),a=e("2ef79b8f3bb016c7"),o=e("a668398ad3de0d7d"),h=e("70005dfdb718ef94"),c=e("972dd804937bc18f"),l=e("281c63cf55e8b57b"),u=Object.groupBy,d=r("Object","create"),f=s([].push);n({target:"Object",stat:!0,forced:!u||l(function(){return 1!==u("ab",function(e){return e}).a.length})},{groupBy:function(e,t){o(e),a(t);var i=d(null),n=0;return c(e,function(e){var r=h(t(e,n++));r in i?f(i[r],e):i[r]=[e]}),i}})},{b06b32f47a30ec7f:"gJg5v","6a46da92f3f73121":"e5ie6",af1ec4f8b421ab5c:"2iJ57","2ef79b8f3bb016c7":"alrlv",a668398ad3de0d7d:"cHxZN","70005dfdb718ef94":"gvuJs","972dd804937bc18f":"dCEHX","281c63cf55e8b57b":"cXVrS"}],"6GBQI":[function(e,t,i){e("98e893e3166a4362")({target:"Object",stat:!0},{hasOwn:e("12a9e94ed897fcaf")})},{"98e893e3166a4362":"gJg5v","12a9e94ed897fcaf":"9JWVX"}],g4f9X:[function(e,t,i){e("451600d6bdd8e576")({target:"Object",stat:!0},{is:e("56b2e52d42ffd002")})},{"451600d6bdd8e576":"gJg5v","56b2e52d42ffd002":"3Lhyq"}],"3Lhyq":[function(e,t,i){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],eNC2R:[function(e,t,i){var n=e("435e06d616210775"),r=e("cdaf74e91df56e60");n({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},{"435e06d616210775":"gJg5v",cdaf74e91df56e60:"kKQ3P"}],czmee:[function(e,t,i){var n=e("d0fbaa7eb6b5ad4d"),r=e("421049f6c11462a7"),s=e("9ed59196a9b50c30"),a=e("590e67d09aaa38f"),o=e("c1ee6c6b89bec975"),h=Object.isFrozen;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isFrozen:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{d0fbaa7eb6b5ad4d:"gJg5v","421049f6c11462a7":"cXVrS","9ed59196a9b50c30":"8mxCV","590e67d09aaa38f":"161sQ",c1ee6c6b89bec975:"fKJ3g"}],"96RAZ":[function(e,t,i){var n=e("e0d9427683afd111"),r=e("8b49b6806ae62eca"),s=e("97ad0f68c00a1ff0"),a=e("7f6c54dd5bc88c64"),o=e("c8a04ae167e7ad37"),h=Object.isSealed;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isSealed:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{e0d9427683afd111:"gJg5v","8b49b6806ae62eca":"cXVrS","97ad0f68c00a1ff0":"8mxCV","7f6c54dd5bc88c64":"161sQ",c8a04ae167e7ad37:"fKJ3g"}],"3SReg":[function(e,t,i){var n=e("928eae3c9269318e"),r=e("bffeb5a63b3d1ddc"),s=e("4e7619f3294f09c8");n({target:"Object",stat:!0,forced:e("16ceb2cf691ec6a8")(function(){s(1)})},{keys:function(e){return s(r(e))}})},{"928eae3c9269318e":"gJg5v",bffeb5a63b3d1ddc:"6oQEu","4e7619f3294f09c8":"kQgZQ","16ceb2cf691ec6a8":"cXVrS"}],dOXap:[function(e,t,i){var n=e("3213681dc3c35763"),r=e("4aa54b730f2d3e5b"),s=e("f722ba9b4a4e493a"),a=e("d9187b4f4abc84a2"),o=e("a283188d11fd1310"),h=e("81f1f2335bc409e6"),c=e("73cff62f53644df3").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupGetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.get;while(i=h(i))}})},{"3213681dc3c35763":"gJg5v","4aa54b730f2d3e5b":"6mXK1",f722ba9b4a4e493a:"hh3RM",d9187b4f4abc84a2:"6oQEu",a283188d11fd1310:"gvuJs","81f1f2335bc409e6":"e8mfS","73cff62f53644df3":"aRu9T"}],evHBo:[function(e,t,i){var n=e("cfcc7acaa30d169a"),r=e("95cf98e445e49077"),s=e("32af9c4b10e71d8a"),a=e("a3a2f8d0bb0d269a"),o=e("fc6f1b0f9f6a3207"),h=e("4f72764854999276"),c=e("940efcd169764424").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupSetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.set;while(i=h(i))}})},{cfcc7acaa30d169a:"gJg5v","95cf98e445e49077":"6mXK1","32af9c4b10e71d8a":"hh3RM",a3a2f8d0bb0d269a:"6oQEu",fc6f1b0f9f6a3207:"gvuJs","4f72764854999276":"e8mfS","940efcd169764424":"aRu9T"}],liWu9:[function(e,t,i){var n=e("dd30e23e7eea933c"),r=e("16f89a44f17d8f35"),s=e("4ddba3dd9dcca781").onFreeze,a=e("fa786d6ffa5b300e"),o=e("3a7088156a6b24b9"),h=Object.preventExtensions;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{preventExtensions:function(e){return h&&r(e)?h(s(e)):e}})},{dd30e23e7eea933c:"gJg5v","16f89a44f17d8f35":"8mxCV","4ddba3dd9dcca781":"3Q1Z8",fa786d6ffa5b300e:"cPqlV","3a7088156a6b24b9":"cXVrS"}],a2AOJ:[function(e,t,i){var n=e("12120dafa98cd91b"),r=e("8a5ee5120083625d"),s=e("dacee5d02a7d8660"),a=e("9f80f8e0960690f0"),o=e("f3ab8c15cd26e8b0"),h=e("cf1c31853a2dbd73"),c=Object.getPrototypeOf,l=Object.setPrototypeOf,u=Object.prototype,d="__proto__";if(n&&c&&l&&!(d in u))try{r(u,d,{configurable:!0,get:function(){return c(o(this))},set:function(e){var t=h(this);a(e)&&s(t)&&l(t,e)}})}catch(e){}},{"12120dafa98cd91b":"6mXK1","8a5ee5120083625d":"3NI4M",dacee5d02a7d8660:"8mxCV","9f80f8e0960690f0":"6XW5L",f3ab8c15cd26e8b0:"6oQEu",cf1c31853a2dbd73:"cHxZN"}],yqtQx:[function(e,t,i){var n=e("7431c9c36c061192"),r=e("254eb19750975bda"),s=e("2f01f54810b729a0").onFreeze,a=e("f352701af16ccb01"),o=e("c5798f0bf47c2f71"),h=Object.seal;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{seal:function(e){return h&&r(e)?h(s(e)):e}})},{"7431c9c36c061192":"gJg5v","254eb19750975bda":"8mxCV","2f01f54810b729a0":"3Q1Z8",f352701af16ccb01:"cPqlV",c5798f0bf47c2f71:"cXVrS"}],"4M7RG":[function(e,t,i){e("9b49024ba2cb31fd")({target:"Object",stat:!0},{setPrototypeOf:e("3492d4712278eb46")})},{"9b49024ba2cb31fd":"gJg5v","3492d4712278eb46":"arrdQ"}],"7ybM1":[function(e,t,i){var n=e("2f5378debd330ed5"),r=e("5e0718aecf12f1e8"),s=e("6b32f4accffdcba8");n||r(Object.prototype,"toString",s,{unsafe:!0})},{"2f5378debd330ed5":"9axlf","5e0718aecf12f1e8":"4CPdc","6b32f4accffdcba8":"a9Vf3"}],a9Vf3:[function(e,t,i){var n=e("312e54676af41375"),r=e("2dbce13c946fe9d0");t.exports=n?({}).toString:function(){return"[object "+r(this)+"]"}},{"312e54676af41375":"9axlf","2dbce13c946fe9d0":"cRCRk"}],csFkS:[function(e,t,i){var n=e("eb35dc894cb42ba5"),r=e("f1b9830bcb61759d").values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},{eb35dc894cb42ba5:"gJg5v",f1b9830bcb61759d:"iwcqE"}],"6V0HA":[function(e,t,i){var n=e("c1505c05c57d39cb"),r=e("fd7eb946ed597b55");n({global:!0,forced:parseFloat!==r},{parseFloat:r})},{c1505c05c57d39cb:"gJg5v",fd7eb946ed597b55:"guYqF"}],"26fdt":[function(e,t,i){var n=e("3ca2a8550b205bbe"),r=e("f57aad6998179c26");n({global:!0,forced:parseInt!==r},{parseInt:r})},{"3ca2a8550b205bbe":"gJg5v",f57aad6998179c26:"9rXua"}],"8nI8r":[function(e,t,i){e("71201fb984fca5e2"),e("944d2d67bf4aa279"),e("259dee16b78a9293"),e("bac68e84460cf44d"),e("35807fabff0322bf"),e("8713c69981abff7e")},{"71201fb984fca5e2":"dkJyI","944d2d67bf4aa279":"2zMO8","259dee16b78a9293":"bizKp",bac68e84460cf44d:"fDY5E","35807fabff0322bf":"2dUxj","8713c69981abff7e":"6tXif"}],dkJyI:[function(e,t,i){var n,r,s,a,o=e("cdd137752c5b4a8e"),h=e("27c8c7e1f0444fd2"),c=e("e9cf171cc5f9ff78"),l=e("d198a89966b49f7a"),u=e("643c25bd5b0dfc21"),d=e("76c41f8cfb7124b7"),f=e("6f7c1c1190868f98"),p=e("8b9ff6cd5f4bf470"),g=e("e2d999cd3139e29e"),m=e("37ba5f9496a9ce6f"),v=e("c754acf38f3fbf83"),y=e("f9d3438feb00503"),b=e("eea1cec1753c28d3"),x=e("2b3f8c9a01947fd4"),E=e("d7da4b96347ff949").set,w=e("5967e7e0ab765b55"),T=e("45c77ce65cdfa56e"),S=e("ed2bd3e4981b5b7f"),A=e("67a62e6e19993e50"),C=e("d047e80fbdc4abaf"),_=e("cb21f79465bb7a4f"),I=e("d92ec88829ba956d"),O=e("f518fe10c60b8bee"),P="Promise",M=I.CONSTRUCTOR,R=I.REJECTION_EVENT,L=I.SUBCLASSING,D=C.getterFor(P),k=C.set,N=_&&_.prototype,F=_,B=N,U=l.TypeError,V=l.document,G=l.process,j=O.f,W=j,Y=!!(V&&V.createEvent&&l.dispatchEvent),H="unhandledrejection",z=function(e){var t;return!!(y(e)&&v(t=e.then))&&t},X=function(e,t){var i,n,r,s=t.value,a=1===t.state,o=a?e.ok:e.fail,h=e.resolve,c=e.reject,l=e.domain;try{o?(a||(2===t.rejection&&Q(t),t.rejection=1),!0===o?i=s:(l&&l.enter(),i=o(s),l&&(l.exit(),r=!0)),i===e.promise?c(new U("Promise-chain cycle")):(n=z(i))?u(n,i,h,c):h(i)):c(s)}catch(e){l&&!r&&l.exit(),c(e)}},K=function(e,t){e.notified||(e.notified=!0,w(function(){for(var i,n=e.reactions;i=n.get();)X(i,e);e.notified=!1,t&&!e.rejection&&J(e)}))},q=function(e,t,i){var n,r;Y?((n=V.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:i},!R&&(r=l["on"+e])?r(n):e===H&&T("Unhandled promise rejection",i)},J=function(e){u(E,l,function(){var t,i=e.facade,n=e.value;if($(e)&&(t=S(function(){c?G.emit("unhandledRejection",n,i):q(H,i,n)}),e.rejection=c||$(e)?2:1,t.error))throw t.value})},$=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){u(E,l,function(){var t=e.facade;c?G.emit("rejectionHandled",t):q("rejectionhandled",t,e.value)})},Z=function(e,t,i){return function(n){e(t,n,i)}},ee=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,K(e,!0))},et=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new U("Promise can't be resolved itself");var n=z(t);n?w(function(){var i={done:!1};try{u(n,t,Z(et,i,e),Z(ee,i,e))}catch(t){ee(i,t,e)}}):(e.value=t,e.state=1,K(e,!1))}catch(t){ee({done:!1},t,e)}}};if(M&&(B=(F=function(e){b(this,B),m(e),u(n,this);var t=D(this);try{e(Z(et,t),Z(ee,t))}catch(e){ee(t,e)}}).prototype,(n=function(e){k(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:null})}).prototype=d(B,"then",function(e,t){var i=D(this),n=j(x(this,F));return i.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=c?G.domain:void 0,0===i.state?i.reactions.add(n):w(function(){X(n,i)}),n.promise}),r=function(){var e=new n,t=D(e);this.promise=e,this.resolve=Z(et,t),this.reject=Z(ee,t)},O.f=j=function(e){return e===F||e===s?new r(e):W(e)},!h&&v(_)&&N!==Object.prototype)){a=N.then,L||d(N,"then",function(e,t){var i=this;return new F(function(e,t){u(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}f&&f(N,B)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:F}),p(F,P,!1,!0),g(P)},{cdd137752c5b4a8e:"gJg5v","27c8c7e1f0444fd2":"jHRGA",e9cf171cc5f9ff78:"hdoIk",d198a89966b49f7a:"7Z171","643c25bd5b0dfc21":"bOssl","76c41f8cfb7124b7":"4CPdc","6f7c1c1190868f98":"arrdQ","8b9ff6cd5f4bf470":"dkhk9",e2d999cd3139e29e:"c7jXZ","37ba5f9496a9ce6f":"alrlv",c754acf38f3fbf83:"h1Wnr",f9d3438feb00503:"8mxCV",eea1cec1753c28d3:"95yA1","2b3f8c9a01947fd4":"CaSkn",d7da4b96347ff949:"iEUCI","5967e7e0ab765b55":"fhIs0","45c77ce65cdfa56e":"8UxN2",ed2bd3e4981b5b7f:"7qEEW","67a62e6e19993e50":"74jUI",d047e80fbdc4abaf:"ixHS2",cb21f79465bb7a4f:"BGWp5",d92ec88829ba956d:"cAqqZ",f518fe10c60b8bee:"iq5DC"}],CaSkn:[function(e,t,i){var n=e("1dd3546388607f52"),r=e("1407b26f20411731"),s=e("e59a7a10597b8e96"),a=e("16c256a8cc3c03fd")("species");t.exports=function(e,t){var i,o=n(e).constructor;return void 0===o||s(i=n(o)[a])?t:r(i)}},{"1dd3546388607f52":"dPzbI","1407b26f20411731":"euAEP",e59a7a10597b8e96:"8AxCV","16c256a8cc3c03fd":"5CuF7"}],euAEP:[function(e,t,i){var n=e("f0753b26326019c1"),r=e("8e6a26f37529644e"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a constructor")}},{f0753b26326019c1:"eytEI","8e6a26f37529644e":"3zerS"}],iEUCI:[function(e,t,i){var n,r,s,a,o=e("629a4d99f4fe5b2e"),h=e("e574be68c288c7c8"),c=e("df212787338802d3"),l=e("afdf018c2d01bbc6"),u=e("35a3e849940fd612"),d=e("b8bf5434d2248ca7"),f=e("731f9370cc21fc3b"),p=e("ec358060964e4bde"),g=e("907adb6d219da7a3"),m=e("f398561ebd49a798"),v=e("8a8e342aaad83bb"),y=e("6eef8b4e43dd6731"),b=o.setImmediate,x=o.clearImmediate,E=o.process,w=o.Dispatch,T=o.Function,S=o.MessageChannel,A=o.String,C=0,_={},I="onreadystatechange";d(function(){n=o.location});var O=function(e){if(u(_,e)){var t=_[e];delete _[e],t()}},P=function(e){return function(){O(e)}},M=function(e){O(e.data)},R=function(e){o.postMessage(A(e),n.protocol+"//"+n.host)};b&&x||(b=function(e){m(arguments.length,1);var t=l(e)?e:T(e),i=p(arguments,1);return _[++C]=function(){h(t,void 0,i)},r(C),C},x=function(e){delete _[e]},y?r=function(e){E.nextTick(P(e))}:w&&w.now?r=function(e){w.now(P(e))}:S&&!v?(a=(s=new S).port2,s.port1.onmessage=M,r=c(a.postMessage,a)):o.addEventListener&&l(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(r=R,o.addEventListener("message",M,!1)):r=I in g("script")?function(e){f.appendChild(g("script"))[I]=function(){f.removeChild(this),O(e)}}:function(e){setTimeout(P(e),0)}),t.exports={set:b,clear:x}},{"629a4d99f4fe5b2e":"7Z171",e574be68c288c7c8:"2fjXG",df212787338802d3:"f1CxE",afdf018c2d01bbc6:"h1Wnr","35a3e849940fd612":"9JWVX",b8bf5434d2248ca7:"cXVrS","731f9370cc21fc3b":"23b1K",ec358060964e4bde:"eO8Ta","907adb6d219da7a3":"SppDD",f398561ebd49a798:"h3DcZ","8a8e342aaad83bb":"bUue9","6eef8b4e43dd6731":"hdoIk"}],h3DcZ:[function(e,t,i){var n=TypeError;t.exports=function(e,t){if(e1?a(arguments,1):[],i=o.f(this),n=c(function(){return s(h(e),void 0,t)});return(n.error?i.reject:i.resolve)(n.value),i.promise}})},{e891936b921586ce:"gJg5v",be55d0d9787f386c:"7Z171","53a5a11417313428":"2fjXG",b6f9059ddb81e98b:"eO8Ta","4e74861c17e890c3":"iq5DC","7900efa3cdb7a624":"alrlv","1fb2dc6087d1e9d5":"7qEEW"}],fDjj9:[function(e,t,i){var n=e("c539d5627c4a86aa"),r=e("f3ae7f423c78fd60");n({target:"Promise",stat:!0},{withResolvers:function(){var e=r.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},{c539d5627c4a86aa:"gJg5v",f3ae7f423c78fd60:"iq5DC"}],dejPc:[function(e,t,i){var n=e("1c621266486af366"),r=e("8dc2c7c905c7079"),s=e("65b541dabe35d529"),a=e("536113b176a05b60");n({target:"Reflect",stat:!0,forced:!e("e032bfdb61e2620b")(function(){Reflect.apply(function(){})})},{apply:function(e,t,i){return r(s(e),t,a(i))}})},{"1c621266486af366":"gJg5v","8dc2c7c905c7079":"2fjXG","65b541dabe35d529":"alrlv","536113b176a05b60":"dPzbI",e032bfdb61e2620b:"cXVrS"}],kL7gw:[function(e,t,i){var n=e("df593a7c66399ae2"),r=e("aa786cd255199284"),s=e("c585a7fc86970645"),a=e("d05ce57b271ff568"),o=e("488fff441ba5bfef"),h=e("688b651555d83b8f"),c=e("c7a921b7c24a97c"),l=e("2ff4acc7df7eb046"),u=e("2ad48193afce6a95"),d=r("Reflect","construct"),f=Object.prototype,p=[].push,g=u(function(){function e(){}return!(d(function(){},[],e) instanceof e)}),m=!u(function(){d(function(){})}),v=g||m;n({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){o(e),h(t);var i=arguments.length<3?e:o(arguments[2]);if(m&&!g)return d(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return s(p,n,t),new(s(a,e,n))}var r=i.prototype,u=l(c(r)?r:f),v=s(e,u,t);return c(v)?v:u}})},{df593a7c66399ae2:"gJg5v",aa786cd255199284:"e5ie6",c585a7fc86970645:"2fjXG",d05ce57b271ff568:"7PoYT","488fff441ba5bfef":"euAEP","688b651555d83b8f":"dPzbI",c7a921b7c24a97c:"8mxCV","2ff4acc7df7eb046":"7isQ3","2ad48193afce6a95":"cXVrS"}],lQsQz:[function(e,t,i){var n=e("dc2eaf4c122f82d4"),r=e("55416992b3cdb7ec"),s=e("c2c755875e2adbfa"),a=e("578d27629d28889e"),o=e("426724837dbcc1e9");n({target:"Reflect",stat:!0,forced:e("71d0ba7a21c21fc7")(function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})}),sham:!r},{defineProperty:function(e,t,i){s(e);var n=a(t);s(i);try{return o.f(e,n,i),!0}catch(e){return!1}}})},{dc2eaf4c122f82d4:"gJg5v","55416992b3cdb7ec":"6mXK1",c2c755875e2adbfa:"dPzbI","578d27629d28889e":"gvuJs","426724837dbcc1e9":"hvqCQ","71d0ba7a21c21fc7":"cXVrS"}],jy0xe:[function(e,t,i){var n=e("6dcb929d30bdbfde"),r=e("3dedf4d14121a863"),s=e("fbd53ec455a05b95").f;n({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var i=s(r(e),t);return(!i||!!i.configurable)&&delete e[t]}})},{"6dcb929d30bdbfde":"gJg5v","3dedf4d14121a863":"dPzbI",fbd53ec455a05b95:"aRu9T"}],N0A9g:[function(e,t,i){var n=e("36af64a139a04a9f"),r=e("2b0e8e0105e0ccfb"),s=e("c12275a56fb80891"),a=e("8afae34daed2ddfd"),o=e("a0fe3971b7cb6675"),h=e("64fb71955ccea62a"),c=e("42f515e0257c869d");n({target:"Reflect",stat:!0},{get:function e(t,i){var n,l,u=arguments.length<3?t:arguments[2];return a(t)===u?t[i]:(n=h.f(t,i))?o(n)?n.value:void 0===n.get?void 0:r(n.get,u):s(l=c(t))?e(l,i,u):void 0}})},{"36af64a139a04a9f":"gJg5v","2b0e8e0105e0ccfb":"bOssl",c12275a56fb80891:"8mxCV","8afae34daed2ddfd":"dPzbI",a0fe3971b7cb6675:"gi9DO","64fb71955ccea62a":"aRu9T","42f515e0257c869d":"e8mfS"}],gi9DO:[function(e,t,i){var n=e("50fb4bd8f6d0c370");t.exports=function(e){return void 0!==e&&(n(e,"value")||n(e,"writable"))}},{"50fb4bd8f6d0c370":"9JWVX"}],bnSd3:[function(e,t,i){var n=e("d7bd54e98aaffcc7"),r=e("7232f0c071c940d0"),s=e("10cdead7a28df296"),a=e("de341026ceb57ac3");n({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(s(e),t)}})},{d7bd54e98aaffcc7:"gJg5v","7232f0c071c940d0":"6mXK1","10cdead7a28df296":"dPzbI",de341026ceb57ac3:"aRu9T"}],hCLFJ:[function(e,t,i){var n=e("e0d7bd3b2cd5e427"),r=e("28c21999f76acbe2"),s=e("5d4e809754fe7c85");n({target:"Reflect",stat:!0,sham:!e("b7b6a27574b33ffc")},{getPrototypeOf:function(e){return s(r(e))}})},{e0d7bd3b2cd5e427:"gJg5v","28c21999f76acbe2":"dPzbI","5d4e809754fe7c85":"e8mfS",b7b6a27574b33ffc:"2SHZm"}],jFiZs:[function(e,t,i){e("f5a4987d6328de60")({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},{f5a4987d6328de60:"gJg5v"}],"1BYUa":[function(e,t,i){var n=e("f1cf95331dac0a5c"),r=e("6ffd352ee2b78315"),s=e("ec1223a1980707d0");n({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),s(e)}})},{f1cf95331dac0a5c:"gJg5v","6ffd352ee2b78315":"dPzbI",ec1223a1980707d0:"kKQ3P"}],"3gYE0":[function(e,t,i){e("e6256b53ff8e7ff7")({target:"Reflect",stat:!0},{ownKeys:e("62694a198a2d39f1")})},{e6256b53ff8e7ff7:"gJg5v","62694a198a2d39f1":"k5rhT"}],"8Ariw":[function(e,t,i){var n=e("21a794712b7c3b28"),r=e("b2540e28cfeb7421"),s=e("5c89b74916f5e3f1");n({target:"Reflect",stat:!0,sham:!e("368dee480fe6c03a")},{preventExtensions:function(e){s(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(e){return!1}}})},{"21a794712b7c3b28":"gJg5v",b2540e28cfeb7421:"e5ie6","5c89b74916f5e3f1":"dPzbI","368dee480fe6c03a":"cPqlV"}],fpMBl:[function(e,t,i){var n=e("ecfb0dd8a941692d"),r=e("ff301a827b8a1848"),s=e("2c02940a559ef1bc"),a=e("7a2e80973762c50c"),o=e("21efaf46e8fea96f"),h=e("8f78be83a230ea4a"),c=e("acf3c26369354b83"),l=e("4893e43c9a11fc63"),u=e("48482fa6862b803a"),d=e("de1987fde7f85915");n({target:"Reflect",stat:!0,forced:h(function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)})},{set:function e(t,i,n){var h,f,p,g=arguments.length<4?t:arguments[3],m=l.f(s(t),i);if(!m){if(a(f=u(t)))return e(f,i,n,g);m=d(0)}if(o(m)){if(!1===m.writable||!a(g))return!1;if(h=l.f(g,i)){if(h.get||h.set||!1===h.writable)return!1;h.value=n,c.f(g,i,h)}else c.f(g,i,d(0,n))}else{if(void 0===(p=m.set))return!1;r(p,g,n)}return!0}})},{ecfb0dd8a941692d:"gJg5v",ff301a827b8a1848:"bOssl","2c02940a559ef1bc":"dPzbI","7a2e80973762c50c":"8mxCV","21efaf46e8fea96f":"gi9DO","8f78be83a230ea4a":"cXVrS",acf3c26369354b83:"hvqCQ","4893e43c9a11fc63":"aRu9T","48482fa6862b803a":"e8mfS",de1987fde7f85915:"5toj2"}],"5tIGd":[function(e,t,i){var n=e("1901fc8accbc2376"),r=e("1c4ec63b43256656"),s=e("2fee865898c5ee13"),a=e("f549073ca7dfb3d2");a&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),s(t);try{return a(e,t),!0}catch(e){return!1}}})},{"1901fc8accbc2376":"gJg5v","1c4ec63b43256656":"dPzbI","2fee865898c5ee13":"hEWXk",f549073ca7dfb3d2:"arrdQ"}],"14MkC":[function(e,t,i){var n=e("9aa7ab2c6cbf6701"),r=e("28bf5c0ba6cfd67b"),s=e("717556d45c34d721");n({global:!0},{Reflect:{}}),s(r.Reflect,"Reflect",!0)},{"9aa7ab2c6cbf6701":"gJg5v","28bf5c0ba6cfd67b":"7Z171","717556d45c34d721":"dkhk9"}],"2JQK3":[function(e,t,i){var n=e("c8639d3a74e6bb07"),r=e("31e10ac977d93a17"),s=e("7f079a60fe35f235"),a=e("66b0d772c6e443af"),o=e("11d7cdfa8687037e"),h=e("5fcf789712ec006"),c=e("488fe57e39be2d0d"),l=e("8b1d3e9ebc10b376").f,u=e("6c4ec99bc7b85243"),d=e("28b4ed60c7ffe147"),f=e("f00c99d31179ed39"),p=e("867ea555b957a0aa"),g=e("86e9756a5a6a0176"),m=e("438bf11983e20900"),v=e("818c2b1aecf93017"),y=e("5b540f0dbf00266f"),b=e("5cfbf10059a84a33"),x=e("2ff319236881379d").enforce,E=e("7f2183994b17a7e8"),w=e("7edc7513ec6ac4d0"),T=e("fbaf905791cdbfe"),S=e("28f5087d79ccd92a"),A=w("match"),C=r.RegExp,_=C.prototype,I=r.SyntaxError,O=s(_.exec),P=s("".charAt),M=s("".replace),R=s("".indexOf),L=s("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,k=/a/g,N=/a/g,F=new C(k)!==k,B=g.MISSED_STICKY,U=g.UNSUPPORTED_Y,V=n&&(!F||B||T||S||y(function(){return N[A]=!1,C(k)!==k||C(N)===N||"/a/i"!==String(C(k,"i"))})),G=function(e){for(var t,i=e.length,n=0,r="",s=!1;n<=i;n++){if("\\"===(t=P(e,n))){r+=t+P(e,++n);continue}s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),r+=t):r+="[\\s\\S]"}return r},j=function(e){for(var t,i=e.length,n=0,r="",s=[],a=c(null),o=!1,h=!1,l=0,u="";n<=i;n++){if("\\"===(t=P(e,n)))t+=P(e,++n);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(r+=t,"?:"===L(e,n+1,n+3))continue;O(D,L(e,n+1))&&(n+=2,h=!0),l++;continue;case">"===t&&h:if(""===u||b(a,u))throw new I("Invalid capture group name");a[u]=!0,s[s.length]=[u,l],h=!1,u="";continue}h?u+=t:r+=t}return[r,s]};if(a("RegExp",V)){for(var W=function(e,t){var i,n,r,s,a,c,l=u(_,this),g=d(e),m=void 0===t,v=[],y=e;if(!l&&g&&m&&e.constructor===W)return e;if((g||u(_,e))&&(e=e.source,m&&(t=p(y))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),y=e,T&&"dotAll"in k&&(n=!!t&&R(t,"s")>-1)&&(t=M(t,/s/g,"")),i=t,B&&"sticky"in k&&(r=!!t&&R(t,"y")>-1)&&U&&(t=M(t,/y/g,"")),S&&(e=(s=j(e))[0],v=s[1]),a=o(C(e,t),l?this:_,W),(n||r||v.length)&&(c=x(a),n&&(c.dotAll=!0,c.raw=W(G(e),i)),r&&(c.sticky=!0),v.length&&(c.groups=v)),e!==y)try{h(a,"source",""===y?"(?:)":y)}catch(e){}return a},Y=l(C),H=0;Y.length>H;)m(W,C,Y[H++]);_.constructor=W,W.prototype=_,v(r,"RegExp",W,{constructor:!0})}E("RegExp")},{c8639d3a74e6bb07:"6mXK1","31e10ac977d93a17":"7Z171","7f079a60fe35f235":"2iJ57","66b0d772c6e443af":"gE5NQ","11d7cdfa8687037e":"30not","5fcf789712ec006":"gKM90","488fe57e39be2d0d":"7isQ3","8b1d3e9ebc10b376":"dDV3S","6c4ec99bc7b85243":"d5bNd","28b4ed60c7ffe147":"4WTYw",f00c99d31179ed39:"4x6uB","867ea555b957a0aa":"iG8db","86e9756a5a6a0176":"arHMc","438bf11983e20900":"7fWkz","818c2b1aecf93017":"4CPdc","5b540f0dbf00266f":"cXVrS","5cfbf10059a84a33":"9JWVX","2ff319236881379d":"ixHS2","7f2183994b17a7e8":"c7jXZ","7edc7513ec6ac4d0":"5CuF7",fbaf905791cdbfe:"9jBfE","28f5087d79ccd92a":"9XBEq"}],"4WTYw":[function(e,t,i){var n=e("4ca57df9821dbfa3"),r=e("b867bee476fc5018"),s=e("42cd33b6dbd61bee")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===r(e))}},{"4ca57df9821dbfa3":"8mxCV",b867bee476fc5018:"161sQ","42cd33b6dbd61bee":"5CuF7"}],iG8db:[function(e,t,i){var n=e("fd54476372f3a204"),r=e("a12d2126c329f45"),s=e("815509f48e0b1e36"),a=e("37fba4854c4ab846"),o=RegExp.prototype;t.exports=function(e){var t=e.flags;return!(void 0===t&&!("flags"in o)&&!r(e,"flags")&&s(o,e))?t:n(a,e)}},{fd54476372f3a204:"bOssl",a12d2126c329f45:"9JWVX","815509f48e0b1e36":"d5bNd","37fba4854c4ab846":"jjoUH"}],jjoUH:[function(e,t,i){var n=e("136abace0aec2b5c");t.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},{"136abace0aec2b5c":"dPzbI"}],arHMc:[function(e,t,i){var n=e("797bef35e651cb5e"),r=e("d87f6288614c07bc").RegExp,s=n(function(){var e=r("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=s||n(function(){return!r("a","y").sticky}),o=s||n(function(){var e=r("^r","gy");return e.lastIndex=2,null!==e.exec("str")});t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},{"797bef35e651cb5e":"cXVrS",d87f6288614c07bc:"7Z171"}],"9jBfE":[function(e,t,i){var n=e("e4784e58ea762065"),r=e("ea51a856230c58ac").RegExp;t.exports=n(function(){var e=r(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},{e4784e58ea762065:"cXVrS",ea51a856230c58ac:"7Z171"}],"9XBEq":[function(e,t,i){var n=e("b9b1a0fbdd999ded"),r=e("f47a97b0c4cfeafc").RegExp;t.exports=n(function(){var e=r("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},{b9b1a0fbdd999ded:"cXVrS",f47a97b0c4cfeafc:"7Z171"}],"9radj":[function(e,t,i){var n=e("a9f8f60f2f751fb4"),r=e("f4bf414038137d54"),s=e("f6019dcdb547562c"),a=e("ca788245c2356b08"),o=e("ff536bd90d3c7c05").get,h=RegExp.prototype,c=TypeError;n&&r&&a(h,"dotAll",{configurable:!0,get:function(){if(this!==h){if("RegExp"===s(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},{a9f8f60f2f751fb4:"6mXK1",f4bf414038137d54:"9jBfE",f6019dcdb547562c:"161sQ",ca788245c2356b08:"3NI4M",ff536bd90d3c7c05:"ixHS2"}],"4cips":[function(e,t,i){var n=e("72ba4de9841213e"),r=e("d4ebaff1663cc5b9");n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},{"72ba4de9841213e":"gJg5v",d4ebaff1663cc5b9:"gpoGl"}],gpoGl:[function(e,t,i){var n,r,s=e("698f504b4733b02d"),a=e("6d0d2df39383a10b"),o=e("382af5492ddc18e6"),h=e("96e0244464229d3"),c=e("3bd1d72d4987e0ff"),l=e("12c3e6e355312395"),u=e("38d060dff8e4ab54"),d=e("aec1e11e2cd92d19").get,f=e("7d9db6b4177b833a"),p=e("b26a8ca5152d0a8d"),g=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,v=m,y=a("".charAt),b=a("".indexOf),x=a("".replace),E=a("".slice),w=(r=/b*/g,s(m,n=/a/,"a"),s(m,r,"a"),0!==n.lastIndex||0!==r.lastIndex),T=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(w||S||T||f||p)&&(v=function(e){var t,i,n,r,a,c,l,f=d(this),p=o(e),A=f.raw;if(A)return A.lastIndex=this.lastIndex,t=s(v,A,p),this.lastIndex=A.lastIndex,t;var C=f.groups,_=T&&this.sticky,I=s(h,this),O=this.source,P=0,M=p;if(_&&(-1===b(I=x(I,"y",""),"g")&&(I+="g"),M=E(p,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==y(p,this.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,P++),i=RegExp("^(?:"+O+")",I)),S&&(i=RegExp("^"+O+"$(?!\\s)",I)),w&&(n=this.lastIndex),r=s(m,_?i:this,M),_?r?(r.input=E(r.input,P),r[0]=E(r[0],P),r.index=this.lastIndex,this.lastIndex+=r[0].length):this.lastIndex=0:w&&r&&(this.lastIndex=this.global?r.index+r[0].length:n),S&&r&&r.length>1&&s(g,r[0],i,function(){for(a=1;ai.size?h(i.getIterator(),function(e){u(t,e)&&l(r,e)}):o(t,function(e){i.includes(e)&&l(r,e)}),r}},{"7bfb130f16b8292a":"1uHXp","47146aea8f1cd561":"aKtSD",d1a604e694f4d1c9:"dDfau",cd0f29a36bce3c77:"2mzII","569d3010c2a051bc":"dSeD9",f15171665078c946:"hUCXP"}],ebh58:[function(e,t,i){var n=e("a1707a0c61f5a536"),r=e("cb8bc5c7a60da2c0");n({target:"Set",proto:!0,real:!0,forced:!e("d245d89a0dca71e2")("isDisjointFrom")},{isDisjointFrom:r})},{a1707a0c61f5a536:"gJg5v",cb8bc5c7a60da2c0:"fsPLP",d245d89a0dca71e2:"cAght"}],fsPLP:[function(e,t,i){var n=e("4bcf2c126f0ee7e9"),r=e("5f2538d74cbdf8b3").has,s=e("edcd27260fbf6ef5"),a=e("9b207c4104d5301c"),o=e("bae422673873a59e"),h=e("ba88aed3f0227034"),c=e("11af6bfd4840cc69");t.exports=function(e){var t=n(this),i=a(e);if(s(t)<=i.size)return!1!==o(t,function(e){if(i.includes(e))return!1},!0);var l=i.getIterator();return!1!==h(l,function(e){if(r(t,e))return c(l,"normal",!1)})}},{"4bcf2c126f0ee7e9":"1uHXp","5f2538d74cbdf8b3":"aKtSD",edcd27260fbf6ef5:"dDfau","9b207c4104d5301c":"2mzII",bae422673873a59e:"dSeD9",ba88aed3f0227034:"hUCXP","11af6bfd4840cc69":"58eij"}],"5aq0U":[function(e,t,i){var n=e("67c95d67210a1f28"),r=e("ad07e334c2be4c40");n({target:"Set",proto:!0,real:!0,forced:!e("87c6020e8c27ff9d")("isSubsetOf")},{isSubsetOf:r})},{"67c95d67210a1f28":"gJg5v",ad07e334c2be4c40:"6M8p1","87c6020e8c27ff9d":"cAght"}],"6M8p1":[function(e,t,i){var n=e("3d5a277c60f35ee0"),r=e("8b5056cb353b9363"),s=e("5c8afb92d90a7afe"),a=e("5d0efb34cef239d0");t.exports=function(e){var t=n(this),i=a(e);return!(r(t)>i.size)&&!1!==s(t,function(e){if(!i.includes(e))return!1},!0)}},{"3d5a277c60f35ee0":"1uHXp","8b5056cb353b9363":"dDfau","5c8afb92d90a7afe":"dSeD9","5d0efb34cef239d0":"2mzII"}],"8hV4V":[function(e,t,i){var n=e("709d88585366e67"),r=e("56957227e511c32f");n({target:"Set",proto:!0,real:!0,forced:!e("96eae72d49b9b957")("isSupersetOf")},{isSupersetOf:r})},{"709d88585366e67":"gJg5v","56957227e511c32f":"eyhzP","96eae72d49b9b957":"cAght"}],eyhzP:[function(e,t,i){var n=e("93254e314b2e5736"),r=e("be41c371321728ce").has,s=e("95f22a3e4ec3e3cd"),a=e("3cd91641e66e9eeb"),o=e("9565d7b14e850c29"),h=e("9f7dd30215d71bc9");t.exports=function(e){var t=n(this),i=a(e);if(s(t)=0?n:i+n;return r<0||r>=i?void 0:c(t,r)}})},{"473defaa8915e9e4":"gJg5v",dd4afa154631abab:"2iJ57",d699b04e9a9f7a28:"cHxZN",df1114985710f2b3:"gAgUH","3b247286b7d8c4d5":"4x6uB",da5b773a057f92aa:"cXVrS"}],g0fSy:[function(e,t,i){var n=e("4793fe8f86582840"),r=e("785f7a78d0dffe20").codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},{"4793fe8f86582840":"gJg5v","785f7a78d0dffe20":"fVu0j"}],fVu0j:[function(e,t,i){var n=e("8b9beff9818f042"),r=e("d3e375e7697978fb"),s=e("545a72c28133c459"),a=e("5bafa9e5b372669c"),o=n("".charAt),h=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,i){var n,l,u=s(a(t)),d=r(i),f=u.length;return d<0||d>=f?e?"":void 0:(n=h(u,d))<55296||n>56319||d+1===f||(l=h(u,d+1))<56320||l>57343?e?o(u,d):n:e?c(u,d,d+2):(n-55296<<10)+(l-56320)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},{"8b9beff9818f042":"2iJ57",d3e375e7697978fb:"gAgUH","545a72c28133c459":"4x6uB","5bafa9e5b372669c":"cHxZN"}],eKkbH:[function(e,t,i){var n,r=e("b3cd31deb9d32a8c"),s=e("c719ddda901eac13"),a=e("e75304a6599a5e3c").f,o=e("99883df659b0f5cb"),h=e("e5d8defa036db553"),c=e("4c78f4ce8264459e"),l=e("da4ce5f132e95194"),u=e("58da9c5323c25a0f"),d=e("e85ff4c5cebafc14"),f=s("".slice),p=Math.min,g=u("endsWith");r({target:"String",proto:!0,forced:!(!d&&!g&&(n=a(String.prototype,"endsWith"))&&!n.writable)&&!g},{endsWith:function(e){var t=h(l(this));c(e);var i=arguments.length>1?arguments[1]:void 0,n=t.length,r=void 0===i?n:p(o(i),n),s=h(e);return f(t,r-s.length,r)===s}})},{b3cd31deb9d32a8c:"gJg5v",c719ddda901eac13:"c4z5p",e75304a6599a5e3c:"aRu9T","99883df659b0f5cb":"lQsU7",e5d8defa036db553:"4x6uB","4c78f4ce8264459e":"6Sz3M",da4ce5f132e95194:"cHxZN","58da9c5323c25a0f":"i38lK",e85ff4c5cebafc14:"jHRGA"}],"6Sz3M":[function(e,t,i){var n=e("7b932b7711b6ae16"),r=TypeError;t.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},{"7b932b7711b6ae16":"4WTYw"}],i38lK:[function(e,t,i){var n=e("303b9f26f388462e")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},{"303b9f26f388462e":"5CuF7"}],dLJLG:[function(e,t,i){var n=e("f7ab90f668dfed5f"),r=e("f19d1a907413c68d"),s=e("6914a342ea61c319"),a=RangeError,o=String.fromCharCode,h=String.fromCodePoint,c=r([].join);n({target:"String",stat:!0,arity:1,forced:!!h&&1!==h.length},{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,r=0;n>r;){if(t=+arguments[r++],s(t,1114111)!==t)throw new a(t+" is not a valid code point");i[r]=t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320)}return c(i,"")}})},{f7ab90f668dfed5f:"gJg5v",f19d1a907413c68d:"2iJ57","6914a342ea61c319":"47gaI"}],cDQpr:[function(e,t,i){var n=e("1cde7a4fbe24deb1"),r=e("d9ff51b37cd276ef"),s=e("b1c9b74814a0e4ee"),a=e("36f262aff4650984"),o=e("c6f2de0a65cb2a09"),h=e("30dec888dfe829e2"),c=r("".indexOf);n({target:"String",proto:!0,forced:!h("includes")},{includes:function(e){return!!~c(o(a(this)),o(s(e)),arguments.length>1?arguments[1]:void 0)}})},{"1cde7a4fbe24deb1":"gJg5v",d9ff51b37cd276ef:"2iJ57",b1c9b74814a0e4ee:"6Sz3M","36f262aff4650984":"cHxZN",c6f2de0a65cb2a09:"4x6uB","30dec888dfe829e2":"i38lK"}],kFTda:[function(e,t,i){var n=e("119056f2894f6d80"),r=e("5d2e4bc1718ad78f"),s=e("9410272c8796c548"),a=e("8f81c73916cb66a4"),o=r("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var e=a(s(this)),t=e.length,i=0;i=56320||++i>=t||(64512&o(e,i))!=56320))return!1}return!0}})},{"119056f2894f6d80":"gJg5v","5d2e4bc1718ad78f":"2iJ57","9410272c8796c548":"cHxZN","8f81c73916cb66a4":"4x6uB"}],i2qFG:[function(e,t,i){var n=e("e8b36e9e8f60deb1").charAt,r=e("99724183e9ac759e"),s=e("75c45c226da41a58"),a=e("5bce8e62b9ff7984"),o=e("cab4a14c8e102263"),h="String Iterator",c=s.set,l=s.getterFor(h);a(String,"String",function(e){c(this,{type:h,string:r(e),index:0})},function(){var e,t=l(this),i=t.string,r=t.index;return r>=i.length?o(void 0,!0):(e=n(i,r),t.index+=e.length,o(e,!1))})},{e8b36e9e8f60deb1:"fVu0j","99724183e9ac759e":"4x6uB","75c45c226da41a58":"ixHS2","5bce8e62b9ff7984":"klSVb",cab4a14c8e102263:"dwU83"}],"6dNpA":[function(e,t,i){var n=e("1a72ba86dc4099cd"),r=e("3e8300c8dcd37861"),s=e("4e367ba2e602279b"),a=e("a9817085717103ac"),o=e("3ad5c9f9719d1735"),h=e("a1912f278569b4e6"),c=e("d83ac9e10edfa0ef"),l=e("4fa13f5559b9cbba"),u=e("357167b0f8a6ba45"),d=e("3b40f00a568e6a6b");r("match",function(e,t,i){return[function(t){var i=c(this),r=a(t)?void 0:l(t,e);return r?n(r,t,i):new RegExp(t)[e](h(i))},function(e){var n,r=s(this),a=h(e),c=i(t,r,a);if(c.done)return c.value;if(!r.global)return d(r,a);var l=r.unicode;r.lastIndex=0;for(var f=[],p=0;null!==(n=d(r,a));){var g=h(n[0]);f[p]=g,""===g&&(r.lastIndex=u(a,o(r.lastIndex),l)),p++}return 0===p?null:f}]})},{"1a72ba86dc4099cd":"bOssl","3e8300c8dcd37861":"a7eSP","4e367ba2e602279b":"dPzbI",a9817085717103ac:"8AxCV","3ad5c9f9719d1735":"lQsU7",a1912f278569b4e6:"4x6uB",d83ac9e10edfa0ef:"cHxZN","4fa13f5559b9cbba":"2qR8N","357167b0f8a6ba45":"jbkzM","3b40f00a568e6a6b":"gcJzM"}],a7eSP:[function(e,t,i){e("a7057ee05361671");var n=e("771b9a32e3d08596"),r=e("5a9ef6cc43262548"),s=e("b286e3fd8e91d745"),a=e("f56adef42dd3c42"),o=e("39c5bea895574e43"),h=e("1c6881441295e4f4"),c=o("species"),l=RegExp.prototype;t.exports=function(e,t,i,u){var d=o(e),f=!a(function(){var t={};return t[d]=function(){return 7},7!==""[e](t)}),p=f&&!a(function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[c]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return t=!0,null},i[d](""),!t});if(!f||!p||i){var g=/./[d],m=t(d,""[e],function(e,t,i,r,a){var o=t.exec;return o===s||o===l.exec?f&&!a?{done:!0,value:n(g,t,i,r)}:{done:!0,value:n(e,i,t,r)}:{done:!1}});r(String.prototype,e,m[0]),r(l,d,m[1])}u&&h(l[d],"sham",!0)}},{a7057ee05361671:"4cips","771b9a32e3d08596":"bOssl","5a9ef6cc43262548":"4CPdc",b286e3fd8e91d745:"gpoGl",f56adef42dd3c42:"cXVrS","39c5bea895574e43":"5CuF7","1c6881441295e4f4":"gKM90"}],jbkzM:[function(e,t,i){var n=e("7830b1b106fe9c2f").charAt;t.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},{"7830b1b106fe9c2f":"fVu0j"}],gcJzM:[function(e,t,i){var n=e("fe012fd0e62b041c"),r=e("953f0ef3a583db2e"),s=e("7b1bebb22aa6d09f"),a=e("41458309d054e6d9"),o=e("2da13aa8500d5870"),h=TypeError;t.exports=function(e,t){var i=e.exec;if(s(i)){var c=n(i,e,t);return null!==c&&r(c),c}if("RegExp"===a(e))return n(o,e,t);throw new h("RegExp#exec called on incompatible receiver")}},{fe012fd0e62b041c:"bOssl","953f0ef3a583db2e":"dPzbI","7b1bebb22aa6d09f":"h1Wnr","41458309d054e6d9":"161sQ","2da13aa8500d5870":"gpoGl"}],"5JfZw":[function(e,t,i){var n=e("ab7506693563188f"),r=e("bc392a1870cac46c"),s=e("518f2de578425815"),a=e("5413f14f6fa8d586"),o=e("b080d5b6d2874bb9"),h=e("500412608beb0fa4"),c=e("d27dba1be9ae2ec7"),l=e("304a5dfbef2eca6a"),u=e("c369a3c8053cdec1"),d=e("c7ae38c574bac52a"),f=e("f127fd901a8322fa"),p=e("3da774f1ac5cef39"),g=e("5e13bde3b69470d3"),m=e("d67b0fe73b3441f6"),v=e("c3d9a3b5ce1a0134"),y=e("f824fce70460b786"),b=e("fe46150a38a85a5d"),x=e("c158ae31b64e4ec2"),E=e("2eeb2389fe600209"),w=e("a803aed269f0019b"),T=e("e9503db7c8f89e91"),S=e("d919927dacd61c64"),A=b("matchAll"),C="RegExp String",_=C+" Iterator",I=T.set,O=T.getterFor(_),P=RegExp.prototype,M=TypeError,R=s("".indexOf),L=s("".matchAll),D=!!L&&!y(function(){L("a",/./)}),k=a(function(e,t,i,n){I(this,{type:_,regexp:e,string:t,global:i,unicode:n,done:!1})},C,function(){var e=O(this);if(e.done)return o(void 0,!0);var t=e.regexp,i=e.string,n=w(t,i);return null===n?(e.done=!0,o(void 0,!0)):(e.global?""===l(n[0])&&(t.lastIndex=E(i,c(t.lastIndex),e.unicode)):e.done=!0,o(n,!1))}),N=function(e){var t,i,n,r=u(this),s=l(e),a=x(r,RegExp),o=l(g(r));return t=new a(a===RegExp?r.source:r,o),i=!!~R(o,"g"),n=!!~R(o,"u"),t.lastIndex=c(r.lastIndex),new k(t,s,i,n)};n({target:"String",proto:!0,forced:D},{matchAll:function(e){var t,i,n,s=h(this);if(d(e)){if(D)return L(s,e)}else{if(p(e)&&!~R(l(h(g(e))),"g"))throw new M("`.matchAll` does not allow non-global regexes");if(D)return L(s,e);if(void 0===(i=m(e,A))&&S&&"RegExp"===f(e)&&(i=N),i)return r(i,e,s)}return t=l(s),n=RegExp(e,"g"),S?r(N,n,t):n[A](t)}}),S||A in P||v(P,A,N)},{ab7506693563188f:"gJg5v",bc392a1870cac46c:"bOssl","518f2de578425815":"c4z5p","5413f14f6fa8d586":"1Abii",b080d5b6d2874bb9:"dwU83","500412608beb0fa4":"cHxZN",d27dba1be9ae2ec7:"lQsU7","304a5dfbef2eca6a":"4x6uB",c369a3c8053cdec1:"dPzbI",c7ae38c574bac52a:"8AxCV",f127fd901a8322fa:"161sQ","3da774f1ac5cef39":"4WTYw","5e13bde3b69470d3":"iG8db",d67b0fe73b3441f6:"2qR8N",c3d9a3b5ce1a0134:"4CPdc",f824fce70460b786:"cXVrS",fe46150a38a85a5d:"5CuF7",c158ae31b64e4ec2:"CaSkn","2eeb2389fe600209":"jbkzM",a803aed269f0019b:"gcJzM",e9503db7c8f89e91:"ixHS2",d919927dacd61c64:"jHRGA"}],fU7MD:[function(e,t,i){var n=e("bde41783ec0f17a4"),r=e("794108b869e92a52").end;n({target:"String",proto:!0,forced:e("271b5f05be76b6dd")},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{bde41783ec0f17a4:"gJg5v","794108b869e92a52":"15Fl7","271b5f05be76b6dd":"38Jla"}],"38Jla":[function(e,t,i){var n=e("ea42f18a4a6e86a9");t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},{ea42f18a4a6e86a9:"5hj4U"}],iz82g:[function(e,t,i){var n=e("31f9b30345fd3179"),r=e("10950b9580001d1d").start;n({target:"String",proto:!0,forced:e("c86924140d1ee1af")},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"31f9b30345fd3179":"gJg5v","10950b9580001d1d":"15Fl7",c86924140d1ee1af:"38Jla"}],"5PH9s":[function(e,t,i){var n=e("d77bea9ed21ff4bc"),r=e("7ed823ef2298b758"),s=e("1210aa921fc34970"),a=e("4320a1855b3e38fb"),o=e("c2348ecf591fb82d"),h=e("4b1f320aa7c99da8"),c=r([].push),l=r([].join);n({target:"String",stat:!0},{raw:function(e){var t=s(a(e).raw),i=h(t);if(!i)return"";for(var n=arguments.length,r=[],u=0;;){if(c(r,o(t[u++])),u===i)return l(r,"");u=_&&(C+=A(o,_,D)+R,_=D+L.length)}return C+A(o,_)}]},!!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})||!C||_)},{f8fd16f994f85406:"2fjXG",b5234e1018cb2916:"bOssl",c3560c75b4ad1ef2:"2iJ57",c4a2369a79c5aaa2:"a7eSP",daa534dec0372986:"cXVrS","317f495e148be81e":"dPzbI","36464dd17d2a7224":"h1Wnr",cea091f017783d94:"8AxCV","3847a5ff118f8ebb":"gAgUH",effd88adfbb6b4bc:"lQsU7","953b724c90cd8db6":"4x6uB","154963922e7c9354":"cHxZN","90f011aa61b831b4":"jbkzM",af552ab4c89e35be:"2qR8N","3726cfd8dc51c82c":"gSNtK","6de55154ce28598":"gcJzM","4b6a0c7e75a1080a":"5CuF7"}],gSNtK:[function(e,t,i){var n=e("3cf51fea5d34c201"),r=e("999f669befd62c27"),s=Math.floor,a=n("".charAt),o=n("".replace),h=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,n,u,d){var f=i+e.length,p=n.length,g=l;return void 0!==u&&(u=r(u),g=c),o(d,g,function(r,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"`":return h(t,0,i);case"'":return h(t,f);case"<":c=u[h(o,1,-1)];break;default:var l=+o;if(0===l)return r;if(l>p){var d=s(l/10);if(0===d)return r;if(d<=p)return void 0===n[d-1]?a(o,1):n[d-1]+a(o,1);return r}c=n[l-1]}return void 0===c?"":c})}},{"3cf51fea5d34c201":"2iJ57","999f669befd62c27":"6oQEu"}],"2HEOd":[function(e,t,i){var n=e("69381acad0f1f180"),r=e("be2b5a787b4341ed"),s=e("70979a707458e2bc"),a=e("ede342a754b29b08"),o=e("7b33c58d7c6a633e"),h=e("bc393499bad934a6"),c=e("1f633e1cea7bfece"),l=e("5a07dc19106ad672"),u=e("40b88ab8d2a68602"),d=e("c009564a6e08e49f"),f=e("49118a84cede6c94"),p=e("d9c85063e2fa18d1"),g=e("179cb9efb80dcae1"),m=p("replace"),v=TypeError,y=s("".indexOf),b=s("".replace),x=s("".slice),E=Math.max;n({target:"String",proto:!0},{replaceAll:function(e,t){var i,n,s,p,w,T,S,A,C,_=a(this),I=0,O="";if(!h(e)){if((i=c(e))&&!~y(l(a(d(e))),"g"))throw new v("`.replaceAll` does not allow non-global regexes");if(n=u(e,m))return r(n,e,_,t);if(g&&i)return b(l(_),e,t)}for(s=l(_),p=l(e),(w=o(t))||(t=l(t)),S=E(1,T=p.length),A=y(s,p);-1!==A;)C=w?l(t(p,A,s)):f(p,s,A,[],void 0,t),O+=x(s,I,A)+C,I=A+T,A=A+S>s.length?-1:y(s,p,A+S);return I1||"".split(/.?/).length;s("split",function(e,t,i){var r="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n(t,this,e,i)}:t;return[function(t,i){var s=h(this),a=o(t)?void 0:f(t,e);return a?n(a,t,s,i):n(r,d(s),t,i)},function(e,n){var s=a(this),o=d(e);if(!w){var h=i(r,s,o,n,r!==t);if(h.done)return h.value}var f=c(s,RegExp),g=s.unicode,m=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(v?"g":"y"),E=new f(v?"^(?:"+s.source+")":s,m),T=void 0===n?4294967295:n>>>0;if(0===T)return[];if(0===o.length)return null===p(E,o)?[o]:[];for(var S=0,A=0,C=[];A1?arguments[1]:void 0,t.length)),n=h(e);return f(t,i,i+n.length)===n}})},{dde854d8a76d436d:"gJg5v","75ef62d12e51b46c":"c4z5p",ff3b80c156be6132:"aRu9T","573cc620487e2f6b":"lQsU7","3d6be1b7c00bafd":"4x6uB","40ed833d044b85cd":"6Sz3M","7b57b8afdd10d7e4":"cHxZN","80ffa3ecff44b920":"i38lK",d76fe9fb1319d805:"jHRGA"}],ilZVq:[function(e,t,i){var n=e("e3f052c25e9ce7a0"),r=e("79d87d02e012ddb6"),s=e("d9b0f8ef34c7f588"),a=e("7684d557cb0eafb9"),o=e("a0c96765c2fd3918"),h=r("".slice),c=Math.max,l=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var i,n,r=o(s(this)),u=r.length,d=a(e);return(d===1/0&&(d=0),d<0&&(d=c(u+d,0)),(i=void 0===t?u:a(t))<=0||i===1/0)?"":(n=l(d+i,u),d>=n?"":h(r,d,n))}})},{e3f052c25e9ce7a0:"gJg5v","79d87d02e012ddb6":"2iJ57",d9b0f8ef34c7f588:"cHxZN","7684d557cb0eafb9":"gAgUH",a0c96765c2fd3918:"4x6uB"}],hUcmJ:[function(e,t,i){var n=e("abdac43301199021"),r=e("46e4a85192f95918"),s=e("63c730f9593a416e"),a=e("2fb31922ea5ff27d"),o=e("6f82048edf356822"),h=e("2f2665d060e5f6a1"),c=Array,l=s("".charAt),u=s("".charCodeAt),d=s([].join),f="".toWellFormed,p=f&&h(function(){return"1"!==r(f,1)});n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var e=o(a(this));if(p)return r(f,e);for(var t=e.length,i=c(t),n=0;n=56320||n+1>=t||(64512&u(e,n+1))!=56320?i[n]="�":(i[n]=l(e,n),i[++n]=l(e,n))}return d(i,"")}})},{abdac43301199021:"gJg5v","46e4a85192f95918":"bOssl","63c730f9593a416e":"2iJ57","2fb31922ea5ff27d":"cHxZN","6f82048edf356822":"4x6uB","2f2665d060e5f6a1":"cXVrS"}],l2p2s:[function(e,t,i){var n=e("4a60febef79e9fd2"),r=e("aa85dc53780a7a31").trim;n({target:"String",proto:!0,forced:e("d62e07fb0a0f0c26")("trim")},{trim:function(){return r(this)}})},{"4a60febef79e9fd2":"gJg5v",aa85dc53780a7a31:"jX5uQ",d62e07fb0a0f0c26:"cZ2PC"}],cZ2PC:[function(e,t,i){var n=e("9e0c4c0dbddf03dd").PROPER,r=e("92328d780355dc79"),s=e("8c0d7fed4094a2b6"),a="​…᠎";t.exports=function(e){return r(function(){return!!s[e]()||a[e]()!==a||n&&s[e].name!==e})}},{"9e0c4c0dbddf03dd":"jmu0n","92328d780355dc79":"cXVrS","8c0d7fed4094a2b6":"heeAP"}],"3o3Gk":[function(e,t,i){e("251a593a444ed436");var n=e("91f4001402f2b9ee"),r=e("c6b02e29a67a6f26");n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},{"251a593a444ed436":"94n2Q","91f4001402f2b9ee":"gJg5v",c6b02e29a67a6f26:"eV55a"}],"94n2Q":[function(e,t,i){var n=e("de7842587ae70a42"),r=e("324b25d4226efe2d");n({target:"String",proto:!0,name:"trimEnd",forced:void 0!==r},{trimRight:r})},{de7842587ae70a42:"gJg5v","324b25d4226efe2d":"eV55a"}],eV55a:[function(e,t,i){var n=e("bc94349b4fc95bb3").end,r=e("71fc76130b4f9a6");t.exports=r("trimEnd")?function(){return n(this)}:"".trimEnd},{bc94349b4fc95bb3:"jX5uQ","71fc76130b4f9a6":"cZ2PC"}],"4Lt39":[function(e,t,i){e("654c60d6d97014cd");var n=e("26b6a882a1c5bba9"),r=e("b5f2740011c04718");n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},{"654c60d6d97014cd":"7XL4A","26b6a882a1c5bba9":"gJg5v",b5f2740011c04718:"lOELU"}],"7XL4A":[function(e,t,i){var n=e("2da1b55d02d90d4a"),r=e("8b6aefe7df6c88a");n({target:"String",proto:!0,name:"trimStart",forced:void 0!==r},{trimLeft:r})},{"2da1b55d02d90d4a":"gJg5v","8b6aefe7df6c88a":"lOELU"}],lOELU:[function(e,t,i){var n=e("a3878f82301e4d4").start,r=e("ee8e5c2b54df0ba4");t.exports=r("trimStart")?function(){return n(this)}:"".trimStart},{a3878f82301e4d4:"jX5uQ",ee8e5c2b54df0ba4:"cZ2PC"}],"3qZNd":[function(e,t,i){var n=e("e7d648b06f4dd9c6"),r=e("8b0114ba5e653efc");n({target:"String",proto:!0,forced:e("1caf9e0d6204ce0a")("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},{e7d648b06f4dd9c6:"gJg5v","8b0114ba5e653efc":"8K5FK","1caf9e0d6204ce0a":"ftpai"}],"8K5FK":[function(e,t,i){var n=e("427762aaf6075552"),r=e("3a91b63413ffe383"),s=e("515bd1582fb5b4c0"),a=/"/g,o=n("".replace);t.exports=function(e,t,i,n){var h=s(r(e)),c="<"+t;return""!==i&&(c+=" "+i+'="'+o(s(n),a,""")+'"'),c+">"+h+""}},{"427762aaf6075552":"2iJ57","3a91b63413ffe383":"cHxZN","515bd1582fb5b4c0":"4x6uB"}],ftpai:[function(e,t,i){var n=e("b7fe2964c39bac");t.exports=function(e){return n(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},{b7fe2964c39bac:"cXVrS"}],"20tl2":[function(e,t,i){var n=e("c559cd7b113e236e"),r=e("5a30563bc26230a8");n({target:"String",proto:!0,forced:e("eec66acdfc1a2a7d")("big")},{big:function(){return r(this,"big","","")}})},{c559cd7b113e236e:"gJg5v","5a30563bc26230a8":"8K5FK",eec66acdfc1a2a7d:"ftpai"}],ahutJ:[function(e,t,i){var n=e("676512d3c55a414"),r=e("7e21be1f712bc51d");n({target:"String",proto:!0,forced:e("46de4ecf79c13e")("blink")},{blink:function(){return r(this,"blink","","")}})},{"676512d3c55a414":"gJg5v","7e21be1f712bc51d":"8K5FK","46de4ecf79c13e":"ftpai"}],f2UI4:[function(e,t,i){var n=e("48f4b5d0c5a6a4fb"),r=e("e17c07d10b887dd3");n({target:"String",proto:!0,forced:e("5287465832c168a5")("bold")},{bold:function(){return r(this,"b","","")}})},{"48f4b5d0c5a6a4fb":"gJg5v",e17c07d10b887dd3:"8K5FK","5287465832c168a5":"ftpai"}],"4XIfF":[function(e,t,i){var n=e("6490db7677e8f73e"),r=e("e6e19e0e56c49b86");n({target:"String",proto:!0,forced:e("bb7b77345df5335f")("fixed")},{fixed:function(){return r(this,"tt","","")}})},{"6490db7677e8f73e":"gJg5v",e6e19e0e56c49b86:"8K5FK",bb7b77345df5335f:"ftpai"}],l1rs2:[function(e,t,i){var n=e("138910cd530370a2"),r=e("d72a479e3b3815bd");n({target:"String",proto:!0,forced:e("5690c1466282cf0f")("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},{"138910cd530370a2":"gJg5v",d72a479e3b3815bd:"8K5FK","5690c1466282cf0f":"ftpai"}],adYvn:[function(e,t,i){var n=e("f502df9771a160ae"),r=e("ee2ef8461dec89b6");n({target:"String",proto:!0,forced:e("2a2e9c2933145580")("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},{f502df9771a160ae:"gJg5v",ee2ef8461dec89b6:"8K5FK","2a2e9c2933145580":"ftpai"}],gidCX:[function(e,t,i){var n=e("24cfbc86c4210c6b"),r=e("e302ce8a79ba595b");n({target:"String",proto:!0,forced:e("3ecf3c8b0c95d02f")("italics")},{italics:function(){return r(this,"i","","")}})},{"24cfbc86c4210c6b":"gJg5v",e302ce8a79ba595b:"8K5FK","3ecf3c8b0c95d02f":"ftpai"}],bv1yh:[function(e,t,i){var n=e("bab8a92d9901152a"),r=e("252613bc1bb91720");n({target:"String",proto:!0,forced:e("3fb7b9ac770c40c")("link")},{link:function(e){return r(this,"a","href",e)}})},{bab8a92d9901152a:"gJg5v","252613bc1bb91720":"8K5FK","3fb7b9ac770c40c":"ftpai"}],kO1Zg:[function(e,t,i){var n=e("d3ac4973e86c28f9"),r=e("8bd5ccba40c1dac2");n({target:"String",proto:!0,forced:e("8a5bdd05bf3f9b34")("small")},{small:function(){return r(this,"small","","")}})},{d3ac4973e86c28f9:"gJg5v","8bd5ccba40c1dac2":"8K5FK","8a5bdd05bf3f9b34":"ftpai"}],bgZU7:[function(e,t,i){var n=e("4d6202cdf03d0d61"),r=e("ec6f6be679741e37");n({target:"String",proto:!0,forced:e("1920bc41bac741db")("strike")},{strike:function(){return r(this,"strike","","")}})},{"4d6202cdf03d0d61":"gJg5v",ec6f6be679741e37:"8K5FK","1920bc41bac741db":"ftpai"}],jgQND:[function(e,t,i){var n=e("5ac641dbd7ba3f29"),r=e("ef70fadb3bd40f3e");n({target:"String",proto:!0,forced:e("2b14944b2c33ed44")("sub")},{sub:function(){return r(this,"sub","","")}})},{"5ac641dbd7ba3f29":"gJg5v",ef70fadb3bd40f3e:"8K5FK","2b14944b2c33ed44":"ftpai"}],hB11V:[function(e,t,i){var n=e("783c2c194676a06b"),r=e("bca2bfdd086dcdc1");n({target:"String",proto:!0,forced:e("36843058161d815a")("sup")},{sup:function(){return r(this,"sup","","")}})},{"783c2c194676a06b":"gJg5v",bca2bfdd086dcdc1:"8K5FK","36843058161d815a":"ftpai"}],"31EdS":[function(e,t,i){e("6371023cd6dad94a")("Float32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"6371023cd6dad94a":"8VOru"}],"8VOru":[function(e,t,i){var n=e("c9bb9be26763d5d6"),r=e("f3461bcb45a0da3b"),s=e("513171f829dcf492"),a=e("9195003f05246e2"),o=e("5c32747745583fde"),h=e("f129cadcdd085794"),c=e("14a230ba5c5e071a"),l=e("848002acbadbae2c"),u=e("c540a4ec697b43da"),d=e("8248ffc9c9f95531"),f=e("aa784a976357a5bd"),p=e("da59162d19efb47d"),g=e("30e058c823038e07"),m=e("c43d9ac9910fd1d"),v=e("ac65ec03272627eb"),y=e("9477a245724234e7"),b=e("9d37aa52098c7b96"),x=e("361c9958906a5ff0"),E=e("4f80387d0e9c94a2"),w=e("d414fa9976906f9c"),T=e("97d75eb5fba6dc4c"),S=e("c3126acc51f6b7f5"),A=e("402069064923c62e"),C=e("442bd1b967e53ad0").f,_=e("e60d2aff236b9889"),I=e("5464ebf657a71f52").forEach,O=e("e76408bbdddedcb"),P=e("a6c477e34b27b3ce"),M=e("3b65fa2a837fee2b"),R=e("2db4073983cef2bc"),L=e("76805b4ea64de991"),D=e("7ab72b6c1b29c546"),k=e("1d46546a1b5897a9"),N=D.get,F=D.set,B=D.enforce,U=M.f,V=R.f,G=r.RangeError,j=c.ArrayBuffer,W=j.prototype,Y=c.DataView,H=h.NATIVE_ARRAY_BUFFER_VIEWS,z=h.TYPED_ARRAY_TAG,X=h.TypedArray,K=h.TypedArrayPrototype,q=h.isTypedArray,J="BYTES_PER_ELEMENT",$="Wrong length",Q=function(e,t){P(e,t,{configurable:!0,get:function(){return N(this)[t]}})},Z=function(e){var t;return S(W,e)||"ArrayBuffer"===(t=x(e))||"SharedArrayBuffer"===t},ee=function(e,t){return q(e)&&!w(t)&&t in e&&f(+t)&&t>=0},et=function(e,t){return ee(e,t=y(t))?u(2,e[t]):V(e,t)},ei=function(e,t,i){return ee(e,t=y(t))&&E(i)&&b(i,"value")&&!b(i,"get")&&!b(i,"set")&&!i.configurable&&(!b(i,"writable")||i.writable)&&(!b(i,"enumerable")||i.enumerable)?(e[t]=i.value,e):U(e,t,i)};a?(H||(R.f=et,M.f=ei,Q(K,"buffer"),Q(K,"byteOffset"),Q(K,"byteLength"),Q(K,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:et,defineProperty:ei}),t.exports=function(e,t,i){var a=e.match(/\d+/)[0]/8,h=e+(i?"Clamped":"")+"Array",c="get"+e,u="set"+e,f=r[h],y=f,b=y&&y.prototype,x={},w=function(e,t){var i=N(e);return i.view[c](t*a+i.byteOffset,!0)},S=function(e,t,n){var r=N(e);r.view[u](t*a+r.byteOffset,i?v(n):n,!0)},P=function(e,t){U(e,t,{get:function(){return w(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};H?o&&(y=t(function(e,t,i,n){return l(e,b),k(E(t)?Z(t)?void 0!==n?new f(t,m(i,a),n):void 0!==i?new f(t,m(i,a)):new f(t):q(t)?L(y,t):s(_,y,t):new f(g(t)),e,y)}),A&&A(y,X),I(C(f),function(e){e in y||d(y,e,f[e])}),y.prototype=b):(y=t(function(e,t,i,n){l(e,b);var r,o,h,c=0,u=0;if(E(t)){if(Z(t)){r=t,u=m(i,a);var d=t.byteLength;if(void 0===n){if(d%a||(o=d-u)<0)throw new G($)}else if((o=p(n)*a)+u>d)throw new G($);h=o/a}else if(q(t))return L(y,t);else return s(_,y,t)}else r=new j(o=(h=g(t))*a);for(F(e,{buffer:r,byteOffset:u,byteLength:o,length:h,view:new Y(r)});c255?255:255&t}},{}],"2HI7b":[function(e,t,i){var n=e("2b6f4dcfa87227c8"),r=e("a99e72870b261c00"),s=e("6fedb000997de8c9"),a=e("5d2230babf0781b0"),o=e("224522d7906614b9"),h=e("fa7f27b53f48b0c9"),c=e("244fea79be1425e4"),l=e("c86f6f22440f76d6"),u=e("a9c73ae28faf529e"),d=e("1213d44fe73ec45d").aTypedArrayConstructor,f=e("17f40af3180f13f6");t.exports=function(e){var t,i,p,g,m,v,y,b,x=s(this),E=a(e),w=arguments.length,T=w>1?arguments[1]:void 0,S=void 0!==T,A=c(E);if(A&&!l(A))for(b=(y=h(E,A)).next,E=[];!(v=r(b,y)).done;)E.push(v.value);for(S&&w>2&&(T=n(T,arguments[2])),i=o(E),g=u(p=new(d(x))(i)),t=0;i>t;t++)m=S?T(E[t],t):E[t],p[t]=g?f(m):+m;return p}},{"2b6f4dcfa87227c8":"f1CxE",a99e72870b261c00:"bOssl","6fedb000997de8c9":"euAEP","5d2230babf0781b0":"6oQEu","224522d7906614b9":"kHSes",fa7f27b53f48b0c9:"kBMjp","244fea79be1425e4":"3624P",c86f6f22440f76d6:"88nHe",a9c73ae28faf529e:"7TPqP","1213d44fe73ec45d":"b6692","17f40af3180f13f6":"hYKQy"}],"7TPqP":[function(e,t,i){var n=e("4eaea61d57855c23");t.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},{"4eaea61d57855c23":"cRCRk"}],hYKQy:[function(e,t,i){var n=e("e84ff6c898741836"),r=TypeError;t.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},{e84ff6c898741836:"cCley"}],"5PjpG":[function(e,t,i){e("5afb75924dde7be2")("Float64",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"5afb75924dde7be2":"8VOru"}],fxnuD:[function(e,t,i){e("f65338540449e43b")("Int8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{f65338540449e43b:"8VOru"}],"6jDOT":[function(e,t,i){e("618af5c93cf1cc05")("Int16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"618af5c93cf1cc05":"8VOru"}],gG1e8:[function(e,t,i){e("c7ce36d83e80a30f")("Int32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{c7ce36d83e80a30f:"8VOru"}],"17kvf":[function(e,t,i){e("1fba800ad35b335f")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"1fba800ad35b335f":"8VOru"}],"9B0y9":[function(e,t,i){e("2cd7a1d58fa59b7d")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}},!0)},{"2cd7a1d58fa59b7d":"8VOru"}],"3kbwg":[function(e,t,i){e("ca953ee05f39cdaa")("Uint16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{ca953ee05f39cdaa:"8VOru"}],"5wzd5":[function(e,t,i){e("682a05de60a0a1e1")("Uint32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"682a05de60a0a1e1":"8VOru"}],"1dCBn":[function(e,t,i){var n=e("bad3bf9fd10c3d3e"),r=e("f3046f328b82c495"),s=e("6efc916402e96e15"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",function(e){var t=a(this),i=r(t),n=s(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]})},{bad3bf9fd10c3d3e:"b6692",f3046f328b82c495:"kHSes","6efc916402e96e15":"gAgUH"}],"2Mqsz":[function(e,t,i){var n=e("9998fdf0f56ef0da"),r=e("3136ffe0165b4705"),s=n(e("45547c073d8e02f")),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",function(e,t){return s(a(this),e,t,arguments.length>2?arguments[2]:void 0)})},{"9998fdf0f56ef0da":"2iJ57","3136ffe0165b4705":"b6692","45547c073d8e02f":"toMXb"}],eZZyP:[function(e,t,i){var n=e("cb5a1a9d977d55c8"),r=e("9bc5b51fcf1b899f").every,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{cb5a1a9d977d55c8:"b6692","9bc5b51fcf1b899f":"daQdc"}],go8ZW:[function(e,t,i){var n=e("24d20a7fba3c1708"),r=e("3a12c8f811e83e62"),s=e("bec3653efa2d8600"),a=e("ff46ad00880fddaa"),o=e("5e0ee530611ef38d"),h=e("800a47a98b497e55"),c=e("faaaddc6a409cf90"),l=n.aTypedArray,u=n.exportTypedArrayMethod,d=h("".slice);u("fill",function(e){var t=arguments.length;return l(this),o(r,this,"Big"===d(a(this),0,3)?s(e):+e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},c(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}))},{"24d20a7fba3c1708":"b6692","3a12c8f811e83e62":"9XPgi",bec3653efa2d8600:"hYKQy",ff46ad00880fddaa:"cRCRk","5e0ee530611ef38d":"bOssl","800a47a98b497e55":"2iJ57",faaaddc6a409cf90:"cXVrS"}],iCErC:[function(e,t,i){var n=e("6846524790b14a7c"),r=e("69eb0f28238e9173").filter,s=e("d404a3c06ca3bb3e"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return s(this,t)})},{"6846524790b14a7c":"b6692","69eb0f28238e9173":"daQdc",d404a3c06ca3bb3e:"1lBSP"}],"1lBSP":[function(e,t,i){var n=e("b597c909ed514557"),r=e("671cb65500632ecc").getTypedArrayConstructor;t.exports=function(e,t){return n(r(e),t)}},{b597c909ed514557:"5QV4b","671cb65500632ecc":"b6692"}],e8hfX:[function(e,t,i){var n=e("2ee42d54019723d0"),r=e("f74f952feb3fa9ac").find,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"2ee42d54019723d0":"b6692",f74f952feb3fa9ac:"daQdc"}],"2kMmr":[function(e,t,i){var n=e("8a1e1a9ff0bdb479"),r=e("faaa2d0f518f9401").findIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"8a1e1a9ff0bdb479":"b6692",faaa2d0f518f9401:"daQdc"}],"212MV":[function(e,t,i){var n=e("1d1b09a81097f4c9"),r=e("e815e97cf844ecb").findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"1d1b09a81097f4c9":"b6692",e815e97cf844ecb:"cyWXz"}],"9AC43":[function(e,t,i){var n=e("de1e827bc87ccb28"),r=e("1d3fb19f3f3cea6a").findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{de1e827bc87ccb28:"b6692","1d3fb19f3f3cea6a":"cyWXz"}],aqoug:[function(e,t,i){var n=e("905afd384f4e3de6"),r=e("d55109422f6a63d3").forEach,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",function(e){r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"905afd384f4e3de6":"b6692",d55109422f6a63d3:"daQdc"}],iuJoY:[function(e,t,i){var n=e("e24f9b87534e32a3");(0,e("9358eeabcbb18f49").exportTypedArrayStaticMethod)("from",e("49819eabcb3ccea1"),n)},{e24f9b87534e32a3:"5UnGw","9358eeabcbb18f49":"b6692","49819eabcb3ccea1":"2HI7b"}],czX8g:[function(e,t,i){var n=e("7cf07194bf630e10"),r=e("6783fff4c8e274ff").includes,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"7cf07194bf630e10":"b6692","6783fff4c8e274ff":"7HT32"}],"9XxKn":[function(e,t,i){var n=e("19c9cea2a3392f92"),r=e("728bfde1b6b9fa8c").indexOf,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"19c9cea2a3392f92":"b6692","728bfde1b6b9fa8c":"7HT32"}],"7aRDd":[function(e,t,i){var n=e("3da36adbfe4f1c5e"),r=e("87513a57210d794"),s=e("ab6b74db00db51f7"),a=e("21e9ae10aded4ff7"),o=e("fe81c4288afbe8ee"),h=e("ddb435c2e5bdfda1")("iterator"),c=n.Uint8Array,l=s(o.values),u=s(o.keys),d=s(o.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=c&&c.prototype,m=!r(function(){g[h].call([1])}),v=!!g&&g.values&&g[h]===g.values&&"values"===g.values.name,y=function(){return l(f(this))};p("entries",function(){return d(f(this))},m),p("keys",function(){return u(f(this))},m),p("values",y,m||!v,{name:"values"}),p(h,y,m||!v,{name:"values"})},{"3da36adbfe4f1c5e":"7Z171","87513a57210d794":"cXVrS",ab6b74db00db51f7:"2iJ57","21e9ae10aded4ff7":"b6692",fe81c4288afbe8ee:"3prNk",ddb435c2e5bdfda1:"5CuF7"}],k5Rlo:[function(e,t,i){var n=e("4a1cb40dad4dd1ac"),r=e("68cfb4a8ab57e7b8"),s=n.aTypedArray,a=n.exportTypedArrayMethod,o=r([].join);a("join",function(e){return o(s(this),e)})},{"4a1cb40dad4dd1ac":"b6692","68cfb4a8ab57e7b8":"2iJ57"}],f3FBF:[function(e,t,i){var n=e("83d52c5c09010d50"),r=e("a5b16a6fc92268b4"),s=e("9b20398976dd53df"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return r(s,a(this),t>1?[e,arguments[1]]:[e])})},{"83d52c5c09010d50":"b6692",a5b16a6fc92268b4:"2fjXG","9b20398976dd53df":"cfsWk"}],"4ZhIs":[function(e,t,i){var n=e("47e7bb602930e61a"),r=e("8e0cd2bb3fe997bb").map,s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(a(e))(t)})})},{"47e7bb602930e61a":"b6692","8e0cd2bb3fe997bb":"daQdc"}],"9uG4h":[function(e,t,i){var n=e("8205d0df207de27c"),r=e("ff4c68a63e37d828"),s=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",function(){for(var e=0,t=arguments.length,i=new(s(this))(t);t>e;)i[e]=arguments[e++];return i},r)},{"8205d0df207de27c":"b6692",ff4c68a63e37d828:"5UnGw"}],ccgrY:[function(e,t,i){var n=e("44c8794ad6be555f"),r=e("1163c739252ce603").left,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{"44c8794ad6be555f":"b6692","1163c739252ce603":"dEdT1"}],dESGS:[function(e,t,i){var n=e("b70766ffaffbfa51"),r=e("5f58f990e3d5d551").right,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{b70766ffaffbfa51:"b6692","5f58f990e3d5d551":"dEdT1"}],"7G7OX":[function(e,t,i){var n=e("2692a9613069388b"),r=n.aTypedArray,s=n.exportTypedArrayMethod,a=Math.floor;s("reverse",function(){for(var e,t=r(this).length,i=a(t/2),n=0;n1?arguments[1]:void 0,1),i=h(e);if(m)return r(f,this,i,t);var n=this.length,s=a(i),c=0;if(s+t>n)throw new l("Wrong length");for(;cr;)c[r]=i[r++];return c},r(function(){new Int8Array(1).slice()}))},{d8cf74b619b99d16:"b6692",cde6d683247bdb44:"cXVrS",a6442c63e141a126:"eO8Ta"}],"8qlqb":[function(e,t,i){var n=e("78c3191738d81c4d"),r=e("b1ba67becb59f503").some,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"78c3191738d81c4d":"b6692",b1ba67becb59f503:"daQdc"}],lGQwY:[function(e,t,i){var n=e("1319b11c96d7a212"),r=e("443f315e07e91c29"),s=e("8dc6cee8a97e45cb"),a=e("d6c4034c4939c7d5"),o=e("f3e3e1c809574ce3"),h=e("cab25e21cd947849"),c=e("c53adf7878431ec6"),l=e("90728397db1428a3"),u=e("c20e84b46e983c4f"),d=e("8b919df81d7fcf47"),f=h.aTypedArray,p=h.exportTypedArrayMethod,g=n.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(s(function(){m(new g(2),null)})&&s(function(){m(new g(2),{})})),y=!!m&&!s(function(){if(u)return u<74;if(c)return c<67;if(l)return!0;if(d)return d<602;var e,t,i=new g(516),n=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(m(i,function(e,t){return(e/4|0)-(t/4|0)}),e=0;e<516;e++)if(i[e]!==n[e])return!0});p("sort",function(e){return(void 0!==e&&a(e),y)?m(this,e):o(f(this),function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i})},!y||v)},{"1319b11c96d7a212":"7Z171","443f315e07e91c29":"c4z5p","8dc6cee8a97e45cb":"cXVrS",d6c4034c4939c7d5:"alrlv",f3e3e1c809574ce3:"5Mqp3",cab25e21cd947849:"b6692",c53adf7878431ec6:"inWxb","90728397db1428a3":"5I4FT",c20e84b46e983c4f:"co76c","8b919df81d7fcf47":"1CWLZ"}],"5EgJz":[function(e,t,i){var n=e("d3219a9d813dfae3"),r=e("815a66ab54718368"),s=e("576f4ad682879893"),a=n.aTypedArray,o=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",function(e,t){var i=a(this),n=i.length,h=s(e,n);return new(o(i))(i.buffer,i.byteOffset+h*i.BYTES_PER_ELEMENT,r((void 0===t?n:s(t,n))-h))})},{d3219a9d813dfae3:"b6692","815a66ab54718368":"lQsU7","576f4ad682879893":"47gaI"}],hUSBX:[function(e,t,i){var n=e("d23c9dad2cb3d012"),r=e("961a14c04c94ca8e"),s=e("aa830556bb66a52b"),a=e("1477df799d469d0c"),o=e("6bdde3bff05f534b"),h=n.Int8Array,c=s.aTypedArray,l=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!h&&a(function(){u.call(new h(1))});l("toLocaleString",function(){return r(u,d?o(c(this)):c(this),o(arguments))},a(function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()})||!a(function(){h.prototype.toLocaleString.call([1,2])}))},{d23c9dad2cb3d012:"7Z171","961a14c04c94ca8e":"2fjXG",aa830556bb66a52b:"b6692","1477df799d469d0c":"cXVrS","6bdde3bff05f534b":"eO8Ta"}],bN7du:[function(e,t,i){var n=e("aee14a288ff10704"),r=e("77f370038a7e7dac"),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",function(){return n(s(this),o(this))})},{aee14a288ff10704:"2dsKr","77f370038a7e7dac":"b6692"}],accWj:[function(e,t,i){var n=e("7a241707bf041790"),r=e("ab9301a002e94347"),s=e("e1b15c081f5438dc"),a=e("50268bbb02cbbbc4"),o=n.aTypedArray,h=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=r(n.TypedArrayPrototype.sort);c("toSorted",function(e){void 0!==e&&s(e);var t=o(this);return l(a(h(t),t),e)})},{"7a241707bf041790":"b6692",ab9301a002e94347:"2iJ57",e1b15c081f5438dc:"alrlv","50268bbb02cbbbc4":"5QV4b"}],"8zMXu":[function(e,t,i){var n=e("ba1ad98ce5955ae6").exportTypedArrayMethod,r=e("7fb7589d87925c0e"),s=e("9ae1b5b748ef0512"),a=e("9d0cad3ff385c8e1"),o=s.Uint8Array,h=o&&o.prototype||{},c=[].toString,l=a([].join);r(function(){c.call({})})&&(c=function(){return l(this)});var u=h.toString!==c;n("toString",c,u)},{ba1ad98ce5955ae6:"b6692","7fb7589d87925c0e":"cXVrS","9ae1b5b748ef0512":"7Z171","9d0cad3ff385c8e1":"2iJ57"}],bwjPE:[function(e,t,i){var n=e("5428fa832663517b"),r=e("472f91950b838d4c"),s=e("cd9beaafe2ae7a70"),a=e("b4b145cf5a7fc46d"),o=e("3cca7f61fa3b5db7"),h=r.aTypedArray,c=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("with",{with:function(e,t){var i=h(this),r=a(e),l=s(i)?o(t):+t;return n(i,c(i),r,l)}}.with,!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}())},{"5428fa832663517b":"ebcI0","472f91950b838d4c":"b6692",cd9beaafe2ae7a70:"7TPqP",b4b145cf5a7fc46d:"gAgUH","3cca7f61fa3b5db7":"hYKQy"}],"4AZtq":[function(e,t,i){var n=e("b25f2dc62f86f185"),r=e("f98894072ee354c2"),s=e("e8f3df77e99ec93e"),a=String.fromCharCode,o=r("".charAt),h=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,u=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(e){for(var t,i,n=s(e),r="",d=n.length,f=0;f>(-2*S&6)));return h}})},{f57c57075be2f036:"gJg5v","1beb501bad2a77ab":"7Z171","54160fb760cf47b6":"e5ie6",b8fdd5e59791f323:"2iJ57","2b6100c225ada6":"bOssl",fb00c1d39c9bf14c:"cXVrS","93407030a6bacce1":"4x6uB","48ccfe93995f906":"h3DcZ",bed47900de2f9889:"jseHN"}],jseHN:[function(e,t,i){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n+"+/",s=n+"-_",a=function(e){for(var t={},i=0;i<64;i++)t[e.charAt(i)]=i;return t};t.exports={i2c:r,c2i:a(r),i2cUrl:s,c2iUrl:a(s)}},{}],jwPXF:[function(e,t,i){var n=e("ff535db334027cb3"),r=e("d2af88b3a42b7d50"),s=e("a166328697ff9969"),a=e("ccb7079059953540"),o=e("5424850d1e2e873d"),h=e("61b2b23f28dc6ce7"),c=e("48ec8439e6a9901c"),l=e("96982b02e51db61c"),u=e("e084452184a62fe5").i2c,d=s("btoa"),f=a("".charAt),p=a("".charCodeAt),g=!!d&&!h(function(){return"aGk="!==d("hi")}),m=g&&!h(function(){d()}),v=g&&h(function(){return"bnVsbA=="!==d(null)}),y=g&&1!==d.length;n({global:!0,bind:!0,enumerable:!0,forced:!g||m||v||y},{btoa:function(e){if(l(arguments.length,1),g)return o(d,r,c(e));for(var t,i,n=c(e),a="",h=0,m=u;f(n,h)||(m="=",h%1);){if((i=p(n,h+=3/4))>255)throw new(s("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a+=f(m,63&(t=t<<8|i)>>8-h%1*8)}return a}})},{ff535db334027cb3:"gJg5v",d2af88b3a42b7d50:"7Z171",a166328697ff9969:"e5ie6",ccb7079059953540:"2iJ57","5424850d1e2e873d":"bOssl","61b2b23f28dc6ce7":"cXVrS","48ec8439e6a9901c":"4x6uB","96982b02e51db61c":"h3DcZ",e084452184a62fe5:"jseHN"}],khTY5:[function(e,t,i){var n=e("f2983879ab6ef4f"),r=e("74a037ab8118876"),s=e("a3359ffcd052df79"),a=e("9e6862fbf1bc54d2"),o=e("833a1c6e8a10b1ff"),h=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in r)r[c]&&h(n[c]&&n[c].prototype);h(s)},{f2983879ab6ef4f:"7Z171","74a037ab8118876":"1xZhu",a3359ffcd052df79:"fVoiV","9e6862fbf1bc54d2":"4w3Nn","833a1c6e8a10b1ff":"gKM90"}],"1xZhu":[function(e,t,i){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],fVoiV:[function(e,t,i){var n=e("a6fc44eba1875331")("span").classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r},{a6fc44eba1875331:"SppDD"}],a2DYE:[function(e,t,i){var n=e("c051336c9ece485c"),r=e("b1dd6223fec045b2"),s=e("2927608065790e8a"),a=e("107ef5eaf95c92b0"),o=e("2f02b421bbdb9eb4"),h=e("46e3db6eb678f758"),c=e("6a4d2091548e6557")("iterator"),l=a.values,u=function(e,t){if(e){if(e[c]!==l)try{o(e,c,l)}catch(t){e[c]=l}if(h(e,t,!0),r[t]){for(var i in a)if(e[i]!==a[i])try{o(e,i,a[i])}catch(t){e[i]=a[i]}}}};for(var d in r)u(n[d]&&n[d].prototype,d);u(s,"DOMTokenList")},{c051336c9ece485c:"7Z171",b1dd6223fec045b2:"1xZhu","2927608065790e8a":"fVoiV","107ef5eaf95c92b0":"3prNk","2f02b421bbdb9eb4":"gKM90","46e3db6eb678f758":"dkhk9","6a4d2091548e6557":"5CuF7"}],"6bhjG":[function(e,t,i){var n=e("3d0510e49183901c"),r=e("63b7b93fc4a7238a"),s=e("1c5b62f756d3eaff"),a=e("eb1c50ea6315321b"),o=e("4ca71918e5a2016a"),h=e("c21d001acfae7cd"),c=e("75fac16725379a32").f,l=e("b34fbc760b0520d4"),u=e("ed9170165790e778"),d=e("f6f97990397d9c00"),f=e("9b1e92218f8d993"),p=e("fdfe3ed8e9adb72c"),g=e("9c0ec21dd5e9a70b"),m=e("5a4b6c79c088bdfe"),v=e("b32d1eeacf68845c"),y=e("8ef37a97ffa6fa2e"),b=e("fc770dee153f9182"),x=e("617636ad1c3548bd"),E=e("391d43a74d1595a0"),w="DOMException",T="DATA_CLONE_ERR",S=r("Error"),A=r(w)||function(){try{new(r("MessageChannel")||s("worker_threads").MessageChannel)().port1.postMessage(new WeakMap)}catch(e){if(e.name===T&&25===e.code)return e.constructor}}(),C=A&&A.prototype,_=S.prototype,I=b.set,O=b.getterFor(w),P="stack"in new S(w),M=function(e){return d(v,e)&&v[e].m?v[e].c:0},R=function(){f(this,L);var e=arguments.length,t=m(e<1?void 0:arguments[0]),i=m(e<2?void 0:arguments[1],"Error"),n=M(i);if(I(this,{type:w,name:i,message:t,code:n}),x||(this.name=i,this.message=t,this.code=n),P){var r=new S(t);r.name=w,c(this,"stack",h(1,y(r.stack,1)))}},L=R.prototype=o(_),D=function(e){return{enumerable:!0,configurable:!0,get:e}},k=function(e){return D(function(){return O(this)[e]})};x&&(u(L,"code",k("code")),u(L,"message",k("message")),u(L,"name",k("name"))),c(L,"constructor",h(1,R));var N=a(function(){return!(new A instanceof S)}),F=N||a(function(){return _.toString!==g||"2: 1"!==String(new A(1,2))}),B=N||a(function(){return 25!==new A(1,"DataCloneError").code}),U=N||25!==A[T]||25!==C[T],V=E?F||B||U:N;n({global:!0,constructor:!0,forced:V},{DOMException:V?R:A});var G=r(w),j=G.prototype;for(var W in F&&(E||A===G)&&l(j,"toString",g),B&&x&&A===G&&u(j,"code",D(function(){return M(p(this).name)})),v)if(d(v,W)){var Y=v[W],H=Y.s,z=h(6,Y.c);d(G,H)||c(G,H,z),d(j,H)||c(j,H,z)}},{"3d0510e49183901c":"gJg5v","63b7b93fc4a7238a":"e5ie6","1c5b62f756d3eaff":"fjtLr",eb1c50ea6315321b:"cXVrS","4ca71918e5a2016a":"7isQ3",c21d001acfae7cd:"5toj2","75fac16725379a32":"hvqCQ",b34fbc760b0520d4:"4CPdc",ed9170165790e778:"3NI4M",f6f97990397d9c00:"9JWVX","9b1e92218f8d993":"95yA1",fdfe3ed8e9adb72c:"dPzbI","9c0ec21dd5e9a70b":"9hDDf","5a4b6c79c088bdfe":"dwhvK",b32d1eeacf68845c:"I3hyF","8ef37a97ffa6fa2e":"7dart",fc770dee153f9182:"ixHS2","617636ad1c3548bd":"6mXK1","391d43a74d1595a0":"jHRGA"}],I3hyF:[function(e,t,i){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},{}],fJnNi:[function(e,t,i){var n=e("5538d4aa2e26797c"),r=e("15f622cde07e3e8f"),s=e("6dca64203ef6b4d1"),a=e("30cb5b59df4e77c6"),o=e("64c91a24ef31e303").f,h=e("a56ea2d80c8496ae"),c=e("e54ce0361d637752"),l=e("5e15de01309c5057"),u=e("fccd891af3c8103d"),d=e("2db1f0a6b3bd6dfd"),f=e("176edbe2885d9f01"),p=e("3f4d27281e93627e"),g=e("95f892709744ad29"),m="DOMException",v=s("Error"),y=s(m),b=function(){c(this,x);var e=arguments.length,t=u(e<1?void 0:arguments[0]),i=u(e<2?void 0:arguments[1],"Error"),n=new y(t,i),r=new v(t);return r.name=m,o(n,"stack",a(1,f(r.stack,1))),l(n,this,b),n},x=b.prototype=y.prototype,E="stack"in new v(m),w="stack"in new y(1,2),T=y&&p&&Object.getOwnPropertyDescriptor(r,m),S=!!T&&!(T.writable&&T.configurable),A=E&&!S&&!w;n({global:!0,constructor:!0,forced:g||A},{DOMException:A?b:y});var C=s(m),_=C.prototype;if(_.constructor!==C){for(var I in g||o(_,"constructor",a(1,C)),d)if(h(d,I)){var O=d[I],P=O.s;h(C,P)||o(C,P,a(6,O.c))}}},{"5538d4aa2e26797c":"gJg5v","15f622cde07e3e8f":"7Z171","6dca64203ef6b4d1":"e5ie6","30cb5b59df4e77c6":"5toj2","64c91a24ef31e303":"hvqCQ",a56ea2d80c8496ae:"9JWVX",e54ce0361d637752:"95yA1","5e15de01309c5057":"30not",fccd891af3c8103d:"dwhvK","2db1f0a6b3bd6dfd":"I3hyF","176edbe2885d9f01":"7dart","3f4d27281e93627e":"6mXK1","95f892709744ad29":"jHRGA"}],"4teOf":[function(e,t,i){var n=e("db380432183a20e4"),r=e("9f1a1fb33df853f"),s="DOMException";r(n(s),s)},{db380432183a20e4:"e5ie6","9f1a1fb33df853f":"dkhk9"}],lCP8o:[function(e,t,i){e("52e9b3eefbbce1ed"),e("292fa64716f5b39e")},{"52e9b3eefbbce1ed":"idFPB","292fa64716f5b39e":"1nu2V"}],idFPB:[function(e,t,i){var n=e("79389288a80b279c"),r=e("e4d64249a0133d14"),s=e("84ba5ca62b8b14c9").clear;n({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==s},{clearImmediate:s})},{"79389288a80b279c":"gJg5v",e4d64249a0133d14:"7Z171","84ba5ca62b8b14c9":"iEUCI"}],"1nu2V":[function(e,t,i){var n=e("33581c362196ed1f"),r=e("503bb555249cad41"),s=e("4219ce460223bd08").set,a=e("738dc378e6a94c64"),o=r.setImmediate?a(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==o},{setImmediate:o})},{"33581c362196ed1f":"gJg5v","503bb555249cad41":"7Z171","4219ce460223bd08":"iEUCI","738dc378e6a94c64":"LAeE1"}],LAeE1:[function(e,t,i){var n,r=e("aa6765693e58a0fe"),s=e("a68ecfcbf29c46f6"),a=e("7087588d33667af2"),o=e("864edee099e8affb"),h=e("3a3a5a2cfab86f21"),c=e("cff2c830bdea4f24"),l=e("58a74f00cee1ac64"),u=r.Function,d=/MSIE .\./.test(h)||"BUN"===o&&((n=r.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(e,t){var i=t?2:1;return d?function(n,r){var o=l(arguments.length,1)>i,h=a(n)?n:u(n),d=o?c(arguments,i):[],f=o?function(){s(h,this,d)}:h;return t?e(f,r):e(f)}:e}},{aa6765693e58a0fe:"7Z171",a68ecfcbf29c46f6:"2fjXG","7087588d33667af2":"h1Wnr","864edee099e8affb":"ah0ZS","3a3a5a2cfab86f21":"5hj4U",cff2c830bdea4f24:"eO8Ta","58a74f00cee1ac64":"h3DcZ"}],"1mZsz":[function(e,t,i){var n=e("6f7278673cd963e5"),r=e("4f851b5e5b332d48"),s=e("b80db4539abf09d9"),a=e("889c274f5e23b39"),o=e("15983ab5c2fbc059"),h=e("c36112b7edfed618"),c=e("74b26aee0ae17038");n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:h(function(){return c&&1!==Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length})},{queueMicrotask:function(e){o(arguments.length,1),s(a(e))}})},{"6f7278673cd963e5":"gJg5v","4f851b5e5b332d48":"7Z171",b80db4539abf09d9:"fhIs0","889c274f5e23b39":"alrlv","15983ab5c2fbc059":"h3DcZ",c36112b7edfed618:"cXVrS","74b26aee0ae17038":"6mXK1"}],f5KUv:[function(e,t,i){var n=e("9a97a510092b7d72"),r=e("bfbbd7ba4e233a15"),s=e("dadc1a7ad6bec203"),a=e("8d7f4453ff13e12d"),o=TypeError,h=Object.defineProperty,c=r.self!==r;try{if(a){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||s(r,"self",{get:function(){return r},set:function(e){if(this!==r)throw new o("Illegal invocation");h(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:r})}catch(e){}},{"9a97a510092b7d72":"gJg5v",bfbbd7ba4e233a15:"7Z171",dadc1a7ad6bec203:"3NI4M","8d7f4453ff13e12d":"6mXK1"}],kONpx:[function(e,t,i){var n=e("46a94df747165a08"),r=e("3e04e2f4e7f87918"),s=e("6e1ac61205678af6"),a=e("c95079dcb9321b5f"),o=e("b30c4be405e55cd1"),h=e("d2759cd31961ec5f"),c=e("b28324366ed35694"),l=e("51b2af7ff9e786d2"),u=e("dbc30081dcfdeb22"),d=e("88e551d63448111"),f=e("748c1e7b84b5d0b6"),p=e("9b6dd1d113f04b93"),g=e("5236c862010bd4cc"),m=e("47c7a4ba5ff3ba9"),v=e("ea5539f8b43d1a17"),y=e("64004e8c5f5d0ef3"),b=e("9971f98ded0a259"),x=e("66bbcc11f1e948a"),E=e("a9cdcd120539bbe8"),w=e("be347fa71d60a5eb"),T=e("4868328f7e546c6"),S=e("1e6645abd1a2b421"),A=e("d0363fc9d9cfdd8c"),C=e("3275f5da850ac759"),_=e("3feae2e57ec01a12"),I=e("9575a353cf8e050f"),O=e("a675c54ae6442127"),P=s.Object,M=s.Array,R=s.Date,L=s.Error,D=s.TypeError,k=s.PerformanceMark,N=a("DOMException"),F=S.Map,B=S.has,U=S.get,V=S.set,G=A.Set,j=A.add,W=A.has,Y=a("Object","keys"),H=o([].push),z=o((!0).valueOf),X=o(1..valueOf),K=o("".valueOf),q=o(R.prototype.getTime),J=c("structuredClone"),$="DataCloneError",Q="Transferring",Z=function(e){return!h(function(){var t=new s.Set([7]),i=e(t),n=e(P(7));return i===t||!i.has(7)||!f(n)||7!=+n})&&e},ee=function(e,t){return!h(function(){var i=new t,n=e({a:i,b:i});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===i.stack)})},et=s.structuredClone,ei=n||!ee(et,L)||!ee(et,N)||!!h(function(){var e=et(new s.AggregateError([1],J,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==J||3!==e.cause}),en=!et&&Z(function(e){return new k(J,{detail:e}).detail}),er=Z(et)||en,es=function(e){throw new N("Uncloneable type: "+e,$)},ea=function(e,t){throw new N((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",$)},eo=function(e,t){return er||ea(t),er(e)},eh=function(){var e;try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null},ec=function(e,t,i){if(B(t,e))return U(t,e);if("SharedArrayBuffer"===(i||v(e)))n=er?er(e):e;else{var n,r,a,o,h,c,u=s.DataView;u||l(e.slice)||ea("ArrayBuffer");try{if(l(e.slice)&&!e.resizable)n=e.slice(0);else for(c=0,r=e.byteLength,a=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(r,a),o=new u(e),h=new u(n);c1&&!d(arguments[1])?m(arguments[1]):void 0,r=n?n.transfer:void 0;void 0!==r&&(i=ed(r,t=new F));var s=eu(e,t);return i&&ef(i),s}})},{"46a94df747165a08":"jHRGA","3e04e2f4e7f87918":"gJg5v","6e1ac61205678af6":"7Z171",c95079dcb9321b5f:"e5ie6",b30c4be405e55cd1:"2iJ57",d2759cd31961ec5f:"cXVrS",b28324366ed35694:"55cC0","51b2af7ff9e786d2":"h1Wnr",dbc30081dcfdeb22:"eytEI","88e551d63448111":"8AxCV","748c1e7b84b5d0b6":"8mxCV","9b6dd1d113f04b93":"2ZU2p","5236c862010bd4cc":"dCEHX","47c7a4ba5ff3ba9":"dPzbI",ea5539f8b43d1a17:"cRCRk","64004e8c5f5d0ef3":"9JWVX","9971f98ded0a259":"SVTZV","66bbcc11f1e948a":"gKM90",a9cdcd120539bbe8:"kHSes",be347fa71d60a5eb:"h3DcZ","4868328f7e546c6":"iG8db","1e6645abd1a2b421":"fY40v",d0363fc9d9cfdd8c:"aKtSD","3275f5da850ac759":"dSeD9","3feae2e57ec01a12":"edpRG","9575a353cf8e050f":"3Scc5",a675c54ae6442127:"2emOi"}],h5L1l:[function(e,t,i){e("9453fdd92aad151a"),e("c303d63f9a1c5be5")},{"9453fdd92aad151a":"98PJR",c303d63f9a1c5be5:"ydvxy"}],"98PJR":[function(e,t,i){var n=e("a9d1c09227b9596"),r=e("8f238f56192273e4"),s=e("87cb4ec54c39341e")(r.setInterval,!0);n({global:!0,bind:!0,forced:r.setInterval!==s},{setInterval:s})},{a9d1c09227b9596:"gJg5v","8f238f56192273e4":"7Z171","87cb4ec54c39341e":"LAeE1"}],ydvxy:[function(e,t,i){var n=e("6060be99991be48a"),r=e("f9d851aba3178e79"),s=e("ae4294be5adb39a1")(r.setTimeout,!0);n({global:!0,bind:!0,forced:r.setTimeout!==s},{setTimeout:s})},{"6060be99991be48a":"gJg5v",f9d851aba3178e79:"7Z171",ae4294be5adb39a1:"LAeE1"}],"4J9Kt":[function(e,t,i){e("99544a7edcd747a5")},{"99544a7edcd747a5":"7XU3f"}],"7XU3f":[function(e,t,i){e("19928ff2abfc3536");var n,r=e("d446e2097c7c2b23"),s=e("cd0458003d61a323"),a=e("592c96d240ad401c"),o=e("2e7550752ce99b71"),h=e("c128b8cb3e38a436"),c=e("9ee66bece60e18c5"),l=e("763c39a8b521ff54"),u=e("1c9277bbea264bc7"),d=e("f0dd676601f7cb0b"),f=e("deee7b2fe3c1e96f"),p=e("ff3437c5b86d6c26"),g=e("3c2f033d1a197fd6"),m=e("9fdfccae2d327739"),v=e("8ba5b2695179827").codeAt,y=e("23751b8f28dcd37"),b=e("5f808b1954b24403"),x=e("f969f30083a50975"),E=e("b15c5243fe0e0f6"),w=e("e8b262dfe3e4c989"),T=e("9a3ca045fbb43248"),S=T.set,A=T.getterFor("URL"),C=w.URLSearchParams,_=w.getState,I=o.URL,O=o.TypeError,P=o.parseInt,M=Math.floor,R=Math.pow,L=c("".charAt),D=c(/./.exec),k=c([].join),N=c(1..toString),F=c([].pop),B=c([].push),U=c("".replace),V=c([].shift),G=c("".split),j=c("".slice),W=c("".toLowerCase),Y=c([].unshift),H="Invalid scheme",z="Invalid host",X="Invalid port",K=/[a-z]/i,q=/[\d+-.a-z]/i,J=/\d/,$=/^0x/i,Q=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ei=/[\0\t\n\r #/:<>?@[\\\]^|]/,en=/^[\u0000-\u0020]+/,er=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,es=/[\t\n\r]/g,ea=function(e){var t,i,n,r,s,a,o,h=G(e,".");if(h.length&&""===h[h.length-1]&&h.length--,(t=h.length)>4)return e;for(n=0,i=[];n1&&"0"===L(r,0)&&(s=D($,r)?16:8,r=j(r,8===s?1:2)),""===r)a=0;else{if(!D(10===s?Z:8===s?Q:ee,r))return e;a=P(r,s)}B(i,a)}for(n=0;n=R(256,5-t))return null}else if(a>255)return null;for(n=0,o=F(i);n6))return;for(n=0;d();){if(r=null,n>0){if("."!==d()||!(n<4))return;u++}if(!D(J,d()))return;for(;D(J,d());){if(s=P(d(),10),null===r)r=s;else{if(0===r)return;r=10*r+s}if(r>255)return;u++}h[c]=256*h[c]+r,(2==++n||4===n)&&c++}if(4!==n)return;break}if(":"===d()){if(u++,!d())return}else if(d())return;h[c++]=t}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)o=h[c],h[c--]=h[l+a-1],h[l+--a]=o;else if(8!==c)return;return h},eh=function(e){for(var t=null,i=1,n=null,r=0,s=0;s<8;s++)0!==e[s]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=s),++r);return r>i?n:t},ec=function(e){var t,i,n,r;if("number"==typeof e){for(i=0,t=[];i<4;i++)Y(t,e%256),e=M(e/256);return k(t,".")}if("object"==typeof e){for(i=0,t="",n=eh(e);i<8;i++)(!r||0!==e[i])&&(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=N(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},el={},eu=p({},el,{" ":1,'"':1,"<":1,">":1,"`":1}),ed=p({},eu,{"#":1,"?":1,"{":1,"}":1}),ef=p({},ed,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ep=function(e,t){var i=v(e,0);return i>32&&i<127&&!f(t,e)?e:encodeURIComponent(e)},eg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},em=function(e,t){var i;return 2===e.length&&D(K,L(e,0))&&(":"===(i=L(e,1))||!t&&"|"===i)},ev=function(e){var t;return e.length>1&&em(j(e,0,2))&&(2===e.length||"/"===(t=L(e,2))||"\\"===t||"?"===t||"#"===t)},ey={},eb={},ex={},eE={},ew={},eT={},eS={},eA={},eC={},e_={},eI={},eO={},eP={},eM={},eR={},eL={},eD={},ek={},eN={},eF={},eB={},eU=function(e,t,i){var n,r,s,a=b(e);if(t){if(r=this.parse(a))throw new O(r);this.searchParams=null}else{if(void 0!==i&&(n=new eU(i,!0)),r=this.parse(a,null,n))throw new O(r);(s=_(new C)).bindURL(this),this.searchParams=s}};eU.prototype={type:"URL",parse:function(e,t,i){var r=t||ey,s=0,a="",o=!1,h=!1,c=!1;for(e=b(e),t||(this.scheme="",this.username="",this.password="",this.host=null,this.port=null,this.path=[],this.query=null,this.fragment=null,this.cannotBeABaseURL=!1,e=U(e,en,""),e=U(e,er,"$1")),l=g(e=U(e,es,""));s<=l.length;){switch(u=l[s],r){case ey:if(u&&D(K,u))a+=W(u),r=eb;else{if(t)return H;r=ex;continue}break;case eb:if(u&&(D(q,u)||"+"===u||"-"===u||"."===u))a+=W(u);else if(":"===u){if(t&&(this.isSpecial()!==f(eg,a)||"file"===a&&(this.includesCredentials()||null!==this.port)||"file"===this.scheme&&!this.host))return;if(this.scheme=a,t){this.isSpecial()&&eg[this.scheme]===this.port&&(this.port=null);return}a="","file"===this.scheme?r=eM:this.isSpecial()&&i&&i.scheme===this.scheme?r=eE:this.isSpecial()?r=eA:"/"===l[s+1]?(r=ew,s++):(this.cannotBeABaseURL=!0,B(this.path,""),r=eN)}else{if(t)return H;a="",r=ex,s=0;continue}break;case ex:if(!i||i.cannotBeABaseURL&&"#"!==u)return H;if(i.cannotBeABaseURL&&"#"===u){this.scheme=i.scheme,this.path=m(i.path),this.query=i.query,this.fragment="",this.cannotBeABaseURL=!0,r=eB;break}r="file"===i.scheme?eM:eT;continue;case eE:if("/"===u&&"/"===l[s+1])r=eC,s++;else{r=eT;continue}break;case ew:if("/"===u){r=e_;break}r=ek;continue;case eT:if(this.scheme=i.scheme,u===n)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query;else if("/"===u||"\\"===u&&this.isSpecial())r=eS;else if("?"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query="",r=eF;else if("#"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.path.length--,r=ek;continue}break;case eS:if(this.isSpecial()&&("/"===u||"\\"===u))r=eC;else if("/"===u)r=e_;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,r=ek;continue}break;case eA:if(r=eC,"/"!==u||"/"!==L(a,s+1))continue;s++;break;case eC:if("/"!==u&&"\\"!==u){r=e_;continue}break;case e_:if("@"===u){o&&(a="%40"+a),o=!0,d=g(a);for(var l,u,d,p,v,y,x=0;x65535)return X;this.port=this.isSpecial()&&T===eg[this.scheme]?null:T,a=""}if(t)return;r=eD;continue}break;case eM:if(this.scheme="file","/"===u||"\\"===u)r=eR;else if(i&&"file"===i.scheme)switch(u){case n:this.host=i.host,this.path=m(i.path),this.query=i.query;break;case"?":this.host=i.host,this.path=m(i.path),this.query="",r=eF;break;case"#":this.host=i.host,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;break;default:ev(k(m(l,s),""))||(this.host=i.host,this.path=m(i.path),this.shortenPath()),r=ek;continue}else{r=ek;continue}break;case eR:if("/"===u||"\\"===u){r=eL;break}i&&"file"===i.scheme&&!ev(k(m(l,s),""))&&(em(i.path[0],!0)?B(this.path,i.path[0]):this.host=i.host),r=ek;continue;case eL:if(u===n||"/"===u||"\\"===u||"?"===u||"#"===u){if(!t&&em(a))r=ek;else if(""===a){if(this.host="",t)return;r=eD}else{if(p=this.parseHost(a))return p;if("localhost"===this.host&&(this.host=""),t)return;a="",r=eD}continue}a+=u;break;case eD:if(this.isSpecial()){if(r=ek,"/"!==u&&"\\"!==u)continue}else if(t||"?"!==u){if(t||"#"!==u){if(u!==n&&(r=ek,"/"!==u))continue}else this.fragment="",r=eB}else this.query="",r=eF;break;case ek:if(u===n||"/"===u||"\\"===u&&this.isSpecial()||!t&&("?"===u||"#"===u)){if(".."===(v=W(v=a))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(this.shortenPath(),"/"===u||"\\"===u&&this.isSpecial()||B(this.path,"")):"."===(y=a)||"%2e"===W(y)?"/"===u||"\\"===u&&this.isSpecial()||B(this.path,""):("file"===this.scheme&&!this.path.length&&em(a)&&(this.host&&(this.host=""),a=L(a,0)+":"),B(this.path,a)),a="","file"===this.scheme&&(u===n||"?"===u||"#"===u))for(;this.path.length>1&&""===this.path[0];)V(this.path);"?"===u?(this.query="",r=eF):"#"===u&&(this.fragment="",r=eB)}else a+=ep(u,ed);break;case eN:"?"===u?(this.query="",r=eF):"#"===u?(this.fragment="",r=eB):u!==n&&(this.path[0]+=ep(u,el));break;case eF:t||"#"!==u?u!==n&&("'"===u&&this.isSpecial()?this.query+="%27":"#"===u?this.query+="%23":this.query+=ep(u,el)):(this.fragment="",r=eB);break;case eB:u!==n&&(this.fragment+=ep(u,eu))}s++}},parseHost:function(e){var t,i,n;if("["===L(e,0)){if("]"!==L(e,e.length-1)||!(t=eo(j(e,1,-1))))return z;this.host=t}else if(this.isSpecial()){if(D(et,e=y(e))||null===(t=ea(e)))return z;this.host=t}else{if(D(ei,e))return z;for(n=0,t="",i=g(e);n1?arguments[1]:void 0,n=S(t,new eU(e,!1,i));s||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},eG=eV.prototype,ej=function(e,t){return{get:function(){return A(this)[e]()},set:t&&function(e){return A(this)[t](e)},configurable:!0,enumerable:!0}};if(s&&(u(eG,"href",ej("serialize","setHref")),u(eG,"origin",ej("getOrigin")),u(eG,"protocol",ej("getProtocol","setProtocol")),u(eG,"username",ej("getUsername","setUsername")),u(eG,"password",ej("getPassword","setPassword")),u(eG,"host",ej("getHost","setHost")),u(eG,"hostname",ej("getHostname","setHostname")),u(eG,"port",ej("getPort","setPort")),u(eG,"pathname",ej("getPathname","setPathname")),u(eG,"search",ej("getSearch","setSearch")),u(eG,"searchParams",ej("getSearchParams")),u(eG,"hash",ej("getHash","setHash"))),l(eG,"toJSON",function(){return A(this).serialize()},{enumerable:!0}),l(eG,"toString",function(){return A(this).serialize()},{enumerable:!0}),I){var eW=I.createObjectURL,eY=I.revokeObjectURL;eW&&l(eV,"createObjectURL",h(eW,I)),eY&&l(eV,"revokeObjectURL",h(eY,I))}x(eV,"URL"),r({global:!0,constructor:!0,forced:!a,sham:!s},{URL:eV})},{"19928ff2abfc3536":"i2qFG",d446e2097c7c2b23:"gJg5v",cd0458003d61a323:"6mXK1","592c96d240ad401c":"azO8L","2e7550752ce99b71":"7Z171",c128b8cb3e38a436:"f1CxE","9ee66bece60e18c5":"2iJ57","763c39a8b521ff54":"4CPdc","1c9277bbea264bc7":"3NI4M",f0dd676601f7cb0b:"95yA1",deee7b2fe3c1e96f:"9JWVX",ff3437c5b86d6c26:"cKgWo","3c2f033d1a197fd6":"lrrJd","9fdfccae2d327739":"eO8Ta","8ba5b2695179827":"fVu0j","23751b8f28dcd37":"lUDfY","5f808b1954b24403":"4x6uB",f969f30083a50975:"dkhk9",b15c5243fe0e0f6:"h3DcZ",e8b262dfe3e4c989:"dIaqI","9a3ca045fbb43248":"ixHS2"}],azO8L:[function(e,t,i){var n=e("b638e4b55492b349"),r=e("d3a18943af316a4c"),s=e("f39eaf2672eb61e1"),a=e("f816319c57ebd10b"),o=r("iterator");t.exports=!n(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(e,i){t.delete("b"),n+=i+e}),i.delete("a",2),i.delete("b",void 0),a&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(a||!s)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},{b638e4b55492b349:"cXVrS",d3a18943af316a4c:"5CuF7",f39eaf2672eb61e1:"6mXK1",f816319c57ebd10b:"jHRGA"}],lUDfY:[function(e,t,i){var n=e("5fc1d380e4ee310c"),r=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=RangeError,h=n(s.exec),c=Math.floor,l=String.fromCharCode,u=n("".charCodeAt),d=n([].join),f=n([].push),p=n("".replace),g=n("".split),m=n("".toLowerCase),v=function(e){for(var t=[],i=0,n=e.length;i=55296&&r<=56319&&i>1,e+=c(e/t);e>455;)e=c(e/35),n+=36;return c(n+36*e/(e+38))},x=function(e){var t,i,n=[],r=(e=v(e)).length,s=128,h=0,u=72;for(t=0;t=s&&ic((2147483647-h)/x))throw new o(a);for(h+=(m-s)*x,s=m,t=0;t2147483647)throw new o(a);if(i===s){for(var E=h,w=36;;){var T=w<=u?1:w>=u+26?26:w-u;if(E0&&(e&i)!=0;i>>=1)t++;return t},eh=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ec=function(e){for(var t=(e=Q(e,er," ")).length,i="",n=0;nt){i+="%",n++;continue}var s=ea(e,n+1);if(s!=s){i+=r,n++;continue}n+=2;var a=eo(s);if(0===a)r=z(s);else{if(1===a||a>4){i+="�",n++;continue}for(var o=[s],h=1;ht)&&"%"===q(e,n);){var c=ea(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;$(o,c),n+=2,h++}if(o.length!==a){i+="�";continue}var l=eh(o);null===l?i+="�":r=X(l)}}i+=r,n++}return i},el=/[!'()~]|%20/g,eu={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ed=function(e){return eu[e]},ef=function(e){return Q(H(e),el,ed)},ep=g(function(e,t){N(this,{type:k,target:F(e).entries,index:0,kind:t})},D,function(){var e=B(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,O(void 0,!0);var n=t[i];switch(e.kind){case"keys":return O(n.key,!1);case"values":return O(n.value,!1)}return O([n.key,n.value],!1)},!0),eg=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===q(e,0)?ei(e,1):e:S(e)))};eg.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,n,r,s,a,h,c=this.entries,l=I(e);if(l)for(i=(t=_(e,l)).next;!(n=o(i,t)).done;){if((a=o(s=(r=_(w(n.value))).next,r)).done||(h=o(s,r)).done||!o(s,r).done)throw new Y("Expected sequence with length 2");$(c,{key:S(a.value),value:S(h.value)})}else for(var u in e)b(e,u)&&$(c,{key:u,value:S(e[u])})},parseQuery:function(e){if(e)for(var t,i,n=this.entries,r=et(e,"&"),s=0;s0?arguments[0]:void 0,t=N(this,new eg(e));c||(this.size=t.entries.length)},ev=em.prototype;if(f(ev,{append:function(e,t){var i=F(this);P(arguments.length,2),$(i.entries,{key:S(e),value:S(t)}),!c&&this.length++,i.updateURL()},delete:function(e){for(var t=F(this),i=P(arguments.length,1),n=t.entries,r=S(e),s=i<2?void 0:arguments[1],a=void 0===s?s:S(s),o=0;ot.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,i=F(this).entries,n=x(e,arguments.length>1?arguments[1]:void 0),r=0;r1?ex(arguments[1]):{})}}),y(V)){var eE=function(e){return v(this,j),new V(e,arguments.length>1?ex(arguments[1]):{})};j.constructor=eE,eE.prototype=j,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:eE})}}t.exports={URLSearchParams:em,getState:F}},{"12e7a75121005a18":"3prNk",aed1dbd908154980:"dLJLG","2c283453b2df07f7":"gJg5v",f8300b17f61c07ea:"7Z171",c6afc8e42ff4d861:"aXhrH",c5226e6ac6c1a4ca:"e5ie6",c70bfc3d71513918:"bOssl",a30c0c0ecacbf883:"2iJ57","9dc980ea97e54f2d":"6mXK1","34e5e214071de9f5":"azO8L",d5c866a8dfde6bfe:"4CPdc",cfb67c7a1a4f1af9:"3NI4M",f0c2290e210049d5:"43JWW",c7a2f88a5440a541:"dkhk9",fb2d9f4ac91c2856:"1Abii","5e8fcf76ef17aca5":"ixHS2","486653683495e4a1":"95yA1","34563d35f35f9929":"h1Wnr",b866aa0bde936df4:"9JWVX",b5970b9126e1d395:"f1CxE","71cd06e9ca4a93a2":"cRCRk","7e16c364467ce62d":"dPzbI","9a0912d2261bbada":"8mxCV","9d062cdf188403bf":"4x6uB","1caa2aad22025751":"7isQ3",bf766970034bde82:"5toj2",c6d4d2a85cdef35a:"kBMjp","6668155f748c33e9":"3624P","982e5845e606dff7":"dwU83","9a407fe1b80ba6f5":"h3DcZ","778323e4214f089d":"5CuF7","83b87fb1800baf72":"5Mqp3"}],"6WXZj":[function(e,t,i){var n=e("e013012b2638fef2"),r=e("9496ef9db0f82491"),s=e("21b7d0d94de855c8"),a=e("8147b48bed1193b9"),o=e("209fab1bb25c54f1"),h=e("fc6b642936976470"),c=r("URL"),l=h&&s(function(){c.canParse()}),u=s(function(){return 1!==c.canParse.length});n({target:"URL",stat:!0,forced:!l||u},{canParse:function(e){var t=a(arguments.length,1),i=o(e),n=t<2||void 0===arguments[1]?void 0:o(arguments[1]);try{return new c(i,n),!0}catch(e){return!1}}})},{e013012b2638fef2:"gJg5v","9496ef9db0f82491":"e5ie6","21b7d0d94de855c8":"cXVrS","8147b48bed1193b9":"h3DcZ","209fab1bb25c54f1":"4x6uB",fc6b642936976470:"azO8L"}],jUFLb:[function(e,t,i){var n=e("ca194031c7296753"),r=e("349abd465922c360"),s=e("4631d0a34bc5d157"),a=e("aa32995cacd33b44"),o=e("be99ff6f8e610b1"),h=r("URL");n({target:"URL",stat:!0,forced:!o},{parse:function(e){var t=s(arguments.length,1),i=a(e),n=t<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return new h(i,n)}catch(e){return null}}})},{ca194031c7296753:"gJg5v","349abd465922c360":"e5ie6","4631d0a34bc5d157":"h3DcZ",aa32995cacd33b44:"4x6uB",be99ff6f8e610b1:"azO8L"}],fisJQ:[function(e,t,i){var n=e("bfa898e24eaaf3ba"),r=e("f2e0e6e15a74c3f4");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},{bfa898e24eaaf3ba:"gJg5v",f2e0e6e15a74c3f4:"bOssl"}],drhch:[function(e,t,i){e("d31c1e63d588cf96")},{d31c1e63d588cf96:"dIaqI"}],k5k9P:[function(e,t,i){var n=e("5e6ccc0840d93f4d"),r=e("cef48d325e9fb1df"),s=e("669131fee6eafcca"),a=e("1de5920376d9b739"),o=URLSearchParams,h=o.prototype,c=r(h.append),l=r(h.delete),u=r(h.forEach),d=r([].push),f=new o("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&n(h,"delete",function(e){var t,i=arguments.length,n=i<2?void 0:arguments[1];if(i&&void 0===n)return l(this,e);var r=[];u(this,function(e,t){d(r,{key:t,value:e})}),a(i,1);for(var o=s(e),h=s(n),f=0,p=0,g=!1,m=r.length;f=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var h=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(h&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),C(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:I(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(t.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],eDoZE:[function(e,t,i){let{GameClient:n}=e("c0142d4e41395f84"),{GameEngine:r}=e("18a1ed1c4bf17b4d"),{RoomEvents:s}=e("dceef5f4a6a9e8ba"),{ClientStartHandler:a}=e("ec0d66055e408699"),{FeaturesManager:o}=e("7e4eea7c2d38167d"),{FirebaseConnector:h}=e("96ad1970faff6b57"),{ConfigManager:c}=e("f699c89d645cbfaf"),{TranslationsMapper:l}=e("92bd008077187dc5"),u=e("5f809829afd075a"),{GameDom:d}=e("aeb0ac1bb4c645c8"),{RoomsConst:f}=e("b21bf1f3f93cb5d9"),{GameConst:p}=e("f6b922b1a92a11c2"),{ErrorManager:g,EventsManagerSingleton:m,Logger:v,sc:y}=e("33884cbf240ef975");t.exports.GameManager=class{constructor(){this.gameEngine=!1,this.activeRoomEvents=null,this.events=m,this.gameDom=d,this.config=new c;let e=this.gameDom.getWindow()?.reldensInitialConfig||{};y.deepMergeProperties(this.config,e),this.features=new o({gameManager:this,events:this.events}),this.firebase=new h(this),this.joinedRooms={},this.userData={},this.plugins={},this.services={},this.elements={},this.playerData=!1,this.gameOver=!1,this.forcedDisconnection=!1,this.isChangingScene=!1,this.canInitEngine=!0,this.appServerUrl="",this.gameServerUrl="",this.locale="",l.forConfig(this.config.client,u,p.MESSAGE.DATA_VALUES)}setupCustomClientPlugin(e,t){this.plugins[e]=new t,this.plugins[e].setup({gameManager:this,events:this.events})}clientStart(){this.events.emitSync("reldens.clientStartBefore",this),this.startHandler=new a(this),this.startHandler.clientStart()}async startGame(e,t){return(this.events.emitSync("reldens.startGameBefore",this),await this.joinGame(e,t))?(this.handleLoginSuccess(),!0):(this.handleLoginError(e),!1)}handleLoginSuccess(){let e=this.gameDom.getElement(p.SELECTORS.BODY);e.classList.add(p.CLASSES.GAME_STARTED),e.classList.remove(p.CLASSES.GAME_ERROR),this.gameDom.getElement(p.SELECTORS.FORMS_CONTAINER).remove(),this.gameDom.getElement(p.SELECTORS.GAME_CONTAINER).classList.remove(p.CLASSES.HIDDEN),this.events.emitSync("reldens.startGameAfter",this)}handleLoginError(e){let t=this.gameDom.getElement(p.SELECTORS.BODY);t.classList.remove(p.CLASSES.GAME_STARTED),t.classList.add(p.CLASSES.GAME_ERROR),this.submitedForm=!1,this.events.emitSync("reldens.gameRoomError",this),this.firebase&&"firebase-login"===e.formId&&this.firebase.app.auth().signOut()}async joinGame(e,t=!1){return(this.userData={},await this.events.emit("reldens.beforeJoinGame",{gameManager:this,formData:e,isNewUser:t}),this.mapFormDataToUserData(e,t),this.gameRoom=await this.gameClient.joinOrCreate(p.ROOM_GAME,this.userData),this.gameRoom)?(await this.events.emit("reldens.beforeJoinGameRoom",this.gameRoom),this.handleGameRoomMessages(),this.activateResponsiveBehavior(),this.gameRoom):(this.displayFormError("#"+e.formId,this.gameClient.lastErrorMessage),!1)}mapFormDataToUserData(e,t){y.hasOwn(e,"forgot")&&(this.userData.forgot=1,this.userData.email=e.email),this.initializeClient(),e.isGuest&&(this.userData.isGuest=!0,this.userData.isNewUser=!0),t&&(this.userData.isNewUser=!0,this.userData.email=e.email),this.userData.username=e.username,this.userData.password=e.password}handleGameRoomMessages(){this.gameRoom.onMessage("*",async e=>{if(e.error)return v.error("Game Room message error.",e.error),this.displayFormError(p.SELECTORS.PLAYER_CREATE_FORM,e.error),!1;if(p.START_GAME===e.act)return this.initialGameData=e,await this.beforeStartGame();if(p.CREATE_PLAYER_RESULT!==e.act)return!1;this.initialGameData.player=e.player;let t=this.gameDom.getElement(p.SELECTORS.PLAYER_SELECTION);t&&t.classList.add("hidden"),await this.initEngine()})}activateResponsiveBehavior(){this.events.on("reldens.afterSceneDynamicCreate",async()=>{this.config.getWithoutLogs("client/ui/screen/responsive",!0)&&(this.gameEngine.updateGameSize(this),this.gameDom.getWindow().addEventListener("resize",()=>{this.gameEngine.updateGameSize(this)}))})}displayFormError(e,t){let i=this.gameDom.getElement(e+" "+p.SELECTORS.RESPONSE_ERROR);return!!i&&(i.innerHTML=t,!0)}initializeClient(){this.appServerUrl=this.getAppServerUrl(),this.gameServerUrl=this.getGameServerUrl(),this.gameClient=new n(this.gameServerUrl,this.config)}async beforeStartGame(){return await this.events.emit("reldens.beforeInitEngineAndStartGame",this.initialGameData,this),y.hasOwn(this.initialGameData,"gameConfig")||g.error("Missing game configuration."),y.deepMergeProperties(this.config,this.initialGameData?.gameConfig||{}),await this.features.loadFeatures(this.initialGameData?.features||{}),await this.events.emit("reldens.beforeCreateEngine",this.initialGameData,this),!!this.canInitEngine&&await this.initEngine()}async initEngine(){if(this.playerData=this.initialGameData?.player||!1,!this.playerData||!this.playerData.state)return this.gameDom.alertReload(this.services?.translator.t("game.errors.missingPlayerData"));this.userData.selectedPlayer=this.playerData.id;let e=this.initialGameData?.selectedScene||"";this.userData.selectedScene=e;let t=this.initialGameData?.gameConfig||{};this.gameEngine=new r({config:t.client.gameEngine,events:this.events}),this.userData.isNewUser=!1,this.userData.isGuest&&(this.initialGameData?.guestPassword&&(this.userData.password=this.initialGameData.guestPassword),this.initialGameData?.userName&&(this.userData.username=this.initialGameData.userName)),await this.joinFeaturesRooms();let i=""!==e&&e!==f.ROOM_LAST_LOCATION_KEY?e:this.playerData.state.scene;this.playerData.state.scene=i;let n=await this.gameClient.joinOrCreate(i,this.userData);return n?(this.gameDom.getElement(p.SELECTORS.BODY).classList.add(p.CLASSES.GAME_ENGINE_STARTED),delete this.initialGameData.selectedScene,delete this.userData.selectedScene,await this.emitJoinedRoom(n,i),this.activeRoomEvents=this.createRoomEventsInstance(i,this.events),await this.events.emit("reldens.createdRoomsEventsInstance",n,this),await this.activeRoomEvents.activateRoom(n),await this.emitActivatedRoom(n,i),await this.events.emit("reldens.afterInitEngineAndStartGame",this.initialGameData,n),n):this.gameDom.alertReload(this.services?.translator.t("game.errors.joiningRoom",{joinRoomName:i}))}async joinFeaturesRooms(){let e=Object.keys(this.features.featuresList);if(0===e.length)return;let t=[];for(let i of e){let e=this.features.featuresList[i];if(y.hasOwn(e,"joinRooms"))for(let i of e.joinRooms){let e=await this.gameClient.joinOrCreate(i,this.userData);if(!e)return this.gameDom.alertReload(this.services.translator.t("game.errors.joiningFeatureRoom",{joinRoomName:i}));this.joinedRooms[i]=e,await this.emitJoinedRoom(e,i),t.push(i)}}y.deepMergeProperties(this.config,{client:{rooms:{featuresRoomsNames:t}}})}async reconnectGameClient(e,t){this.isChangingScene=!0;let i=this.createRoomEventsInstance(e.player.state.scene);this.gameClient.joinOrCreate(i.roomName,this.userData).then(async n=>{t.leave(),this.activeRoomEvents=i,this.room=n,await this.emitJoinedRoom(n,e.player.state.scene),await i.activateRoom(n,e.prev),await this.emitActivatedRoom(n,e.player.state.scene)}).catch(i=>{v.error("Reconnect Game Client error.",{error:i,message:e,previousRoom:t}),this.gameDom.alertReload(this.services.translator.t("game.errors.reconnectClient"))})}async emitActivatedRoom(e,t){await this.events.emit("reldens.activatedRoom",e,this),await this.events.emit("reldens.activatedRoom_"+t,e,this)}async emitJoinedRoom(e,t){await this.events.emit("reldens.joinedRoom",e,this),await this.events.emit("reldens.joinedRoom_"+t,e,this)}createRoomEventsInstance(e){return new s(e,this)}getAppServerUrl(){return""===this.appServerUrl&&(this.appServerUrl=this.getUrlFromCurrentReferer()),this.appServerUrl}getGameServerUrl(){return""===this.gameServerUrl&&(this.gameServerUrl=this.getUrlFromCurrentReferer(!0)),this.gameServerUrl}getUrlFromCurrentReferer(e=!1){let t=this.gameDom.getWindow().location,i=t.protocol;return e&&(i=0===i.indexOf("https")?"wss:":"ws:"),i+"//"+t.hostname+(t.port?":"+t.port:"")}getActiveScene(){return this.activeRoomEvents.getActiveScene()}getActiveScenePreloader(){let e=this.getActiveScene().key;return this.gameEngine.scene.getScene("ScenePreloader"+e)}getCurrentPlayer(){let e=this.getActiveScene();return!!e&&e.player}currentPlayerName(){let e=this.getCurrentPlayer();return e?e.player_id+" - "+e.playerName:""}getCurrentPlayerAnimation(){let e=this.getCurrentPlayer();return e.players[e.playerId]}getUiElement(e,t=!0){let i=y.get(this.gameEngine,"uiScene",!1);return i?i.getUiElement(e,t):(t&&v.error("UI Scene not defined."),!1)}getFeature(e){let t=this.features.featuresList;return y.hasOwn(t,e)?t[e]:(v.error("Feature key not defined.",e),!1)}getAnimationByKey(e){return this.getActiveScene().getAnimationByKey(e)}}},{c0142d4e41395f84:"44RMi","18a1ed1c4bf17b4d":"fVZ41",dceef5f4a6a9e8ba:"7XAJ0",ec0d66055e408699:"401GU","7e4eea7c2d38167d":"3ZqP5","96ad1970faff6b57":"dkVHA",f699c89d645cbfaf:"6v2bg","92bd008077187dc5":"1fcQw","5f809829afd075a":"CtFH5",aeb0ac1bb4c645c8:"bqEy7",b21bf1f3f93cb5d9:"9vHHC",f6b922b1a92a11c2:"93TbC","33884cbf240ef975":"3lwy5"}],"44RMi":[function(e,t,i){let{Client:n}=e("7318eff88b436af1"),{RoomsConst:r}=e("25de65df7e751073"),{GameConst:s}=e("6f1338761bdf0493"),{Logger:a}=e("c4efa48e92b2f02b");t.exports.GameClient=class{constructor(e,t){this.serverUrl=e,this.config=t,this.autoConnectServerGameRoom=this.config.getWithoutLogs("client/rooms/autoConnectServerGameRoom",!0),this.autoConnectServerFeatureRooms=this.config.getWithoutLogs("client/rooms/autoConnectServerFeatureRooms",!0),this.roomsUrls={},this.roomClients={},this.gameRoomsByServer={},this.featuresByServerFlag={},this.featuresRoomsByServer={},this.lastErrorMessage=""}async joinOrCreate(e,t){this.lastErrorMessage="";try{let i=this.roomClient(e);if(!i)return a.error('Client not found for room name "'+e+'".'),!1;let n=this.roomsUrls[e];return await this.connectToGlobalGameRoom(n,i,t),await this.connectToGlobalFeaturesRooms(n,i,t),await i.joinOrCreate(e,t)}catch(i){if(r.ERRORS.CREATING_ROOM_AWAIT===i.message)return await new Promise(e=>setTimeout(e,500)),await this.joinOrCreate(e,t);this.lastErrorMessage=i.message,a.error("Joining room error: "+i.message)}return!1}async connectToGlobalGameRoom(e,t,i){if(this.autoConnectServerGameRoom){if(""===e||this.serverUrl===e){a.debug("Avoid connect to global game room.",this.serverUrl,e);return}this.gameRoomsByServer[e]||(a.debug("Registering GameRoom for server: "+e),this.gameRoomsByServer[e]=await t.joinOrCreate(s.ROOM_GAME,i),this.gameRoomsByServer[e].onMessage("*",()=>{}))}}async connectToGlobalFeaturesRooms(e,t,i){if(!this.autoConnectServerFeatureRooms)return;if(""===e||this.serverUrl===e){a.debug("Avoid connect to features rooms.",this.serverUrl,e);return}if(this.featuresByServerFlag[e])return;a.debug("Registering features rooms for server: "+e),this.featuresByServerFlag[e]=!0;let n=this.config.getWithoutLogs("client/rooms/featuresRoomsNames",[]);if(!(00&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}(this._view,this._offset,e);return this._offset+=e,t},T.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},T.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),i=0,n=0,r=0,s=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-((255-t+1)*1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return i=this._view.getUint8(this._offset),this._offset+=1,this._bin(i);case 197:return i=this._view.getUint16(this._offset),this._offset+=2,this._bin(i);case 198:return i=this._view.getUint32(this._offset),this._offset+=4,this._bin(i);case 199:if(i=this._view.getUint8(this._offset),n=this._view.getInt8(this._offset+1),this._offset+=2,-1===n){var a=this._view.getUint32(this._offset);return r=this._view.getInt32(this._offset+4),s=this._view.getUint32(this._offset+8),this._offset+=12,new Date((4294967296*r+s)*1e3+a/1e6)}return[n,this._bin(i)];case 200:return i=this._view.getUint16(this._offset),n=this._view.getInt8(this._offset+2),this._offset+=3,[n,this._bin(i)];case 201:return i=this._view.getUint32(this._offset),n=this._view.getInt8(this._offset+4),this._offset+=5,[n,this._bin(i)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return r=4294967296*this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 212:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n){this._offset+=1;return}return[n,this._bin(1)];case 213:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(2)];case 214:if(n=this._view.getInt8(this._offset),this._offset+=1,-1===n)return e=this._view.getUint32(this._offset),this._offset+=4,new Date(1e3*e);return[n,this._bin(4)];case 215:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n)return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(r+s);if(-1===n)return r=this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(1e3*((3&r)*4294967296+s)+(r>>>2)/1e6);return[n,this._bin(8)];case 216:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(16)];case 217:return i=this._view.getUint8(this._offset),this._offset+=1,this._str(i);case 218:return i=this._view.getUint16(this._offset),this._offset+=2,this._str(i);case 219:return i=this._view.getUint32(this._offset),this._offset+=4,this._str(i);case 220:return i=this._view.getUint16(this._offset),this._offset+=2,this._array(i);case 221:return i=this._view.getUint32(this._offset),this._offset+=4,this._array(i);case 222:return i=this._view.getUint16(this._offset),this._offset+=2,this._map(i);case 223:return i=this._view.getUint32(this._offset),this._offset+=4,this._map(i)}throw Error("Could not parse")};var S=globalThis.WebSocket||function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},A=function(){function e(e){this.events=e}return e.prototype.send=function(e){e instanceof ArrayBuffer?this.ws.send(e):Array.isArray(e)&&this.ws.send(new Uint8Array(e).buffer)},e.prototype.connect=function(e){this.ws=new S(e,this.protocols),this.ws.binaryType="arraybuffer",this.ws.onopen=this.events.onopen,this.ws.onmessage=this.events.onmessage,this.ws.onclose=this.events.onclose,this.ws.onerror=this.events.onerror},e.prototype.close=function(e,t){this.ws.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.ws.readyState===S.OPEN},enumerable:!1,configurable:!0}),e}(),C=function(){function e(){this.events={},this.transport=new A(this.events)}return e.prototype.send=function(e){this.transport.send(e)},e.prototype.connect=function(e){this.transport.connect(e)},e.prototype.close=function(e,t){this.transport.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.transport.isOpen},enumerable:!1,configurable:!0}),e}();function _(e,t){for(var i=e[t++],n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}function I(e){void 0===e&&(e="");for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i+1}e.Protocol=void 0,(r=e.Protocol||(e.Protocol={}))[r.HANDSHAKE=9]="HANDSHAKE",r[r.JOIN_ROOM=10]="JOIN_ROOM",r[r.ERROR=11]="ERROR",r[r.LEAVE_ROOM=12]="LEAVE_ROOM",r[r.ROOM_DATA=13]="ROOM_DATA",r[r.ROOM_STATE=14]="ROOM_STATE",r[r.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",r[r.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA",r[r.ROOM_DATA_BYTES=17]="ROOM_DATA_BYTES",e.ErrorCode=void 0,(s=e.ErrorCode||(e.ErrorCode={}))[s.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",s[s.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",s[s.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",s[s.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",s[s.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",s[s.AUTH_FAILED=4215]="AUTH_FAILED",s[s.APPLICATION_ERROR=4216]="APPLICATION_ERROR";var O={};function P(e){var t=O[e];if(!t)throw Error("missing serializer: "+e);return t}var M=function(){return{emit:function(e){for(var t=[],i=1;i=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,utf8Write:w,int8:T,uint8:S,int16:A,uint16:C,int32:_,uint32:I,int64:O,uint64:P,float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},writeFloat32:D,writeFloat64:k,boolean:function(e,t){return S(e,t?1:0)},string:N,number:F});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),K=new Float32Array(X.buffer),q=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),K[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),q[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,int8:U,uint8:V,int16:G,uint16:j,int32:W,uint32:Y,float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int64:H,uint64:z,readFloat32:J,readFloat64:$,boolean:function(e,t){return V(e,t)>0},string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},arrayCheck:function(e,t){return e[t.offset]<160},switchStructureCheck:ee}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){this.refCounts[e]=this.refCounts[e]-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:u;if(y===e.OPERATION.CLEAR){r.clear(a);continue}var b=p?u%(y||255):Z(i,n),x=p?r._definition.fieldsByIndex[b]:"",E=f.getType(b),w=void 0,T=void 0,S=void 0;if(p?T=r["_".concat(x)]:(T=r.getByIndex(b),(y&e.OPERATION.ADD)===e.OPERATION.ADD?(S=r instanceof m?Q(i,n):b,r.setIndex(b,S)):S=r.getIndex(b)),(y&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(y!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(b),T&&T.$changes&&o.removeRef(T.$changes.refId),w=null),void 0===x){console.warn("@colyseus/schema: definition mismatch");for(var A={offset:n.offset};n.offset (".concat(e,") ").concat(t))}),this.onLeave(function(){return i.removeAllListeners()})}return Object.defineProperty(t.prototype,"id",{get:function(){return this.roomId},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,i,n){void 0===n&&(n=this);var r=new C;n.connection=r,r.events.onmessage=t.prototype.onMessageCallback.bind(n),r.events.onclose=function(e){var t;if(!n.hasJoined){null===(t=console.warn)||void 0===t||t.call(console,"Room connection was closed unexpectedly (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason);return}e.code===h.DEVMODE_RESTART&&i?i():(n.onLeave.invoke(e.code),n.destroy())},r.events.onerror=function(e){var t;null===(t=console.warn)||void 0===t||t.call(console,"Room, onError (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason)},r.connect(e)},t.prototype.leave=function(t){var i=this;return void 0===t&&(t=!0),new Promise(function(n){i.onLeave(function(e){return n(e)}),i.connection?t?i.connection.send([e.Protocol.LEAVE_ROOM]):i.connection.close():i.onLeave.invoke(h.CONSENTED)})},t.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},t.prototype.send=function(t,i){var n,r=[e.Protocol.ROOM_DATA];if("string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),void 0!==i){var s=function(e){var t=[],i=[],n=new ArrayBuffer(function e(t,i,n){var r=typeof n,s=0,a=0,o=0,h=0,c=0,l=0;if("string"===r){if((c=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(n))<32)t.push(160|c),l=1;else if(c<256)t.push(217,c),l=2;else if(c<65536)t.push(218,c>>8,c),l=3;else if(c<4294967296)t.push(219,c>>24,c>>16,c>>8,c),l=5;else throw Error("String too long");return i.push({_str:n,_length:c,_offset:t.length}),l+c}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(t.push(n),1):n<256?(t.push(204,n),2):n<65536?(t.push(205,n>>8,n),3):n<4294967296?(t.push(206,n>>24,n>>16,n>>8,n),5):(o=n/4294967296>>0,h=n>>>0,t.push(207,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):n>=-32?(t.push(n),1):n>=-128?(t.push(208,n),2):n>=-32768?(t.push(209,n>>8,n),3):n>=-2147483648?(t.push(210,n>>24,n>>16,n>>8,n),5):(o=Math.floor(n/4294967296),h=n>>>0,t.push(211,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):(t.push(203),i.push({_float:n,_length:8,_offset:t.length}),9);if("object"===r){if(null===n)return t.push(192),1;if(Array.isArray(n)){if((c=n.length)<16)t.push(144|c),l=1;else if(c<65536)t.push(220,c>>8,c),l=3;else if(c<4294967296)t.push(221,c>>24,c>>16,c>>8,c),l=5;else throw Error("Array too large");for(s=0;s=0&&f>=0&&d<=17179869183?0===f&&d<=4294967295?(t.push(214,255,d>>24,d>>16,d>>8,d),6):(o=d/4294967296,h=4294967295&d,t.push(215,255,f>>22,f>>14,f>>6,o,h>>24,h>>16,h>>8,h),10):(o=Math.floor(d/4294967296),h=d>>>0,t.push(199,12,255,f>>24,f>>16,f>>8,f,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),15)}if(n instanceof ArrayBuffer){if((c=n.byteLength)<256)t.push(196,c),l=2;else if(c<65536)t.push(197,c>>8,c),l=3;else if(c<4294967296)t.push(198,c>>24,c>>16,c>>8,c),l=5;else throw Error("Buffer too large");return i.push({_bin:n,_length:c,_offset:t.length}),l+c}if("function"==typeof n.toJSON)return e(t,i,n.toJSON());var p=[],g="",m=Object.keys(n);for(s=0,a=m.length;s>8,c),l=3;else if(c<4294967296)t.push(223,c>>24,c>>16,c>>8,c),l=5;else throw Error("Object too large");for(s=0;s0&&(o=i[0]._offset);for(var h,c=0,l=0,u=0,d=t.length;u>6):(n<55296||n>=57344?e.setUint8(t++,224|n>>12):(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e.setUint8(t++,240|n>>18),e.setUint8(t++,128|n>>12&63)),e.setUint8(t++,128|n>>6&63)),e.setUint8(t++,128|63&n))}(r,l,h._str):void 0!==h._float&&r.setFloat64(l,h._float);s++,a+=c,i[s]&&(o=i[s]._offset)}return n}(i);(n=new Uint8Array(r.length+s.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(s),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},t.prototype.sendBytes=function(t,i){var n,r=[e.Protocol.ROOM_DATA_BYTES];"string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),(n=new Uint8Array(r.length+(i.byteLength||i.length))).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length),this.connection.send(n.buffer)},Object.defineProperty(t.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),t.prototype.removeAllListeners=function(){this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},t.prototype.onMessageCallback=function(t){var i=Array.from(new Uint8Array(t.data)),n=i[0];if(n===e.Protocol.JOIN_ROOM){var r=1,s=_(i,1);if(r+=I(s),this.serializerId=_(i,r),r+=I(this.serializerId),!this.serializer){var a=P(this.serializerId);this.serializer=new a}i.length>r&&this.serializer.handshake&&this.serializer.handshake(i,{offset:r}),this.reconnectionToken="".concat(this.roomId,":").concat(s),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([e.Protocol.JOIN_ROOM])}else if(n===e.Protocol.ERROR){var o={offset:1},h=D.decode.number(i,o),c=D.decode.string(i,o);this.onError.invoke(h,c)}else if(n===e.Protocol.LEAVE_ROOM)this.leave();else if(n===e.Protocol.ROOM_DATA_SCHEMA){var l={offset:1},u=this.serializer.getState().constructor._context.get(D.decode.number(i,l)),c=new u;c.decode(i,l),this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_STATE)i.shift(),this.setState(i);else if(n===e.Protocol.ROOM_STATE_PATCH)i.shift(),this.patch(i);else if(n===e.Protocol.ROOM_DATA){var d={offset:1},u=D.decode.stringCheck(i,d)?D.decode.string(i,d):D.decode.number(i,d),c=i.length>d.offset?function(e,t){void 0===t&&(t=0);var i=new T(e,t),n=i._parse();if(i._offset!==e.byteLength)throw Error(e.byteLength-i._offset+" trailing bytes");return n}(t.data,d.offset):void 0;this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_DATA_BYTES){var f={offset:1},u=D.decode.stringCheck(i,f)?D.decode.string(i,f):D.decode.number(i,f);this.dispatchMessage(u,new Uint8Array(i.slice(f.offset)))}},t.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.dispatchMessage=function(e,t){var i,n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):null===(i=console.warn)||void 0===i||i.call(console,"colyseus.js: onMessage() not registered for type '".concat(e,"'."))},t.prototype.destroy=function(){this.serializer&&this.serializer.teardown()},t.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$".concat(e._typeid);case"string":return e;case"number":return"i".concat(e);default:throw Error("invalid message type.")}},t}();function N(e,t){t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function F(e,t,i){var n,r,s=(i=i||{}).body;return i.method=e,i.headers=i.headers||{},s instanceof FormData||s&&"object"==typeof s&&(i.headers["content-type"]="application/json",i.body=JSON.stringify(s)),i.withCredentials&&(i.credentials="include"),i.timeout&&(r=new AbortController,i.signal=r.signal,n=setTimeout(r.abort,i.timeout)),new Promise((e,a)=>{fetch(t,i).then((t,r)=>{clearTimeout(n),N(t,t),r=t.status>=400?a:e,(s=t.headers.get("content-type"))&&~s.indexOf("application/json")?t.text().then(e=>{try{t.data=JSON.parse(e,i.reviver),r(t)}catch(e){e.headers=t.headers,N(t,e),a(e)}}):r(t)}).catch(e=>{e.timeout=r&&r.signal.aborted,a(e)})})}var B=F.bind(F,"GET"),U=F.bind(F,"POST"),V=F.bind(F,"PATCH"),G=F.bind(F,"DELETE"),j=F.bind(F,"PUT"),W={del:G,get:B,patch:V,post:U,put:j,send:F},Y=(o={__proto__:null,default:W,del:G,get:B,patch:V,post:U,put:j,send:F},[W].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in o)){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(o)),H=function(){function e(e){this.client=e}return e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("get",e,t)},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.request("post",e,t)},e.prototype.del=function(e,t){return void 0===t&&(t={}),this.request("del",e,t)},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.request("put",e,t)},e.prototype.request=function(e,t,i){return void 0===i&&(i={}),Y[e](this.client.getHttpEndpoint(t),this.getOptions(i)).catch(function(e){var t,i=e.statusCode,n=(null===(t=e.data)||void 0===t?void 0:t.error)||e.statusMessage||e.message;if(!i&&!n)throw e;throw new w(i,n)})},e.prototype.getOptions=function(e){return this.authToken&&(e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(this.authToken)),"undefined"!=typeof cc&&cc.sys&&cc.sys.isNative||(e.withCredentials=!0),e},e}();function z(){if(!c)try{c="undefined"!=typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:window.localStorage}catch(e){}return c||(c={cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),c}var X=function(){function e(e){var t,i,n,r=this;this.http=e,this.settings={path:"/auth",key:"colyseus-auth-token"},l.set(this,!1),u.set(this,void 0),d.set(this,void 0),f.set(this,M()),t=this.settings.key,i=function(e){return r.token=e},n=z().getItem(t),"undefined"!=typeof Promise&&n instanceof Promise?n.then(function(e){return i(e)}):i(n)}return Object.defineProperty(e.prototype,"token",{get:function(){return this.http.authToken},set:function(e){this.http.authToken=e},enumerable:!1,configurable:!0}),e.prototype.onChange=function(e){var t=this,i=x(this,f,"f").on("change",e);return x(this,l,"f")||E(this,u,new Promise(function(e,i){t.getUserData().then(function(e){t.emitChange(v(v({},e),{token:t.token}))}).catch(function(e){t.emitChange({user:null,token:void 0})}).finally(function(){e()})}),"f"),E(this,l,!0,"f"),i},e.prototype.getUserData=function(){return y(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(!this.token)return[3,2];return[4,this.http.get("".concat(this.settings.path,"/userdata"))];case 1:return[2,e.sent().data];case 2:throw Error("missing auth.token")}})})},e.prototype.registerWithEmailAndPassword=function(e,t,i){return y(this,void 0,void 0,function(){var n;return b(this,function(r){switch(r.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/register"),{body:{email:e,password:t,options:i}})];case 1:return n=r.sent().data,this.emitChange(n),[2,n]}})})},e.prototype.signInWithEmailAndPassword=function(e,t){return y(this,void 0,void 0,function(){var i;return b(this,function(n){switch(n.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/login"),{body:{email:e,password:t}})];case 1:return i=n.sent().data,this.emitChange(i),[2,i]}})})},e.prototype.signInAnonymously=function(e){return y(this,void 0,void 0,function(){var t;return b(this,function(i){switch(i.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/anonymous"),{body:{options:e}})];case 1:return t=i.sent().data,this.emitChange(t),[2,t]}})})},e.prototype.sendPasswordResetEmail=function(e){return y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/forgot-password"),{body:{email:e}})];case 1:return[2,t.sent().data]}})})},e.prototype.signInWithProvider=function(e,t){return void 0===t&&(t={}),y(this,void 0,void 0,function(){var i=this;return b(this,function(n){return[2,new Promise(function(n,r){var s=t.width||480,a=t.height||768,o=i.token?"?token=".concat(i.token):"",h="Login with ".concat(e[0].toUpperCase()+e.substring(1)),c=i.http.client.getHttpEndpoint("".concat(t.prefix||"".concat(i.settings.path,"/provider"),"/").concat(e).concat(o)),l=screen.width/2-s/2,u=screen.height/2-a/2;E(i,d,window.open(c,h,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+s+", height="+a+", top="+u+", left="+l),"f");var f=function(e){(void 0!==e.data.user||void 0!==e.data.token)&&(clearInterval(p),x(i,d,"f").close(),E(i,d,void 0,"f"),window.removeEventListener("message",f),void 0!==e.data.error?r(e.data.error):(n(e.data),i.emitChange(e.data)))},p=setInterval(function(){(!x(i,d,"f")||x(i,d,"f").closed)&&(E(i,d,void 0,"f"),r("cancelled"),window.removeEventListener("message",f))},200);window.addEventListener("message",f)})]})})},e.prototype.signOut=function(){return y(this,void 0,void 0,function(){return b(this,function(e){return this.emitChange({user:null,token:null}),[2]})})},e.prototype.emitChange=function(e){if(void 0!==e.token){var t,i,n;(this.token=e.token,null===e.token)?(t=this.settings.key,z().removeItem(t)):(i=this.settings.key,n=e.token,z().setItem(i,n))}x(this,f,"f").emit("change",e)},e}();function K(e){var t,i=(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hostname)||"localhost",n=e.hostname.split("."),r=e.hostname.includes("trycloudflare.com")||e.hostname.includes("discordsays.com")||!(n.length>2)?"":"/".concat(n[0]);return e.pathname.startsWith("/.proxy")?"".concat(e.protocol,"//").concat(i).concat(r).concat(e.pathname).concat(e.search):"".concat(e.protocol,"//").concat(i,"/.proxy/colyseus").concat(r).concat(e.pathname).concat(e.search)}l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap;var q=function(e){function t(i,n){var r=e.call(this,i)||this;return r.code=n,Object.setPrototypeOf(r,t.prototype),r}return m(t,e),t}(Error),J="undefined"!=typeof window&&void 0!==(null===(p=null==window?void 0:window.location)||void 0===p?void 0:p.hostname)?"".concat(window.location.protocol.replace("http","ws"),"//").concat(window.location.hostname).concat(window.location.port&&":".concat(window.location.port)):"ws://127.0.0.1:2567",$=function(){function e(e,t){if(void 0===e&&(e=J),"string"==typeof e){var i,n,r=e.startsWith("/")?new URL(e,J):new URL(e),s="https:"===r.protocol||"wss:"===r.protocol,a=Number(r.port||(s?443:80));this.settings={hostname:r.hostname,pathname:r.pathname,port:a,secure:s}}else void 0===e.port&&(e.port=e.secure?443:80),void 0===e.pathname&&(e.pathname=""),this.settings=e;this.settings.pathname.endsWith("/")&&(this.settings.pathname=this.settings.pathname.slice(0,-1)),this.http=new H(this),this.auth=new X(this.http),this.urlBuilder=t,!this.urlBuilder&&"undefined"!=typeof window&&(null===(n=null===(i=null==window?void 0:window.location)||void 0===i?void 0:i.hostname)||void 0===n?void 0:n.includes("discordsays.com"))&&(this.urlBuilder=K,console.log("Colyseus SDK: Discord Embedded SDK detected. Using custom URL builder."))}return e.prototype.joinOrCreate=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.create=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.join=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.joinById=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.reconnect=function(e,t){return y(this,void 0,void 0,function(){var i,n,r;return b(this,function(s){switch(s.label){case 0:if("string"==typeof e&&"string"==typeof t)throw Error("DEPRECATED: .reconnect() now only accepts 'reconnectionToken' as argument.\nYou can get this token from previously connected `room.reconnectionToken`");if(n=(i=e.split(":"))[0],r=i[1],!n||!r)throw Error("Invalid reconnection token format.\nThe format should be roomId:reconnectionToken");return[4,this.createMatchMakeRequest("reconnect",n,{reconnectionToken:r},t)];case 1:return[2,s.sent()]}})})},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.get("matchmake/".concat(e),{headers:{Accept:"application/json"}})];case 1:return[2,t.sent().data]}})})},e.prototype.consumeSeatReservation=function(e,t,i){return y(this,void 0,void 0,function(){var n,r,s,a=this;return b(this,function(o){return(n=this.createRoom(e.room.name,t)).roomId=e.room.roomId,n.sessionId=e.sessionId,r={sessionId:n.sessionId},e.reconnectionToken&&(r.reconnectionToken=e.reconnectionToken),s=i||n,n.connect(this.buildEndpoint(e.room,r),e.devMode&&function(){return y(a,void 0,void 0,function(){var i,r,a=this;return b(this,function(o){return console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," Re-establishing connection with room id '").concat(n.roomId,"'...")),i=0,setTimeout(r=function(){return y(a,void 0,void 0,function(){return b(this,function(a){switch(a.label){case 0:i++,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.consumeSeatReservation(e,t,s)];case 2:return a.sent(),console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(9989)," Successfully re-established connection with room '").concat(n.roomId,"'")),[3,4];case 3:return a.sent(),i<8?(console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," retrying... (").concat(i," out of ").concat(8,")")),setTimeout(r,2e3)):console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(10060)," Failed to reconnect. Is your server running? Please check server logs.")),[3,4];case 4:return[2]}})})},2e3),[2]})})},s),[2,new Promise(function(e,t){var i=function(e,i){return t(new w(e,i))};s.onError.once(i),s.onJoin.once(function(){s.onError.remove(i),e(s)})})]})})},e.prototype.createMatchMakeRequest=function(e,t,i,n,r){return void 0===i&&(i={}),y(this,void 0,void 0,function(){var s;return b(this,function(a){switch(a.label){case 0:return[4,this.http.post("matchmake/".concat(e,"/").concat(t),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})];case 1:if((s=a.sent().data).error)throw new q(s.error,s.code);return"reconnect"===e&&(s.reconnectionToken=i.reconnectionToken),[4,this.consumeSeatReservation(s,n,r)];case 2:return[2,a.sent()]}})})},e.prototype.createRoom=function(e,t){return new k(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push("".concat(n,"=").concat(t[n]));var r=this.settings.secure?"wss://":"ws://";e.publicAddress?r+="".concat(e.publicAddress):r+="".concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname);var s="".concat(r,"/").concat(e.processId,"/").concat(e.roomId,"?").concat(i.join("&"));return this.urlBuilder?this.urlBuilder(new URL(s)):s},e.prototype.getHttpEndpoint=function(e){void 0===e&&(e="");var t=e.startsWith("/")?e:"/".concat(e),i="".concat(this.settings.secure?"https":"http","://").concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname).concat(t);return this.urlBuilder?this.urlBuilder(new URL(i)):i},e.prototype.getEndpointPort=function(){return 80!==this.settings.port&&443!==this.settings.port?":".concat(this.settings.port):""},e}(),Q=function(){function e(){}return e.prototype.setState=function(e){return this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){return this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?new D.Reflection().decode(e,t):this.state=D.Reflection.decode(e,t)},e}(),Z=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();O.schema=Q,O.none=Z,e.Auth=X,e.Client=$,e.Room=k,e.SchemaSerializer=Q,e.registerSerializer=function(e,t){O[e]=t},Object.defineProperty(e,"__esModule",{value:!0})}(i)},{}],"9vHHC":[function(e,t,i){t.exports.RoomsConst={ROOM_TYPE_SCENE:"scene",ROOM_TYPE_LOGIN:"login",ROOM_TYPE_GAME:"game",TILE_INDEX:"i",NEXT_SCENE:"n",MAPS_BUCKET:"/assets/maps",ROOM_LAST_LOCATION_KEY:"@lastLocation",RETURN_POINT_KEYS:{DIRECTION:"d",X:"x",Y:"y",DEFAULT:"de",PREVIOUS:"p"},ERRORS:{CREATING_ROOM_AWAIT:"CREATING-ROOM-AWAIT"}}},{}],"93TbC":[function(e,t,i){t.exports.GameConst={START_GAME:"s",ACTION_KEY:"act",CREATE_PLAYER:"cp",CREATE_PLAYER_RESULT:"cps",CHANGING_SCENE:"cgs",CHANGED_SCENE:"cs",RECONNECT:"r",ROOM_GAME:"room_game",ROOM_NAME_MAP:"Map",SCENE_PRELOADER:"ScenePreloader",PLAYER_STATS:"ps",ICON_STATS:"player-stats",CLIENT_JOINED:"cj",UI:"ui",CLOSE_UI_ACTION:"closeUi",TYPE_PLAYER:"pj",GAME_OVER:"go",REVIVED:"rv",BUTTON_OPTION:"btn-opt",UI_BOX:"box",UI_CLOSE:"-close",UI_OPEN:"-open",UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right",STOP:"stop",POINTER:"mp",ARROW_DOWN:"ard",IMAGE_PLAYER:"player",ACTIONS:{LOGIN_UPDATE_ERROR:"luer"},STATUS:{ACTIVE:1,DISABLED:2,DEATH:3,AVOID_INTERPOLATION:4},STRUCTURE:{DEFAULT:"default",ASSETS:"assets",CSS:"css",DIST:"dist",THEME:"theme",LIB:"lib",SERVER:"server",CLIENT:"client",PLUGINS:"plugins",INDEX:"index.html",SCSS_FILE:"styles.scss",CSS_FILE:"styles.css",ADMIN:"admin",TEMPLATES:"templates",ADMIN_JS_FILE:"reldens-admin-client.js",ADMIN_SCSS_FILE:"reldens-admin-client.scss",ADMIN_CSS_FILE:"reldens-admin-client.css",INSTALLER_FOLDER:"install",INSTALL_LOCK:"install.lock"},ROUTE_PATHS:{DISCONNECT_USER:"/reldens-disconnect-user",TERMS_AND_CONDITIONS:"/terms-and-conditions",MAILER:"/reldens-mailer-enabled",FIREBASE:"/reldens-firebase"},SELECTORS:{BODY:"body",CANVAS:"CANVAS",INPUT:"input",FORMS_CONTAINER:".forms-container",REGISTER_FORM:"#register-form",GUEST_FORM:"#guest-form",LOGIN_FORM:"#login-form",FORGOT_PASSWORD_FORM:"#forgot-form",PLAYER_CREATE_FORM:".player-create-form",PLAYER_SELECTION:"#player-selection",FULL_SCREEN_BUTTON:".full-screen-btn",RESPONSE_ERROR:".response-error",LOADING_CONTAINER:".loading-container",REGISTRATION:{PASSWORD:"#reg-password",RE_PASSWORD:"#reg-re-password",EMAIL:"#reg-email",USERNAME:"#reg-username"},GUEST:{USERNAME:"#guest-username"},LOGIN:{USERNAME:"#username",PASSWORD:"#password"},FORGOT_PASSWORD:{EMAIL:"#forgot-email",CONTAINER:".forgot-password-container"},TERMS:{BOX:"#terms-and-conditions",CONTAINER:".terms-and-conditions-container",LINK_CONTAINER:".terms-and-conditions-link-container",LINK:".terms-and-conditions-link",ACCEPT:"#accept-terms-and-conditions",ACCEPT_LABEL:".accept-terms-and-conditions-label",HEADING:".terms-heading",BODY:".terms-body",CLOSE:"#terms-and-conditions-close"},GAME_CONTAINER:".game-container"},CLASSES:{HIDDEN:"hidden",GAME_STARTED:"game-started",GAME_ERROR:"game-error",GAME_ENGINE_STARTED:"game-engine-started",FULL_SCREEN_ON:"full-screen-on"},MESSAGE:{DATA_VALUES:{NAMESPACE:"game"}},LABELS:{YES:"Yes",NO:"No"},ANIMATIONS_TYPE:{SPRITESHEET:"spritesheet"},FILES:{EXTENSIONS:{PNG:".png"}},GRAPHICS:{FRAME_WIDTH:32,FRAME_HEIGHT:32},SHOW_PLAYER_TIME:{NONE:-1,ONLY_OWN_PLAYER:0,ALL_PLAYERS:2}}},{}],"3lwy5":[function(e,t,i){let n=e("a4ab2983c9d35fd8");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("1695e46110f15942"),InteractionArea:e("8fd16851c34338c4"),SchemaValidator:e("adcc322a4503ef19"),Logger:e("a5fec30b90d89350"),sc:e("859c680ee2b5bef8")}},{a4ab2983c9d35fd8:"faFOz","1695e46110f15942":"ijj7O","8fd16851c34338c4":"hLS4d",adcc322a4503ef19:"5l910",a5fec30b90d89350:"lJWkj","859c680ee2b5bef8":"2vvao"}],faFOz:[function(e,t,i){let n=e("7cdb1283b540f52c").default,r=e("53a92d7fd4d1ab5e"),s=e("fb3dac7fa90fc435");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"7cdb1283b540f52c":"46bZC","53a92d7fd4d1ab5e":"lJWkj",fb3dac7fa90fc435:"2vvao"}],"46bZC":[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);let n=e("e8bdbc586c5c4645"),r="function"==typeof Symbol?Symbol.for("--[[await-event-emitter]]--"):"--[[await-event-emitter]]--";function s(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("type is not type of string or symbol!")}function a(e){if("function"!=typeof e)throw TypeError("fn is not type of Function!")}function o(e){return{[r]:"always",fn:e}}function h(e){return{[r]:"once",fn:e}}i.default=class{constructor(){this._events={}}addListener(e,t){return this.on(e,t)}on(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(o(t)),this}prependListener(e,t){return this.prepend(e,t)}prepend(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(o(t)),this}prependOnceListener(e,t){return this.prependOnce(e,t)}prependOnce(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(h(t)),this}listeners(e){return(this._events[e]||[]).map(e=>e.fn)}once(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(h(t)),this}removeAllListeners(){this._events={}}off(e,t){return this.removeListener(e,t)}removeListener(e,t){s(e);let i=this.listeners(e);if("function"!=typeof t)return delete this._events[e];{let n=-1,r=!1;for(;(n=i.indexOf(t))>=0;)i.splice(n,1),this._events[e].splice(n,1),r=!0;return r}}emit(e,...t){var i,a,o,h;return i=this,a=void 0,o=void 0,h=function*(){s(e);let i=this.listeners(e),a=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1},new(o||(o=Promise))(function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function r(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):((i=t.value)instanceof o?i:new o(function(e){e(i)})).then(n,r)}s((h=h.apply(i,a||[])).next())})}emitSync(e,...t){s(e);let i=this.listeners(e),n=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1}}},{e8bdbc586c5c4645:"kaCjt","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],kaCjt:[function(e,t,i){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n},{}],"2SoND":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}],lJWkj:[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"2vvao":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return[];let n=Object.keys(e);if(0===n.length)return[];let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t{this.clearTarget()}),this.eventsManager.on("reldens.beforeSceneDynamicCreate",e=>{this.setupTabTarget(e)})}parseTemplate(e,t,i,n){return this.TemplateEngine.render(e,t,i,n)}updateGameSize(e){let{newWidth:t,newHeight:i}=this.getCurrentScreenSize(e);setTimeout(()=>{for(let e of(this.eventsManager.emit("reldens.updateGameSizeBefore",this,t,i),this.scale.setGameSize(t,i),Object.keys(this.uiScene.elementsUi))){let n=this.uiScene.elementsUi[e],r=l.get(this.uiScene.userInterfaces[e],"uiPositionKey",e),{uiX:s,uiY:a}=this.uiScene.getUiConfig(r,t,i);n.x=s,n.y=a}this.eventsManager.emit("reldens.updateGameSizeAfter",this,t,i)},e.config.getWithoutLogs("client/general/gameEngine/updateGameSizeTimeOut",500))}getCurrentScreenSize(e){let t=e.gameDom.getElement(".game-container").offsetWidth,i=e.gameDom.getElement(".game-container").offsetHeight,n=t,r=i,s=e.getActiveScene();return s&&s.map&&(n=Math.min(t,s.map.width*s.map.tileWidth),r=Math.min(i,s.map.height*s.map.tileHeight)),{newWidth:n=Math.min(n,Number(e.config.get("client/ui/maximum/x"))),newHeight:r=Math.min(r,Number(e.config.get("client/ui/maximum/y")))}}showTarget(e,t,i){l.hasOwn(this.uiScene,"uiTarget")&&(this.uiScene.uiTarget.getChildByID("box-target").style.display="block",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=this.targetDisplay(e,t)),this.eventsManager.emit("reldens.gameEngineShowTarget",this,t,i,e)}targetDisplay(e,t){let i=e;return o.TYPE_PLAYER===t.type&&(i+=this.generateTargetPlayedTime(t)),i}generateTargetPlayedTime(e){let t="",i=this.uiScene.gameManager.config.getWithoutLogs("client/players/playedTime/show",o.SHOW_PLAYER_TIME.ONLY_OWN_PLAYER);if(o.SHOW_PLAYER_TIME.NONE===i)return t;let n=this.uiScene.gameManager.getCurrentPlayer();if(o.SHOW_PLAYER_TIME.ALL_PLAYERS===i||n.playerId===e.id){let i=this.obtainPlayedTime(e,n);t+=this.createPlayedTimeLabel(i)}return t}createPlayedTimeLabel(e){let t=this.uiScene.gameManager.gameDom.createElement("p");return t.innerHTML=this.uiScene.gameManager.config.get("client/players/playedTime/label").replace("%playedTimeInHs",e),t.outerHTML}obtainPlayedTime(e,t){return(t.players[e.id].playedTime/60/60).toFixed(1)}clearTarget(){let e=this.uiScene.gameManager.activeRoomEvents.getActiveScene(),t=Object.assign({},e.player.currentTarget);l.hasOwn(this.uiScene,"uiTarget")&&(e.player.currentTarget=!1,this.uiScene.uiTarget.getChildByID("box-target").style.display="none",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=""),this.eventsManager.emit("reldens.gameEngineClearTarget",this,t)}setupTabTarget(e){e.keyTab=e.input.keyboard.addKey(s.Keyboard.KeyCodes.TAB),e.input.keyboard.addCapture(s.Keyboard.KeyCodes.TAB),e.input.keyboard.on("keydown",e=>{9===e.keyCode&&this.tabTarget()})}tabTarget(){let e=this.uiScene.gameManager.getCurrentPlayer(),t=this.uiScene.gameManager.getActiveScene().objectsAnimations,i=e.players,n=!1,r="",s=!!e.currentTarget&&Object.assign({},e.currentTarget);for(let i of Object.keys(t)){if(!t[i].targetName)continue;let s=Math.hypot(t[i].x-e.state.x,t[i].y-e.state.y);e.currentTarget.id!==t[i].key&&(!n||n.dist>s)&&(n={id:t[i].key,type:h.TYPE_OBJECT,dist:s},r=t[i].targetName)}for(let t of Object.keys(i)){if(e.playerName===i[t].playerName)continue;let s=Math.hypot(i[t].x-e.state.x,i[t].y-e.state.y);e.currentTarget.id!==i[t].id&&(!n||n.dist>s)&&(n={id:t,type:o.TYPE_PLAYER,dist:s},r=i[t].playerName)}e.currentTarget=n,this.showTarget(r,n,s),this.eventsManager.emit("reldens.gameEngineTabTarget",this,n,s)}showFPS(){this.fpsCounter=new a(this.uiScene.gameManager.gameDom),this.fpsCounter.start()}}},{ba5852f7a848a882:"kOY07",de87093dc78fab7a:"8S6DV",cb52d956827ba0f7:"e7OdC",ef9f208014f49bfb:"93TbC","74f28c3d4fc67c29":"izuLV","2aadc4f845e0da5b":"3lwy5"}],kOY07:[function(e,t,i){var n;n=function(){/*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function i(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test,a=/\S/,o={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},h=/\s*/,c=/\s+/,l=/\s*=/,u=/\s*\}/,d=/#|\^|\/|>|\{|&|=|!/;function f(e){this.string=e,this.tail=e,this.pos=0}function p(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function g(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}f.prototype.eos=function(){return""===this.tail},f.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var i=t[0];return this.tail=this.tail.substring(i.length),this.pos+=i.length,i},f.prototype.scanUntil=function(e){var t,i=this.tail.search(e);switch(i){case -1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,i),this.tail=this.tail.substring(i)}return this.pos+=t.length,t},p.prototype.push=function(e){return new p(e,this)},p.prototype.lookup=function(e){var t=this.cache;if(t.hasOwnProperty(e))a=t[e];else{for(var n,s,a,o,h,c,l=this,u=!1;l;){if(e.indexOf(".")>0)for(o=l.view,h=e.split("."),c=0;null!=o&&c0?r[r.length-1][4]:i;break;default:n.push(t)}return i}(function(e){for(var t,i,n=[],r=0,s=e.length;r"===a?o=this.renderPartial(s,t,i,r):"&"===a?o=this.unescapedValue(s,t):"name"===a?o=this.escapedValue(s,t,r):"text"===a&&(o=this.rawValue(s)),void 0!==o&&(h+=o);return h},g.prototype.renderSection=function(e,n,r,s,a){var o=this,h="",c=n.lookup(e[1]);if(c){if(t(c))for(var l=0,u=c.length;l0||!i)&&(r[s]=n+r[s]);return r.join("\n")},g.prototype.renderPartial=function(e,t,n,r){if(n){var s=this.getConfigTags(r),a=i(n)?n(e[1]):n[e[1]];if(null!=a){var o=e[6],h=e[5],c=e[4],l=a;0==h&&c&&(l=this.indentPartial(a,c,o));var u=this.parse(l,s);return this.renderTokens(u,t,n,l,r)}}},g.prototype.unescapedValue=function(e,t){var i=t.lookup(e[1]);if(null!=i)return i},g.prototype.escapedValue=function(e,t,i){var n=this.getConfigEscape(i)||m.escape,r=t.lookup(e[1]);if(null!=r)return"number"==typeof r&&n===m.escape?String(r):n(r)},g.prototype.rawValue=function(e){return e[1]},g.prototype.getConfigTags=function(e){return t(e)?e:e&&"object"==typeof e?e.tags:void 0},g.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!t(e)?e.escape:void 0};var m={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(cache){v.templateCache=cache},get templateCache(){return v.templateCache}},v=new g;return m.clearCache=function(){return v.clearCache()},m.parse=function(e,t){return v.parse(e,t)},m.render=function(e,i,n,r){if("string"!=typeof e)throw TypeError('Invalid template! Template should be a "string" but "'+(t(e)?"array":typeof e)+'" was given as the first argument for mustache#render(template, view, partials)');return v.render(e,i,n,r)},m.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return o[e]})},m.Scanner=f,m.Context=p,m.Writer=g,m},t.exports=n()},{}],"8S6DV":[function(e,t,i){var n,r=e("57a99fe9b8471a10");n=()=>(()=>{var e={50792:e=>{var t=Object.prototype.hasOwnProperty,i="~";function n(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,n,s,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new r(n,s||e,a),h=i?i+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],o]:e._events[h].push(o):(e._events[h]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1)),o.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},o.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=Array(s);r{/** @@ -958,7 +958,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83419),r=i(25774),s=i(37277),a=i(44594),o=new n({Extends:r,initialize:function(e){r.call(this),this.checkQueue=!0,this.scene=e,this.systems=e.sys,e.sys.events.once(a.BOOT,this.boot,this),e.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(a.PRE_UPDATE,this.update,this),e.on(a.UPDATE,this.sceneUpdate,this),e.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,t){for(var i=this._active,n=i.length,r=0;r{e.exports=function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p){var g=i.x-t.displayOriginX+r,m=i.y-t.displayOriginY+s,v=g+i.w,y=m+i.h,b=a.a,x=a.b,E=a.c,w=a.d,T=a.e,S=a.f,A=g*b+m*E+T,C=g*x+m*w+S,_=g*b+y*E+T,I=g*x+y*w+S,O=v*b+y*E+T,P=v*x+y*w+S,M=v*b+m*E+T,R=v*x+m*w+S;o&&(A=Math.round(A),C=Math.round(C),_=Math.round(_),I=Math.round(I),O=Math.round(O),P=Math.round(P),M=Math.round(M),R=Math.round(R)),e.batchQuad(t,A,C,_,I,O,P,M,R,n.u0,n.v0,n.u1,n.v1,h,c,l,u,d,f,p)}},53048:e=>{e.exports=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,a,o=e.text,h=o.length,c=e.maxWidth,l=e.wordWrapCharCode,u=Number.MAX_VALUE,d=Number.MAX_VALUE,f=0,p=0,g=e.fontData.chars,m=e.fontData.lineHeight,v=e.letterSpacing,y=e.lineSpacing,b=0,x=0,E=0,w=null,T=e._align,S=0,A=0,C=e.fontSize/e.fontData.size,_=C*e.scaleX,I=C*e.scaleY,O=null,P=0,M=[],R=Number.MAX_VALUE,L=0,D=0,k=0,N=[],F=[],B=null;if(c>0){a=o.split("\n");var U=[];for(r=0;rL&&(L=k),kS&&(u=S),d>A&&(d=A);var X=S+w.xAdvance,q=A+m;fL&&(L=k),k0)for(var J=0;J{/** + */var n=i(83419),r=i(25774),s=i(37277),a=i(44594),o=new n({Extends:r,initialize:function(e){r.call(this),this.checkQueue=!0,this.scene=e,this.systems=e.sys,e.sys.events.once(a.BOOT,this.boot,this),e.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(a.PRE_UPDATE,this.update,this),e.on(a.UPDATE,this.sceneUpdate,this),e.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,t){for(var i=this._active,n=i.length,r=0;r{e.exports=function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p){var g=i.x-t.displayOriginX+r,m=i.y-t.displayOriginY+s,v=g+i.w,y=m+i.h,b=a.a,x=a.b,E=a.c,w=a.d,T=a.e,S=a.f,A=g*b+m*E+T,C=g*x+m*w+S,_=g*b+y*E+T,I=g*x+y*w+S,O=v*b+y*E+T,P=v*x+y*w+S,M=v*b+m*E+T,R=v*x+m*w+S;o&&(A=Math.round(A),C=Math.round(C),_=Math.round(_),I=Math.round(I),O=Math.round(O),P=Math.round(P),M=Math.round(M),R=Math.round(R)),e.batchQuad(t,A,C,_,I,O,P,M,R,n.u0,n.v0,n.u1,n.v1,h,c,l,u,d,f,p)}},53048:e=>{e.exports=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,a,o=e.text,h=o.length,c=e.maxWidth,l=e.wordWrapCharCode,u=Number.MAX_VALUE,d=Number.MAX_VALUE,f=0,p=0,g=e.fontData.chars,m=e.fontData.lineHeight,v=e.letterSpacing,y=e.lineSpacing,b=0,x=0,E=0,w=null,T=e._align,S=0,A=0,C=e.fontSize/e.fontData.size,_=C*e.scaleX,I=C*e.scaleY,O=null,P=0,M=[],R=Number.MAX_VALUE,L=0,D=0,k=0,N=[],F=[],B=null;if(c>0){a=o.split("\n");var U=[];for(r=0;rL&&(L=k),kS&&(u=S),d>A&&(d=A);var X=S+w.xAdvance,K=A+m;fL&&(L=k),k0)for(var J=0;J{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -998,7 +998,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(91296),r=i(61340),s=i(70554),a=new r;e.exports=function(e,t,i,r){var o,h,c=t.text,l=c.length;if(0!==l){i.addToRenderList(t);var u=e.pipelines.set(t.pipeline,t),d=n(t,i,r);e.pipelines.preBatch(t);var f=d.sprite,p=d.calc,g=t.cropWidth>0||t.cropHeight>0;g&&(u.flush(),e.pushScissor(p.tx,p.ty,t.cropWidth*p.scaleX,t.cropHeight*p.scaleY));var m=t.frame.glTexture,v=t.tintFill,y=s.getTintAppendFloatAlpha(t.tintTopLeft,i.alpha*t._alphaTL),b=s.getTintAppendFloatAlpha(t.tintTopRight,i.alpha*t._alphaTR),x=s.getTintAppendFloatAlpha(t.tintBottomLeft,i.alpha*t._alphaBL),E=s.getTintAppendFloatAlpha(t.tintBottomRight,i.alpha*t._alphaBR),w=u.setGameObject(t),T=0,S=0,A=0,C=0,_=t.letterSpacing,I=0,O=0,P=t.scrollX,M=t.scrollY,R=t.fontData,L=R.chars,D=R.lineHeight,k=t.fontSize/R.size,N=0,F=t._align,B=0,U=0,V=t.getTextBounds(!1);t.maxWidth>0&&(l=(c=V.wrappedText).length);var G=t._bounds.lines;1===F?U=(G.longest-G.lengths[0])/2:2===F&&(U=G.longest-G.lengths[0]);for(var j=i.roundPixels,W=t.displayCallback,Y=t.callbackData,H=0;H{/** + */var n=i(91296),r=i(61340),s=i(70554),a=new r;e.exports=function(e,t,i,r){var o,h,c=t.text,l=c.length;if(0!==l){i.addToRenderList(t);var u=e.pipelines.set(t.pipeline,t),d=n(t,i,r);e.pipelines.preBatch(t);var f=d.sprite,p=d.calc,g=t.cropWidth>0||t.cropHeight>0;g&&(u.flush(),e.pushScissor(p.tx,p.ty,t.cropWidth*p.scaleX,t.cropHeight*p.scaleY));var m=t.frame.glTexture,v=t.tintFill,y=s.getTintAppendFloatAlpha(t.tintTopLeft,i.alpha*t._alphaTL),b=s.getTintAppendFloatAlpha(t.tintTopRight,i.alpha*t._alphaTR),x=s.getTintAppendFloatAlpha(t.tintBottomLeft,i.alpha*t._alphaBL),E=s.getTintAppendFloatAlpha(t.tintBottomRight,i.alpha*t._alphaBR),w=u.setGameObject(t),T=0,S=0,A=0,C=0,_=t.letterSpacing,I=0,O=0,P=t.scrollX,M=t.scrollY,R=t.fontData,L=R.chars,D=R.lineHeight,k=t.fontSize/R.size,N=0,F=t._align,B=0,U=0,V=t.getTextBounds(!1);t.maxWidth>0&&(l=(c=V.wrappedText).length);var G=t._bounds.lines;1===F?U=(G.longest-G.lengths[0])/2:2===F&&(U=G.longest-G.lengths[0]);for(var j=i.roundPixels,W=t.displayCallback,Y=t.callbackData,H=0;H{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2120,7 +2120,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83997),r=i(95540),s=i(37867),a=i(25836),o=i(39318),h=new a,c=new a,l=new s;e.exports=function(e){var t,i,s,a=r(e,"mesh"),u=r(e,"texture",null),d=r(e,"frame"),f=r(e,"width",1),p=r(e,"height",f),g=r(e,"widthSegments",1),m=r(e,"heightSegments",g),v=r(e,"x",0),y=r(e,"y",0),b=r(e,"z",0),x=r(e,"rotateX",0),E=r(e,"rotateY",0),w=r(e,"rotateZ",0),T=r(e,"zIsUp",!0),S=r(e,"isOrtho",!!a&&a.dirtyCache[11]),A=r(e,"colors",[16777215]),C=r(e,"alphas",[1]),_=r(e,"tile",!1),I=r(e,"flipY",!1),O=r(e,"width",null),P={faces:[],verts:[]};if(h.set(v,y,b),c.set(x,E,w),l.fromRotationXYTranslation(c,h,T),!u&&a)u=a.texture,d||(t=a.frame);else if(a&&"string"==typeof u)u=a.scene.sys.textures.get(u);else if(!u)return P;t||(t=u.get(d)),!O&&S&&u&&a&&(f=t.width/a.height,p=t.height/a.height);var M=f/2,R=p/2,L=Math.floor(g),D=Math.floor(m),k=L+1,N=D+1,F=f/L,B=p/D,U=[],V=[],G=0,j=1,W=0,Y=1;t&&(G=t.u0,j=t.u1,I?(W=t.v1,Y=t.v0):(W=t.v0,Y=t.v1));var H=j-G,z=Y-W;for(s=0;s{/** + */var n=i(83997),r=i(95540),s=i(37867),a=i(25836),o=i(39318),h=new a,c=new a,l=new s;e.exports=function(e){var t,i,s,a=r(e,"mesh"),u=r(e,"texture",null),d=r(e,"frame"),f=r(e,"width",1),p=r(e,"height",f),g=r(e,"widthSegments",1),m=r(e,"heightSegments",g),v=r(e,"x",0),y=r(e,"y",0),b=r(e,"z",0),x=r(e,"rotateX",0),E=r(e,"rotateY",0),w=r(e,"rotateZ",0),T=r(e,"zIsUp",!0),S=r(e,"isOrtho",!!a&&a.dirtyCache[11]),A=r(e,"colors",[16777215]),C=r(e,"alphas",[1]),_=r(e,"tile",!1),I=r(e,"flipY",!1),O=r(e,"width",null),P={faces:[],verts:[]};if(h.set(v,y,b),c.set(x,E,w),l.fromRotationXYTranslation(c,h,T),!u&&a)u=a.texture,d||(t=a.frame);else if(a&&"string"==typeof u)u=a.scene.sys.textures.get(u);else if(!u)return P;t||(t=u.get(d)),!O&&S&&u&&a&&(f=t.width/a.height,p=t.height/a.height);var M=f/2,R=p/2,L=Math.floor(g),D=Math.floor(m),k=L+1,N=D+1,F=f/L,B=p/D,U=[],V=[],G=0,j=1,W=0,Y=1;t&&(G=t.u0,j=t.u1,I?(W=t.v1,Y=t.v0):(W=t.v0,Y=t.v1));var H=j-G,z=Y-W;for(s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3385,7 +3385,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */e.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(e,t,i)=>{var n,r={};e.exports=r;var s=i(41598),a=i(31725),o=i(53614),h=i(53402),c=i(15647),l=i(66615);r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=1e3/60,r.create=function(e){var t={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:e.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(t.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var i=h.extend(t,e);return n(i,e),i.setOnCollideWith=function(e,t){return t?this.onCollideWith[e.id]=t:delete this.onCollideWith[e.id],this},i},r.nextGroup=function(e){return e?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory},n=function(e,t){if(t=t||{},r.set(e,{bounds:e.bounds||c.create(e.vertices),positionPrev:e.positionPrev||a.clone(e.position),anglePrev:e.anglePrev||e.angle,vertices:e.vertices,parts:e.parts||[e],isStatic:e.isStatic,isSleeping:e.isSleeping,parent:e.parent||e}),s.rotate(e.vertices,e.angle,e.position),l.rotate(e.axes,e.angle),c.update(e.bounds,e.vertices,e.velocity),r.set(e,{axes:t.axes||e.axes,area:t.area||e.area,mass:t.mass||e.mass,inertia:t.inertia||e.inertia}),1===e.parts.length){var i=e.bounds,n=e.centerOfMass,o=e.centerOffset,h=i.max.x-i.min.x,u=i.max.y-i.min.y;n.x=-(i.min.x-e.position.x)/h,n.y=-(i.min.y-e.position.y)/u,o.x=h*n.x,o.y=u*n.y}},r.set=function(e,t,i){var n;for(n in"string"==typeof t&&(n=t,(t={})[n]=i),t)if(Object.prototype.hasOwnProperty.call(t,n))switch(i=t[n],n){case"isStatic":r.setStatic(e,i);break;case"isSleeping":o.set(e,i);break;case"mass":r.setMass(e,i);break;case"density":r.setDensity(e,i);break;case"inertia":r.setInertia(e,i);break;case"vertices":r.setVertices(e,i);break;case"position":r.setPosition(e,i);break;case"angle":r.setAngle(e,i);break;case"velocity":r.setVelocity(e,i);break;case"angularVelocity":r.setAngularVelocity(e,i);break;case"speed":r.setSpeed(e,i);break;case"angularSpeed":r.setAngularSpeed(e,i);break;case"parts":r.setParts(e,i);break;case"centre":r.setCentre(e,i);break;default:e[n]=i}},r.setStatic=function(e,t){for(var i=0;i0&&a.rotateAbout(o.position,n,e.position,o.position)}},r.setVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.positionPrev.x=e.position.x-t.x*i,e.positionPrev.y=e.position.y-t.y*i,e.velocity.x=(e.position.x-e.positionPrev.x)/i,e.velocity.y=(e.position.y-e.positionPrev.y)/i,e.speed=a.magnitude(e.velocity)},r.getVelocity=function(e){var t=r._baseDelta/e.deltaTime;return{x:(e.position.x-e.positionPrev.x)*t,y:(e.position.y-e.positionPrev.y)*t}},r.getSpeed=function(e){return a.magnitude(r.getVelocity(e))},r.setSpeed=function(e,t){r.setVelocity(e,a.mult(a.normalise(r.getVelocity(e)),t))},r.setAngularVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.anglePrev=e.angle-t*i,e.angularVelocity=(e.angle-e.anglePrev)/i,e.angularSpeed=Math.abs(e.angularVelocity)},r.getAngularVelocity=function(e){return(e.angle-e.anglePrev)*r._baseDelta/e.deltaTime},r.getAngularSpeed=function(e){return Math.abs(r.getAngularVelocity(e))},r.setAngularSpeed=function(e,t){r.setAngularVelocity(e,h.sign(r.getAngularVelocity(e))*t)},r.translate=function(e,t,i){r.setPosition(e,a.add(e.position,t),i)},r.rotate=function(e,t,i,n){if(i){var s=Math.cos(t),a=Math.sin(t),o=e.position.x-i.x,h=e.position.y-i.y;r.setPosition(e,{x:i.x+(o*s-h*a),y:i.y+(o*a+h*s)},n),r.setAngle(e,e.angle+t,n)}else r.setAngle(e,e.angle+t,n)},r.scale=function(e,t,i,n){var a=0,o=0;n=n||e.position;for(var h=e.inertia===1/0,u=0;u0&&(a+=d.area,o+=d.inertia),d.position.x=n.x+(d.position.x-n.x)*t,d.position.y=n.y+(d.position.y-n.y)*i,c.update(d.bounds,d.vertices,e.velocity)}e.parts.length>1&&(e.area=a,e.isStatic||(r.setMass(e,e.density*a),r.setInertia(e,o))),e.circleRadius&&(t===i?e.circleRadius*=t:e.circleRadius=null),h&&r.setInertia(e,1/0)},r.update=function(e,t){var i=(t=(void 0!==t?t:1e3/60)*e.timeScale)*t,n=r._timeCorrection?t/(e.deltaTime||t):1,o=1-e.frictionAir*(t/h._baseDelta),u=(e.position.x-e.positionPrev.x)*n,d=(e.position.y-e.positionPrev.y)*n;e.velocity.x=u*o+e.force.x/e.mass*i,e.velocity.y=d*o+e.force.y/e.mass*i,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.deltaTime=t,e.angularVelocity=(e.angle-e.anglePrev)*o*n+e.torque/e.inertia*i,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=a.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var f=0;f0&&(p.position.x+=e.velocity.x,p.position.y+=e.velocity.y),0!==e.angularVelocity&&(s.rotate(p.vertices,e.angularVelocity,e.position),l.rotate(p.axes,e.angularVelocity),f>0&&a.rotateAbout(p.position,e.angularVelocity,e.position,p.position)),c.update(p.bounds,p.vertices,e.velocity)}},r.updateVelocities=function(e){var t=r._baseDelta/e.deltaTime,i=e.velocity;i.x=(e.position.x-e.positionPrev.x)*t,i.y=(e.position.y-e.positionPrev.y)*t,e.speed=Math.sqrt(i.x*i.x+i.y*i.y),e.angularVelocity=(e.angle-e.anglePrev)*t,e.angularSpeed=Math.abs(e.angularVelocity)},r.applyForce=function(e,t,i){var n={x:t.x-e.position.x,y:t.y-e.position.y};e.force.x+=i.x,e.force.y+=i.y,e.torque+=n.x*i.y-n.y*i.x},r._totalProperties=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===e.parts.length?0:1;i{var n={};e.exports=n;var r=i(35810),s=i(53402),a=i(15647),o=i(22562);n.create=function(e){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},n.setModified=function(e,t,i,s){if(r.trigger(e,"compositeModified",e),e.isModified=t,t&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),i&&e.parent&&n.setModified(e.parent,t,i,s),s)for(var a=0;a{var n={};e.exports=n;var r=i(69351);n.create=r.create,n.add=r.add,n.remove=r.remove,n.clear=r.clear,n.addComposite=r.addComposite,n.addBody=r.addBody,n.addConstraint=r.addConstraint},52284:(e,t,i)=>{var n,r,s,a={};e.exports=a;var o=i(41598),h=i(4506);n=[],r={overlap:0,axis:null},s={overlap:0,axis:null},a.create=function(e,t){return{pair:null,collided:!1,bodyA:e,bodyB:t,parentA:e.parent,parentB:t.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},a.collides=function(e,t,i){if(a._overlapAxes(r,e.vertices,t.vertices,e.axes),r.overlap<=0||(a._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0))return null;var n,c,l=i&&i.table[h.id(e,t)];l?c=l.collision:((c=a.create(e,t)).collided=!0,c.bodyA=e.id=0&&(v=-v,y=-y),u.x=v,u.y=y,d.x=-y,d.y=v,f.x=v*g,f.y=y*g,c.depth=g;var b=a._findSupports(e,t,u,1),x=0;if(o.contains(e.vertices,b[0])&&(p[x++]=b[0]),o.contains(e.vertices,b[1])&&(p[x++]=b[1]),x<2){var E=a._findSupports(t,e,u,-1);o.contains(t.vertices,E[0])&&(p[x++]=E[0]),x<2&&o.contains(t.vertices,E[1])&&(p[x++]=E[1])}return 0===x&&(p[x++]=b[0]),c.supportCount=x,c},a._overlapAxes=function(e,t,i,n){var r,s,a,o,h,c,l=t.length,u=i.length,d=t[0].x,f=t[0].y,p=i[0].x,g=i[0].y,m=n.length,v=Number.MAX_VALUE,y=0;for(h=0;hS?S=o:oA?A=o:o{var t={};e.exports=t,t.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}},81388:(e,t,i)=>{var n={};e.exports=n;var r=i(53402),s=i(52284);n.create=function(e){return r.extend({bodies:[],collisions:[],pairs:null},e)},n.setBodies=function(e,t){e.bodies=t.slice(0)},n.clear=function(e){e.bodies=[],e.collisions=[]},n.collisions=function(e){var t,i,r=e.pairs,a=e.bodies,o=a.length,h=n.canCollide,c=s.collides,l=e.collisions,u=0;for(a.sort(n._compareBoundsX),t=0;tp)break;if(!(gE.max.y)&&(!v||!x.isStatic&&!x.isSleeping)&&h(d.collisionFilter,x.collisionFilter)){var w=x.parts.length;if(b&&1===w){var T=c(d,x,r);T&&(l[u++]=T)}else for(var S=y>1?1:0,A=w>1?1:0,C=S;CE.max.x)&&!(f.max.xE.max.y)){var T=c(_,O,r);T&&(l[u++]=T)}}}}}return l.length!==u&&(l.length=u),l},n.canCollide=function(e,t){return e.group===t.group&&0!==e.group?e.group>0:(e.mask&t.category)!=0&&(t.mask&e.category)!=0},n._compareBoundsX=function(e,t){return e.bounds.min.x-t.bounds.min.x}},4506:(e,t,i)=>{var n={};e.exports=n;var r=i(43424);n.create=function(e,t){var i=e.bodyA,s=e.bodyB,a={id:n.id(i,s),bodyA:i,bodyB:s,collision:e,contacts:[r.create(),r.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:t,timeUpdated:t,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(a,e,t),a},n.update=function(e,t,i){var n=t.supports,r=t.supportCount,s=e.contacts,a=t.parentA,o=t.parentB;e.isActive=!0,e.timeUpdated=i,e.collision=t,e.separation=t.depth,e.inverseMass=a.inverseMass+o.inverseMass,e.friction=a.frictiono.frictionStatic?a.frictionStatic:o.frictionStatic,e.restitution=a.restitution>o.restitution?a.restitution:o.restitution,e.slop=a.slop>o.slop?a.slop:o.slop,e.contactCount=r,t.pair=e;var h=n[0],c=s[0],l=n[1],u=s[1];(u.vertex===h||c.vertex===l)&&(s[1]=c,s[0]=c=u,u=s[1]),c.vertex=h,u.vertex=l},n.setActive=function(e,t,i){t?(e.isActive=!0,e.timeUpdated=i):(e.isActive=!1,e.contactCount=0)},n.id=function(e,t){return e.id{var n={};e.exports=n;var r=i(4506),s=i(53402);n.create=function(e){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},n.update=function(e,t,i){var n,s,a,o=r.update,h=r.create,c=r.setActive,l=e.table,u=e.list,d=u.length,f=d,p=e.collisionStart,g=e.collisionEnd,m=e.collisionActive,v=t.length,y=0,b=0,x=0;for(a=0;a=i?u[f++]=s:(c(s,!1,i),s.collision.bodyA.sleepCounter>0&&s.collision.bodyB.sleepCounter>0?u[f++]=s:(g[b++]=s,delete l[s.id]));u.length!==f&&(u.length=f),p.length!==y&&(p.length=y),g.length!==b&&(g.length=b),m.length!==x&&(m.length=x)},n.clear=function(e){return e.table={},e.list.length=0,e.collisionStart.length=0,e.collisionActive.length=0,e.collisionEnd.length=0,e}},73296:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(52284),a=i(15647),o=i(66280),h=i(41598);n.collides=function(e,t){for(var i=[],n=t.length,r=e.bounds,o=s.collides,h=a.overlaps,c=0;c{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(e){var t,i,n,r=e.length;for(t=0;tz?(r=W>0?W:-W,(i=g.friction*(W>0?1:-1)*c)<-r?i=-r:i>r&&(i=r)):(i=W,r=f);var X=N*x-F*b,q=B*x-U*b,K=_/(T+v.inverseInertia*X*X+y.inverseInertia*q*q),J=(1+g.restitution)*j*K;if(i*=K,j0&&(D.normalImpulse=0),J=D.normalImpulse-$}if(W<-u||W>u)D.tangentImpulse=0;else{var Q=D.tangentImpulse;D.tangentImpulse+=i,D.tangentImpulse<-r&&(D.tangentImpulse=-r),D.tangentImpulse>r&&(D.tangentImpulse=r),i=D.tangentImpulse-Q}var Z=b*J+E*i,ee=x*J+w*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=Z*v.inverseMass,v.positionPrev.y+=ee*v.inverseMass,v.anglePrev+=(N*ee-F*Z)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=Z*y.inverseMass,y.positionPrev.y-=ee*y.inverseMass,y.anglePrev-=(B*ee-U*Z)*y.inverseInertia)}}}}},48140:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(31725),a=i(53614),o=i(15647),h=i(66615),c=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(e){e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var t=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,i=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,n=s.magnitude(s.sub(t,i));e.length=void 0!==e.length?e.length:n,e.id=e.id||c.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var r={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(r.type="pin",r.anchors=!1):e.stiffness<.9&&(r.type="spring"),e.render=c.extend(r,e.render),e},n.preSolveAll=function(e){for(var t=0;t=1||0===e.length?e.stiffness*t:e.stiffness*t*t,b=e.damping*t,x=s.mult(l,v*y),E=(i?i.inverseMass:0)+(r?r.inverseMass:0),w=E+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(b>0){var T=s.create();p=s.div(l,u),m=s.sub(r&&s.sub(r.position,r.positionPrev)||T,i&&s.sub(i.position,i.positionPrev)||T),g=s.dot(p,m)}i&&!i.isStatic&&(f=i.inverseMass/E,i.constraintImpulse.x-=x.x*f,i.constraintImpulse.y-=x.y*f,i.position.x-=x.x*f,i.position.y-=x.y*f,b>0&&(i.positionPrev.x-=b*p.x*g*f,i.positionPrev.y-=b*p.y*g*f),d=s.cross(a,x)/w*n._torqueDampen*i.inverseInertia*(1-e.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),r&&!r.isStatic&&(f=r.inverseMass/E,r.constraintImpulse.x+=x.x*f,r.constraintImpulse.y+=x.y*f,r.position.x+=x.x*f,r.position.y+=x.y*f,b>0&&(r.positionPrev.x+=b*p.x*g*f,r.positionPrev.y+=b*p.y*g*f),d=s.cross(o,x)/w*n._torqueDampen*r.inverseInertia*(1-e.angularStiffness),r.constraintImpulse.angle+=d,r.angle+=d)}}},n.postSolveAll=function(e){for(var t=0;t0&&(u.position.x+=c.x,u.position.y+=c.y),0!==c.angle&&(r.rotate(u.vertices,c.angle,i.position),h.rotate(u.axes,c.angle),l>0&&s.rotateAbout(u.position,c.angle,i.position,u.position)),o.update(u.bounds,u.vertices,i.velocity)}c.angle*=n._warming,c.x*=n._warming,c.y*=n._warming}}},n.pointAWorld=function(e){return{x:(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),y:(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0)}},n.pointBWorld=function(e){return{x:(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),y:(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0)}},n.currentLength=function(e){var t=(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),i=(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0),n=(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),r=(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0),s=t-n,a=i-r;return Math.sqrt(s*s+a*a)}},53402:(e,t,i)=>{var n,r={};e.exports=r,r._baseDelta=1e3/60,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(e,t){var i,n;"boolean"==typeof t?(i=2,n=t):(i=1,n=!0);for(var s=i;s0;t--){var i=Math.floor(r.random()*(t+1)),n=e[t];e[t]=e[i],e[i]=n}return e},r.choose=function(e){return e[Math.floor(r.random()*e.length)]},r.isElement=function(e){return"undefined"!=typeof HTMLElement?e instanceof HTMLElement:!!(e&&e.nodeType&&e.nodeName)},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isFunction=function(e){return"function"==typeof e},r.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},r.isString=function(e){return"[object String]"===toString.call(e)},r.clamp=function(e,t,i){return ei?i:e},r.sign=function(e){return e<0?-1:1},r.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-r._nowStartTime},r.random=function(e,t){return t=void 0!==t?t:1,(e=void 0!==e?e:0)+n()*(t-e)},n=function(){return r._seed=(9301*r._seed+49297)%233280,r._seed/233280},r.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var e=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[e]||(r.warn(e),r._warnedOnce[e]=!0)},r.deprecated=function(e,t,i){e[t]=r.chain(function(){r.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",i)},e[t])},r.nextId=function(){return r._nextId++},r.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0;i{var n={};e.exports=n;var r=i(53614),s=i(66272),a=i(81388),o=i(99561),h=i(35810),c=i(69351),l=i(48140),u=i(53402),d=i(22562);n._deltaMax=1e3/60,n.create=function(e){e=e||{};var t=u.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},e);return t.world=e.world||c.create({label:"World"}),t.pairs=e.pairs||o.create(),t.detector=e.detector||a.create(),t.detector.pairs=t.pairs,t.grid={buckets:[]},t.world.gravity=t.gravity,t.broadphase=t.grid,t.metrics={},t},n.update=function(e,t){var i,d=u.now(),f=e.world,p=e.detector,g=e.pairs,m=e.timing,v=m.timestamp;t>n._deltaMax&&u.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",n._deltaMax.toFixed(3),"ms."),t=(void 0!==t?t:u._baseDelta)*m.timeScale,m.timestamp+=t,m.lastDelta=t;var y={timestamp:m.timestamp,delta:t};h.trigger(e,"beforeUpdate",y);var b=c.allBodies(f),x=c.allConstraints(f),E=c.allComposites(f);for(f.isModified&&(a.setBodies(p,b),c.setModified(f,!1,!1,!0)),e.enableSleeping&&r.update(b,t),n._bodiesApplyGravity(b,e.gravity),n.wrap(b,E),n.attractors(b),t>0&&n._bodiesUpdate(b,t),h.trigger(e,"beforeSolve",y),l.preSolveAll(b),i=0;i0&&h.trigger(e,"collisionStart",{pairs:g.collisionStart,timestamp:m.timestamp,delta:t});var T=u.clamp(20/e.positionIterations,0,1);for(s.preSolvePosition(g.list),i=0;i0&&h.trigger(e,"collisionActive",{pairs:g.collisionActive,timestamp:m.timestamp,delta:t}),g.collisionEnd.length>0&&h.trigger(e,"collisionEnd",{pairs:g.collisionEnd,timestamp:m.timestamp,delta:t}),n._bodiesClearForces(b),h.trigger(e,"afterUpdate",y),e.timing.lastElapsed=u.now()-d,e},n.merge=function(e,t){if(u.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var i=c.allBodies(e.world),s=0;s0)for(var r=0;r{var n={};e.exports=n;var r=i(53402);n.on=function(e,t,i){for(var n,r=t.split(" "),s=0;s0){i||(i={}),n=t.split(" ");for(var c=0;c{var n={};e.exports=n;var r=i(73832),s=i(53402);n.name="matter-js",n.version="0.20.0",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathAfter(n,e,t)}},73832:(e,t,i)=>{var n={};e.exports=n;var r=i(53402);n._registry={},n.register=function(e){if(n.isPlugin(e)||r.warn("Plugin.register:",n.toString(e),"does not implement all required fields."),e.name in n._registry){var t=n._registry[e.name],i=n.versionParse(e.version).number,s=n.versionParse(t.version).number;i>s?(r.warn("Plugin.register:",n.toString(t),"was upgraded to",n.toString(e)),n._registry[e.name]=e):i-1},n.isFor=function(e,t){var i=e.for&&n.dependencyParse(e.for);return!e.for||t.name===i.name&&n.versionSatisfies(t.version,i.range)},n.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0===e.uses.length){r.warn("Plugin.use:",n.toString(e),"does not specify any dependencies to install.");return}for(var i=n.dependencies(e),s=r.topologicalSort(i),a=[],o=0;o0&&!h.silent&&r.info(a.join(" "))},n.dependencies=function(e,t){var i=n.dependencyParse(e),s=i.name;if(!(s in(t=t||{}))){e=n.resolve(e)||e,t[s]=r.map(e.uses||[],function(t){n.isPlugin(t)&&n.register(t);var s=n.dependencyParse(t),a=n.resolve(t);return a&&!n.versionSatisfies(a.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(a),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),a._warned=!0,e._warned=!0):a||(r.warn("Plugin.dependencies:",n.toString(t),"used by",n.toString(i),"could not be resolved."),e._warned=!0),s.name});for(var a=0;a=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;t.test(e)||r.warn("Plugin.versionParse:",e,"is not a valid version or range.");var i=t.exec(e),n=Number(i[4]),s=Number(i[5]),a=Number(i[6]);return{isRange:!!(i[1]||i[2]),version:i[3],range:e,operator:i[1]||i[2]||"",major:n,minor:s,patch:a,parts:[n,s,a],prerelease:i[7],number:1e8*n+1e4*s+a}},n.versionSatisfies=function(e,t){t=t||"*";var i=n.versionParse(t),r=n.versionParse(e);if(i.isRange){if("*"===i.operator||"*"===e)return!0;if(">"===i.operator)return r.number>i.number;if(">="===i.operator)return r.number>=i.number;if("~"===i.operator)return r.major===i.major&&r.minor===i.minor&&r.patch>=i.patch;if("^"===i.operator)return i.major>0?r.major===i.major&&r.number>=i.number:i.minor>0?r.minor===i.minor&&r.patch>=i.patch:r.patch===i.patch}return e===t||"*"===e}},13037:(e,t,i)=>{var n,r={};e.exports=r;var s=i(35810),a=i(48413),o=i(53402);r._maxFrameDelta=1e3/15,r._frameDeltaFallback=1e3/60,r._timeBufferMargin=1.5,r._elapsedNextEstimate=1,r._smoothingLowerBound=.1,r._smoothingUpperBound=.9,r.create=function(e){var t=o.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},e);return t.fps=0,t},r.run=function(e,t){return e.timeBuffer=r._frameDeltaFallback,function i(n){e.frameRequestId=r._onNextFrame(e,i),n&&e.enabled&&r.tick(e,t,n)}(),e},r.tick=function(e,t,i){var h=o.now(),c=e.delta,l=0,u=i-e.timeLastTick;if((!u||!e.timeLastTick||u>Math.max(r._maxFrameDelta,e.maxFrameTime))&&(u=e.frameDelta||r._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(u),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var d=e.frameDeltaHistory.slice(0).sort();u=n(e.frameDeltaHistory.slice(d.length*r._smoothingLowerBound,d.length*r._smoothingUpperBound))||u}e.frameDeltaSnapping&&(u=1e3/Math.round(1e3/u)),e.frameDelta=u,e.timeLastTick=i,e.timeBuffer+=e.frameDelta,e.timeBuffer=o.clamp(e.timeBuffer,0,e.frameDelta+c*r._timeBufferMargin),e.lastUpdatesDeferred=0;var f=e.maxUpdates||Math.ceil(e.maxFrameTime/c),p={timestamp:t.timing.timestamp};s.trigger(e,"beforeTick",p),s.trigger(e,"tick",p);for(var g=o.now();c>0&&e.timeBuffer>=c*r._timeBufferMargin;){s.trigger(e,"beforeUpdate",p),a.update(t,c),s.trigger(e,"afterUpdate",p),e.timeBuffer-=c,l+=1;var m=o.now()-h,v=o.now()-g,y=m+r._elapsedNextEstimate*v/l;if(l>=f||y>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/c-r._timeBufferMargin));break}}t.timing.lastUpdatesPerFrame=l,s.trigger(e,"afterTick",p),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/c)>f?o.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&o.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==e.isFixed&&o.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&o.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==e.fps&&o.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},r.stop=function(e){r._cancelNextFrame(e)},r._onNextFrame=function(e,t){if("undefined"!=typeof window&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(t);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},r._cancelNextFrame=function(e){if("undefined"!=typeof window&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")},n=function(e){for(var t=0,i=e.length,n=0;n{var n={};e.exports=n;var r=i(22562),s=i(35810),a=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(e,t){for(var i=t/a._baseDelta,s=n._motionSleepThreshold,o=0;o0&&h.motion=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},n.afterCollisions=function(e){for(var t=n._motionSleepThreshold,i=0;it&&n.set(h,!1)}}}},n.set=function(e,t){var i=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,i||s.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,i&&s.trigger(e,"sleepEnd"))}},66280:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(22562),o=i(15647),h=i(31725);n.rectangle=function(e,t,i,n,o){o=o||{};var h={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(o.chamfer){var c=o.chamfer;h.vertices=r.chamfer(h.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete o.chamfer}return a.create(s.extend({},h,o))},n.trapezoid=function(e,t,i,n,o,h){h=h||{},o>=1&&s.warn("Bodies.trapezoid: slope parameter must be < 1.");var c,l=(1-2*(o*=.5))*i,u=i*o,d=u+l,f=d+u;c=o<.5?"L 0 0 L "+u+" "+-n+" L "+d+" "+-n+" L "+f+" 0":"L 0 0 L "+d+" "+-n+" L "+f+" 0";var p={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(h.chamfer){var g=h.chamfer;p.vertices=r.chamfer(p.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete h.chamfer}return a.create(s.extend({},p,h))},n.circle=function(e,t,i,r,a){r=r||{};var o=Math.ceil(Math.max(10,Math.min(a=a||25,i)));return o%2==1&&(o+=1),n.polygon(e,t,o,i,s.extend({},{label:"Circle Body",circleRadius:i},r))},n.polygon=function(e,t,i,o,h){if(h=h||{},i<3)return n.circle(e,t,o,h);for(var c=2*Math.PI/i,l="",u=.5*c,d=0;d0&&r.area(C)1?(p=a.create(s.extend({parts:g.slice(0)},n)),a.setPosition(p,{x:e,y:t}),p):g[0]},n.flagCoincidentParts=function(e,t){void 0===t&&(t=5);for(var i=0;i{var n={};e.exports=n;var r=i(69351),s=i(48140),a=i(53402),o=i(22562),h=i(66280);n.stack=function(e,t,i,n,s,a,h){for(var c,l=r.create({label:"Stack"}),u=e,d=t,f=0,p=0;pg&&(g=y),o.translate(v,{x:.5*b,y:.5*y}),u=v.bounds.max.x+s,r.addBody(l,v),c=v,f+=1}else u+=s}d+=g+a,u=e}return l},n.chain=function(e,t,i,n,o,h){for(var c=e.bodies,l=1;l0)for(c=0;c0&&(d=f[c-1+(h-1)*t],r.addConstraint(e,s.create(a.extend({bodyA:d,bodyB:u},o)))),n&&cd)){var p=c=d-c,g=i-1-c;if(!(ag))return 1===u&&o.translate(l,{x:(a+(i%2==1?1:-1))*f,y:0}),h(e+(l?a*f:0)+a*s,n,a,c,l,u)}})},n.newtonsCradle=function(e,t,i,n,a){for(var o=r.create({label:"Newtons Cradle"}),c=0;c{var n={};e.exports=n;var r=i(31725),s=i(53402);n.fromVertices=function(e){for(var t={},i=0;i{var t={};e.exports=t,t.create=function(e){var i={min:{x:0,y:0},max:{x:0,y:0}};return e&&t.update(i,e),i},t.update=function(e,t,i){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var n=0;ne.max.x&&(e.max.x=r.x),r.xe.max.y&&(e.max.y=r.y),r.y0?e.max.x+=i.x:e.min.x+=i.x,i.y>0?e.max.y+=i.y:e.min.y+=i.y)},t.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},t.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},t.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},t.shift=function(e,t){var i=e.max.x-e.min.x,n=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+i,e.min.y=t.y,e.max.y=t.y+n},t.wrap=function(e,t,i){var n=null,r=null;if(void 0!==t.min.x&&void 0!==t.max.x&&(e.min.x>t.max.x?n=t.min.x-e.max.x:e.max.xt.max.y?r=t.min.y-e.max.y:e.max.y{var n={};e.exports=n,i(15647);var r=i(53402);n.pathToVertices=function(e,t){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,a,o,h,c,l,u,d,f,p,g=[],m=0,v=0,y=0;t=t||15;var b=function(e,t,i){var n=i%2==1&&i>1;if(!d||e!=d.x||t!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var r={x:f+e,y:p+t};(n||!d)&&(d=r),g.push(r),v=f+e,y=p+t}},x=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=e.x,y=e.y;break;case"H":v=e.x;break;case"V":y=e.y}b(v,y,e.pathSegType)}};for(n._svgPathToAbsolute(e),a=e.getTotalLength(),c=[],i=0;i{var t={};e.exports=t,t.create=function(e,t){return{x:e||0,y:t||0}},t.clone=function(e){return{x:e.x,y:e.y}},t.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},t.rotate=function(e,t,i){var n=Math.cos(t),r=Math.sin(t);i||(i={});var s=e.x*n-e.y*r;return i.y=e.x*r+e.y*n,i.x=s,i},t.rotateAbout=function(e,t,i,n){var r=Math.cos(t),s=Math.sin(t);n||(n={});var a=i.x+((e.x-i.x)*r-(e.y-i.y)*s);return n.y=i.y+((e.x-i.x)*s+(e.y-i.y)*r),n.x=a,n},t.normalise=function(e){var i=t.magnitude(e);return 0===i?{x:0,y:0}:{x:e.x/i,y:e.y/i}},t.dot=function(e,t){return e.x*t.x+e.y*t.y},t.cross=function(e,t){return e.x*t.y-e.y*t.x},t.cross3=function(e,t,i){return(t.x-e.x)*(i.y-e.y)-(t.y-e.y)*(i.x-e.x)},t.add=function(e,t,i){return i||(i={}),i.x=e.x+t.x,i.y=e.y+t.y,i},t.sub=function(e,t,i){return i||(i={}),i.x=e.x-t.x,i.y=e.y-t.y,i},t.mult=function(e,t){return{x:e.x*t,y:e.y*t}},t.div=function(e,t){return{x:e.x/t,y:e.y/t}},t.perp=function(e,t){return{x:-((t=!0===t?-1:1)*e.y),y:t*e.x}},t.neg=function(e){return{x:-e.x,y:-e.y}},t.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]},41598:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(53402);n.create=function(e,t){for(var i=[],n=0;n0)return!1;a=i}return!0},n.scale=function(e,t,i,s){if(1===t&&1===i)return e;s=s||n.centre(e);for(var a,o,h=0;h=0?h-1:e.length-1],l=e[h],u=e[(h+1)%e.length],d=t[h0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(e){var t,i,n=[],s=[];for((e=e.slice(0)).sort(function(e,t){var i=e.x-t.x;return 0!==i?i:e.y-t.y}),i=0;i=2&&0>=r.cross3(s[s.length-2],s[s.length-1],t);)s.pop();s.push(t)}for(i=e.length-1;i>=0;i-=1){for(t=e[i];n.length>=2&&0>=r.cross3(n[n.length-2],n[n.length-1],t);)n.pop();n.push(t)}return n.pop(),s.pop(),n.concat(s)}},55973:e=>{function t(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}function i(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])}function n(e,t,n){return 0>=i(e,t,n)}/** + */e.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(e,t,i)=>{var n,r={};e.exports=r;var s=i(41598),a=i(31725),o=i(53614),h=i(53402),c=i(15647),l=i(66615);r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=1e3/60,r.create=function(e){var t={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:e.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(t.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var i=h.extend(t,e);return n(i,e),i.setOnCollideWith=function(e,t){return t?this.onCollideWith[e.id]=t:delete this.onCollideWith[e.id],this},i},r.nextGroup=function(e){return e?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory},n=function(e,t){if(t=t||{},r.set(e,{bounds:e.bounds||c.create(e.vertices),positionPrev:e.positionPrev||a.clone(e.position),anglePrev:e.anglePrev||e.angle,vertices:e.vertices,parts:e.parts||[e],isStatic:e.isStatic,isSleeping:e.isSleeping,parent:e.parent||e}),s.rotate(e.vertices,e.angle,e.position),l.rotate(e.axes,e.angle),c.update(e.bounds,e.vertices,e.velocity),r.set(e,{axes:t.axes||e.axes,area:t.area||e.area,mass:t.mass||e.mass,inertia:t.inertia||e.inertia}),1===e.parts.length){var i=e.bounds,n=e.centerOfMass,o=e.centerOffset,h=i.max.x-i.min.x,u=i.max.y-i.min.y;n.x=-(i.min.x-e.position.x)/h,n.y=-(i.min.y-e.position.y)/u,o.x=h*n.x,o.y=u*n.y}},r.set=function(e,t,i){var n;for(n in"string"==typeof t&&(n=t,(t={})[n]=i),t)if(Object.prototype.hasOwnProperty.call(t,n))switch(i=t[n],n){case"isStatic":r.setStatic(e,i);break;case"isSleeping":o.set(e,i);break;case"mass":r.setMass(e,i);break;case"density":r.setDensity(e,i);break;case"inertia":r.setInertia(e,i);break;case"vertices":r.setVertices(e,i);break;case"position":r.setPosition(e,i);break;case"angle":r.setAngle(e,i);break;case"velocity":r.setVelocity(e,i);break;case"angularVelocity":r.setAngularVelocity(e,i);break;case"speed":r.setSpeed(e,i);break;case"angularSpeed":r.setAngularSpeed(e,i);break;case"parts":r.setParts(e,i);break;case"centre":r.setCentre(e,i);break;default:e[n]=i}},r.setStatic=function(e,t){for(var i=0;i0&&a.rotateAbout(o.position,n,e.position,o.position)}},r.setVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.positionPrev.x=e.position.x-t.x*i,e.positionPrev.y=e.position.y-t.y*i,e.velocity.x=(e.position.x-e.positionPrev.x)/i,e.velocity.y=(e.position.y-e.positionPrev.y)/i,e.speed=a.magnitude(e.velocity)},r.getVelocity=function(e){var t=r._baseDelta/e.deltaTime;return{x:(e.position.x-e.positionPrev.x)*t,y:(e.position.y-e.positionPrev.y)*t}},r.getSpeed=function(e){return a.magnitude(r.getVelocity(e))},r.setSpeed=function(e,t){r.setVelocity(e,a.mult(a.normalise(r.getVelocity(e)),t))},r.setAngularVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.anglePrev=e.angle-t*i,e.angularVelocity=(e.angle-e.anglePrev)/i,e.angularSpeed=Math.abs(e.angularVelocity)},r.getAngularVelocity=function(e){return(e.angle-e.anglePrev)*r._baseDelta/e.deltaTime},r.getAngularSpeed=function(e){return Math.abs(r.getAngularVelocity(e))},r.setAngularSpeed=function(e,t){r.setAngularVelocity(e,h.sign(r.getAngularVelocity(e))*t)},r.translate=function(e,t,i){r.setPosition(e,a.add(e.position,t),i)},r.rotate=function(e,t,i,n){if(i){var s=Math.cos(t),a=Math.sin(t),o=e.position.x-i.x,h=e.position.y-i.y;r.setPosition(e,{x:i.x+(o*s-h*a),y:i.y+(o*a+h*s)},n),r.setAngle(e,e.angle+t,n)}else r.setAngle(e,e.angle+t,n)},r.scale=function(e,t,i,n){var a=0,o=0;n=n||e.position;for(var h=e.inertia===1/0,u=0;u0&&(a+=d.area,o+=d.inertia),d.position.x=n.x+(d.position.x-n.x)*t,d.position.y=n.y+(d.position.y-n.y)*i,c.update(d.bounds,d.vertices,e.velocity)}e.parts.length>1&&(e.area=a,e.isStatic||(r.setMass(e,e.density*a),r.setInertia(e,o))),e.circleRadius&&(t===i?e.circleRadius*=t:e.circleRadius=null),h&&r.setInertia(e,1/0)},r.update=function(e,t){var i=(t=(void 0!==t?t:1e3/60)*e.timeScale)*t,n=r._timeCorrection?t/(e.deltaTime||t):1,o=1-e.frictionAir*(t/h._baseDelta),u=(e.position.x-e.positionPrev.x)*n,d=(e.position.y-e.positionPrev.y)*n;e.velocity.x=u*o+e.force.x/e.mass*i,e.velocity.y=d*o+e.force.y/e.mass*i,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.deltaTime=t,e.angularVelocity=(e.angle-e.anglePrev)*o*n+e.torque/e.inertia*i,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=a.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var f=0;f0&&(p.position.x+=e.velocity.x,p.position.y+=e.velocity.y),0!==e.angularVelocity&&(s.rotate(p.vertices,e.angularVelocity,e.position),l.rotate(p.axes,e.angularVelocity),f>0&&a.rotateAbout(p.position,e.angularVelocity,e.position,p.position)),c.update(p.bounds,p.vertices,e.velocity)}},r.updateVelocities=function(e){var t=r._baseDelta/e.deltaTime,i=e.velocity;i.x=(e.position.x-e.positionPrev.x)*t,i.y=(e.position.y-e.positionPrev.y)*t,e.speed=Math.sqrt(i.x*i.x+i.y*i.y),e.angularVelocity=(e.angle-e.anglePrev)*t,e.angularSpeed=Math.abs(e.angularVelocity)},r.applyForce=function(e,t,i){var n={x:t.x-e.position.x,y:t.y-e.position.y};e.force.x+=i.x,e.force.y+=i.y,e.torque+=n.x*i.y-n.y*i.x},r._totalProperties=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===e.parts.length?0:1;i{var n={};e.exports=n;var r=i(35810),s=i(53402),a=i(15647),o=i(22562);n.create=function(e){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},n.setModified=function(e,t,i,s){if(r.trigger(e,"compositeModified",e),e.isModified=t,t&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),i&&e.parent&&n.setModified(e.parent,t,i,s),s)for(var a=0;a{var n={};e.exports=n;var r=i(69351);n.create=r.create,n.add=r.add,n.remove=r.remove,n.clear=r.clear,n.addComposite=r.addComposite,n.addBody=r.addBody,n.addConstraint=r.addConstraint},52284:(e,t,i)=>{var n,r,s,a={};e.exports=a;var o=i(41598),h=i(4506);n=[],r={overlap:0,axis:null},s={overlap:0,axis:null},a.create=function(e,t){return{pair:null,collided:!1,bodyA:e,bodyB:t,parentA:e.parent,parentB:t.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},a.collides=function(e,t,i){if(a._overlapAxes(r,e.vertices,t.vertices,e.axes),r.overlap<=0||(a._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0))return null;var n,c,l=i&&i.table[h.id(e,t)];l?c=l.collision:((c=a.create(e,t)).collided=!0,c.bodyA=e.id=0&&(v=-v,y=-y),u.x=v,u.y=y,d.x=-y,d.y=v,f.x=v*g,f.y=y*g,c.depth=g;var b=a._findSupports(e,t,u,1),x=0;if(o.contains(e.vertices,b[0])&&(p[x++]=b[0]),o.contains(e.vertices,b[1])&&(p[x++]=b[1]),x<2){var E=a._findSupports(t,e,u,-1);o.contains(t.vertices,E[0])&&(p[x++]=E[0]),x<2&&o.contains(t.vertices,E[1])&&(p[x++]=E[1])}return 0===x&&(p[x++]=b[0]),c.supportCount=x,c},a._overlapAxes=function(e,t,i,n){var r,s,a,o,h,c,l=t.length,u=i.length,d=t[0].x,f=t[0].y,p=i[0].x,g=i[0].y,m=n.length,v=Number.MAX_VALUE,y=0;for(h=0;hS?S=o:oA?A=o:o{var t={};e.exports=t,t.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}},81388:(e,t,i)=>{var n={};e.exports=n;var r=i(53402),s=i(52284);n.create=function(e){return r.extend({bodies:[],collisions:[],pairs:null},e)},n.setBodies=function(e,t){e.bodies=t.slice(0)},n.clear=function(e){e.bodies=[],e.collisions=[]},n.collisions=function(e){var t,i,r=e.pairs,a=e.bodies,o=a.length,h=n.canCollide,c=s.collides,l=e.collisions,u=0;for(a.sort(n._compareBoundsX),t=0;tp)break;if(!(gE.max.y)&&(!v||!x.isStatic&&!x.isSleeping)&&h(d.collisionFilter,x.collisionFilter)){var w=x.parts.length;if(b&&1===w){var T=c(d,x,r);T&&(l[u++]=T)}else for(var S=y>1?1:0,A=w>1?1:0,C=S;CE.max.x)&&!(f.max.xE.max.y)){var T=c(_,O,r);T&&(l[u++]=T)}}}}}return l.length!==u&&(l.length=u),l},n.canCollide=function(e,t){return e.group===t.group&&0!==e.group?e.group>0:(e.mask&t.category)!=0&&(t.mask&e.category)!=0},n._compareBoundsX=function(e,t){return e.bounds.min.x-t.bounds.min.x}},4506:(e,t,i)=>{var n={};e.exports=n;var r=i(43424);n.create=function(e,t){var i=e.bodyA,s=e.bodyB,a={id:n.id(i,s),bodyA:i,bodyB:s,collision:e,contacts:[r.create(),r.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:t,timeUpdated:t,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(a,e,t),a},n.update=function(e,t,i){var n=t.supports,r=t.supportCount,s=e.contacts,a=t.parentA,o=t.parentB;e.isActive=!0,e.timeUpdated=i,e.collision=t,e.separation=t.depth,e.inverseMass=a.inverseMass+o.inverseMass,e.friction=a.frictiono.frictionStatic?a.frictionStatic:o.frictionStatic,e.restitution=a.restitution>o.restitution?a.restitution:o.restitution,e.slop=a.slop>o.slop?a.slop:o.slop,e.contactCount=r,t.pair=e;var h=n[0],c=s[0],l=n[1],u=s[1];(u.vertex===h||c.vertex===l)&&(s[1]=c,s[0]=c=u,u=s[1]),c.vertex=h,u.vertex=l},n.setActive=function(e,t,i){t?(e.isActive=!0,e.timeUpdated=i):(e.isActive=!1,e.contactCount=0)},n.id=function(e,t){return e.id{var n={};e.exports=n;var r=i(4506),s=i(53402);n.create=function(e){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},n.update=function(e,t,i){var n,s,a,o=r.update,h=r.create,c=r.setActive,l=e.table,u=e.list,d=u.length,f=d,p=e.collisionStart,g=e.collisionEnd,m=e.collisionActive,v=t.length,y=0,b=0,x=0;for(a=0;a=i?u[f++]=s:(c(s,!1,i),s.collision.bodyA.sleepCounter>0&&s.collision.bodyB.sleepCounter>0?u[f++]=s:(g[b++]=s,delete l[s.id]));u.length!==f&&(u.length=f),p.length!==y&&(p.length=y),g.length!==b&&(g.length=b),m.length!==x&&(m.length=x)},n.clear=function(e){return e.table={},e.list.length=0,e.collisionStart.length=0,e.collisionActive.length=0,e.collisionEnd.length=0,e}},73296:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(52284),a=i(15647),o=i(66280),h=i(41598);n.collides=function(e,t){for(var i=[],n=t.length,r=e.bounds,o=s.collides,h=a.overlaps,c=0;c{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(e){var t,i,n,r=e.length;for(t=0;tz?(r=W>0?W:-W,(i=g.friction*(W>0?1:-1)*c)<-r?i=-r:i>r&&(i=r)):(i=W,r=f);var X=N*x-F*b,K=B*x-U*b,q=_/(T+v.inverseInertia*X*X+y.inverseInertia*K*K),J=(1+g.restitution)*j*q;if(i*=q,j0&&(D.normalImpulse=0),J=D.normalImpulse-$}if(W<-u||W>u)D.tangentImpulse=0;else{var Q=D.tangentImpulse;D.tangentImpulse+=i,D.tangentImpulse<-r&&(D.tangentImpulse=-r),D.tangentImpulse>r&&(D.tangentImpulse=r),i=D.tangentImpulse-Q}var Z=b*J+E*i,ee=x*J+w*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=Z*v.inverseMass,v.positionPrev.y+=ee*v.inverseMass,v.anglePrev+=(N*ee-F*Z)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=Z*y.inverseMass,y.positionPrev.y-=ee*y.inverseMass,y.anglePrev-=(B*ee-U*Z)*y.inverseInertia)}}}}},48140:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(31725),a=i(53614),o=i(15647),h=i(66615),c=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(e){e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var t=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,i=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,n=s.magnitude(s.sub(t,i));e.length=void 0!==e.length?e.length:n,e.id=e.id||c.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var r={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(r.type="pin",r.anchors=!1):e.stiffness<.9&&(r.type="spring"),e.render=c.extend(r,e.render),e},n.preSolveAll=function(e){for(var t=0;t=1||0===e.length?e.stiffness*t:e.stiffness*t*t,b=e.damping*t,x=s.mult(l,v*y),E=(i?i.inverseMass:0)+(r?r.inverseMass:0),w=E+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(b>0){var T=s.create();p=s.div(l,u),m=s.sub(r&&s.sub(r.position,r.positionPrev)||T,i&&s.sub(i.position,i.positionPrev)||T),g=s.dot(p,m)}i&&!i.isStatic&&(f=i.inverseMass/E,i.constraintImpulse.x-=x.x*f,i.constraintImpulse.y-=x.y*f,i.position.x-=x.x*f,i.position.y-=x.y*f,b>0&&(i.positionPrev.x-=b*p.x*g*f,i.positionPrev.y-=b*p.y*g*f),d=s.cross(a,x)/w*n._torqueDampen*i.inverseInertia*(1-e.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),r&&!r.isStatic&&(f=r.inverseMass/E,r.constraintImpulse.x+=x.x*f,r.constraintImpulse.y+=x.y*f,r.position.x+=x.x*f,r.position.y+=x.y*f,b>0&&(r.positionPrev.x+=b*p.x*g*f,r.positionPrev.y+=b*p.y*g*f),d=s.cross(o,x)/w*n._torqueDampen*r.inverseInertia*(1-e.angularStiffness),r.constraintImpulse.angle+=d,r.angle+=d)}}},n.postSolveAll=function(e){for(var t=0;t0&&(u.position.x+=c.x,u.position.y+=c.y),0!==c.angle&&(r.rotate(u.vertices,c.angle,i.position),h.rotate(u.axes,c.angle),l>0&&s.rotateAbout(u.position,c.angle,i.position,u.position)),o.update(u.bounds,u.vertices,i.velocity)}c.angle*=n._warming,c.x*=n._warming,c.y*=n._warming}}},n.pointAWorld=function(e){return{x:(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),y:(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0)}},n.pointBWorld=function(e){return{x:(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),y:(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0)}},n.currentLength=function(e){var t=(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),i=(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0),n=(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),r=(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0),s=t-n,a=i-r;return Math.sqrt(s*s+a*a)}},53402:(e,t,i)=>{var n,r={};e.exports=r,r._baseDelta=1e3/60,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(e,t){var i,n;"boolean"==typeof t?(i=2,n=t):(i=1,n=!0);for(var s=i;s0;t--){var i=Math.floor(r.random()*(t+1)),n=e[t];e[t]=e[i],e[i]=n}return e},r.choose=function(e){return e[Math.floor(r.random()*e.length)]},r.isElement=function(e){return"undefined"!=typeof HTMLElement?e instanceof HTMLElement:!!(e&&e.nodeType&&e.nodeName)},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isFunction=function(e){return"function"==typeof e},r.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},r.isString=function(e){return"[object String]"===toString.call(e)},r.clamp=function(e,t,i){return ei?i:e},r.sign=function(e){return e<0?-1:1},r.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-r._nowStartTime},r.random=function(e,t){return t=void 0!==t?t:1,(e=void 0!==e?e:0)+n()*(t-e)},n=function(){return r._seed=(9301*r._seed+49297)%233280,r._seed/233280},r.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var e=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[e]||(r.warn(e),r._warnedOnce[e]=!0)},r.deprecated=function(e,t,i){e[t]=r.chain(function(){r.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",i)},e[t])},r.nextId=function(){return r._nextId++},r.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0;i{var n={};e.exports=n;var r=i(53614),s=i(66272),a=i(81388),o=i(99561),h=i(35810),c=i(69351),l=i(48140),u=i(53402),d=i(22562);n._deltaMax=1e3/60,n.create=function(e){e=e||{};var t=u.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},e);return t.world=e.world||c.create({label:"World"}),t.pairs=e.pairs||o.create(),t.detector=e.detector||a.create(),t.detector.pairs=t.pairs,t.grid={buckets:[]},t.world.gravity=t.gravity,t.broadphase=t.grid,t.metrics={},t},n.update=function(e,t){var i,d=u.now(),f=e.world,p=e.detector,g=e.pairs,m=e.timing,v=m.timestamp;t>n._deltaMax&&u.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",n._deltaMax.toFixed(3),"ms."),t=(void 0!==t?t:u._baseDelta)*m.timeScale,m.timestamp+=t,m.lastDelta=t;var y={timestamp:m.timestamp,delta:t};h.trigger(e,"beforeUpdate",y);var b=c.allBodies(f),x=c.allConstraints(f),E=c.allComposites(f);for(f.isModified&&(a.setBodies(p,b),c.setModified(f,!1,!1,!0)),e.enableSleeping&&r.update(b,t),n._bodiesApplyGravity(b,e.gravity),n.wrap(b,E),n.attractors(b),t>0&&n._bodiesUpdate(b,t),h.trigger(e,"beforeSolve",y),l.preSolveAll(b),i=0;i0&&h.trigger(e,"collisionStart",{pairs:g.collisionStart,timestamp:m.timestamp,delta:t});var T=u.clamp(20/e.positionIterations,0,1);for(s.preSolvePosition(g.list),i=0;i0&&h.trigger(e,"collisionActive",{pairs:g.collisionActive,timestamp:m.timestamp,delta:t}),g.collisionEnd.length>0&&h.trigger(e,"collisionEnd",{pairs:g.collisionEnd,timestamp:m.timestamp,delta:t}),n._bodiesClearForces(b),h.trigger(e,"afterUpdate",y),e.timing.lastElapsed=u.now()-d,e},n.merge=function(e,t){if(u.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var i=c.allBodies(e.world),s=0;s0)for(var r=0;r{var n={};e.exports=n;var r=i(53402);n.on=function(e,t,i){for(var n,r=t.split(" "),s=0;s0){i||(i={}),n=t.split(" ");for(var c=0;c{var n={};e.exports=n;var r=i(73832),s=i(53402);n.name="matter-js",n.version="0.20.0",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathAfter(n,e,t)}},73832:(e,t,i)=>{var n={};e.exports=n;var r=i(53402);n._registry={},n.register=function(e){if(n.isPlugin(e)||r.warn("Plugin.register:",n.toString(e),"does not implement all required fields."),e.name in n._registry){var t=n._registry[e.name],i=n.versionParse(e.version).number,s=n.versionParse(t.version).number;i>s?(r.warn("Plugin.register:",n.toString(t),"was upgraded to",n.toString(e)),n._registry[e.name]=e):i-1},n.isFor=function(e,t){var i=e.for&&n.dependencyParse(e.for);return!e.for||t.name===i.name&&n.versionSatisfies(t.version,i.range)},n.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0===e.uses.length){r.warn("Plugin.use:",n.toString(e),"does not specify any dependencies to install.");return}for(var i=n.dependencies(e),s=r.topologicalSort(i),a=[],o=0;o0&&!h.silent&&r.info(a.join(" "))},n.dependencies=function(e,t){var i=n.dependencyParse(e),s=i.name;if(!(s in(t=t||{}))){e=n.resolve(e)||e,t[s]=r.map(e.uses||[],function(t){n.isPlugin(t)&&n.register(t);var s=n.dependencyParse(t),a=n.resolve(t);return a&&!n.versionSatisfies(a.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(a),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),a._warned=!0,e._warned=!0):a||(r.warn("Plugin.dependencies:",n.toString(t),"used by",n.toString(i),"could not be resolved."),e._warned=!0),s.name});for(var a=0;a=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;t.test(e)||r.warn("Plugin.versionParse:",e,"is not a valid version or range.");var i=t.exec(e),n=Number(i[4]),s=Number(i[5]),a=Number(i[6]);return{isRange:!!(i[1]||i[2]),version:i[3],range:e,operator:i[1]||i[2]||"",major:n,minor:s,patch:a,parts:[n,s,a],prerelease:i[7],number:1e8*n+1e4*s+a}},n.versionSatisfies=function(e,t){t=t||"*";var i=n.versionParse(t),r=n.versionParse(e);if(i.isRange){if("*"===i.operator||"*"===e)return!0;if(">"===i.operator)return r.number>i.number;if(">="===i.operator)return r.number>=i.number;if("~"===i.operator)return r.major===i.major&&r.minor===i.minor&&r.patch>=i.patch;if("^"===i.operator)return i.major>0?r.major===i.major&&r.number>=i.number:i.minor>0?r.minor===i.minor&&r.patch>=i.patch:r.patch===i.patch}return e===t||"*"===e}},13037:(e,t,i)=>{var n,r={};e.exports=r;var s=i(35810),a=i(48413),o=i(53402);r._maxFrameDelta=1e3/15,r._frameDeltaFallback=1e3/60,r._timeBufferMargin=1.5,r._elapsedNextEstimate=1,r._smoothingLowerBound=.1,r._smoothingUpperBound=.9,r.create=function(e){var t=o.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},e);return t.fps=0,t},r.run=function(e,t){return e.timeBuffer=r._frameDeltaFallback,function i(n){e.frameRequestId=r._onNextFrame(e,i),n&&e.enabled&&r.tick(e,t,n)}(),e},r.tick=function(e,t,i){var h=o.now(),c=e.delta,l=0,u=i-e.timeLastTick;if((!u||!e.timeLastTick||u>Math.max(r._maxFrameDelta,e.maxFrameTime))&&(u=e.frameDelta||r._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(u),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var d=e.frameDeltaHistory.slice(0).sort();u=n(e.frameDeltaHistory.slice(d.length*r._smoothingLowerBound,d.length*r._smoothingUpperBound))||u}e.frameDeltaSnapping&&(u=1e3/Math.round(1e3/u)),e.frameDelta=u,e.timeLastTick=i,e.timeBuffer+=e.frameDelta,e.timeBuffer=o.clamp(e.timeBuffer,0,e.frameDelta+c*r._timeBufferMargin),e.lastUpdatesDeferred=0;var f=e.maxUpdates||Math.ceil(e.maxFrameTime/c),p={timestamp:t.timing.timestamp};s.trigger(e,"beforeTick",p),s.trigger(e,"tick",p);for(var g=o.now();c>0&&e.timeBuffer>=c*r._timeBufferMargin;){s.trigger(e,"beforeUpdate",p),a.update(t,c),s.trigger(e,"afterUpdate",p),e.timeBuffer-=c,l+=1;var m=o.now()-h,v=o.now()-g,y=m+r._elapsedNextEstimate*v/l;if(l>=f||y>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/c-r._timeBufferMargin));break}}t.timing.lastUpdatesPerFrame=l,s.trigger(e,"afterTick",p),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/c)>f?o.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&o.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==e.isFixed&&o.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&o.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==e.fps&&o.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},r.stop=function(e){r._cancelNextFrame(e)},r._onNextFrame=function(e,t){if("undefined"!=typeof window&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(t);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},r._cancelNextFrame=function(e){if("undefined"!=typeof window&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")},n=function(e){for(var t=0,i=e.length,n=0;n{var n={};e.exports=n;var r=i(22562),s=i(35810),a=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(e,t){for(var i=t/a._baseDelta,s=n._motionSleepThreshold,o=0;o0&&h.motion=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},n.afterCollisions=function(e){for(var t=n._motionSleepThreshold,i=0;it&&n.set(h,!1)}}}},n.set=function(e,t){var i=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,i||s.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,i&&s.trigger(e,"sleepEnd"))}},66280:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(22562),o=i(15647),h=i(31725);n.rectangle=function(e,t,i,n,o){o=o||{};var h={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(o.chamfer){var c=o.chamfer;h.vertices=r.chamfer(h.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete o.chamfer}return a.create(s.extend({},h,o))},n.trapezoid=function(e,t,i,n,o,h){h=h||{},o>=1&&s.warn("Bodies.trapezoid: slope parameter must be < 1.");var c,l=(1-2*(o*=.5))*i,u=i*o,d=u+l,f=d+u;c=o<.5?"L 0 0 L "+u+" "+-n+" L "+d+" "+-n+" L "+f+" 0":"L 0 0 L "+d+" "+-n+" L "+f+" 0";var p={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(h.chamfer){var g=h.chamfer;p.vertices=r.chamfer(p.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete h.chamfer}return a.create(s.extend({},p,h))},n.circle=function(e,t,i,r,a){r=r||{};var o=Math.ceil(Math.max(10,Math.min(a=a||25,i)));return o%2==1&&(o+=1),n.polygon(e,t,o,i,s.extend({},{label:"Circle Body",circleRadius:i},r))},n.polygon=function(e,t,i,o,h){if(h=h||{},i<3)return n.circle(e,t,o,h);for(var c=2*Math.PI/i,l="",u=.5*c,d=0;d0&&r.area(C)1?(p=a.create(s.extend({parts:g.slice(0)},n)),a.setPosition(p,{x:e,y:t}),p):g[0]},n.flagCoincidentParts=function(e,t){void 0===t&&(t=5);for(var i=0;i{var n={};e.exports=n;var r=i(69351),s=i(48140),a=i(53402),o=i(22562),h=i(66280);n.stack=function(e,t,i,n,s,a,h){for(var c,l=r.create({label:"Stack"}),u=e,d=t,f=0,p=0;pg&&(g=y),o.translate(v,{x:.5*b,y:.5*y}),u=v.bounds.max.x+s,r.addBody(l,v),c=v,f+=1}else u+=s}d+=g+a,u=e}return l},n.chain=function(e,t,i,n,o,h){for(var c=e.bodies,l=1;l0)for(c=0;c0&&(d=f[c-1+(h-1)*t],r.addConstraint(e,s.create(a.extend({bodyA:d,bodyB:u},o)))),n&&cd)){var p=c=d-c,g=i-1-c;if(!(ag))return 1===u&&o.translate(l,{x:(a+(i%2==1?1:-1))*f,y:0}),h(e+(l?a*f:0)+a*s,n,a,c,l,u)}})},n.newtonsCradle=function(e,t,i,n,a){for(var o=r.create({label:"Newtons Cradle"}),c=0;c{var n={};e.exports=n;var r=i(31725),s=i(53402);n.fromVertices=function(e){for(var t={},i=0;i{var t={};e.exports=t,t.create=function(e){var i={min:{x:0,y:0},max:{x:0,y:0}};return e&&t.update(i,e),i},t.update=function(e,t,i){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var n=0;ne.max.x&&(e.max.x=r.x),r.xe.max.y&&(e.max.y=r.y),r.y0?e.max.x+=i.x:e.min.x+=i.x,i.y>0?e.max.y+=i.y:e.min.y+=i.y)},t.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},t.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},t.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},t.shift=function(e,t){var i=e.max.x-e.min.x,n=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+i,e.min.y=t.y,e.max.y=t.y+n},t.wrap=function(e,t,i){var n=null,r=null;if(void 0!==t.min.x&&void 0!==t.max.x&&(e.min.x>t.max.x?n=t.min.x-e.max.x:e.max.xt.max.y?r=t.min.y-e.max.y:e.max.y{var n={};e.exports=n,i(15647);var r=i(53402);n.pathToVertices=function(e,t){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,a,o,h,c,l,u,d,f,p,g=[],m=0,v=0,y=0;t=t||15;var b=function(e,t,i){var n=i%2==1&&i>1;if(!d||e!=d.x||t!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var r={x:f+e,y:p+t};(n||!d)&&(d=r),g.push(r),v=f+e,y=p+t}},x=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=e.x,y=e.y;break;case"H":v=e.x;break;case"V":y=e.y}b(v,y,e.pathSegType)}};for(n._svgPathToAbsolute(e),a=e.getTotalLength(),c=[],i=0;i{var t={};e.exports=t,t.create=function(e,t){return{x:e||0,y:t||0}},t.clone=function(e){return{x:e.x,y:e.y}},t.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},t.rotate=function(e,t,i){var n=Math.cos(t),r=Math.sin(t);i||(i={});var s=e.x*n-e.y*r;return i.y=e.x*r+e.y*n,i.x=s,i},t.rotateAbout=function(e,t,i,n){var r=Math.cos(t),s=Math.sin(t);n||(n={});var a=i.x+((e.x-i.x)*r-(e.y-i.y)*s);return n.y=i.y+((e.x-i.x)*s+(e.y-i.y)*r),n.x=a,n},t.normalise=function(e){var i=t.magnitude(e);return 0===i?{x:0,y:0}:{x:e.x/i,y:e.y/i}},t.dot=function(e,t){return e.x*t.x+e.y*t.y},t.cross=function(e,t){return e.x*t.y-e.y*t.x},t.cross3=function(e,t,i){return(t.x-e.x)*(i.y-e.y)-(t.y-e.y)*(i.x-e.x)},t.add=function(e,t,i){return i||(i={}),i.x=e.x+t.x,i.y=e.y+t.y,i},t.sub=function(e,t,i){return i||(i={}),i.x=e.x-t.x,i.y=e.y-t.y,i},t.mult=function(e,t){return{x:e.x*t,y:e.y*t}},t.div=function(e,t){return{x:e.x/t,y:e.y/t}},t.perp=function(e,t){return{x:-((t=!0===t?-1:1)*e.y),y:t*e.x}},t.neg=function(e){return{x:-e.x,y:-e.y}},t.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]},41598:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(53402);n.create=function(e,t){for(var i=[],n=0;n0)return!1;a=i}return!0},n.scale=function(e,t,i,s){if(1===t&&1===i)return e;s=s||n.centre(e);for(var a,o,h=0;h=0?h-1:e.length-1],l=e[h],u=e[(h+1)%e.length],d=t[h0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(e){var t,i,n=[],s=[];for((e=e.slice(0)).sort(function(e,t){var i=e.x-t.x;return 0!==i?i:e.y-t.y}),i=0;i=2&&0>=r.cross3(s[s.length-2],s[s.length-1],t);)s.pop();s.push(t)}for(i=e.length-1;i>=0;i-=1){for(t=e[i];n.length>=2&&0>=r.cross3(n[n.length-2],n[n.length-1],t);)n.pop();n.push(t)}return n.pop(),s.pop(),n.concat(s)}},55973:e=>{function t(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}function i(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])}function n(e,t,n){return 0>=i(e,t,n)}/** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} */e.exports={decomp:function(e){var t=function e(t){for(var r=[],s=[],h=[],f=[],g=Number.MAX_VALUE,m=0;m=0&&n(o(e,t-1),o(e,t),o(e,r)))return!1;h=a(o(e,t),o(e,r));for(var s,h,c=0;c!==e.length;++c)if((c+1)%e.length!==t&&c!==t&&i(o(e,t),o(e,r),o(e,c+1))>=0&&n(o(e,t),o(e,r),o(e,c))&&(l[0]=o(e,t),l[1]=o(e,r),u[0]=o(e,c),u[1]=o(e,c+1),s=function(e,t,i){i=i||0;var n,r,s,a,o,h,c,l=[0,0];return n=e[1][1]-e[0][1],r=e[0][0]-e[1][0],s=n*e[0][0]+r*e[0][1],a=t[1][1]-t[0][1],o=t[0][0]-t[1][0],h=a*t[0][0]+o*t[0][1],p(c=n*o-a*r,0,i)||(l[0]=(o*s-r*h)/c,l[1]=(n*h-a*s)/c),l}(l,u),a(o(e,t),s)0?function e(t,i){if(0===i.length)return[t];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[t],r=0;rp)return console.warn("quickDecomp: max level ("+p+") reached."),s;for(var I=0;I0&&n(o(r,I-1),o(r,I),o(r,O-1))&&(y=f(o(r,I-1),o(r,I),o(r,O),o(r,O-1)),0>i(o(r,I+1),o(r,I),y)&&(E=a(r[I],y))0&&n(o(r,I+1),o(r,I),o(r,O))&&(y=f(o(r,I+1),o(r,I),o(r,O),o(r,O+1)),i(o(r,I-1),o(r,I),y)>0&&(E=a(r[I],y))T&&(T+=r.length),w=Number.MAX_VALUE,T=0&&n(o(r,I+1),o(r,I),o(r,O))&&(E=a(o(r,I),o(r,O)))3&&l>=0;--l)n=o(e,l-1),a=o(e,l),h=o(e,l+1),(t?(r[0]=a[0]-n[0],r[1]=a[1]-n[1],s[0]=h[0]-a[0],s[1]=h[1]-a[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))=1;--n)for(var r=e[n],s=n-1;s>=0;--s)if(i=e[s],p(r[0],i[0],t)&&p(r[1],i[1],t)){e.splice(n,1);continue}},makeCCW:function(e){for(var t=0,n=1;ne[t][0])&&(t=n);return!(i(o(e,t-1),o(e,t),o(e,t+1))>0)&&(function(e){for(var t=[],i=e.length,n=0;n!==i;n++)t.push(e.pop());for(var n=0;n!==i;n++)e[n]=t[n]}(e),!0)}};var r=[],s=[];function a(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function o(e,t){var i=e.length;return e[t<0?t%i+i:t%i]}function h(e,t,i,n){for(var r=i;ri(o(e,t-1),o(e,t),o(e,t+1))}var l=[],u=[];function d(e,t,i,n){var r=n||[];if(r.length=0,t{var n=new(i(83419))({initialize:function(e){this.pluginManager=e,this.game=e.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});e.exports=n},42363:e=>{e.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:e=>{/** @@ -3523,7 +3523,7 @@ * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83419),r=i(94811),s=i(95540),a=i(98840),o=i(44667),h=i(61340),c=i(70554),l=i(14500),u=i(29100),d=new n({Extends:u,initialize:function(e){var t=e.game.renderer,i=s(e,"fragShader",a);e.fragShader=c.parseFragmentShaderMaxTextures(i,t.maxTextures),e.vertShader=s(e,"vertShader",o),e.attributes=s(e,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),e.resizeUniform="uResolution",u.call(this,e),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this);var e=this.renderer;this.set1iv("uMainSampler",e.textureIndexes),this.set2f("uResolution",e.width,e.height)},batchSprite:function(e,t,i){this.manager.set(this,e);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,a=e.frame,o=a.glTexture,h=a.u0,l=a.v0,u=a.u1,d=a.v1,f=a.x,p=a.y,g=a.cutWidth,m=a.cutHeight,v=a.customPivot,y=e.displayOriginX,b=e.displayOriginY,x=-y+f,E=-b+p;if(e.isCropped){var w=e._crop;(w.flipX!==e.flipX||w.flipY!==e.flipY)&&a.updateCropUVs(w,e.flipX,e.flipY),h=w.u0,l=w.v0,u=w.u1,d=w.v1,g=w.width,m=w.height,f=w.x,p=w.y,x=-y+f,E=-b+p}var T=1,S=1;e.flipX&&(v||(x+=-a.realWidth+2*y),T=-1),e.flipY&&(v||(E+=-a.realHeight+2*b),S=-1);var A=e.x,C=e.y;t.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),r.applyITRS(A,C,e.rotation,e.scaleX*T,e.scaleY*S),n.copyFrom(t.matrix),i?(n.multiplyWithOffset(i,-t.scrollX*e.scrollFactorX,-t.scrollY*e.scrollFactorY),r.e=A,r.f=C):(r.e-=t.scrollX*e.scrollFactorX,r.f-=t.scrollY*e.scrollFactorY),n.multiply(r,s);var _=s.setQuad(x,E,x+g,E+m,t.renderRoundPixels),I=c.getTintAppendFloatAlpha,O=t.alpha,P=I(e.tintTopLeft,O*e._alphaTL),M=I(e.tintTopRight,O*e._alphaTR),R=I(e.tintBottomLeft,O*e._alphaBL),L=I(e.tintBottomRight,O*e._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(e,a);this.manager.preBatch(e),this.batchQuad(e,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,l,u,d,P,M,R,L,e.tintFill,o,D),this.manager.postBatch(e)},batchTexture:function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p,g,m,v,y,b,x,E,w,T,S,A,C,_,I,O,P,M,R){void 0===R&&(R=!1),this.manager.set(this,e);var L=this._tempMatrix1,D=this._tempMatrix2,k=this._tempMatrix3,N=v/i+C,F=y/n+_,B=(v+b)/i+C,U=(y+x)/n+_,V=a,G=o,j=-g,W=-m;if(e.isCropped){var Y=e._crop,H=Y.width,z=Y.height;V=H,G=z,a=H,o=z,v=Y.x,y=Y.y;var X=v,q=y;u&&(X=b-Y.x-H),d&&(q=x-Y.y-z),N=X/i+C,F=q/n+_,B=(X+H)/i+C,U=(q+z)/n+_,j=-g+v,W=-m+y}d^=!P&&t.isRenderTexture?1:0,u&&(V*=-1,j+=a),d&&(G*=-1,W+=o),I.roundPixels&&(r=Math.floor(r),s=Math.floor(s)),D.applyITRS(r,s,l,h,c),L.copyFrom(I.matrix),O?(L.multiplyWithOffset(O,-I.scrollX*f,-I.scrollY*p),D.e=r,D.f=s):(D.e-=I.scrollX*f,D.f-=I.scrollY*p),L.multiply(D,k);var K=k.setQuad(j,W,j+V,W+G,I.renderRoundPixels);null==M&&(M=this.setTexture2D(t)),e&&!R&&this.manager.preBatch(e),this.batchQuad(e,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],N,F,B,U,E,w,T,S,A,t,M),e&&!R&&this.manager.postBatch(e)},batchTextureFrame:function(e,t,i,n,r,s,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(s),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var l=h.setQuad(t,i,t+e.width,i+e.height),u=this.setTexture2D(e.source.glTexture);n=c.getTintAppendFloatAlpha(n,r),this.batchQuad(null,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e.u0,e.v0,e.u1,e.v1,n,n,n,n,0,e.glTexture,u)},batchFillRect:function(e,t,i,n,r,s){this.renderer.pipelines.set(this);var a=this.calcMatrix;s&&s.multiply(r,a);var o=a.setQuad(e,t,e+i,t+n),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(e,t,i,n,r,s,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var c=h.getX(e,t),l=h.getY(e,t),u=h.getX(i,n),d=h.getY(i,n),f=h.getX(r,s),p=h.getY(r,s),g=this.fillTint;this.batchTri(null,c,l,u,d,f,p,0,0,1,1,g.TL,g.TR,g.BL,2)},batchStrokeTriangle:function(e,t,i,n,r,s,a,o,h){var c=this.tempTriangle;c[0].x=e,c[0].y=t,c[0].width=a,c[1].x=i,c[1].y=n,c[1].width=a,c[2].x=r,c[2].y=s,c[2].width=a,c[3].x=e,c[3].y=t,c[3].width=a,this.batchStrokePath(c,a,!1,o,h)},batchFillPath:function(e,t,i){this.renderer.pipelines.set(this);var n,s,a=this.calcMatrix;i&&i.multiply(t,a);for(var o=e.length,h=this.polygonCache,c=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,d=0;d0&&V[4]?this.batchQuad(null,L,D,O,P,V[0],V[1],V[2],V[3],0,0,1,1,N,F,B,U,2):(G[0]=L,G[1]=D,G[2]=O,G[3]=P,G[4]=1),h&&G[4]?this.batchQuad(null,_,I,M,R,G[0],G[1],G[2],G[3],0,0,1,1,N,F,B,U,2):(V[0]=_,V[1]=I,V[2]=M,V[3]=R,V[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});e.exports=d},43439:(e,t,i)=>{/** + */var n=i(83419),r=i(94811),s=i(95540),a=i(98840),o=i(44667),h=i(61340),c=i(70554),l=i(14500),u=i(29100),d=new n({Extends:u,initialize:function(e){var t=e.game.renderer,i=s(e,"fragShader",a);e.fragShader=c.parseFragmentShaderMaxTextures(i,t.maxTextures),e.vertShader=s(e,"vertShader",o),e.attributes=s(e,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),e.resizeUniform="uResolution",u.call(this,e),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this);var e=this.renderer;this.set1iv("uMainSampler",e.textureIndexes),this.set2f("uResolution",e.width,e.height)},batchSprite:function(e,t,i){this.manager.set(this,e);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,a=e.frame,o=a.glTexture,h=a.u0,l=a.v0,u=a.u1,d=a.v1,f=a.x,p=a.y,g=a.cutWidth,m=a.cutHeight,v=a.customPivot,y=e.displayOriginX,b=e.displayOriginY,x=-y+f,E=-b+p;if(e.isCropped){var w=e._crop;(w.flipX!==e.flipX||w.flipY!==e.flipY)&&a.updateCropUVs(w,e.flipX,e.flipY),h=w.u0,l=w.v0,u=w.u1,d=w.v1,g=w.width,m=w.height,f=w.x,p=w.y,x=-y+f,E=-b+p}var T=1,S=1;e.flipX&&(v||(x+=-a.realWidth+2*y),T=-1),e.flipY&&(v||(E+=-a.realHeight+2*b),S=-1);var A=e.x,C=e.y;t.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),r.applyITRS(A,C,e.rotation,e.scaleX*T,e.scaleY*S),n.copyFrom(t.matrix),i?(n.multiplyWithOffset(i,-t.scrollX*e.scrollFactorX,-t.scrollY*e.scrollFactorY),r.e=A,r.f=C):(r.e-=t.scrollX*e.scrollFactorX,r.f-=t.scrollY*e.scrollFactorY),n.multiply(r,s);var _=s.setQuad(x,E,x+g,E+m,t.renderRoundPixels),I=c.getTintAppendFloatAlpha,O=t.alpha,P=I(e.tintTopLeft,O*e._alphaTL),M=I(e.tintTopRight,O*e._alphaTR),R=I(e.tintBottomLeft,O*e._alphaBL),L=I(e.tintBottomRight,O*e._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(e,a);this.manager.preBatch(e),this.batchQuad(e,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,l,u,d,P,M,R,L,e.tintFill,o,D),this.manager.postBatch(e)},batchTexture:function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p,g,m,v,y,b,x,E,w,T,S,A,C,_,I,O,P,M,R){void 0===R&&(R=!1),this.manager.set(this,e);var L=this._tempMatrix1,D=this._tempMatrix2,k=this._tempMatrix3,N=v/i+C,F=y/n+_,B=(v+b)/i+C,U=(y+x)/n+_,V=a,G=o,j=-g,W=-m;if(e.isCropped){var Y=e._crop,H=Y.width,z=Y.height;V=H,G=z,a=H,o=z,v=Y.x,y=Y.y;var X=v,K=y;u&&(X=b-Y.x-H),d&&(K=x-Y.y-z),N=X/i+C,F=K/n+_,B=(X+H)/i+C,U=(K+z)/n+_,j=-g+v,W=-m+y}d^=!P&&t.isRenderTexture?1:0,u&&(V*=-1,j+=a),d&&(G*=-1,W+=o),I.roundPixels&&(r=Math.floor(r),s=Math.floor(s)),D.applyITRS(r,s,l,h,c),L.copyFrom(I.matrix),O?(L.multiplyWithOffset(O,-I.scrollX*f,-I.scrollY*p),D.e=r,D.f=s):(D.e-=I.scrollX*f,D.f-=I.scrollY*p),L.multiply(D,k);var q=k.setQuad(j,W,j+V,W+G,I.renderRoundPixels);null==M&&(M=this.setTexture2D(t)),e&&!R&&this.manager.preBatch(e),this.batchQuad(e,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],N,F,B,U,E,w,T,S,A,t,M),e&&!R&&this.manager.postBatch(e)},batchTextureFrame:function(e,t,i,n,r,s,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(s),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var l=h.setQuad(t,i,t+e.width,i+e.height),u=this.setTexture2D(e.source.glTexture);n=c.getTintAppendFloatAlpha(n,r),this.batchQuad(null,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e.u0,e.v0,e.u1,e.v1,n,n,n,n,0,e.glTexture,u)},batchFillRect:function(e,t,i,n,r,s){this.renderer.pipelines.set(this);var a=this.calcMatrix;s&&s.multiply(r,a);var o=a.setQuad(e,t,e+i,t+n),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(e,t,i,n,r,s,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var c=h.getX(e,t),l=h.getY(e,t),u=h.getX(i,n),d=h.getY(i,n),f=h.getX(r,s),p=h.getY(r,s),g=this.fillTint;this.batchTri(null,c,l,u,d,f,p,0,0,1,1,g.TL,g.TR,g.BL,2)},batchStrokeTriangle:function(e,t,i,n,r,s,a,o,h){var c=this.tempTriangle;c[0].x=e,c[0].y=t,c[0].width=a,c[1].x=i,c[1].y=n,c[1].width=a,c[2].x=r,c[2].y=s,c[2].width=a,c[3].x=e,c[3].y=t,c[3].width=a,this.batchStrokePath(c,a,!1,o,h)},batchFillPath:function(e,t,i){this.renderer.pipelines.set(this);var n,s,a=this.calcMatrix;i&&i.multiply(t,a);for(var o=e.length,h=this.polygonCache,c=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,d=0;d0&&V[4]?this.batchQuad(null,L,D,O,P,V[0],V[1],V[2],V[3],0,0,1,1,N,F,B,U,2):(G[0]=L,G[1]=D,G[2]=O,G[3]=P,G[4]=1),h&&G[4]?this.batchQuad(null,_,I,M,R,G[0],G[1],G[2],G[3],0,0,1,1,N,F,B,U,2):(V[0]=_,V[1]=I,V[2]=M,V[3]=R,V[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});e.exports=d},43439:(e,t,i)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4780,7 +4780,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */e.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i(85454)})(),t.exports=n()},{"57a99fe9b8471a10":"4VGCc"}],"4VGCc":[function(e,t,i){},{}],e7OdC:[function(e,t,i){t.exports.FPSCounter=class{constructor(e){this.lastFrameTime=performance.now(),this.frameCount=0,this.fpsDisplay=e.createElementWithStyles("div","fps-counter",{padding:"0 20px",background:"#000",color:"#00ff00"}),e.getElement(".header").appendChild(this.fpsDisplay)}updateFPS(){let e=performance.now(),t=e-this.lastFrameTime;this.lastFrameTime=e;let i=Math.round(1e3/t);this.frameCount++,0==this.frameCount%60&&(this.fpsDisplay.textContent="FPS: "+i),requestAnimationFrame(this.updateFPS.bind(this))}start(){this.updateFPS()}}},{}],izuLV:[function(e,t,i){let n="objects.";t.exports.ObjectsConst={OBJECT_ANIMATION:"oa",OBJECT_INTERACTION:"oi",TYPE_OBJECT:"obj",TYPE_ANIMATION:"anim",TYPE_NPC:"npc",TYPE_ENEMY:"enemy",TYPE_TRADER:"trader",TYPE_DROP:"drop",DYNAMIC_ANIMATION:"dyn",MESSAGE:{DATA_VALUES:{NAMESPACE:"objects"}},EVENT_PREFIX:{BASE:"bo",ANIMATION:"ao",DROP:"dep",ENEMY:"eo",NPC:"npc",TRADER:"tnpc"},SNIPPETS:{PREFIX:n,NPC_INVALID:n+"npcInvalid",TRADER:{CONTENT:n+"trader.content",OPTIONS:{BUY:n+"trader.options.buy",SELL:n+"trader.options.sell"},BUY_CONFIRMED:n+"trader.buyConfirmed",SELL_CONFIRMED:n+"trader.sellConfirmed"}},DEFAULTS:{BASE_OBJECT:{CONTENT:"",OPTIONS:{}},TRADER_OBJECT:{INVENTORY_MAP:{buy:"A",sell:"B"},OPTIONS:{BUY:"buy",SELL:"sell"}},TARGETS:{OBJECT:0,PLAYER:1}},TRADE_ACTIONS_FUNCTION_NAME:{ADD:"add",REMOVE:"remove",CONFIRM:"confirm",DISCONFIRM:"disconfirm",CANCEL:"cancel"},TRADE_ACTIONS:{SUB_ACTION:"sub",ADD:"ta",REMOVE:"tr",CONFIRM:"tc",DISCONFIRM:"td"},DROPS:{KEY:"drp",REMOVE:"drmv",PARAMS:"drpp",ASSET_KEY:"dk",PICK_UP_ACT:"rpu",ASSETS_PATH:"/assets/custom/sprites/",FILE:"df",TYPE:"dt"}}},{}],"7XAJ0":[function(e,t,i){let{PlayerEngine:n}=e("ad34e884dd74ab75"),{SceneDynamic:r}=e("8c3cc377813bccbe"),{ScenePreloader:s}=e("eb7c0f886bf8e7c7"),{GameConst:a}=e("dd0538535f6f136a"),{ErrorManager:o,Logger:h,sc:c}=e("2b2fa27d8710e574");t.exports.RoomEvents=class{constructor(e,t){this.room=!1,this.sceneData=!1,this.scenePreloader=!1,this.playersOnAddCallback=!1,this.playersOnRemoveCallback=!1,this.playersQueue={},this.gameManager=t,this.gameEngine=t.gameEngine,this.roomName=e,this.events=t.events,this.objectsUi={},this.tradeUi={},this.gameOverRetries=0,this.gameOverMaxRetries=0,this.gameOverRetryTime=200,this.automaticallyCloseAllDialogsOnSceneChange=t.config.getWithoutLogs("client/rooms/automaticallyCloseAllDialogsOnSceneChange",!0)}async activateRoom(e,t=!1){await this.events.emit("reldens.activateRoom",e,this.gameManager),this.room=e,this.playersOnAddCallback=this.room.state.players.onAdd((e,i)=>{this.checkAndCreateScene(),this.playersOnAdd(e,i,t),this.listenPlayerAndStateChanges(e,i)}),this.playersOnRemoveCallback=this.room.state.players.onRemove((e,t)=>{this.playersOnRemove(e,t)}),this.room.onMessage("*",async e=>{await this.roomOnMessage(e)}),this.room.onLeave(e=>{this.roomOnLeave(e)})}listenPlayerAndStateChanges(e,t){let i=this.gameManager.getCurrentPlayer().player_id,n=Object.keys(e),r=Object.keys(e.state);for(let i of n)e.listen(i,i=>{this.playersOnChange(e,t,"playerChange")});for(let n of r)e.state.listen(n,r=>{if(e.state[n]=r,this.playersOnChange(e,t,"playerChange"),"inState"===n&&e.player_id===i){if(a.STATUS.DEATH===r)return this.showGameOverBox();this.hideGameOverBox()}})}checkAndCreateScene(){if(!this.room.state||this.room.state.sceneData===this.sceneData||(this.sceneData=c.toJson(this.room.state.sceneData),this.gameEngine.scene.getScene(this.roomName)))return;let e=this.createSceneInstance(this.roomName,this.sceneData,this.gameManager);this.gameEngine.scene.add(this.roomName,e,!1)}async playersOnAdd(e,t,i){await this.events.emit("reldens.playersOnAdd",e,t,i,this);let n={x:e.state.x,y:e.state.y,dir:e.state.dir,playerName:e.playerName,avatarKey:e.avatarKey,playedTime:e.playedTime,player_id:e.player_id};if(this.isCurrentPlayer(t))return await this.createCurrentPlayer(e,i,t);this.addOtherPlayers(e,t,n)}isCurrentPlayer(e){return e===this.room.sessionId}addOtherPlayers(e,t,i){if(!this.engineStarted)return this.playersQueue[t]=i,!1;let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;n.player.addPlayer(t,i)}async createCurrentPlayer(e,t,i){this.engineStarted=!0,await this.startEngineScene(e,this.room,t);let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;for(let r of(await this.events.emit("reldens.playersQueueBefore",e,i,t,this),Object.keys(this.playersQueue)))n.player.addPlayer(r,this.playersQueue[r]);let r={player:e,key:i,previousScene:t,roomEvents:this};return await this.events.emit("reldens.createCurrentPlayer",r),r}isValidScene(e,t){return e.key===t.state.scene&&e.player&&e.player.players}playersOnChange(e,t,i){if(e.state.scene!==this.roomName){e.player_id!==this.gameManager.getCurrentPlayer().player_id||this.gameManager.isChangingScene||h.info("Player scene miss match.",{currentScene:this.roomName,playerSceneOnState:e?.state.scene,player:e?.sessionId,currentPlayer:this.gameManager.getCurrentPlayer()?.playerId,isChangingScene:this.gameManager.isChangingScene});return}let n=this.getActiveScene();this.playerExists(n,t)&&n.player.updatePlayer(t,e)}playersOnRemove(e,t){return(this.events.emitSync("reldens.playersOnRemove",e,t,this),t===this.room.sessionId)?this.gameOverReload():this.removePlayerByKey(t)}removePlayerByKey(e){let t=this.getActiveScene();this.playerExists(t,e)&&(t.player.removePlayer(e),t.player.currentTarget?.id===e&&this.gameEngine.clearTarget())}gameOverReload(){let e={confirmed:!0};this.events.emitSync("reldens.gameOverReload",this,e),!this.gameManager.gameOver&&e.confirmed&&this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.sessionEnded"))}playerExists(e,t){return e.player&&c.hasOwn(e.player.players,t)}async roomOnMessage(e){await this.runGameOver(e),await this.runRevived(e),await this.runChangeScene(e),await this.runReconnect(e),await this.runUpdateStats(e),await this.runInitUi(e),await this.closeBox(e),await this.runCustomMessageListener(e)}async runInitUi(e){if(e.act!==a.UI||!e.id)return!1;await this.events.emit("reldens.initUiBefore",e,this),this.initUi(e),await this.events.emit("reldens.initUiAfter",e,this)}async closeBox(e){if(a.CLOSE_UI_ACTION!==e.act||!e.id)return!1;let t=this.gameManager.gameDom.getElement("#box-"+e.id+" .box-close");return t?(t.click(),!0):(h.error('Box could not be closed ID "'+e.id+'".'),!1)}async runCustomMessageListener(e){let t=c.get(e,"listener","");if(""===t)return!1;let i=this.gameManager.config.get("client/message/listeners",{}),n=this.gameManager.config.get("client/customClasses/message/listeners",{}),r=c.get(n,t,!1);return(r||(r=c.get(i,t,!1)),r)?c.isFunction(r.executeClientMessageActions)?void r.executeClientMessageActions({message:e,roomEvents:this}):(h.error('Listener is missing "executeClientMessageActions" method.',r),!1):(h.error('Listener "'+t+'" is missing.'),!1)}async runUpdateStats(e){return e.act===a.PLAYER_STATS&&(await this.events.emit("reldens.playerStatsUpdateBefore",e,this),await this.updatePlayerStats(e))}async runReconnect(e){if(e.act!==a.RECONNECT)return!1;await this.events.emit("reldens.beforeReconnectGameClient",e,this),await this.gameManager.reconnectGameClient(e,this.room)}async runChangeScene(e){if(e.act===a.CHANGING_SCENE&&this.room.sessionId===e.id&&(this.gameManager.isChangingScene=!0,this.closeAllActiveDialogs(),this.gameManager.getActiveScene().scene.setVisible(!1)),e.act!==a.CHANGED_SCENE||e.scene!==this.room.name||this.room.sessionId===e.id)return!1;await this.events.emit("reldens.startChangedScene",{message:e,roomEvents:this});let t=this.getActiveScene(),{id:i,x:n,y:r,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}=e,u=this.gameManager.config.get("client/players/size/topOffset"),d=this.gameManager.config.get("client/players/size/leftOffset");t.player.addPlayer(i,{x:n-d,y:r-u,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}),this.gameManager.isChangingScene=!1,await this.events.emit("reldens.endChangedScene",{message:e,roomEvents:this})}closeAllActiveDialogs(){if(!this.automaticallyCloseAllDialogsOnSceneChange)return;let e=this.gameManager.gameDom.getElements(".box-close");if(0!==e.length)for(let t of e)t.click()}async runRevived(e){if(e.act!==a.REVIVED)return!1;this.gameManager.gameDom.getElement("#game-over").classList.add("hidden");let t=this.gameManager.getCurrentPlayer(),i=c.get(t.players,e.t,!1);if(!i)return!1;i.visible=!0,c.hasOwn(i,"nameSprite")&&i.nameSprite&&(i.nameSprite.visible=!0),this.getActiveScene().stopOnDeathOrDisabledSent=!1}async runGameOver(e){if(e.act!==a.GAME_OVER)return!1;try{await this.events.emit("reldens.runGameOver",{message:e,defaultBehavior:!0,roomEvents:this}),await this.events.emit("reldens.gameOver",e,this),this.gameManager.gameOver=!0;let t=this.gameManager.getCurrentPlayer();if(!t)return this.gameOverRetriesthis.runGameOver(e),this.gameOverRetryTime),this.gameOverRetries++),!1;t.players[t.playerId].visible=!1,this.showGameOverBox()}catch(t){return setTimeout(()=>this.runGameOver(e),200),this.gameOverRetries++,!1}}showGameOverBox(){return this.displayGameOverBox(!0)}hideGameOverBox(){return this.displayGameOverBox(!1)}displayGameOverBox(e){h.debug("Display game over box: "+(e?"yes":"no")+".");let t=this.gameManager.gameDom.getElement("#game-over");return t?e?(t.classList.remove("hidden"),!0):(t.classList.add("hidden"),!1):(h.debug("GameOver box element not found."),!1)}async roomOnLeave(e){!this.isAbnormalShutdown(e)||this.gameManager.gameOver||this.gameManager.forcedDisconnection||(h.error("There was a connection error.",{code:e,isGameOver:this.gameManager.gameOver,isForcedDisconnection:this.gameManager.forcedDisconnection}),this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.serverDown"))),await this.events.emit("reldens.playerLeftScene",{code:e,roomEvents:this})}isAbnormalShutdown(e){return 1001<=e&&1015>=e}async updatePlayerStats(e){if(!c.hasOwn(e,"stats")||!e.stats)return!1;let t=this.getActiveScene();if(!t.player||!c.hasOwn(t.player.players,this.room.sessionId))return h.error("Player not available.",this.room,t),!1;t.player.players[this.room.sessionId].stats=e.stats,this.gameManager.playerData.stats=e.stats,this.gameManager.playerData.statsBase=e.statsBase;let i=this.gameManager.getUiElement("playerStats");if(!i)return!1;let n=i.getChildByProperty("id","player-stats-container");if(!n)return!1;let r=this.gameEngine.uiScene.cache.html.get("playerStat");for(let t of(n.innerHTML="",Object.keys(e.stats))){let i=c.get(this.gameManager.config.client.players.initialStats[t],"data",!1),s=i&&c.get(i,"showBase",!1)?" / "+e.statsBase[t]:"",a=this.gameManager.gameEngine.parseTemplate(r,{statLabel:t,statValue:e.stats[t]+s});n.innerHTML=n.innerHTML+a}await this.events.emit("reldens.playerStatsUpdateAfter",e,this)}initUi(e){let t=this.gameEngine.uiScene;if(!t||!c.hasOwn(t.elementsUi,e.id))return h.error("User interface not found on UI Scene: "+e.id),!1;let i=t.elementsUi[e.id];this.uiSetTitle(i,e),this.uiSetContent(i,e,t);let n=i.getChildByID("box-"+e.id),r=e.keepCurrentDisplay&&"none"===n.style.display;n.style.display=r?"none":"block",i.setDepth(2),this.gameManager.config.get("client/ui/uiTarget/hideOnDialog")&&this.gameEngine.clearTarget()}uiSetTitleAndContent(e,t,i){this.uiSetTitle(e,t),this.uiSetContent(e,t,i)}uiSetTitle(e,t){let i=c.get(t,"title",!1);if(!1===i)return!1;let n=e.getChildByProperty("className","box-title");if(!n)return!1;n.innerHTML=i}uiSetContent(e,t,i){let n=c.get(t,"content",!1);if(!1===n)return!1;let r=e.getChildByProperty("className","box-content");if(!r)return!1;r.innerHTML=n,this.uiSetContentOptions(i,t,r)}uiSetContentOptions(e,t,i){if(!t.options)return!1;let n=e.cache.html.get("uiOptionsContainer"),r=this.gameManager.gameEngine.parseTemplate(n,{id:"ui-"+t.id});i.innerHTML+=r;let s=Object.keys(t.options);if(0===s.length)return!1;for(let i of s){let{label:n,value:r,icon:s}=t.options[i],o=s?"Icon":"Button",h=e.cache.html.get("uiOption"+o),l={id:i,object_id:t.id,label:n,value:r,icon:"/assets/custom/items/"+s+a.FILES.EXTENSIONS.PNG},u=this.gameManager.gameEngine.parseTemplate(h,l);this.gameManager.gameDom.appendToElement("#ui-"+t.id,u);let d="#opt-"+i+"-"+t.id;this.gameManager.gameDom.getElement(d)?.addEventListener("click",e=>{let i={id:t.id,act:a.BUTTON_OPTION,value:e.target.getAttribute("data-option-value")};Object.assign(i,c.get(t,"overrideSendOptions",{})),this.send(i)})}}async startEngineScene(e,t,i=!1){await this.events.emit("reldens.startEngineScene",this,e,t,i);let n=!1;this.gameEngine.uiScene||(n=!0);let r=a.SCENE_PRELOADER+this.sceneData.roomName;this.gameEngine.scene.getScene(r)?await this.createEngineOnScene(r,e,t,i):await this.createPreloaderAndScene(r,n,e,t,i)}async createEngineOnScene(e,t,i,n){this.getActiveScene().objectsAnimationsData=this.sceneData.objectsAnimationsData,this.scenePreloader=this.gameEngine.scene.getScene(e),await this.events.emit("reldens.createdPreloaderRecurring",this,this.scenePreloader),await this.createEngineScene(t,i,n)}async createPreloaderAndScene(e,t,i,n,r){this.scenePreloader=this.createPreloaderInstance({name:e,map:this.sceneData.roomMap,images:this.sceneData.sceneImages,uiScene:t,gameManager:this.gameManager,preloadAssets:this.sceneData.preloadAssets,objectsAnimationsData:this.sceneData.objectsAnimationsData}),this.gameEngine.scene.add(e,this.scenePreloader,!0),await this.events.emit("reldens.createdPreloaderInstance",this,this.scenePreloader);let s=this.gameEngine.scene.getScene(e);s.load.on("complete",async()=>{this.gameEngine.uiScene||(this.gameEngine.uiScene=s,this.showPlayerName(this.gameManager.playerData.id+" - "+this.gameManager.playerData.name)),await this.createEngineScene(i,n,r)})}showPlayerName(e){let t=this.gameManager.getUiElement("playerBox");if(!t)return!1;let i=t.getChildByProperty("className","player-name");if(!i)return!1;i.innerHTML=e}async createEngineScene(e,t,i){let n=this.gameEngine.scene.getScene(i);n&&n.scene.setVisible(!1),await this.events.emit("reldens.createEngineScene",e,t,i,this),this.gameManager.room?await this.destroyPreviousScene(i,e):this.gameEngine.scene.start(e.state.scene),this.gameManager.room=t;let r=this.gameEngine.scene.getScene(e.state.scene);r.player=this.createPlayerEngineInstance(r,e,this.gameManager,t),r.player.create(),this.addExistentPlayers(t,r),this.updateSceneLabel(this.sceneData.roomTitle),this.send({act:a.PLAYER_STATS}),this.send({act:a.CLIENT_JOINED});let s={player:r.player,previousScene:i,roomEvents:this};await this.events.emit("reldens.playersOnAddReady",s);let o={currentScene:r,previousScene:i,roomEvents:this};return await this.events.emit("reldens.createEngineSceneDone",o),o}addExistentPlayers(e,t){if(0===this.playersCountFromState(e))return!1;for(let i of this.playersKeysFromState(e)){let n=this.playerBySessionIdFromState(e,i);if(!n.sessionId||n.sessionId===e.sessionId)continue;let r={x:n.state.x,y:n.state.y,dir:n.state.dir,playerName:n.playerName,playedTime:n.playedTime,avatarKey:n.avatarKey,player_id:n.player_id};t.player.addPlayer(n.sessionId,r)}}playerBySessionIdFromState(e,t){return e.state.players.get(t)}playersCountFromState(e){return e.state.players.size}playersKeysFromState(e){return Array.from(e.state.players.keys())}async destroyPreviousScene(e,t){if(!e)return h.warning("Missing previous scene data.",e),!1;let i=this.gameEngine.scene.getScene(e);if(!i)return h.warning("Missing previous scene instance.",i),!1;await i.changeScene(),this.gameEngine.scene.stop(e),this.gameEngine.scene.start(t.state.scene)}updateSceneLabel(e){let t=this.gameManager.getUiElement("sceneLabel");if(!t)return!1;let i=t.getChildByProperty("className","scene-label");if(!i)return!1;i.innerHTML=e}getActiveScene(){return this.gameEngine.scene.getScene(this.roomName)}createSceneInstance(e,t,i){return new r(e,t,i)}createPlayerEngineInstance(e,t,i,r){return new n({scene:e,playerData:t,gameManager:i,room:r,roomEvents:this})}createPreloaderInstance(e){return new s(e)}send(e,t){try{return(this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSED||this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSING)&&o.error("Connection lost."),t||(t="*"),this.room.send(t,e),!0}catch(t){h.critical(t.message,e)}this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.connectionLost"))}}},{ad34e884dd74ab75:"3GkIQ","8c3cc377813bccbe":"6Vn5m",eb7c0f886bf8e7c7:"45YPY",dd0538535f6f136a:"93TbC","2b2fa27d8710e574":"3lwy5"}],"3GkIQ":[function(e,t,i){let{SpriteTextFactory:n}=e("94c0b713770985e9"),{GameConst:r}=e("c99c71c42a9e0f59"),{ActionsConst:s}=e("51d102aa478bf778"),{Logger:a,sc:o}=e("369ffb9744f96759");t.exports.PlayerEngine=class{constructor(e){let{scene:t,playerData:i,gameManager:n,room:r,roomEvents:s}=e;this.scene=t,this.config=n.config,this.gameManager=n,this.events=n.events,this.playerName=i.playerName,this.avatarKey=i.avatarKey,this.roomName=i.state.scene,this.state=i.state,this.room=r,this.roomEvents=s,this.playerId=r.sessionId,this.player_id=i.player_id,this.players={},this.playedTime=i.playedTime,this.mov=!1,this.dir=!1,this.currentTarget=!1,this.pointsValidator=!1,this.animationBasedOnPress=this.config.get("client/players/animations/basedOnPress"),this.topOff=this.config.get("client/players/size/topOffset"),this.leftOff=this.config.get("client/players/size/leftOffset"),this.collideWorldBounds=this.config.get("client/players/animations/collideWorldBounds"),this.fadeDuration=Number(this.config.get("client/players/animations/fadeDuration")),this.cameraRoundPixels=!!this.config.getWithoutLogs("client/general/engine/cameraRoundPixels",!0),this.cameraInterpolationX=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationX",.02)),this.cameraInterpolationY=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationY",.02)),this.globalConfigNameText=this.config.get("client/ui/players/nameText"),this.globalConfigShowNames=!!this.config.get("client/ui/players/showNames"),this.globalConfigShowNamesLimit=this.config.getWithoutLogs("client/ui/players/showNamesLimit",10),this.defaultActionKeyConfig=this.config.get("client/ui/controls/defaultActionKey"),this.highlightOnOver=!!this.config.getWithoutLogs("client/ui/players/highlightOnOver",!0),this.highlightColor=this.config.getWithoutLogs("client/ui/players/highlightColor","0x00ff00"),this.lastKeyState={}}create(){let e={x:this.state.x,y:this.state.y,dir:this.state.dir,playerName:this.playerName,avatarKey:this.avatarKey,playedTime:this.playedTime,player_id:this.player_id};this.addPlayer(this.playerId,e),this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.scene.setVisible(!0,this.roomName),this.scene.cameras.main.fadeFrom(this.fadeDuration),this.scene.physics.world.fixedStep=!1,this.scene.physics.world.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setIsSceneCamera(!0),this.scene.cameras.main.on("camerafadeincomplete",()=>{this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.cameras.main.setLerp(this.cameraInterpolationX,this.cameraInterpolationY),this.scene.cameras.main.setRoundPixels(this.cameraRoundPixels)})}addPlayer(e,t){if(o.hasOwn(this.players,e))return this.players[e];let{x:i,y:n,dir:r,playerName:s,avatarKey:a,playedTime:h,player_id:c}=t,l=this.gameManager.mappedAvatars[a];return this.players[e]=this.scene.physics.add.sprite(i,n-this.topOff,l),this.players[e].playerName=s,this.players[e].playedTime=h,this.players[e].avatarKey=a,this.players[e].playerId=e,this.players[e].player_id=c,this.players[e].anims.play(l+"_"+r),this.players[e].anims.stop(),this.showPlayerName(e),this.makePlayerInteractive(e),this.players[e].moveSprites={},this.players[e].setDepth(this.players[e].y+this.players[e].body.height),this.players[e].setCollideWorldBounds(this.collideWorldBounds),this.events.emitSync("reldens.playerEngineAddPlayer",this,e,t),this.players[e]}makePlayerInteractive(e){this.players[e].setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(r.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;this.setTargetPlayerById(e)}),this.highlightOnOver&&(this.players[e].on("pointerover",()=>{this.players[e].setTint(this.highlightColor)}),this.players[e].on("pointerout",()=>{this.players[e].clearTint()}))}setTargetPlayerById(e){if(!o.get(this.players,e,!1))return a.info('Target player ID "'+e+'" was not found.'),this.gameManager.gameEngine.clearTarget(),!1;let t=Object.assign({},this.currentTarget);this.currentTarget={id:e,type:r.TYPE_PLAYER,player_id:this.players[e].player_id},this.gameManager.gameEngine.showTarget(this.players[e].playerName,this.currentTarget,t)}showPlayerName(e){if(!this.globalConfigShowNames)return!1;if(!this.players[e])return a.critical('Player ID "'+e+'" not found.',this.players),!1;let t=this.players[e].playerName;if(!t)return a.critical('Player name not found on player ID "'+e+'".',this.players[e]),!1;n.attachTextToSprite(this.players[e],this.applyNameLengthLimit(t),this.globalConfigNameText,this.topOff,"nameSprite",this.scene)}applyNameLengthLimit(e){return 0this.globalConfigShowNamesLimit&&(e=e.slice(0,this.globalConfigShowNamesLimit)+"..."),e}updatePlayer(e,t){let i=this.players[e];if(!i){a.error("PlayerSprite not defined.",this.players,e);return}if(a.debug('Updating player ID "'+e+'". - Current player ID "'+this.player_id+'".'),this.scene.clientInterpolation){this.scene.interpolatePlayersPosition[e]=t.state;return}this.processPlayerPositionAnimationUpdate(i,t.state,e,t.state.x-this.leftOff,t.state.y-this.topOff)}processPlayerPositionAnimationUpdate(e,t,i,n=0,s=0){if(a.debug("Process player position animation update.",{playerSprite:e,playerState:t,playerId:i,newX:n,newY:s}),!e){a.error("Missing player sprite to process animation update.",e,t,i);return}if(!t){a.error("Missing player state to process animation update.",e,t,i);return}if(!i){a.error("Missing player ID to process animation update.",e,t,i);return}if(0!==Object.keys(this.scene.interpolatePlayersPosition).length){if(r.STATUS.DEATH===t.inState||r.STATUS.DISABLED===t.inState){delete this.scene.interpolatePlayersPosition[i];return}this.playPlayerAnimation(e,t,i),this.stopPlayerAnimation(e,t),this.updateSpritePosition(e,n,s),this.updatePlayerState(e,t,i)}}updatePlayerState(e,t,i){let n=e.y+e.body.height;e.depth!==n&&e.setDepth(n),this.events.emitSync("reldens.runPlayerAnimation",this,i,t,e),this.updateNamePosition(e),this.moveAttachedSprites(e,n)}updateSpritePosition(e,t,i){e.x!==t&&(e.x=t),e.y!==i&&(e.y=i)}updateNamePosition(e){if(!this.globalConfigShowNames||!e.nameSprite)return!1;let t=n.getTextPosition(e,this.applyNameLengthLimit(e.playerName),this.globalConfigNameText,this.topOff);e.nameSprite.x=t.x,e.nameSprite.y=t.y}moveAttachedSprites(e,t){let i=Object.keys(e.moveSprites);if(0===i.length)return!1;for(let n of i){let i=e.moveSprites[n];if(i.x===e.x&&i.y===e.y)continue;i.x=e.x,i.y=e.y;let r=t+("above"===o.get(i,"depthByPlayer","")?1:-.1);a.debug('Sprite "'+n+'" new depth: '+r+".",i),i.setDepth(r)}}playPlayerAnimation(e,t,i){if(this.isDeath(t)||this.isDisabled(t))return a.debug('Player with ID "'+i+'" is disabled to play the animation.',t),!1;a.debug("Play player animation.",e.avatarKey,t);let n=this.gameManager.mappedAvatars[e.avatarKey];if(this.animationBasedOnPress){let i=n+"_"+t.dir;return t.x===e.x&&t.y===e.y?(a.debug('Player has not changed, skipped animation "'+i+'".'),!1):(a.debug("Animation played based on press active.",n,{x:t.x+" / "+e.x,y:t.y+" / "+e.y}),void e.anims.play(i,!0))}if(t.x!==e.x){let i=t.x{this.transition=!1,this.gameManager.gameDom.activeElement().blur(),this.minimap.createMap(this,this.gameManager.getCurrentPlayerAnimation()),this.gameManager.isChangingScene=!1}),this.eventsManager.emitSync("reldens.afterSceneDynamicCreate",this)}update(e,t){this.interpolatePositions(),this.movePlayerByPressedButtons()}disableContextMenu(){if(!this.gameManager.config.get("client/ui/controls/disableContextMenu"))return!1;this.gameManager.gameDom.getDocument().addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()})}setupKeyboardAndPointerEvents(){this.input.keyboard.on("keydown",e=>this.executeKeyDownBehavior(e)),this.input.keyboard.on("keyup",e=>{this.executeKeyUpBehavior(e)}),this.input.on("pointerdown",(e,t)=>this.executePointerDownAction(e,t))}async createSceneMap(){for(let e of(this.map=this.make.tilemap({key:this.params.roomName}),this.params.sceneImages)){let t=this.map.addTilesetImage(this.params.roomName,e);t||c.critical("Tileset creation error. Check if the tileset name equals the imageKey without the extension.",{roomName:this.params.roomName,imageKeys:this.params.sceneImages,createdTileset:t}),this.tilesets.push(t)}this.registerLayers(),this.registerTilesetAnimation()}registerTilesetAnimation(){for(let e of this.tilesets)if(this.hasTilesetAnimations(e))for(let t of(this.useTsAnimation=!0,Object.keys(this.layers))){let i=this.layers[t],n=new s;n.register(i,e),n.start(),this.tilesetAnimations.push(n)}}hasTilesetAnimations(e){let t=e?.tileData||{},i=Object.keys(t);if(0===i.length)return!1;for(let e of i)if(t[e].animation)return!0;return!1}executeKeyDownBehavior(e){if(this.gameManager.gameDom.insideInput())return!1;if(r.Keyboard.KeyCodes.SPACE===e.keyCode&&!this.gameManager.gameDom.insideInput()){if(!this.player)return;this.player.runActions()}r.Keyboard.KeyCodes.ESC===e.keyCode&&this.gameManager.gameEngine.clearTarget(),r.Keyboard.KeyCodes.F5===e.keyCode&&(this.gameManager.forcedDisconnection=!0)}executeKeyUpBehavior(e){this.player&&-1!==this.availableControllersKeyCodes().indexOf(e.keyCode)&&this.player.stop()}createControllerKeys(){this.keyLeft=this.input.keyboard.addKey(r.Keyboard.KeyCodes.LEFT),this.keyA=this.input.keyboard.addKey(r.Keyboard.KeyCodes.A),this.keyRight=this.input.keyboard.addKey(r.Keyboard.KeyCodes.RIGHT),this.keyD=this.input.keyboard.addKey(r.Keyboard.KeyCodes.D),this.keyUp=this.input.keyboard.addKey(r.Keyboard.KeyCodes.UP),this.keyW=this.input.keyboard.addKey(r.Keyboard.KeyCodes.W),this.keyDown=this.input.keyboard.addKey(r.Keyboard.KeyCodes.DOWN),this.keyS=this.input.keyboard.addKey(r.Keyboard.KeyCodes.S);let e=this.availableControllersKeyCodes();for(let t of this.gameManager.gameDom.getElements("input"))this.addAndRemoveCapture(e,t)}addAndRemoveCapture(e,t){this.loopKeysAddListenerToElement(e,t,"focusin","removeCapture"),this.loopKeysAddListenerToElement(e,t,"click","removeCapture"),this.loopKeysAddListenerToElement(e,t,"focusout","addCapture"),this.loopKeysAddListenerToElement(e,t,"blur","addCapture")}availableControllersKeyCodes(){return[r.Keyboard.KeyCodes.LEFT,r.Keyboard.KeyCodes.A,r.Keyboard.KeyCodes.RIGHT,r.Keyboard.KeyCodes.D,r.Keyboard.KeyCodes.UP,r.Keyboard.KeyCodes.W,r.Keyboard.KeyCodes.DOWN,r.Keyboard.KeyCodes.S]}executePointerDownAction(e,t){if(0{u.destroy()}})}updatePointerObject(e){if(!this.configManager.get("client/ui/pointer/show"))return;this.arrowSprite&&this.arrowSprite.destroy();let t=this.configManager.get("client/ui/pointer/topOffSet",16);this.arrowSprite=this.physics.add.sprite(e.worldX,e.worldY-t,o.ARROW_DOWN),this.arrowSprite.setDepth(5e5),this.arrowSprite.anims.play(o.ARROW_DOWN,!0).on("animationcomplete",()=>{this.arrowSprite.destroy()})}getAnimationByKey(e){return this.anims&&this.anims?.anims&&this.anims?.anims?.entries?l.get(this.anims.anims.entries,e,!1):(c.error("Animations not loaded.",this.anims),!1)}getObjectFromExtraData(e,t,i){let n=!1,r=e+"K",s=t[e+"T"]===h.DATA_TYPE_VALUE_PLAYER;return!s&&l.hasOwn(this.objectsAnimations,t[r])&&(n=this.objectsAnimations[t[r]]),s&&l.hasOwn(i.players,t[r])&&(n=i.players[t[r]]),n}loopKeysAddListenerToElement(e,t,i,n){t.addEventListener(i,()=>{for(let t of e)this.input.keyboard[n](t)})}}},{c5f254ffb1f1868:"8S6DV","648aa76284c65b04":"4prPd","3e4f1f0221386850":"1LEsD","43a627027f5eb0e5":"93TbC",f368cde667056257:"59VA7","1c07ccf976c90508":"3lwy5"}],"4prPd":[function(e,t,i){t.exports.TileSetAnimation=class{constructor(e){this.timer=e?.timer}register(e,t){for(let i of(this.animations=[],this.registered={},this.layer=e,this.tileset=t,Object.keys(t.tileData))){let e=t.tileData[i];if(!e.animation)continue;e.id=i;let n=0;for(let t of e.animation){if(Number(i)===Number(t?.tileid||0)){e.initIndex=n;break}n++}this.animations.push(e)}}start(){for(let e of this.animations){let t=e.animation.length,i=Number(e.initIndex||0),n=Number((i+1)%t);this.repeat(e,i,n)}}repeat(e,t,i){let n=e.id;this.registered[n]&&(this.registered[n]=null);let r=e.animation,s=r.length,a=Number(this.tileset.firstgid),o=Number(e.animation[t].tileid)+a,h=Number(e.animation[i].tileid)+a;this.layer.replaceByIndex(o,h);let c=r[i].duration,l=Number((i+1)%s);this.registered[n]=this.setTimeout(this.repeat.bind(this,e,Number(i),l),c)}destroy(){for(let e of Object.keys(this.registered))this.registered[e]&&this.clearTimeout(this.registered[e])}setTimeout(e,t){return this.timer?this.timer.setTimeout(e,t):setTimeout(e,t)}clearTimeout(e){if(this.timer)return this.timer.clearTimeout(e);clearTimeout(e)}}},{}],"1LEsD":[function(e,t,i){let{sc:n}=e("786a4b1c3c76b965");t.exports.Minimap=class{constructor(e){this.config=e.config,this.events=e.events}createMap(e,t){this.minimapCamera=!1,this.circle=!1,this.scope=!1,this.awaitOnCamera=n.get(this.config,"awaitOnCamera",400),this.autoWidth=e.map.widthInPixels/n.get(this.config,"mapWidthDivisor",1),this.camWidth=n.get(this.config,"fixedWidth",this.autoWidth),this.autoHeight=e.map.heightInPixels/n.get(this.config,"mapHeightDivisor",1),this.camHeight=n.get(this.config,"fixedHeight",this.autoHeight),this.camX=n.get(this.config,"camX",0),this.camY=n.get(this.config,"camY",0),this.camBackgroundColor=n.get(this.config,"camBackgroundColor","rgba(0,0,0,0.6)"),this.camZoom=n.get(this.config,"camZoom",.15),this.roundMap=n.get(this.config,"roundMap",!1),this.addCircle=n.get(this.config,"addCircle",!1),this.createMinimapCamera(e,t),this.createRoundMap(e),this.events.emitSync("reldens.createdMinimap",this)}createMinimapCamera(e,t){this.minimapCamera=e.cameras.add(this.camX,this.camY,this.camWidth,this.camHeight).setName("minimap").setBackgroundColor(this.camBackgroundColor).setZoom(this.camZoom).startFollow(t,n.get(this.config,"mapCameraRoundPixels",!0),n.get(this.config,"mapCameraLerpX",1),n.get(this.config,"mapCameraLerpY",1)).setRoundPixels(!0).setVisible(!1).setOrigin(n.get(this.config,"mapCameraOriginX",.18),n.get(this.config,"mapCameraOriginY",.18))}createRoundMap(e){if(!this.roundMap)return!1;this.addCircle&&this.addMinimapCircle(e),this.createRoundCamera(e)}addMinimapCircle(e){let t=e.gameManager.getActiveScenePreloader();this.circle=t.add.circle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35),n.get(this.config,"circleColor","rgb(0,0,0)"),n.get(this.config,"circleAlpha",1)),this.circle.setStrokeStyle(n.get(this.config,"circleStrokeLineWidth",6),n.get(this.config,"circleStrokeColor",0),n.get(this.config,"circleStrokeAlpha",.6)),this.circle.setFillStyle(n.get(this.config,"circleFillColor",1),n.get(this.config,"circleFillAlpha",0)),this.circle.setVisible(!1)}createRoundCamera(e){this.scope=e.add.graphics(),this.scope.fillStyle(0,0).fillCircle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35)),this.minimapCamera.setMask(this.scope.createGeometryMask())}destroyMap(){delete this.minimapCamera,delete this.circle,delete this.scope}}},{"786a4b1c3c76b965":"3lwy5"}],"45YPY":[function(e,t,i){let{Scene:n,Geom:r}=e("df67ed4c812038a9"),{MinimapUi:s}=e("a689b035cfc5756"),{InstructionsUi:a}=e("55a2dd84a2e283e3"),{SettingsUi:o}=e("29c970db688707f2"),{Joystick:h}=e("c747f1452190e301"),{GameConst:c}=e("475d783a521115cd"),{ActionsConst:l}=e("b9b9df6bd8016f7d"),{Logger:u,sc:d}=e("6e32bad98d4c2ac");t.exports.ScenePreloader=class extends n{constructor(e){super({key:e.name}),this.progressBar=null,this.progressCompleteRect=null,this.progressRect=null,this.userInterfaces={},this.preloadMapKey=e.map,this.preloadImages=e.images,this.uiScene=e.uiScene,this.elementsUi={},this.gameManager=e.gameManager,this.eventsManager=e.gameManager.events,this.preloadAssets=e.preloadAssets||{},this.directionalAnimations={},this.objectsAnimations={},this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.gameManager.activeRoomEvents.getActiveScene().objectsAnimationsData=e.objectsAnimationsData,this.playerSpriteSize={frameWidth:this.gameManager.config.get("client/players/size/width",52),frameHeight:this.gameManager.config.get("client/players/size/height",71)},this.useJoystick=this.gameManager.config.getWithoutLogs("client/ui/controls/useJoystick",!1),this.joystick=new h({scenePreloader:this})}preload(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.beforePreload",this,e),this.preloadUiScene(),this.preloadMapJson(),this.preloadMapImages(),this.preloadValidAssets(),this.preloadPlayerDefaultSprite(),this.preloadArrowPointer(),this.load.image(c.ICON_STATS,this.gameManager.config.get("client/general/assets/statsIconPath","/assets/icons/book.png")),this.load.on("fileprogress",this.onFileProgress,this),this.load.on("progress",this.onLoadProgress,this),this.load.on("complete",this.onLoadComplete,this),this.configuredFrameRate=this.gameManager.config.get("client/general/animations/frameRate",10),this.createProgressBar()}preloadMapJson(){this.preloadMapKey&&this.load.tilemapTiledJSON(this.preloadMapKey,"/assets/maps/"+this.preloadMapKey+".json")}preloadArrowPointer(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={frameWidth:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameWidth",32),frameHeight:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameHeight",32)};this.load.spritesheet(c.ARROW_DOWN,this.gameManager.config.get("client/general/assets/arrowDownPath","/assets/sprites/arrow-down.png"),e)}preloadUiScene(){this.uiScene&&(this.eventsManager.emitSync("reldens.beforePreloadUiScene",this),this.gameManager.config.get("client/ui/playerBox/enabled")&&this.load.html("playerBox","/assets/html/ui-player-box.html"),this.gameManager.config.get("client/ui/controls/enabled")&&this.load.html("controls","/assets/html/ui-controls.html"),this.useJoystick&&this.load.html("joystick","/assets/html/ui-joystick.html"),this.gameManager.config.get("client/ui/sceneLabel/enabled")&&this.load.html("sceneLabel","/assets/html/ui-scene-label.html"),this.gameManager.config.get("client/ui/instructions/enabled")&&this.load.html("instructions","/assets/html/ui-instructions.html"),this.gameManager.config.get("client/ui/minimap/enabled")&&this.load.html("minimap","/assets/html/ui-minimap.html"),this.gameManager.config.get("client/ui/settings/enabled")&&(this.load.html("settings","/assets/html/ui-settings.html"),this.load.html("settings-content","/assets/html/ui-settings-content.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadTarget/enabled",!0)&&this.load.html("uiTarget","/assets/html/ui-target.html"),this.gameManager.config.getWithoutLogs("client/ui/preloadOptionsTemplates/enabled",!0)&&(this.load.html("uiOptionButton","/assets/html/ui-option-button.html"),this.load.html("uiOptionIcon","/assets/html/ui-option-icon.html"),this.load.html("uiOptionsContainer","/assets/html/ui-options-container.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadLoading/enabled",!0)&&this.load.html("uiLoading","/assets/html/ui-loading.html"),this.eventsManager.emitSync("reldens.preloadUiScene",this))}preloadMapImages(){if(this.preloadImages)for(let e of this.preloadImages)this.load.image(e,`/assets/maps/${e}`)}preloadValidAssets(){if(!d.isObject(this.preloadAssets)){u.info("None assets available for preload.");return}for(let e of Object.keys(this.preloadAssets)){let t=this.preloadAssets[e];if("spritesheet"!==t.asset_type)continue;let i=d.toJson(t.extra_params);if(!i){u.error("Missing spritesheet params.",t);continue}this.load.spritesheet(t.asset_key,`/assets/custom/sprites/${t.asset_file}`,i)}}create(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.createPreload",this,e),this.uiScene&&this.createUiScene(),this.createPlayerAnimations(d.get(this.gameManager.playerData,"avatarKey",c.IMAGE_PLAYER)),this.createArrowAnimation()}createUiScene(){this.eventsManager.emitSync("reldens.beforeCreateUiScene",this),this.createPlayerBox(),this.createTargetUi(),this.createSceneLabelBox(),this.createControlsBox(),this.createInstructionsBox(),this.createMiniMap(),this.createSettingsUi(),this.eventsManager.emitSync("reldens.createUiScene",this)}createSettingsUi(){let e=this.getUiConfig("settings");e.enabled&&(this.settingsUi=new o,this.settingsUi.createSettings(e,this))}createMiniMap(){let e=this.getUiConfig("minimap");e.enabled&&(this.minimapUi=new s,this.minimapUi.createMinimap(e,this))}createInstructionsBox(){let e=this.getUiConfig("instructions");e.enabled&&(this.instructionsUi=new a,this.instructionsUi.createInstructions(e,this))}createControlsBox(){let e=this.getUiConfig("controls");if(e.enabled)return this.useJoystick?(this.elementsUi.controls=this.createUi("joystick",e),this.joystick.registerJoystickController()):(this.elementsUi.controls=this.createUi("controls",e),this.registerControllers(this.elementsUi.controls))}createUi(e,t){return this.createContent(e,t.uiX,t.uiY)}createContent(e,t,i){return this.add.dom(t,i).createFromCache(e)}createSceneLabelBox(){let e=this.getUiConfig("sceneLabel");e.enabled&&(this.elementsUi.sceneLabel=this.createUi("sceneLabel",e))}createTargetUi(){let e=this.getUiConfig("uiTarget");e.enabled&&(this.uiTarget=this.createUi("uiTarget",e),this.uiTarget.getChildByProperty("className","close-target").addEventListener("click",()=>{this.gameManager.gameEngine.clearTarget()}))}createPlayerBox(){let e=this.getUiConfig("playerBox");if(!e.enabled)return;this.elementsUi.playerBox=this.createUi("playerBox",e);let t=this.elementsUi.playerBox.getChildByProperty("id","logout");t?.addEventListener("click",()=>{this.gameManager.forcedDisconnection=!0,this.gameManager.firebase.isActive&&this.gameManager.firebase.app.auth().signOut(),this.gameManager.gameDom.getWindow().location.reload()})}getUiConfig(e,t,i){let{uiX:n,uiY:r}=this.getUiPosition(e,t,i);return{enabled:this.gameManager.config.getWithoutLogs("client/ui/"+e+"/enabled"),uiX:n,uiY:r}}getUiPosition(e,t,i){""===e&&(e="default");let n=this.gameManager.config.getWithoutLogs("client/ui/"+e,{}),r=d.get(n,"x",0),s=d.get(n,"y",0);if(this.gameManager.config.get("client/ui/screen/responsive")){let e=d.get(n,"responsiveX",!1),a=d.get(n,"responsiveY",!1),o=this.gameManager.gameDom.getElement(".game-container");t||(t=o.offsetWidth),i||(i=o.offsetHeight),r=!1!==e?e*t/100:0,s=!1!==a?a*i/100:0}return{uiX:r,uiY:s}}preloadPlayerDefaultSprite(){let e=this.gameManager.config.get("client/players/animations/fallbackImage","player-base.png");this.load.spritesheet(c.IMAGE_PLAYER,"/assets/custom/sprites/"+e,this.playerSpriteSize)}createPlayerAnimations(e){let t=this.gameManager.config.getWithoutLogs("client/players/animations/"+e+"Frames",this.gameManager.config.get("client/players/animations/defaultFrames"));for(let i of[{k:e+"_"+c.LEFT,img:e,start:t.left.start||3,end:t.left.end||5,repeat:-1,hide:!1},{k:e+"_"+c.RIGHT,img:e,start:t.right.start||6,end:t.right.end||8,repeat:-1,hide:!1},{k:e+"_"+c.UP,img:e,start:t.up.start||9,end:t.up.end||11,repeat:-1,hide:!1},{k:e+"_"+c.DOWN,img:e,start:t.down.start||0,end:t.down.end||2,repeat:-1,hide:!1}])this.createAnimationWith(i);this.eventsManager.emitSync("reldens.createPlayerAnimations",this,e)}createArrowAnimation(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={k:c.ARROW_DOWN,img:c.ARROW_DOWN,start:0,end:2,repeat:3,rate:6};this.createAnimationWith(e)}createAnimationWith(e){if(this.gameManager.createdAnimations[e.k])return;let t={key:e.k,frames:this.anims.generateFrameNumbers(e.img,{start:e.start,end:e.end}),frameRate:d.get(e,"frameRate",this.configuredFrameRate),repeat:e.repeat,hideOnComplete:d.get(e,"hide",!0)};return this.gameManager.createdAnimations[e.k]=this.anims.create(t),this.gameManager.createdAnimations[e.k]}registerControllers(e){this.setupDirButtonInBox(c.UP,e),this.setupDirButtonInBox(c.DOWN,e),this.setupDirButtonInBox(c.LEFT,e),this.setupDirButtonInBox(c.RIGHT,e),this.setupDefaultActionKey(e)}setupDefaultActionKey(e){let t=this.gameManager.config.get("client/ui/controls/defaultActionKey");if(!t)return;let i=this.createActionBox(t);this.gameManager.gameDom.appendToElement(".action-buttons",i),this.setupActionButtonInBox(t,e)}createActionBox(e){let t=this.cache.html.get("actionBox");return this.gameManager.gameEngine.parseTemplate(t,{key:e,actionName:e})}setupDirButtonInBox(e,t){let i=t.getChildByProperty("id",e);i&&this.hold(i,{dir:e})}setupActionButtonInBox(e,t){let i=t.getChildByProperty("id",e);if(i){if(this.gameManager.config.get("client/general/controls/action_button_hold")){this.hold(i,e);return}i?.addEventListener("click",()=>{let t=this.gameManager.activeRoomEvents.getActiveScene(),i={act:l.ACTION,target:t.player.currentTarget,type:e};this.gameManager.activeRoomEvents.send(i)})}}hold(e,t){e.addEventListener("mousedown",i=>{this.startHold(i,e,t)}),e.addEventListener("mouseup",t=>{this.endHold(t,e)}),e.addEventListener("mouseout",t=>{this.endHold(t,e)}),e.addEventListener("touchstart",i=>{this.startHold(i,e,t)}),e.addEventListener("touchend",t=>{this.endHold(t,e)})}startHold(e,t,i){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.add("button-opacity-off");let n=this.gameManager.activeRoomEvents.getActiveScene(),r=i;d.hasOwn(i,"dir")||(r={act:l.ACTION,target:n.player.currentTarget,type:i.type}),this.gameManager.activeRoomEvents.send(r)}endHold(e,t){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.remove("button-opacity-off"),this.gameManager.activeRoomEvents.send({act:c.STOP})}createProgressBar(){if(!this.gameManager.config.getWithoutLogs("client/ui/loading/show",!0))return;let e=r.Rectangle,t=e.Clone(this.cameras.main);this.progressRect=new e(0,0,t.width/2,50),e.CenterOn(this.progressRect,t.centerX,t.centerY),this.progressCompleteRect=r.Rectangle.Clone(this.progressRect),this.progressBar=this.createGraphics();let i=this.cameras.main.width,n=this.cameras.main.height,s=this.gameManager.config.get("client/ui/loading/font"),a=this.gameManager.config.get("client/ui/loading/fontSize"),o=this.gameManager.config.get("client/ui/loading/assetsSize");this.loadingText=this.createText(i/2,n/2-50,"Loading...",{fontFamily:s,fontSize:a}),this.loadingText.setOrigin(.5,.5),this.loadingText.setFill(this.gameManager.config.get("client/ui/loading/loadingColor")),this.percentText=this.createText(i/2,n/2-5,"0%",{fontFamily:s,fontSize:o}),this.percentText.setOrigin(.5,.5),this.percentText.setFill(this.gameManager.config.get("client/ui/loading/percentColor")),this.assetText=this.createText(i/2,n/2+50,"",{fontFamily:s,fontSize:o}),this.assetText.setFill(this.gameManager.config.get("client/ui/loading/assetsColor")),this.assetText.setOrigin(.5,.5)}createText(e,t,i,n){return this.add.text(e,t,i,n)}createGraphics(){return this.add.graphics()}onLoadComplete(){for(let e of this.children.list)e.destroy();this.loadingText.destroy(),this.assetText.destroy(),this.percentText.destroy(),this.scene.shutdown()}onFileProgress(e){this.gameManager.config.get("client/ui/loading/showAssets")&&this.assetText.setText("Loading "+e.key)}onLoadProgress(e){let t=parseInt(100*e)+"%";this.percentText.setText(t),this.progressRect.width=e*this.progressCompleteRect.width,this.progressBar.clear().fillStyle(2236962).fillRectShape(this.progressCompleteRect).fillStyle(16777215).fillRectShape(this.progressRect)}getUiElement(e,t=!0){return d.hasOwn(this.elementsUi,e)?this.elementsUi[e]:(t&&u.error("UI not found.",{uiName:e}),!1)}}},{df67ed4c812038a9:"8S6DV",a689b035cfc5756:"c3rUy","55a2dd84a2e283e3":"d5Xkk","29c970db688707f2":"3lOFf",c747f1452190e301:"qaPo7","475d783a521115cd":"93TbC",b9b9df6bd8016f7d:"59VA7","6e32bad98d4c2ac":"3lwy5"}],c3rUy:[function(e,t,i){let{sc:n}=e("3099c8189d097700");t.exports.MinimapUi=class{createMinimap(e,t){t.elementsUi.minimap=t.add.dom(e.uiX,e.uiY).createFromCache("minimap");let i=t.elementsUi.minimap.getChildByProperty("id","minimap-open"),n=t.elementsUi.minimap.getChildByProperty("id","minimap-close");i?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.remove("hidden"),i.classList.add("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.showMap(r,t,i,n,e)}),n?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.add("hidden"),i&&i.classList.remove("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.hideMap(r,t,n,e)})}showMap(e,t,i,n,r){if(this.awaitForCamera(e)){setTimeout(()=>{this.showMap(e,t,i,n,r)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!0),e.circle&&e.circle.setVisible(!0),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:i,minimap:e,box:r})}hideMap(e,t,i,n){if(this.awaitForCamera(e)){setTimeout(()=>{this.hideMap(e,t,i,n)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!1),e.circle&&e.circle.setVisible(!1),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:i,minimap:e,box:n})}awaitForCamera(e){return 0{r.style.display="block",t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})});let a=t.gameManager.gameDom.getElement("#instructions-close");a?.addEventListener("click",()=>{r.style.display="none",t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})}),t.elementsUi.instructions=i}}},{"5a1cf36c8d3b7e72":"3lwy5"}],"3lOFf":[function(e,t,i){let{Logger:n}=e("203fa7507cacc04f");t.exports.SettingsUi=class{createSettings(e,t){let i=t.add.dom(e.uiX,e.uiY).createFromCache("settings");if(!i)return n.info("Settings dialog box could not be created."),!1;let r=t.cache.html.get("settings-content");if(!r)return n.info("Settings template not found."),!1;t.gameManager.gameDom.appendToElement(".content",r);let s=t.gameManager.gameDom.getElement("#settings-ui");if(!s)return n.info("Settings container not found."),!1;let a=t.gameManager.gameDom.getElement("#settings-close"),o=i.getChildByProperty("id","settings-open");o?.addEventListener("click",()=>{s.style.display="block",o&&(o.style.display="none"),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),a?.addEventListener("click",()=>{s.style.display="none",o&&(o.style.display="block"),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),t.elementsUi.settings=i}}},{"203fa7507cacc04f":"3lwy5"}],qaPo7:[function(e,t,i){let{GameConst:n}=e("88178d0bc5e02e97"),{Logger:r}=e("f4cd4df7f42f9061");t.exports.Joystick=class{constructor(e){this.gameManager=e?.scenePreloader?.gameManager,this.scenePreloader=e?.scenePreloader,this.gameDom=this.gameManager?.gameDom,this.isDragging=!1,this.centerX=!1,this.centerY=!1,this.threshold=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickThreshold",20),this.joystickLeft=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickLeft",25),this.joystickTop=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickTop",25),this.positionSufix="px"}registerJoystickController(){if(!this.gameManager)return r.error("GameManager undefined on Joystick."),!1;this.joystick=this.gameDom.getElement("#joystick"),this.joystickThumb=this.gameDom.getElement("#joystick-thumb"),this.joystickThumb.addEventListener("mousedown",e=>{this.applyMovement(e.clientX,e.clientY)}),this.joystickThumb.addEventListener("touchstart",e=>{e.preventDefault();let t=e.touches?.shift();this.applyMovement(t.clientX,t.clientY)}),this.gameDom.getDocument().addEventListener("mousemove",this.handleMouseMove.bind(this)),this.gameDom.getDocument().addEventListener("mouseup",this.handleStop.bind(this)),this.gameDom.getDocument().addEventListener("touchmove",this.handleTouchMove.bind(this)),this.gameDom.getDocument().addEventListener("touchend",this.handleStop.bind(this))}position(e){return e+this.positionSufix}applyMovement(e,t){this.isDragging=!0;let i=this.joystick.getBoundingClientRect();this.centerX=i.width/2,this.centerY=i.height/2,this.updateThumbPosition(e-i.left,t-i.top)}handleStop(){this.isDragging=!1,this.joystickThumb.style.left=this.position(this.joystickLeft),this.joystickThumb.style.top=this.position(this.joystickTop),this.gameManager.getCurrentPlayer().stop()}updateDirection(e,t){let i=e-this.centerX,r=t-this.centerY,s=n.STOP;if(Math.abs(i)>Math.abs(r)&&Math.abs(i)>this.threshold){for(let e of(s=i>0?Math.abs(r)>this.threshold?r>0?"right-down":"right-up":"right":Math.abs(r)>this.threshold?r>0?"left-down":"left-up":"left").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}if(Math.abs(r)>this.threshold){for(let e of(s=r>0?Math.abs(i)>this.threshold?i>0?"down-right":"down-left":"down":Math.abs(i)>this.threshold?i>0?"up-right":"up-left":"up").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}return this.gameManager.getCurrentPlayer().stop(),s}updateThumbPosition(e,t){let i=e-this.centerX,n=t-this.centerY,r=Math.sqrt(i*i+n*n),s=Math.min(this.centerX,this.centerY);if(r>s){let e=Math.atan2(n,i),t=Math.cos(e)*s+this.centerX-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(t);let r=Math.sin(e)*s+this.centerY-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(r);return}let a=e-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(a);let o=t-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(o)}handleMouseMove(e){if(!this.isDragging)return;let t=this.joystick.getBoundingClientRect(),i=e.clientX-t.left,n=e.clientY-t.top;this.updateThumbPosition(i,n),this.updateDirection(i,n)}handleTouchMove(e){if(!this.isDragging)return;let t=e.touches?.shift(),i=this.joystick.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this.updateThumbPosition(n,r),this.updateDirection(n,r)}}},{"88178d0bc5e02e97":"93TbC",f4cd4df7f42f9061:"3lwy5"}],"401GU":[function(e,t,i){let{RegistrationFormHandler:n}=e("61e9430bb51b7408"),{TermsAndConditionsHandler:r}=e("6e331d321b006ecf"),{LoginFormHandler:s}=e("6146b6a5adb0380b"),{ForgotPasswordFormHandler:a}=e("48bdd5abf515687b"),{GuestFormHandler:o}=e("5b4b95bc89fe7076"),{FullScreenHandler:h}=e("9e3ced5ae6b38dd");t.exports.ClientStartHandler=class{constructor(e){this.gameManager=e}clientStart(){let e=new n(this.gameManager);e.activateRegistration(),new o(this.gameManager).activateGuest();let t=new r(this.gameManager);t.activateTermsAndConditions();let i=new s(this.gameManager);i.activateLogin();let c=new a(this.gameManager);c.activateForgotPassword(),c.displayForgotPassword();let l=new h(this.gameManager);l.activateFullScreen(),this.gameManager.firebase&&this.gameManager.firebase.startFirebase(),Object.assign(this.gameManager.elements,{registrationForm:e,termsAndConditions:t,loginForm:i,forgotPasswordForm:c,fullScreen:l}),this.gameManager.events.emitSync("reldens.clientStartAfter",this)}}},{"61e9430bb51b7408":"gYHC4","6e331d321b006ecf":"ilJrk","6146b6a5adb0380b":"hG35y","48bdd5abf515687b":"jNMHr","5b4b95bc89fe7076":"4jT2q","9e3ced5ae6b38dd":"5GTLr"}],gYHC4:[function(e,t,i){let{ErrorsBlockHandler:n}=e("e090c4bcd3707d9f"),{GameConst:r}=e("e6f38101bdd301e7");t.exports.RegistrationFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.REGISTER_FORM)}activateRegistration(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowRegistration"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS,t=this.gameDom.getElement(e.TERMS.ACCEPT),i=this.gameDom.getElement(e.TERMS.BOX);this.form.addEventListener("submit",n=>{if(n.preventDefault(),!this.form.checkValidity())return!1;let s=this.gameDom.getElement(e.REGISTRATION.PASSWORD).value,a=this.gameDom.getElement(e.REGISTRATION.RE_PASSWORD).value,o=this.form.querySelector(e.RESPONSE_ERROR);if(s!==a&&o)return o.innerHTML="Password and confirmation does not match.",!1;if(!t.checked&&o)return o.innerHTML="Please read and accept the terms and conditions and continue.",!1;i?.classList.add(r.CLASSES.HIDDEN),this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let h={formId:this.form.id,email:this.gameDom.getElement(e.REGISTRATION.EMAIL).value,username:this.gameDom.getElement(e.REGISTRATION.USERNAME).value,password:s,rePassword:a};this.gameManager.startGame(h,!0)})}}},{e090c4bcd3707d9f:"kzsmo",e6f38101bdd301e7:"93TbC"}],kzsmo:[function(e,t,i){let{GameConst:n}=e("32e4ac52cb34a235");t.exports.ErrorsBlockHandler=class{static reset(e){let t=e.querySelector(n.SELECTORS.RESPONSE_ERROR);e.querySelector(n.SELECTORS.INPUT).addEventListener("focus",()=>{t.innerHTML=""})}}},{"32e4ac52cb34a235":"93TbC"}],ilJrk:[function(e,t,i){let{GameConst:n}=e("5e95024018707600"),{Logger:r}=e("b4c60b227487fe12");t.exports.TermsAndConditionsHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.linkContainer=this.gameManager.gameDom.getElement(n.SELECTORS.TERMS.LINK_CONTAINER)}activateTermsAndConditions(){if(!this.linkContainer)return!1;let e=this.gameManager.appServerUrl+n.ROUTE_PATHS.TERMS_AND_CONDITIONS,t=new URL(this.gameDom.getDocument().location).searchParams.get("lang","");""!==t&&(e+="?lang="+t),this.gameDom.getJSON(e,(e,t)=>{if(!t.body||!t.heading||!t.checkboxLabel||!t.link)return!1;if(e)return r.info("Registration error.",e),!1;let i=n.SELECTORS.TERMS;this.gameDom.updateContent(i.HEADING,t.heading),this.gameDom.updateContent(i.BODY,t.body),this.gameDom.updateContent(i.ACCEPT_LABEL,t.checkboxLabel),this.gameDom.updateContent(i.LINK,t.link);let s=this.gameDom.getElement(i.LINK),a=this.gameDom.getElement(i.BOX);s?.addEventListener("click",e=>{e.preventDefault(),a?.classList.remove(n.CLASSES.HIDDEN)}),this.gameDom.getElement(i.CLOSE)?.addEventListener("click",()=>{a?.classList.add(n.CLASSES.HIDDEN)});let o=this.gameDom.getElement(n.SELECTORS.REGISTER_FORM);if(o){let e=this.gameDom.getElement(n.SELECTORS.RESPONSE_ERROR,o),t=this.gameDom.getElement(i.ACCEPT);t.addEventListener("click",()=>{t.checked&&(e.innerHTML="")}),this.gameDom.getElement(i.ACCEPT_LABEL).addEventListener("click",()=>{t.checked&&(e.innerHTML="")})}this.linkContainer?.classList.remove(n.CLASSES.HIDDEN)})}}},{"5e95024018707600":"93TbC",b4c60b227487fe12:"3lwy5"}],hG35y:[function(e,t,i){let{ErrorsBlockHandler:n}=e("d2e27800ca9e6097"),{GameConst:r}=e("9e1bb13aa99be738");t.exports.LoginFormHandler=class{constructor(e){this.gameManager=e,this.form=e.gameDom.getElement(r.SELECTORS.LOGIN_FORM)}activateLogin(){if(!this.form)return!1;n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity()||this.gameManager.submitedForm)return!1;this.gameManager.submitedForm=!0,this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,username:this.form.querySelector(r.SELECTORS.LOGIN.USERNAME).value,password:this.form.querySelector(r.SELECTORS.LOGIN.PASSWORD).value};this.gameManager.startGame(t,!1)})}}},{d2e27800ca9e6097:"kzsmo","9e1bb13aa99be738":"93TbC"}],jNMHr:[function(e,t,i){let{ErrorsBlockHandler:n}=e("2f903207606daf1a"),{GameConst:r}=e("f41810322298058d");t.exports.ForgotPasswordFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=this.gameManager.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD_FORM)}activateForgotPassword(){return!!this.form&&(this.gameManager.config.get("client/general/users/allowRegistration")?void(n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity())return!1;this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,forgot:!0,email:this.form.querySelector(r.SELECTORS.FORGOT_PASSWORD.EMAIL).value};this.gameManager.startGame(t,!1)})):(this.form.classList.add("hidden"),!0))}displayForgotPassword(){this.gameDom.getJSON(this.gameManager.appServerUrl+r.ROUTE_PATHS.MAILER,(e,t)=>{t.enabled&&this.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD.CONTAINER).classList.remove(r.CLASSES.HIDDEN)})}}},{"2f903207606daf1a":"kzsmo",f41810322298058d:"93TbC"}],"4jT2q":[function(e,t,i){let{ErrorsBlockHandler:n}=e("ed3946e6f3fa9c11"),{GameConst:r}=e("b422c8c562d99fb2"),{sc:s}=e("f241b93688d82620");t.exports.GuestFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.GUEST_FORM)}activateGuest(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowGuest"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS;this.form.addEventListener("submit",t=>{if(t.preventDefault(),!this.form.checkValidity())return!1;this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let i="guest-"+s.randomChars(12),n=this.gameManager.config.getWithoutLogs("client/general/users/allowGuestUserName",!1)?this.gameDom.getElement(e.GUEST.USERNAME).value:i,a={formId:this.form.id,username:n,password:n,rePassword:n,isGuest:!0};this.gameManager.startGame(a,!0)})}}},{ed3946e6f3fa9c11:"kzsmo",b422c8c562d99fb2:"93TbC",f241b93688d82620:"3lwy5"}],"5GTLr":[function(e,t,i){let{GameConst:n}=e("9cf3053a062e3fe1");t.exports.FullScreenHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.body=this.gameDom.getElement(n.SELECTORS.BODY)}activateFullScreen(){this.gameDom.getElement(n.SELECTORS.FULL_SCREEN_BUTTON)?.addEventListener("click",e=>{if(e.preventDefault(),!this.gameDom.getDocument().fullscreenEnabled)return!1;this.body.requestFullscreen(),this.goFullScreen()}),this.gameDom.getWindow().matchMedia("(display-mode: fullscreen)").addEventListener("change",({matches:e})=>{if(e){this.goFullScreen();return}this.exitFullScreen()})}goFullScreen(){this.body.classList.add(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}exitFullScreen(){this.body.classList.remove(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}}},{"9cf3053a062e3fe1":"93TbC"}],"3ZqP5":[function(e,t,i){let{ClientCoreFeatures:n}=e("8ee8ee6c25b82d8c"),{Logger:r,sc:s}=e("5806e45b7c7c3fa8");t.exports.FeaturesManager=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.events=s.get(e,"events",!1)}async loadFeatures(e){if(!this.gameManager)return r.error("Game Manager undefined in FeaturesManager."),!1;if(!this.events)return r.error("EventsManager undefined in FeaturesManager."),!1;this.featuresList={},await this.events.emit("reldens.loadFeatures",this,e);let t=Object.keys(e);if(0===t.length)return this.featuresList;for(let i of t){let t=e[i];s.hasOwn(n,t)&&(this.featuresList[t]=new n[t],"function"==typeof this.featuresList[t].setup&&await this.featuresList[t].setup({gameManager:this.gameManager,events:this.events}),await this.events.emit("reldens.loadFeature_"+t,this.featuresList[t],this))}return this.featuresList}}},{"8ee8ee6c25b82d8c":"2BcLh","5806e45b7c7c3fa8":"3lwy5"}],"2BcLh":[function(e,t,i){let{ChatPlugin:n}=e("949b1921d3bf5140"),{ObjectsPlugin:r}=e("aa8995112e7d6bdb"),{InventoryPlugin:s}=e("d9ef351011c1851b"),{ActionsPlugin:a}=e("408c84b7d592f2b6"),{UsersPlugin:o}=e("12e36b841f0da63e"),{AudioPlugin:h}=e("3fd885750ac6ac6b"),{RoomsPlugin:c}=e("f2563b87854d4a6e"),{PredictionPlugin:l}=e("282babf537556f44"),{TeamsPlugin:u}=e("d0d5a23fa0219ef6"),{SnippetsPlugin:d}=e("ffba7e1c5e50a8a7"),{AdsPlugin:f}=e("d50aaab7df227399"),{WorldPlugin:p}=e("c63ee71351943ae1"),{ScoresPlugin:g}=e("e1d7ab421b11cea0"),{RewardsPlugin:m}=e("bd8f677aa060e20b");t.exports.ClientCoreFeatures={chat:n,objects:r,inventory:s,actions:a,users:o,audio:h,rooms:c,prediction:l,teams:u,snippets:d,ads:f,world:p,scores:g,rewards:m}},{"949b1921d3bf5140":"1pwR6",aa8995112e7d6bdb:"88wg5",d9ef351011c1851b:"83Jlt","408c84b7d592f2b6":"enPaX","12e36b841f0da63e":"1nDQd","3fd885750ac6ac6b":"jRcE9",f2563b87854d4a6e:"3yQhR","282babf537556f44":"80hlx",d0d5a23fa0219ef6:"8MUNa",ffba7e1c5e50a8a7:"tkJox",d50aaab7df227399:"aNIyr",c63ee71351943ae1:"79nNs",e1d7ab421b11cea0:"jv1vT",bd8f677aa060e20b:"4p1ha"}],"1pwR6":[function(e,t,i){let{ChatUi:n}=e("994be9db4994f9a3"),{MessagesListener:r}=e("b6a36cbfb0da5dfe"),{TemplatesHandler:s}=e("deb4c2146b2d1712"),a=e("267812d6128a4b8e"),{TranslationsMapper:o}=e("5e30eadde21dcf94"),{PluginInterface:h}=e("8d1c7a15abb408a"),{ChatConst:c}=e("fe17ff5717202a3b"),{Logger:l,sc:u}=e("ef3698ca9cea9d5");t.exports.ChatPlugin=class extends h{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in ActionsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in ChatPlugin."),this.messagesQueu=[],this.uiManager=!1,this.joinRooms=[c.CHAT_GLOBAL],this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.joinedRoom",async e=>{await r.listenMessages(e,this)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e,this.gameManager.config.get("client/ui/chat/showTabs"))}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi(),this.uiManager.createTabs(),this.uiManager.processMessagesQueue(this.messagesQueu)})}}},{"994be9db4994f9a3":"eLO7b",b6a36cbfb0da5dfe:"lJUIi",deb4c2146b2d1712:"fgdaI","267812d6128a4b8e":"daHmu","5e30eadde21dcf94":"1fcQw","8d1c7a15abb408a":"fC3To",fe17ff5717202a3b:"dUuh0",ef3698ca9cea9d5:"3lwy5"}],eLO7b:[function(e,t,i){let{Input:n}=e("97d93bd9735e7bfb"),{SpriteTextFactory:r}=e("19814f11619c8dd"),{ChatTabs:s}=e("2429a93c399ce990"),{ChatConst:a}=e("644250816f608ee2"),{Logger:o,sc:h}=e("1eb163b9249e21a9");t.exports.ChatUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene?.gameManager,this.gameDom=this.uiScene?.gameManager?.gameDom,this.setChatTypes(),this.setChatConfiguration(),this.uiChat={},this.messagesQueu=[],this.chatInput=!1,this.chatSendButton=!1,this.chatCloseButton=!1,this.chatOpenButton=!1}setChatConfiguration(){if(!this.gameManager||!this.gameManager.config)return!1;this.uiConfig=this.gameManager.config.get("client/ui/chat"),this.overheadChat=h.get(this.uiConfig,"overheadChat",{}),this.overHeadChatEnabled=h.get(this.overheadChat,"enabled",!1),this.overheadText=h.get(this.uiConfig,"overheadText",{}),this.isDefaultOpen=h.get(this.uiConfig,"defaultOpen",!1),this.isTyping=h.get(this.overheadChat,"isTyping",!1),this.showTabs=h.get(this.uiConfig,"showTabs",!1),this.closeChatBoxAfterSend=h.get(this.closeChatBoxAfterSend,"isTyping",!1),this.messagesConfig=this.gameManager.config.get("client/chat/messages"),this.characterLimit=h.get(this.messagesConfig,"characterLimit",0),this.characterLimitOverhead=h.get(this.messagesConfig,"characterLimitOverhead",0),this.appendErrorTypeOnActiveTab=h.get(this.messagesConfig,"appendErrorTypeOnActiveTab",!0)}setChatTypes(){if(!this.gameManager)return o.warning("Missing GameManager on ChatUI."),!1;if(!this.gameDom)return o.warning("Missing GameDom on ChatUI."),!1;if(!this.gameManager.initialGameData)return o.warning('Missing "initialGameData" on ChatUI.'),!1;if(this.chatTypes=h.get(this.gameManager.initialGameData,"chatTypes",[]),0===this.chatTypes.length)return!1;for(let e of(this.chatTypesById={},this.chatTypes))this.chatTypesById[e.id]=e}createUi(){if(!this.uiScene)return o.warning("Missing UI Scene on ChatUI."),!1;let{uiX:e,uiY:t}=this.uiScene.getUiConfig("chat");if(this.uiChat=this.uiScene.add.dom(e,t).createFromCache("chat"),this.uiScene.elementsUi.chat=this.uiChat,this.chatInput=this.uiChat.getChildByProperty("id",a.CHAT_INPUT),!this.chatInput)return o.info("Missing chat input on ChatUI."),!1;this.setupKeyPressBehaviors(),this.chatInput.addEventListener("onfocusout",()=>{this.hideIsTyping()}),this.setupSendButton(),this.setupOpenCloseButtons(),this.overHeadChatEnabled&&this.setupOverheadChatEvents(),this.isDefaultOpen&&this.showChatBox()}createTabs(){return!!this.showTabs&&(this.tabs=new s(this.gameManager,this.uiScene),!0)}setupOverheadChatEvents(){this.gameManager.events.on("reldens.runPlayerAnimation",(e,t,i,n)=>{this.updateOverheadTextPosition(n)})}setupOpenCloseButtons(){this.chatOpenButton=this.uiChat.getChildByProperty("id",a.CHAT_OPEN_BUTTON),this.chatOpenButton?.addEventListener("click",()=>{this.showChatBox(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})}),this.chatCloseButton=this.uiChat.getChildByProperty("id",a.CHAT_CLOSE_BUTTON),this.chatCloseButton?.addEventListener("click",()=>{this.hideChatBox(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:this.chatCloseButton,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})})}setupSendButton(){this.chatSendButton=this.uiChat.getChildByProperty("id",a.CHAT_SEND_BUTTON),this.chatSendButton?.addEventListener("click",e=>{e.preventDefault(),this.sendChatMessage(this.chatInput,this.gameManager.activeRoomEvents),this.chatInput.focus()})}setupKeyPressBehaviors(){this.uiScene.input.keyboard.on("keyup-ENTER",()=>{this.isFocussedOnChatInput()||(this.showChatBox(),this.chatInput.focus())}),this.chatInput.addEventListener("keyup",e=>{if(e.keyCode===n.Keyboard.KeyCodes.ENTER){e.preventDefault(),this.sendChatMessage();return}this.showIsTyping()})}showOverheadChat(e,t){if(!this.overHeadChatEnabled)return!1;e.overheadTextSprite&&this.destroyTextSprite(e),t=this.applyTextLimit(t,this.characterLimitOverhead),e.overheadTextSprite=r.attachTextToSprite(e,t,this.overheadText,h.get(this.overheadText,"topOff",0),"overheadTextSprite",this.gameManager.getActiveScene());let i=h.get(this.overheadText,"timeOut",!1);i&&setTimeout(()=>{this.destroyTextSprite(e)},i)}updateOverheadTextPosition(e){if(!e.overheadTextSprite)return!1;let t=r.getTextPosition(e,e.playerName,this.overheadText,h.get(this.overheadText,"topOff",0));e.overheadTextSprite.x=t.x,e.overheadTextSprite.y=t.y}destroyTextSprite(e){if(!e.overheadTextSprite)return!1;e.overheadTextSprite.destroy(),delete e.overheadTextSprite}showIsTyping(){if(!this.overHeadChatEnabled||!this.isTyping||!this.isFocussedOnChatInput())return!1;this.showOverheadChat(this.gameManager.getCurrentPlayerAnimation(),this.gameManager.config.getWithoutLogs("client/ui/chat/waitingContent",this.t(a.SNIPPETS.WAITING)))}hideIsTyping(){if(!this.isTyping)return!1;this.destroyTextSprite(this.gameManager.getCurrentPlayerAnimation())}isFocussedOnChatInput(){return this.gameManager.gameDom.activeElement()===this.chatInput}showChatBox(){this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.remove("hidden"),this.uiChat.setDepth(4),this.chatOpenButton?.classList.add("hidden");let e=this.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);e&&(e.parentNode.scrollTop=e.scrollHeight),this.hideNotificationsBalloon()}hideChatBox(){let e=this.uiChat.getChildByProperty("id",a.CHAT_UI);if(!e)return o.info("Chat UI box not found."),!1;e.classList.add("hidden"),this.uiChat.setDepth(1),this.chatOpenButton?.classList.remove("hidden")}showNotificationBalloon(){this.getActiveBalloon()?.classList.remove("hidden")}hideNotificationsBalloon(){this.getActiveBalloon()?.classList.add("hidden")}getActiveBalloon(){if(!h.get(this.uiConfig,"notificationBalloon"))return!1;let e=this.uiChat.getChildByProperty("id",a.CHAT_BALLOON);return!!e&&e}processMessagesQueue(e){if(0===e.length)return!1;for(let t of e)this.attachNewMessage(t)}attachNewMessage(e){if(!this.gameManager.gameEngine.uiScene.cache)return;let t=this.gameManager.gameEngine.uiScene.cache.html.get("chatMessage"),i=this.translateMessage(e),n=this.gameManager.gameEngine.parseTemplate(t,{from:this.translateFrom(e),color:a.TYPE_COLOR[e[a.TYPES.KEY]],message:i}),r=this.showTabs?a.TYPES.MESSAGE:"",s=h.get(e,a.TYPES.KEY,r),c=h.get(this.chatTypesById,s,!1),l=!!(""!==s&&c?.show_tab)&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+s);l&&this.appendWithScroll(l,n);let u=!!c.also_show_in_type&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+c.also_show_in_type);u&&u!==l&&this.appendWithScroll(u,n);let d=""===s&&this.gameManager.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);if(d&&this.appendWithScroll(d,n),this.appendErrorTypeOnActiveTab&&a.TYPES.ERROR===s){let e=this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_ACTIVE);e&&e!==l&&e!==u&&this.appendWithScroll(e,n)}if(!l&&!u&&!d){null===l&&o.warning("Element not found for selector: .tab-content-"+s),null===u&&o.warning("Element not found for selector: .tab-content-"+c.also_show_in_type),o.warning("Chat message not attached to any tab or main panel.",{message:e,defaultType:r,messageType:s,chatType:c,appendToMain:d,appendToTab:l});return}if(e[a.MESSAGE.FROM]&&this.isValidMessageType(e[a.TYPES.KEY])){let t=this.fetchPlayerByName(e[a.MESSAGE.FROM]);t&&this.showOverheadChat(t,i)}this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.contains("hidden")&&this.showNotificationBalloon()}appendWithScroll(e,t){e.innerHTML+=t,e.parentNode.scrollTop=e.scrollHeight}translateFrom(e){let t=e[a.TYPES.KEY],i=e[a.MESSAGE.FROM]||a.TYPES.SYSTEM;return this.isValidSnippetFromType(t)?this.t(a.SNIPPETS.PREFIX+a.TYPES.KEY+t):i}translateMessage(e){let t=e[a.TYPES.KEY];if(!this.isValidSnippetType(t))return e[a.MESSAGE.KEY];let i=e[a.MESSAGE.DATA.KEY];if(!i)return this.t(e[a.MESSAGE.KEY]);if(i[a.MESSAGE.DATA.MODIFIERS]){let t="",n=i[a.MESSAGE.DATA.TARGET_LABEL];for(let r of Object.keys(i[a.MESSAGE.DATA.MODIFIERS])){let s=this.t(r),o=i[a.MESSAGE.DATA.MODIFIERS][r];t+=this.t(e[a.MESSAGE.KEY],{propertyValue:o,propertyLabel:s,targetLabel:n})}return t}return this.t(e[a.MESSAGE.KEY],i)}t(e,t={},i=!1){return this.gameManager.services.translator.t(e,t,i)}isValidMessageType(e){return -1===this.validMessageTypes().indexOf(e)}validMessageTypes(){return[Object.values(a.TYPES)]}isValidSnippetType(e){let t=this.snippetsMessageTypes();for(let i of Object.keys(t))if(t[i]===e)return!0;return!1}snippetsMessageTypes(){let e=Object.assign({},a.TYPES);return delete e[a.TYPES.MESSAGE],delete e[a.TYPES.PRIVATE],delete e[a.TYPES.GLOBAL],delete e[a.TYPES.TEAMS],e}isValidSnippetFromType(e){return -1!==[a.TYPES.SYSTEM,a.TYPES.ERROR].indexOf(e)}fetchPlayerByName(e){let t=this.gameManager.getCurrentPlayer().players,i=Object.keys(t);if(1>=i.length)return!1;for(let n of i){let i=t[n];if(i.playerName===e)return i}}sendChatMessage(){if(!this.isValidMessage())return!1;let e=this.applyTextLimit(this.chatInput.value,this.characterLimit),t={act:a.CHAT_ACTION,m:e};this.gameManager.events.emitSync("reldens.chatMessageObjectCreated",this,t),this.useGlobalRoom()?this.useGlobalRoomForMessage(t):this.gameManager.activeRoomEvents.send(t),this.chatInput.value="",this.closeChatBoxAfterSend&&this.hideChatBox()}applyTextLimit(e,t){return 0{let t=this.gameManager.gameDom.getElement(".tab-label.active");t?.classList.remove("active"),e.target.classList.add("active");let i=this.gameManager.gameDom.getElement(".tab-content.active");i?.classList.remove("active");let n=this.gameManager.gameDom.getElement(".tab-content-"+e.target.dataset.tabId);if(!n)return r.warning("Tab content was not found.",e),!1;n.classList.add("active"),n.parentNode.scrollTop=n.scrollHeight})}}},{a22c3a2311bae153:"dUuh0","6e140e18d42fb249":"3lwy5"}],dUuh0:[function(e,t,i){let n="chat.",r="player.",s={KEY:"ctk",MESSAGE:1,JOINED:2,SYSTEM:3,PRIVATE:4,DAMAGE:5,REWARD:6,SKILL:7,TEAMS:8,GLOBAL:9,ERROR:10};t.exports.ChatConst={ROOM_TYPE_CHAT:"chat",CHAT_ACTION:"c",TYPES:s,CHAT_FROM:"f",CHAT_TO:"t",CHAT_UI:"chat-ui",CHAT_FORM:"chat-form",CHAT_INPUT:"chat-input",CHAT_SEND_BUTTON:"chat-send",CHAT_CLOSE_BUTTON:"chat-close",CHAT_OPEN_BUTTON:"chat-open",CHAT_BALLOON:"notification-balloon",CHAT_GLOBAL:"chat",MESSAGE:{KEY:"m",FROM:"f",TO:"t",DATA:{KEY:"md",SNIPPET:"sp",PLAYER_NAME:"pn",ROOM_NAME:"rn",DAMAGE:"d",TARGET_LABEL:"tL",SKILL_LABEL:"sk",MODIFIERS:"mfs"},DATA_VALUES:{NAMESPACE:"chat",pn:"playerName",rn:"roomName",d:"damage",tL:"targetLabel",sk:"skillLabel",mfs:"modifiers"}},SNIPPETS:{PREFIX:n,PLAYER_PREFIX:r,TAB_PREFIX:"tabs.",NPC_DAMAGE:n+"npcDamage",NPC_DODGED_SKILL:n+"dodgedSkill",MODIFIERS_APPLY:n+"modifiersApply",JOINED_ROOM:n+"joinedRoom",LEFT_ROOM:n+"leftRoom",PRIVATE_MESSAGE_PLAYER_NOT_FOUND:n+"playerNotFound",GLOBAL_MESSAGE_NOT_ALLOWED:n+"globalMessageNotAllowed",GLOBAL_MESSAGE_PERMISSION_DENIED:n+"globalMessagePermissionDenied",PLAYER:{DAMAGE:n+r+"damage",DODGED_SKILL:n+r+"dodgedSkill"},GUEST_INVALID_CHANGE_POINT:n+"guestInvalidChangePoint",WAITING:"..."},SELECTORS:{CONTENTS:"#chat-contents",CHAT_MESSAGES:"#chat-messages",TAB_CONTENT_PREFIX:".tab-content-",TAB_CONTENT_ACTIVE:".tab-content.active"},TYPE_COLOR:{[s.MESSAGE]:"#ffffff",[s.PRIVATE]:"#f39c12",[s.PRIVATE+".to"]:"#00afff",[s.GLOBAL]:"#ffff00",[s.SYSTEM]:"#2ecc71",[s.ERROR]:"#ff0000",[s.DAMAGE]:"#ff0000",[s.SYSTEM+".modifiers"]:"#0feeff",[s.REWARD]:"#2ecc71",[s.TEAMS]:"#2ecc71"}}},{}],lJUIi:[function(e,t,i){let{ChatConst:n}=e("7520fddeb5373b09");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.CHAT_ACTION===e.act){if(!t.uiManager){t.messagesQueu.push(e);return}t.uiManager.attachNewMessage(e)}})}}},{"7520fddeb5373b09":"dUuh0"}],fgdaI:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e,t){let i="/assets/features/chat/templates/";e.load.html("chat",i+"ui-chat.html"),e.load.html("chatMessage",i+"message.html"),t&&(e.load.html("chatTabsContainer",i+"tabs-container.html"),e.load.html("chatTabLabel",i+"tab-label.html"),e.load.html("chatTabContent",i+"tab-content.html"))}}},{}],daHmu:[function(e,t,i){t.exports={chat:{ctk3:"System",ctk10:"System",npcDamage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill",modifiersApply:"%propertyValue %propertyLabel on %targetLabel",joinedRoom:"%playerName has joined %roomName",leftRoom:"%playerName has left",playerNotFound:'Player "%playerName" not found',globalMessagesNotAllowed:"Global messages not allowed",globalMessagePermissionDenied:"Global message permission denied",guestInvalidChangePoint:"The room is not available for guest users.",player:{damage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill"},tabs:{message:"General",joined:"Joined",system:"System",private:"Private",damage:"Damage",reward:"Rewards",skill:"Skills",teams:"Teams",global:"Global",error:"Error"}}}},{}],"1fcQw":[function(e,t,i){let{SnippetsConst:n}=e("f5fe63265b673629"),{sc:r}=e("70ef676150c60a42");t.exports.TranslationsMapper=class{static forConfig(e,t,i=!1,s=n.DEFAULT_LOCALE){e.snippets||(e.snippets={}),e.snippets[s]||(e.snippets[s]={});let a=this.fromObject(t);if(e.snippets[s]=r.deepMergeProperties(a,e.snippets[s]),!i)return;e.snippetsDataValues||(e.snippetsDataValues={});let o=i.NAMESPACE||n.DATA_VALUES_DEFAULT_NAMESPACE;r.deepMergeProperties(e.snippetsDataValues,{[o]:i})}static fromObject(e){let t=Object.keys(e);if(0===t.length)return{};let i={};for(let n of t)this.recursiveMap(n,e[n],i);return i}static recursiveMap(e,t,i){if(!r.isObject(t)){i[e]=t;return}let s=Object.keys(t);if(0!==s.length)for(let r of s)this.recursiveMap(e+n.CONCAT_CHARACTER+r,t[r],i)}}},{f5fe63265b673629:"biSFs","70ef676150c60a42":"3lwy5"}],biSFs:[function(e,t,i){t.exports.SnippetsConst={KEY:"snippets",DEFAULT_LOCALE:"en_US",CONCAT_CHARACTER:".",DATA_VALUES_DEFAULT_NAMESPACE:"default",ACTIONS:{UPDATE:"sn.Up"}}},{}],fC3To:[function(e,t,i){let{Logger:n}=e("956b760a8a542b20");t.exports.PluginInterface=class{async setup(e){n.error("Setup plugin not implemented.",e)}}},{"956b760a8a542b20":"3lwy5"}],"88wg5":[function(e,t,i){let{AnimationEngine:n}=e("2d0db67a357a1df6"),{ObjectsMessageListener:r}=e("79a86c288b721c2b"),{DropsMessageListener:s}=e("deab023d199335c9"),a=e("8cedb0a2567e4f93"),{TranslationsMapper:o}=e("52449bab2a32580c"),{UserInterface:h}=e("52476153d5a162e6"),{ObjectsConst:c}=e("f64071d16effca52"),{ActionsConst:l}=e("bef8aa2a761e6924"),{PluginInterface:u}=e("6bb02e09282ac53"),{GameConst:d}=e("cb715b6f39878bc"),{Logger:f,sc:p}=e("c0cb3eea0cda2e5e");t.exports.ObjectsPlugin=class extends u{setup(e){this.gameManager=p.get(e,"gameManager",!1),this.gameManager||f.error("Game Manager undefined in InventoryPlugin."),this.events=p.get(e,"events",!1),this.events||f.error("EventsManager undefined in InventoryPlugin."),this.bodyOnAddCallBack=!1,this.bodyOnRemoveCallBack=!1,this.bullets={},this.changeBodyVisibilityOnInactiveState=this.gameManager.config.getWithoutLogs("client/objects/animations/changeBodyVisibilityOnInactiveState",!0),this.missingSpritesTimeOut=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesTimeOut",200),this.missingSpritesMaxRetries=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesMaxRetries",5),this.missingSpriteRetry=0,this.listenEvents(),this.setTranslations(),this.setListener()}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.traderObject=new r}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async e=>{await this.prepareObjectsUi(e.gameManager,e.sceneData.objectsAnimationsData,e)}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{await this.createDynamicAnimations(e)}),this.events.on("reldens.joinedRoom",(e,t)=>{this.listenMessages(e,t),s.listenMessages(e,t)})}listenMessages(e,t){if(e.onMessage("*",e=>{this.startObjectAnimation(e,t),this.objectBattleEndAnimation(e,t)}),!e.state||!e.state.bodies)return!1;this.setAddBodyCallback(e,t),this.setRemoveBodyCallback(e)}setAddBodyCallback(e,t){this.bodyOnAddCallBack=e.state.bodies.onAdd((i,n)=>{this.setOnChangeBodyCallback(i,n,e,t),this.createBulletSprite(n,t,i)})}createBulletSprite(e,t,i){if(-1===e.indexOf("bullet"))return!1;let n=t.activeRoomEvents.getActiveScene(),r="default_bullet",s=(i.key?i.key+"_":"")+"bullet";p.hasOwn(t.gameEngine.uiScene.directionalAnimations,s)&&(s=s+"_"+i.dir),p.hasOwn(n.anims.anims.entries,s)&&(r=s);let a=n?.physics?.add?.sprite(i.x,i.y,r);if(!a)return f.warning("Could not create bullet sprite.",n),!1;a.setDepth(11e3),this.bullets[e]=a}setOnChangeBodyCallback(e,t,i,n){let r=Object.keys(e),s=Object.keys(e.state??{});for(let i of r)e.listen(i,async r=>{await this.events.emit("reldens.objectBodyChange",{body:e,key:t,changes:{[i]:r}}),this.updateBodyProperties(i,s,e,r);let a=n.activeRoomEvents.getActiveScene();if(!a)return;let o=-1!==t.indexOf("bullet"),h=o?this.bullets[t]:a?.objectsAnimations[t];this.setVisibility(h,d.STATUS.ACTIVE===e.inState),this.logObjectBodyUpdate(t,i,r,h);let c=d.STATUS.AVOID_INTERPOLATION!==e.inState;if(a?.clientInterpolation&&c){a.interpolateObjectsPositions[t]=e;return}return o?this.updateBulletBodyPosition(t,e):this.updateObjectsAnimations(t,e,a)})}logObjectBodyUpdate(e,t,i,n){let r={key:e,propertyKey:t,newValue:i};("x"===t||"y"===t)&&n&&n[t]&&(r.currentValue=n[t]),f.debug(r)}setVisibility(e,t){e&&e.sceneSprite&&e.sceneSprite.setVisible(t)}updateBodyProperties(e,t,i,n){if("state"===e){for(let e of t)i.state[e]=n[e];return}i[e]=n}updateBulletBodyPosition(e,t){this.bullets[e]&&(this.bullets[e].x=t.x,this.bullets[e].y=t.y,this.events.emit("reldens.objectBodyChanged",{body:t,key:e}))}updateObjectsAnimations(e,t,i){let n=p.get(i.objectsAnimations,e);if(!n)return!1;n.updateObjectAndSpritePositions(t.x,t.y),this.events.emit("reldens.objectBodyChanged",{body:t,key:e});let r=n.updateObjectDepth();n.inState=t.inState;let s=this.fetchAvailableAnimationKey(i,n,t);return""!==s&&n.sceneSprite.anims.play(s,!0),this.moveSpritesObjects(n,t.x,t.y,r),!t.mov&&(n.sceneSprite.anims.stop(),n.sceneSprite.mov=t.mov,!!n.autoStart&&(n.sceneSprite.anims.play(this.determineAutoStartAnimation(n,s)),!0))}determineAutoStartAnimation(e,t){return!0===e.autoStart?e.key:e.autoStart===c.DYNAMIC_ANIMATION?t:e.autoStart}fetchAvailableAnimationKey(e,t,i){return p.getByPriority(e.anims.anims.entries,[t.key+"_"+i.dir,t.layerName+"_"+t.id+"_"+i.dir,t.key])||""}setRemoveBodyCallback(e){this.bodyOnRemoveCallBack=e.state.bodies.onRemove((e,t)=>{if(-1===t.indexOf("bullet")||!p.hasOwn(this.bullets,t))return!1;this.bullets[t].destroy(),delete this.bullets[t]})}objectBattleEndAnimation(e,t){if(e.act!==l.BATTLE_ENDED)return!1;let i=p.get(t.config.client.skills.animations,e.k+"_death","default_death"),n=t.activeRoomEvents.getActiveScene();try{this.playDeathAnimation(i,n,e)}catch(e){f.warning('Error on sprite "'+i+'" not available.',e.message)}if(!p.hasOwn(e,l.DATA_OBJECT_KEY_TARGET))return!1;e[l.DATA_OBJECT_KEY_TARGET]===n.player.currentTarget?.id&&t.gameEngine.clearTarget();let r=p.get(n.player.players,e[l.DATA_OBJECT_KEY_TARGET],!1);if(!r)return!1;r.visible=!1,p.hasOwn(r,"nameSprite")&&r.nameSprite&&(r.nameSprite.visible=!1)}playDeathAnimation(e,t,i){if(!t.getAnimationByKey(e))return this.missingSpritesMaxRetries===this.missingSpriteRetry?f.debug('Sprite "'+e+'" not available.',e):(this.missingSpriteRetry++,setTimeout(()=>this.playDeathAnimation(e,t,i),this.missingSpritesTimeOut)),!1;let n=t.physics.add.sprite(i.x,i.y,e);return n.setDepth(10500),n.anims.play(e,!0).on("animationcomplete",()=>{n.destroy()}),!0}startObjectAnimation(e,t){if(e.act!==c.OBJECT_ANIMATION&&e.act!==c.TYPE_ANIMATION)return!1;let i=t.activeRoomEvents.getActiveScene();if(!p.hasOwn(i.objectsAnimations,e.key))return!1;i.objectsAnimations[e.key].runAnimation()}moveSpritesObjects(e,t,i,n){if(!e.moveSprites)return;let r=Object.keys(e.moveSprites);if(0!==r.length)for(let s of r){let r=e.moveSprites[s];r.x=t,r.y=i;let a=n+("above"===p.get(e.animationData,"depthByPlayer","")?1:-.1);r.setDepth(a)}}async prepareObjectsUi(e,t,i){if(!t){f.info(["None objects animations data.",i]);return}for(let n of Object.keys(t)){let r=t[n];if(!p.hasOwn(r,"ui"))continue;if(!r.id){f.error(["Object ID not specified. Skipping registry:",r]);continue}let s=p.get(r,"template","/assets/html/dialog-box.html");i.objectsUi[r.id]=new h(e,r,s,"npcDialog"),await e.events.emit("reldens.createdUserInterface",{gameManager:e,id:r.id,userInterface:i.objectsUi[r.id],ObjectsPlugin:this})}}async createDynamicAnimations(e){let t=e.gameManager.activeRoomEvents.getActiveScene();if(!t.objectsAnimationsData){f.info("None animations defined on this scene: "+t.key);return}for(let i of(await this.events.emit("reldens.createDynamicAnimationsBefore",this,e),Object.keys(t.objectsAnimationsData))){let n=t.objectsAnimationsData[i];await this.createAnimationFromAnimData(n,e)}}async createAnimationFromAnimData(e,t){if(!e.key)return f.error("Animation key not specified. Skipping registry.",e),!1;e.frameRate=t.configuredFrameRate,await this.events.emit("reldens.createDynamicAnimation_"+e.key,this,e);let i=new(t.gameManager.config.getWithoutLogs("client/customClasses/objects/"+e.key,n))(t.gameManager,e,t);return i.createAnimation(),i}}},{"2d0db67a357a1df6":"55aYT","79a86c288b721c2b":"9u1ZW",deab023d199335c9:"8cYlw","8cedb0a2567e4f93":"hznMs","52449bab2a32580c":"1fcQw","52476153d5a162e6":"bzImH",f64071d16effca52:"izuLV",bef8aa2a761e6924:"59VA7","6bb02e09282ac53":"fC3To",cb715b6f39878bc:"93TbC",c0cb3eea0cda2e5e:"3lwy5"}],"55aYT":[function(e,t,i){let{Logger:n,sc:r}=e("69cb276730e319a6"),{ObjectsConst:s}=e("4aa72c897fe49299"),{GameConst:a}=e("e5f3f59c83d28a8d");t.exports.AnimationEngine=class{constructor(e,t,i){this.currentPreloader=i,this.currentAnimation=!1,this.gameManager=e,this.enabled=t.enabled||!1,this.key=t.key,this.id=t.id,this.asset_key=t.asset_key||t.key,this.assetPath=t.assetPath||"/assets/custom/sprites/",this.type=t.type||!1,this.ui=t.ui||!1,this.targetName=t.targetName,this.frameRate=t.frameRate||!1,this.frameStart=t.frameStart||0,this.frameEnd=t.frameEnd||0,this.x=t.x||0,this.y=t.y||0,this.repeat=isNaN(t.repeat)?-1:t.repeat,this.hideOnComplete=t.hideOnComplete||!1,this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.destroyOnComplete=t.destroyOnComplete||!1,this.autoStart=t.autoStart||!1,this.layerName=t.layerName||!1,this.positionFix=t.positionFix||!1,this.zeroPad=t.zeroPad||!1,this.prefix=t.prefix||!1,this.isInteractive=t.isInteractive||!1,this.highlightOnOver=!!r.get(t,"highlightOnOver",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightOnOver",!0)),this.highlightColor=r.get(t,"highlightColor",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightColor","0x00ff00")),this.restartTime=r.get(t,"restartTime",!1),this.calculateAnimPosition(),r.hasOwn(t,"animations")&&this.createObjectAnimations(t.animations)}updateObjectAndSpritePositions(e,t){this.sceneSprite.x=e,this.sceneSprite.y=t,this.x=e,this.y=t,this.calculateAnimPosition()}calculateAnimPosition(){this.animPos={x:this.x,y:this.y},this.positionFix&&(r.hasOwn(this.positionFix,"x")&&(this.animPos.x=this.x+this.positionFix.x),r.hasOwn(this.positionFix,"y")&&(this.animPos.y=this.y+this.positionFix.y))}updateObjectDepth(){let e=this.y+this.sceneSprite.height;return this.sceneSprite.setDepth(e),e}createAnimation(){if(!this.enabled){n.error("Animation disabled: "+this.key);return}let e=this.gameManager.activeRoomEvents.getActiveScene();if(!e){n.error("Active scene not found.");return}let t={start:this.frameStart,end:this.frameEnd};if(!1!==this.prefix&&(t.prefix=this.prefix),!1!==this.zeroPad&&(t.zeroPad=this.zeroPad),!this.currentPreloader.anims.textureManager.list[this.asset_key]){n.warning("Asset not found in preloader.",this.asset_key,t),this.currentPreloader.load.spritesheet(this.asset_key,this.assetPath+this.asset_key,t),this.currentPreloader.load.once("complete",async()=>{this.createAnimation()});return}let i=this.currentPreloader.anims.generateFrameNumbers(this.asset_key,t),r={key:this.key,frames:i,frameRate:this.frameRate,repeat:this.repeat,hideOnComplete:this.hideOnComplete};this.currentAnimation=this.gameManager.createdAnimations[this.key],this.currentAnimation||(n.debug("Creating animation: "+this.key),this.currentAnimation=this.currentPreloader.anims.create(r)),this.currentPreloader.objectsAnimations[this.key]=this.currentAnimation,this.gameManager.createdAnimations[this.key]=this.currentAnimation;let s=this.positionFix?this.animPos.x:this.x,a=this.positionFix?this.animPos.y:this.y;return this.sceneSprite=e.physics.add.sprite(s,a,this.asset_key),this.autoStart&&this.sceneSprite.anims.play(this.key,!0),this.enableInteraction(e),this.enableAutoRestart(),this.automaticDestroyOnComplete(),this.sceneSprite.setDepth(this.y+this.sceneSprite.body.height),e.objectsAnimations[this.key]=this,this.gameManager.events.emitSync("reldens.createAnimationAfter",{animationEngine:this}),this.sceneSprite}automaticDestroyOnComplete(){this.destroyOnComplete&&this.sceneSprite.on("animationcomplete",()=>{this.currentAnimation?.destroy(),this.sceneSprite.destroy()},this)}enableAutoRestart(){this.restartTime&&this.sceneSprite.on("animationcomplete",()=>{setTimeout(()=>{this.sceneSprite.anims&&(this.sceneSprite.anims.restart(),this.sceneSprite.anims.pause())},this.restartTime)},this)}enableInteraction(e){this.isInteractive&&(this.sceneSprite.setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(a.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;let i=this.key===this.asset_key?this.id:this.key,n={act:s.OBJECT_INTERACTION,id:i,type:this.type};if(this.gameManager.activeRoomEvents.send(n),!this.targetName)return!1;let r=Object.assign({},e.player.currentTarget),o={id:i,type:s.TYPE_OBJECT};e.player.currentTarget=o,this.gameManager.gameEngine.showTarget(this.targetName,o,r)}),this.highlightOnOver&&(this.sceneSprite.on("pointerover",()=>{this.sceneSprite.setTint(this.highlightColor)}),this.sceneSprite.on("pointerout",()=>{this.sceneSprite.clearTint()})))}runAnimation(){if(!this.sceneSprite){n.error("Current animation not found: "+this.key);return}this.sceneSprite.anims.play(this.key,!0)}getPosition(){return{x:this.x,y:this.y}}createObjectAnimations(e){if(!e)return;let t=Object.keys(e);if(0!==t.length)for(let i of t){if(this.gameManager.createdAnimations[i]){this.currentPreloader.objectsAnimations[i]=this.gameManager.createdAnimations[i];continue}if(r.hasOwn(this.currentPreloader.objectsAnimations,i))continue;let t=e[i],n={key:i,frames:this.currentPreloader.anims.generateFrameNumbers(t.asset_key||this.asset_key,{start:t.start||this.frameStart,end:t.end||this.frameEnd}),frameRate:t.frameRate||this.frameRate,repeat:t.repeat||this.repeat,hideOnComplete:t.hideOnComplete||this.hideOnComplete,asset_key:t.asset_key||this.asset_key};this.currentPreloader.objectsAnimations[i]=this.currentPreloader.anims.create(n),this.gameManager.createdAnimations[i]=this.currentPreloader.objectsAnimations[i]}}}},{"69cb276730e319a6":"3lwy5","4aa72c897fe49299":"izuLV",e5f3f59c83d28a8d:"93TbC"}],"9u1ZW":[function(e,t,i){let{TraderObjectUi:n}=e("58811b04f3d9bb80"),{Logger:r,sc:s}=e("f04fad6c99485124");t.exports.ObjectsMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on ObjectsMessageListener.",e),!1;if(!s.get(t,"result",!1))return r.error("Missing result data on ObjectsMessageListener.",e),!1;if(!s.get(t,"id",!1))return r.error("Missing Object ID on ObjectsMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on ObjectsMessageListener.",e),!1;let a=new n({roomEvents:i,message:t});if(!a.validate())return!1;a.updateContents()}}},{"58811b04f3d9bb80":"h56Er",f04fad6c99485124:"3lwy5"}],h56Er:[function(e,t,i){let{ItemsConst:n}=e("6f47f46589411c74"),{ObjectsConst:r}=e("5d863b6194329ea"),{Logger:s,sc:a}=e("4eb12b9fd296bfd9");t.exports.TraderObjectUi=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.objectUi=this.roomEvents?.objectsUi[this.message?.id],this.setConfirmMessages()}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene?this.itemsManager?!!this.objectUi||(s.error("Missing objectUi on TraderObjectUi."),!1):(s.error("Missing ItemsManager on TraderObjectUi."),!1):(s.error("Missing UiScene on TraderObjectUi."),!1):(s.error("Missing GameManager on TraderObjectUi."),!1):(s.error("Missing message on TraderObjectUi."),!1):(s.error("Missing RoomEvents on TraderObjectUi."),!1)}setConfirmMessages(){if(!this.gameManager)return!1;this.confirmMessages={buy:this.gameManager.services.translator.t("objects.trader.buyConfirmed"),sell:this.gameManager.services.translator.t("objects.trader.sellConfirmed")}}updateContents(){let e=this.gameManager.gameDom.getElement("#box-"+this.objectUi.id+" .box-content");if(!e)return s.error('Missing container: "#box-'+this.objectUi.id+' .box-content".'),!1;let t=this.message.result.action;if(r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM===this.message.result.subAction)return e.innerHTML=this.confirmMessages[t],!0;let i=a.get(this.message.result,"items",!1),n=this.mapInventoryKeyFromAction(t),o=a.get(this.message.result,"exchangeData",!1),h=a.get(o,n,!1),c=this.message.result.exchangeRequirementsA||[],l=this.message.result.exchangeRewardsB||[];this.updateItemsList(i,t,c,l,e,h),this.updateExchangeData(h,t,c,l,i)}updateItemsList(e,t,i,n,r,s){if(!e)return;let o="",h={};for(let r of Object.keys(e)){let c=e[r],l=Object.assign({manager:this.itemsManager},c,{uid:r}),u=a.get(this.itemsManager.itemClasses,l.key,this.itemsManager.types.classByTypeId(l.type));h[r]=new u(l),h[r].quantityDisplay=1,h[r].quantityMaxDisplay=Math.max(h[r].qty_limit,c.qty),h[r].tradeAction=t,h[r].exchangeRequirements=this.fetchItemRequirements(l.key,i),h[r].exchangeRewards=this.fetchItemRewards(l.key,n),o+=this.createTradeItemBox(h[r],a.get(s,h[r].uid,!1))}r.innerHTML=this.createTradeContainer(t,o),this.activateItemsBoxActions(h),this.activateConfirmButtonAction(t)}activateConfirmButtonAction(e){let t=this.gameManager.gameDom.getElement(".confirm-"+e),i={act:r.OBJECT_INTERACTION,id:this.message.id,value:e,sub:r.TRADE_ACTIONS.CONFIRM};t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send(i)})}updateExchangeData(e,t,i,n,r){if(!1===e)return!1;let a=this.createConfirmItemsBox(e,r,t),o=null;return("buy"===t&&(o=this.gameDom.getElement(".trade-container-buy .trade-col.trade-col-2")),"sell"===t&&(o=this.gameDom.getElement(".trade-container-sell .trade-col.trade-col-1")),null===o)?(s.error('Missing "'+t+'" items container.',{message:this.message}),!1):(o.innerHTML=a,this.assignRemoveActions(e,r,t),!0)}createConfirmItemsBox(e,t,i){let r=Object.keys(e);if(0===r.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on confirmation trader-object-ui.",{message:this.message}),"";let a="",o=this.uiScene.cache.html.get("inventoryTradeItem");if(!o)return s.error('Missing template "inventoryTradeItem".'),"";for(let s of r){let r=e[s],h=t[s],c=n.TRADE_ACTIONS.BUY===i,l=n.TRADE_ACTIONS.SELL===i;a+=this.gameManager.gameEngine.parseTemplate(o,{key:h.key,label:h.label,description:h.description,id:s,qty:h.qty,hiddenClass:"",tradeRequirements:c?this.createTradeRequirementsContent(h):"",tradeRewards:l?this.createTradeRewardsContent(h):"",tradeAction:this.createTradeActionRemove(h),tradeActionKey:i,tradeQuantityContent:r})}return a}assignRemoveActions(e,t,i){let n=Object.keys(e);if(0===n.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on remove trader-object-ui.",{message:this.message}),!1;for(let e of n){let n=".trade-item-to-be-"+i+".trade-item-"+e,a=this.gameDom.getElement(n);if(!a){s.error('Assign trade item "'+e+'" container not found.',{message:this.message});continue}let o=this.gameDom.getElement(".trade-item-"+i+".trade-item-"+e+" .trade-action-remove");if(!o){s.error('Assign trade item "'+e+'" remove button not found.',{message:this.message});continue}let h=t[e];o.addEventListener("click",()=>{a.classList.remove("hidden");let t={act:r.OBJECT_INTERACTION,id:this.message.id,value:i,itemId:e,itemKey:h.key};t[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e,t){let i=this.uiScene.cache.html.get("inventoryTradeContainer");if(!i)return s.error('Missing template "inventoryTradeContainer".'),"";let a=this.message.result.lastErrorData;a?.itemUid&&(a.item=this.fetchItemLabelByUid(a.itemUid)),a?.requiredItemKey&&(a.requiredItem=this.fetchItemLabelByUid(a.requiredItemKey));let o=this.gameManager.services.translator.t(this.message.result.lastErrorMessage,a),h=n.TRADE_ACTIONS.BUY===e?t:"",c=n.TRADE_ACTIONS.SELL===e?t:"";return this.gameManager.gameEngine.parseTemplate(i,{tradeActionKey:e,confirmRequirements:"",lastErrorMessage:o,tradeActionLabel:r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM,tradeItemsBuy:h,tradeItemsSell:c})}fetchItemLabelByUid(e){return this.gameManager?.inventory?.manager?.items[e]?.label||this.message?.result?.items[e]?.label||""}fetchItemRequirements(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}fetchItemRewards(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return s.error('Missing template "inventoryTradeItem".'),"";let r=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!r)return s.error('Missing template "inventoryTradeItemQuantity".'),"";let a=n.TRADE_ACTIONS.BUY===e.tradeAction,o=n.TRADE_ACTIONS.SELL===e.tradeAction,h=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:r.OBJECT_INTERACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}mapInventoryKeyFromAction(e){return a.get({buy:"A",sell:"B"},e,!1)}}},{"6f47f46589411c74":"g4GOK","5d863b6194329ea":"izuLV","4eb12b9fd296bfd9":"3lwy5"}],g4GOK:[function(e,t,i){t.exports={ItemsServer:e("58ccb446d62c749b"),ItemsManager:e("99fbf686cf9954ad"),Inventory:e("d0e0bc002aa0626b"),ItemGroup:e("f76a9d92dd31d5bc"),ItemBase:e("8e9d5aa6534a13ad"),ItemEquipment:e("8451b91f0c937da4"),ItemUsable:e("106627cf30823e76"),ItemSingle:e("a73a08604f94da54"),ItemSingleEquipment:e("72395d9fa7948595"),ItemSingleUsable:e("6d04ae470a68a6bf"),ItemsFactory:e("f5eb7eeb5f537334"),ModelEntity:e("d4ce696862dbcd35"),ItemsConst:e("a5ef4f750b88ecba"),ItemsEvents:e("a180e01e5de133e0"),Receiver:e("33a340330572bf29"),ItemsDataGenerator:e("bf0687569e27057a"),GroupsDataGenerator:e("27ccd3cf572478fc"),ExchangePlatform:e("90218b41bb50ec4b"),ExchangeRequirement:e("c2601b545e947f39"),RequirementsCollection:e("72f6373fd251e1e3"),RequirementsProcessor:e("79f809e040670ce3"),ExchangeReward:e("3e52122617c11229"),RewardsCollection:e("6edee09b19b2994c"),RewardsProcessor:e("441790981610210a"),ItemsError:e("c48f961fa528324f")}},{"58ccb446d62c749b":"fCIqi","99fbf686cf9954ad":"5wpm2",d0e0bc002aa0626b:"8qkfQ",f76a9d92dd31d5bc:"3auVp","8e9d5aa6534a13ad":"gInMY","8451b91f0c937da4":"53uuI","106627cf30823e76":"d0orT",a73a08604f94da54:"lLwiJ","72395d9fa7948595":"a3dXh","6d04ae470a68a6bf":"9iH9y",f5eb7eeb5f537334:"lrNSa",d4ce696862dbcd35:"3ncwO",a5ef4f750b88ecba:"idEfG",a180e01e5de133e0:"fWlRm","33a340330572bf29":"2R9Cx",bf0687569e27057a:"nHDSk","27ccd3cf572478fc":"btt2J","90218b41bb50ec4b":"gRIlz",c2601b545e947f39:"4hpnF","72f6373fd251e1e3":"1wLI1","79f809e040670ce3":"kxCH2","3e52122617c11229":"iuvBV","6edee09b19b2994c":"hU2Lr","441790981610210a":"1sOiW",c48f961fa528324f:"eODT6"}],fCIqi:[function(e,t,i){let n=e("584cf2f2bf66f26b"),{StorageObserver:r}=e("3442076d73bd51e9"),s=e("906b84f8406328ec"),{Logger:a,ErrorManager:o,sc:h}=e("5ac154b5c4320dd9");t.exports=class{constructor(e){h.hasOwn(e,"owner")||o.error("Undefined owner."),this.manager=new n(e),this.createStorageObserver(e),this.createClient(e)}createClient(e){if(!h.hasOwn(e,"client"))return!1;this.client=new s({manager:this.manager,client:e.client})}createStorageObserver(e){if(!h.hasOwn(e,"persistence")||!e.persistence)return!1;let t=!1;if(h.hasOwn(e,"modelsManager")&&(t=e.modelsManager),!h.hasOwn(e.owner,"persistData")||"function"!=typeof e.owner.persistData)return a.error('Required method "persistData" not found in ItemServer props.owner.'),!1;this.dataServer=new r(this.manager,t),this.dataServer.listenEvents()}}},{"584cf2f2bf66f26b":"5wpm2","3442076d73bd51e9":"j7WCD","906b84f8406328ec":"3NxkK","5ac154b5c4320dd9":"3lwy5"}],"5wpm2":[function(e,t,i){let n=e("4fe5cf381ee58ab2"),r=e("419f5262e5a6365c"),s=e("bf63d9f42b20facf"),{ErrorManager:a,sc:o}=e("21ccb6baff6c486e");t.exports=class extends n{constructor(e){o.hasOwn(e,"owner")||a.error("Undefined owner."),super(e),this.itemClasses=o.get(e,"itemClasses",!1),this.groupClasses=o.get(e,"groupClasses",!1),this.itemsModelData=o.get(e,"itemsModelData",!1),this.ownerIdProperty=o.get(e,"ownerIdProperty","id"),this.owner=e.owner,this.groups={},this.eventsPrefix=this.getOwnerEventKey()+o.get(e,"eventsPrefix",""),this.types=new s}getOwnerId(){return this.owner[this.ownerIdProperty]}getOwnerEventKey(){return o.get(this.owner,"eventsPrefix","items.ownerId."+this.getOwnerId())}getOwnerUniqueEventKey(e){return(o.isFunction(this.owner.eventUniqueKey)?this.owner.eventUniqueKey():"items.ownerId."+this.getOwnerId()+".uKey."+o.getTime())+(e?"."+e:"")}async setup(e){await this.fireEvent(r.MANAGER_INIT,{props:e,manager:this}),o.hasOwn(e,"items")&&await this.setItems(e.items),o.hasOwn(e,"groups")&&await this.setGroups(e.groups)}createItemInstance(e,t){let i=o.get(this.itemsModelData,e,!1);if(!1===i)return!1;if(i.data.modifiers)for(let e of Object.keys(i.data.modifiers))i.data.modifiers[e].target=this.owner;let n=i.class.isSingleInstance(),r=void 0!==t&&n?t:1,s=Object.assign({},i.data,{manager:this,item_id:i.data.id,qty:r});if(delete s.uid,!0===n||1===r)return new i.class(s);let a=[];s.qty=1;for(let e=0;ethis.limitPerItem&&0<=this.limitPerItem?(this.setError("Cannot add item, item qty limit exceeded.",s.ERROR_CODES.ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM,{itemUid:t,qty:e.qty}),!1):(o.hasOwn(this.items,t)&&e.singleInstance?await this.increaseItemQty(t,e.qty):(await this.fireEvent(r.ADD_ITEM_BEFORE,this,e),this.items[t]=e,await this.fireEvent(r.ADD_ITEM,this,e)),this.items[t])}async addItems(e){for(let t of e)if(!await this.addItem(t))return this.setError('Cannot add item "'+t.getInventoryId()+'".',s.ERROR_CODES.ADD_ITEMS_ERROR,{itemUid:t.getInventoryId()}),!1;return!0}async setItem(e){if(this.locked)return this.setError("Inventory locked, cannot set item: "+e.getInventoryId(),s.ERROR_CODES.LOCKED_FOR_SET_ITEM,{itemUid:e.getInventoryId()}),!1;this.items[e.getInventoryId()]=e}async removeItem(e){return this.locked?(this.setError("Inventory locked, cannot remove item: "+e,s.ERROR_CODES.LOCKED_FOR_REMOVE_ITEM,{itemUid:e}),!1):o.hasOwn(this.items,e)?(await this.fireEvent(r.REMOVE_ITEM,this,e),delete this.items[e],!0):(this.setError("Cannot remove item, key not found: "+e,s.ERROR_CODES.KEY_NOT_FOUND,{itemUid:e}),!1)}async setItemQty(e,t){return this.modifyItemQty(s.SET,e,t)}async increaseItemQty(e,t){return this.modifyItemQty(s.INCREASE,e,t)}async decreaseItemQty(e,t){return this.modifyItemQty(s.DECREASE,e,t)}async modifyItemQty(e,t,i){if(this.locked)return this.setError("Inventory locked, cannot modify item qty: "+t,s.ERROR_CODES.LOCKED_FOR_MODIFY_ITEM_QTY,{itemUid:t}),!1;if(!o.hasOwn(this.items,t))return this.setError("Cannot "+e+" item qty, undefined item key: "+t,s.ERROR_CODES.UNDEFINED_ITEM_KEY_FOR_OPERATION,{itemUid:t,operation:e}),!1;if(isNaN(i))return this.setError("Cannot "+e+" item qty, qty is not a number: "+i,s.ERROR_CODES.QTY_NOT_A_NUMBER,{itemUid:t,operation:e,qty:i}),!1;if(this.limitPerItem>0&&i>this.limitPerItem&&(e===s.SET||e===s.INCREASE))return this.setError("Cannot "+e+" item qty, item qty limit exceeded: "+i+" > "+this.limitPerItem,s.ERROR_CODES.ITEM_QTY_LIMIT_EXCEEDED,{itemUid:t,operation:e,limitPerItem:this.limitPerItem}),!1;if(e===s.SET&&(this.items[t].qty=i),e===s.INCREASE&&(this.items[t].qty+=i),e===s.DECREASE){let e=this.items[t].qty-i;0>e&&(e=0),this.items[t].qty=e}return 0===this.items[t].qty&&this.items[t].autoRemoveItemOnZeroQty?(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),await this.removeItem(this.items[t].getInventoryId())):(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),!0)}async setItems(e){return this.locked?(this.setError("Inventory locked, cannot set items.",s.ERROR_CODES.LOCKED_FOR_SET_ITEMS),!1):(this.items=e,this.fireEvent(r.SET_ITEMS,{items:e,manager:this}))}async setGroups(e){return this.groups=e,this.fireEvent(r.SET_GROUPS,{groups:e,manager:this})}fireEvent(e,...t){return this.events.emit(this.eventFullName(e),...t)}listenEvent(e,t,i,n){return this.events.onWithKey(this.eventFullName(e),t,i,n)}eventFullName(e){return this.eventsPrefix+"."+e}setError(e="",t="",i={},r=!1){this.lastError=new n(e,t,i,r)}}},{adccac45c69ab6e8:"eODT6","2fd42dbc83a1dbf2":"fWlRm",bb9f4880ce8c412b:"idEfG","4bf1621a8608b780":"3lwy5"}],eODT6:[function(e,t,i){t.exports=class{constructor(e="",t="",i={},n=!1){this.message=e,this.code=t,this.data=i,this.withError=n}}},{}],fWlRm:[function(e,t,i){let n="reldens.items.";t.exports={PREF:n,MANAGER_INIT:n+"setup",EXCHANGE:{INITIALIZED:n+"initialized",CANCELED:n+"canceled",INVALID_PUSH:n+"invalidPush",ITEM_PUSHED:n+"itemPushed",ITEM_REMOVE:n+"itemRemove",CONFIRM:n+"confirm",DISCONFIRM:n+"disconfirm",BEFORE_FINALIZE:n+"beforeFinalize",FINALIZED:n+"finalized"},LOADED_OWNER_ITEMS:n+"loadedOwnerItems",SET_ITEMS:n+"setItems",SET_GROUPS:n+"setGroups",EQUIP_ITEM:n+"equipItem",UNEQUIP_ITEM:n+"unequipItem",ADD_ITEM:n+"addItem",ADD_ITEM_BEFORE:n+"addItemBefore",REMOVE_ITEM:n+"removeItem",MODIFY_ITEM_QTY:n+"modifyItemQty",EQUIP_BEFORE:n+"equipBefore",EQUIP:n+"equip",EXECUTING_ITEM:n+"executingItem",EXECUTED_ITEM:n+"executedItem",VALIDATE:n+"validate"}},{}],idEfG:[function(e,t,i){let n="rinv",r="items.",s="exchange.",a="requirements.",o="reward.",h="equipment.";t.exports={SET:"set",INCREASE:"increase",DECREASE:"decrease",ACTIONS_PREF:n,ACTION_ADD:n+"A",ACTION_REMOVE:n+"R",ACTION_MODIFY_QTY:n+"M",ACTION_EQUIP:n+"E",ACTION_UNEQUIP:n+"U",ACTION_MOD_APPLIED:n+"Ma",ACTION_MOD_REVERTED:n+"Mr",ACTION_EXECUTING:n+"Ex",ACTION_EXECUTED:n+"AExd",ACTION_MANAGER_INIT:n+"Mi",ACTION_SET_ITEMS:n+"Si",ACTION_SET_GROUPS:n+"Sg",BEHAVIOR_SEND:"send",BEHAVIOR_BROADCAST:"broadcast",BEHAVIOR_BOTH:"both",TYPES:{ITEM_BASE:10,EQUIPMENT:1,USABLE:2,SINGLE:3,SINGLE_EQUIPMENT:4,SINGLE_USABLE:5},TRADE_ACTIONS:{BUY:"buy",SELL:"sell",TRADE:"trade"},ERROR_CODES:{PREFIX:r,UNDEFINED_ITEM:r+"undefinedItem",UNDEFINED_METHOD_INVENTORY_ID:r+"undefinedMethodInventoryId",UNDEFINED_ITEM_KEY:r+"undefinedItemKey",INVALID_ITEM_INSTANCE:r+"invalidItemInstance",LOCKED_FOR_ADD_ITEM:r+"lockedForAddItem",MAX_TOTAL_REACHED_FOR_ADD_ITEM:r+"maxTotalReachedForAddItem",ITEM_EXISTS_FOR_ADD_ITEM:r+"itemExistsForAddItem",ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM:r+"itemLimitExceededForAddItem",ADD_ITEMS_ERROR:r+"addItemsError",LOCKED_FOR_SET_ITEM:r+"lockedForSetItem",LOCKED_FOR_REMOVE_ITEM:r+"lockedForRemoveItem",KEY_NOT_FOUND:r+"keyNotFound",LOCKED_FOR_MODIFY_ITEM_QTY:r+"lockedForModifyItemQty",UNDEFINED_ITEM_KEY_FOR_OPERATION:r+"undefinedItemKeyForOperation",QTY_NOT_A_NUMBER:r+"qtyNotANumber",ITEM_QTY_LIMIT_EXCEEDED:r+"itemQtyLimitExceeded",LOCKED_FOR_SET_ITEMS:r+"lockedForSetItems",EXCHANGE:{MISSING_CONFIRMATION:r+s+"missingConfirmation",INVALID_PUSHED_QUANTITY:r+s+"invalidPushedQuantity",INVALID_QUANTITY:r+s+"invalidQuantity",INVALID_EXCHANGE:r+s+"invalidExchange",DECREASE_QUANTITY:r+s+"decreaseQuantity",ITEM_ADD:r+s+"itemAdd"},REQUIREMENTS:{ITEM_NOT_PRESENT:r+a+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+a+"quantityNotAvailable",ITEM_NOT_PUSHED:r+a+"itemNotPushed",ITEM_QUANTITY_NOT_PUSHED:r+a+"itemQuantityNotPushed",ITEM_DOES_NOT_EXISTS:r+a+"itemDoesNotExists",ITEM_ADD:r+a+"itemAdd"},REWARD:{DOES_NOT_EXISTS:r+o+"doesNotExists",MISSING_ITEM:r+o+"missingItem",ITEM_NOT_PRESENT:r+o+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+o+"quantityNotAvailable",MISSING_PUSHED:r+o+"missingPushed",GET_ITEM_DOES_NOT_EXISTS:r+o+"getItemDoesNotExists",PROCESS_ITEM:r+o+"processItem",PROCESS_INVENTORY:r+o+"processInventory",ADD_ITEMS:r+o+"addItems",QUANTITY_OVERLOAD:r+o+"quantityOverload"},EQUIPMENT:{MODIFIERS_APPLY:r+h+"modifiersApply",MODIFIERS_REVERT:r+h+"modifiersRevert"}}}},{}],"8gXhx":[function(e,t,i){let n=e("ac10c481864dff83"),r=e("b75564ba303c5356"),s=e("957d5b5e4a423dca"),a=e("a3590f99276506ca"),o=e("dff4c8e33829a997"),h=e("5b2a69acfbc9bd6d"),c=e("ce977eaa6d463c01"),{sc:l}=e("5794f948bd319a4f");t.exports=class{constructor(){this.types={},this.types[n.TYPES.ITEM_BASE]=r,this.types[n.TYPES.EQUIPMENT]=s,this.types[n.TYPES.USABLE]=a,this.types[n.TYPES.SINGLE]=o,this.types[n.TYPES.SINGLE_EQUIPMENT]=h,this.types[n.TYPES.SINGLE_USABLE]=c}list(){return this.types}classByTypeId(e){return l.get(this.types,e.toString(),r)}}},{ac10c481864dff83:"idEfG",b75564ba303c5356:"gInMY","957d5b5e4a423dca":"53uuI",a3590f99276506ca:"d0orT",dff4c8e33829a997:"lLwiJ","5b2a69acfbc9bd6d":"a3dXh",ce977eaa6d463c01:"9iH9y","5794f948bd319a4f":"3lwy5"}],gInMY:[function(e,t,i){let n=e("c12e6ac2d5a93063"),r=e("c6965a9a447f564a"),{ErrorManager:s,sc:a}=e("e634cd5ec6f60b00");t.exports=class{constructor(e){a.hasOwn(e,"key")||s.error("Undefined item key."),a.hasOwn(e,"manager")||s.error("Undefined item manager."),this.key=e.key,this.uid=e.uid?e.uid:this.key+(e.id?"":e.id)+a.randomChars(8),this.id=a.get(e,"id",null),this.item_id=a.get(e,"item_id",null),this.label=a.get(e,"label",""),this.description=a.get(e,"description",""),this.manager=e.manager,this.type=a.get(e,"type",n.TYPES.ITEM_BASE),this.qty=a.get(e,"qty",0),this.remaining_uses=e.remaining_uses||0,this.is_active=a.get(e,"is_active",!1),this.group_id=a.get(e,"group_id",!1),this.qty_limit=a.get(e,"qty_limit",!1),this.uses_limit=a.get(e,"uses_limit",!1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0),this.useTimeOut=a.get(e,"useTimeOut",!1),this.execTimeOut=a.get(e,"execTimeOut",!1),this.modifiers=a.get(e,"modifiers",{}),this.target=!1,this.singleInstance=!1,this.rawCustomData=a.get(e,"customData",{});let t="string"==typeof this.rawCustomData?a.toJson(this.rawCustomData,{}):this.rawCustomData;null!==t&&"object"==typeof t&&0=t.length)return;let i=e?"revert":"apply";for(let e of t)this.modifiers[e][i](this.target);return this.manager.fireEvent(r.EQUIP+(e?"Reverted":"Applied")+"Modifiers",this)}isType(e){return this.type===e}async fireEvent(e,...t){return this.manager.fireEvent(e,...t)}listenEvent(e,t,i,n){return this.manager.listenEvent(e,t,i,n)}}},{c12e6ac2d5a93063:"idEfG",c6965a9a447f564a:"fWlRm",e634cd5ec6f60b00:"3lwy5"}],"53uuI":[function(e,t,i){let n=e("33cdc889b48aacb0"),r=e("c5fbc38955884411"),s=e("8ae98c100e6c951f"),{sc:a}=e("bcc3d9fdf3135034");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.EQUIPMENT,this.equipped=a.get(e,"equipped",!1)}async equip(e){if(this.equipped=!0,await this.manager.fireEvent(s.EQUIP_ITEM,this),!1===e||!1===this.manager.applyModifiersAuto)return!1;await this.applyModifiers()}async unequip(e){if(this.equipped=!1,await this.manager.fireEvent(s.UNEQUIP_ITEM,this),!1===e||!1===this.manager.revertModifiersAuto)return!1;await this.revertModifiers()}async applyModifiers(){return this.equipped?await super.applyModifiers():(this.manager.setError("Cannot apply modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_APPLY,{itemUid:this.getInventoryId()}),!1)}async revertModifiers(){return this.equipped?(this.manager.setError("Cannot revert modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_REVERT,{itemUid:this.getInventoryId()}),!1):await super.revertModifiers()}}},{"33cdc889b48aacb0":"gInMY",c5fbc38955884411:"idEfG","8ae98c100e6c951f":"fWlRm",bcc3d9fdf3135034:"3lwy5"}],d0orT:[function(e,t,i){let n=e("73e1b5628e255757"),r=e("da3e74df899b07c1"),s=e("31d1c1f3f78c977b"),{sc:a}=e("ba8c76a702e812f2");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.USABLE,this.uses=a.get(e,"uses",1),this.currentUses=this.uses,this.usesLimit=a.get(e,"usesLimit",!1),this.canUse=!0,this.removeAfterUse=!0,this.useTimeOut=!1,this.useTimer=!1,this.execTimeOut=!1,this.execTimer=!1,this.removeQtyAfterUse=a.get(e,"removeQtyAfterUse",1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0)}async use(e=!1){if(!this.canUse||0>=this.currentUses)return!1;if(e&&(this.target=e),this.useTimeOut&&(this.canUse=!1,this.useTimer=setTimeout(async()=>{this.canUse=!0},this.useTimeOut)),await this.manager.fireEvent(s.EXECUTING_ITEM,this),!1===this.execTimeOut){await this.executeItem();return}this.execTimer=setTimeout(async()=>{await this.executeItem()},this.execTimeOut)}async executeItem(){return await this.applyModifiers(),this.currentUses--,!this.removeAfterUse||0t}le(e,t){return e<=t}ge(e,t){return e>=t}}},{"7f32cc4f678fee29":"3lwy5","3ddfbc21a5968711":"7bVCu",ccbf83a7cf179d24:"4bERK"}],"7bVCu":[function(e,t,i){let{ErrorManager:n,sc:r}=e("6ef89030f5a59b76");t.exports=class{getPropertyValue(e,t){return this.manageOwnerProperty(e,t)}setOwnerProperty(e,t,i){return this.manageOwnerProperty(e,t,i)}manageOwnerProperty(e,t,i){let n=t.split("/"),r=this.extractDeepProperty(e,n),s=n.pop();return void 0!==i&&(r[s]=i),r[s]}extractDeepProperty(e,t){let i=[...t],s=i.shift();return(r.hasOwn(e,s)||n.error('Property "'+s+'" from path parts: "'+t.join("/")+'"] owner invalid value: '+e[s]+"."),1this.maxValue&&(e=this.maxValue),this.minProperty){let t=this.getPropertyValue(this.minProperty);t&&et&&(e=t)}return e}getPropertyValue(e){return this.propertyManager.getPropertyValue(this.target,e)}setOwnerProperty(e,t){return this.propertyManager.setOwnerProperty(this.target,e,t)}}},{"466f1d6a713f27d":"15YIL","3a9190386e2c269":"jefAk",a7b06831aaf035e5:"7bVCu","3a11d9dd77bf6747":"4bERK","994144a57bf406a1":"3lwy5"}],"3NxkK":[function(e,t,i){let n=e("b644d789ee2b40af"),r=e("45ba412a65c2e357"),{PropertyManager:s}=e("994236dc9aef1f79"),{Logger:a,sc:o}=e("8b1efebe48a67288");t.exports=class{constructor(e){this.client=o.get(e,"client",!1),this.manager=o.get(e,"manager",!1),this.sendProperties=o.get(e,"sendProperties",{}),!1===o.hasOwn(e,"sendProperties")&&this.defineBehaviorForProperties(),this.sendTargetProps=o.hasOwn(e,"sendTargetProps")?e.sendTargetProps:{broadcast:[],send:[]},this.propertyManager=new s,this.listenEvents()}validateManager(){return!!this.manager||(a.critical("Undefined manager for Sender."),!1)}validateClient(){return this.client?o.isObjectFunction(this.client,"send")?!!o.isObjectFunction(this.client,"broadcast")||(a.critical('Required method "broadcast" not found in client.',this.client),!1):(a.critical('Required method "send" not found in client.',this.client,typeof this.client.send),!1):(a.critical("Undefined client for Sender."),!1)}defineBehaviorForProperties(e){e||(e={});let t=n.BEHAVIOR_SEND,i=n.BEHAVIOR_BROADCAST;this.setPropertyBehavior(n.ACTION_ADD,e,{behavior:t,send:["id","key","type","qty","label","description","group_id","qty_limit","uses_limit","useTimeOut","execTimeOut","remaining_uses","is_active"]}),this.setPropertyBehavior(n.ACTION_REMOVE,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MODIFY_QTY,e,{behavior:t,send:["id","key","qty"]}),this.setPropertyBehavior(n.ACTION_MOD_APPLIED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MOD_REVERTED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_UNEQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EXECUTING,e,{behavior:i,broadcast:["id","key","animationData"]}),this.setPropertyBehavior(n.ACTION_EXECUTED,e,{behavior:t,send:["id","key"]})}setPropertyBehavior(e,t,i){o.hasOwn(t,e)&&(this.sendProperties[e]=t[e]),this.sendProperties[e]=i}getItemProperties(e,t,i){if(!o.hasOwn(this.sendProperties,t))return a.critical("Undefined action while getting item properties.",{action:t,sendProperties:this.sendProperties}),!1;if(!o.hasOwn(this.sendProperties[t],i))return a.critical("Undefined behavior while getting item properties.",{behavior:i,action:t,sendProperties:this.sendProperties}),!1;let n={idx:e.getInventoryId()};for(let r of this.sendProperties[t][i]){if(!o.hasOwn(e,r)){a.info("Undefined property: "+r,e);continue}n[r]=e[r]}return n}listenEvents(){if(!this.validateManager())return!1;let e=this.manager.getOwnerEventKey();this.manager.listenEvent(r.ADD_ITEM,this.sendAddItemData.bind(this),this.manager.getOwnerUniqueEventKey("addItemSend"),e),this.manager.listenEvent(r.REMOVE_ITEM,this.sendRemoveItemData.bind(this),this.manager.getOwnerUniqueEventKey("removeItemSend"),e),this.manager.listenEvent(r.MODIFY_ITEM_QTY,this.sendModifyItemQuantityData.bind(this),this.manager.getOwnerUniqueEventKey("modifyItemQtySend"),e),this.manager.listenEvent(r.EQUIP_ITEM,this.sendEquipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemSend"),e),this.manager.listenEvent(r.UNEQUIP_ITEM,this.sendUnequipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("unequipItemSend"),e),this.manager.listenEvent(r.EQUIP+"AppliedModifiers",this.sendEquipItemAppliedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemAppliedModifiersSend"),e),this.manager.listenEvent(r.EQUIP+"RevertedModifiers",this.sendEquipItemRevertedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemRevertedModifiersSend"),e),this.manager.listenEvent(r.EXECUTING_ITEM,this.sendExecutingItemData.bind(this),this.manager.getOwnerUniqueEventKey("executingItemSend"),e),this.manager.listenEvent(r.EXECUTED_ITEM,this.sendExecutedItemData.bind(this),this.manager.getOwnerUniqueEventKey("executedItemSend"),e),this.manager.listenEvent(r.SET_ITEMS,this.sendSetItemsData.bind(this),this.manager.getOwnerUniqueEventKey("setItemsSend"),e),this.manager.listenEvent(r.SET_GROUPS,this.sendSetGroupsData.bind(this),this.manager.getOwnerUniqueEventKey("setGroupsSend"),e)}async sendSetGroupsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i={};for(let t of Object.keys(e.groups)){let{id:n,key:r,label:s,description:a,sort:o}=e.groups[t];i[r]={id:n,key:r,label:s,description:a,sort:o}}return await this.client.send({act:n.ACTION_SET_GROUPS,owner:t,groups:i})}async sendSetItemsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i=this.extractItemsDataForSend(e.items);return await this.client.send({act:n.ACTION_SET_ITEMS,owner:t,items:i})}async sendExecutedItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTED)}async sendExecutingItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTING)}async sendEquipItemRevertedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_REVERTED)}async sendEquipItemAppliedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_APPLIED)}async sendUnequipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_UNEQUIP)}async sendEquipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EQUIP)}async sendModifyItemQuantityData(e,t,i,r,s){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MODIFY_QTY)}async sendRemoveItemData(e,t){let i=e.items[t];return i?await this.runBehaviors(i,i.manager.getOwnerId(),n.ACTION_REMOVE):(a.debug('Item with key "'+t+'" not found.'),!1)}async sendAddItemData(e,t){return await this.runBehaviors(t,t.manager.getOwnerId(),n.ACTION_ADD)}extractItemsDataForSend(e){let t={};for(let i of Object.keys(e)){let r=e[i],s=this.getItemProperties(r,n.ACTION_ADD,n.BEHAVIOR_SEND);s.singleInstance=r.singleInstance,t[r.getInventoryId()]=s}return t}async runBehaviors(e,t,i){if(!e)return a.warning('Invalid "item" parameter.'),!1;if(!this.validateManager()||!this.validateClient())return!1;if(this.manager.getOwnerId()!==t)return a.warning("Item owner ID miss match.",this.manager.getOwnerId(),t),!1;let r=this.sendProperties[i],s=this.getTargetProps(e,r.behavior),o=r.behavior===n.BEHAVIOR_BOTH;if(r.behavior===n.BEHAVIOR_BROADCAST||o){let r=this.getItemProperties(e,i,n.BEHAVIOR_BROADCAST);await this.client.broadcast({act:i,owner:t,item:r,target:s});return}let h=r.behavior===n.BEHAVIOR_SEND,c=r[n.BEHAVIOR_SEND]!==r[n.BEHAVIOR_BROADCAST];if(h||o&&c){let r=this.getItemProperties(e,i,n.BEHAVIOR_SEND);await this.client.send({act:i,owner:t,item:r,targetProps:s})}}getTargetProps(e,t){let i=t===n.BEHAVIOR_BOTH?n.BEHAVIOR_BROADCAST:n.BEHAVIOR_SEND;if(!1===o.hasOwn(this.sendTargetProps,i)||0===this.sendTargetProps[i].length)return{};let r={};for(let t of this.sendTargetProps[i]){let i="id"===t?this.manager.ownerIdProperty:t;r[i]=this.propertyManager.getPropertyValue(e.target,i)}return r}}},{b644d789ee2b40af:"idEfG","45ba412a65c2e357":"fWlRm","994236dc9aef1f79":"iJUHo","8b1efebe48a67288":"3lwy5"}],"3auVp":[function(e,t,i){let n=e("fddf8c3cc708201b"),{ErrorManager:r,sc:s}=e("c1c82d06c77e78b8");t.exports=class extends n{constructor(e){s.hasOwn(e,"id")||r.error("Undefined ItemGroup id."),s.hasOwn(e,"key")||r.error("Undefined ItemGroup key."),e.eventsPref="g"+e.key+"."+s.get(e,"eventsPrefix",""),super(e),this.id=e.id,this.key=e.key,this.label=s.get(e,"label",!1),this.description=s.get(e,"description",!1),this.files_name=s.get(e,"files_name",!1),this.sort=s.get(e,"sort",!1),this.items_limit=s.get(e,"items_limit",!1),this.limit_per_item=s.get(e,"limit_per_item",!1)}}},{fddf8c3cc708201b:"8qkfQ",c1c82d06c77e78b8:"3lwy5"}],"3ncwO":[function(e,t,i){t.exports=class{constructor(e){this.id=e.id,this.key=e.key,this.type=e.type}}},{}],"2R9Cx":[function(e,t,i){let n=e("312a2d95cff483b5"),r=e("f647b9be5cb5de72"),s=e("2edbed84bfb41fb4"),{ErrorManager:a,Logger:o,sc:h}=e("a231b7a801915a72");t.exports=class{constructor(e){h.hasOwn(e,"owner")||a.error("Undefined owner."),this.manager=h.hasOwn(e,"manager")?e.manager:new n(e),this.actions=h.hasOwn(e,"actions")?e.actions:{},!1===h.get(e,"avoidDefaults",!1)&&this.setDefaultActions(),this.recieveErrorsLog=[]}setDefaultActions(){this.actions[r.ACTION_SET_ITEMS]="onSetItems",this.actions[r.ACTION_SET_GROUPS]="onSetGroups",this.actions[r.ACTION_ADD]="onAddItem",this.actions[r.ACTION_REMOVE]="onRemoveItem",this.actions[r.ACTION_MODIFY_QTY]="onSetQty",this.actions[r.ACTION_EQUIP]="onEquipItem",this.actions[r.ACTION_UNEQUIP]="onUnequipItem",this.actions[r.ACTION_MOD_APPLIED]="onModifiersApplied",this.actions[r.ACTION_MOD_REVERTED]="onModifiersReverted",this.actions[r.ACTION_EXECUTING]="onExecuting",this.actions[r.ACTION_EXECUTED]="onExecuted"}processMessage(e){let t=h.get(e,"act","");return 0===t.indexOf(r.ACTIONS_PREF)&&(h.hasOwn(this.actions,t)?"function"!=typeof this[this.actions[t]]?(o.info("Items action is not a function.",e.act),!1):void this[this.actions[t]](e):(o.error("Items action not found",t,e),!1))}onSetItems(e){let t={};for(let i of Object.keys(e.items)){let n=e.items[i],s=Object.assign({manager:this.manager},n,{uid:i}),a=this.getItemClass(s.key,s.type);t[i]=new a(s),t[i].isType(r.TYPES.EQUIPMENT)&&h.hasOwn(s,"is_active")&&(t[i].equipped=1===s.is_active)}return this.manager.setItems(t)}onSetGroups(e){let t={};for(let i of Object.keys(e.groups)){let n=this.getGroupClass(e.groups[i].key);t[e.groups[i].key]=new n(e.groups[i])}return this.manager.setGroups(t)}onAddItem(e){let t=Object.assign({manager:this.manager},e.item,{uid:e.item.idx}),i=new(this.getItemClass(t.key,t.type))(t);this.manager.addItem(i).catch(e=>{this.recieveErrorsLog.push({"Error receiver onAddItem.":e})})}onRemoveItem(e){this.manager.removeItem(e.item.idx).catch(e=>{this.recieveErrorsLog.push({"Error receiver onRemoveItem.":e})})}onSetQty(e){this.manager.setItemQty(e.item.idx,e.item.qty).catch(e=>{this.recieveErrorsLog.push({"Error receiver onSetQty.":e})})}onEquipItem(e){this.manager.items[e.item.idx].equip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onEquipItem.":e})})}onUnequipItem(e){this.manager.items[e.item.idx].unequip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onUnequipItem.":e})})}onModifiersApplied(e){}onModifiersReverted(e){}onExecuting(e){}onExecuted(e){}getItemClass(e,t){return h.get(this.manager.itemClasses,e,this.manager.types.classByTypeId(t))}getGroupClass(e){let t=s;return h.hasOwn(this.manager.groupClasses,e)&&(t=this.manager.groupClasses[e]),t}}},{"312a2d95cff483b5":"5wpm2",f647b9be5cb5de72:"idEfG","2edbed84bfb41fb4":"3auVp",a231b7a801915a72:"3lwy5"}],nHDSk:[function(e,t,i){let n=e("3dd92880a486247f"),{ModifierConst:r,Modifier:s}=e("293ce1d1ff60486a"),{sc:a}=e("45aa0d32b8aa311b");t.exports=class{static itemsListMappedData(e={},t){if(0===t.length)return{};let i={},r=new n;for(let n of t)n.items_modifiers&&(n.modifiers=this.generateItemModifiers(n)),i[n.key]={class:a.get(e,n.key,r.classByTypeId(n.type)),data:n};return i}static generateItemModifiers(e){let t={};for(let i of e.items_modifiers)i.operation!==r.OPS.SET&&(i.value=Number(i.value)),t[i.id]=new s(i);return t}}},{"3dd92880a486247f":"8gXhx","293ce1d1ff60486a":"iJUHo","45aa0d32b8aa311b":"3lwy5"}],btt2J:[function(e,t,i){let{ItemGroup:n}=e("185572600d1291f"),{sc:r}=e("99c50def0f4abb2");t.exports=class{static groupsListMappedData(e,t){if(0===t.length)return{};let i={groupList:{},groupBaseData:{}};for(let n of(i.groupModels=t,t))this.addGroup(n,i,e);return i}static appendGroup(e,t,i){return!!e&&!!t&&!!i&&(r.isArray(t.groupModelsList)||(t.groupModelsList=[]),t.groupModelsList.push(e),this.addGroup(i,e,t),t)}static addGroup(e,t,i){let s=r.get(i,e.key,n),{id:a,key:o,label:h,description:c,sort:l,files_name:u}=e;t.groupList[e.key]={class:s,data:e},t.groupBaseData[o]={id:a,key:o,label:h,description:c,sort:l,files_name:u}}}},{"185572600d1291f":"3auVp","99c50def0f4abb2":"3lwy5"}],gRIlz:[function(e,t,i){let n=e("9ec9f370c69b97e4"),r=e("5bd56f616649a07e"),s=e("f6c0b56ddc826cd5"),a=e("e433549ba9a6abfc"),o=e("24c35dc83734e5b2"),h=e("330f7364569544ad"),c=e("332ac9b4e9ced220"),{EventsManagerSingleton:l,ErrorManager:u,Logger:d,sc:f}=e("71720c1a95ddc1ce");t.exports=class{constructor(e){this.events=f.get(e,"eventsManager",l),this.requirementsProcessor=new s,this.rewardsProcessor=new a,this.exchangeInitializerId=f.get(e,"exchangeInitializerId",!1),this.initializeProperties()}initializeExchangeBetween(e){let t=f.get(e,"inventoryA",null),i=f.get(e,"inventoryB",null);(null===t||null===i)&&u.error("Missing inventories from properties.",e),this.inventories={A:t,B:i},this.lockInventories(),this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:f.get(e,"exchangeRequirementsA",new n),B:f.get(e,"exchangeRequirementsB",new n)},this.exchangeRewards={A:f.get(e,"exchangeRewardsA",new r),B:f.get(e,"exchangeRewardsB",new r)},this.dropExchange={A:f.get(e,"dropExchangeA",!1),B:f.get(e,"dropExchangeB",!1)},this.avoidExchangeDecrease={A:f.get(e,"avoidExchangeDecreaseA",!1),B:f.get(e,"avoidExchangeDecreaseB",!1)},this.setError(),this.events.emit(h.EXCHANGE.INITIALIZED,{exchangePlatform:this,props:e,inventoryA:t,inventoryB:i})}setError(e="",t="",i={},n=!1){this.lastError=new o(e,t,i,n)}cancelExchange(){this.unlockInventories(),this.initializeProperties(),this.events.emit(h.EXCHANGE.CANCELED,{exchangePlatform:this})}initializeProperties(){this.inventories={A:null,B:null},this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:[],B:[]},this.exchangeRewards={A:[],B:[]},this.setError()}async pushForExchange(e,t,i){return this.confirmations.A||this.confirmations.B?(d.info('Push for exchange "'+e+'" was blocked. Exchange for "'+i+'" and owner "'+this.inventories[i].owner_id+'" was already confirmed.'),!1):this.canBePushed(e,t,i)?(this.exchangeBetween[i][e]=t,this.validateRequirements("A")&&this.validateRewards("A")&&this.validateRequirements("B")&&this.validateRewards("B"))?(this.events.emit(h.EXCHANGE.ITEM_PUSHED,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!0):(delete this.exchangeBetween[i][e],!1):(this.events.emit(h.EXCHANGE.INVALID_PUSH,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!1)}async removeFromExchange(e,t){return this.confirmations.A||this.confirmations.B?(d.info('Remove from exchange "'+e+'" was blocked. Exchange for "'+t+'" and owner "'+this.inventories[t].owner_id+'" was already confirmed.'),!1):(this.events.emit(h.EXCHANGE.ITEM_REMOVE,{exchangePlatform:this,itemUid:e,inventoryKey:t}),!!f.hasOwn(this.exchangeBetween[t],e)&&(delete this.exchangeBetween[t][e],!0))}async confirmExchange(e){this.events.emit(h.EXCHANGE.CONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!0}async disconfirmExchange(e){this.events.emit(h.EXCHANGE.DISCONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!1}async finalizeExchange(){return(this.events.emit(h.EXCHANGE.BEFORE_FINALIZE,{exchangePlatform:this}),this.confirmations.A&&this.confirmations.B)?!!(this.validateRequirements("A")&&this.validateRequirements("B")&&this.validateRewards("A")&&this.validateRewards("B"))&&(this.unlockInventories(),!1!==await this.executeExchangeFromTo("A","B")&&!1!==await this.executeExchangeFromTo("B","A")&&(this.events.emit(h.EXCHANGE.FINALIZED,{exchangePlatform:this}),this.setError(),!0)):(this.setError("Missing confirmation.",c.ERROR_CODES.EXCHANGE.MISSING_CONFIRMATION,{confirmations:this.confirmations}),!1)}validateRequirements(e){return this.requirementsProcessor.validateRequirements(e,this)}validateRewards(e){return this.rewardsProcessor.validateRewards(e,this)}lockInventories(){this.setLocks(!0)}unlockInventories(){this.setLocks(!1)}setLocks(e){this.setInventoryLock("A",e),this.setInventoryLock("B",e)}setInventoryLock(e,t){let i=f.get(this.inventories,e,!1);return null!==i&&(!1===i?(d.error('Inventory not found "'+e+'".',this.inventories),!1):(i.locked=t,!0))}canBePushed(e,t,i){if(!f.hasOwn(this.inventories[i].items,e))return d.critical("Item Key does not exists on the inventory",e,this.inventories[i].items),!1;let n=this.inventories[i].items[e],r=t<=n.qty||-1===n.qty;return r||this.setError("Invalid item pushed quantity ("+t+"), available: "+n.qty,c.ERROR_CODES.EXCHANGE.INVALID_PUSHED_QUANTITY,{itemUid:e,qty:t,pushedItemQty:n.qty}),r}async executeExchangeFromTo(e,t){if(e===t)return this.setError('Inventories "FROM" and "TO" are the same, exchange cancelled.',c.ERROR_CODES.EXCHANGE.INVALID_EXCHANGE),this.cancelExchange(),this.inventories;let i=this.inventories[e],n=this.inventories[t];for(let r of Object.keys(this.exchangeBetween[e])){let s=this.exchangeBetween[e][r];if(0===s)return this.setError("Invalid item quantity 0.",c.ERROR_CODES.EXCHANGE.INVALID_QUANTITY,{itemUid:r}),!1;let a=!1===this.dropExchange[t]&&n.createItemInstance(i.items[r].key,s);if(!1===await this.rewardsProcessor.processRewards(e,t,r,i,n,this)||!1===await this.requirementsProcessor.processRequirements(e,t,r,s,i,n,this))return!1;let o=!0;if(!1===this.avoidExchangeDecrease[e]&&(i.frozenItems[r]=Object.assign({},i.items[r]),o=await i.decreaseItemQty(r,s)),!1===o)return this.setError("Exchange inventory decrease error.",c.ERROR_CODES.EXCHANGE.DECREASE_QUANTITY,{itemUid:r},i.lastError),!1;if(!1===this.dropExchange[t]){let e=f.isArray(a)?a:[a];if(!1===await n.addItems(e))return this.setError("Exchange add inventory result error.",c.ERROR_CODES.EXCHANGE.ITEM_ADD,{itemUid:r},n.lastError),!1}}return this.exchangeBetween[e]={},this.inventories}oppositeKey(e){return"A"===e?"B":"A"}}},{"9ec9f370c69b97e4":"1wLI1","5bd56f616649a07e":"hU2Lr",f6c0b56ddc826cd5:"kxCH2",e433549ba9a6abfc:"1sOiW","24c35dc83734e5b2":"eODT6","330f7364569544ad":"fWlRm","332ac9b4e9ced220":"idEfG","71720c1a95ddc1ce":"3lwy5"}],"1wLI1":[function(e,t,i){let n=e("dda1e92f871afe97"),{sc:r}=e("ce7f52b0d100b8f7");t.exports=class{constructor(e){this.requirements=r.get(e,"requirements",[])}count(){return this.requirements.length}add(e,t,i,r,s){this.requirements.push(new n({itemUid:e,itemKey:t,requiredItemKey:i,requiredQuantity:r,autoRemoveRequirement:s}))}remove(e){let t=!1,i=0;for(let n of this.requirements){if(n.itemUid===e){t=!0;break}i++}t&&delete this.requirements[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.requirements,e,t)}}},{dda1e92f871afe97:"4hpnF",ce7f52b0d100b8f7:"3lwy5"}],"4hpnF":[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.requiredItemKey=e.requiredItemKey,this.requiredQuantity=Number(e.requiredQuantity),this.autoRemoveRequirement=!!e.autoRemoveRequirement}}},{}],hU2Lr:[function(e,t,i){let n=e("c75245438c2a820e"),{sc:r}=e("74cd247a8747612e");t.exports=class{constructor(e){this.rewards=r.get(e,"rewards",[])}count(){return this.rewards.length}add(e,t,i,r,s){this.rewards.push(new n({itemUid:e,itemKey:t,rewardItemKey:i,rewardQuantity:r,rewardItemIsRequired:s}))}remove(e){let t=!1,i=0;for(let n of this.rewards){if(n.itemUid===e){t=!0;break}i++}t&&delete this.rewards[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.rewards,e,t)}}},{c75245438c2a820e:"iuvBV","74cd247a8747612e":"3lwy5"}],iuvBV:[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.rewardItemKey=e.rewardItemKey,this.rewardQuantity=Number(e.rewardQuantity),this.rewardItemIsRequired=!!e.rewardItemIsRequired}}},{}],kxCH2:[function(e,t,i){let n=e("b11112aa3d4db9e4"),{Logger:r,sc:s}=e("5342d6a91ce0343f");t.exports=class{constructor(e){this.requirementsByItemUid=s.get(e,"requirementsByItemUid",!0),this.requirementsByItemKey=s.get(e,"requirementsByItemKey",!0),this.requirementsTotals={}}validateRequirements(e,t){let i=t.exchangeRequirements[e];if(0===i.count())return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;this.requirementsTotals={};let o=t.oppositeKey(e);for(let h of a){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.DOES_NOT_EXISTS,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRequirements(i,l);if(0!==u.length&&(this.plusRequirementsQuantity(u,a),!this.validateItemRequirements(u,r[h],o,t)))return!1}return!0}fetchItemRequirements(e,t){let i=[];return this.requirementsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.requirementsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRequirementsQuantity(e,t){for(let i of e)s.hasOwn(this.requirementsTotals,i.requiredItemKey)||(this.requirementsTotals[i.requiredItemKey]=0),this.requirementsTotals[i.requiredItemKey]+=i.requiredQuantity*t}validateItemRequirements(e,t,i,r){if(0===e.length)return!0;for(let a of e){let e=r.inventories[i].findItemByKey(a.requiredItemKey);if(!1===e)return r.setError('Required item "'+a.requiredItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PRESENT,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;let o=a.requiredQuantity*t;if(o>e.qty)return r.setError('Required item "'+a.requiredItemKey+'" required quantity ('+o+') is not available on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.QUANTITY_NOT_AVAILABLE,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1;if(!0===a.autoRemoveRequirement)continue;let h=s.get(r.exchangeBetween[i],e.uid,!1);if(!1===h&&!1===a.autoRemoveRequirement)return r.setError('Required item "'+a.requiredItemKey+'" was not pushed for exchange "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;if(o>h)return r.setError("Required item "+a.requiredItemKey+" required quantity ("+o+") was not pushed for exchange.",n.ERROR_CODES.REQUIREMENTS.ITEM_QUANTITY_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1}return!0}async processRequirements(e,t,i,a,o,h,c){let l=s.get(o.items,i,s.get(o.frozenItems,i,!1));if(!1===l)return c.setError('Requirement error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REQUIREMENTS.ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let u=c.exchangeRequirements[e];if(!u||0===u.count())return!0;let d=this.fetchItemRequirements(u,l);if(0===d.length)return!0;for(let e of d){if(!1===s.get(c.exchangeBetween[t],e.requiredItemKey,!1)&&!1===e.autoRemoveRequirement)return!1;let l=h.findItemByKey(e.requiredItemKey);if(!1===l)return r.error("The required item not longer exists.",i,e.requiredItemKey),!1;let u=e.requiredQuantity*a,d=!1===h.dropExchange&&o.createItemInstance(e.requiredItemKey,u);if(h.frozenItems[l.uid]=Object.assign({},l),!1===await h.decreaseItemQty(l.uid,u))return r.error("There was an error while decreasing the required item quantity.",e,l),!1;if(!1!==d){let e=s.isArray(d)?d:[d];if(!1===await h.addItems(e))return c.setError("Requirement add item error.",n.ERROR_CODES.REQUIREMENTS.ITEM_ADD,{},h.lastError),!1}}return!0}}},{b11112aa3d4db9e4:"idEfG","5342d6a91ce0343f":"3lwy5"}],"1sOiW":[function(e,t,i){let n=e("bddde17fed05deaa"),{Logger:r,sc:s}=e("918bdf09bd16e1b2");t.exports=class{constructor(e){this.rewardsByItemUid=s.get(e,"rewardsByItemUid",!0),this.rewardsByItemKey=s.get(e,"rewardsByItemKey",!0),this.rewardsTotals={}}validateRewards(e,t){let i=t.exchangeRewards[e];if(0===i.length)return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;let o=t.oppositeKey(e);for(let h of(this.rewardsTotals={},a)){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.MISSING_ITEM,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRewards(i,l);if(!1!==u&&0!==u.length&&(this.plusRewardsQuantity(u,a),!this.validateItemRewards(u,a,o,t)))return!1}return!0}fetchItemRewards(e,t){if(!t)return r.error("Item does not exits on inventory.",t),!1;let i=[];return this.rewardsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.rewardsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRewardsQuantity(e,t){for(let i of e)s.hasOwn(this.rewardsTotals,i.rewardItemKey)||(this.rewardsTotals[i.rewardItemKey]=0),this.rewardsTotals[i.rewardItemKey]+=i.rewardQuantity*t}validateItemRewards(e,t,i,r){if(0===e.length)return!0;for(let t of e){if(!1===t.rewardItemIsRequired)continue;let e=r.inventories[i].findItemByKey(t.rewardItemKey);if(!1===e)return r.setError('Reward item "'+t.rewardItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:t.rewardItemKey,inventoryKeyTo:i}),!1;if(this.rewardsTotals[t.rewardItemKey]>e.qty)return r.setError("Reward item "+t.rewardItemKey+" reward quantity ("+t.rewardQuantity+') is not available on inventory "'+i+'".',n.ERROR_CODES.REWARD.QUANTITY_NOT_AVAILABLE,{rewardItemKey:t.rewardItemKey,rewardQuantity:t.rewardQuantity,inventoryKeyTo:i}),!1}return!0}async processRewards(e,t,i,r,a,o){let h=o.exchangeRewards[e];if(0===h.length)return!0;let c=o.oppositeKey(e),l=o.exchangeBetween[e][i];if(!l)return o.setError('Missing pushed for exchange item "'+i+'".',n.ERROR_CODES.REWARD.MISSING_PUSHED,{itemUid:i}),!1;let u=s.get(r.items,i,s.get(r.frozenItems,i,!1));if(!1===u)return o.setError('Reward error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REWARD.GET_ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let d=this.fetchItemRewards(h,u);return!1===d||0===d.length||!!await this.processItemRewards(d,r,a,c,l,i,o)||(o.setError('Process item reward error, item "'+i+'".',n.ERROR_CODES.REWARD.PROCESS_ITEM,{itemUid:i}),!1)}async processItemRewards(e,t,i,a,o,h,c){if(0===e.length)return!0;for(let l of e){let e=l.rewardQuantity*o;if(!1===l.rewardItemIsRequired){let i=t.createItemInstance(l.rewardItemKey,e),r=s.isArray(i)?i:[i];if(!1===await t.addItems(r)){if(""!==t.lastError.message)return c.setError("Rewards process inventory error.",n.ERROR_CODES.REWARD.PROCESS_ITEM,{},t.lastError),!1;let e=Object.keys(r).join(",");return c.setError("Rewards error on add items: "+e+".",n.ERROR_CODES.REWARD.ADD_ITEMS,{itemsKeys:e}),!1}continue}let u=c.inventories[a].findItemByKey(l.rewardItemKey);if(!1===u)return c.setError('Reward item "'+l.rewardItemKey+'" is not present on inventory "'+a+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:l.rewardItemKey,inventoryKeyTo:a}),!1;if(e>u.qty)return c.setError("Reward quantity ("+e+") is bigger than the available in the inventory ("+u.qty+").",n.ERROR_CODES.REWARD.QUANTITY_OVERLOAD,{rewardQuantityTotal:e,rewardInventoryItemQty:u.qty}),!1;let d=i.findItemByKey(l.rewardItemKey);if(!1===d)return r.error("The reward item not longer exists.",h,l.rewardItemKey),!1;let f=t.createItemInstance(l.rewardItemKey,e);if(i.frozenItems[d.uid]=Object.assign({},d),!1===await i.decreaseItemQty(d.uid,l.requiredQuantity))return r.error("There was an error while decreasing the reward item quantity.",l,d),!1;await t.addItem(f)}return!0}}},{bddde17fed05deaa:"idEfG","918bdf09bd16e1b2":"3lwy5"}],"8cYlw":[function(e,t,i){let{ObjectsConst:n}=e("df12497da2e014ac"),{Logger:r,sc:s}=e("bc3fcd89e3b4517e");t.exports.DropsMessageListener=class{static listenMessages(e,t){e.onMessage("*",e=>{let i=s.get(e,n.DROPS.KEY,!1);i&&this.loadObjects(i,t),n.DROPS.REMOVE===e.act&&this.removeDropById(e.id,t)})}static loadObjects(e,t){let i=t.getActiveScene(),n=t.config,r=t.getFeature("objects"),s=i.load;if(!this.validateParams({currentScene:i,gameConfig:n,objectPlugin:r,loader:s}))return!1;for(let[t,a]of Object.entries(e))this.loadSpritesheet(a,s,n),s.once("complete",async e=>{await this.createDropAnimation(r,a,t,i)});return s.start(),!0}static async createDropAnimation(e,t,i,r){let s={type:n.DROPS.PICK_UP_ACT,enabled:!0,ui:!0,frameStart:t[n.DROPS.PARAMS].start,frameEnd:t[n.DROPS.PARAMS].end,repeat:t[n.DROPS.PARAMS].repeat,autoStart:!0,key:i,id:i,targetName:"",layerName:i,isInteractive:!0,asset_key:t[n.DROPS.ASSET_KEY],x:t.x,y:t.y,yoyo:t[n.DROPS.PARAMS].yoyo};return await e.createAnimationFromAnimData(s,r)}static loadSpritesheet(e,t,i){t.spritesheet(e[n.DROPS.ASSET_KEY],this.getSpritesheetPath(e),this.getRewardFrameConfig(e[n.DROPS.PARAMS],i))}static getRewardFrameConfig(e,t){return{frameWidth:s.get(e,"frameWidth",t.getWithoutLogs("client/map/dropsTile/width",t.get("client/map/tileData/width"))),frameHeight:s.get(e,"frameHeight",t.getWithoutLogs("client/map/dropsTile/height",t.get("client/map/tileData/height")))}}static getSpritesheetPath(e){return n.DROPS.ASSETS_PATH+e[n.DROPS.FILE]}static removeDropById(e,t){if(!e)return!1;let i=t.activeRoomEvents.getActiveScene(),n=s.get(i.objectsAnimations,e,!1);if(!n)return!1;n.sceneSprite.destroy(),delete i.objectsAnimations[e]}static validateParams(e){let t=!0;return s.get(e,"currentScene",!1)||(r.error("Scene is undefined in Rewards Message Listener."),t=!1),s.get(e,"gameConfig",!1)||(r.error("Game Config is undefined in Rewards Message Listener."),t=!1),s.get(e,"objectPlugin",!1)||(r.error("Object Plugin is undefined in Rewards Message Listener."),t=!1),s.get(e,"loader",!1)||(r.error("Loader is undefined in Rewards Message Listener."),t=!1),t}}},{df12497da2e014ac:"izuLV",bc3fcd89e3b4517e:"3lwy5"}],hznMs:[function(e,t,i){t.exports={objects:{npcInvalid:"I do not understand.",trader:{content:"Hi there! What would you like to do?",options:{buy:"Buy",sell:"Sell"},buyConfirmed:"Thanks for buying!",sellConfirmed:"Thanks for your products!"}}}},{}],bzImH:[function(e,t,i){let{GameConst:n}=e("d90cf3ac18adcc93"),{Logger:r,sc:s}=e("981fc13f3ba6a83c");t.exports.UserInterface=class{constructor(e,t,i="/assets/html/dialog-box.html",n){this.events=e.events,this.gameDom=e.gameDom,this.initialTitle="",this.initialContent="",this.id=t.id,this.animProps=t,this.template=i,this.uiPositionKey=n||"default",this.openButton=null,this.closeButton=null,this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforePreload",e=>{this.preloadUiElement(e)}),this.events.on("reldens.createPreload",(e,t)=>{this.createUiElement(t)})}preloadUiElement(e){this.template&&e.load.html(this.id,this.template)}createUiElement(e,t=""){""===t&&(t=this.id);let i="box-"+this.id;if(s.get(e.elementsUi,this.id))return this;let n=this.createDialogBox(e,t);this.createBoxContent(e,t,n);let a=this.gameDom.getElement(".ui-box.ui-dialog-box",n.node);return a?(a.id=i,a.classList.add("type-"+(this.animProps?.type||"dialog-box")),this.activateOpenButton(n,a,e),this.activateCloseButton(n,a,e),e.userInterfaces[this.id]=this,e.elementsUi[this.id]=n,this):(r.critical('Missing dialog container for template key: "'+t+'".',{dialogBox:n,dialogContainer:a,objectElementId:i}),!1)}createDialogBox(e,t){let{newWidth:i,newHeight:n}=e.gameManager.gameEngine.getCurrentScreenSize(e.gameManager),{uiX:r,uiY:s}=e.getUiPosition(this.uiPositionKey,i,n);return e.add.dom(r,s).createFromCache(t)}createBoxContent(e,t,i){let n=e.cache.html.get(t);i.innerHTML=e.gameManager.gameEngine.parseTemplate(n,{title:this.initialTitle,content:this.initialContent})}activateOpenButton(e,t,i){return this.openButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_OPEN,e.node),!!this.openButton&&(this.openButton.id=n.UI_BOX+n.UI_OPEN+"-"+this.id,this.openButton.addEventListener("click",()=>{s.get(this.animProps,"defaultOpen",!0)&&(t.style.display="block",this.openButton.style.display="none",!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(this.animProps.depth)),s.isFunction(this.animProps.openCallBack)&&this.animProps.openCallBack(),this.events.emit("reldens.openUI",{ui:this,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})}),this.openButton)}activateCloseButton(e,t,i){if(this.closeButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_CLOSE,e.node),!this.closeButton)return!1;this.closeButton.id=n.UI_BOX+n.UI_CLOSE+"-"+this.id,this.closeButton.addEventListener("click",()=>{s.hasOwn(this.animProps,"sendCloseMessage")&&!1!==this.animProps.sendCloseMessage||i.gameManager.activeRoomEvents.send({act:n.CLOSE_UI_ACTION,id:this.id}),s.get(this.animProps,"defaultClose",!0)&&(t.style.display="none",this.openButton&&(this.openButton.style.display="block"),!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(1)),s.isFunction(this.animProps.closeCallback)&&this.animProps.closeCallback(),this.events.emit("reldens.closeUI",{ui:this,closeButton:this.closeButton,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})})}}},{d90cf3ac18adcc93:"93TbC","981fc13f3ba6a83c":"3lwy5"}],"83Jlt":[function(e,t,i){let{InventoryUi:n}=e("3dbcaecc16a8d7f6"),{InventoryReceiver:r}=e("1b246d1f86d4b52c"),{TradeTargetAction:s}=e("e34196023b491a43"),{TradeMessageListener:a}=e("4891eeec00749c11"),{UserInterface:o}=e("c8568ca446361435"),{PluginInterface:h}=e("f9e95a5e7b3e4385"),{TemplatesHandler:c}=e("9a0084a090b55a0d"),{TranslationsMapper:l}=e("3a8304cb1916a776"),u=e("26049dfb393d7854"),{InventoryConst:d}=e("5532f77de2576b30"),{ItemsEvents:f,ItemsConst:p}=e("75f9030ce424b588"),{GameConst:g}=e("28a98a79420c2754"),{Logger:m,sc:v}=e("ddf286423098af38");t.exports.InventoryPlugin=class extends h{setup(e){this.gameManager=v.get(e,"gameManager",!1),this.gameManager||m.error("Game Manager undefined in InventoryPlugin."),this.events=v.get(e,"events",!1),this.events||m.error("EventsManager undefined in InventoryPlugin."),this.tradeTargetAction=new s,this.setTradeUi(),this.listenEvents(),this.setListener(),this.setTranslations()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,u,d.MESSAGE.DATA_VALUES)}setTradeUi(){if(!this.gameManager)return!1;this.tradeUi=new o(this.gameManager,{id:"trade",type:"trade"})}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.trade=new a}listenEvents(){if(!this.events)return!1;this.events.on("reldens.playersOnAdd",(e,t,i,n)=>{this.onPlayerAdd(t,n,e)}),this.events.on("reldens.preloadUiScene",e=>{c.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>this.onPreloadUiScene(e)),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{this.tradeTargetAction.showTargetExchangeAction(this.gameManager,t,i,n)})}onPreloadUiScene(e){this.uiManager=new n(e),this.uiManager.createUi();let t=e.getUiElement("inventory").getChildByProperty("id",d.INVENTORY_ITEMS);if(!t)return m.error("Inventory UI not found.",t),!1;let i=e.getUiElement("equipment").getChildByProperty("id",d.EQUIPMENT_ITEMS);if(!i)return m.error("Equipment UI not found.",i),!1;let r=e.gameManager.inventory.manager,s=v.get(r,"groups",{});if(Object.keys(s).length)for(let t of(e.gameManager.gameDom.getElement("#"+d.EQUIPMENT_ITEMS).innerHTML="",this.sortGroups(s))){let i=this.createGroupBox(s[t],e.gameManager,e);e.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}let a=v.get(r,"items",{}),o=Object.keys(a);if(0{t.gameManager.inventory.processMessage(e)})}createInventoryInstance(e,t){let i={owner:e,ownerIdProperty:"sessionId",gameManager:t.gameManager},n=t.gameManager.config.getWithoutLogs("client/customClasses/inventory/items",{});n&&0{let s=this.createItemBox(r,"inventoryItem",n,e);n.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(t,r.getInventoryId(),r,e)},n.inventory.manager.getOwnerUniqueEventKey("addItemPack"),r),n.inventory.manager.listenEvent(f.SET_ITEMS,n=>{for(let r of(t.innerHTML="",Object.keys(n.items))){let s=n.items[r];this.displayItem(s,e,i,t,r)}},n.inventory.manager.getOwnerUniqueEventKey("setItemsPack"),r),n.inventory.manager.listenEvent(f.MODIFY_ITEM_QTY,t=>{e.getUiElement("inventory").getChildByID("item-qty-"+t.getInventoryId()).innerHTML=t.qty},n.inventory.manager.getOwnerUniqueEventKey("modifyItemQtyPack"),r),n.inventory.manager.listenEvent(f.REMOVE_ITEM,(t,i)=>{e.getUiElement("inventory").getChildByID("item-"+i).remove()},n.inventory.manager.getOwnerUniqueEventKey("removeItemPack"),r),n.inventory.manager.listenEvent(f.SET_GROUPS,r=>{let s=!1,a=n.gameDom.getElement("#"+d.EQUIPMENT_ITEMS);for(let t of(""!==a.innerHTML&&(s=!0),a.innerHTML="",this.sortGroups(r.groups))){let i=this.createGroupBox(r.groups[t],n,e);n.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}s&&this.resetEquippedItemsDisplay(n,e,i,t)},n.inventory.manager.getOwnerUniqueEventKey("setGroupsPack"),r),n.inventory.manager.listenEvent(f.EQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("equipItemPack"),r),n.inventory.manager.listenEvent(f.UNEQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("unequipItemPack"),r)}resetEquippedItemsDisplay(e,t,i,n){let r=Object.keys(e.inventory.manager.items);if(0===r.length)return!1;for(let s of r){let r=e.inventory.manager.items[s];this.isEquipped(r)&&this.displayItem(r,t,i,n,r.getInventoryId())}}displayItem(e,t,i,n,r){let s=this.createItemBox(e,"inventoryItem",t.gameManager,t),a=t.gameManager.gameDom.getElement("#item-"+e.getInventoryId());if(a&&a.remove(),this.isEquipped(e)){let n=this.getGroupById(e.group_id,t.gameManager.inventory.manager.groups);n&&t.gameManager.gameDom.getElement("#group-item-"+n.key+" .equipped-item")?t.gameManager.gameDom.updateContent("#group-item-"+n.key+" .equipped-item",s):t.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,s),this.setupButtonsActions(i,r,e,t)}else t.gameManager.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(n,r,e,t)}updateEquipmentStatus(e,t){let i=t.gameDom.getElement("#item-equip-"+e.idx),n=e.equipped?"equipped":"unequipped";i.src="/assets/features/inventory/assets/"+n+g.FILES.EXTENSIONS.PNG}createItemBox(e,t,i,n){let r=n.cache.html.get(t);return i.gameEngine.parseTemplate(r,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,usable:this.isUsable(e)?this.getUsableContent(e,i,n):"",equipment:this.isEquipment(e)?this.getEquipContent(e,i,n):""})}isEquipment(e){return e.isType(p.TYPES.EQUIPMENT)||e.isType(p.TYPES.SINGLE_EQUIPMENT)}isEquipped(e){return this.isEquipment(e)&&!0===e.equipped}isUsable(e){return e.isType(p.TYPES.USABLE)||e.isType(p.TYPES.SINGLE_USABLE)}sortGroups(e){return Object.keys(e).sort((t,i)=>e[t].sort>e[i].sort?1:-1)}createGroupBox(e,t,i){let n=i.cache.html.get("inventoryGroup");return t.gameEngine.parseTemplate(n,{key:e.key,label:e.label,description:e.description,fileName:e.files_name})}setupButtonsActions(e,t,i,n){let r=n.gameManager.gameDom,s=e.querySelector("#item-"+t+" .image-container img");if(!s)return m.error(["Missing image element.","#item-"+t]),!1;s.addEventListener("click",()=>{let i=e.querySelector("#item-"+t+" .item-data-container"),n=!1;"block"!==i.style.display&&(n=!0),e.querySelectorAll(".item-box .image-container img").forEach(function(e){e.style.border="none"}),e.querySelectorAll(".item-data-container").forEach(function(e){e.style.display="none"}),n&&(s.style.border="1px solid #fff",i.style.display="block")});let a=e.querySelector("#item-trash-"+t+" img");if(!a)return m.error(["Missing button.",a]),!1;a.addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="block"}),e.querySelector("#trash-cancel-"+t).addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="none"}),e.querySelector("#trash-confirmed-"+t).addEventListener("click",()=>{let e={idx:t,act:d.ACTIONS.REMOVE};n.gameManager.activeRoomEvents.send(e)}),this.isUsable(i)&&r.getElement("#item-use-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.USE,n)),this.isEquipment(i)&&r.getElement("#item-equip-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.EQUIP,n))}clickedBox(e,t,i){i.gameManager.activeRoomEvents.send({act:t,idx:e})}getUsableContent(e,t,i){let n=i.cache.html.get("inventoryItemUse");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId()})}getEquipContent(e,t,i){let n=i.cache.html.get("inventoryItemEquip");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId(),equipStatus:e.equipped?"equipped":"unequipped"})}getGroupById(e,t){let i=Object.keys(t);if(0===i.length)return!1;for(let n of i)if(t[n].id===e)return t[n]}}},{"3dbcaecc16a8d7f6":"i4XYr","1b246d1f86d4b52c":"ecHHP",e34196023b491a43:"2sgZT","4891eeec00749c11":"7M3Uu",c8568ca446361435:"bzImH",f9e95a5e7b3e4385:"fC3To","9a0084a090b55a0d":"hZf8u","3a8304cb1916a776":"1fcQw","26049dfb393d7854":"1SpFi","5532f77de2576b30":"19bl6","75f9030ce424b588":"g4GOK","28a98a79420c2754":"93TbC",ddf286423098af38:"3lwy5"}],i4XYr:[function(e,t,i){let{UiFactory:n}=e("77ab18c1eefc2684"),{InventoryConst:r}=e("55720af454786e61");t.exports.InventoryUi=class extends n{createUi(){this.create("inventory",5,!0,!0,null,()=>{this.inventoryVisibility("inventory")}),this.create("equipment",4,!0,!0,null,()=>{this.inventoryVisibility("inventory")})}inventoryVisibility(e){let t="#"+r[e+"_ITEMS"];for(let e of this.gameManager.gameDom.getElements(t+" .item-box .image-container img"))e.style.border="none";for(let e of this.gameManager.gameDom.getElements(t+" .item-data-container"))e.style.border="none"}}},{"77ab18c1eefc2684":"k6PNR","55720af454786e61":"19bl6"}],k6PNR:[function(e,t,i){let{GameConst:n}=e("33c9292d731c7911");t.exports.UiFactory=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager}create(e,t,i,r,s,a){let{uiX:o,uiY:h}=this.uiScene.getUiConfig(e),c=this.uiScene.add.dom(o,h).createFromCache(e),l=c.getChildByProperty("id",e+n.UI_OPEN),u=c.getChildByProperty("id",e+n.UI_CLOSE);l?.addEventListener("click",()=>{let n=c.getChildByProperty("id",e+"-ui");i&&(n&&(n.style.display="block"),l.style.display="none",c.setDepth(t)),s&&"function"==typeof s&&s(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:l,dialogBox:c,dialogContainer:n,uiScene:this.uiScene})}),u?.addEventListener("click",()=>{let t=c.getChildByProperty("id",e+"-ui");r&&(t&&(t.style.display="none"),c.setDepth(1),l&&(l.style.display="block")),a&&"function"==typeof a&&a(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:u,openButton:l,dialogBox:c,dialogContainer:t,uiScene:this.uiScene})}),this.uiScene.elementsUi[e]=c}}},{"33c9292d731c7911":"93TbC"}],"19bl6":[function(e,t,i){t.exports.InventoryConst={INVENTORY_ITEMS:"inventory-items",INVENTORY_OPEN:"inventory-open",INVENTORY_CLOSE:"inventory-close",EQUIPMENT_ITEMS:"equipment-items",EQUIPMENT_CLOSE:"equipment-close",EQUIPMENT_OPEN:"equipment-open",ANIMATION_KEY_PREFIX:"aK_",GROUP_BUCKET:"/assets/custom/groups",ACTIONS:{PREFIX:"ivp",REMOVE:"ivpRm",USE:"ivpUse",EQUIP:"ivpEqi",TRADE_START:"ivptStart",TRADE_ACCEPTED:"ivptAccepted",TRADE_SHOW:"ivptShow",TRADE_ACTION:"ivptAction"},MESSAGE:{DATA_VALUES:{NAMESPACE:"items"}}}},{}],ecHHP:[function(e,t,i){let{InventoryConst:n}=e("8882a4643448fce8"),{GameConst:r}=e("2bfdc54146457a66"),{Receiver:s}=e("c0cd661b4f31ab90"),{ErrorManager:a,Logger:o,sc:h}=e("86cd80d57b7740fd");t.exports.InventoryReceiver=class extends s{constructor(e){h.hasOwn(e,"gameManager")||a.error("InventoryReceiver gameManager not specified."),super(e),this.gameManager=e.gameManager,this.itemSprites={},this.itemsAnimations={}}onExecuting(e){let t=e.item;if(!h.hasOwn(t,"animationData"))return o.warning("Item does not contain animation data.",e),!1;let i=n.ANIMATION_KEY_PREFIX+t.key,s=this.gameManager.getActiveScene();if(this.itemSprites[i]&&this.itemSprites[i].anims&&s.anims.get(i))return o.debug("Animation already exists, playing: "+i),this.playSpriteAnimation(i,t),!1;s.load.spritesheet(i,"/assets/custom/sprites/"+t.key+r.FILES.EXTENSIONS.PNG,{frameWidth:t.animationData.frameWidth||64,frameHeight:t.animationData.frameHeight||64}).on("loaderror",e=>{o.error("Sprite load error: "+i,e)}),s.load.on("complete",()=>{o.debug("Scene load complete, playing: "+i),this.createItemSprites(i,t,e,s)}),s.load.start()}createItemSprites(e,t,i,n){let r=this.extractTargetId(t,i,n);if(!r)return o.error("Target ID not found."),!1;let s=h.get(n.player.players,r,!1);if(!s)return o.error("Player sprite not found by target ID."),!1;let a=n.anims.get(e);a||(o.debug("Creating new animation on scene: "+e),a=n.anims.create({key:e,frames:n.anims.generateFrameNumbers(e,{start:t.animationData.start||0,end:t.animationData.end||1}),frameRate:h.get(t.animationData,"frameRate",n.configuredFrameRate),repeat:t.animationData.repeat||3,hideOnComplete:h.get(t.animationData,"hide",!0),showOnStart:h.get(t.animationData,"showOnStart",!0)})),this.itemsAnimations[e]=a;let c=h.get(t.animationData,"fixedX",t.animationData.usePlayerPosition?s.x:0),l=h.get(t.animationData,"fixedY",t.animationData.usePlayerPosition?s.y:0);this.itemSprites[e]=n.physics.add.sprite(c,l,e),this.itemSprites[e]=this.itemSprites[e].setDepth(9e4),this.itemSprites[e].depthByPlayer="above",t.animationData.followPlayer&&(s.moveSprites[e]=this.itemSprites[e]),o.debug("Playing sprite: "+e),this.playSpriteAnimation(e,t).on("animationcomplete",()=>{t.animationData.destroyOnComplete&&this.destroyAnimation(t,e,s)})}playSpriteAnimation(e,t){h.get(t.animationData,"closeInventoryOnUse",!1)&&this.gameManager.gameDom.getElement("#inventory-close")?.click();let i=this.itemSprites[e].anims;return i?(i.visible=!0,i.play(e,h.get(t.animationData,"ignoreIfPlaying",!0))):(o.error("Sprite animation not found: "+e),!1)}destroyAnimation(e,t,i){this.itemSprites[t].destroy(),delete this.itemSprites[t],delete this.itemsAnimations[t],e.animationData.followPlayer&&delete i.moveSprites[t],o.debug("Animation and sprite destroyed: "+t)}extractTargetId(e,t,i){return e.animationData.startsOnTarget&&t.target?.playerId?t.target.playerId:i.player?.playerId||!1}}},{"8882a4643448fce8":"19bl6","2bfdc54146457a66":"93TbC",c0cd661b4f31ab90:"g4GOK","86cd80d57b7740fd":"3lwy5"}],"2sgZT":[function(e,t,i){let{InventoryConst:n}=e("6fd8a45050899827"),{GameConst:r}=e("27ccb472a3005f7d"),{Logger:s,sc:a}=e("b754ab6e7b18af41");t.exports.TradeTargetAction=class{showTargetExchangeAction(e,t,i,o){if(r.TYPE_PLAYER!==t.type||e.getCurrentPlayer().playerId===t.id)return!1;let h=e.gameEngine.uiScene;if(!1===a.get(h,"uiTarget",!1))return!1;let c=h.cache.html.get("inventoryTradeStart");if(!c)return s.critical('Template "inventoryTradeStart" not found.'),!1;e.gameDom.appendToElement("#target-container",e.gameEngine.parseTemplate(c,{playerName:o,playerId:t.id}));let l=e.gameDom.getElement(".start-trade-"+t.id+" button");if(!l)return s.critical('Trade start button not found for selector: ".start-trade-'+t.id+' button"'),!1;l.addEventListener("click",()=>{let i={act:n.ACTIONS.TRADE_START,id:t.id};e.activeRoomEvents.send(i)})}}},{"6fd8a45050899827":"19bl6","27ccb472a3005f7d":"93TbC",b754ab6e7b18af41:"3lwy5"}],"7M3Uu":[function(e,t,i){let{TradeMessageHandler:n}=e("f964b12ccb83d2b4"),{Logger:r,sc:s}=e("8a7eb9c3e6d9d186");t.exports.TradeMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on TradeMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on TradeMessageListener.",e),!1;new n({roomEvents:i,message:t}).updateContents()}}},{f964b12ccb83d2b4:"kzLY7","8a7eb9c3e6d9d186":"3lwy5"}],kzLY7:[function(e,t,i){let{ErrorManager:n,Logger:r,sc:s}=e("779d25f0124f02f2"),{InventoryConst:a}=e("58803c0e08c63617"),{ObjectsConst:o}=e("3ddb9dce645de8c3"),{UserInterface:h}=e("c49942f179cbbc0a");t.exports.TradeMessageHandler=class{constructor(e){this.roomEvents=s.get(e,"roomEvents",!1),this.message=s.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.validate()}validate(){this.roomEvents||n.error("Missing RoomEvents."),this.message||n.error("Missing message."),this.gameManager||n.error("Missing GameManager."),this.uiScene||n.error("Missing UiScene."),this.itemsManager||n.error("Missing ItemsManager.")}updateContents(){return a.ACTIONS.TRADE_START===this.message.act?this.showTradeRequest():a.ACTIONS.TRADE_SHOW===this.message.act?this.showTradeBox():void 0}showTradeRequest(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.config.getWithoutLogs("client/trade/titles/tradeRequestFromLabel","Trade request from:"),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:a.ACTIONS.TRADE_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-"+e)?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+e)?.click()})}showTradeBox(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.services.translator.t("items.tradeWith",{playerName:this.message.with}),content:"",options:{}});let t=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!t)return r.error('Missing container: "#box-'+e+' .box-content".'),!1;if(!0===this.message.isTradeEnd)return this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click(),!0;let i=s.get(this.message,"items",!1),n=s.get(this.message,"traderItemsData",{}),a=s.get(this.message,"exchangeData",{}),o=s.get(this.message,"playerToExchangeKey",{}),h="A"===o?"B":"A";this.updateItemsList(i,t,a[h]),this.updateMyExchangeData(a[h]||{},i,h),this.updateTraderExchangeData(a[o]||{},n,o)}createTradeUi(e){let t=s.get(this.roomEvents.tradeUi,e);return t||(this.roomEvents.tradeUi[e]=new h(this.gameManager,{id:e,type:"trade"},"/assets/html/dialog-box.html","trade"),this.roomEvents.tradeUi[e].createUiElement(this.uiScene,"trade")),t}updateItemsList(e,t,i){if(!e)return;let n="",r={};for(let t of Object.keys(e)){let a=e[t],o=Object.assign({manager:this.itemsManager},a,{uid:t}),h=s.get(this.itemsManager.itemClasses,o.key,this.itemsManager.types.classByTypeId(o.type));r[t]=new h(o),r[t].quantityDisplay=1,r[t].quantityMaxDisplay=Math.max(r[t].qty_limit,a.qty),r[t].tradeAction="trade",n+=this.createTradeItemBox(r[t],s.get(i,r[t].uid,!1))}t.innerHTML=this.createTradeContainer(n),this.activateItemsBoxActions(r),this.activateConfirmButtonAction()}activateConfirmButtonAction(){let e=this.gameManager.gameDom.getElement(".confirm-"+this.message.id);e?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.CONFIRM})});let t=this.gameManager.gameDom.getElement(".disconfirm-"+this.message.id);t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.DISCONFIRM})});let i=this.gameManager.gameDom.getElement(".cancel-"+this.message.id);i?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click()})}updateMyExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createConfirmItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-2");return s?(s.innerHTML=n,this.assignRemoveActions(e,t),!0):(r.error('Missing "'+i+'" items container.'),!1)}updateTraderExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createReceivingItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-3");return s?(s.innerHTML=n,!0):(r.error('Missing "'+i+'" items container.'),!1)}createConfirmItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on confirmation trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:this.createTradeActionRemove(a),tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}createReceivingItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on receive trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:"",tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}assignRemoveActions(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on remove trade-message-handler.",{message:this.message}),!1;for(let e of i){let i=".pushed-to-trade .trade-item-"+e,n=this.gameDom.getElement(i);if(!n){r.error('Assign trade item "'+e+'" container not found.');continue}let s=this.gameDom.getElement(".pushed-to-trade .trade-item-"+e+" .trade-action-remove");if(!s){r.error('Assign trade item "'+e+'" remove button not found.');continue}let h=t[e];s.addEventListener("click",()=>{n.classList.remove("hidden");let t={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:"remove",itemId:e,itemKey:h.key};t[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e){let t=this.uiScene.cache.html.get("inventoryTradePlayerContainer");if(!t)return r.error('Missing template "inventoryTradeContainer".'),"";let i=o.TRADE_ACTIONS_FUNCTION_NAME,n={tradeActionKey:this.message.id,confirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/confirmLabel",i.CONFIRM),disconfirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/disconfirmLabel",i.DISCONFIRM),cancelLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/cancelLabel",i.CANCEL),myItems:e,myItemsTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/myItems","My Items:"),pushedToTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/pushedToTradeTitle","Sending:"),gotFromTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/gotFromTradeTitle","Receiving:"),playerConfirmedLabel:this.playerConfirmedLabel()};return this.gameManager.gameEngine.parseTemplate(t,n)}playerConfirmedLabel(){return this.message.playerConfirmed?this.gameManager.config.getWithoutLogs("client/trade/titles/playerConfirmedLabel","%playerName CONFIRMED").replace("%playerName",this.message.with):""}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return r.error('Missing template "inventoryTradeItem".'),"";let n=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!n)return r.error('Missing template "inventoryTradeItemQuantity".'),"";let s=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}}},{"779d25f0124f02f2":"3lwy5","58803c0e08c63617":"19bl6","3ddb9dce645de8c3":"izuLV",c49942f179cbbc0a:"bzImH"}],hZf8u:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/inventory/templates/";e.load.html("inventory",t+"ui-inventory.html"),e.load.html("equipment",t+"ui-equipment.html"),e.load.html("inventoryItem",t+"item.html"),e.load.html("inventoryItemUse",t+"usable.html"),e.load.html("inventoryItemEquip",t+"equip.html"),e.load.html("inventoryGroup",t+"group.html"),e.load.html("inventoryTradeContainer",t+"trade-container.html"),e.load.html("inventoryTradePlayerContainer",t+"trade-player-container.html"),e.load.html("inventoryTradeRequirements",t+"trade-requirements.html"),e.load.html("inventoryTradeRewards",t+"trade-rewards.html"),e.load.html("inventoryTradeAction",t+"trade-action.html"),e.load.html("inventoryTradeActionRemove",t+"trade-action-remove.html"),e.load.html("inventoryTradeItem",t+"trade-item.html"),e.load.html("inventoryTradeItemQuantity",t+"trade-item-quantity.html"),e.load.html("inventoryTradeStart",t+"trade-start.html"),e.load.html("inventoryTradeAccept",t+"trade-accept.html")}}},{}],"1SpFi":[function(e,t,i){t.exports={items:{undefinedItem:"Add item error, undefined item.",undefinedMethodInventoryId:"Add item error, undefined getInventoryId.",undefinedItemKey:"Add item error, undefined item key.",invalidItemInstance:"Invalid item instance.",lockedForAddItem:"Inventory locked, cannot add item: %itemUid",maxTotalReachedForAddItem:"Cannot add item, max total reached.",itemExistsForAddItem:"Cannot add item, item already exists: %itemUid",itemLimitExceededForAddItem:"Cannot add item, item qty limit exceeded.",addItemsError:'Cannot add item "%itemUid".',lockedForSetItem:"Inventory locked, cannot set item: %itemUid.",lockedForRemoveItem:"Inventory locked, cannot remove item: %itemUid.",keyNotFound:"Cannot remove item, key not found: %itemUid.",lockedForModifyItemQty:"Inventory locked, cannot modify item qty: %itemUid.",undefinedItemKeyForOperation:'Cannot "%operation" item qty, undefined item key: %itemUid.',qtyNotANumber:'Cannot "%operation" item qty, quantity is not a number: %qty.',itemQtyLimitExceeded:'Cannot "%operation" item qty, item qty limit exceeded: %qty > %limitPerItem.',lockedForSetItems:"Inventory locked, cannot set items.",tradeWith:"Trading with %playerName",exchange:{missingConfirmation:"Missing confirmation.",invalidPushedQuantity:"Invalid item pushed quantity (%qty), available: %pushedItemQty.",invalidQuantity:"Invalid item quantity 0.",invalidExchange:'Inventories "FROM" and "TO" are the same, exchange cancelled.',decreaseQuantity:"Exchange inventory decrease error.",itemAdd:"Exchange add inventory result error."},requirements:{itemNotPresent:'Required item "%requiredItemKey" is not present.',quantityNotAvailable:'Required item "%requiredItemKey" quantity %totalRequiredQuantity is not available.',itemNotPushed:'Required item "%requiredItemKey" was not pushed for exchange.',itemQuantityNotPushed:'Required item "%requiredItemKey" quantity %totalRequiredQuantity was not pushed for exchange.',itemDoesNotExists:'Requirement error, item "%itemUid" does not exits on inventory.',itemAdd:"Requirement add item error."},reward:{doesNotExists:'Reward error, item "%itemUid" does not exits.',missingItem:'Reward error, item "%itemUid" does not exits.',itemNotPresent:'Reward item "%rewardItemKey" is not present on inventory.',quantityNotAvailable:"Reward item %rewardItemKey reward quantity (%rewardQuantity) is not available.",missingPushed:'Missing pushed for exchange item "%itemUid".',getItemDoesNotExists:'Reward error, item "%itemUid" does not exits on inventory.',processItem:'Process item reward error, item "%itemUid".',processInventory:"Rewards process inventory error.",addItems:"Rewards error on add items: %itemsKeys.",quantityOverload:"Reward quantity (%rewardQuantityTotal) is bigger than the available in the inventory (%rewardInventoryItemQty)."},equipment:{modifiersApply:"Cannot apply modifiers the item is not equipped: %itemUid",modifiersRevert:"Cannot revert modifiers the item is not equipped: %itemUid"}}}},{}],enPaX:[function(e,t,i){let{SkillsUi:n}=e("6b2d3727d1d70b78"),{PluginInterface:r}=e("c34bb8f0c81f8738"),{PlayerSelector:s}=e("566ebfe7409d2a3a"),{PreloaderHandler:a}=e("7af81ec0e9446267"),{MessagesHandler:o}=e("699da6696693061c"),{GameManagerEnricher:h}=e("c162e687344f571d"),c=e("37b783bb3d5ca68"),{TranslationsMapper:l}=e("f892bc1afce6c5ea"),{ActionsConst:u}=e("dbdea295dce66b04"),{Logger:d,sc:f}=e("1ad70aa0a704e98c");t.exports.ActionsPlugin=class extends r{setup(e){this.gameManager=f.get(e,"gameManager",!1),this.gameManager||d.error("Game Manager undefined in ActionsPlugin."),this.events=f.get(e,"events",!1),this.events||d.error("EventsManager undefined in ActionsPlugin."),this.playerSelector=new s(e),this.preloaderHandler=new a(e),this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,c,u.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager)return!1;this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createPreload",e=>{this.preloaderHandler.createAnimations(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi()}),this.events.on("reldens.beforeCreateEngine",e=>{this.playerSelector.populateClassesSelector(f.get(e,"classesData",{}),e.gameConfig.client.players,e.player)}),this.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{o.processOrQueueMessage(e,this.gameManager)})}),this.events.on("reldens.playersOnAddReady",e=>{h.withReceiver(e.player,e.roomEvents,this.gameManager)})}}},{"6b2d3727d1d70b78":"fKq6g",c34bb8f0c81f8738:"fC3To","566ebfe7409d2a3a":"6tkLj","7af81ec0e9446267":"asAAa","699da6696693061c":"gldsT",c162e687344f571d:"4okuX","37b783bb3d5ca68":"8JSjE",f892bc1afce6c5ea:"1fcQw",dbdea295dce66b04:"59VA7","1ad70aa0a704e98c":"3lwy5"}],fKq6g:[function(e,t,i){let{ActionsConst:n}=e("fcb0bd426e0a1381");t.exports.SkillsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.defaultAction=this.gameManager.config.get("client/ui/controls/defaultActionKey")}createUi(){let e=n.SELECTORS.UI_PLAYER_EXTRAS;this.appendToUiContainer(e,"skillsClassPath"),this.appendToUiContainer(e,"skillsLevel"),this.appendToUiContainer(e,"skillsExperience",{experienceLabel:this.gameManager.services.translator.t(n.SNIPPETS.EXPERIENCE_LABEL)}),this.createUiBox("skills",7)}appendSkills(e){let t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t!==this.defaultAction&&this.createSkillBox(t)}}appendToUiContainer(e,t,i={}){let n=this.uiScene.cache.html.get(t);0{let t=e.options[e.selectedIndex].dataset.key;n.style.backgroundImage=`url('/assets/custom/sprites/${t}${r.FILES.EXTENSIONS.PNG}')`}),t.append(n)}}},{b243e92bb3fe291b:"59VA7","99fe71ca25218501":"93TbC","350db309ac69e57e":"3lwy5"}],asAAa:[function(e,t,i){let{Logger:n,sc:r}=e("282e615b5cb3f89e"),{GameConst:s}=e("1d3a9c826831f334");t.exports.PreloaderHandler=class{constructor(e){this.gameManager=r.get(e,"gameManager",!1),this.gameManager||n.error("Game Manager undefined in ActionsPlugin PreloaderHandler."),this.events=r.get(e,"events",!1),this.events||n.error("EventsManager undefined in ActionsPlugin PreloaderHandler."),this.setProperties(e)}setProperties(e){if(!this.gameManager)return!1;this.gameDom=this.gameManager.gameDom,this.initialGameData=this.gameManager.initialGameData,this.levelsAnimConfig=this.gameManager.config.get("client/levels/animations"),this.skillsAnimConfig=this.gameManager.config.get("client/skills/animations"),this.assetsCustomActionsSpritesPath=r.get(e,"assetsCustomActionsSpritesPath","assets/custom/actions/sprites/"),this.gameManager.loadedAssets||(this.gameManager.loadedAssets={}),this.gameManager.createdAnimations||(this.gameManager.createdAnimations={})}loadContents(e){e.load.html("skillsClassPath","/assets/features/skills/templates/ui-class-path.html"),e.load.html("skillsLevel","/assets/features/skills/templates/ui-level.html"),e.load.html("skillsExperience","/assets/features/skills/templates/ui-experience.html"),e.load.html("skills","/assets/features/skills/templates/ui-skills.html"),e.load.html("skillBox","/assets/features/skills/templates/ui-skill-box.html"),e.load.html("actionBox","/assets/html/ui-action-box.html"),this.preloadClassPaths(e),this.loopAnimationsAnd(this.levelsAnimConfig,"preload",e),this.loopAnimationsAnd(this.skillsAnimConfig,"preload",e)}preloadClassPaths(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return!1;for(let i of Object.keys(t)){let n=t[i].key;e.load.spritesheet(n,"/assets/custom/sprites/"+n+s.FILES.EXTENSIONS.PNG,e.playerSpriteSize).on("filecomplete",async e=>{this.gameManager.loadedAssets[e]=e})}}createAnimations(e){let t=this.levelsAnimConfig;this.loopAnimationsAnd(t,"create",e);let i=this.skillsAnimConfig;this.loopAnimationsAnd(i,"create",e),this.createAvatarsAnimations(e)}createAvatarsAnimations(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return n.debug("Classes data not found. Fallback to player avatar."),!1;for(let i of(this.gameManager.mappedAvatars||(this.gameManager.mappedAvatars={}),n.debug({availableClassesData:t}),Object.keys(t))){let r=t[i].key;this.gameManager.loadedAssets[r]||(r=s.IMAGE_PLAYER,n.info('Avatar for class path "'+r+'" not found in assets. Fallback to player avatar.')),this.gameManager.mappedAvatars[r]=r,e.createPlayerAnimations(r)}return this.gameManager.mappedAvatars}loopAnimationsAnd(e,t,i){if(!e)return n.warning("Animations not found.",e),!1;for(let r of Object.keys(e)){let s=e[r];if(!s.animationData.enabled){n.debug('Animation "'+r+'" not enabled, skipping.',s);continue}n.debug({[t+"Animation"]:s}),this[t+"Animation"](s,i)}}preloadAnimation(e,t){r.hasOwn(e.animationData,["type","img"])&&s.ANIMATIONS_TYPE.SPRITESHEET===e.animationData.type&&this.preloadAnimationsInDirections(e,t),e.classKey&&r.isFunction(e.classKey.prepareAnimation)&&e.classKey.prepareAnimation({data:e,uiScene:t,pack:this})}preloadAnimationsInDirections(e,t){let i=r.get(e.animationData,"dir",0);if(0===i){t.load.spritesheet(this.getAnimationKey(e),this.assetsCustomActionsSpritesPath+e.animationData.img+s.FILES.EXTENSIONS.PNG,e.animationData);return}(1===i||2===i)&&(this.preloadSpriteInDirection(t,e,s.UP),this.preloadSpriteInDirection(t,e,s.DOWN)),(1===i||3===i)&&(this.preloadSpriteInDirection(t,e,s.LEFT),this.preloadSpriteInDirection(t,e,s.RIGHT))}preloadSpriteInDirection(e,t,i){e.load.spritesheet(this.getAnimationKey(t,i),this.assetsCustomActionsSpritesPath+t.animationData.img+"_"+i+s.FILES.EXTENSIONS.PNG,t.animationData)}createAnimation(e,t){if(r.hasOwn(e.animationData,["type","img"])&&e.animationData.type===s.ANIMATIONS_TYPE.SPRITESHEET){let i=r.get(e.animationData,"dir",0);0r&&t[r],a=!1;h.hasOwn(e,s)&&(a=e[s]),h.hasOwn(a,"key")&&a.key-n.key>0&&await this.createAndAutofillLevelsInstances(n,a)}}async createAndAutofillLevelsInstances(e,t){for(let i=e.key+1;ie[i][t]>e[n][t]?1:-1)}async levelUp(){let e=Object.keys(this.levels).pop();if(this.currentLevel>=this.levels[e].key)return!1;this.currentLevel++,await this.applyLevelModifiers(),await this.fireEvent(n.LEVEL_UP,this)}async levelDown(){if(1>=this.currentLevel)return!1;await this.applyLevelModifiers(!0),this.currentLevel--,await this.fireEvent(n.LEVEL_DOWN,this)}async applyLevelModifiers(e){let t=this.getLevelInstance(this.currentLevel);if(!t)return o.error(["Current level instance not found.","Current Level Key:",this.currentLevel]),!1;if(await this.fireEvent(n.LEVEL_APPLY_MODIFIERS,this,t),!t.modifiers)return!1;for(let i of t.modifiers)e?i.revert(this.owner):i.apply(this.owner)}getLevelInstance(e){return h.get(this.levels,e,!1)}async addExperience(e){let t=this.currentExp+e,i=this.levelsByExperience.indexOf(this.currentLevel.toString()),r=i+1,s=this.levelsByExperience[r],a=this.levels[s],o=0,c=!1;if(h.hasOwn(this.levels,this.currentLevel)&&a&&t>=a.requiredExperience){for(let e of this.levelsByExperience.slice(r))if(t>=this.levels[e].requiredExperience&&(c=!0,await this.levelUp()),t=e.modifiers.length)&&r.warning("Level modifiers were not specified.","Level ID:",e.id," - Key:",e.key),this.key=parseInt(e.key),this.modifiers=e.modifiers,this.label=s.get(e,"label",e.key),this.requiredExperience=s.get(e,"requiredExperience",s.get(e,"required_experience",0))}}},{faf9f4d0a81cecea:"3lwy5"}],cBYkx:[function(e,t,i){let n=e("1a8b79feac2da9b0"),r=e("867678cea9a9cfca"),{PropertyManager:s,Condition:a,Calculator:o}=e("2b878b9cf457d0fc"),{InteractionArea:h,EventsManagerSingleton:c,ErrorManager:l,Logger:u,sc:d}=e("cfa6f665a4da61d4");t.exports=class{constructor(e){d.hasOwn(e,"key")||l.error("Missing skill key."),d.hasOwn(e,"owner")||l.error("Missing skill owner."),"function"!=typeof e.owner.getPosition&&l.error("Undefined owner position method."),this.key=e.key,this.owner=e.owner,this.ownerIdProperty=d.get(e,"ownerIdProperty","id"),this.type=n.SKILL.TYPE.BASE,this.customData=d.get(e,"customData",!1),this.autoValidation=d.get(e,"autoValidation",!1),this.skillDelay=d.get(e,"skillDelay",0),this.castTime=d.get(e,"castTime",0),this.owner.isCasting=!1,this.owner.castingTimer=!1,this.isValid=!0,this.usesLimit=d.get(e,"usesLimit",0),this.uses=0,this.canActivate=d.get(e,"canActivate",!0),this.range=d.get(e,"range",0),this.skillActivationTimer=!1,this.lastState="",this.groups=d.get(e,"groups",[]),this.lastAppliedModifiers={},this.rangeAutomaticValidation=d.get(e,"rangeAutomaticValidation",!1),this.rangePropertyX=d.get(e,"rangePropertyX",!1),this.rangePropertyY=d.get(e,"rangePropertyY",!1),this.rangeTargetPropertyX=d.get(e,"rangeTargetPropertyX",!1),this.rangeTargetPropertyY=d.get(e,"rangeTargetPropertyY",!1),this.allowSelfTarget=d.get(e,"allowSelfTarget",!1),this.target=d.get(e,"target",!1),this.events=d.get(e,"events",c),this.ownerConditions=d.get(e,"ownerConditions",[]),this.ownerEffects=d.get(e,"ownerEffects",[]),this.criticalChance=d.get(e,"criticalChance",0),this.criticalMultiplier=d.get(e,"criticalMultiplier",1),this.criticalFixedValue=d.get(e,"criticalFixedValue",0),this.propertyManager=new s,this.calculator=new o}validate(){return(this.isValid=!0,this.fireEvent(r.VALIDATE_BEFORE,this).catch(e=>{u.error(e)}),!this.canActivate||this.owner.isCasting)?(this.lastState=n.SKILL_STATES.CAN_NOT_ACTIVATE,!1):!!this.validateConditions()&&(!(0=this.usesLimit))&&(0{this.canActivate=!0},this.skillDelay)):this.canActivate=!0,this.fireEvent(r.VALIDATE_SUCCESS,this).catch(e=>{u.error(e)}),this.isValid)}validateConditions(){for(let e of this.ownerConditions)if(e instanceof a||l.error(["Wrong Condition instance.",typeof e,"was specified."]),!e.isValidOn(this.owner))return this.fireEvent(r.VALIDATE_FAIL,this,e).catch(e=>{u.error(e)}),!1;return!0}validateRange(e){this.rangePropertyX&&this.rangePropertyY||l.error("Missing range properties for validation.");let t={x:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyX),y:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyY)},i={x:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyX||this.rangePropertyX),y:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyY||this.rangePropertyY)};return this.isInRange(t,i)}isInRange(e,t){if(this.fireEvent(r.SKILL_BEFORE_IN_RANGE,this).catch(e=>{u.error(e)}),0===this.range)return!0;let i=new h;i.setupInteractionArea(this.range,t.x,t.y);let n=i.isValidInteraction(e.x,e.y);return this.fireEvent(r.SKILL_AFTER_IN_RANGE,this,n).catch(e=>{u.error(e)}),n}async execute(e){if(await this.fireEvent(r.SKILL_BEFORE_EXECUTE,this,e),e&&(this.target=e),this.target||l.error("Target undefined."),!this.onExecuteConditions()||await this.isValidRange(e)||this.autoValidation&&!this.validate())return!1;let t=!1;return this.ownerEffects&&(this.applyModifiers(this.ownerEffects,this.owner,!0),await this.fireEvent(r.SKILL_APPLY_OWNER_EFFECTS,this,e)),0{t=this.finishExecution(e),this.owner.isCasting=!1,this.fireEvent(r.SKILL_AFTER_CAST,this,e,t)},this.castTime)):t=await this.finishExecution(e),this.uses++,await this.onExecuteRewards(),await this.fireEvent(r.SKILL_AFTER_EXECUTE,this,e),t}async isValidRange(e){return this.rangeAutomaticValidation&&this.rangePropertyX&&this.rangePropertyY&&!await this.validateRange(e)}async finishExecution(e){await this.fireEvent(r.SKILL_BEFORE_RUN_LOGIC,this,e);let t=await this.runSkillLogic();return await this.fireEvent(r.SKILL_AFTER_RUN_LOGIC,this,e),t}onExecuteConditions(){return!0}async runSkillLogic(){return!0}async onExecuteRewards(){}applyCriticalValue(e){return this.isCritical()&&(this.criticalMultiplier&&(e*=this.criticalMultiplier),this.criticalFixedValue&&(e+=this.criticalFixedValue)),e}getCriticalDiff(e){return this.applyCriticalValue(e)-e}isCritical(){return!(this.criticalChance<=0)&&this.criticalChancet*this.dodgeOverAimSuccess)return this.lastState=s.SKILL_STATES.DODGED,!1;let n=this.getAffectedPropertyValue(e);if(!this.allowEffectBelowZero&&0>=n)return!1;let a=this.getDiffProportion(t,i),o=this.applyDirectDamage?this.hitDamage:this.calculateProportionDamage(e,this.hitDamage,i,t,a);o+=this.calculateCriticalDamage(o,i,t,a);let c=!this.allowEffectBelowZero&&ni?r:(this.lastState=s.SKILL_STATES.APPLIED_CRITICAL_DAMAGE,r-Math.floor(r*n/100))}calculateProportionDamage(e,t,i,n,r){let s=this.getPropertiesTotal(this.owner,this.attackProperties),a=this.getPropertiesTotal(e,this.defenseProperties),o=s-a;if(o>0){let e=o99?99:e)*t/100);t+=i}if(o<0){let e=-o99?99:e)*t/100);t-=i}if(this.damageAffected&&i>n){let e=Math.floor(t*r/100);t-=e}return t}getPropertiesTotal(e,t){if(!e)return h.warning("Missing object to get properties total."),!1;if(0===t.length)return 0;try{let i=0;for(let n of t){let t=this.propertyManager.getPropertyValue(e,n);i=o.hasOwn(this.propertiesTotalOperators,n)?this.calculator.calculateNewValue(i,this.propertiesTotalOperators[n],t):i+t}return i}catch(e){return h.debug(e.message),!1}}getDiffProportion(e,t){return 100*(t-e)/e}getAffectedPropertyValue(e){return this.propertyManager.getPropertyValue(e,this.affectedProperty)}setAffectedPropertyValue(e,t){return this.propertyManager.setOwnerProperty(e,this.affectedProperty,t)}}},{"9dba7a1ed3b87f64":"cBYkx",d7a74c1b6b680357:"9PsTy",db39812edc044706:"6b010",fbb03c16891d35a5:"3lwy5"}],j4v88:[function(e,t,i){let n=e("e44f791774823c1"),r=e("2db6f1da8a2a090f"),s=e("7b8b51bc133daece"),{ErrorManager:a,sc:o}=e("fba4e87138a39fd8");t.exports=class extends n{constructor(e){super(e),this.type=s.SKILL.TYPE.EFFECT,o.hasOwn(e,"targetEffects")||a.error("Missing targetEffects for skill."),this.targetEffects=e.targetEffects}async runSkillLogic(){if(this.lastState=null,!this.validateRange(this.target))return this.lastState=s.SKILL_STATES.OUT_OF_RANGE,!1;this.lastState=s.SKILL_STATES.APPLYING_EFFECTS,this.applyModifiers(this.targetEffects,this.target),this.lastState=s.SKILL_STATES.APPLIED_EFFECTS,await this.fireEvent(r.SKILL_EFFECT_TARGET_MODIFIERS,this)}}},{e44f791774823c1:"cBYkx","2db6f1da8a2a090f":"9PsTy","7b8b51bc133daece":"6b010",fba4e87138a39fd8:"3lwy5"}],"8uI2I":[function(e,t,i){let n=e("e0c5b517af7e95eb"),{PhysicalPropertiesValidator:r}=e("53bee4a4b8ffb847"),{PhysicalSkillRunner:s}=e("2eeab888db9bf32c"),a=e("816db325f0372799"),o=e("da275099098bc955"),{sc:h}=e("c2948bad11643034");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_ATTACK,this.parentType=a.SKILL.TYPE.ATTACK,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_ATTACK_HIT,e=>{super.runSkillLogic(e)})}}},{e0c5b517af7e95eb:"3f9O5","53bee4a4b8ffb847":"1WOg9","2eeab888db9bf32c":"15hwT","816db325f0372799":"6b010",da275099098bc955:"9PsTy",c2948bad11643034:"3lwy5"}],"1WOg9":[function(e,t,i){let{ErrorManager:n,sc:r}=e("35abe0003c2a362d");t.exports.PhysicalPropertiesValidator=class{static validate(e){"function"!=typeof e.owner.executePhysicalSkill&&n.error("Missing executePhysicalSkill required method."),r.hasOwn(e,"magnitude")||n.error("Missing magnitude property."),r.hasOwn(e,"objectWidth")||n.error("Missing objectWidth property."),r.hasOwn(e,"objectHeight")||n.error("Missing objectHeight property.")}}},{"35abe0003c2a362d":"3lwy5"}],"15hwT":[function(e,t,i){let n=e("633d3b21cd84c369");t.exports.PhysicalSkillRunner=class{static async runSkillLogic(e){return(this.lastState=null,e.validateRange(e.target))?(this.lastState=n.SKILL_STATES.EXECUTE_PHYSICAL_ATTACK,await e.owner.executePhysicalSkill(e.target,e)):this.lastState=n.SKILL_STATES.OUT_OF_RANGE,!1}static async executeOnHit(e,t,i,r){return(await t.fireEvent(i,t,e),t.validateTargetOnHit&&e!==t.target)?(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_INVALID_TARGET,!1):"function"==typeof r&&(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_RUN_LOGIC,await r(e))}}},{"633d3b21cd84c369":"6b010"}],eaAf1:[function(e,t,i){let n=e("d5317b62b21ebf53"),{PhysicalPropertiesValidator:r}=e("161757e13fa22e4c"),{PhysicalSkillRunner:s}=e("63a7f8ae8a1c8d9b"),a=e("1ec320fdf9897900"),o=e("366775bdaf1fe082"),{sc:h}=e("456bc4241930a2a9");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_EFFECT,this.parentType=a.SKILL.TYPE.EFFECT,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_EFFECT_HIT,e=>{super.runSkillLogic(e)})}}},{d5317b62b21ebf53:"j4v88","161757e13fa22e4c":"1WOg9","63a7f8ae8a1c8d9b":"15hwT","1ec320fdf9897900":"6b010","366775bdaf1fe082":"9PsTy","456bc4241930a2a9":"3lwy5"}],"4okuX":[function(e,t,i){let{ReceiverWrapper:n}=e("7b4e6450c890fa8e"),{Logger:r}=e("d1031ffaeea43394");t.exports.GameManagerEnricher=class{static withReceiver(e,t,i){if(!e||!t||!i)return r.error("Invalid input parameters for GameManagerEnricher.withReceiver method."),!1;if(e?.playerId!==t?.room.sessionId||(i.skills||(i.skills=new n({owner:e,roomEvents:t,events:i.events})),!i.skillsQueue?.length))return!1;for(let e of i.skillsQueue)i.skills.processMessage(e);i.skillsQueue=[]}}},{"7b4e6450c890fa8e":"30jum",d1031ffaeea43394:"3lwy5"}],"30jum":[function(e,t,i){let{Receiver:n}=e("c695b3c1a62eb9d1"),{Logger:r,sc:s}=e("84b4ce5800839523"),{GameConst:a}=e("280612dc61e2a50e"),{ActionsConst:o}=e("6868c5c216c81bc5");t.exports.ReceiverWrapper=class extends n{constructor(e){super(e),this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in ReceiverWrapper."),this.gameManager=s.get(e.roomEvents,"gameManager",!1),this.gameManager||r.error("Game Manager undefined in ReceiverWrapper."),this.room=s.get(e.roomEvents,"room",!1),this.room||r.error("Room undefined in ReceiverWrapper."),this.translator=this.gameManager?.services?.translator}processMessage(e){if(!this.gameManager)return!1;let t=this.gameManager.getActiveScene();if(!t||!t.player)return!1;super.processMessage(e),this.playAttackOrEffectAnimation(e,t),this.playHitAnimation(e,t)}playHitAnimation(e,t){-1!==e.act.indexOf("_hit")&&this.runHitAnimation(e.x,e.y,t,e.act)}playAttackOrEffectAnimation(e,t){let i=-1!==e.act.indexOf("_eff");if(!(-1!==e.act.indexOf("_atk"))&&!i)return;this.events.emitSync("reldens.playerAttack",e,this.room);let n=i?"_eff":"_atk",r=e.act.substring(0,e.act.indexOf(n)),{ownerSprite:a,targetSprite:o,targetType:h}=this.extractOwnerTargetAndType(t,e),c=s.get(this.gameManager.config.client.skills.animations,r,"default"+n);if(a&&t.getAnimationByKey(c)){let e=t.physics.add.sprite(a.x,a.y,c);e.setDepth(2e5);let i="";s.hasOwn(this.gameManager.gameEngine.uiScene.directionalAnimations,c)&&(i=3===this.gameManager.gameEngine.uiScene.directionalAnimations[c]?a.x{e.destroy()})}o&&this.runHitAnimation(o.x,o.y,t,r+"_hit",e.target,h)}extractOwnerTargetAndType(e,t){if(!e)return r.critical("Current scene not found.",e,t),!1;let i=!1,n=!1,a=o.DATA_TYPE_VALUE_PLAYER,h=e.player.players,c=e.objectsAnimations;return s.hasOwn(h,t.owner)&&s.hasOwn(h,t.target)?{ownerSprite:i=h[t.owner],targetSprite:n=h[t.target],targetType:a}:(s.hasOwn(c,t.owner)&&(i=c[t.owner].sceneSprite,n=h[t.target]),s.hasOwn(c,t.target)&&(n=c[t.target].sceneSprite,i=h[t.owner],a=o.DATA_TYPE_VALUE_OBJECT),{ownerSprite:i,targetSprite:n,targetType:a})}runHitAnimation(e,t,i,n,r,a){let h=this.gameManager.config.client.skills.animations,c=s.hasOwn(h,n)?n:o.DEFAULT_HIT_ANIMATION_KEY;if(!i.getAnimationByKey(c)||!s.hasOwn(h,c))return!1;let l=!1,u=!1;a===o.DATA_TYPE_VALUE_PLAYER&&(u=(l=this.gameManager.getCurrentPlayer().players[r]).playerId),a===o.DATA_TYPE_VALUE_OBJECT&&(l=i.objectsAnimations[r],u=r);let d=i.physics.add.sprite(e,t,c);(d=this.setTargetSpriteDepth(l,c,u,d,h)).anims.play(c,!0).on("animationcomplete",()=>{d.destroy(),l&&s.hasOwn(l,"moveSprites")&&delete l.moveSprites[c+"_"+u]})}setTargetSpriteDepth(e,t,i,n,r){if(!e)return n.setDepth(3e5),n;s.hasOwn(e,"targetSprite")&&(e.moveSprites[t+"_"+i]=n);let a=r[t],o=e.depth+("above"===s.get(a.animationData,"depthByPlayer","")?100:-.1);return n.depthByPlayer=a.animationData.depthByPlayer,n.setDepth(o),n}updateLevelAndExperience(e){this.gameManager.gameDom.updateContent(o.SELECTORS.LEVEL_LABEL,this.translator.t(o.SNIPPETS.LEVEL,{currentLevel:e.data[o.MESSAGE.DATA.LEVEL]})),this.onLevelExperienceAdded(e);let t=e.data[o.MESSAGE.DATA.CLASS_PATH_LABEL];t&&this.gameManager.gameDom.updateContent(o.SELECTORS.CLASS_PATH_LABEL,this.translator.t(o.SNIPPETS.CLASS_PATH_LABEL,{classPathLabel:t}));let i=e.data[o.MESSAGE.DATA.NEXT_LEVEL_EXPERIENCE];i&&this.gameManager.gameDom.updateContent(o.SELECTORS.NEXT_LEVEL_EXPERIENCE,this.translator.t(o.SNIPPETS.NEXT_LEVEL_EXPERIENCE,{nextLevelExperience:i}))}onInitClassPathEnd(e){if(this.gameManager.skills&&this.gameManager.skills.uiCreated)return!1;this.gameManager.skills.uiCreated=!0,this.updateLevelAndExperience(e),this.gameManager.skills.skills=e.data[o.MESSAGE.DATA.SKILL_LEVEL],this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl)}onLevelUp(e){this.updateLevelAndExperience(e),s.hasOwn(e.data,"skl")&&(Object.assign(this.gameManager.skills.skills,e.data.skl),this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl));let t=this.getLevelUpAnimationKey(e.data.skl);t&&this.playSkillPlayerAnimation(this.gameManager.getCurrentPlayer().playerId,t)}getLevelUpAnimationKey(e){let t=this.gameManager.config.client.levels.animations,i="level_"+this.gameManager.playerData.avatarKey+"_"+e;if(s.hasOwn(t,i))return i;let n="level_"+this.gameManager.playerData.avatarKey;if(s.hasOwn(t,n))return n;let r="level_"+e;return s.hasOwn(t,r)?r:!!s.hasOwn(t,"level_default")&&"level_default"}onLevelExperienceAdded(e){this.gameManager.gameDom.updateContent(o.SELECTORS.CURRENT_EXPERIENCE,this.translator.t(o.SNIPPETS.EXPERIENCE,{experience:e.data[o.MESSAGE.DATA.EXPERIENCE]}))}onSkillBeforeCast(e){this.playSkillPlayerAnimation(e.data.extraData[o.DATA_OWNER_KEY],this.determineCastKey(e))}determineCastKey(e){let t=e.data.skillKey+"_cast";return s.hasOwn(this.gameManager.config.client.skills.animations,t)?t:"default_cast"}playSkillPlayerAnimation(e,t){let i=this.gameManager.getActiveScene(),n=i.getAnimationByKey(t);if(!n)return -1===t.indexOf("default")&&r.error('Animation sprite not found for "'+t+'".',this.gameManager.config.client.skills.animations),!1;let a=this.gameManager.getCurrentPlayer().players[e],o=a.x,h=a.y,c=i.physics.add.sprite(o,h,t),l=s.hasOwn(n,"depthByPlayer")&&"above"===n.depthByPlayer?a.depth+1:a.depth-.1;c.depthByPlayer=n.depthByPlayer,c.setDepth(l),s.get(n,"blockMovement",!1)||(a.moveSprites[t+"_"+a.playerId]=c),c.anims.play(t,!0);let u=s.get(n,"destroyTime",!1);u&&setTimeout(()=>{c.destroy(),delete a.moveSprites[t+"_"+a.playerId]},u)}onSkillAfterCast(e){let t=this.gameManager.getCurrentPlayer();if(!s.hasOwn(e.data.extraData,o.DATA_OWNER_TYPE)||!s.hasOwn(e.data.extraData,o.DATA_OWNER_KEY)||e.data.extraData[o.DATA_OWNER_TYPE]!==o.DATA_TYPE_VALUE_PLAYER||!s.hasOwn(t.players,e.data.extraData[o.DATA_OWNER_KEY]))return!1;let i=this.gameManager.getActiveScene(),n=this.gameManager.getCurrentPlayer().players[e.data.extraData[o.DATA_OWNER_KEY]],r=this.getPlayDirection(e.data.extraData,n,t,i);r&&(n.anims.play(n.avatarKey+"_"+r,!0),n.anims.stop())}onSkillAttackApplyDamage(e){let t=this.gameManager.config.get("client/actions/damage");if(!t.enabled)return!1;let i=this.gameManager.getCurrentPlayer();if(!t.showAll&&e.data.extraData[o.DATA_OWNER_KEY]!==i.playerId)return!1;let n=this.gameManager.getActiveScene(),r=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e.data.extraData,i);if(!r)return!1;n.createFloatingText(r.x,r.y,e.data.d,t.color,t.font,t.fontSize,t.duration,t.top,t.stroke,t.strokeThickness,t.shadowColor)}getPlayDirection(e,t,i,n){let r=!1,s=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e,i);if(!s)return!1;let h=s.x-t.x,c=s.y-t.y;return r=h>=0?a.RIGHT:a.LEFT,Math.abs(h)=0?a.DOWN:a.UP),r}}},{c695b3c1a62eb9d1:"aF25l","84b4ce5800839523":"3lwy5","280612dc61e2a50e":"93TbC","6868c5c216c81bc5":"59VA7"}],"8JSjE":[function(e,t,i){t.exports={actions:{selectClassPath:"Select Your Class-Path",currentLevel:"Level %currentLevel",experience:"%experience",experienceLabel:"XP",classPathLabel:"%classPathLabel",nextLevelExperience:"%nextLevelExperience"}}},{}],"1nDQd":[function(e,t,i){let{LifebarUi:n}=e("8c20660587da4fd1"),{PlayerStatsUi:r}=e("ce28c84d7547fb13"),{ActionsConst:s}=e("f776fabb66dbfa58"),{GameConst:a}=e("182ad229d5814453"),o=e("654cdd1a7a80a011"),{TranslationsMapper:h}=e("63862da16582548e"),{UsersConst:c}=e("356170d1146549c3"),{PluginInterface:l}=e("514d97ef4c40e16"),{Logger:u,sc:d}=e("29f51e27cfc36016");t.exports.UsersPlugin=class extends l{setup(e){this.gameManager=d.get(e,"gameManager",!1),this.events=d.get(e,"events",!1),this.initialGameData={},this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.setupPlayerStatsUi())}validateProperties(){return this.gameManager?!!this.events||(u.error("EventsManager undefined in UsersPlugin."),!1):(u.error("Game Manager undefined in UsersPlugin."),!1)}setupPlayerStatsUi(){this.playerStatsUi=new r({events:this.events}),this.playerStatsUi.createPlayerStatsUi()}listenEvents(){this.events.on("reldens.beforeCreateEngine",(e,t)=>{this.initialGameData=e,this.onBeforeCreateEngine(e,t),this.lifeBarUi||(this.lifeBarUi=new n({events:this.events}),this.lifeBarUi.createLifeBarUi(t))})}setTranslations(){if(!this.events||!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,c.MESSAGE.DATA_VALUES)}onBeforeCreateEngine(e,t){let i=t.config.get("client/players/multiplePlayers/enabled",!1),n=t.config.get("client/rooms/selection/allowOnLogin",!1),r=t.gameDom.getElement("#player-selection"),s=d.isTrue(e,"players")?Object.keys(e.players).length:0;if(0(t.preventDefault(),e.classList.add("hidden"),this.submitSelectedPlayer(i,n,a,r),!1)),this.showAvatarContainer(i,t,a),n.classList.remove("hidden")}submitSelectedPlayer(e,t,i,n){e.events.emitSync("reldens.onPrepareSinglePlayerSelectorFormSubmit",{usersPlugin:this,form:t,selectElement:i,player:n,gameManager:e}),e.initEngine().catch(e=>{u.error(e)})}showAvatarContainer(e,t,i){let n=e.gameDom.getElement(".player-selection-additional-info");if(!n||!this.gameManager.config.getWithoutLogs("client/players/multiplePlayers/showAvatar",!0))return;let r=e.gameDom.createElement("div");r.className="avatar-container";let s=e.gameDom.createElement("div"),o=t.player.avatarKey;s.classList.add("class-path-select-avatar"),s.style.backgroundImage=`url('/assets/custom/sprites/${o}${a.FILES.EXTENSIONS.PNG}')`;let h=this.gameManager.config.getWithoutLogs("client/players/size/width","0")+"px";s.style.backgroundPositionX="-"+h,s.style.width=h,s.style.height=this.gameManager.config.getWithoutLogs("client/players/size/height","0")+"px",r.append(s),n.append(r)}preparePlayerSelector(e,t,i){let n=i.gameDom.getElement("#player-selector-form"),r=i.gameDom.getElement("#player-select-element");if(!n||!r)return!1;for(let s of(n.addEventListener("submit",s=>{s.preventDefault();let a=r.options[r.selectedIndex].value,o=this.getPlayerById(t.players,Number(a));return o&&(e.classList.add("hidden"),i.initialGameData.player=o,i.events.emitSync("reldens.onPreparePlayerSelectorFormSubmit",{usersPlugin:this,form:n,select:r,selectedPlayer:o,gameManager:i}),i.initEngine().catch(e=>{u.error(e)})),!1}),Object.keys(t.players))){let e=t.players[s],i=new Option(this.gameManager.services.translator.t(c.SNIPPETS.OPTION_LABEL,{playerName:e.name,currentLevel:e.currentLevel,classPathLabel:e.currentClassPathLabel}),e.id);i.dataset.key=e.avatarKey,r.append(i)}this.showAvatarContainer(i,t,r),n.classList.remove("hidden")}preparePlayerCreator(e,t,i){let n=i.gameDom.getElement(s.SELECTORS.PLAYER_CREATE_FORM);n&&n.addEventListener("submit",e=>{e.preventDefault(),i.gameDom.getElement("#player-create-form .response-error").innerHTML="";let t=new FormData(n),r=d.serializeFormData(t);if(3>r["new-player-name"].toString().length)return!1;i.submitedForm=!0,i.events.emitSync("reldens.onPreparePlayerCreationFormSubmit",{usersPlugin:this,form:n,gameManager:i});try{i.gameRoom.send("*",{act:a.CREATE_PLAYER,formData:r})}catch(e){u.critical("Create player error.",e),i.gameDom.alertReload(i.services.translator.t("game.errors.connectionLost"))}return!1})}getPlayerById(e,t){if(0===e.length)return!1;for(let i of e)if(i.id===t)return i;return!1}}},{"8c20660587da4fd1":"k9uwf",ce28c84d7547fb13:"bNgpB",f776fabb66dbfa58:"59VA7","182ad229d5814453":"93TbC","654cdd1a7a80a011":"ddEMb","63862da16582548e":"1fcQw","356170d1146549c3":"8dKJt","514d97ef4c40e16":"fC3To","29f51e27cfc36016":"3lwy5"}],k9uwf:[function(e,t,i){let{UsersConst:n}=e("aad623d6d02417c4"),{ActionsConst:r}=e("479d0bf7c66730cb"),{GameConst:s}=e("d5d1589d2f5e4492"),{ObjectsConst:a}=e("50eec9aa11029ed5"),{ObjectsHandler:o}=e("d6180c46f85f20ae"),{sc:h}=e("1d465cbfd4bfebd9");t.exports.LifebarUi=class{constructor(e){this.events=e.events}createLifeBarUi(e){return this.barConfig=e.config.get("client/ui/lifeBar"),!!this.barConfig.enabled&&(this.gameManager=e,this.fixedPositionX=!1,this.fixedPositionY=!1,this.barProperty=this.gameManager.config.get("client/actions/skills/affectedProperty"),this.playerSize=this.gameManager.config.get("client/players/size"),this.lifeBars={},this.lifeDataByKey={},this.listenEvents(),this)}listenEvents(){this.events.on("reldens.playerStatsUpdateAfter",(e,t)=>{this.updatePlayerLifeBar(e,t)}),this.events.on("reldens.joinedRoom",e=>{this.listenMessages(e)}),this.events.on("reldens.runPlayerAnimation",(e,t)=>{this.drawPlayerLifeBar(t)}),this.events.on("reldens.updateGameSizeBefore",(e,t,i)=>{this.drawOnGameResize(t,i)}),this.events.on("reldens.playersOnRemove",(e,t)=>{this.removePlayerLifeBar(t)}),this.events.on("reldens.playerEngineAddPlayer",()=>{this.processLifeBarQueue()}),this.events.on("reldens.createAnimationAfter",()=>{o.drawObjectsLifeBar(this)}),this.events.on("reldens.objectBodyChanged",e=>{o.generateObjectLifeBar(e.key,this)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i)=>{this.showTargetLifeBar(t,i)}),this.events.on("reldens.gameEngineClearTarget",(e,t)=>{this.clearPreviousBar(t)})}drawOnGameResize(e,t){if(!this.barConfig.fixedPosition)return!1;this.setPlayerLifeBarFixedPosition(e,t),this.drawPlayerLifeBar(this.gameManager.getCurrentPlayer().playerId)}clearPreviousBar(e){e&&h.hasOwn(this.lifeBars,e.id)&&this.gameManager.getCurrentPlayer().playerId!==e.id&&this.lifeBars[e.id].destroy()}showTargetLifeBar(e,t){if(!this.barConfig.showOnClick)return!1;this.clearPreviousBar(t),e.type===a.TYPE_OBJECT&&o.generateObjectLifeBar(e.id,this),e.type===s.TYPE_PLAYER&&this.drawPlayerLifeBar(e.id)}barPropertyValue(){return this.barProperty+"Value"}barPropertyTotal(){return this.barProperty+"Total"}setPlayerLifeBarFixedPosition(e,t){if(!e||!t){let i=this.gameManager.gameEngine.getCurrentScreenSize(this.gameManager);e=i.newWidth,t=i.newHeight}let{uiX:i,uiY:n}=this.gameManager.gameEngine.uiScene.getUiConfig("lifeBar",e,t);this.fixedPositionX=i,this.fixedPositionY=n}updatePlayerLifeBar(e,t){let i=t.gameManager.getCurrentPlayer();this.updatePlayerBarData(i.playerId,e.statsBase[this.barProperty],e.stats[this.barProperty]),this.drawPlayerLifeBar(i.playerId)}listenMessages(e){e.onMessage("*",e=>{this.listenBattleEnd(e),this.listenLifeBarUpdates(e)})}listenBattleEnd(e){if(e.act!==r.BATTLE_ENDED||!h.hasOwn(this.lifeBars,e.t))return!1;this.lifeBars[e.t].destroy()}listenLifeBarUpdates(e){if(e.act!==n.ACTION_LIFEBAR_UPDATE)return!1;o.processObjectLifeBarMessage(e,!0,this),this.processPlayerLifeBarMessage(e,!0)}canShowPlayerLifeBar(e){let t=this.gameManager.getCurrentPlayer();if(!h.isFunction(t?.isDeath))return!1;let i=e===t?.playerId;return i&&t&&(t.isDeath()||t.isDisabled())?(this.lifeBars[e]?.setVisible(!1),!1):!!i||!!this.barConfig.showAllPlayers||this.barConfig.showOnClick&&e===this.getCurrentTargetId()}queueLifeBarMessage(e){h.hasOwn(this.gameManager,"lifeBarQueue")||(this.gameManager.lifeBarQueue=[]),this.gameManager.lifeBarQueue.push(e)}processPlayerLifeBarMessage(e,t=!1){if(r.DATA_TYPE_VALUE_PLAYER!==e[r.DATA_OWNER_TYPE])return!1;let i=this.gameManager.getCurrentPlayer(),n=e[r.DATA_OWNER_KEY];return i&&i.players&&i.players[n]?(this.updatePlayerBarData(n,e.totalValue,e.newValue),this.canShowPlayerLifeBar(n)&&this.drawPlayerLifeBar(n),!0):(t&&this.queueLifeBarMessage(e),!1)}updatePlayerBarData(e,t,i){let n=this.gameManager.getCurrentPlayer();n.players[e][this.barPropertyTotal()]=t,n.players[e][this.barPropertyValue()]=i}processLifeBarQueue(){if(0===this.gameManager.lifeBarQueue.length)return!1;let e=[];for(let t of this.gameManager.lifeBarQueue)o.processObjectLifeBarMessage(t,!1,this)&&e.push(t),this.processPlayerLifeBarMessage(t,!1)&&e.push(t);0!e.includes(t)))}drawPlayerLifeBar(e){if(this.destroyByKey(e),!this.canShowPlayerLifeBar(e))return this.lifeBars[e]?.setVisible(!1),!1;let t=this.prepareBarData(e),i=this.barConfig.height,n=this.barConfig.top,r=this.barConfig.width,s=t.player.x-r/2,a=t.player.y-i-n+t.ownerTop/2;return e===this.gameManager.getCurrentPlayer().playerId&&this.barConfig.fixedPosition?(this.lifeBars[e]=this.gameManager.getActiveScenePreloader().add.graphics(),(!1===this.fixedPositionX||!1===this.fixedPositionY)&&this.setPlayerLifeBarFixedPosition(),s=this.fixedPositionX,a=this.fixedPositionY):this.lifeBars[e]=this.gameManager.getActiveScene().add.graphics(),this.drawBar(this.lifeBars[e],t.fullValue,t.filledValue,s,a),this}destroyByKey(e){h.hasOwn(this.lifeBars,e)&&this.lifeBars[e].destroy()}prepareBarData(e){let t=this.gameManager.getCurrentPlayer().players[e],i=t[this.barPropertyTotal()],n=t[this.barPropertyValue()],r=h.get(t,"topOff",0)-this.playerSize.height;return{player:t,fullValue:i,filledValue:n,ownerTop:r}}removePlayerLifeBar(e){if(!h.hasOwn(this.lifeBars,e))return!1;this.lifeBars[e].destroy(),delete this.lifeBars[e]}drawBar(e,t,i,n,r){let s=this.barConfig.height,a=this.barConfig.width;e.clear(),e.fillStyle(parseInt(this.barConfig.fillStyle),1),e.fillRect(n,r,i*a/t,s),e.lineStyle(1,parseInt(this.barConfig.lineStyle)),e.strokeRect(n,r,a,s),e.alpha=.6,e.setDepth(3e5)}getCurrentTargetId(){return h.get(this.gameManager.getCurrentPlayer()?.currentTarget,"id",!1)}getObjectByKey(e){return h.get(this.gameManager.getActiveScene()?.objectsAnimations,e,!1)}}},{aad623d6d02417c4:"8dKJt","479d0bf7c66730cb":"59VA7",d5d1589d2f5e4492:"93TbC","50eec9aa11029ed5":"izuLV",d6180c46f85f20ae:"evhzg","1d465cbfd4bfebd9":"3lwy5"}],"8dKJt":[function(e,t,i){let n="users.";t.exports.UsersConst={ACTION_LIFEBAR_UPDATE:"alu",SNIPPETS:{PREFIX:n,OPTION_LABEL:n+"optionLabel"},MESSAGE:{DATA_VALUES:{NAMESPACE:"users"}}}},{}],evhzg:[function(e,t,i){let{ActionsConst:n}=e("66c72f936244bf4c"),{GameConst:r}=e("4fbfbb1e3b1b87b5");t.exports.ObjectsHandler=class{static processObjectLifeBarMessage(e,t=!1,i){if(!this.isValidMessage(e,i))return!1;let r=e[n.DATA_OWNER_KEY],s={};s[i.barPropertyTotal()]=e.totalValue,s[i.barPropertyValue()]=e.newValue,i.lifeDataByKey[r]=s;let a=i.getObjectByKey(r);return a?(this.drawObjectLifeBar(a,e[n.DATA_OWNER_KEY],e.totalValue,e.newValue,i),!0):(t&&i.queueLifeBarMessage(e),!1)}static isValidMessage(e,t){return n.DATA_TYPE_VALUE_OBJECT===e[n.DATA_OWNER_TYPE]&&t.barConfig.showEnemies}static drawObjectsLifeBar(e){for(let t of Object.keys(e.lifeDataByKey)){let i=e.getObjectByKey(t);this.drawObjectLifeBar(i,t,e.lifeDataByKey[t][e.barPropertyTotal()],e.lifeDataByKey[t][e.barPropertyValue()],e)}}static isValidToDraw(e,t,i){return!!e&&r.STATUS.DEATH!==e.inState&&r.STATUS.DISABLED!==e.inState&&!(i.barConfig.showOnClick&&t!==i.getCurrentTargetId())}static generateObjectLifeBar(e,t){let i=t.lifeDataByKey[e];if(!i)return!1;let n=t.getObjectByKey(e);this.drawObjectLifeBar(n,e,i[t.barPropertyTotal()],i[t.barPropertyValue()],t)}static drawObjectLifeBar(e,t,i,n,r){if(r.destroyByKey(t),!this.isValidToDraw(e,t,r))return!1;this.drawLifeBarInPosition(r,t,e,i,n)}static drawLifeBarInPosition(e,t,i,n,r){e.lifeBars[t]=e.gameManager.getActiveScene().add.graphics();let{x:s,y:a}=this.calculateObjectLifeBarPosition(i,e);e.drawBar(e.lifeBars[t],n,r,s,a)}static calculateObjectLifeBarPosition(e,t){return{x:e.x-e.sceneSprite.width/2,y:e.y-e.sceneSprite.height/2-t.barConfig.height-t.barConfig.top}}}},{"66c72f936244bf4c":"59VA7","4fbfbb1e3b1b87b5":"93TbC"}],bNgpB:[function(e,t,i){t.exports.PlayerStatsUi=class{constructor(e){this.events=e.events}createPlayerStatsUi(){this.events.on("reldens.beforePreloadUiScene",e=>{if(!e.gameManager.config.get("client/ui/playerStats/enabled"))return!1;e.load.html("playerStats","/assets/html/ui-player-stats.html"),e.load.html("playerStat","/assets/html/player-stat.html")}),this.events.on("reldens.beforeCreateUiScene",e=>{let t=e.getUiConfig("playerStats");if(!t.enabled)return!1;let i=e.add.dom(t.uiX,t.uiY).createFromCache("playerStats"),n=i.getChildByProperty("id","player-stats-close"),r=i.getChildByProperty("id","player-stats-open");r?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="block",r.style.display="none",i.setDepth(4),this.events.emit("reldens.openUI",{ui:this,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),n?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="none",r&&(r.style.display="block"),i.setDepth(1),this.events.emit("reldens.closeUI",{ui:this,closeButton:n,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),e.elementsUi.playerStats=i})}}},{}],ddEMb:[function(e,t,i){t.exports={users:{optionLabel:"%playerName - LvL %currentLevel - %classPathLabel"}}},{}],jRcE9:[function(e,t,i){let{AudioManager:n}=e("541d832742a00ab5"),{SceneAudioPlayer:r}=e("fb79730c9351b42b"),{MessagesListener:s}=e("1d50534b7413d902"),{AudioUi:a}=e("c9088bc3e4085a8a"),{TranslationsMapper:o}=e("6f071ff9a7a2b90e"),h=e("818427dea57ab21c"),{PluginInterface:c}=e("21904e239c915c7f"),{AudioConst:l}=e("587f9c67cc5dcf55"),{Logger:u,sc:d}=e("d13dcc30aa283061");t.exports.AudioPlugin=class extends c{setup(e){this.events=d.get(e,"events",!1),this.events||u.error("EventsManager undefined in AudioPlugin."),this.gameManager=d.get(e,"gameManager",!1),this.gameManager||u.error("Game Manager undefined in AudioPlugin."),this.setTranslations(),this.messagesListener=new s,this.sceneAudioPlayer=r,this.initialAudiosData={},this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,h,l.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.audioManager||(t.audioManager=new n({events:this.events,currentPlayerData:e.player}),this.initialAudiosData=d.get(e,"audio",{}))}),this.events.on("reldens.joinedRoom",(e,t)=>{t.audioManager.updateDefaultConfig(t.config.getWithoutLogs("client/general/audio/defaultAudioConfig")),this.messagesListener.listenMessages(e,t)}),this.events.on("reldens.preloadUiScene",async e=>{e.load.html("audio","/assets/html/ui-audio.html"),e.load.html("audio-category","/assets/html/ui-audio-category-row.html")}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new a(e),this.uiManager.createUi()}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{let t=e.gameManager.audioManager;if(!t)return!1;let i=d.get(this.initialAudiosData,"globalAudios",{});await t.loadGlobalAudios(i,e),await this.messagesListener.processQueue(),this.sceneAudioPlayer.associateSceneAnimationsAudios(t,e),e.cameras.main.on("camerafadeincomplete",()=>{this.sceneAudioPlayer.playSceneAudio(t,e)})}),this.events.on("reldens.changeSceneDestroyPrevious",e=>{e.gameManager.audioManager.destroySceneAudios()}),this.events.on("reldens.allAudiosLoaded",(e,t,i)=>{this.sceneAudioPlayer.playSceneAudio(e,i,!0)})}}},{"541d832742a00ab5":"6hRLM",fb79730c9351b42b:"4ld6d","1d50534b7413d902":"khKLI",c9088bc3e4085a8a:"a2LOL","6f071ff9a7a2b90e":"1fcQw","818427dea57ab21c":"i11rh","21904e239c915c7f":"fC3To","587f9c67cc5dcf55":"6GwZf",d13dcc30aa283061:"3lwy5"}],"6hRLM":[function(e,t,i){let{AudioConst:n}=e("326aa6ee5d80738b"),{Logger:r,sc:s}=e("bddd20eeb20a74c3");t.exports.AudioManager=class{constructor(e){this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in AudioManager."),this.globalAudios=s.get(e,"globalAudios",{}),this.roomsAudios=s.get(e,"roomsAudios",{}),this.categories=s.get(e,"categories",{}),this.playerConfig=s.get(e,"playerConfig",{}),this.currentPlayerData=s.get(e,"currentPlayerData",{}),this.playing={},this.currentMuteState=!1,this.changedMutedState={},this.lockedMuteState=!1,this.defaultAudioConfig={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!0,delay:0}}async setAudio(e,t){if(this.lockedMuteState)return r.info("Locked mute state to set audio."),!1;await this.events.emit("reldens.setAudio",{audioManager:this,categoryKey:e,enabled:t});let i=this.categories[e];if(this.playerConfig[i.id]=t?1:0,!s.hasOwn(this.playing,e))return!0;let n=t?"play":"stop",a=this.playing[e];return i.single_audio&&s.isObjectFunction(a,n)?this.setAudioForSingleEntity(a,n,e,t):this.setAudioForElementChildren(a,i,t)}setAudioForSingleEntity(e,t,i,n){if(!e)return r.error("Missing playingElement.",{audioKey:i,playingElement:e}),!1;if(!e.currentConfig)return!1;if(!s.isObjectFunction(e,t))return r.error("Missing playOrStop method in playingElement.",{audioKey:i,playOrStop:t,playingElement:e}),!1;try{e[t](),e.mute=!n}catch(n){r.error("PlayingElement error.",{audioKey:i,playOrStop:t,playingElement:e,error:n})}return!0}setAudioForElementChildren(e,t,i){if(t.single_audio)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let t of n)this.setAudioForSingleEntity(e[t],"stop",t,i);return!0}generateAudio(e,t){let i=Object.assign({},this.defaultAudioConfig,t.config||{});if(!s.hasOwn(e.cache.audio.entries.entries,t.audio_key))return r.error("Audio file does not exists. Audio key: "+t.audio_key,e.cache.audio.entries.entries),!1;let n=e.sound.add(t.audio_key,i);if(t.markers&&0{if(a!==e.audio_key)return!1;let o=this.generateAudio(i,e);if(!1===o)return r.error("AudioLoader can not generate the audio.",{"Audio key:":e.audio_key,"Storage key:":n}),!1;"roomsAudios"===n?this.roomsAudios[i.key][e.audio_key]=o:this.globalAudios[e.audio_key]=o,s++,await this.fireAudioEvents(t,i,e,s)}),h.start()}}async existsFileByXMLHttpRequest(e){try{let t=await fetch(e,{method:"HEAD"});return 404!==t.status}catch(e){return r.error("Error fetching:",e),!1}}async prepareFiles(e){let t=e.files_name.split(","),i=[];for(let e of t){let t=n.AUDIO_BUCKET+"/"+e;!1!==await this.existsFileByXMLHttpRequest(t)&&i.push(t)}return i}async fireAudioEvents(e,t,i,n){await t.gameManager.events.emit("reldens.audioLoaded",this,e,t,i),n===e.length&&await t.gameManager.events.emit("reldens.allAudiosLoaded",this,e,t,i)}removeAudiosFromScene(e,t){if(0===e.length||!t)return!1;for(let i of e)this.removeSceneAudioByAudioKey(t,i.audio_key);return!0}removeSceneAudioByAudioKey(e,t){e.sound.removeByKey(t),s.hasOwn(e.cache.audio.entries.entries,t)&&delete e.cache.audio.entries.entries[t],s.hasOwn(this.roomsAudios[e.key],t)&&delete this.roomsAudios[e.key][t],s.hasOwn(this.globalAudios,t)&&delete this.globalAudios[t]}updateDefaultConfig(e){s.isObject(e)&&Object.assign(this.defaultAudioConfig,e)}async processUpdateData(e,t,i){e.playerConfig&&(this.playerConfig=e.playerConfig),e.categories&&(this.addCategories(e.categories),await this.events.emit("reldens.audioManagerUpdateCategoriesLoaded",this,t,i,e));let n=s.get(e,"audios",{});if(0{if(t.children.list.length<=0)return!1;for(let i of t.children.list)"Sprite"===i.type&&(i.on("animationstart",r=>{let s=n.AUDIO_ANIMATION_KEY_START+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationupdate",r=>{let s=n.AUDIO_ANIMATION_KEY_UPDATE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationcomplete",r=>{let s=n.AUDIO_ANIMATION_KEY_COMPLETE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationrepeat",r=>{let s=n.AUDIO_ANIMATION_KEY_REPEAT+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationstop",r=>{let s=n.AUDIO_ANIMATION_KEY_STOP+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}))})}attachAudioToSprite(e,t,i,n){return s.hasOwn(e.associatedAudio,t)||(s.hasOwn(e,"associatedAudio")||(e.associatedAudio={}),s.hasOwn(e.associatedAudio,t)||(e.associatedAudio[t]=i.findAudio(t,n.key))),e.associatedAudio[t]}playSpriteAudio(e,t,i,n){let a=Number(n.currentPlayerData.id),o=Number(s.get(i,"player_id")),h=this.isCurrentPlayerSprite(o,a);if(e.audio.data.config?.onlyCurrentPlayer&&!h)return!1;let c=t.player;if(h&&c&&(c.isDisabled()||c.isDeath()))return!1;if(!e||!e.audio||!e.audio.data)return r.error("Missing associated audio data.",e),!1;let l=e.audio.data.category.category_key,u=s.get(n.categories,l,!1),d=s.get(n.playerConfig,u.id,u.enabled);if(!u||!d)return!1;let f=e.audio.audioInstance;if(u.single_audio&&s.isObjectFunction(n.playing[u.category_key],"stop")&&n.playing[u.category_key].stop(),u.single_audio)return n.playing[u.category_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(!u.single_audio){if(!e.marker)return n.playing[u.category_key][e.audio.data.audio_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(e.marker)return n.playing[u.category_key][e.marker]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(e.marker),!0)}}isCurrentPlayerSprite(e,t){return e&&e===t}isMutedState(e,t,i){return!1!==e.currentMuteState&&(r.info("AudioManager in muted state to play audio.",{mutedKey:t,audioInstance:i}),e.changedMutedState[t]=e.currentMuteState,!0)}}},{"30220416ce7546a9":"6GwZf",f35c0a4a20893403:"3lwy5"}],khKLI:[function(e,t,i){let{AudioConst:n}=e("f38271dbda4592b9");t.exports.MessagesListener=class{constructor(){this.queueMessages=[],this.sceneReady=!1}listenMessages(e,t){e.onMessage("*",async i=>{await this.processMessage(i,e,t)})}async processQueue(){if(this.sceneReady=!0,0===this.queueMessages.length)return!1;for(let e of this.queueMessages){let{message:t,room:i,gameManager:n}=e;await this.processMessage(t,i,n)}return!0}async processMessage(e,t,i){!1===this.sceneReady&&this.queueMessages.push({message:e,room:t,gameManager:i}),e.act===n.AUDIO_UPDATE&&await i.audioManager.processUpdateData(e,t,i),e.act===n.AUDIO_DELETE&&await i.audioManager.processDeleteData(e,t,i)}}},{f38271dbda4592b9:"6GwZf"}],a2LOL:[function(e,t,i){let{SceneAudioPlayer:n}=e("d9b7615cb55a6656"),{AudioUpdate:r}=e("9bae50dfe6fad086"),{sc:s}=e("fc209b9537d685a9");t.exports.AudioUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.audioManager=this.gameManager.audioManager,this.sceneAudioPlayer=n}createUi(){if(!this.audioManager.categories)return;let e=this.uiScene.cache.html.get("audio"),t=this.uiScene.cache.html.get("audio-category"),i=this.prepareAudioSettingsContent(t,e);this.gameManager.gameDom.appendToElement("#settings-dynamic",i);let n=this.gameManager.gameDom.getElements(".audio-setting");if(0===n.length)return!1;for(let e of n)e.addEventListener("click",async t=>{await this.audioManager.setAudio(t.target.dataset.categoryKey,e.checked),this.gameManager.activeRoomEvents.send(new r(e.value,e.checked)),this.sceneAudioPlayer.playSceneAudio(this.audioManager,this.gameManager.getActiveScene())})}prepareAudioSettingsContent(e,t){let i=this.prepareCategoriesRows(e);return this.gameManager.gameEngine.parseTemplate(t,{audioCategories:i,settingsTitle:this.gameManager.services.translator.t("audio.settingsTitle")})}prepareCategoriesRows(e){let t="";for(let i of Object.keys(this.audioManager.categories)){let n=this.audioManager.categories[i],r=s.get(this.audioManager.playerConfig,n.id,n.enabled);t+=this.gameManager.gameEngine.parseTemplate(e,{categoryId:n.id,categoryLabel:n.category_label,categoryKey:n.category_key,categoryChecked:r?' checked="checked"':""})}return t}}},{d9b7615cb55a6656:"4ld6d","9bae50dfe6fad086":"ibm3l",fc209b9537d685a9:"3lwy5"}],ibm3l:[function(e,t,i){let{AudioConst:n}=e("206716204b95df4c"),{GameConst:r}=e("c7ddf895e347bc66");t.exports.AudioUpdate=class{constructor(e,t){this[r.ACTION_KEY]=n.AUDIO_UPDATE,this[n.MESSAGE.DATA.UPDATE_TYPE]=e,this[n.MESSAGE.DATA.UPDATE_VALUE]=t}}},{"206716204b95df4c":"6GwZf",c7ddf895e347bc66:"93TbC"}],i11rh:[function(e,t,i){t.exports={audio:{settingsTitle:"Audio Settings"}}},{}],"3yQhR":[function(e,t,i){let{ActionsConst:n}=e("1e41f2c4a061523b"),{RoomsConst:r}=e("c28085823a93fbc9"),{PluginInterface:s}=e("6710f6d3bb0219bd"),{Logger:a,sc:o}=e("4de0a3d14a3e7a84");t.exports.RoomsPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.gameManager||a.error("Game Manager undefined in RoomsPlugin."),this.events=o.get(e,"events",!1),this.events||a.error("EventsManager undefined in RoomsPlugin."),this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.config.get("client/rooms/selection/allowOnLogin",!1)&&e.roomSelection&&this.populateSceneSelector(e.roomSelection,t)}),this.events.on("reldens.onPrepareSinglePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerCreationFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)})}populateSceneSelector(e,t){let i=t.gameDom.getElement(n.SELECTORS.PLAYER_CREATION_ADDITIONAL_INFO),r=t.gameDom.getElement(n.SELECTORS.PLAYER_SELECTION_ADDITIONAL_INFO);if(!i&&!r)return a.warning("Missing element.",{playerCreationAdditional:i,playerSelectionAdditional:r}),!1;if(i){let n=this.filterCreationRooms(e),r=this.createSelectorElements(t,n,"creation");i.append(r)}if(r){let i=this.createSelectorElements(t,e,"selection");r.append(i)}}filterCreationRooms(e){let t=[];for(let i of e)i.name!==r.ROOM_LAST_LOCATION_KEY&&t.push(i);return t}appendSelectedScene(e,t){let i=e.gameDom.getElement(".scene-select",t);if(!i)return;let n=i.options[i.selectedIndex].value;n&&(e.initialGameData.selectedScene=n)}createSelectorElements(e,t,i){let n=e.gameDom.createElement("div");n.classList.add("input-box");let r=e.gameDom.createElement("label");r.htmlFor=i+"SelectedScene",r.innerText=this.gameManager.services.translator.t("game.pleaseSelectScene");let s=e.gameDom.createElement("select");for(let e of(s.name=i+"SelectedScene",s.id=i+"SelectedScene",s.classList.add("select-element"),s.classList.add("scene-select"),t)){let t=new Option(e.title,e.name);s.append(t)}return n.append(r),n.append(s),n}}},{"1e41f2c4a061523b":"59VA7",c28085823a93fbc9:"9vHHC","6710f6d3bb0219bd":"fC3To","4de0a3d14a3e7a84":"3lwy5"}],"80hlx":[function(e,t,i){let{PredictionWorldCreator:n}=e("1f99afae6127aa6e"),{RoomEventsOverride:r}=e("fd23b82a5f097c7a"),{PluginInterface:s}=e("eb3ab2d7c28717c2"),{Logger:a,sc:o}=e("fc917919e6e14072");t.exports.PredictionPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.events=o.get(e,"events",!1),this.predictionWorldCreator=new n,this.roomEventsOverride=new r,this.validateProperties()&&this.listenEvents()}validateProperties(){return this.gameManager?!!this.events||(a.error("EventsManager undefined in PredictionPlugin."),!1):(a.error("Game Manager undefined in PredictionPlugin."),!1)}listenEvents(){this.events.on("reldens.createEngineSceneDone",async e=>{await this.predictionWorldCreator.createSceneWorld(e.currentScene)}),this.events.on("reldens.createdRoomsEventsInstance",(e,t)=>{this.roomEventsOverride.createCurrentPlayerOverride(t.activeRoomEvents),this.roomEventsOverride.playerOnChangeOverride(t.activeRoomEvents),this.roomEventsOverride.createPlayerEngineInstanceOverride(t.activeRoomEvents),this.roomEventsOverride.createSceneInstanceOverride(t.activeRoomEvents)})}}},{"1f99afae6127aa6e":"4rqFy",fd23b82a5f097c7a:"4xzUf",eb3ab2d7c28717c2:"fC3To",fc917919e6e14072:"3lwy5"}],"4rqFy":[function(e,t,i){let{CollisionsManager:n}=e("804590972ed05c20"),{P2world:r}=e("398044c66c46a0d1"),{WorldPointsValidator:s}=e("1ceec76f8d305544"),{WorldTimer:a}=e("6582f8b293532f90"),{Logger:o,sc:h}=e("8c1495bc004bacd5");t.exports.PredictionWorldCreator=class{async createSceneWorld(e){if(!e.experimentalClientPrediction)return;let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomMap,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.worldPrediction=this.createWorldInstance(r),e.worldPrediction.createLimits(),await e.worldPrediction.createWorldContent({});let h=e.gameManager.getCurrentPlayer();if(!h){o.error("Current player not present for prediction.");return}let c={id:h.playerId,width:e.configManager.get("client/players/physicalBody/width"),height:e.configManager.get("client/players/physicalBody/height"),bodyState:h.state},l=e.worldPrediction.createPlayerBody(c);l.updateBodyState=this.updateBodyStateOverride(l,h),h.predictionBody=l,e.worldPredictionTimer=new a({callbacks:[()=>{if(!e.worldPrediction){o.error("Scene World not longer exists.",e.roomWorld);return}e.worldPrediction.removeBodiesFromWorld()}]}),e.worldPredictionTimer.startWorldSteps(e.worldPrediction),e.collisionsManager=new n({roomWorld:e.worldPrediction}),h.pointsValidator=new s(i.width,i.height)}cloneMapJson(e,t){return Object.assign({},e.cache?.tilemap?.entries?.entries[e.tileset.name]?.data||{},{layers:t})}findValidLayers(e){let t=[];for(let i of e.cache.tilemap.entries.entries[e.tileset.name].data.layers)-1!==i.name.indexOf("collision")&&t.push(i);return t}updateBodyStateOverride(e,t){return()=>{if(!h.hasOwn(e.bodyState,"x")||!h.hasOwn(e.bodyState,"y")||!e.position[0]||!e.position[1])return;if(e.isNotMoving()){e.bodyState.mov=!1;return}e.bodyState.x!==e.position[0]&&(e.bodyState.x=e.position[0]),e.bodyState.y!==e.position[1]&&(e.bodyState.y=e.position[1]);let i=0!==Number(Number(e.velocity[0]).toFixed(2))||0!==Number(e.velocity[1].toFixed(2));e.bodyState.mov!==i&&(e.bodyState.mov=i);let n={x:e.position[0],y:e.position[1],dir:e.bodyState.dir};t.updatePlayer(t.playerId,{state:n})}}createWorldInstance(e){return new r(e)}}},{"804590972ed05c20":"dlIjw","398044c66c46a0d1":"hvh2r","1ceec76f8d305544":"e44so","6582f8b293532f90":"5zAcU","8c1495bc004bacd5":"3lwy5"}],dlIjw:[function(e,t,i){let{PhysicalBody:n}=e("8b976b60c28092e0"),{ErrorManager:r,Logger:s,sc:a}=e("92f5971959d19587");t.exports.CollisionsManager=class{constructor(e){this.activateCollisions(e)}activateCollisions(e){e&&(this.room=e,a.hasOwn(this.room,"roomWorld")||r.error("Room world not found."),this.guestEmailDomain=this.room.config.getWithoutLogs("server/players/guestsUser/emailDomain"),this.room.roomWorld.on("postBroadphase",this.onWorldStepStart.bind(this)),this.room.roomWorld.on("preSolve",this.beforeResolveCollision.bind(this)),this.room.roomWorld.on("beginContact",this.onCollisionsBegin.bind(this)),this.room.roomWorld.on("endContact",this.onCollisionsEnd.bind(this)))}onWorldStepStart(e){let{pairs:t}=e;if(1>=t.length)return;let i=!1,n=!1,r=!1,s=!1;for(let e of t)e.playerId&&e.pStop&&e.stopFull(),e.roomObject&&e.pStop&&e.stopFull(),e.playerId&&(r=e),e.isBullet&&(i&&!n&&(n=e),i||(i=e),e.removeInvalidStateBulletBody()),e.isRoomObject&&!e.isBullet&&(s=e);this.room.roomWorld.bulletsStopOnPlayer&&r&&i&&r.stopFull(),this.room.roomWorld.bulletsStopOnObject&&s&&i&&s.stopFull(),this.removeIdleBullets()}removeIdleBullets(){if(0!==this.room.roomWorld.removeBulletsStateIds.length)for(let e of this.room.roomWorld.removeBulletsStateIds)this.room.state.removeBody(e),this.room.roomWorld.removeBulletsStateIds.splice(this.room.roomWorld.removeBulletsStateIds.indexOf(e),1)}beforeResolveCollision(e){if(this.room.roomWorld.allowPassWallsFromBelow)for(let t of e.contactEquations){let e=this.getPlayerBody(t),i=this.getWallBody(t);if(!e||!i||i.isWorldWall)return;e.position[1]>i.position[1]&&(t.enabled=!1)}}onCollisionsBegin(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return t.playerId&&i.playerId?this.playerHitPlayerBegin(t,i):(t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectBegin(n,r):n&&r.changeScenePoint?this.playerHitChangePointBegin(n,r):n&&r.isWall?this.playerHitWallBegin(n,r):t.isRoomObject&&i.isRoomObject?this.objectHitObjectBegin(t,i):void(t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall&&this.objectHitWallBegin(s,r))}onCollisionsEnd(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return(e.bodyA.playerId&&e.bodyB.playerId&&this.playerHitPlayerEnd(e.bodyA,e.bodyB),t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectEnd(n,r):n&&r.isWall?this.playerHitWallEnd(n,r):(t.isRoomObject&&i.isRoomObject&&this.objectHitObjectEnd(t,i),t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall)?this.objectHitWallEnd(s,r):void 0}playerHitPlayerBegin(e,t){this.room.events.emit("reldens.playerHitPlayer",{bodyA:e,bodyB:t})}playerHitPlayerEnd(e,t){e.stopFull(),t.stopFull(),this.room.events.emit("reldens.playerHitPlayerEnd",{bodyA:e,bodyB:t})}playerHitObjectBegin(e,t){this.room.events.emit("reldens.startPlayerHitObjectBegin",{playerBody:e,otherBody:t}),this.findAlternativePath(e),t.roomObject&&a.isFunction(t.roomObject.onHit)&&t.roomObject.onHit({bodyA:e,bodyB:t,room:this.room}),this.room.events.emit("reldens.endPlayerHitObjectBegin",{playerBody:e,otherBody:t})}playerHitObjectEnd(e,t){let i={stopFull:!0,continue:!0};if(this.room.events.emit("reldens.playerHitObjectEnd",{playerBody:e,result:i}),!i.continue)return!1;e.stopFull(i.stopFull)}playerHitWallBegin(e,t){this.room.events.emit("reldens.playerHitWallBegin",{playerBody:e,wallBody:t})}playerHitWallEnd(e,t){if(this.room.events.emit("reldens.startPlayerHitWallEnd",{playerBody:e,wallBody:t}),e.autoMoving&&1{s.error("There was an error while setting the next scene initial position.",e)}),this.room.events.emit("reldens.endPlayerHitChangePoint",{collisionsManager:this,playerSchema:i,playerBody:e,changePoint:t,changeData:h})}objectHitObjectBegin(e,t){this.room.events.emit("reldens.startObjectHitObject",{bodyA:e,bodyB:t});let i=a.hasOwn(e,"hitPriority"),n=a.hasOwn(t,"hitPriority"),r={bodyA:e,bodyB:t,room:this.room},s=(i||n)&&(!i||n&&!(i>n))?t:e;s.roomObject&&a.isFunction(s.roomObject?.onHit)&&s.roomObject.onHit(r),e.isBullet&&e.roomObject.removeBullet(e),t.isBullet&&t.roomObject.removeBullet(t),this.findAlternativePath(e),this.findAlternativePath(t),this.room.events.emit("reldens.endObjectHitObject",{bodyA:e,bodyB:t,priorityObject:s})}objectHitObjectEnd(e,t){this.bodyFullStop(e),this.bodyFullStop(t),this.room.events.emit("reldens.objectHitObjectEnd",{bodyA:e,bodyB:t})}objectHitWallBegin(e,t){let i={objectBody:e,wall:t,continue:!0};return this.room.events.emit("reldens.objectHitWallBegin",i),i.continue&&e.isBullet&&e.roomObject.removeBullet(e),i}objectHitWallEnd(e){this.room.events.emit("reldens.startObjectHitWall",{objectBody:e}),this.resetObjectAutoMove(e),this.room.events.emit("reldens.endObjectHitWall",{objectBody:e})}bodyFullStop(e){if(!e)return!1;!(e.autoMoving&&0Math.abs(this.velocity[0])?0:o.roundToPrecision(this.velocity[0],4),this.velocity[1]=1e-4>Math.abs(this.velocity[1])?0:o.roundToPrecision(this.velocity[1],4),.001>Math.abs(this.velocity[0])&&this.stopX(),.001>Math.abs(this.velocity[1])&&this.stopY(),this.updateBodyState()}speedToNext(){if(!this.autoMoving||0===this.autoMoving.length){this.setShapesCollisionGroup(this.originalCollisionGroup);return}if(!this.autoMoving[0]){a.error("Missing autoMoving first index."),this.setShapesCollisionGroup(this.originalCollisionGroup);return}let e=this.autoMoving[0][0],t=this.autoMoving[0][1];if(0!==this.speedToNextRetryCounter.col&&this.speedToNextRetryCounter.col===e&&0!==this.speedToNextRetryCounter.row&&this.speedToNextRetryCounter.row===t&&0!==this.velocity[0]&&0!==this.velocity[1]&&this.speedToNextRetryCounter.retries++,this.speedToNextMaxRetries===this.speedToNextRetryCounter.retries){this.speedToNextRetryCounter.col=0,this.speedToNextRetryCounter.row=0;let e=this.autoMoving.shift(),t=this.autoMoving.pop();this.stopFull(!0),this.alignToTile(),this.autoMoving=this.getPathFinder().findPath(e,t),this.speedToNextRetryCounter.retries=0;return}if(this.speedToNextRetryCounter.col=e,this.speedToNextRetryCounter.row=t,this.currentCol===e&&this.currentRow===t){this.autoMoving.shift(),0===this.autoMoving.length&&this.stopAutoMoving();return}this.currentCol===e&&0!==this.velocity[0]&&(this.stopX(),this.alignToTile()),this.currentCol>e&&this.initMove(s.LEFT,!0),this.currentColt&&this.initMove(s.UP,!0),this.currentRow=Math.abs(i)&&.01>=Math.abs(n)&&(this.position[0]=e,this.position[1]=t)}updateBodyState(){if(!o.hasOwn(this.bodyState,"x")||!o.hasOwn(this.bodyState,"y"))return;if(this.isNotMoving()){this.bodyState.mov=!1;return}let e=o.roundToPrecision(this.position[0],0),t=o.roundToPrecision(this.position[1],0);if(!e||!t)return;this.bodyState.x!==e&&(this.bodyState.x=o.roundToPrecision(e,this.worldPositionPrecision)),this.bodyState.y!==t&&(this.bodyState.y=o.roundToPrecision(t,this.worldPositionPrecision));let i=o.roundToPrecision(this.velocity[0],this.worldSpeedPrecision),n=o.roundToPrecision(this.velocity[1],this.worldSpeedPrecision);this.bodyState.mov=0!==i||0!==n,this.removeInvalidStateBulletBody()}bodyLogKey(){return this.playerId?"PJ-"+this.playerId:this.bodyState?.key}removeInvalidStateBulletBody(){this.isBullet&&(this.isOutOfWorldBounds()||this.hasInvalidSpeed())&&(this.world.removeBodies.push(this),this.bodyStateId&&this.world.removeBulletsStateIds.push(this.bodyStateId))}hasInvalidSpeed(){if(!this.applySpeedThresholdOnBullets&&this.isBullet)return!1;let e=this.isBullet?this.originalSpeed.x:this.movementSpeed,t=this.isBullet?this.originalSpeed.x:this.movementSpeed,i=e*this.speedThreshold,n=t*this.speedThreshold;return Math.abs(this.velocity[0])this.position[0]||this.position[0]>this.worldWidth*this.worldTileWidth||0>this.position[1]||this.position[1]>this.worldHeight*this.worldTileHeight}isNotMoving(){let e=this.movementSpeed*this.speedThreshold,t=o.roundToPrecision(this.velocity[0]),i=o.roundToPrecision(this.velocity[1]);if(0!==this.velocity[0]&&Math.abs(t)this.velocity[0]?-1:1,n=0===this.velocity[1]?0:0>this.velocity[1]?-1:1;e===s.RIGHT&&(i=1),e===s.LEFT&&(i=-1),e===s.UP&&(n=-1),e===s.DOWN&&(n=1);let r=this.normalizeSpeed(i,n);this.velocity[0]=t*i*r,this.velocity[1]=t*n*r,(e===s.RIGHT||e===s.LEFT)&&this.validateAndSetDirection(e,this.diagonalHorizontal,this.velocity[1]),(e===s.UP||e===s.DOWN)&&this.validateAndSetDirection(e,!this.diagonalHorizontal,this.velocity[0])}moveUp(e){if(!this.world.applyGravity){this.velocity[1]=-e;return}this.canJump()&&(this.velocity[1]=-this.jumpSpeed,setTimeout(()=>{this.stopY()},this.jumpTimeMs))}calculateMagnitude(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}checkNonZeroComponents(e,t){return Math.abs(e)>0||Math.abs(t)>0}normalizeSpeed(e,t){return this.checkNonZeroComponents(e,t)?1/this.calculateMagnitude(e,t):0}validateAndSetDirection(e,t,i){(this.animationBasedOnPress||this.bodyState.autoDirection)&&(t||0===i)&&(this.bodyState.dir=e)}stopMove(){this.world&&this.world.applyGravity?this.stopX():this.stopFull()}stopFull(e=!1){this.velocity[0]=0,this.world?.applyGravity||(this.velocity[1]=0),this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopX(e=!1){this.velocity[0]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopY(e=!1){this.velocity[1]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}moveToPoint(e){this.resetAuto(),this.updateCurrentPoints();let t=[this.currentCol,this.currentRow],i=[e.column,e.row],n=this.getPathFinder();return n?(this.autoMoving=n.findPath(t,i),this.autoMoving||(this.setShapesCollisionGroup(this.originalCollisionGroup),this.stopMove()),this.autoMoving):(this.setShapesCollisionGroup(this.originalCollisionGroup),!1)}updateCurrentPoints(){if(!this.world)return;let{currentCol:e,currentRow:t}=this.positionToTiles(this.position[0],this.position[1]);return this.originalCol||(this.originalCol=e),this.originalRow||(this.originalRow=t),this.currentCol=e,this.currentRow=t,this}moveToOriginalPoint(){if(this.originalCol&&this.originalRow||this.updateCurrentPoints(),this.disableObjectsCollisionsOnReturn&&this.setShapesCollisionGroup(0),this.stopFull(),0===this.moveToOriginalPointWithDelay){this.moveToPoint({column:this.originalCol,row:this.originalRow});return}this.moveToOriginalPointTimer=setTimeout(()=>{this.moveToPoint({column:this.originalCol,row:this.originalRow})},this.moveToOriginalPointWithDelay)}setShapesCollisionGroup(e){if(this.lastSetCollisionGroup!==e)for(let t of(this.lastSetCollisionGroup=e,this.shapes))t.collisionGroup=e}canJump(){for(let e of this.world.narrowphase.contactEquations){let t=e.bodyA===this?e.bodyA:e.bodyB,i=e.bodyA.isWall?e.bodyA:e.bodyB;if(t.playerId&&0<=Number(Number(t.velocity[1]).toFixed(2))&&i.isWall&&!i.isWorldWall&&t.position[1]=0?i>this.worldWidth?this.worldWidth:i:0;let n=Math.round((t-this.worldTileHeight/2)/this.worldTileHeight);return{currentCol:i,currentRow:n=n>=0?n>this.worldHeight?this.worldHeight:n:0}}getPathFinder(){return this.pathFinder?this.pathFinder:this.world?.pathFinder}get worldTileWidth(){return this.world?.mapJson?.tilewidth}get worldTileHeight(){return this.world?.mapJson?.tileheight}get worldWidth(){return this.world?.mapJson?.width}get worldHeight(){return this.world?.mapJson?.height}}},{"3304f256e9e76c94":"6bkiu","37df9b723b227260":"93TbC","924061961623cd99":"3lwy5"}],"6bkiu":[function(e,t,i){Object.defineProperty(t.exports={AABB:e("684b4c2f51a7982f"),AngleLockEquation:e("bdffc69900b9d197"),Body:e("3f75664c0e64d6f0"),Broadphase:e("6a91eca7403fbf23"),Capsule:e("856d4f0d9932be15"),Circle:e("2ed19d42da3c562d"),Constraint:e("aa927dde400e3497"),ContactEquation:e("2d074b8afa958c13"),ContactEquationPool:e("c3b18056b7840eb7"),ContactMaterial:e("95c5dc13a3c7c260"),Convex:e("ac59578c032edc9f"),DistanceConstraint:e("5c90feeb31df3d5e"),Equation:e("f8f4511fa21776ff"),EventEmitter:e("c3d3b3771d6558ce"),FrictionEquation:e("cab660c3bd983ee4"),FrictionEquationPool:e("87607de358c9c21"),GearConstraint:e("90a946d116b90b53"),GSSolver:e("6894c0e11a66902e"),Heightfield:e("4b3b7392ecef1240"),Line:e("1e20d14367f50060"),LockConstraint:e("fdc7a4304d635ff8"),Material:e("2ead159ba8c055f3"),Narrowphase:e("9e6fca932dff920d"),NaiveBroadphase:e("b1c0219aba2108d9"),Particle:e("9633119b46909ded"),Plane:e("4f144cae12074657"),Pool:e("a996dbee78852c0f"),RevoluteConstraint:e("34cc4dd48e1d0bad"),PrismaticConstraint:e("53d36735aa65530e"),Ray:e("1d4b6783af535b58"),RaycastResult:e("f9b0bdbeada25bdf"),Box:e("1eaca10f1a6fb0c1"),RotationalVelocityEquation:e("316198d4ce4102e3"),SAPBroadphase:e("60bfc18e7e665b71"),Shape:e("1eb899949248649e"),Solver:e("3c21f4f3806b3be"),Spring:e("e3ff62163c08949b"),TopDownVehicle:e("e782a409308bbff6"),LinearSpring:e("78e7b803f9bca9ee"),RotationalSpring:e("fe49496c221554ba"),Utils:e("36b147cdc3f4bb72"),World:e("551a53932a4cfdc8"),vec2:e("19262ec940ce734e"),version:e("df51020e342624b").version},"Rectangle",{get:function(){return console.warn("The Rectangle class has been renamed to Box."),this.Box}})},{"684b4c2f51a7982f":"7Fman",bdffc69900b9d197:"jaQW1","3f75664c0e64d6f0":"1vLHz","6a91eca7403fbf23":"5ZGdm","856d4f0d9932be15":"iCu6l","2ed19d42da3c562d":"71oh9",aa927dde400e3497:"fl4d5","2d074b8afa958c13":"2hWGL",c3b18056b7840eb7:"c7vmA","95c5dc13a3c7c260":"7VedP",ac59578c032edc9f:"jXoGk","5c90feeb31df3d5e":"eMph3",f8f4511fa21776ff:"kSmDE",c3d3b3771d6558ce:"3wc90",cab660c3bd983ee4:"6o1RQ","87607de358c9c21":"dT2Zx","90a946d116b90b53":"c2nuE","6894c0e11a66902e":"Kc35t","4b3b7392ecef1240":"g5PHm","1e20d14367f50060":"3e8Uk",fdc7a4304d635ff8:"3C7H6","2ead159ba8c055f3":"kKj3c","9e6fca932dff920d":"bsKDm",b1c0219aba2108d9:"liK4P","9633119b46909ded":"hsc7O","4f144cae12074657":"kpexr",a996dbee78852c0f:"5lrfq","34cc4dd48e1d0bad":"aOW07","53d36735aa65530e":"iK7mQ","1d4b6783af535b58":"3aaBs",f9b0bdbeada25bdf:"bK4Qs","1eaca10f1a6fb0c1":"1uf32","316198d4ce4102e3":"dpMuH","60bfc18e7e665b71":"cJxaR","1eb899949248649e":"fyiLV","3c21f4f3806b3be":"cslpB",e3ff62163c08949b:"cXKmN",e782a409308bbff6:"cQjmW","78e7b803f9bca9ee":"4chxn",fe49496c221554ba:"j6tWA","36b147cdc3f4bb72":"7sQcP","551a53932a4cfdc8":"5xqPb","19262ec940ce734e":"geg3A",df51020e342624b:"aPywz"}],"7Fman":[function(e,t,i){var n=e("b3f1d8665c8114ff");function r(e){this.lowerBound=n.create(),e&&e.lowerBound&&n.copy(this.lowerBound,e.lowerBound),this.upperBound=n.create(),e&&e.upperBound&&n.copy(this.upperBound,e.upperBound)}e("def10f340a350e0e"),t.exports=r;var s=n.create();r.prototype.setFromPoints=function(e,t,i,r){var a=this.lowerBound,o=this.upperBound;"number"!=typeof i&&(i=0),0!==i?n.rotate(a,e[0],i):n.copy(a,e[0]),n.copy(o,a);for(var h=Math.cos(i),c=Math.sin(i),l=1;lo[p]&&(o[p]=u[p]),u[p]i&&(this.lowerBound[t]=i);var n=e.upperBound[t];this.upperBound[t]h?-1:o}},{b3f1d8665c8114ff:"geg3A",def10f340a350e0e:"7sQcP"}],geg3A:[function(e,t,i){var n=t.exports={},r=e("d83d88b709f376af");n.crossLength=function(e,t){return e[0]*t[1]-e[1]*t[0]},n.crossVZ=function(e,t,i){return n.rotate(e,t,-Math.PI/2),n.scale(e,e,i),e},n.crossZV=function(e,t,i){return n.rotate(e,i,Math.PI/2),n.scale(e,e,t),e},n.rotate=function(e,t,i){if(0!==i){var n=Math.cos(i),r=Math.sin(i),s=t[0],a=t[1];e[0]=n*s-r*a,e[1]=r*s+n*a}else e[0]=t[0],e[1]=t[1]},n.rotate90cw=function(e,t){var i=t[0],n=t[1];e[0]=n,e[1]=-i},n.toLocalFrame=function(e,t,i,r){n.copy(e,t),n.sub(e,e,i),n.rotate(e,e,-r)},n.toGlobalFrame=function(e,t,i,r){n.copy(e,t),n.rotate(e,e,r),n.add(e,e,i)},n.vectorToLocalFrame=function(e,t,i){n.rotate(e,t,-i)},n.vectorToGlobalFrame=function(e,t,i){n.rotate(e,t,i)},n.centroid=function(e,t,i,r){return n.add(e,t,i),n.add(e,e,r),n.scale(e,e,1/3),e},n.create=function(){var e=new r.ARRAY_TYPE(2);return e[0]=0,e[1]=0,e},n.clone=function(e){var t=new r.ARRAY_TYPE(2);return t[0]=e[0],t[1]=e[1],t},n.fromValues=function(e,t){var i=new r.ARRAY_TYPE(2);return i[0]=e,i[1]=t,i},n.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},n.set=function(e,t,i){return e[0]=t,e[1]=i,e},n.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},n.subtract=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},n.sub=n.subtract,n.multiply=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},n.mul=n.multiply,n.divide=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},n.div=n.divide,n.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},n.distance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},n.dist=n.distance,n.squaredDistance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n},n.sqrDist=n.squaredDistance,n.length=function(e){var t=e[0],i=e[1];return Math.sqrt(t*t+i*i)},n.len=n.length,n.squaredLength=function(e){var t=e[0],i=e[1];return t*t+i*i},n.sqrLen=n.squaredLength,n.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},n.normalize=function(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),e[0]=t[0]*r,e[1]=t[1]*r),e},n.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},n.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},n.lerp=function(e,t,i,n){var r=t[0],s=t[1];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e},n.reflect=function(e,t,i){var n=t[0]*i[0]+t[1]*i[1];e[0]=t[0]-2*i[0]*n,e[1]=t[1]-2*i[1]*n},n.getLineSegmentsIntersection=function(e,t,i,r,s){var a=n.getLineSegmentsIntersectionFraction(t,i,r,s);return!(a<0)&&(e[0]=t[0]+a*(i[0]-t[0]),e[1]=t[1]+a*(i[1]-t[1]),!0)},n.getLineSegmentsIntersectionFraction=function(e,t,i,n){var r,s,a=t[0]-e[0],o=t[1]-e[1],h=n[0]-i[0],c=n[1]-i[1];return(r=(-o*(e[0]-i[0])+a*(e[1]-i[1]))/(-h*o+a*c),s=(h*(e[1]-i[1])-c*(e[0]-i[0]))/(-h*o+a*c),r>=0&&r<=1&&s>=0&&s<=1)?s:-1}},{d83d88b709f376af:"7sQcP"}],"7sQcP":[function(e,t,i){function n(){}t.exports=n,n.appendArray=function(e,t){if(t.length<15e4)e.push.apply(e,t);else for(var i=0,n=t.length;i!==n;++i)e.push(t[i])},n.splice=function(e,t,i){i=i||1;for(var n=t,r=e.length-i;ni&&(i=a+o)}this.boundingRadius=i},l.prototype.addShape=function(e,t,i){if(e.body)throw Error("A shape can only be added to one body.");e.body=this,t?n.copy(e.position,t):n.set(e.position,0,0),e.angle=i||0,this.shapes.push(e),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},l.prototype.removeShape=function(e){var t=this.shapes.indexOf(e);return -1!==t&&(this.shapes.splice(t,1),this.aabbNeedsUpdate=!0,e.body=null,!0)},l.prototype.updateMassProperties=function(){if(this.type===l.STATIC||this.type===l.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var e=this.shapes,t=e.length,i=this.mass/t,r=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var s=0;s0?1/r:0}this.invMass=1/this.mass,n.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}},n.create(),l.prototype.applyForce=function(e,t){if(n.add(this.force,this.force,e),t){var i=n.crossLength(t,e);this.angularForce+=i}};var f=n.create(),p=n.create(),g=n.create();l.prototype.applyForceLocal=function(e,t){t=t||g,this.vectorToWorldFrame(f,e),this.vectorToWorldFrame(p,t),this.applyForce(f,p)};var m=n.create();l.prototype.applyImpulse=function(e,t){if(this.type===l.DYNAMIC&&(n.scale(m,e,this.invMass),n.multiply(m,this.massMultiplier,m),n.add(this.velocity,m,this.velocity),t)){var i=n.crossLength(t,e);i*=this.invInertia,this.angularVelocity+=i}};var v=n.create(),y=n.create(),b=n.create();l.prototype.applyImpulseLocal=function(e,t){t=t||b,this.vectorToWorldFrame(v,e),this.vectorToWorldFrame(y,t),this.applyImpulse(v,y)},l.prototype.toLocalFrame=function(e,t){n.toLocalFrame(e,t,this.position,this.angle)},l.prototype.toWorldFrame=function(e,t){n.toGlobalFrame(e,t,this.position,this.angle)},l.prototype.vectorToLocalFrame=function(e,t){n.vectorToLocalFrame(e,t,this.angle)},l.prototype.vectorToWorldFrame=function(e,t){n.vectorToGlobalFrame(e,t,this.angle)},l.prototype.fromPolygon=function(e,t){t=t||{};for(var i,a=this.shapes.length;a>=0;--a)this.removeShape(this.shapes[a]);var o=new r.Polygon;if(o.vertices=e,o.makeCCW(),"number"==typeof t.removeCollinearPoints&&o.removeCollinearPoints(t.removeCollinearPoints),void 0===t.skipSimpleCheck&&!o.isSimple())return!1;this.concavePath=o.vertices.slice(0);for(var a=0;a=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=l.AWAKE):(this.idleTime+=i,this.sleepState=l.SLEEPY),this.idleTime>this.sleepTimeLimit&&(t?this.wantsToSleep=!0:this.sleep()))},l.prototype.overlaps=function(e){return this.world.overlapKeeper.bodiesAreOverlapping(this,e)};var T=n.create(),S=n.create();l.prototype.integrate=function(e){var t=this.invMass,i=this.force,r=this.position,s=this.velocity;n.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*e),n.scale(T,i,e*t),n.multiply(T,this.massMultiplier,T),n.add(s,T,s),this.integrateToTimeOfImpact(e)||(n.scale(S,s,e),n.add(r,r,S),this.fixedRotation||(this.angle+=this.angularVelocity*e)),this.aabbNeedsUpdate=!0};var A=new a,C=new o({mode:o.ALL}),_=n.create(),I=n.create(),O=n.create(),P=n.create();l.prototype.integrateToTimeOfImpact=function(e){if(this.ccdSpeedThreshold<0||n.squaredLength(this.velocity)=c&&he.vertices.length)throw Error("lol2");if(t<0)throw Error("lol3");for(var n=t;nt[e][0])&&(e=i);r.left(this.at(e-1),this.at(e),this.at(e+1))||this.reverse()},a.prototype.reverse=function(){for(var e=[],t=0,i=this.vertices.length;t!==i;t++)e.push(this.vertices.pop());this.vertices=e},a.prototype.isReflex=function(e){return r.right(this.at(e-1),this.at(e),this.at(e+1))};var o=[],h=[];function c(e,t,i,n,r){r=r||0;var a=t[1]-e[1],o=e[0]-t[0],h=a*e[0]+o*e[1],c=n[1]-i[1],l=i[0]-n[0],u=c*i[0]+l*i[1],d=a*l-c*o;return s.eq(d,0,r)?[0,0]:[(l*h-o*u)/d,(a*u-c*h)/d]}a.prototype.canSee=function(e,t){var i,s;if(r.leftOn(this.at(e+1),this.at(e),this.at(t))&&r.rightOn(this.at(e-1),this.at(e),this.at(t)))return!1;s=r.sqdist(this.at(e),this.at(t));for(var a=0;a!==this.vertices.length;++a)if((a+1)%this.vertices.length!==e&&a!==e&&r.leftOn(this.at(e),this.at(t),this.at(a+1))&&r.rightOn(this.at(e),this.at(t),this.at(a))&&(o[0]=this.at(e),o[1]=this.at(t),h[0]=this.at(a),h[1]=this.at(a+1),i=n.lineInt(o,h),r.sqdist(this.at(e),i)0?this.slice(e):[this]},a.prototype.slice=function(e){if(0==e.length)return[this];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2==e[0].length&&e[0][0]instanceof Array){for(var t=[this],i=0;is)return console.warn("quickDecomp: max level ("+s+") reached."),e;for(var w=0;wm&&(m+=this.vertices.length),g=Number.MAX_VALUE,m3&&i>=0;--i)r.collinear(this.at(i-1),this.at(i),this.at(i+1),e)&&(this.vertices.splice(i%this.vertices.length,1),i--,t++);return t}},{d8008e40e643f58e:"4K6SZ","27760a6f627f557e":"jyNL6",edd1be50e7a94605:"7TFSV"}],"4K6SZ":[function(e,t,i){var n=e("fea8e7ecc9e8fe4");function r(){}t.exports=r,r.lineInt=function(e,t,i){i=i||0;var r,s,a,o,h,c,l,u=[0,0];return r=e[1][1]-e[0][1],s=e[0][0]-e[1][0],a=r*e[0][0]+s*e[0][1],o=t[1][1]-t[0][1],h=t[0][0]-t[1][0],c=o*t[0][0]+h*t[0][1],l=r*h-o*s,n.eq(l,0,i)||(u[0]=(h*a-s*c)/l,u[1]=(r*c-o*a)/l),u},r.segmentsIntersect=function(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}},{fea8e7ecc9e8fe4:"7TFSV"}],"7TFSV":[function(e,t,i){function n(){}t.exports=n,n.eq=function(e,t,i){return Math.abs(e-t)<(i=i||0)}},{}],jyNL6:[function(e,t,i){function n(){}t.exports=n,n.area=function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])},n.left=function(e,t,i){return n.area(e,t,i)>0},n.leftOn=function(e,t,i){return n.area(e,t,i)>=0},n.right=function(e,t,i){return 0>n.area(e,t,i)},n.rightOn=function(e,t,i){return 0>=n.area(e,t,i)};var r=[],s=[];n.collinear=function(e,t,i,a){return a?(r[0]=t[0]-e[0],r[1]=t[1]-e[1],s[0]=i[0]-t[0],s[1]=i[1]-t[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))s)&&(s=n),(null===a||ns){var c=a;a=s,s=c}r.set(t,a,s)},a.prototype.projectOntoWorldAxis=function(e,t,i,n){var s=h;this.projectOntoLocalAxis(e,n),0!==i?r.rotate(s,e,i):s=e;var a=r.dot(t,s);r.set(n,n[0]+a,n[1]+a)},a.prototype.updateTriangles=function(){this.triangles.length=0;for(var e=[],t=0;tt&&(t=n)}this.boundingRadius=Math.sqrt(t)},a.triangleArea=function(e,t,i){return((t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1]))*.5},a.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var e=this.triangles,t=this.vertices,i=0;i!==e.length;i++){var n=e[i],r=t[n[0]],s=t[n[1]],o=t[n[2]],h=a.triangleArea(r,s,o);this.area+=h}},a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)};var p=r.create(),g=r.create(),m=r.create();a.prototype.raycast=function(e,t,i,n){var s=this.vertices;r.toLocalFrame(p,t.from,i,n),r.toLocalFrame(g,t.to,i,n);for(var a=s.length,o=0;o=0&&(r.sub(m,c,h),r.rotate(m,m,-Math.PI/2+n),r.normalize(m,m),t.reportIntersection(e,l,m,o))}}},{"841fd986776e9f0c":"fyiLV",dcb74eb19e59e896:"geg3A","84be6d54e4a9572e":"5fcbo",a884cbe4162e15c3:"5arAY"}],fyiLV:[function(e,t,i){t.exports=r;var n=e("7f0647825fa1536d");function r(e){e=e||{},this.body=null,this.position=n.fromValues(0,0),e.position&&n.copy(this.position,e.position),this.angle=e.angle||0,this.type=e.type||0,this.id=r.idCounter++,this.boundingRadius=0,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:1,this.collisionResponse=void 0===e.collisionResponse||e.collisionResponse,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:1,this.material=e.material||null,this.area=0,this.sensor=void 0!==e.sensor&&e.sensor,this.type&&this.updateBoundingRadius(),this.updateArea()}r.idCounter=0,r.CIRCLE=1,r.PARTICLE=2,r.PLANE=4,r.CONVEX=8,r.LINE=16,r.BOX=32,Object.defineProperty(r,"RECTANGLE",{get:function(){return console.warn("Shape.RECTANGLE is deprecated, use Shape.BOX instead."),r.BOX}}),r.CAPSULE=64,r.HEIGHTFIELD=128,r.prototype.computeMomentOfInertia=function(e){},r.prototype.updateBoundingRadius=function(){},r.prototype.updateArea=function(){},r.prototype.computeAABB=function(e,t,i){},r.prototype.raycast=function(e,t,i,n){}},{"7f0647825fa1536d":"geg3A"}],"5fcbo":[function(e,t,i){var n={};n.GetArea=function(e){if(e.length<6)return 0;for(var t=e.length-2,i=0,n=0;n>1;if(t<3)return[];for(var i=[],r=[],s=0;s3;){var o=r[(s+0)%a],h=r[(s+1)%a],c=r[(s+2)%a],l=e[2*o],u=e[2*o+1],d=e[2*h],f=e[2*h+1],p=e[2*c],g=e[2*c+1],m=!1;if(n._convex(l,u,d,f,p,g)){m=!0;for(var v=0;v3*a)break}return i.push(r[0],r[1],r[2]),i},n._PointInTriangle=function(e,t,i,n,r,s,a,o){var h=a-i,c=o-n,l=r-i,u=s-n,d=e-i,f=t-n,p=h*h+c*c,g=h*l+c*u,m=h*d+c*f,v=l*l+u*u,y=l*d+u*f,b=1/(p*v-g*g),x=(v*m-g*y)*b,E=(p*y-g*m)*b;return x>=0&&E>=0&&x+E<1},n._convex=function(e,t,i,n,r,s){return(t-n)*(r-i)+(i-e)*(s-n)>=0},t.exports=n},{}],bK4Qs:[function(e,t,i){var n=e("ffed16535981586e"),r=e("b8c131fd689cab6d");function s(){this.normal=n.create(),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1}t.exports=s,s.prototype.reset=function(){n.set(this.normal,0,0),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1},s.prototype.getHitDistance=function(e){return n.distance(e.from,e.to)*this.fraction},s.prototype.hasHit=function(){return -1!==this.fraction},s.prototype.getHitPoint=function(e,t){n.lerp(e,t.from,t.to,this.fraction)},s.prototype.stop=function(){this.isStopped=!0},s.prototype.shouldStop=function(e){return this.isStopped||-1!==this.fraction&&e.mode===r.ANY},s.prototype.set=function(e,t,i,r,s){n.copy(this.normal,e),this.shape=t,this.body=i,this.fraction=r,this.faceIndex=s}},{ffed16535981586e:"geg3A",b8c131fd689cab6d:"3aaBs"}],"3aaBs":[function(e,t,i){t.exports=r;var n=e("33edfb61f004dada");function r(e){e=e||{},this.from=e.from?n.fromValues(e.from[0],e.from[1]):n.create(),this.to=e.to?n.fromValues(e.to[0],e.to[1]):n.create(),this.checkCollisionResponse=void 0===e.checkCollisionResponse||e.checkCollisionResponse,this.skipBackfaces=!!e.skipBackfaces,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:-1,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:-1,this.mode=void 0!==e.mode?e.mode:r.ANY,this.callback=e.callback||function(e){},this.direction=n.create(),this.length=1,this.update()}e("9e89c41e6357f79c"),e("197f77279886c828"),e("bb1f87d75f3ca6c0"),r.prototype.constructor=r,r.CLOSEST=1,r.ANY=2,r.ALL=4,r.prototype.update=function(){var e=this.direction;n.sub(e,this.to,this.from),this.length=n.length(e),n.normalize(e,e)},r.prototype.intersectBodies=function(e,t){for(var i=0,n=t.length;!e.shouldStop(this)&&i=0||s.containsPoint(this.from))&&this.intersectBody(e,r)}};var s=n.create();r.prototype.intersectBody=function(e,t){var i=this.checkCollisionResponse;if(!i||t.collisionResponse)for(var r=0,a=t.shapes.length;rt.boundingRadius*t.boundingRadius||(this._currentBody=s,this._currentShape=t,t.raycast(e,this,r,i),this._currentBody=this._currentShape=null)},r.prototype.getAABB=function(e){var t=this.to,i=this.from;n.set(e.lowerBound,Math.min(t[0],i[0]),Math.min(t[1],i[1])),n.set(e.upperBound,Math.max(t[0],i[0]),Math.max(t[1],i[1]))},n.create(),r.prototype.reportIntersection=function(e,t,i,s){this.from,this.to;var a=this._currentShape,o=this._currentBody;if(!(this.skipBackfaces&&n.dot(i,this.direction)>0))switch(this.mode){case r.ALL:e.set(i,a,o,t,s),this.callback(e);break;case r.CLOSEST:(t=0&&(r.rotate(h,u,n),r.scale(h,h,2*f-1),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}for(var m=Math.pow(this.radius,2)+Math.pow(d,2),f=0;f<2;f++){r.set(c,d*(2*f-1),0),r.toGlobalFrame(c,c,i,n);var v=Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2),y=2*((a[0]-s[0])*(s[0]-c[0])+(a[1]-s[1])*(s[1]-c[1])),g=Math.pow(y,2)-4*v*(Math.pow(s[0]-c[0],2)+Math.pow(s[1]-c[1],2)-Math.pow(this.radius,2));if(!(g<0)){if(0===g){if(r.lerp(o,s,a,g),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}else{var b=Math.sqrt(g),x=1/(2*v),E=(-y-b)*x,w=(-y+b)*x;if(E>=0&&E<=1&&(r.lerp(o,s,a,E),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,E,h,-1),e.shouldStop(t)))||w>=0&&w<=1&&(r.lerp(o,s,a,w),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,w,h,-1),e.shouldStop(t))))return}}}}},{"9e9977082ca4fe14":"fyiLV","18975187aa31e1cf":"geg3A"}],"71oh9":[function(e,t,i){var n=e("7b96c457d59a0d0"),r=e("b89d644e39bbe061");function s(e){"number"==typeof arguments[0]&&(e={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),e=e||{},this.radius=e.radius||1,e.type=n.CIRCLE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){var t=this.radius;return e*t*t/2},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},s.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},s.prototype.computeAABB=function(e,t,i){var n=this.radius;r.set(e.upperBound,n,n),r.set(e.lowerBound,-n,-n),t&&(r.add(e.lowerBound,e.lowerBound,t),r.add(e.upperBound,e.upperBound,t))};var a=r.create(),o=r.create();s.prototype.raycast=function(e,t,i,n){var s=t.from,h=t.to,c=this.radius,l=Math.pow(h[0]-s[0],2)+Math.pow(h[1]-s[1],2),u=2*((h[0]-s[0])*(s[0]-i[0])+(h[1]-s[1])*(s[1]-i[1])),d=Math.pow(u,2)-4*l*(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)-Math.pow(c,2));if(!(d<0)){if(0===d)r.lerp(a,s,h,d),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,d,o,-1);else{var f=Math.sqrt(d),p=1/(2*l),g=(-u-f)*p,m=(-u+f)*p;if(g>=0&&g<=1&&(r.lerp(a,s,h,g),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,g,o,-1),e.shouldStop(t)))return;m>=0&&m<=1&&(r.lerp(a,s,h,m),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,m,o,-1))}}}},{"7b96c457d59a0d0":"fyiLV",b89d644e39bbe061:"geg3A"}],fl4d5:[function(e,t,i){t.exports=r;var n=e("72b9dd33e1ac0322");function r(e,t,i,r){this.type=i,r=n.defaults(r,{collideConnected:!0,wakeUpBodies:!0}),this.equations=[],this.bodyA=e,this.bodyB=t,this.collideConnected=r.collideConnected,r.wakeUpBodies&&(e&&e.wakeUp(),t&&t.wakeUp())}r.prototype.update=function(){throw Error("method update() not implmemented in this Constraint subclass!")},r.DISTANCE=1,r.GEAR=2,r.LOCK=3,r.PRISMATIC=4,r.REVOLUTE=5,r.prototype.setStiffness=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.stiffness=e,n.needsUpdate=!0}},r.prototype.setRelaxation=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.relaxation=e,n.needsUpdate=!0}}},{"72b9dd33e1ac0322":"7sQcP"}],"2hWGL":[function(e,t,i){var n=e("d1ef8939b96b621"),r=e("b8f27de80732e752");function s(e,t){n.call(this,e,t,0,Number.MAX_VALUE),this.contactPointA=r.create(),this.penetrationVec=r.create(),this.contactPointB=r.create(),this.normalA=r.create(),this.restitution=0,this.firstImpact=!1,this.shapeA=null,this.shapeB=null}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeB=function(e,t,i){var n,s,a=this.bodyA,o=this.bodyB,h=this.contactPointA,c=this.contactPointB,l=a.position,u=o.position,d=this.penetrationVec,f=this.normalA,p=this.G,g=r.crossLength(h,f),m=r.crossLength(c,f);return p[0]=-f[0],p[1]=-f[1],p[2]=-g,p[3]=f[0],p[4]=f[1],p[5]=m,r.add(d,u,c),r.sub(d,d,l),r.sub(d,d,h),this.firstImpact&&0!==this.restitution?(s=0,n=1/t*(1+this.restitution)*this.computeGW()):(s=r.dot(f,d)+this.offset,n=this.computeGW()),-s*e-n*t-i*this.computeGiMf()};var a=r.create(),o=r.create(),h=r.create();s.prototype.getVelocityAlongNormal=function(){return this.bodyA.getVelocityAtPoint(a,this.contactPointA),this.bodyB.getVelocityAtPoint(o,this.contactPointB),r.subtract(h,a,o),r.dot(this.normalA,h)}},{d1ef8939b96b621:"kSmDE",b8f27de80732e752:"geg3A"}],c7vmA:[function(e,t,i){var n=e("c9592f5c11436c3c"),r=e("16e85c8eda8f563e");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=null,this}},{c9592f5c11436c3c:"2hWGL","16e85c8eda8f563e":"5lrfq"}],"5lrfq":[function(e,t,i){function n(e){e=e||{},this.objects=[],void 0!==e.size&&this.resize(e.size)}t.exports=n,n.prototype.resize=function(e){for(var t=this.objects;t.length>e;)t.pop();for(;t.lengththis.upperLimit&&(a.maxForce=0,a.minForce=-this.maxForce,this.distance=this.upperLimit,u=!0),this.lowerLimitEnabled&&this.positionf*o&&(g=f*o-u),s[e]+=g,t.addToWlambda(g),g}},{"5da883f1a169a767":"geg3A","806c911d364412af":"cslpB","860c6aa487698116":"7sQcP","407b0a2d87bc3b6e":"6o1RQ"}],cslpB:[function(e,t,i){e("ead7d6ca55bdfe1c");var n=e("d16ea32444765393");function r(e,t){e=e||{},n.call(this),this.type=t,this.equations=[],this.equationSortFunction=e.equationSortFunction||!1}t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.solve=function(e,t){throw Error("Solver.solve should be implemented by subclasses!")};var s={bodies:[]};r.prototype.solveIsland=function(e,t){this.removeAllEquations(),t.equations.length&&(this.addEquations(t.equations),s.bodies.length=0,t.getBodies(s.bodies),s.bodies.length&&this.solve(e,s))},r.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},r.prototype.addEquation=function(e){e.enabled&&this.equations.push(e)},r.prototype.addEquations=function(e){for(var t=0,i=e.length;t!==i;t++){var n=e[t];n.enabled&&this.equations.push(n)}},r.prototype.removeEquation=function(e){var t=this.equations.indexOf(e);-1!==t&&this.equations.splice(t,1)},r.prototype.removeAllEquations=function(){this.equations.length=0},r.GS=1,r.ISLAND=2},{ead7d6ca55bdfe1c:"7sQcP",d16ea32444765393:"3wc90"}],g5PHm:[function(e,t,i){var n=e("8b74883bebf2335f"),r=e("2a849db0ba73e95d");function s(e){if(Array.isArray(arguments[0])){if(e={heights:arguments[0]},"object"==typeof arguments[1])for(var t in arguments[1])e[t]=arguments[1][t];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}e=e||{},this.heights=e.heights?e.heights.slice(0):[],this.maxValue=e.maxValue||null,this.minValue=e.minValue||null,this.elementWidth=e.elementWidth||.1,(void 0===e.maxValue||void 0===e.minValue)&&this.updateMaxMinValues(),e.type=n.HEIGHTFIELD,n.call(this,e)}e("2dc7f9a400756551"),t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.updateMaxMinValues=function(){for(var e=this.heights,t=e[0],i=e[0],n=0;n!==e.length;n++){var r=e[n];r>t&&(t=r),rf){var p=d;d=f,f=p}for(var g=0;g=0&&(r.sub(o,c,h),r.rotate(o,o,n+Math.PI/2),r.normalize(o,o),t.reportIntersection(e,m,o,-1),e.shouldStop(t)))return}}},{"8b74883bebf2335f":"fyiLV","2a849db0ba73e95d":"geg3A","2dc7f9a400756551":"7sQcP"}],"3e8Uk":[function(e,t,i){var n=e("e0cff235fc0213eb"),r=e("f3353cee691d66a4");function s(e){"number"==typeof arguments[0]&&(e={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),e=e||{},this.length=e.length||1,e.type=n.LINE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){return e*Math.pow(this.length,2)/12},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var a=[r.create(),r.create()];s.prototype.computeAABB=function(e,t,i){var n=this.length/2;r.set(a[0],-n,0),r.set(a[1],n,0),e.setFromPoints(a,t,i,0)},r.create();var o=r.create(),h=r.create(),c=r.create(),l=r.fromValues(0,1);s.prototype.raycast=function(e,t,i,n){var s=t.from,a=t.to,u=this.length/2;r.set(h,-u,0),r.set(c,u,0),r.toGlobalFrame(h,h,i,n),r.toGlobalFrame(c,c,i,n);var d=r.getLineSegmentsIntersectionFraction(h,c,s,a);d>=0&&(r.rotate(o,l,n),t.reportIntersection(e,d,o,-1))}},{e0cff235fc0213eb:"fyiLV",f3353cee691d66a4:"geg3A"}],"3C7H6":[function(e,t,i){var n=e("97b5dc61d97fd4de"),r=e("48200108ddae2806"),s=e("6dd72d87868993d0");function a(e,t,i){i=i||{},n.call(this,e,t,n.LOCK,i);var a=void 0===i.maxForce?Number.MAX_VALUE:i.maxForce;i.localAngleB;var o=new s(e,t,-a,a),h=new s(e,t,-a,a),c=new s(e,t,-a,a),l=r.create(),u=r.create(),d=this;o.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[0]},h.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[1]};var f=r.create(),p=r.create();c.computeGq=function(){return r.rotate(f,d.localOffsetB,t.angle-d.localAngleB),r.scale(f,f,-1),r.sub(u,e.position,t.position),r.add(u,u,f),r.rotate(p,f,-Math.PI/2),r.normalize(p,p),r.dot(u,p)},this.localOffsetB=r.create(),i.localOffsetB?r.copy(this.localOffsetB,i.localOffsetB):(r.sub(this.localOffsetB,t.position,e.position),r.rotate(this.localOffsetB,this.localOffsetB,-e.angle)),this.localAngleB=0,"number"==typeof i.localAngleB?this.localAngleB=i.localAngleB:this.localAngleB=t.angle-e.angle,this.equations.push(o,h,c),this.setMaxForce(a)}t.exports=a,a.prototype=new n,a.prototype.constructor=a,a.prototype.setMaxForce=function(e){for(var t=this.equations,i=0;iR&&M0)for(var E=0;EMath.pow(p,2))return 0;if(u)return!0;var g=this.createContactEquation(e,o,t,h);return r(g.normalA,c,i),n.normalize(g.normalA,g.normalA),n.scale(g.contactPointA,g.normalA,d),n.scale(g.contactPointB,g.normalA,-f),s(g.contactPointA,g.contactPointA,i),r(g.contactPointA,g.contactPointA,e.position),s(g.contactPointB,g.contactPointB,c),r(g.contactPointB,g.contactPointB,o.position),this.contactEquations.push(g),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(g)),1},k.prototype[f.PLANE|f.CONVEX]=k.prototype[f.PLANE|f.BOX]=k.prototype.planeConvex=function(e,t,i,o,h,c,l,u,d){var f=0;n.rotate(v,g,o);for(var p=0;p!==c.vertices.length;p++){var b=c.vertices[p];if(n.rotate(m,b,u),s(m,m,l),r(y,m,i),0>=a(y,v)){if(d)return!0;f++;var x=this.createContactEquation(e,h,t,c);r(y,m,i),n.copy(x.normalA,v);var E=a(y,x.normalA);n.scale(y,x.normalA,E),r(x.contactPointB,m,h.position),r(x.contactPointA,m,y),r(x.contactPointA,x.contactPointA,e.position),this.contactEquations.push(x),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&f&&this.frictionEquations.push(this.createFrictionFromAverage(f)),f},k.prototype[f.PARTICLE|f.PLANE]=k.prototype.particlePlane=function(e,t,i,s,o,h,c,l,u){l=l||0,r(m,i,c),n.rotate(v,g,l);var d=a(m,v);if(d>0)return 0;if(u)return!0;var f=this.createContactEquation(o,e,h,t);return n.copy(f.normalA,v),n.scale(m,f.normalA,d),r(f.contactPointA,i,m),r(f.contactPointA,f.contactPointA,o.position),r(f.contactPointB,i,e.position),this.contactEquations.push(f),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(f)),1},k.prototype[f.CIRCLE|f.PARTICLE]=k.prototype.circleParticle=function(e,t,i,a,o,h,c,l,u){if(r(m,c,i),n.squaredLength(m)>Math.pow(t.radius,2))return 0;if(u)return!0;var d=this.createContactEquation(e,o,t,h);return n.copy(d.normalA,m),n.normalize(d.normalA,d.normalA),n.scale(d.contactPointA,d.normalA,t.radius),s(d.contactPointA,d.contactPointA,i),r(d.contactPointA,d.contactPointA,e.position),r(d.contactPointB,c,o.position),this.contactEquations.push(d),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(d)),1};var K=new u({radius:1}),J=n.create(),$=n.create();n.create(),k.prototype[f.PLANE|f.CAPSULE]=k.prototype.planeCapsule=function(e,t,i,r,a,o,h,c,l){n.set(J,-o.length/2,0),n.rotate(J,J,c),s(J,J,h),n.set($,o.length/2,0),n.rotate($,$,c),s($,$,h),K.radius=o.radius,this.enableFrictionReduction&&(u=this.enableFriction,this.enableFriction=!1);var u,d=this.circlePlane(a,K,J,0,e,t,i,r,l),f=this.circlePlane(a,K,$,0,e,t,i,r,l);if(this.enableFrictionReduction&&(this.enableFriction=u),l)return d||f;var p=d+f;return this.enableFrictionReduction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p},k.prototype[f.CIRCLE|f.PLANE]=k.prototype.circlePlane=function(e,t,i,o,h,c,l,u,d){var f=u;f=f||0,r(m,i,l),n.rotate(v,g,f);var p=a(v,m);if(p>t.radius)return 0;if(d)return!0;var b=this.createContactEquation(h,e,c,t);return n.copy(b.normalA,v),n.scale(b.contactPointB,b.normalA,-t.radius),s(b.contactPointB,b.contactPointB,i),r(b.contactPointB,b.contactPointB,e.position),n.scale(y,b.normalA,p),r(b.contactPointA,m,y),s(b.contactPointA,b.contactPointA,l),r(b.contactPointA,b.contactPointA,h.position),this.contactEquations.push(b),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(b)),1},k.prototype[f.CONVEX]=k.prototype[f.CONVEX|f.BOX]=k.prototype[f.BOX]=k.prototype.convexConvex=function(e,t,i,o,h,c,l,u,d,f){var p=0,f="number"==typeof f?f:0;if(!k.findSeparatingAxis(t,i,o,c,l,u,m))return 0;r(T,l,i),a(m,T)>0&&n.scale(m,m,-1);var g=k.getClosestEdge(t,o,m,!0),E=k.getClosestEdge(c,u,m);if(-1===g||-1===E)return 0;for(var A=0;A<2;A++){var C,_=g,I=E,O=t,P=c,M=i,R=l,L=o,D=u,N=e,F=h;0===A&&(C=_,_=I,I=C,C=O,O=P,P=C,C=M,M=R,R=C,C=L,L=D,D=C,C=N,N=F,F=C);for(var B=I;B=3){if(d)return!0;var H=this.createContactEquation(N,F,O,P);p++;var j=O.vertices[_%O.vertices.length],W=O.vertices[(_+1)%O.vertices.length];n.rotate(y,j,L),n.rotate(b,W,L),s(y,y,M),s(b,b,M),r(x,b,y),n.rotate90cw(H.normalA,x),n.normalize(H.normalA,H.normalA),r(T,v,y);var Y=a(H.normalA,T);n.scale(w,H.normalA,Y),r(H.contactPointA,v,M),r(H.contactPointA,H.contactPointA,w),s(H.contactPointA,H.contactPointA,M),r(H.contactPointA,H.contactPointA,N.position),r(H.contactPointB,v,R),s(H.contactPointB,H.contactPointB,R),r(H.contactPointB,H.contactPointB,F.position),this.contactEquations.push(H),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(H))}}}return this.enableFrictionReduction&&this.enableFriction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p};var Q=n.fromValues(0,0);k.projectConvexOntoAxis=function(e,t,i,r,s){var o,h=null,c=null;n.rotate(Q,r,-i);for(var l=0;lh)&&(h=o),(null===c||oh){var u=c;c=h,h=u}var d=a(t,r);n.set(s,c+d,h+d)};var Z=n.fromValues(0,0),ee=n.fromValues(0,0),et=n.fromValues(0,0),ei=n.fromValues(0,0),en=n.fromValues(0,0),er=n.fromValues(0,0);k.findSeparatingAxis=function(e,t,i,s,a,o,h){var c=null,l=!1,u=!1;if(e instanceof p&&s instanceof p)for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;2!==m;m++){0===m?n.set(ei,0,1):1===m&&n.set(ei,1,0),0!==g&&n.rotate(ei,ei,g),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}else for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;m!==f.vertices.length;m++){n.rotate(ee,f.vertices[m],g),n.rotate(et,f.vertices[(m+1)%f.vertices.length],g),r(Z,et,ee),n.rotate90cw(ei,Z),n.normalize(ei,ei),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}return u};var es=n.fromValues(0,0),ea=n.fromValues(0,0),eo=n.fromValues(0,0);k.getClosestEdge=function(e,t,i,s){n.rotate(es,i,-t),s&&n.scale(es,es,-1);for(var o=-1,h=e.vertices.length,c=-1,l=0;l!==h;l++){r(ea,e.vertices[(l+1)%h],e.vertices[l%h]),n.rotate90cw(eo,ea),n.normalize(eo,eo);var u=a(eo,es);(-1===o||u>c)&&(o=l%h,c=u)}return o};var eh=n.create(),ec=n.create(),el=n.create(),eu=n.create(),ed=n.create(),ef=n.create(),ep=n.create();k.prototype[f.CIRCLE|f.HEIGHTFIELD]=k.prototype.circleHeightfield=function(e,t,i,a,o,h,c,l,u,d){var f=h.heights,d=d||t.radius,p=h.elementWidth,g=Math.floor((i[0]-d-c[0])/p),m=Math.ceil((i[0]+d-c[0])/p);g<0&&(g=0),m>=f.length&&(m=f.length-1);for(var v=f[g],y=f[m],b=g;bv&&(v=f[b]);if(i[1]-d>v)return!u&&0;for(var x=!1,b=g;b=el[0]&&eh[0]0){for(var b=g;b<=m;b++)if(n.set(el,b*p,f[b]),n.add(el,el,c),n.sub(ec,i,el),n.squaredLength(ec)=l.length&&(f=l.length-1);for(var p=l[d],g=l[f],m=d;mp&&(p=l[m]);if(e.aabb.lowerBound[1]>p)return!c&&0;for(var v=0,m=d;m(0|t)?e<<16|65535&t:t<<16|65535&e)|0},r.prototype.getByKey=function(e){return e|=0,this.data[e]},r.prototype.get=function(e,t){return this.data[this.getKey(e,t)]},r.prototype.set=function(e,t,i){if(!i)throw Error("No data!");var n=this.getKey(e,t);return this.data[n]||this.keys.push(n),this.data[n]=i,n},r.prototype.reset=function(){for(var e=this.data,t=this.keys,i=t.length;i--;)delete e[t[i]];t.length=0},r.prototype.copy=function(e){this.reset(),n.appendArray(this.keys,e.keys);for(var t=e.keys.length;t--;){var i=e.keys[t];this.data[i]=e.data[i]}}},{"8f6c901d02437d27":"7sQcP"}],"1uf32":[function(e,t,i){var n=e("57927c61fbcf992f"),r=e("1e621ded3903d68e"),s=e("a8501ada722b06e1");function a(e){"number"==typeof arguments[0]&&"number"==typeof arguments[1]&&(e={width:arguments[0],height:arguments[1]},console.warn("The Rectangle has been renamed to Box and its constructor signature has changed. Please use the following format: new Box({ width: 1, height: 1, ... })")),e=e||{};var t=this.width=e.width||1,i=this.height=e.height||1,a=[n.fromValues(-t/2,-i/2),n.fromValues(t/2,-i/2),n.fromValues(t/2,i/2),n.fromValues(-t/2,i/2)],o=[n.fromValues(1,0),n.fromValues(0,1)];e.vertices=a,e.axes=o,e.type=r.BOX,s.call(this,e)}t.exports=a,a.prototype=new s,a.prototype.constructor=a,a.prototype.computeMomentOfInertia=function(e){var t=this.width,i=this.height;return e*(i*i+t*t)/12},a.prototype.updateBoundingRadius=function(){var e=this.width,t=this.height;this.boundingRadius=Math.sqrt(e*e+t*t)/2},n.create(),n.create(),n.create(),n.create(),a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)},a.prototype.updateArea=function(){this.area=this.width*this.height}},{"57927c61fbcf992f":"geg3A","1e621ded3903d68e":"fyiLV",a8501ada722b06e1:"jXoGk"}],liK4P:[function(e,t,i){e("852348000d7d6d69"),e("b1906358d63dd535"),e("2589eb1c960dc6a0"),e("41d1d194c5bc6ec2");var n=e("c59906df004f11c2");function r(){n.call(this,n.NAIVE)}e("3a4bfb1510f2f292"),t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.getCollisionPairs=function(e){var t=e.bodies,i=this.result;i.length=0;for(var r=0,s=t.length;r!==s;r++)for(var a=t[r],o=0;o0)&&!(r.squaredDistance(s,c)d)p.angle=d,-1===r.indexOf(p)&&r.push(p);else{var v=r.indexOf(p);-1!==v&&r.splice(v,1)}if(this.lowerLimitEnabled&&mi)a.scale(r.normalA,c,-1),a.sub(r.contactPointA,l,o.position),a.sub(r.contactPointB,u,h.position),a.scale(p,c,i),a.add(r.contactPointA,r.contactPointA,p),-1===e.indexOf(r)&&e.push(r);else{var x=e.indexOf(r);-1!==x&&e.splice(x,1)}if(this.lowerLimitEnabled&&y=0&&!(e[s].aabb.lowerBound[t]<=r.aabb.lowerBound[t]);s--)e[s+1]=e[s];e[s+1]=r}return e},s.prototype.sortList=function(){var e=this.axisList,t=this.axisIndex;s.sortAxisList(e,t)},s.prototype.getCollisionPairs=function(e){var t=this.axisList,i=this.result,n=this.axisIndex;i.length=0;for(var s=t.length;s--;){var a=t[s];a.aabbNeedsUpdate&&a.updateAABB()}this.sortList();for(var o=0,h=0|t.length;o!==h;o++)for(var c=t[o],l=o+1;l=e&&n=0;g-=2)for(var T=b.length-2;T>=0;T-=2)(w[g]===b[T]&&w[g+1]===b[T+1]||w[g+1]===b[T]&&w[g]===b[T+1])&&b.splice(T,2);var A=l.length;for(g=0;g!==A;g++){var C=l[g];if(!C.collideConnected)for(var T=b.length-2;T>=0;T-=2)(C.bodyA===b[T]&&C.bodyB===b[T+1]||C.bodyB===b[T]&&C.bodyA===b[T+1])&&b.splice(T,2)}this.postBroadphaseEvent.pairs=b,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,c.reset(this);for(var g=0,_=b.length;g!==_;g+=2)for(var I=b[g],O=b[g+1],P=0,M=I.shapes.length;P!==M;P++)for(var R=I.shapes[P],L=R.position,D=R.angle,k=0,N=O.shapes.length;k!==N;k++){var F=O.shapes[k],B=F.position,U=F.angle,V=this.defaultContactMaterial;if(R.material&&F.material){var G=this.getContactMaterial(R.material,F.material);G&&(V=G)}this.runNarrowphase(c,I,R,L,D,O,F,B,U,V,this.frictionGravity)}for(var g=0;g!==o;g++){var j=n[g];j._wakeUpAfterNarrowphase&&(j.wakeUp(),j._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(S);for(var W=this.endContactEvent,k=S.length;k--;){var Y=S[k];W.shapeA=Y.shapeA,W.shapeB=Y.shapeB,W.bodyA=Y.bodyA,W.bodyB=Y.bodyB,this.emit(W)}S.length=0}var H=this.preSolveEvent;H.contactEquations=c.contactEquations,H.frictionEquations=c.frictionEquations,this.emit(H),H.contactEquations=H.frictionEquations=null;var A=l.length;for(g=0;g!==A;g++)l[g].update();if(c.contactEquations.length||c.frictionEquations.length||A){if(this.islandSplit){for(f.equations.length=0,v.appendArray(f.equations,c.contactEquations),v.appendArray(f.equations,c.frictionEquations),g=0;g!==A;g++)v.appendArray(f.equations,l[g].equations);f.split(this);for(var g=0;g!==f.islands.length;g++){var z=f.islands[g];z.equations.length&&a.solveIsland(e,z)}}else{for(a.addEquations(c.contactEquations),a.addEquations(c.frictionEquations),g=0;g!==A;g++)a.addEquations(l[g].equations);this.solveConstraints&&a.solve(e,this),a.removeAllEquations()}}for(var g=0;g!==o;g++){var j=n[g];j.integrate(e)}for(var g=0;g!==o;g++)n[g].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,g=0;g!==c.contactEquations.length;g++){var q=c.contactEquations[g];q.firstImpact&&(X.bodyA=q.bodyA,X.bodyB=q.bodyB,X.shapeA=q.shapeA,X.shapeB=q.shapeB,X.contactEquation=q,this.emit(X))}if(this.sleepMode===x.BODY_SLEEPING)for(g=0;g!==o;g++)n[g].sleepTick(this.time,!1,e);else if(this.sleepMode===x.ISLAND_SLEEPING&&this.islandSplit){for(g=0;g!==o;g++)n[g].sleepTick(this.time,!0,e);for(var g=0;g0,e.frictionCoefficient=l.friction,f=t.type===u.STATIC||t.type===u.KINEMATIC?a.mass:a.type===u.STATIC||a.type===u.KINEMATIC?t.mass:t.mass*a.mass/(t.mass+a.mass),e.slipForce=l.friction*d*f,e.restitution=l.restitution,e.surfaceVelocity=l.surfaceVelocity,e.frictionStiffness=l.frictionStiffness,e.frictionRelaxation=l.frictionRelaxation,e.stiffness=l.stiffness,e.relaxation=l.relaxation,e.contactSkinSize=l.contactSkinSize,e.enabledEquations=t.collisionResponse&&a.collisionResponse&&i.collisionResponse&&o.collisionResponse;var m=e[i.type|o.type],v=0;if(m){var y=i.sensor||o.sensor,b=e.frictionEquations.length;v=i.type=2*Math.pow(a.sleepSpeedLimit,2)&&(t._wakeUpAfterNarrowphase=!0),a.allowSleep&&a.type===u.DYNAMIC&&a.sleepState===u.SLEEPING&&t.sleepState===u.AWAKE&&t.type!==u.STATIC&&r.squaredLength(t.velocity)+Math.pow(t.angularVelocity,2)>=2*Math.pow(t.sleepSpeedLimit,2)&&(a._wakeUpAfterNarrowphase=!0),this.overlapKeeper.setOverlapping(t,i,a,o),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(i,o)){var E=this.beginContactEvent;if(E.shapeA=i,E.shapeB=o,E.bodyA=t,E.bodyB=a,E.contactEquations.length=0,"number"==typeof v)for(var S=e.contactEquations.length-v;S1)for(var S=e.frictionEquations.length-x;S=0;t--)this.removeConstraint(e[t]);for(var i=this.bodies,t=i.length-1;t>=0;t--)this.removeBody(i[t]);for(var n=this.springs,t=n.length-1;t>=0;t--)this.removeSpring(n[t]);for(var r=this.contactMaterials,t=r.length-1;t>=0;t--)this.removeContactMaterial(r[t]);x.apply(this)};var A=r.create(),C=(r.fromValues(0,0),r.fromValues(0,0));x.prototype.hitTest=function(e,t,i){i=i||0;var n=new u({position:e}),l=new c;n.addShape(l);for(var d=this.narrowphase,f=[],p=0,g=t.length;p!==g;p++)for(var m=t[p],v=0,y=m.shapes.length;v!==y;v++){var b=m.shapes[v];r.rotate(A,b.position,m.angle),r.add(A,A,m.position);var x=b.angle+m.angle;(b instanceof s&&d.circleParticle(m,b,A,x,n,l,e,0,!0)||b instanceof a&&d.particleConvex(n,l,e,0,m,b,A,x,!0)||b instanceof o&&d.particlePlane(n,l,e,0,m,b,A,x,!0)||b instanceof h&&d.particleCapsule(n,l,e,0,m,b,A,x,!0)||b instanceof c&&r.squaredLength(r.sub(C,A,e)) (http://steffe.se)","keywords":["p2.js","p2","physics","engine","2d"],"main":"./src/p2.js","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/schteppe/p2.js.git"},"bugs":{"url":"https://github.com/schteppe/p2.js/issues"},"licenses":[{"type":"MIT"}],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},"dependencies":{"poly-decomp":"0.1.1"}}')},{}],kYZwj:[function(e,t,i){var n=e("d1c511ff43075908");e("6ad6aae9d3178c1c");var r=e("ae69163b5e95d902");function s(){this.overlappingShapesLastState=new n,this.overlappingShapesCurrentState=new n,this.recordPool=new r({size:16}),this.tmpDict=new n,this.tmpArray1=[]}e("ca81eee98f7bd467"),t.exports=s,s.prototype.tick=function(){for(var e=this.overlappingShapesLastState,t=this.overlappingShapesCurrentState,i=e.keys.length;i--;){var n=e.keys[i],r=e.getByKey(n);t.getByKey(n),r&&this.recordPool.release(r)}e.reset(),e.copy(t),t.reset()},s.prototype.setOverlapping=function(e,t,i,n){this.overlappingShapesLastState;var r=this.overlappingShapesCurrentState;if(!r.get(t.id,n.id)){var s=this.recordPool.get();s.set(e,t,i,n),r.set(t.id,n.id,s)}},s.prototype.getNewOverlaps=function(e){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,e)},s.prototype.getEndOverlaps=function(e){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,e)},s.prototype.bodiesAreOverlapping=function(e,t){for(var i=this.overlappingShapesCurrentState,n=i.keys.length;n--;){var r=i.keys[n],s=i.data[r];if(s.bodyA===e&&s.bodyB===t||s.bodyA===t&&s.bodyB===e)return!0}return!1},s.prototype.getDiff=function(e,t,i){var i=i||[];i.length=0;for(var n=t.keys.length;n--;){var r=t.keys[n],s=t.data[r];if(!s)throw Error("Key "+r+" had no data!");e.data[r]||i.push(s)}return i},s.prototype.isNewOverlap=function(e,t){var i=0|e.id,n=0|t.id,r=this.overlappingShapesLastState,s=this.overlappingShapesCurrentState;return!r.get(i,n)&&!!s.get(i,n)},s.prototype.getNewBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getEndBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getBodyDiff=function(e,t){t=t||[];for(var i=this.tmpDict,n=e.length;n--;){var r=e[n];i.set(0|r.bodyA.id,0|r.bodyB.id,r)}for(n=i.keys.length;n--;){var r=i.getByKey(i.keys[n]);r&&t.push(r.bodyA,r.bodyB)}return i.reset(),t}},{d1c511ff43075908:"gyzPH","6ad6aae9d3178c1c":"cwAfS",ae69163b5e95d902:"fO0xd",ca81eee98f7bd467:"7sQcP"}],cwAfS:[function(e,t,i){function n(e,t,i,n){this.shapeA=t,this.shapeB=n,this.bodyA=e,this.bodyB=i}t.exports=n,n.prototype.set=function(e,t,i,r){n.call(this,e,t,i,r)}},{}],fO0xd:[function(e,t,i){var n=e("ef39e4c8e830c20e"),r=e("6e41b1482492ad2f");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=e.shapeA=e.shapeB=null,this}},{ef39e4c8e830c20e:"cwAfS","6e41b1482492ad2f":"5lrfq"}],bVaR4:[function(e,t,i){e("f7108e810eaecffd"),e("50bfc1b1a312ac2f"),e("2f6d951f62024392");var n=e("9526c01719846e44"),r=e("82ea80983f48bd5f"),s=e("29efc1b1b871dc45");function a(e){this.nodePool=new n({size:16}),this.islandPool=new r({size:8}),this.equations=[],this.islands=[],this.nodes=[],this.queue=[]}t.exports=a,a.getUnvisitedNode=function(e){for(var t=e.length,i=0;i!==t;i++){var n=e[i];if(!n.visited&&n.body.type===s.DYNAMIC)return n}return!1},a.prototype.visit=function(e,t,i){t.push(e.body);for(var n=e.equations.length,r=0;r!==n;r++){var s=e.equations[r];-1===i.indexOf(s)&&i.push(s)}},a.prototype.bfs=function(e,t,i){var n=this.queue;for(n.length=0,n.push(e),e.visited=!0,this.visit(e,t,i);n.length;)for(var r,o=n.pop();r=a.getUnvisitedNode(o.neighbors);)r.visited=!0,this.visit(r,t,i),r.body.type===s.DYNAMIC&&n.push(r)},a.prototype.split=function(e){for(var t,i=e.bodies,n=this.nodes,r=this.equations;n.length;)this.nodePool.release(n.pop());for(var s=0;s!==i.length;s++){var o=this.nodePool.get();o.body=i[s],n.push(o)}for(var h=0;h!==r.length;h++){var c=r[h],s=i.indexOf(c.bodyA),l=i.indexOf(c.bodyB),u=n[s],d=n[l];u.neighbors.push(d),d.neighbors.push(u),u.equations.push(c),d.equations.push(c)}for(var f=this.islands,s=0;s{this.worldDateTime=new Date},1e3)}enablePathFinder(){this.usePathFinder&&(this.pathFinder=new h,this.pathFinder.world=this,this.pathFinder.createGridFromMap())}validateRequiredProperties(e){this.events||f.error("EventsManager undefined in P2world."),this.roomId&&this.sceneName&&this.sceneTiledMapFile||(p.critical("World creation missing data in options.",{roomId:this.roomId,sceneName:this.sceneName,sceneTiledMapFile:this.sceneTiledMapFile}),f.error("World creation missing data in options.")),this.config||f.error("Missing Config Manager.")}async createWorldContent(e){if(!this.validateMapData(this.mapJson)){p.error("Missing map data.",this.mapJson);return}this.shouldGroupBodies()||p.warning("Group bodies fully disabled, this can impact performance."),this.changePoints=this.getSceneChangePoints(e);let t=this.mapJson.layers,i=[];for(let e of t){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayerBefore",t),i.push(...await this.createLayerContents(t.layer)),await this.events.emit("reldens.parsingMapLayerAfter",t)}for(let e of i){let{layer:t,tileIndex:i,tileW:n,tileH:r,posX:s,posY:a}=e;await this.createRoomObjectBody(t,i,n,r,s,a)}for(let e of(this.processBodiesQueue(),t)){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayersAfterBodiesQueue",t)}p.info("Total wall bodies found: "+this.totalBodiesCount,"Total wall bodies created: "+this.totalBodiesCreated)}processBodiesQueue(){for(let e of(this.queueBodies.sort((e,t)=>e.tileIndexes[0]-t.tileIndexes[0]),this.queueBodies))this.addBody(e);this.queueBodies=[]}async createLayerContents(e){let t=this.mapJson.tilewidth,i=this.mapJson.tileheight,n=t/2,r=i/2,s=-1!==e.name.indexOf("change-points"),a=-1!==e.name.indexOf("collisions"),o=[];for(let h=0;he.y?s:-s),h=e.x+(t.x>e.x?a:-a),c=Math.atan2(t.y-o,t.x-h),l=180*c/Math.PI,u=i.key?i.key:"",f=i.magnitude*Math.cos(c),g=i.magnitude*Math.sin(c),m=this.calculateDirection(i,e,t);p.debug('Shooting bullet "'+u+'":',{objectWidth:n,objectHeight:r,bulletY:o,bulletX:h,fromPosition:e,toPosition:t,bulletAngle:l,speedX:f,speedY:g});let v="BULLET_"+this.determineFromType(i),y=this.createCollisionBody(n,r,h,o,this.bulletsBodyType,d.COLLISIONS[v],1,!0,!0,u,m);y.updateMassProperties(),y.roomObject=i,y.hitPriority=i.hitPriority?i.hitPriority:2,y.isRoomObject=!0,y.isBullet=!0,y.key=""===u?"bullet-"+y.id:u,this.addBody(y);let b=u+"_bullet_"+y.id;return y.bodyStateId=b,i.room.state.addBodyToState(y.bodyState,b),y.angle=l,y.originalSpeed={x:f,y:g},y.velocity[0]=f,y.velocity[1]=g,y}determineFromType(e){return this.typeDeterminer.isPlayer(e.owner)?d.FROM_TYPES.PLAYER:this.typeDeterminer.isObject(e.owner)?d.FROM_TYPES.OBJECT:d.FROM_TYPES.OTHER}calculateDirection(e,t,i){return 3===g.get(e,"animDir",!1)?t.x=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t=this.length)){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)}},t.prototype.setAt=function(t,i){if(null==i){console.error("ArraySchema items cannot be null nor undefined; Use `deleteAt(index)` instead.");return}if(this.$items.get(t)!==i){void 0!==i.$changes&&i.$changes.setParent(this,this.$changes.root,t);var n,r,s=null!==(r=null===(n=this.$changes.indexes[t])||void 0===n?void 0:n.op)&&void 0!==r?r:e.OPERATION.ADD;this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,i),this.$changes.change(t,s)}},t.prototype.deleteAt=function(e){var t=Array.from(this.$items.keys())[e];return void 0!==t&&this.$deleteAt(t)},t.prototype.$deleteAt=function(e){return this.$changes.delete(e),this.$indexes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.concat=function(){for(var e,i=[],n=0;n>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,boolean:function(e,t){return S(e,t?1:0)},float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},int16:A,int32:_,int64:O,int8:T,number:F,string:N,uint16:C,uint32:I,uint64:P,uint8:S,utf8Write:w,writeFloat32:D,writeFloat64:k});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),q=new Float32Array(X.buffer),K=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),q[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),K[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,arrayCheck:function(e,t){return e[t.offset]<160},boolean:function(e,t){return V(e,t)>0},float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int16:G,int32:W,int64:H,int8:U,number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},readFloat32:J,readFloat64:$,string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},switchStructureCheck:ee,uint16:j,uint32:Y,uint64:z,uint8:V}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){var t=this.refCounts[e];if(void 0===t){console.warn("trying to remove reference ".concat(e," that doesn't exist"));return}if(0===t){console.warn("trying to remove reference ".concat(e," with 0 refCount"));return}this.refCounts[e]=t-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:l;if(p===e.OPERATION.CLEAR){r.clear(s);continue}var y=f?l%(p||255):Z(i,n),b=f?r._definition.fieldsByIndex[y]:"",x=d.getType(y),E=void 0,w=void 0,T=void 0;if(f?w=r["_".concat(b)]:(w=r.getByIndex(y),(p&e.OPERATION.ADD)===e.OPERATION.ADD?(T=r instanceof m?Q(i,n):y,r.setIndex(y,T)):T=r.getIndex(y)),(p&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(p!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(y),w&&w.$changes&&a.removeRef(w.$changes.refId),E=null),void 0===b){console.warn("@colyseus/schema: definition mismatch");for(var S={offset:n.offset};n.offsets?t[0]+n[0]:s,h=t[1]+n[1]>a?t[1]+n[1]:a,c=t[0]-n[0]<0?t[0]-n[0]:0,l=t[1]-n[1]<0?t[1]-n[1]:0,u=this.grid.getNodeAt(o,t[1]);u&&!u.walkable&&(u=this.grid.getNodeAt(t[0],h))&&!u.walkable&&(u=this.grid.getNodeAt(o,h))&&!u.walkable&&(u=this.grid.getNodeAt(c,t[1]))&&!u.walkable&&(u=this.grid.getNodeAt(t[0],l))&&!u.walkable&&(u=this.grid.getNodeAt(c,l))&&!u.walkable&&(u=this.grid.getNodeAt(c,h))&&!u.walkable&&(u=this.grid.getNodeAt(o,l)),u&&u.walkable&&(i=this.grid.clone(),r=this.finder.findPath(e[0],e[1],u.x,u.y,i))}return r}}},{d026eb33ec4f8a6d:"3lwy5","8e5cc24e68f2d485":"jSlJ0"}],jSlJ0:[function(e,t,i){t.exports=e("c08c5d893d481d77")},{c08c5d893d481d77:"110ct"}],"110ct":[function(e,t,i){t.exports={Heap:e("a11c2d2f6228b64d"),Node:e("5d6357416bae419"),Grid:e("eb2500554bbf40a2"),Util:e("b8fdf53e7c2bda86"),DiagonalMovement:e("ea6942fe46b7874a"),Heuristic:e("cc79ac15c71b85de"),AStarFinder:e("92550c19cc8290da"),BestFirstFinder:e("8fe7b6287e43173"),BreadthFirstFinder:e("49f4cbf7cb03de5a"),DijkstraFinder:e("f055f2df42298a76"),BiAStarFinder:e("ae88c656fdc0b402"),BiBestFirstFinder:e("6dfdccafa1ea046a"),BiBreadthFirstFinder:e("4f4a8a58aa00c271"),BiDijkstraFinder:e("f9f2731f8e4ac9f4"),IDAStarFinder:e("548d4f7f580680d4"),JumpPointFinder:e("c94d58273ef6271a")}},{a11c2d2f6228b64d:"j1Rgs","5d6357416bae419":"eTBTH",eb2500554bbf40a2:"4U8Sg",b8fdf53e7c2bda86:"eXbk6",ea6942fe46b7874a:"44ekP",cc79ac15c71b85de:"7ivQz","92550c19cc8290da":"b9jsj","8fe7b6287e43173":"j0U38","49f4cbf7cb03de5a":"c3dtf",f055f2df42298a76:"aTw5v",ae88c656fdc0b402:"gqRU9","6dfdccafa1ea046a":"OQep8","4f4a8a58aa00c271":"5kxE6",f9f2731f8e4ac9f4:"b2sHM","548d4f7f580680d4":"9146d",c94d58273ef6271a:"8thbF"}],j1Rgs:[function(e,t,i){t.exports=e("30b1093da33c692b")},{"30b1093da33c692b":"jKwEm"}],jKwEm:[function(e,t,i){(function(){var e,i,n,r,s,a,o,h,c,l,u,d,f,p,g;n=Math.floor,l=Math.min,i=function(e,t){return et?1:0},c=function(e,t,r,s,a){var o;if(null==r&&(r=0),null==a&&(a=i),r<0)throw Error("lo must be non-negative");for(null==s&&(s=e.length);ra(t,e[o=n((r+s)/2)])?s=o:r=o+1;return[].splice.apply(e,[r,r-r].concat(t)),t},a=function(e,t,n){return null==n&&(n=i),e.push(t),p(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,g(e,0,t)):r=n,r},h=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,g(e,0,n),r},o=function(e,t,n){var r;return null==n&&(n=i),e.length&&0>n(e[0],t)&&(t=(r=[e[0],t])[0],e[0]=r[1],g(e,0,n)),t},r=function(e,t){var r,s,a,o,h,c;for(null==t&&(t=i),o=(function(){c=[];for(var t=0,i=n(e.length/2);0<=i?ti;0<=i?t++:t--)c.push(t);return c}).apply(this).reverse(),h=[],s=0,a=o.length;sn(a=p[u],o)&&(c(h,a,0,null,n),h.pop(),o=h[h.length-1]);return h}for(r(e,n),m=[],d=0,g=l(t,e.length);0<=g?dg;0<=g?++d:--d)m.push(s(e,n));return m},p=function(e,t,n,r){var s,a,o;for(null==r&&(r=i),s=e[n];n>t;){if(0>r(s,a=e[o=n-1>>1])){e[n]=a,n=o;continue}break}return e[n]=s},g=function(e,t,n){var r,s,a,o,h;for(null==n&&(n=i),s=e.length,h=t,a=e[t],r=2*t+1;rn(e[r],e[o]))&&(r=o),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,p(e,h,t,n)},e=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=a,e.pop=s,e.replace=h,e.pushpop=o,e.heapify=r,e.updateItem=f,e.nlargest=u,e.nsmallest=d,e.prototype.push=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return -1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return h(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return o(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return r(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return f(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(null!==t?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)},{}],eTBTH:[function(e,t,i){t.exports=function(e,t,i){this.x=e,this.y=t,this.walkable=void 0===i||i}},{}],"4U8Sg":[function(e,t,i){var n=e("3debe8dfc5f4b19"),r=e("1630f01fef4aa0f7");function s(e,t,i){var n;"object"!=typeof e?n=e:(t=e.length,n=e[0].length,i=e),this.width=n,this.height=t,this.nodes=this._buildNodes(n,t,i)}s.prototype._buildNodes=function(e,t,i){var r,s,a=Array(t);for(r=0;r=0&&e=0&&t-o&&(h-=o,e+=r),c0&&new Date().getTime()-l>1e3*this.timeLimit)return 1/0;var o,h,f,g,m,v=t+u(e,p)*this.weight;if(v>i)return v;if(e==p)return n[a]=[e.x,e.y],e;var y=s.getNeighbors(e,this.diagonalMovement);for(g=0,h=1/0;m=y[g];++g){if(this.trackRecursion&&(m.retainCount=m.retainCount+1||1,!0!==m.tested&&(m.tested=!0)),(f=d(m,t+(o=m,e.x===o.x||e.y===o.y?1:Math.SQRT2),i,n,a+1))instanceof r)return n[a]=[e.x,e.y],f;this.trackRecursion&&0==--m.retainCount&&(m.tested=!1),fthis.worldWidth?this.worldWidth:e.column,e.row=e.row<0?0:e.row,e.row=e.row>this.worldHeight?this.worldHeight:e.row,e}}},{}],"5zAcU":[function(e,t,i){let{Logger:n,sc:r}=e("9b59b4ef27f548b6");t.exports.WorldTimer=class{constructor(e){this.clockInstance=r.get(e,"clockInstance",!1),this.callbacks=r.get(e,"callbacks",[]),this.worldTimer={},this.paused=!1,this.lastCallTime=0,this.stepTime=0,this.startedTime=new Date().getTime(),this.currentTime=this.startedTime}startWorldSteps(e){if(!e){n.error("World instance invalid.",{world:e});return}if(this.stepTime=1e3*e.timeStep,this.clockInstance){this.worldTimer=this.clockInstance.setInterval(()=>{this.setIntervalCallback(e)},this.stepTime);return}this.worldTimer=setInterval(()=>{this.setIntervalCallback(e)},this.stepTime)}setIntervalCallback(e){this.paused||(this.currentTime+=this.stepTime,this.stepWorld(e),this.executeCallbacks())}stepWorld(e){if(e.useFixedWorldStep){e.step(e.timeStep);return}this.stepWorldWithSubSteps(e)}executeCallbacks(){if(0!==this.callbacks.length)for(let e of this.callbacks)e()}stepWorldWithSubSteps(e){let t=Date.now()/1e3-this.lastCallTime;e.step(e.timeStep,t,e.maxSubSteps)}}},{"9b59b4ef27f548b6":"3lwy5"}],"4xzUf":[function(e,t,i){let{PlayerEnginePrediction:n}=e("35dabd79ba23aa99"),{SceneDynamic:r}=e("caa2ee44a66bdd90");t.exports.RoomEventsOverride=class{createCurrentPlayerOverride(e){e.createCurrentPlayer=async(t,i,n)=>{e.engineStarted=!0,await e.startEngineScene(t,e.room,i);let r=e.getActiveScene();if(!e.isValidScene(r,t))return!1;for(let s of(await e.events.emit("reldens.playersQueueBefore",t,n,i,e),Object.keys(e.playersQueue)))r.player.addPlayer(s,e.playersQueue[s]);r.experimentalClientPrediction&&(r.player.positionFromServer=t);let s={player:t,key:n,previousScene:i,roomEvents:e};return await e.events.emit("reldens.createCurrentPlayer",s),s}}playerOnChangeOverride(e){e.playersOnChange=(t,i,n)=>{if(t.state.scene!==e.roomName)return;let r=e.getActiveScene();if(e.playerExists(r,i)){if(r.experimentalClientPrediction&&e.isCurrentPlayer(i)){r.player.positionFromServer=t;return}r.player.updatePlayer(i,t)}}}createSceneInstanceOverride(e){e.createSceneInstance=(e,t,i)=>{let n=new r(e,t,i);return n.experimentalClientPrediction=i.config.get("client/general/engine/experimentalClientPrediction"),n.worldPrediction=!1,n}}createPlayerEngineInstanceOverride(e){e.createPlayerEngineInstance=(e,t,i,r)=>new n({scene:e,playerData:t,gameManager:i,room:r})}}},{"35dabd79ba23aa99":"8hflc",caa2ee44a66bdd90:"6Vn5m"}],"8hflc":[function(e,t,i){let{PlayerEngine:n}=e("a2861f4cd568519f"),{GameConst:r}=e("78935193245f5a91");t.exports.PlayerEnginePrediction=class extends n{constructor(e){super(e),this.predictionBody=!1,this.positionFromServer=!1;let t=this.gameManager.config.get("client/players/reconciliation/timeOutMs");this.reconciliationTimeOutMs=!1===t?1e3:Number(t)}left(){if("pressed"===this.lastKeyState[r.LEFT])return;let e={dir:r.LEFT};this.lastKeyState[r.LEFT]="pressed",this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.LEFT,!0)),this.roomEvents.send(e)}right(){if("pressed"===this.lastKeyState[r.RIGHT])return;this.lastKeyState[r.RIGHT]="pressed";let e={dir:r.RIGHT};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.RIGHT,!0)),this.roomEvents.send(e)}up(){if("pressed"===this.lastKeyState[r.UP])return;this.lastKeyState[r.UP]="pressed";let e={dir:r.UP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.UP,!0)),this.roomEvents.send(e)}down(){if("pressed"===this.lastKeyState[r.DOWN])return;this.lastKeyState[r.DOWN]="pressed";let e={dir:r.DOWN};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.DOWN,!0)),this.roomEvents.send(e)}stop(){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let e={act:r.STOP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.reconcilePosition()),this.roomEvents.send(e)}reconcilePosition(){this.predictionBody&&this.positionFromServer&&(this.predictionBody.stopFull(),setTimeout(()=>{this.predictionBody.position[0]=this.positionFromServer.state.x,this.predictionBody.position[1]=this.positionFromServer.state.y,this.predictionBody.dir=this.positionFromServer.state.dir,this.updatePlayer(this.playerId,this.positionFromServer)},this.reconciliationByTimeOutMs()))}reconciliationTimeOutCallBack(){return!1}reconciliationByTimeOutMs(){let e=this.reconciliationTimeOutCallBack();return Number(!1!==e?e:this.reconciliationTimeOutMs)}moveToPointer(e){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let t={act:r.POINTER,column:e.worldColumn,row:e.worldRow,x:e.worldX-this.leftOff,y:e.worldY-this.topOff};if(this.predictionBody&&this.pointsValidator){this.reconcilePosition();let e=Object.assign({},t);e=this.pointsValidator.makeValidPoints(e),this.predictionBody.moveToPoint(e)}this.roomEvents.send(t)}}},{a2861f4cd568519f:"3GkIQ","78935193245f5a91":"93TbC"}],"8MUNa":[function(e,t,i){let{PluginInterface:n}=e("ff0cd3a039680b50"),{TargetBoxEnricher:r}=e("bc896f1b30e26c8b"),{TeamMessageListener:s}=e("b9e6a2d82debed5b"),{ClanMessageListener:a}=e("d88cac34aed27f09"),{MessageProcessor:o}=e("187e0a90a62f31a1"),{TemplatesHandler:h}=e("a77183244ab38ca1"),{TeamsConst:c}=e("817bd734dbf4f984"),{Logger:l,sc:u}=e("5bd001817d1a1fe2");t.exports.TeamsPlugin=class extends n{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in TeamsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in TeamsPlugin."),this.teamMessageListener=new s,this.clanMessageListener=new a,this.listenEvents(),this.listenMessages()}listenMessages(){this.gameManager&&this.events&&(this.gameManager.config.client.message.listeners[c.KEY]=this.teamMessageListener,this.gameManager.config.client.message.listeners[c.CLAN_KEY]=this.clanMessageListener)}listenEvents(){this.events&&(this.events.on("reldens.createEngineSceneDone",e=>{let t=e.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Team messages queue on TeamsPlugin.",e),!1;o.processClanMessagesQueue(t,this.clanMessageListener),o.processTeamMessagesQueue(t,this.teamMessageListener)}),this.events.on("reldens.preloadUiScene",e=>{h.preloadTemplates(e)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{r.appendClanInviteButton(this.gameManager,t,i,n),r.appendTeamInviteButton(this.gameManager,t,i,n)}))}fetchTeamPlayerBySessionId(e){let t=this.gameManager.gameEngine.uiScene.currentTeam;if(!t)return!1;for(let i of Object.keys(t)){let n=t[i];if(n.sessionId===e)return n}return!1}}},{ff0cd3a039680b50:"fC3To",bc896f1b30e26c8b:"h6ORZ",b9e6a2d82debed5b:"2r7vd",d88cac34aed27f09:"dhhBt","187e0a90a62f31a1":"58JKl",a77183244ab38ca1:"7FChA","817bd734dbf4f984":"eA0W7","5bd001817d1a1fe2":"3lwy5"}],h6ORZ:[function(e,t,i){let{TeamsConst:n}=e("813960296055cff0"),{GameConst:r}=e("26255ed26260a75a"),{Logger:s,sc:a}=e("603fc0fc02377d1b");t.exports.TargetBoxEnricher=class{static appendClanInviteButton(e,t,i,n){let r=e?.gameEngine?.uiScene?.currentClan;if(!r)return!1;if(!r.ownerId)return s.error("Current clan missing owner.",r),!1;if(this.playerBySessionId(r,t.id))return!1;let a=e.getCurrentPlayer();if(!this.targetIsValidPlayer(t,a))return!1;let o=e.config.getWithoutLogs("client/clan/general/openInvites",!1);return(e.playerData.id.toString()===r.ownerId.toString()||!!o)&&this.appendInviteButton("clan",t,e,n)}static appendTeamInviteButton(e,t,i,n){return!(!this.targetIsValidPlayer(t,e.getCurrentPlayer())||e.getFeature("teams").fetchTeamPlayerBySessionId(t.id))&&this.appendInviteButton("team",t,e,n)}static appendInviteButton(e,t,i,r){let o=i.gameEngine.uiScene;if(!1===a.get(o,"uiTarget",!1))return s.critical('Missing "uiTarget" on uiScene.'),!1;let h=o.cache.html.get(e+"PlayerInvite");if(!h)return s.critical('Template "'+e+'PlayerInvite" not found.'),!1;i.gameDom.appendToElement("#target-container",i.gameEngine.parseTemplate(h,{playerName:r,playerId:t.player_id,inviteLabel:i.config.getWithoutLogs(e+"/labels/inviteLabel",n.LABELS[e.toUpperCase()].INVITE_BUTTON_LABEL)}));let c=i.gameDom.getElement("."+e+"-invite-"+t.player_id+" button");c?.addEventListener("click",()=>{let r={act:n.ACTIONS[e.toUpperCase()+"_INVITE"],id:t.player_id};i.activeRoomEvents.send(r),c.style.display="none",i.gameEngine.clearTarget()})}static targetIsValidPlayer(e,t){return r.TYPE_PLAYER===e.type&&t.playerId!==e.id}static playerBySessionId(e,t){let i=Object.keys(e.players);if(0===i.length)return!1;for(let n of i)if(e.players[n].sessionId===t)return e.players[n];return!1}}},{"813960296055cff0":"eA0W7","26255ed26260a75a":"93TbC","603fc0fc02377d1b":"3lwy5"}],eA0W7:[function(e,t,i){let n="cln.";t.exports.TeamsConst={KEY:"teams",CLAN_KEY:"clan",TEAM_PREF:"tm.",CLAN_PREF:n,NAME_LIMIT:50,CLAN_STARTING_POINTS:1,VALIDATION:{SUCCESS:1,NAME_EXISTS:2,LEVEL_ISSUE:3,CREATE_ERROR:4,CREATE_OWNER_ERROR:5},ACTIONS:{TEAM_INVITE:"tm.inv",TEAM_ACCEPTED:"tm.acp",TEAM_LEAVE:"tm.lev",TEAM_UPDATE:"tm.upd",TEAM_LEFT:"tm.lef",TEAM_REMOVE:"tm.rem",CLAN_INITIALIZE:n+"ini",CLAN_CREATE:n+"new",CLAN_INVITE:n+"inv",CLAN_ACCEPTED:n+"acp",CLAN_LEAVE:n+"lev",CLAN_UPDATE:n+"upd",CLAN_LEFT:n+"lef",CLAN_REMOVE:n+"rem",CLAN_REMOVED:n+"remd",CLAN_NAME:n+"nam"},LABELS:{TEAM:{INVITE_BUTTON_LABEL:"Team - Invite",REQUEST_FROM:"Accept team request from:",LEADER_NAME_TITLE:"Team leader: %leaderName",DISBAND:"Disband Team",LEAVE:"Leave Team",PROPERTY_MAX_VALUE:"/ %propertyMaxValue"},CLAN:{CREATE_CLAN_TITLE:"Clan - Creation",INVITE_BUTTON_LABEL:"Clan - Invite",REQUEST_FROM:"Accept clan request from:",CLAN_TITLE:"Clan: %clanName - Leader: %leaderName",NAME_PLACEHOLDER:"Choose a clan name...",CREATE:"Create",DISBAND:"Disband Clan",LEAVE:"Leave Clan",PROPERTY_MAX_VALUE:"/ %propertyMaxValue",PLAYERS_TITLE:"Connected Players:",MEMBERS_TITLE:"Clan Members:",NONE_CONNECTED:"None"}},CHAT:{MESSAGE:{INVITE_ACCEPTED:"%playerName has accepted your invitation.",INVITE_REJECTED:"%playerName has rejected your invitation.",DISBANDED:"%playerName has disbanded the %groupName.",LEFT:"You left the %groupName.",LEAVE:"%playerName has left the %groupName.",REMOVED:"%playerName has been removed from the %groupName.",ENTER:"%playerName has enter the %groupName.",NOT_ENOUGH_PLAYERS:"The team was disbanded due to a lack of players."}}}},{}],"2r7vd":[function(e,t,i){let{TeamMessageHandler:n}=e("6d14aca88eebc089"),{TeamsConst:r}=e("2253975335b3fdcf"),{Logger:s,sc:a}=e("d3f666b286aee6e5");t.exports.TeamMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on TeamMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on TeamMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isTeamMessage(t)&&this.handleTeamMessage(t,r):(this.isTeamMessage(t)&&(i.teamMessagesQueue||(i.teamMessagesQueue=[]),i.teamMessagesQueue.push(t)),s.error("Invalid TeamMessageHandler",r),!1)}handleTeamMessage(e,t){return r.ACTIONS.TEAM_INVITE===e.act?t.showTeamRequest():r.ACTIONS.TEAM_UPDATE===e.act?t.showTeamBox():r.ACTIONS.TEAM_LEFT!==e.act||t.removeTeamUi()}isTeamMessage(e){return 0===e.act?.indexOf(r.TEAM_PREF)}}},{"6d14aca88eebc089":"4FmFV","2253975335b3fdcf":"eA0W7",d3f666b286aee6e5:"3lwy5"}],"4FmFV":[function(e,t,i){let{UserInterface:n}=e("640ee5228c27b39"),{TeamsConst:r}=e("e52de429595682ab"),{Logger:s,sc:a}=e("3da1dc36372a33e1");t.exports.TeamMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on TeamMessageHandler."),!1):(s.info("Missing message on TeamMessageHandler."),!1):(s.info("Missing RoomEvents on TeamMessageHandler."),!1)}showTeamRequest(){this.createTeamUi(this.teamUiKey()),this.roomEvents.initUi({id:this.teamUiKey(),title:this.gameManager.config.getWithoutLogs("client/team/labels/requestFromTitle",r.LABELS.TEAM.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.TEAM_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-1-"+this.teamUiKey())?.addEventListener("click",()=>{this.gameDom.removeElement(".team-invite")}),this.gameDom.getElement("#opt-2-"+this.teamUiKey())?.addEventListener("click",()=>{this.removeTeamUi()})}removeTeamUi(){let e=this.gameManager.getUiElement(this.teamUiKey());if(!e)return s.error('UI Element not found by team UI key "'+this.teamUiKey()+'".'),!1;e.removeElement(),delete this.uiScene.userInterfaces[this.teamUiKey()],delete this.uiScene.elementsUi[this.teamUiKey()],this.uiScene.currentTeam=!1}teamUiKey(){return r.KEY+this.message.id}showTeamBox(){let e=this.teamUiKey();this.createTeamUi(e);let t=this.gameManager.config.getWithoutLogs("client/team/labels/leaderNameTitle",r.LABELS.TEAM.LEADER_NAME_TITLE).replace("%leaderName",this.message.leaderName),i=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!i)return s.error('Missing container: "#box-'+e+' .box-content".'),!1;let n=this.uiScene.elementsUi[e];this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene);let o=a.get(this.message,"players",!1);this.uiScene.currentTeam=o,this.updateTeamBox(o,i)}createTeamUi(e){return a.get(this.uiScene.userInterfaces,e)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[e]=new n(this.gameManager,{id:e,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-teams.html",r.KEY),this.uiScene.userInterfaces[e].createUiElement(this.uiScene,r.KEY),this.uiScene.userInterfaces[e])}updateTeamBox(e,t){if(!e){s.error("Players not defined.",e);return}let i="";for(let t of Object.keys(e))i+=this.createTeamMemberBox(e[t]);t.innerHTML=this.createTeamContainer(i),this.activateTeamPlayerActions(e),this.activateTeamLeaveButtonAction()}createTeamContainer(e){let t=this.uiScene.cache.html.get("teamContainer");if(!t)return s.error('Missing template "teamContainer".'),"";let i=this.gameManager.playerData.id.toString(),n=i===this.message.id.toString(),a="client/team/labels/",o=n?this.gameManager.config.getWithoutLogs(a+"disbandLabel",r.LABELS.TEAM.DISBAND):this.gameManager.config.getWithoutLogs(a+"leaveLabel",r.LABELS.TEAM.LEAVE),h={teamId:this.message.id,playerId:i,leaveActionLabel:o,teamMembers:e};return this.gameManager.gameEngine.parseTemplate(t,h)}activateTeamLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.gameManager.playerData.id.toString());e?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_LEAVE,id:this.message.id})})}createTeamMemberBox(e){let t=this.uiScene.cache.html.get("teamPlayerData");if(!t)return s.error('Missing template "teamPlayerData".'),"";let i=this.gameManager.playerData.id.toString()===this.message.id.toString();return this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties),playerRemove:i?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("teamRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id}):(s.error('Missing template "teamRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/team/labels/propertyMaxValue",r.LABELS.TEAM.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateTeamPlayerActions(e){for(let t of Object.keys(e)){let i=e[t],n=".team-player-"+i.player_id+" .player-name";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let s=".team-player-"+i.player_id+" .properties-list-container";this.gameDom.getElement(s)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let a=".team-player-"+i.player_id+" .team-remove-button";this.gameDom.getElement(a)?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_REMOVE,id:this.message.id,remove:i.player_id})})}}}},{"640ee5228c27b39":"bzImH",e52de429595682ab:"eA0W7","3da1dc36372a33e1":"3lwy5"}],dhhBt:[function(e,t,i){let{ClanMessageHandler:n}=e("ffee11c5f30da2da"),{TeamsConst:r}=e("80c3d53d947c2511"),{Logger:s,sc:a}=e("b7dc8fe4d702b1c7");t.exports.ClanMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ClanMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ClanMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isClanMessage(t)&&this.handleClanMessage(t,r):(this.isClanMessage(t)&&(i.clanMessagesQueue||(i.clanMessagesQueue=[]),i.clanMessagesQueue.push(t)),!1)}handleClanMessage(e,t){return r.ACTIONS.CLAN_INITIALIZE===e.act?t.initializeClanUi():r.ACTIONS.CLAN_CREATE===e.act?r.VALIDATION.SUCCESS===e.result?t.showNewClan():t.initializeClanUi():r.ACTIONS.CLAN_INVITE===e.act?t.showClanRequest():r.ACTIONS.CLAN_UPDATE===e.act?t.showClanBox():r.ACTIONS.CLAN_LEFT===e.act?t.removeClanUi():!r.ACTIONS.CLAN_REMOVED||(t.removeClanUi(),t.initializeClanUi())}isClanMessage(e){return 0===e.act?.indexOf(r.CLAN_PREF)}}},{ffee11c5f30da2da:"9FVGq","80c3d53d947c2511":"eA0W7",b7dc8fe4d702b1c7:"3lwy5"}],"9FVGq":[function(e,t,i){let{UserInterface:n}=e("2dee0f2dc70de1b2"),{TeamsConst:r}=e("435f9309a487dcac"),{Logger:s,sc:a}=e("937cade469140286");t.exports.ClanMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?!!this.uiScene&&this.gameManager.playerData?.id:(s.info("Missing GameManager on ClanMessageHandler."),!1):(s.info("Missing message on ClanMessageHandler."),!1):(s.info("Missing RoomEvents on ClanMessageHandler."),!1)}initializeClanUi(){this.uiScene.currentClan=!1;let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/createClanTitle",r.LABELS.CLAN.CREATE_CLAN_TITLE),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: "#box-clan .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:this.createClanContent()},this.uiScene),this.activateCreateButton(),this.addAndRemoveCaptureKeys()}showNewClan(){let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.gameManager.currentPlayerName()),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: ".clan-dialog-box .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene),this.updateClanBox(i),this.setClanFromMessage()}showClanRequest(){this.createClanUi(),this.roomEvents.initUi({id:r.CLAN_KEY,title:this.gameManager.config.getWithoutLogs("client/clan/labels/requestFromTitle",r.LABELS.CLAN.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.CLAN_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-clan")?.addEventListener("click",()=>{this.initializeClanUi()})}showClanBox(){this.createClanUi();let e=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.message.leaderName),t=this.gameManager.gameDom.getElement("#box-clan .box-content");if(!t)return s.error('Missing container: "#box-clan .box-content".'),!1;let i=this.uiScene.elementsUi[r.CLAN_KEY];this.roomEvents.uiSetTitle(i,{title:e}),this.roomEvents.uiSetContent(i,{content:""},this.uiScene),this.setClanFromMessage(),this.updateClanBox(t)}setClanFromMessage(){let e=a.get(this.message,"players",!1),t=a.get(this.message,"members",!1);this.uiScene.currentClan={id:this.message.id,name:this.message.clanName,leader:this.message.leaderName,ownerId:this.message.ownerId,players:e,members:t}}removeClanUi(){let e=this.gameManager.getUiElement(r.CLAN_KEY);if(!e)return s.error("Clan UI Element not found for remove."),!1;e.removeElement(),delete this.uiScene.userInterfaces[r.CLAN_KEY],delete this.uiScene.elementsUi[r.CLAN_KEY]}createClanUi(){return a.get(this.uiScene.userInterfaces,r.CLAN_KEY)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[r.CLAN_KEY]=new n(this.gameManager,{id:r.CLAN_KEY,type:r.CLAN_KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-clan.html",r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY].createUiElement(this.uiScene,r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY])}createClanContent(){let e=this.uiScene.cache.html.get("clanCreate");if(!e)return s.error('Missing template "clanCreate".'),"";let t={playerId:this.gameManager.playerData.id.toString(),createLabel:this.gameManager.config.getWithoutLogs("client/clan/labels/createLabel",r.LABELS.CLAN.CREATE),clanNamePlaceholder:this.gameManager.config.getWithoutLogs("client/clan/labels/namePlaceholder",r.LABELS.CLAN.NAME_PLACEHOLDER)};return this.gameManager.gameEngine.parseTemplate(e,t)}activateCreateButton(){let e=this.gameManager.gameDom.getElement(".clan-dialog-box .submit-clan-create");if(!e)return s.warning('Clan create button not found by ".clan-dialog-box .clan-create".'),!1;let t=this.gameManager.gameDom.getElement(".clan-dialog-box .clan-name-input");if(!t)return s.warning('Clan create button not found by ".clan-dialog-box .clan-name-input".'),!1;e.addEventListener("click",()=>{if(0===t.value.length)return!1;this.gameManager.gameDom.updateContent(".clan-dialog-box .box-content",this.uiScene.cache.html.get("uiLoading")),this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_CREATE,[r.ACTIONS.CLAN_NAME]:t.value})})}updateClanBox(e){let t=a.get(this.message,"players",[]),i=Object.keys(t),n=0===i.length?this.gameManager.config.getWithoutLogs("client/clan/labels/noneConnected",r.LABELS.CLAN.NONE_CONNECTED):"";for(let e of i)n+=this.createClanPlayerBox(t[e]);let s=this.gameManager.playerData.id.toString()===this.message.ownerId.toString(),o=a.get(this.message,"members",[]),h="";for(let e of Object.keys(o))h+=this.createClanMemberBox(o[e],s);e.innerHTML=this.createClanContainer(n,h),this.activateClanPlayersActions(t),this.activateClanMembersActions(o),this.activateClanLeaveButtonAction()}addAndRemoveCaptureKeys(){let e=this.gameManager.getActiveScene(),t=e.availableControllersKeyCodes(),i=this.gameManager.gameDom.getElement(".clan-name-input");e.addAndRemoveCapture(t,i)}createClanContainer(e,t){let i=this.uiScene.cache.html.get("clanContainer");if(!i)return s.error('Missing template "clanContainer".'),"";let n=this.gameManager.playerData.id.toString()===this.message.ownerId.toString()?this.gameManager.config.getWithoutLogs("client/clan/labels/disbandLabel",r.LABELS.CLAN.DISBAND):this.gameManager.config.getWithoutLogs("client/clan/labels/leaveLabel",r.LABELS.CLAN.LEAVE),a={clanId:this.message.id,playerId:this.gameManager.playerData.id.toString(),leaveActionLabel:n,clanPlayersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanPlayersTitle",r.LABELS.CLAN.PLAYERS_TITLE),clanPlayers:e,clanMembersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanMembersTitle",r.LABELS.CLAN.MEMBERS_TITLE),clanMembers:t};return this.gameManager.gameEngine.parseTemplate(i,a)}activateClanLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.message.id);e?.addEventListener("click",()=>{let e={act:r.ACTIONS.CLAN_LEAVE,id:this.message.id};this.gameManager.activeRoomEvents.send(e)})}createClanPlayerBox(e){let t=this.uiScene.cache.html.get("clanPlayerData");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties)}):(s.error('Missing template "clanPlayerData".'),"")}createClanMemberBox(e,t){let i=this.uiScene.cache.html.get("clanMemberData");if(!i)return s.error('Missing template "clanMemberData".'),"";let n=e.id.toString()!==this.message.ownerId.toString();return this.gameManager.gameEngine.parseTemplate(i,{playerId:e.id.toString(),playerName:e.name,clanRemove:t&&n?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("clanRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.id.toString()}):(s.error('Missing template "clanRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/clan/labels/propertyMaxValue",r.LABELS.CLAN.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateClanPlayersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-player-"+t+" .player-name",r=".clan-player-"+t+" .properties-list-container",a=this.gameDom.getElement(n);a||s.notice("Player name element not found.",n),a?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let o=this.gameDom.getElement(r);a||s.notice("Player properties element not found.",r),o?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)})}}activateClanMembersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-member-"+i.id+" .clan-remove-button";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_REMOVE,id:this.message.id,remove:i.id})})}}}},{"2dee0f2dc70de1b2":"bzImH","435f9309a487dcac":"eA0W7","937cade469140286":"3lwy5"}],"58JKl":[function(e,t,i){let{ClanMessageHandler:n}=e("b6102a2bc5547886"),{TeamMessageHandler:r}=e("8b82527a10949305"),{sc:s}=e("600e9765de53cf98");t.exports.MessageProcessor=class{static processClanMessagesQueue(e,t){if(s.isArray(e.clanMessagesQueue)&&0!==e.clanMessagesQueue.length){for(let i of e.clanMessagesQueue)t.handleClanMessage(i,new n({roomEvents:e,message:i}));e.clanMessagesQueue=[]}}static processTeamMessagesQueue(e,t){if(s.isArray(e.teamMessagesQueue)&&0!==e.teamMessagesQueue.length){for(let i of e.teamMessagesQueue)t.handleTeamMessage(i,new r({roomEvents:e,message:i}));e.teamMessagesQueue=[]}}}},{b6102a2bc5547886:"9FVGq","8b82527a10949305":"4FmFV","600e9765de53cf98":"3lwy5"}],"7FChA":[function(e,t,i){let{TeamsConst:n}=e("7ae425e7585f8b77");t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/teams/templates/";e.load.html(n.KEY,t+"ui-teams.html"),e.load.html(n.CLAN_KEY,t+"ui-clan.html"),e.load.html("teamPlayerInvite",t+"team-invite.html"),e.load.html("teamPlayerAccept",t+"team-accept.html"),e.load.html("teamRemove",t+"team-remove.html"),e.load.html("teamContainer",t+"team-container.html"),e.load.html("teamPlayerData",t+"team-player-data.html"),e.load.html("clanCreate",t+"clan-create.html"),e.load.html("clanPlayerInvite",t+"clan-invite.html"),e.load.html("clanPlayerAccept",t+"clan-accept.html"),e.load.html("clanRemove",t+"clan-remove.html"),e.load.html("clanContainer",t+"clan-container.html"),e.load.html("clanPlayerData",t+"clan-player-data.html"),e.load.html("clanMemberData",t+"clan-member-data.html"),e.load.html("teamsSharedProperty",t+"shared-property.html")}}},{"7ae425e7585f8b77":"eA0W7"}],tkJox:[function(e,t,i){let{Translator:n}=e("c0b37a63a164ee2"),{SnippetsUi:r}=e("248d3f3dadbe8854"),{TemplatesHandler:s}=e("1f76a945ba4ca26b"),{TranslationsMapper:a}=e("9f2145cb2c70fb80"),o=e("3cdaeb7ca281fdbe"),{SnippetsConst:h}=e("12b107607eac2374"),{PluginInterface:c}=e("b68fb0c66be53b"),{Logger:l,sc:u}=e("b6c13c4a8fae8965");t.exports.SnippetsPlugin=class extends c{setup(e){if(this.gameManager=u.get(e,"gameManager",!1),!this.gameManager)return l.error("Game Manager undefined in InventoryPlugin."),!1;this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in InventoryPlugin."),a.forConfig(this.gameManager.config.client,o),this.activeLocale=this.gameManager.initialGameData?.userLocale?.locale.locale||h.DEFAULT_LOCALE,this.gameManager.services.translator=new n({snippets:Object.assign({},this.gameManager.config.client.snippets),dataValues:Object.assign({},this.gameManager.config.client.snippetsDataValues),locale:h.DEFAULT_LOCALE,activeLocale:this.activeLocale}),this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async(e,t,i,n)=>{this.gameManager.services.translator.snippets=Object.assign(this.gameManager.services.translator.snippets,this.gameManager.config.client.snippets)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new r(e),this.uiManager.createUi()})}}},{c0b37a63a164ee2:"aYgYW","248d3f3dadbe8854":"4basu","1f76a945ba4ca26b":"1GX4b","9f2145cb2c70fb80":"1fcQw","3cdaeb7ca281fdbe":"5lWrq","12b107607eac2374":"biSFs",b68fb0c66be53b:"fC3To",b6c13c4a8fae8965:"3lwy5"}],aYgYW:[function(e,t,i){let{SnippetsConst:n}=e("f53f6da57661aae5"),{sc:r}=e("ca9a001439841d68");t.exports.Translator=class{constructor(e){this.snippets=r.get(e,"snippets",{}),this.dataValues=r.get(e,"dataValues",{}),this.locale=r.get(e,"locale",n.DEFAULT_LOCALE),this.activeLocale=r.get(e,"activeLocale",n.DEFAULT_LOCALE)}translate(e,t={},i=!1){i||(i=this.activeLocale);let n=r.get(this.snippets[i],e,e);if(e===n)return e;if(!r.isObject(t))return n;let s=Object.keys(t);if(0===s.length)return n;let a=this.snippetNameSpace(e);for(let e of s){let i=t[e],r="%"+((this.dataValues[a]||{})[e]||e);for(;-1!==n.indexOf(r);)n=n.replace(r,i)}return n}snippetNameSpace(e){let t=e.split(".");return 1===t.length?n.DATA_VALUES_DEFAULT_NAMESPACE:t[0]}t(e,t={},i=!1){return this.translate(e,t,i)}}},{f53f6da57661aae5:"biSFs",ca9a001439841d68:"3lwy5"}],"4basu":[function(e,t,i){let{SnippetsConst:n}=e("9095968e9689ed1b"),{Logger:r,sc:s}=e("4383b901c356e103");t.exports.SnippetsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.translator=this.gameManager.services.translator,this.locales={}}createUi(){this.locales=s.get(this.gameManager.config.client,"locales",{});let e=Object.keys(this.locales);if(1>=e.length)return!1;let t=this.gameManager.gameEngine.parseTemplate(this.uiScene.cache.html.get(n.KEY),{snippetsTitle:this.translator.t("translator.title"),snippetsLabel:this.translator.t("translator.label"),snippetsNotification:this.translator.t("translator.notification")});if(!this.gameManager.gameDom.appendToElement("#settings-dynamic",t))return r.warning("Could not append snippets settings."),!1;let i=this.gameManager.gameDom.getElement(".snippets-setting");if(!i)return r.warning("Snippets settings container not available."),!1;for(let t of e){let e=this.locales[t],n=this.gameManager.gameDom.createElement("option");n.value=e.id,n.innerHTML=e.country_code,i.appendChild(n)}i.addEventListener("change",async()=>{this.gameManager.activeRoomEvents.send({act:n.ACTIONS.UPDATE,up:i.value})})}}},{"9095968e9689ed1b":"biSFs","4383b901c356e103":"3lwy5"}],"1GX4b":[function(e,t,i){let{SnippetsConst:n}=e("da1bec0d581b3bb0");t.exports.TemplatesHandler=class{static preloadTemplates(e){e.load.html(n.KEY,"/assets/features/snippets/templates/ui-snippets.html")}}},{da1bec0d581b3bb0:"biSFs"}],"5lWrq":[function(e,t,i){t.exports={translator:{title:"Languages Settings",label:"Choose your language:",notification:"Changes will take place after next login."}}},{}],aNIyr:[function(e,t,i){let{MessagesListener:n}=e("85a323b712a32599"),{SdkHandler:r}=e("1313cc258c10bcc1"),{ProvidersList:s}=e("939d602a1b11a3bf"),a=e("e0bd7042f0c03284"),{TranslationsMapper:o}=e("ae904a587e959599"),{AdsConst:h}=e("b33cf15ea82be794"),{PluginInterface:c}=e("9d441f820e5e636d"),{Logger:l,sc:u}=e("d2d2d55e6ca71f4b");t.exports.AdsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in AdsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in AdsPlugin."),this.config={},this.activeProviders={},this.playedAds=null,this.setConfig(),this.setSkdHandler(),this.fetchActiveProviders(),this.setTranslations(),this.listenEvents()}setConfig(){this.config=!!this.gameManager&&this.gameManager.config.get("client/ads/general",{})}setSkdHandler(){let e=this.gameManager?.gameDom;this.sdkHandler=!!e&&new r({gameDom:e,config:this.config})}fetchActiveProviders(){let e=u.get(this.config,"providers",{}),t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t.enabled&&(t.classDefinition=u.get(s,i,!1),this.activeProviders[i]=t)}}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,h.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager||!this.sdkHandler)return l.error("Missing properties for AdsPlugin."),!1;this.events.on("reldens.beforeCreateEngine",async(e,t)=>{if(!this.sdkHandler){l.info("Undefined SDK Handler.");return}await this.sdkHandler.setupProvidersSdk(this.activeProviders,t)}),this.events.on("reldens.joinedRoom",async e=>{await n.listenMessages(e,this)})}}},{"85a323b712a32599":"abfmj","1313cc258c10bcc1":"cOb0P","939d602a1b11a3bf":"dIdRn",e0bd7042f0c03284:"dPTjY",ae904a587e959599:"1fcQw",b33cf15ea82be794:"8NbLx","9d441f820e5e636d":"fC3To",d2d2d55e6ca71f4b:"3lwy5"}],abfmj:[function(e,t,i){let{AdsConst:n}=e("4348dc3fba513ca9"),{Logger:r}=e("c1c750da7e6bb927");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.ACTIONS.ADS_PLAYED!==e.act)return!1;if(t.playedAds={},!e.playedAdsModels)return r.info("None played ads.",e),!1;for(let i of e.playedAdsModels)t.playedAds[i.ads_id]=i;return!0})}}},{"4348dc3fba513ca9":"8NbLx",c1c750da7e6bb927:"3lwy5"}],"8NbLx":[function(e,t,i){t.exports.AdsConst={ENVIRONMENTS:{DISABLED:"disabled"},ADS_TYPES:{EVENT_VIDEO:"eventVideo",BANNER:"banner"},ACTIONS:{ADS_PLAYED:"adsP",AD_STARTED:"adS",AD_ENDED:"adE"},MESSAGE:{DATA_VALUES:{NAMESPACE:"ads"}},AWAIT_ADS_TIME:1e3,VIDEOS_MINIMUM_DURATION:3e3}},{}],cOb0P:[function(e,t,i){let{Logger:n,sc:r}=e("e03372517c231481");t.exports.SdkHandler=class{constructor(e){this.gameDom=r.get(e,"gameDom",!1)}async setupProvidersSdk(e,t){if(!this.gameDom)return n.error("Undefined GameDOM on SdkHandler."),!1;if(!r.isObject(e))return!1;let i=Object.keys(e);if(0===i.length)return!1;for(let r of i){let i=e[r];await this.appendSdk(i),await this.activateSdkInstance(i,t),n.info("Activated Ads SDK: "+i.key,i)}}async appendSdk(e){let t=r.get(e,"sdkUrl","");if(""===t)return!1;let i=this.gameDom.getElement("body"),n=this.gameDom.createElement("script");return n.src=t,i.append(n),!0}async activateSdkInstance(e,t){e.classDefinition&&(e.service=new e.classDefinition(e,t,e.activeAds)),r.isFunction(e.service?.activate)&&await e.service.activate()}}},{e03372517c231481:"3lwy5"}],dIdRn:[function(e,t,i){let{CrazyGames:n}=e("e56ab7764646c7b3"),{GameMonetize:r}=e("1a058a436deb6e61"),{GoogleAdSense:s}=e("e8b34c41dab1ace");t.exports.ProvidersList={crazyGames:n,gameMonetize:r,googleAdSense:s}},{e56ab7764646c7b3:"3CRbF","1a058a436deb6e61":"6XwV3",e8b34c41dab1ace:"8V0yJ"}],"3CRbF":[function(e,t,i){let{BannersHandler:n}=e("f96686ce9c54877d"),{VideosHandler:r}=e("786a85289268fabd"),{AdsProvider:s}=e("25abe1dccff858a9"),{AdsConst:a}=e("9c8391f4374e1d6f"),{Logger:o}=e("ff1ebd8b8b8b16e6");t.exports.CrazyGames=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.sdk=this.window?.CrazyGames?.SDK,this.retry=0,this.environment=a.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.metaData.sdkBannerRefreshTime||(this.metaData.sdkBannerRefreshTime=6e4),this.activeAds=this.fetchActiveAds(e);let i={gameManager:t,metaData:e,sdk:this.sdk,hasAdblock:this.hasAdblock,isEnabled:this.isEnabled};this.bannersHandler=new n(i),this.videosHandler=new r(i)}fetchActiveAds(e){return this.gameManager?.config?s.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}validAdsTypes(){return[a.ADS_TYPES.BANNER,a.ADS_TYPES.EVENT_VIDEO]}async activate(){return this.sdk?(this.environment=await this.sdk.getEnvironment(),this.bannersHandler.sdk=this.sdk,this.videosHandler.sdk=this.sdk,!await this.hasAdblock()&&void await this.activateAds()):(this.retry===this.metaData.sdkMaxRetries?o.critical("CrazyGames required object."):this.retry{this.retry++,o.info("CrazyGames required object, retry #"+this.retry+"."),this.sdk=this.window?.CrazyGames?.SDK,this.sdk&&o.info("CrazyGames object found."),this.activate()},this.metaData.sdkRetryTime),!1)}async hasAdblock(){try{let e=await this.sdk.ad.hasAdblock();return e&&o.critical("Adblock detected, please disable."),e}catch(e){o.info("SDK detected error.",e)}return!1}async isEnabled(){return a.ENVIRONMENTS.DISABLED!==await this.sdk.getEnvironment()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return!1;for(let t of e){let e=this.activeAds[t];a.ADS_TYPES.BANNER===e.type.key&&await this.bannersHandler.activateAdBanner(e),a.ADS_TYPES.EVENT_VIDEO===e.type.key&&await this.videosHandler.activateAdVideo(e)}}}},{f96686ce9c54877d:"rqZs2","786a85289268fabd":"74T2t","25abe1dccff858a9":"iayFu","9c8391f4374e1d6f":"8NbLx",ff1ebd8b8b8b16e6:"3lwy5"}],rqZs2:[function(e,t,i){let{Validator:n}=e("3e58599d4b199bfe"),{Logger:r,sc:s}=e("16dda0dd59cf6195");t.exports.BannersHandler=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.metaData=s.get(e,"metaData",{}),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=s.get(e,"sdk",!1),this.hasAdblock=s.get(e,"hasAdblock",!1),this.isEnabled=s.get(e,"isEnabled",!1),this.activeBanners={},this.validator=new n}availableBanners(){return["728x90","300x250","320x50","468x60","320x100"]}availableResponsiveBanners(){return["970x90","320x50","160x600","336x280","728x90","300x600","468x60","970x250","300x250","250x250","120x600"]}validBannerSize(e){return -1!==this.availableBanners().indexOf(e)}validResponsiveBannerSize(e){return -1!==this.availableResponsiveBanners().indexOf(e)}async activateAdBanner(e){if(!e)return r.info("Missing activate ad.",e),!1;if(!this.validator.validate(this))return r.info("Invalid banner."),!1;let t=e.bannerData;if(!t)return r.info("No banner data."),!1;let i=s.get(t,"fullTime",!1),n=s.get(t,"responsive",!1);if(i)return await this.handleBannerType(n,e);let a=s.get(t,"uiReferenceIds",[]);if(0===a.length)return r.warning("Missing banner reference ID."),!1;this.events.on("reldens.openUI",async t=>{if(-1!==a.indexOf("ANY")||-1!==a.indexOf(t.openButton.id)){let i=e.id+"-"+t.openButton.id,r=new Date().getTime(),a=s.get(this.activeBanners,i,!1);if(a&&r{let i=e.id+"-"+t.openButton.id,n=s.get(this.activeBanners,i,!1);n&&n.banner.classList.add("hidden")})}async handleBannerType(e,t,i){return e?this.createResponsiveBanner(t,i):await this.createBanner(t,i)}async createBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=s.get(e.styles,"width","300"),n=s.get(e.styles,"height","250");if(!this.validBannerSize(i+"x"+n))return r.info("CrazyGames - Invalid Banner size."),!1;let a=t||e.id;if(!a)return r.info("CrazyGames - Missing container ID.",e,t),!1;let o=this.gameDom.createElement("div","banner-container-"+a);this.gameDom.getElement("body")?.append(o),await this.isEnabled()&&await this.sdk.banner.requestBanner({id:o.id,width:i,height:n});let h=this.mapStylesWithValues(Object.assign({width:i,height:n},e));return this.gameDom.setElementStyles(o,h),o.classList.add("ads-banner-container"),o}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}mapStylesWithValues(e){let t={"z-index":2e8,width:s.get(e,"width",300),height:s.get(e,"height",250),position:""===s.get(e.styles,"position","")?e.position:"absolute"},i=s.get(e.styles,"top",null);null!==i&&(t.top=i);let n=s.get(e.styles,"bottom",null);null!==n&&(t.bottom=n);let r=s.get(e.styles,"left",null);null!==r&&(t.left=r);let a=s.get(e.styles,"right",null);return null!==a&&(t.right=a),t}async createResponsiveBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=t||e.id;if(!i)return r.info("CrazyGames - Missing container ID.",e,t),!1;let n=this.gameDom.createElement("div","responsive-banner-container-"+i),s=this.mapStylesWithValues(e);return delete s.width,delete s.height,this.gameDom.setElementStyles(n,s),this.gameDom.getElement("body").append(n),await this.isEnabled()&&await this.sdk.banner.requestResponsiveBanner(n.id),n.classList.add("ads-banner-container"),n}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}}},{"3e58599d4b199bfe":"dZuZ9","16dda0dd59cf6195":"3lwy5"}],dZuZ9:[function(e,t,i){let{Logger:n,sc:r}=e("11b40ed905e7acf1");t.exports.Validator=class{validate(e){return e.gameManager?e.sdk?(e.hasAdblock&&r.isFunction(e.hasAdblock)||n.warning("Missing or invalid hasAdblock function on Validator.",e),!!(e.isEnabled&&r.isFunction(e.isEnabled))||(n.error("Missing or invalid isEnabled function on Validator.",e),!1)):(n.error("Missing SDK on Validator.",e),!1):(n.error("Missing Game Manager on Validator.",e),!1)}async canBeActivated(e){return!(!r.isFunction(e.hasAdblock)||await e.hasAdblock())||(n.info("AdBlocker detected."),!1)}}},{"11b40ed905e7acf1":"3lwy5"}],"74T2t":[function(e,t,i){let{Validator:n}=e("eb221c6f45d898b0"),{AdsConst:r}=e("ff99f7bef03d711b"),{Logger:s,sc:a}=e("111cbb28b14bd31b");t.exports.VideosHandler=class{constructor(e){this.gameManager=a.get(e,"gameManager",!1),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=a.get(e,"sdk",!1),this.hasAdblock=a.get(e,"hasAdblock",!1),this.isEnabled=a.get(e,"isEnabled",!1),this.validator=new n,this.isPlayingAd=!1,this.setConfig()}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}async activateAdVideo(e){let t=a.get(e,"eventKey",!1);if(!t)return s.warning("Missing event key.",e),!1;this.events.on(t,async t=>this.isPlayingAd?(s.info("CrazyGames - Another ad is been played."),!1):this.validator.validate(this)&&await this.validator.canBeActivated(this)?this.isEnabled()?await this.tryRePlay(e):(s.info("CrazyGames - SDK not enabled."),!1):(s.error("CrazyGames - Ad can not be activated."),!1))}async tryRePlay(e){let t=this.gameManager.getFeature("ads");if(null===t.playedAds)return setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1;if(a.get(t?.playedAds,e.id,!1)&&!e.replay)return s.info("Ad already played",e),!1;let i=a.get(e,"adStartedCallback",()=>{this.isPlayingAd=!0,s.info("CrazyGames - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:e.id})}),n=a.get(e,"adFinishedCallback",async()=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),o=a.get(e,"adErrorCallback",async t=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-error callback.",t,new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id,error:t}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),h=a.get(e,"rewardItemKey",!1);await this.gameManager.audioManager.changeMuteState(!0,!0),await this.sdk.ad.requestAd(h?"rewarded":"midgame",{adStarted:i,adFinished:n,adError:o})}send(e){let t=this.gameManager?.activeRoomEvents;return t?t?.send(e):(s.warning("CrazyGames - RoomEvents undefined to send an Ad Video message."),!1)}}},{eb221c6f45d898b0:"dZuZ9",ff99f7bef03d711b:"8NbLx","111cbb28b14bd31b":"3lwy5"}],iayFu:[function(e,t,i){let{Logger:n}=e("55d686c62dfd5353");t.exports.AdsProvider=class{static fetchActiveAdsByProviderId(e,t,i){if(!e)return{};let r=Object.keys(i);if(0===r.length)return{};let s={};for(let a of r){let r=i[a];if(e===r.provider.id){if(!r.enabled){n.info("Ad not enabled.",r);continue}if(-1===t.indexOf(r.type.key)){n.info("Invalid ad type.",r);continue}s[a]=r}}return n.info({providerId:e,activeProviderAds:s}),s}}},{"55d686c62dfd5353":"3lwy5"}],"6XwV3":[function(e,t,i){let{AdsProvider:n}=e("f98142cce04e846c"),{AdsConst:r}=e("44a48259b87a5721"),{Logger:s,sc:a}=e("b637051a2a3ead94");t.exports.GameMonetize=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.setSdkOptions(),this.sdk=this.window?.sdk,this.retry=0,this.isPlayingAd=!1,this.environment=r.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.activeAds=this.fetchActiveAds(e),this.activeAdBeenPlayed=!1,this.setConfig()}fetchActiveAds(e){return this.gameManager?.config?n.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}eventKeys(){return{sdkAdStarted:"CONTENT_PAUSE_REQUESTED",sdkAdEnded:"SDK_GAME_START",sdkReady:"SDK_READY"}}setSdkOptions(){return!!this.gameDom&&(this.metaData.gameId?void(this.gameDom.getWindow().SDK_OPTIONS={gameId:this.metaData.gameId,onEvent:async e=>{switch(s.info("GameMonetize - SDK event fired: "+e.name),e.name){case this.eventKeys().sdkAdStarted:await this.adStartedCallback(e);break;case this.eventKeys().sdkAdEnded:await this.adEndedCallback(e);break;case this.eventKeys().sdkReady:await this.sdkReadyCallback(e)}}}):(s.error("GameMonetize - Game ID undefined."),!1))}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}validAdsTypes(){return[r.ADS_TYPES.EVENT_VIDEO]}async adStartedCallback(e){if(this.isPlayingAd=!0,await this.gameManager.audioManager.changeMuteState(!0,!0),!this.activeAdBeenPlayed)return s.info("AdStartedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:this.activeAdBeenPlayed.id})}async adEndedCallback(e){if(this.isPlayingAd=!1,await this.gameManager.audioManager.changeMuteState(!1,!1),!this.activeAdBeenPlayed)return s.info("AdEndedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:this.activeAdBeenPlayed.id})}async sdkReadyCallback(e){this.sdk=this.window.sdk}async activate(){if(!this.sdk)return this.retry===this.metaData.sdkMaxRetries?s.critical("GameMonetize required object."):this.retry{this.retry++,s.info("GameMonetize required object, retry #"+this.retry+"."),this.sdk=this.window?.sdk,this.sdk&&s.info("GameMonetize object found."),this.activate()},this.metaData.sdkRetryTime),!1;await this.activateAds()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return s.info("None active ads."),!1;for(let t of e){let e=this.activeAds[t];if(r.ADS_TYPES.EVENT_VIDEO!==e.type.key)continue;let i=a.get(e,"eventKey",!1);if(!i)return s.warning("Missing event key.",e),!1;this.events.on(i,async t=>(s.info("GameMonetize - Video event fired, playing ad.",t,e),this.isPlayingAd)?(s.info("GameMonetize - Ad is been played."),!1):await this.tryRePlay(e))}}async tryRePlay(e){return null===this.gameManager.getFeature("ads").playedAds?(setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1):(this.activeAdBeenPlayed=e,a.isObjectFunction(this.sdk,"showBanner"))?void await this.sdk.showBanner():(s.critical("GameMonetize SDK not ready."),!1)}send(e){let t=this.gameManager?.activeRoomEvents;return t?t.send(e):(s.warning("GameMonetize - RoomEvents undefined to send an Ad Video message."),!1)}}},{f98142cce04e846c:"iayFu","44a48259b87a5721":"8NbLx",b637051a2a3ead94:"3lwy5"}],"8V0yJ":[function(e,t,i){t.exports.GoogleAdSense=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e}}},{}],dPTjY:[function(e,t,i){t.exports={ads:{}}},{}],"79nNs":[function(e,t,i){let{DebugWorldCreator:n}=e("2f104c4a1fe36eaf"),{PluginInterface:r}=e("c03d54e76a300c60"),{Logger:s,sc:a}=e("56ce9c7fd2ae3df6");t.exports.WorldPlugin=class extends r{setup(e){this.gameManager=a.get(e,"gameManager",!1),this.events=a.get(e,"events",!1),this.debugWorldCreator=!1,this.validateProperties()&&this.setupDebugMode()}validateProperties(){return this.gameManager?!!this.events||(s.error("EventsManager undefined in PredictionPlugin."),!1):(s.error("Game Manager undefined in PredictionPlugin."),!1)}setupDebugMode(){if(!this.gameManager.config.getWithoutLogs("client/world/debug/enabled",!1))return!1;this.debugWorldCreator=new n,this.events.on("reldens.createEngineSceneDone",async e=>{await this.debugWorldCreator.createSceneWorld(e.currentScene)})}}},{"2f104c4a1fe36eaf":"2tOiq",c03d54e76a300c60:"fC3To","56ce9c7fd2ae3df6":"3lwy5"}],"2tOiq":[function(e,t,i){let{Renderer:n}=e("7f57d693a727d80"),{P2world:r}=e("56e554b827a8b617"),{WorldTimer:s}=e("b75a99257129c956"),{Logger:a}=e("493b121a06799e1e");t.exports.DebugWorldCreator=class{async createSceneWorld(e){let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomName,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.debugWorld=this.createWorldInstance(r),e.debugWorld.createLimits(),await e.debugWorld.createWorldContent({}),e.debugWorldTimer=new s({callbacks:[()=>{if(!e.debugWorld){a.error("Scene World not longer exists.",e.roomWorld);return}e.debugWorld.removeBodiesFromWorld()}]}),e.debugWorldTimer.startWorldSteps(e.debugWorld),e.debugWorldRenderer=new n(e)}cloneMapJson(e,t){let i=e.tilesets[0];return i?Object.assign({},e.cache?.tilemap?.entries?.entries[i.name]?.data||{},{layers:t}):{}}findValidLayers(e){let t=[],i=e.tilesets[0];if(!i)return t;for(let n of e.cache.tilemap.entries.entries[i.name].data.layers)-1!==n.name.indexOf("collision")&&t.push(n);return t}createWorldInstance(e){return new r(e)}}},{"7f57d693a727d80":"6kVuK","56e554b827a8b617":"hvh2r",b75a99257129c956:"5zAcU","493b121a06799e1e":"3lwy5"}],"6kVuK":[function(e,t,i){let{Box:n}=e("43cbaab4204b970");t.exports.Renderer=class{constructor(e){this.scene=e,this.gameDom=e.gameManager.gameDom,this.world=e.debugWorld,this.canvasElement=!1,this.canvasContext=!1}fetchCanvasContext(){this.canvasContext=this.canvasElement.getContext("2d")}createCanvas(e,t){this.canvasElement=this.gameDom.createElement("canvas"),this.canvasElement.width=e,this.canvasElement.height=t,this.canvasElement.id="physicsCanvas",this.gameDom.getDocument().body.appendChild(this.canvasElement),this.fetchCanvasContext()}renderLoop(){this.canvasContext.clearRect(0,0,this.canvasElement.width,this.canvasElement.height),this.renderP2World(),this.gameDom.getWindow().requestAnimationFrame(this.renderLoop.bind(this))}renderP2World(){let e=this.canvasContext;for(let t=0;t{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{let t=e?.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Scores messages queue on ScoresPlugin.",e),!1;s.processScoresMessagesQueue(t,this.scoresMessageListener)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in ScoresPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.scoresMessageListener}}},{"3b8c6a6b532efef7":"l5kMc","886a0d766603abc":"fpFc7",e89935d10dce4cba:"d0zyM",e991266a552fb051:"5oUd3",b0db3ae90acf0cc5:"beAgN",e0289d80f135b58e:"1fcQw","84d6714fa827e3e1":"fC3To",f46d2ddbf227db3d:"3lwy5"}],l5kMc:[function(e,t,i){let{ScoresConst:n}=e("fc16b961896d9e7e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/scores/templates/";e.load.html(n.KEY,t+"ui-scores.html"),e.load.html(n.TEMPLATES.SCORES_TABLE,t+"ui-scores-table.html")}}},{fc16b961896d9e7e:"5oUd3"}],"5oUd3":[function(e,t,i){let n="scores.";t.exports.ScoresConst={KEY:"scores",PREFIX:"sco",ACTIONS:{UPDATE:"scoUp",TOP_SCORES_UPDATE:"scoTops"},TEMPLATES:{SCORES_TABLE:"scoresTable"},MESSAGE:{DATA_VALUES:{NAMESPACE:"scores"}},SNIPPETS:{PREFIX:n,TITLE:n+"scoresTitle",CONTENT:n+"scoresContent",MY_SCORE:n+"myScore"}}},{}],fpFc7:[function(e,t,i){let{ScoresMessageHandler:n}=e("d156c5882f191e51"),{ScoresConst:r}=e("2e4cd336beabe6ca"),{Logger:s,sc:a}=e("aebac8790f258c87");t.exports.ScoresMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ScoresMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ScoresMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isScoresMessage(t)&&this.handleScoresMessage(t,r):this.isScoresMessage(t)?(i.scoresMessagesQueue||(i.scoresMessagesQueue=[]),i.scoresMessagesQueue.push(t),!0):(s.error("Invalid ScoresMessageHandler",r),!1)}handleScoresMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updatePlayerScore():r.ACTIONS.TOP_SCORES_UPDATE!==e.act||t.updateScoresBox()}isScoresMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{d156c5882f191e51:"e8G1n","2e4cd336beabe6ca":"5oUd3",aebac8790f258c87:"3lwy5"}],e8G1n:[function(e,t,i){let{UserInterface:n}=e("a45d421f329cd9bb"),{ScoresConst:r}=e("78e1225607fe67de"),{Logger:s,sc:a}=e("98287ac0824fa508");t.exports.ScoresMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on ScoresMessageHandler."),!1):(s.info("Missing message on ScoresMessageHandler."),!1):(s.info("Missing RoomEvents on ScoresMessageHandler."),!1)}createScoresUi(){let e=a.get(this.uiScene.userInterfaces,r.KEY);if(e)return e;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let t=new n(this.gameManager,{id:r.KEY,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/scores/templates/ui-scores.html",r.KEY);t.createUiElement(this.uiScene,r.KEY);let i=this.uiScene.elementsUi[r.KEY];if(!i)return s.error("Scores UI box not found.",{uiScores:t,uiBox:i}),!1;let o=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/title",r.SNIPPETS.TITLE)),h=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/content",r.SNIPPETS.CONTENT));return this.roomEvents.uiSetTitleAndContent(i,{title:o,content:h},this.uiScene),this.uiScene.userInterfaces[r.KEY]=t,this.uiScene.userInterfaces[r.KEY]}updatePlayerScore(){this.createScoresUi(r.KEY);let e=a.get(this.message,"newTotalScore",!1);if(!e){s.debug("Missing new total score on update message.");return}this.uiScene.currentPlayerScore=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}updateScoresBox(){this.createScoresUi(r.KEY);let e=a.get(this.message,"scores",!1);if(!e){s.debug("Missing scores data on message.");return}this.uiScene.scores=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}createContentsUpdate(){let e=this.uiScene.cache.html.get(r.TEMPLATES.SCORES_TABLE);if(!e)return s.error('Missing template "'+r.TEMPLATES.SCORES_TABLE+'".'),"";let t={scores:this.uiScene.scores,showCurrentPlayer:!0,currentPlayerScore:this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/myScore",r.SNIPPETS.MY_SCORE),{myScore:this.uiScene.currentPlayerScore||"0"})};return this.gameManager.gameEngine.parseTemplate(e,t)}}},{a45d421f329cd9bb:"bzImH","78e1225607fe67de":"5oUd3","98287ac0824fa508":"3lwy5"}],d0zyM:[function(e,t,i){let{ScoresMessageHandler:n}=e("45ab9844bbd919a8"),{sc:r}=e("d9c441fdb0377cf");t.exports.MessageProcessor=class{static processScoresMessagesQueue(e,t){if(r.isArray(e.scoresMessagesQueue)&&0!==e.scoresMessagesQueue.length){for(let i of e.scoresMessagesQueue)t.handleScoresMessage(i,new n({roomEvents:e,message:i}));e.scoresMessagesQueue=[]}}}},{"45ab9844bbd919a8":"e8G1n",d9c441fdb0377cf:"3lwy5"}],beAgN:[function(e,t,i){t.exports={scores:{scoresTitle:"Top Players Scores",scoresContent:"No scores available.",myScore:"My score: %myScore"}}},{}],"4p1ha":[function(e,t,i){let{PreloaderHandler:n}=e("efc9996b9ceaadce"),{MessageListener:r}=e("ef29ab05ba87fd5"),{MessageProcessor:s}=e("bd6312294795cf1c"),{RewardsConst:a}=e("a60c417cf40e6e4e"),o=e("702d39ed6c29ddf6"),{TranslationsMapper:h}=e("e6ea40ce120e2033"),{PluginInterface:c}=e("78f7099074cee28a"),{Logger:l,sc:u}=e("76d1b05ad0acce3a");t.exports.RewardsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.events=u.get(e,"events",!1),this.preloaderHandler=new n,this.messageListener=new r,this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.listenMessages(),l.debug("Plugin READY: Rewards"))}validateProperties(){return this.gameManager?!!this.events||(l.error("EventsManager undefined in RewardsPlugin."),!1):(l.error("Game Manager undefined in RewardsPlugin."),!1)}setTranslations(){if(!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,a.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events){l.error('EventsManager undefined in RewardsPlugin for "listenEvents".');return}this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{s.processRewardsMessagesQueue(e,this)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in RewardsPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.messageListener}}},{efc9996b9ceaadce:"8NCLg",ef29ab05ba87fd5:"jXzBf",bd6312294795cf1c:"h8UKT",a60c417cf40e6e4e:"lIgFH","702d39ed6c29ddf6":"carao",e6ea40ce120e2033:"1fcQw","78f7099074cee28a":"fC3To","76d1b05ad0acce3a":"3lwy5"}],"8NCLg":[function(e,t,i){let{RewardsConst:n}=e("c14067eab2e5b23e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/rewards/templates/";e.load.html(n.KEY,t+"ui-rewards.html"),e.load.html(n.TEMPLATES.REWARDS_LIST,t+"ui-rewards-list.html")}}},{c14067eab2e5b23e:"lIgFH"}],lIgFH:[function(e,t,i){let n="rewards.";t.exports.RewardsConst={KEY:"rewards",PREFIX:"rwd",ACTIONS:{INITIALIZE:"rwdIni",UPDATE:"rwdUp",ACCEPT_REWARD:"rwdAcpt",ACCEPTED_REWARD:"rwdAcpted"},SPLIT_EXPERIENCE:{ALL:0,PROPORTIONAL_BY_LEVEL:1},SPLIT_MODIFIER:{ALL:0,RANDOM:1},SPLIT_ITEMS:{DROP_KEEPS:0,RANDOM:1},MESSAGE:{DATA:{LABEL:"rlbl",DESCRIPTION:"rdes",POSITION:"rpos",SHOW_REWARD_IMAGE:"srimg",REWARD_IMAGE:"rimg",REWARD_IMAGE_PATH:"rimgp",EVENT_DATA:"redt",STATE_DATA:"resd",ITEMS_DATA:"rmid",ITEM_KEY:"rikey",ITEM_LABEL:"rilbl",ITEM_DESCRIPTION:"rides",ITEM_QUANTITY:"riqty"},DATA_VALUES:{NAMESPACE:"rewards"}},TEMPLATES:{REWARDS_LIST:"rewardsList"},SNIPPETS:{PREFIX:n,TITLE:n+"title",ACCEPTED_REWARD:n+"acceptedReward"}}},{}],jXzBf:[function(e,t,i){let{MessageHandler:n}=e("4d23f5e42478957c"),{RewardsConst:r}=e("bda46dc94809b55d"),{Logger:s,sc:a}=e("a4007c1db9e3ae27");t.exports.MessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on RewardsMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on RewardsMessageListener.",e),!1;if(!this.isRewardsMessage(t))return!1;let r=new n({roomEvents:i,message:t});return r.validate()?this.handleRewardsMessage(t,r):(i.rewardsMessagesQueue||(i.rewardsMessagesQueue=[]),i.rewardsMessagesQueue.push(t),!0)}handleRewardsMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updateRewardsBox():r.ACTIONS.ACCEPTED_REWARD!==e.act||t.showAcceptedReward()}isRewardsMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{"4d23f5e42478957c":"4T3oM",bda46dc94809b55d:"lIgFH",a4007c1db9e3ae27:"3lwy5"}],"4T3oM":[function(e,t,i){let{UserInterface:n}=e("8d4a3a8b8eeaff6"),{RewardsConst:r}=e("677bd2d65b92e557"),{GameConst:s}=e("7a270c9c6c08724"),{Logger:a,sc:o}=e("70b77844d02b2070");t.exports.MessageHandler=class{constructor(e){this.roomEvents=o.get(e,"roomEvents",!1),this.message=o.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.config=this.gameManager?.config,this.translator=this.gameManager?.services?.translator,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(a.info("Missing GameManager on RewardsMessageHandler."),!1):(a.info("Missing message on RewardsMessageHandler."),!1):(a.info("Missing RoomEvents on RewardsMessageHandler."),!1)}createRewardsUi(e){let t=o.get(this.uiScene.userInterfaces,e);if(t)return t;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let i=new n(this.gameManager,{id:e,type:e,defaultOpen:!0,defaultClose:!0},"/assets/features/rewards/templates/ui-rewards.html",e);i.createUiElement(this.uiScene,e),i.closeButton.addEventListener("click",()=>{this.gameDom.emptyElement(".accepted-reward")});let s=this.uiScene.elementsUi[e];if(!s)return a.error("Scores UI box not found.",{uiRewards:i,uiBox:s}),!1;let h=this.translator.t(this.config.getWithoutLogs("client/rewards/labels/title",r.SNIPPETS.TITLE));return this.roomEvents.uiSetTitleAndContent(s,{title:h},this.uiScene),this.uiScene.userInterfaces[e]=i,this.uiScene.userInterfaces[e]}updateRewardsBox(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"rewards",!1);if(!e){a.debug("Missing rewards data on message.");return}this.enrichForDisplay(e),this.uiScene.rewards=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene),this.showRewardsNotificationBalloon(),this.activateRewardsAction()}showAcceptedReward(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"acceptedReward",!1);if(!e){a.debug("Missing rewards on update message.");return}this.enrichForDisplay([e]),this.uiScene.acceptedReward=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene)}createUpdateContent(){let e=this.uiScene.cache.html.get(r.TEMPLATES.REWARDS_LIST);if(!e)return a.error('Missing template "'+r.TEMPLATES.REWARDS_LIST+'".'),"";let t=this.uiScene.acceptedReward,i=t?this.translator.t(this.config.getWithoutLogs("client/rewards/labels/acceptedReward",r.SNIPPETS.ACCEPTED_REWARD),{rewardLabel:t.translated.label}):"",n={rewards:this.uiScene.rewards,acceptedReward:t,acceptedRewardMessage:i};return this.gameManager.gameEngine.parseTemplate(e,n)}enrichForDisplay(e){for(let t of e){let e=this.translator.t(t[r.MESSAGE.DATA.DESCRIPTION]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});this.config.getWithoutLogs("client/rewards/labels/includeItemsDescription",!0)&&(e+=this.mapItemsText(t));let i=this.translator.t(t[r.MESSAGE.DATA.LABEL]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});t.translated={label:i,description:e};let n=t[r.MESSAGE.DATA.STATE_DATA];t.activeClass=n?.ready&&!n?.complete?"active":"inactive",t.showRewardImage=t[r.MESSAGE.DATA.SHOW_REWARD_IMAGE]||"",t.rewardImage=t[r.MESSAGE.DATA.REWARD_IMAGE]||"",t.rewardImagePath=t[r.MESSAGE.DATA.REWARD_IMAGE_PATH]||""}return e}mapItemsText(e){let t=this.config.getWithoutLogs("client/rewards/labels/itemsSeparator","
"),i=this.config.getWithoutLogs("client/rewards/labels/itemsTemplate","%label (%quantity)");return t+e[r.MESSAGE.DATA.ITEMS_DATA]?.map(e=>i=(i=i.replace("%label",e[r.MESSAGE.DATA.ITEM_LABEL])).replace("%quantity",e[r.MESSAGE.DATA.ITEM_QUANTITY])).join(t)}showRewardsNotificationBalloon(){let e=this.gameDom.getElement("#rewards-notification-balloon"),t=this.gameDom.getElements(".reward-active");if(e&&t&&0{this.gameManager.activeRoomEvents.send({[s.ACTION_KEY]:r.ACTIONS.ACCEPT_REWARD,id:e.dataset.rewardId})})}}},{"8d4a3a8b8eeaff6":"bzImH","677bd2d65b92e557":"lIgFH","7a270c9c6c08724":"93TbC","70b77844d02b2070":"3lwy5"}],h8UKT:[function(e,t,i){let{MessageHandler:n}=e("31470942304bd302"),{Logger:r,sc:s}=e("32739ae155fa16f3");t.exports.MessageProcessor=class{static processRewardsMessagesQueue(e,t){let i=e?.roomEvents;if(!i)return r.critical("RoomEvents undefined for process Rewards messages queue on RewardsPlugin.",e),!1;if(s.isArray(i.rewardsMessagesQueue)&&0!==i.rewardsMessagesQueue.length){for(let e of i.rewardsMessagesQueue)t.messageListener?.handleRewardsMessage(e,new n({roomEvents:i,message:e}));i.rewardsMessagesQueue=[]}}}},{"31470942304bd302":"4T3oM","32739ae155fa16f3":"3lwy5"}],carao:[function(e,t,i){t.exports={rewards:{title:"Rewards",dailyLogin:"Daily Login",dailyDescription:"Login every day and claim your reward",straightDaysLogin:"%loginCount Days Login",straightDaysDescription:"Login every day for %loginCount days and claim your reward",acceptedReward:'You accepted the "%rewardLabel" reward!'}}},{}],dkVHA:[function(e,t,i){let n=e("e6a5960c3a99bcc9").default,r=e("d306a7719b3b609a"),s=e("d3e0e9ccc057727d"),a=e("eb8d3da15fd6263e"),{ErrorsBlockHandler:o}=e("6645d49b0b5d816f"),{GameConst:h}=e("89df318e7a41c05a"),{ErrorManager:c,Logger:l,sc:u}=e("bf14904e4b931b12");t.exports.FirebaseConnector=class{constructor(e){e||c.error("FirebaseConnector - Missing game manager."),this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.analytics=r,this.app=n,this.firebaseAuth=s,this.ui=a,this.authUi=!1,this.isActive=!1,this.containerId="#firebaseui-auth-container",this.uiConfig={signInOptions:[{provider:this.firebaseAuth.GoogleAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.FacebookAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.GithubAuthProvider.PROVIDER_ID}],signInFlow:"popup"},this.gameManager.events.on("reldens.beforeJoinGame",e=>{"firebase-login"===e.formData.formId&&(e.gameManager.userData.isFirebaseLogin=!0)})}startFirebase(){let e=this.gameManager.appServerUrl+h.ROUTE_PATHS.FIREBASE;this.gameDom.getJSON(e,(e,t)=>{if(!t.enabled)return!1;let i=t.firebaseConfig;this.initAuth(i,this.uiConfig),this.gameDom.getWindow().addEventListener("beforeunload",()=>{this.isActive&&this.app.auth().signOut()}),this.app.auth().onAuthStateChanged(e=>(e?this.setActiveUser(e):this.startAuthUi(),!1));let n=this.gameDom.getElement("#firebase-login");n&&this.activateLoginBehavior(n)})}activateLoginBehavior(e){e.addEventListener("submit",t=>{if(t.preventDefault(),!e.checkValidity())return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden")});let t=this.gameDom.getElement("#firebase-username");if(!t)return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden"),t.addEventListener("change",()=>{o.reset(e)}),t.addEventListener("focus",()=>{o.reset(e)})}startAuthUi(){this.isActive=!1,this.gameDom.getElement(this.containerId)&&(this.gameDom.getElement(this.containerId).innerHTML=""),this.authUi.start(this.containerId,this.uiConfig)}setActiveUser(e){this.isActive=!0;let t={formId:"firebase-login",email:e.email,username:this.gameDom.getElement("#firebase-username").value,password:e.uid};this.gameManager.startGame(t,!0)}initAuth(e,t){if(!e||!t)return l.error("Missing firebase configuration."),!1;this.firebaseConfig=e,this.uiConfig=t,this.app.initializeApp(this.firebaseConfig),u.hasOwn(this.firebaseConfig,"measurementId")&&this.app.analytics(),this.authUi=new this.ui.auth.AuthUI(this.app.auth()),u.hasOwn(this.uiConfig,"callbacks")||(this.uiConfig.callbacks={}),u.hasOwn(this.uiConfig.callbacks,"signInSuccessWithAuthResult")||(this.uiConfig.callbacks.signInSuccessWithAuthResult=()=>!1)}}},{e6a5960c3a99bcc9:"llQKY",d306a7719b3b609a:"jiMXy",d3e0e9ccc057727d:"2s8iN",eb8d3da15fd6263e:"1Z3EC","6645d49b0b5d816f":"kzsmo","89df318e7a41c05a":"93TbC",bf14904e4b931b12:"3lwy5"}],llQKY:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>s.default);var r=e("@firebase/app-compat"),s=n.interopDefault(r);/** + */e.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i(85454)})(),t.exports=n()},{"57a99fe9b8471a10":"4VGCc"}],"4VGCc":[function(e,t,i){},{}],e7OdC:[function(e,t,i){t.exports.FPSCounter=class{constructor(e){this.lastFrameTime=performance.now(),this.frameCount=0,this.fpsDisplay=e.createElementWithStyles("div","fps-counter",{padding:"0 20px",background:"#000",color:"#00ff00"}),e.getElement(".header").appendChild(this.fpsDisplay)}updateFPS(){let e=performance.now(),t=e-this.lastFrameTime;this.lastFrameTime=e;let i=Math.round(1e3/t);this.frameCount++,0==this.frameCount%60&&(this.fpsDisplay.textContent="FPS: "+i),requestAnimationFrame(this.updateFPS.bind(this))}start(){this.updateFPS()}}},{}],izuLV:[function(e,t,i){let n="objects.";t.exports.ObjectsConst={OBJECT_ANIMATION:"oa",OBJECT_INTERACTION:"oi",TYPE_OBJECT:"obj",TYPE_ANIMATION:"anim",TYPE_NPC:"npc",TYPE_ENEMY:"enemy",TYPE_TRADER:"trader",TYPE_DROP:"drop",DYNAMIC_ANIMATION:"dyn",MESSAGE:{DATA_VALUES:{NAMESPACE:"objects"}},EVENT_PREFIX:{BASE:"bo",ANIMATION:"ao",DROP:"dep",ENEMY:"eo",NPC:"npc",TRADER:"tnpc"},SNIPPETS:{PREFIX:n,NPC_INVALID:n+"npcInvalid",TRADER:{CONTENT:n+"trader.content",OPTIONS:{BUY:n+"trader.options.buy",SELL:n+"trader.options.sell"},BUY_CONFIRMED:n+"trader.buyConfirmed",SELL_CONFIRMED:n+"trader.sellConfirmed"}},DEFAULTS:{BASE_OBJECT:{CONTENT:"",OPTIONS:{}},TRADER_OBJECT:{INVENTORY_MAP:{buy:"A",sell:"B"},OPTIONS:{BUY:"buy",SELL:"sell"}},TARGETS:{OBJECT:0,PLAYER:1}},TRADE_ACTIONS_FUNCTION_NAME:{ADD:"add",REMOVE:"remove",CONFIRM:"confirm",DISCONFIRM:"disconfirm",CANCEL:"cancel"},TRADE_ACTIONS:{SUB_ACTION:"sub",ADD:"ta",REMOVE:"tr",CONFIRM:"tc",DISCONFIRM:"td"},DROPS:{KEY:"drp",REMOVE:"drmv",PARAMS:"drpp",ASSET_KEY:"dk",PICK_UP_ACT:"rpu",ASSETS_PATH:"/assets/custom/sprites/",FILE:"df",TYPE:"dt"}}},{}],"7XAJ0":[function(e,t,i){let{PlayerEngine:n}=e("ad34e884dd74ab75"),{SceneDynamic:r}=e("8c3cc377813bccbe"),{ScenePreloader:s}=e("eb7c0f886bf8e7c7"),{GameConst:a}=e("dd0538535f6f136a"),{ErrorManager:o,Logger:h,sc:c}=e("2b2fa27d8710e574");t.exports.RoomEvents=class{constructor(e,t){this.room=!1,this.sceneData=!1,this.scenePreloader=!1,this.playersOnAddCallback=!1,this.playersOnRemoveCallback=!1,this.playersQueue={},this.gameManager=t,this.gameEngine=t.gameEngine,this.roomName=e,this.events=t.events,this.objectsUi={},this.tradeUi={},this.gameOverRetries=0,this.gameOverMaxRetries=0,this.gameOverRetryTime=200,this.automaticallyCloseAllDialogsOnSceneChange=t.config.getWithoutLogs("client/rooms/automaticallyCloseAllDialogsOnSceneChange",!0)}async activateRoom(e,t=!1){await this.events.emit("reldens.activateRoom",e,this.gameManager),this.room=e,this.playersOnAddCallback=this.room.state.players.onAdd((e,i)=>{this.checkAndCreateScene(),this.playersOnAdd(e,i,t),this.listenPlayerAndStateChanges(e,i)}),this.playersOnRemoveCallback=this.room.state.players.onRemove((e,t)=>{this.playersOnRemove(e,t)}),this.room.onMessage("*",async e=>{await this.roomOnMessage(e)}),this.room.onLeave(e=>{this.roomOnLeave(e)})}listenPlayerAndStateChanges(e,t){let i=this.gameManager.getCurrentPlayer().player_id,n=Object.keys(e),r=Object.keys(e.state);for(let i of n)e.listen(i,i=>{this.playersOnChange(e,t,"playerChange")});for(let n of r)e.state.listen(n,r=>{if(e.state[n]=r,this.playersOnChange(e,t,"playerChange"),"inState"===n&&e.player_id===i){if(a.STATUS.DEATH===r)return this.showGameOverBox();this.hideGameOverBox()}})}checkAndCreateScene(){if(!this.room.state||this.room.state.sceneData===this.sceneData||(this.sceneData=c.toJson(this.room.state.sceneData),this.gameEngine.scene.getScene(this.roomName)))return;let e=this.createSceneInstance(this.roomName,this.sceneData,this.gameManager);this.gameEngine.scene.add(this.roomName,e,!1)}async playersOnAdd(e,t,i){await this.events.emit("reldens.playersOnAdd",e,t,i,this);let n={x:e.state.x,y:e.state.y,dir:e.state.dir,playerName:e.playerName,avatarKey:e.avatarKey,playedTime:e.playedTime,player_id:e.player_id};if(this.isCurrentPlayer(t))return await this.createCurrentPlayer(e,i,t);this.addOtherPlayers(e,t,n)}isCurrentPlayer(e){return e===this.room.sessionId}addOtherPlayers(e,t,i){if(!this.engineStarted)return this.playersQueue[t]=i,!1;let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;n.player.addPlayer(t,i)}async createCurrentPlayer(e,t,i){this.engineStarted=!0,await this.startEngineScene(e,this.room,t);let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;for(let r of(await this.events.emit("reldens.playersQueueBefore",e,i,t,this),Object.keys(this.playersQueue)))n.player.addPlayer(r,this.playersQueue[r]);let r={player:e,key:i,previousScene:t,roomEvents:this};return await this.events.emit("reldens.createCurrentPlayer",r),r}isValidScene(e,t){return e.key===t.state.scene&&e.player&&e.player.players}playersOnChange(e,t,i){if(e.state.scene!==this.roomName){e.player_id!==this.gameManager.getCurrentPlayer().player_id||this.gameManager.isChangingScene||h.info("Player scene miss match.",{currentScene:this.roomName,playerSceneOnState:e?.state.scene,player:e?.sessionId,currentPlayer:this.gameManager.getCurrentPlayer()?.playerId,isChangingScene:this.gameManager.isChangingScene});return}let n=this.getActiveScene();this.playerExists(n,t)&&n.player.updatePlayer(t,e)}playersOnRemove(e,t){return(this.events.emitSync("reldens.playersOnRemove",e,t,this),t===this.room.sessionId)?this.gameOverReload():this.removePlayerByKey(t)}removePlayerByKey(e){let t=this.getActiveScene();this.playerExists(t,e)&&(t.player.removePlayer(e),t.player.currentTarget?.id===e&&this.gameEngine.clearTarget())}gameOverReload(){let e={confirmed:!0};this.events.emitSync("reldens.gameOverReload",this,e),!this.gameManager.gameOver&&e.confirmed&&this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.sessionEnded"))}playerExists(e,t){return e.player&&c.hasOwn(e.player.players,t)}async roomOnMessage(e){await this.runGameOver(e),await this.runRevived(e),await this.runChangeScene(e),await this.runReconnect(e),await this.runUpdateStats(e),await this.runInitUi(e),await this.closeBox(e),await this.runCustomMessageListener(e)}async runInitUi(e){if(e.act!==a.UI||!e.id)return!1;await this.events.emit("reldens.initUiBefore",e,this),this.initUi(e),await this.events.emit("reldens.initUiAfter",e,this)}async closeBox(e){if(a.CLOSE_UI_ACTION!==e.act||!e.id)return!1;let t=this.gameManager.gameDom.getElement("#box-"+e.id+" .box-close");return t?(t.click(),!0):(h.error('Box could not be closed ID "'+e.id+'".'),!1)}async runCustomMessageListener(e){let t=c.get(e,"listener","");if(""===t)return!1;let i=this.gameManager.config.get("client/message/listeners",{}),n=this.gameManager.config.get("client/customClasses/message/listeners",{}),r=c.get(n,t,!1);return(r||(r=c.get(i,t,!1)),r)?c.isFunction(r.executeClientMessageActions)?void r.executeClientMessageActions({message:e,roomEvents:this}):(h.error('Listener is missing "executeClientMessageActions" method.',r),!1):(h.error('Listener "'+t+'" is missing.'),!1)}async runUpdateStats(e){return e.act===a.PLAYER_STATS&&(await this.events.emit("reldens.playerStatsUpdateBefore",e,this),await this.updatePlayerStats(e))}async runReconnect(e){if(e.act!==a.RECONNECT)return!1;await this.events.emit("reldens.beforeReconnectGameClient",e,this),await this.gameManager.reconnectGameClient(e,this.room)}async runChangeScene(e){if(e.act===a.CHANGING_SCENE&&this.room.sessionId===e.id&&(this.gameManager.isChangingScene=!0,this.closeAllActiveDialogs(),this.gameManager.getActiveScene().scene.setVisible(!1)),e.act!==a.CHANGED_SCENE||e.scene!==this.room.name||this.room.sessionId===e.id)return!1;await this.events.emit("reldens.startChangedScene",{message:e,roomEvents:this});let t=this.getActiveScene(),{id:i,x:n,y:r,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}=e,u=this.gameManager.config.get("client/players/size/topOffset"),d=this.gameManager.config.get("client/players/size/leftOffset");t.player.addPlayer(i,{x:n-d,y:r-u,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}),this.gameManager.isChangingScene=!1,await this.events.emit("reldens.endChangedScene",{message:e,roomEvents:this})}closeAllActiveDialogs(){if(!this.automaticallyCloseAllDialogsOnSceneChange)return;let e=this.gameManager.gameDom.getElements(".box-close");if(0!==e.length)for(let t of e)t.click()}async runRevived(e){if(e.act!==a.REVIVED)return!1;this.gameManager.gameDom.getElement("#game-over").classList.add("hidden");let t=this.gameManager.getCurrentPlayer(),i=c.get(t.players,e.t,!1);if(!i)return!1;i.visible=!0,c.hasOwn(i,"nameSprite")&&i.nameSprite&&(i.nameSprite.visible=!0),this.getActiveScene().stopOnDeathOrDisabledSent=!1}async runGameOver(e){if(e.act!==a.GAME_OVER)return!1;try{await this.events.emit("reldens.runGameOver",{message:e,defaultBehavior:!0,roomEvents:this}),await this.events.emit("reldens.gameOver",e,this),this.gameManager.gameOver=!0;let t=this.gameManager.getCurrentPlayer();if(!t)return this.gameOverRetriesthis.runGameOver(e),this.gameOverRetryTime),this.gameOverRetries++),!1;t.players[t.playerId].visible=!1,this.showGameOverBox()}catch(t){return setTimeout(()=>this.runGameOver(e),200),this.gameOverRetries++,!1}}showGameOverBox(){return this.displayGameOverBox(!0)}hideGameOverBox(){return this.displayGameOverBox(!1)}displayGameOverBox(e){h.debug("Display game over box: "+(e?"yes":"no")+".");let t=this.gameManager.gameDom.getElement("#game-over");return t?e?(t.classList.remove("hidden"),!0):(t.classList.add("hidden"),!1):(h.debug("GameOver box element not found."),!1)}async roomOnLeave(e){!this.isAbnormalShutdown(e)||this.gameManager.gameOver||this.gameManager.forcedDisconnection||(h.error("There was a connection error.",{code:e,isGameOver:this.gameManager.gameOver,isForcedDisconnection:this.gameManager.forcedDisconnection}),this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.serverDown"))),await this.events.emit("reldens.playerLeftScene",{code:e,roomEvents:this})}isAbnormalShutdown(e){return 1001<=e&&1015>=e}async updatePlayerStats(e){if(!c.hasOwn(e,"stats")||!e.stats)return!1;let t=this.getActiveScene();if(!t.player||!c.hasOwn(t.player.players,this.room.sessionId))return h.error("Player not available.",this.room,t),!1;t.player.players[this.room.sessionId].stats=e.stats,this.gameManager.playerData.stats=e.stats,this.gameManager.playerData.statsBase=e.statsBase;let i=this.gameManager.getUiElement("playerStats");if(!i)return!1;let n=i.getChildByProperty("id","player-stats-container");if(!n)return!1;let r=this.gameEngine.uiScene.cache.html.get("playerStat");for(let t of(n.innerHTML="",Object.keys(e.stats))){let i=c.get(this.gameManager.config.client.players.initialStats[t],"data",!1),s=i&&c.get(i,"showBase",!1)?" / "+e.statsBase[t]:"",a=this.gameManager.gameEngine.parseTemplate(r,{statLabel:t,statValue:e.stats[t]+s});n.innerHTML=n.innerHTML+a}await this.events.emit("reldens.playerStatsUpdateAfter",e,this)}initUi(e){let t=this.gameEngine.uiScene;if(!t||!c.hasOwn(t.elementsUi,e.id))return h.error("User interface not found on UI Scene: "+e.id),!1;let i=t.elementsUi[e.id];this.uiSetTitle(i,e),this.uiSetContent(i,e,t);let n=i.getChildByID("box-"+e.id),r=e.keepCurrentDisplay&&"none"===n.style.display;n.style.display=r?"none":"block",i.setDepth(2),this.gameManager.config.get("client/ui/uiTarget/hideOnDialog")&&this.gameEngine.clearTarget()}uiSetTitleAndContent(e,t,i){this.uiSetTitle(e,t),this.uiSetContent(e,t,i)}uiSetTitle(e,t){let i=c.get(t,"title",!1);if(!1===i)return!1;let n=e.getChildByProperty("className","box-title");if(!n)return!1;n.innerHTML=i}uiSetContent(e,t,i){let n=c.get(t,"content",!1);if(!1===n)return!1;let r=e.getChildByProperty("className","box-content");if(!r)return!1;r.innerHTML=n,this.uiSetContentOptions(i,t,r)}uiSetContentOptions(e,t,i){if(!t.options)return!1;let n=e.cache.html.get("uiOptionsContainer"),r=this.gameManager.gameEngine.parseTemplate(n,{id:"ui-"+t.id});i.innerHTML+=r;let s=Object.keys(t.options);if(0===s.length)return!1;for(let i of s){let{label:n,value:r,icon:s}=t.options[i],o=s?"Icon":"Button",h=e.cache.html.get("uiOption"+o),l={id:i,object_id:t.id,label:n,value:r,icon:"/assets/custom/items/"+s+a.FILES.EXTENSIONS.PNG},u=this.gameManager.gameEngine.parseTemplate(h,l);this.gameManager.gameDom.appendToElement("#ui-"+t.id,u);let d="#opt-"+i+"-"+t.id;this.gameManager.gameDom.getElement(d)?.addEventListener("click",e=>{let i={id:t.id,act:a.BUTTON_OPTION,value:e.target.getAttribute("data-option-value")};Object.assign(i,c.get(t,"overrideSendOptions",{})),this.send(i)})}}async startEngineScene(e,t,i=!1){await this.events.emit("reldens.startEngineScene",this,e,t,i);let n=!1;this.gameEngine.uiScene||(n=!0);let r=a.SCENE_PRELOADER+this.sceneData.roomName;this.gameEngine.scene.getScene(r)?await this.createEngineOnScene(r,e,t,i):await this.createPreloaderAndScene(r,n,e,t,i)}async createEngineOnScene(e,t,i,n){this.getActiveScene().objectsAnimationsData=this.sceneData.objectsAnimationsData,this.scenePreloader=this.gameEngine.scene.getScene(e),await this.events.emit("reldens.createdPreloaderRecurring",this,this.scenePreloader),await this.createEngineScene(t,i,n)}async createPreloaderAndScene(e,t,i,n,r){this.scenePreloader=this.createPreloaderInstance({name:e,map:this.sceneData.roomMap,images:this.sceneData.sceneImages,uiScene:t,gameManager:this.gameManager,preloadAssets:this.sceneData.preloadAssets,objectsAnimationsData:this.sceneData.objectsAnimationsData}),this.gameEngine.scene.add(e,this.scenePreloader,!0),await this.events.emit("reldens.createdPreloaderInstance",this,this.scenePreloader);let s=this.gameEngine.scene.getScene(e);s.load.on("complete",async()=>{this.gameEngine.uiScene||(this.gameEngine.uiScene=s,this.showPlayerName(this.gameManager.playerData.id+" - "+this.gameManager.playerData.name)),await this.createEngineScene(i,n,r)})}showPlayerName(e){let t=this.gameManager.getUiElement("playerBox");if(!t)return!1;let i=t.getChildByProperty("className","player-name");if(!i)return!1;i.innerHTML=e}async createEngineScene(e,t,i){let n=this.gameEngine.scene.getScene(i);n&&n.scene.setVisible(!1),await this.events.emit("reldens.createEngineScene",e,t,i,this),this.gameManager.room?await this.destroyPreviousScene(i,e):this.gameEngine.scene.start(e.state.scene),this.gameManager.room=t;let r=this.gameEngine.scene.getScene(e.state.scene);r.player=this.createPlayerEngineInstance(r,e,this.gameManager,t),r.player.create(),this.addExistentPlayers(t,r),this.updateSceneLabel(this.sceneData.roomTitle),this.send({act:a.PLAYER_STATS}),this.send({act:a.CLIENT_JOINED});let s={player:r.player,previousScene:i,roomEvents:this};await this.events.emit("reldens.playersOnAddReady",s);let o={currentScene:r,previousScene:i,roomEvents:this};return await this.events.emit("reldens.createEngineSceneDone",o),o}addExistentPlayers(e,t){if(0===this.playersCountFromState(e))return!1;for(let i of this.playersKeysFromState(e)){let n=this.playerBySessionIdFromState(e,i);if(!n.sessionId||n.sessionId===e.sessionId)continue;let r={x:n.state.x,y:n.state.y,dir:n.state.dir,playerName:n.playerName,playedTime:n.playedTime,avatarKey:n.avatarKey,player_id:n.player_id};t.player.addPlayer(n.sessionId,r)}}playerBySessionIdFromState(e,t){return e.state.players.get(t)}playersCountFromState(e){return e.state.players.size}playersKeysFromState(e){return Array.from(e.state.players.keys())}async destroyPreviousScene(e,t){if(!e)return h.warning("Missing previous scene data.",e),!1;let i=this.gameEngine.scene.getScene(e);if(!i)return h.warning("Missing previous scene instance.",i),!1;await i.changeScene(),this.gameEngine.scene.stop(e),this.gameEngine.scene.start(t.state.scene)}updateSceneLabel(e){let t=this.gameManager.getUiElement("sceneLabel");if(!t)return!1;let i=t.getChildByProperty("className","scene-label");if(!i)return!1;i.innerHTML=e}getActiveScene(){return this.gameEngine.scene.getScene(this.roomName)}createSceneInstance(e,t,i){return new r(e,t,i)}createPlayerEngineInstance(e,t,i,r){return new n({scene:e,playerData:t,gameManager:i,room:r,roomEvents:this})}createPreloaderInstance(e){return new s(e)}send(e,t){try{return(this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSED||this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSING)&&o.error("Connection lost."),t||(t="*"),this.room.send(t,e),!0}catch(t){h.critical(t.message,e)}this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.connectionLost"))}}},{ad34e884dd74ab75:"3GkIQ","8c3cc377813bccbe":"6Vn5m",eb7c0f886bf8e7c7:"45YPY",dd0538535f6f136a:"93TbC","2b2fa27d8710e574":"3lwy5"}],"3GkIQ":[function(e,t,i){let{SpriteTextFactory:n}=e("94c0b713770985e9"),{GameConst:r}=e("c99c71c42a9e0f59"),{ActionsConst:s}=e("51d102aa478bf778"),{Logger:a,sc:o}=e("369ffb9744f96759");t.exports.PlayerEngine=class{constructor(e){let{scene:t,playerData:i,gameManager:n,room:r,roomEvents:s}=e;this.scene=t,this.config=n.config,this.gameManager=n,this.events=n.events,this.playerName=i.playerName,this.avatarKey=i.avatarKey,this.roomName=i.state.scene,this.state=i.state,this.room=r,this.roomEvents=s,this.playerId=r.sessionId,this.player_id=i.player_id,this.players={},this.playedTime=i.playedTime,this.mov=!1,this.dir=!1,this.currentTarget=!1,this.pointsValidator=!1,this.animationBasedOnPress=this.config.get("client/players/animations/basedOnPress"),this.topOff=this.config.get("client/players/size/topOffset"),this.leftOff=this.config.get("client/players/size/leftOffset"),this.collideWorldBounds=this.config.get("client/players/animations/collideWorldBounds"),this.fadeDuration=Number(this.config.get("client/players/animations/fadeDuration")),this.cameraRoundPixels=!!this.config.getWithoutLogs("client/general/engine/cameraRoundPixels",!0),this.cameraInterpolationX=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationX",.02)),this.cameraInterpolationY=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationY",.02)),this.globalConfigNameText=this.config.get("client/ui/players/nameText"),this.globalConfigShowNames=!!this.config.get("client/ui/players/showNames"),this.globalConfigShowNamesLimit=this.config.getWithoutLogs("client/ui/players/showNamesLimit",10),this.defaultActionKeyConfig=this.config.get("client/ui/controls/defaultActionKey"),this.highlightOnOver=!!this.config.getWithoutLogs("client/ui/players/highlightOnOver",!0),this.highlightColor=this.config.getWithoutLogs("client/ui/players/highlightColor","0x00ff00"),this.lastKeyState={}}create(){let e={x:this.state.x,y:this.state.y,dir:this.state.dir,playerName:this.playerName,avatarKey:this.avatarKey,playedTime:this.playedTime,player_id:this.player_id};this.addPlayer(this.playerId,e),this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.scene.setVisible(!0,this.roomName),this.scene.cameras.main.fadeFrom(this.fadeDuration),this.scene.physics.world.fixedStep=!1,this.scene.physics.world.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setIsSceneCamera(!0),this.scene.cameras.main.on("camerafadeincomplete",()=>{this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.cameras.main.setLerp(this.cameraInterpolationX,this.cameraInterpolationY),this.scene.cameras.main.setRoundPixels(this.cameraRoundPixels)})}addPlayer(e,t){if(o.hasOwn(this.players,e))return this.players[e];let{x:i,y:n,dir:r,playerName:s,avatarKey:a,playedTime:h,player_id:c}=t,l=this.gameManager.mappedAvatars[a];return this.players[e]=this.scene.physics.add.sprite(i,n-this.topOff,l),this.players[e].playerName=s,this.players[e].playedTime=h,this.players[e].avatarKey=a,this.players[e].playerId=e,this.players[e].player_id=c,this.players[e].anims.play(l+"_"+r),this.players[e].anims.stop(),this.showPlayerName(e),this.makePlayerInteractive(e),this.players[e].moveSprites={},this.players[e].setDepth(this.players[e].y+this.players[e].body.height),this.players[e].setCollideWorldBounds(this.collideWorldBounds),this.events.emitSync("reldens.playerEngineAddPlayer",this,e,t),this.players[e]}makePlayerInteractive(e){this.players[e].setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(r.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;this.setTargetPlayerById(e)}),this.highlightOnOver&&(this.players[e].on("pointerover",()=>{this.players[e].setTint(this.highlightColor)}),this.players[e].on("pointerout",()=>{this.players[e].clearTint()}))}setTargetPlayerById(e){if(!o.get(this.players,e,!1))return a.info('Target player ID "'+e+'" was not found.'),this.gameManager.gameEngine.clearTarget(),!1;let t=Object.assign({},this.currentTarget);this.currentTarget={id:e,type:r.TYPE_PLAYER,player_id:this.players[e].player_id},this.gameManager.gameEngine.showTarget(this.players[e].playerName,this.currentTarget,t)}showPlayerName(e){if(!this.globalConfigShowNames)return!1;if(!this.players[e])return a.critical('Player ID "'+e+'" not found.',this.players),!1;let t=this.players[e].playerName;if(!t)return a.critical('Player name not found on player ID "'+e+'".',this.players[e]),!1;n.attachTextToSprite(this.players[e],this.applyNameLengthLimit(t),this.globalConfigNameText,this.topOff,"nameSprite",this.scene)}applyNameLengthLimit(e){return 0this.globalConfigShowNamesLimit&&(e=e.slice(0,this.globalConfigShowNamesLimit)+"..."),e}updatePlayer(e,t){let i=this.players[e];if(!i){a.error("PlayerSprite not defined.",this.players,e);return}if(a.debug('Updating player ID "'+e+'". - Current player ID "'+this.player_id+'".'),this.scene.clientInterpolation){this.scene.interpolatePlayersPosition[e]=t.state;return}this.processPlayerPositionAnimationUpdate(i,t.state,e,t.state.x-this.leftOff,t.state.y-this.topOff)}processPlayerPositionAnimationUpdate(e,t,i,n=0,s=0){if(a.debug("Process player position animation update.",{playerSprite:e,playerState:t,playerId:i,newX:n,newY:s}),!e){a.error("Missing player sprite to process animation update.",e,t,i);return}if(!t){a.error("Missing player state to process animation update.",e,t,i);return}if(!i){a.error("Missing player ID to process animation update.",e,t,i);return}if(0!==Object.keys(this.scene.interpolatePlayersPosition).length){if(r.STATUS.DEATH===t.inState||r.STATUS.DISABLED===t.inState){delete this.scene.interpolatePlayersPosition[i];return}this.playPlayerAnimation(e,t,i),this.stopPlayerAnimation(e,t),this.updateSpritePosition(e,n,s),this.updatePlayerState(e,t,i)}}updatePlayerState(e,t,i){let n=e.y+e.body.height;e.depth!==n&&e.setDepth(n),this.events.emitSync("reldens.runPlayerAnimation",this,i,t,e),this.updateNamePosition(e),this.moveAttachedSprites(e,n)}updateSpritePosition(e,t,i){e.x!==t&&(e.x=t),e.y!==i&&(e.y=i)}updateNamePosition(e){if(!this.globalConfigShowNames||!e.nameSprite)return!1;let t=n.getTextPosition(e,this.applyNameLengthLimit(e.playerName),this.globalConfigNameText,this.topOff);e.nameSprite.x=t.x,e.nameSprite.y=t.y}moveAttachedSprites(e,t){let i=Object.keys(e.moveSprites);if(0===i.length)return!1;for(let n of i){let i=e.moveSprites[n];if(i.x===e.x&&i.y===e.y)continue;i.x=e.x,i.y=e.y;let r=t+("above"===o.get(i,"depthByPlayer","")?1:-.1);a.debug('Sprite "'+n+'" new depth: '+r+".",i),i.setDepth(r)}}playPlayerAnimation(e,t,i){if(this.isDeath(t)||this.isDisabled(t))return a.debug('Player with ID "'+i+'" is disabled to play the animation.',t),!1;a.debug("Play player animation.",e.avatarKey,t);let n=this.gameManager.mappedAvatars[e.avatarKey];if(this.animationBasedOnPress){let i=n+"_"+t.dir;return t.x===e.x&&t.y===e.y?(a.debug('Player has not changed, skipped animation "'+i+'".'),!1):(a.debug("Animation played based on press active.",n,{x:t.x+" / "+e.x,y:t.y+" / "+e.y}),void e.anims.play(i,!0))}if(t.x!==e.x){let i=t.x{this.transition=!1,this.gameManager.gameDom.activeElement().blur(),this.minimap.createMap(this,this.gameManager.getCurrentPlayerAnimation()),this.gameManager.isChangingScene=!1}),this.eventsManager.emitSync("reldens.afterSceneDynamicCreate",this)}update(e,t){this.interpolatePositions(),this.movePlayerByPressedButtons()}disableContextMenu(){if(!this.gameManager.config.get("client/ui/controls/disableContextMenu"))return!1;this.gameManager.gameDom.getDocument().addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()})}setupKeyboardAndPointerEvents(){this.input.keyboard.on("keydown",e=>this.executeKeyDownBehavior(e)),this.input.keyboard.on("keyup",e=>{this.executeKeyUpBehavior(e)}),this.input.on("pointerdown",(e,t)=>this.executePointerDownAction(e,t))}async createSceneMap(){for(let e of(this.map=this.make.tilemap({key:this.params.roomName}),this.params.sceneImages)){let t=this.map.addTilesetImage(this.params.roomName,e);t||c.critical("Tileset creation error. Check if the tileset name equals the imageKey without the extension.",{roomName:this.params.roomName,imageKeys:this.params.sceneImages,createdTileset:t}),this.tilesets.push(t)}this.registerLayers(),this.registerTilesetAnimation()}registerTilesetAnimation(){for(let e of this.tilesets)if(this.hasTilesetAnimations(e))for(let t of(this.useTsAnimation=!0,Object.keys(this.layers))){let i=this.layers[t],n=new s;n.register(i,e),n.start(),this.tilesetAnimations.push(n)}}hasTilesetAnimations(e){let t=e?.tileData||{},i=Object.keys(t);if(0===i.length)return!1;for(let e of i)if(t[e].animation)return!0;return!1}executeKeyDownBehavior(e){if(this.gameManager.gameDom.insideInput())return!1;if(r.Keyboard.KeyCodes.SPACE===e.keyCode&&!this.gameManager.gameDom.insideInput()){if(!this.player)return;this.player.runActions()}r.Keyboard.KeyCodes.ESC===e.keyCode&&this.gameManager.gameEngine.clearTarget(),r.Keyboard.KeyCodes.F5===e.keyCode&&(this.gameManager.forcedDisconnection=!0)}executeKeyUpBehavior(e){this.player&&-1!==this.availableControllersKeyCodes().indexOf(e.keyCode)&&this.player.stop()}createControllerKeys(){this.keyLeft=this.input.keyboard.addKey(r.Keyboard.KeyCodes.LEFT),this.keyA=this.input.keyboard.addKey(r.Keyboard.KeyCodes.A),this.keyRight=this.input.keyboard.addKey(r.Keyboard.KeyCodes.RIGHT),this.keyD=this.input.keyboard.addKey(r.Keyboard.KeyCodes.D),this.keyUp=this.input.keyboard.addKey(r.Keyboard.KeyCodes.UP),this.keyW=this.input.keyboard.addKey(r.Keyboard.KeyCodes.W),this.keyDown=this.input.keyboard.addKey(r.Keyboard.KeyCodes.DOWN),this.keyS=this.input.keyboard.addKey(r.Keyboard.KeyCodes.S);let e=this.availableControllersKeyCodes();for(let t of this.gameManager.gameDom.getElements("input"))this.addAndRemoveCapture(e,t)}addAndRemoveCapture(e,t){this.loopKeysAddListenerToElement(e,t,"focusin","removeCapture"),this.loopKeysAddListenerToElement(e,t,"click","removeCapture"),this.loopKeysAddListenerToElement(e,t,"focusout","addCapture"),this.loopKeysAddListenerToElement(e,t,"blur","addCapture")}availableControllersKeyCodes(){return[r.Keyboard.KeyCodes.LEFT,r.Keyboard.KeyCodes.A,r.Keyboard.KeyCodes.RIGHT,r.Keyboard.KeyCodes.D,r.Keyboard.KeyCodes.UP,r.Keyboard.KeyCodes.W,r.Keyboard.KeyCodes.DOWN,r.Keyboard.KeyCodes.S]}executePointerDownAction(e,t){if(0{u.destroy()}})}updatePointerObject(e){if(!this.configManager.get("client/ui/pointer/show"))return;this.arrowSprite&&this.arrowSprite.destroy();let t=this.configManager.get("client/ui/pointer/topOffSet",16);this.arrowSprite=this.physics.add.sprite(e.worldX,e.worldY-t,o.ARROW_DOWN),this.arrowSprite.setDepth(5e5),this.arrowSprite.anims.play(o.ARROW_DOWN,!0).on("animationcomplete",()=>{this.arrowSprite.destroy()})}getAnimationByKey(e){return this.anims&&this.anims?.anims&&this.anims?.anims?.entries?l.get(this.anims.anims.entries,e,!1):(c.error("Animations not loaded.",this.anims),!1)}getObjectFromExtraData(e,t,i){let n=!1,r=e+"K",s=t[e+"T"]===h.DATA_TYPE_VALUE_PLAYER;return!s&&l.hasOwn(this.objectsAnimations,t[r])&&(n=this.objectsAnimations[t[r]]),s&&l.hasOwn(i.players,t[r])&&(n=i.players[t[r]]),n}loopKeysAddListenerToElement(e,t,i,n){t.addEventListener(i,()=>{for(let t of e)this.input.keyboard[n](t)})}}},{c5f254ffb1f1868:"8S6DV","648aa76284c65b04":"4prPd","3e4f1f0221386850":"1LEsD","43a627027f5eb0e5":"93TbC",f368cde667056257:"59VA7","1c07ccf976c90508":"3lwy5"}],"4prPd":[function(e,t,i){t.exports.TileSetAnimation=class{constructor(e){this.timer=e?.timer}register(e,t){for(let i of(this.animations=[],this.registered={},this.layer=e,this.tileset=t,Object.keys(t.tileData))){let e=t.tileData[i];if(!e.animation)continue;e.id=i;let n=0;for(let t of e.animation){if(Number(i)===Number(t?.tileid||0)){e.initIndex=n;break}n++}this.animations.push(e)}}start(){for(let e of this.animations){let t=e.animation.length,i=Number(e.initIndex||0),n=Number((i+1)%t);this.repeat(e,i,n)}}repeat(e,t,i){let n=e.id;this.registered[n]&&(this.registered[n]=null);let r=e.animation,s=r.length,a=Number(this.tileset.firstgid),o=Number(e.animation[t].tileid)+a,h=Number(e.animation[i].tileid)+a;this.layer.replaceByIndex(o,h);let c=r[i].duration,l=Number((i+1)%s);this.registered[n]=this.setTimeout(this.repeat.bind(this,e,Number(i),l),c)}destroy(){for(let e of Object.keys(this.registered))this.registered[e]&&this.clearTimeout(this.registered[e])}setTimeout(e,t){return this.timer?this.timer.setTimeout(e,t):setTimeout(e,t)}clearTimeout(e){if(this.timer)return this.timer.clearTimeout(e);clearTimeout(e)}}},{}],"1LEsD":[function(e,t,i){let{sc:n}=e("786a4b1c3c76b965");t.exports.Minimap=class{constructor(e){this.config=e.config,this.events=e.events}createMap(e,t){this.minimapCamera=!1,this.circle=!1,this.scope=!1,this.awaitOnCamera=n.get(this.config,"awaitOnCamera",400),this.autoWidth=e.map.widthInPixels/n.get(this.config,"mapWidthDivisor",1),this.camWidth=n.get(this.config,"fixedWidth",this.autoWidth),this.autoHeight=e.map.heightInPixels/n.get(this.config,"mapHeightDivisor",1),this.camHeight=n.get(this.config,"fixedHeight",this.autoHeight),this.camX=n.get(this.config,"camX",0),this.camY=n.get(this.config,"camY",0),this.camBackgroundColor=n.get(this.config,"camBackgroundColor","rgba(0,0,0,0.6)"),this.camZoom=n.get(this.config,"camZoom",.15),this.roundMap=n.get(this.config,"roundMap",!1),this.addCircle=n.get(this.config,"addCircle",!1),this.createMinimapCamera(e,t),this.createRoundMap(e),this.events.emitSync("reldens.createdMinimap",this)}createMinimapCamera(e,t){this.minimapCamera=e.cameras.add(this.camX,this.camY,this.camWidth,this.camHeight).setName("minimap").setBackgroundColor(this.camBackgroundColor).setZoom(this.camZoom).startFollow(t,n.get(this.config,"mapCameraRoundPixels",!0),n.get(this.config,"mapCameraLerpX",1),n.get(this.config,"mapCameraLerpY",1)).setRoundPixels(!0).setVisible(!1).setOrigin(n.get(this.config,"mapCameraOriginX",.18),n.get(this.config,"mapCameraOriginY",.18))}createRoundMap(e){if(!this.roundMap)return!1;this.addCircle&&this.addMinimapCircle(e),this.createRoundCamera(e)}addMinimapCircle(e){let t=e.gameManager.getActiveScenePreloader();this.circle=t.add.circle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35),n.get(this.config,"circleColor","rgb(0,0,0)"),n.get(this.config,"circleAlpha",1)),this.circle.setStrokeStyle(n.get(this.config,"circleStrokeLineWidth",6),n.get(this.config,"circleStrokeColor",0),n.get(this.config,"circleStrokeAlpha",.6)),this.circle.setFillStyle(n.get(this.config,"circleFillColor",1),n.get(this.config,"circleFillAlpha",0)),this.circle.setVisible(!1)}createRoundCamera(e){this.scope=e.add.graphics(),this.scope.fillStyle(0,0).fillCircle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35)),this.minimapCamera.setMask(this.scope.createGeometryMask())}destroyMap(){delete this.minimapCamera,delete this.circle,delete this.scope}}},{"786a4b1c3c76b965":"3lwy5"}],"45YPY":[function(e,t,i){let{Scene:n,Geom:r}=e("df67ed4c812038a9"),{MinimapUi:s}=e("a689b035cfc5756"),{InstructionsUi:a}=e("55a2dd84a2e283e3"),{SettingsUi:o}=e("29c970db688707f2"),{Joystick:h}=e("c747f1452190e301"),{GameConst:c}=e("475d783a521115cd"),{ActionsConst:l}=e("b9b9df6bd8016f7d"),{Logger:u,sc:d}=e("6e32bad98d4c2ac");t.exports.ScenePreloader=class extends n{constructor(e){super({key:e.name}),this.progressBar=null,this.progressCompleteRect=null,this.progressRect=null,this.userInterfaces={},this.preloadMapKey=e.map,this.preloadImages=e.images,this.uiScene=e.uiScene,this.elementsUi={},this.gameManager=e.gameManager,this.eventsManager=e.gameManager.events,this.preloadAssets=e.preloadAssets||{},this.directionalAnimations={},this.objectsAnimations={},this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.gameManager.activeRoomEvents.getActiveScene().objectsAnimationsData=e.objectsAnimationsData,this.playerSpriteSize={frameWidth:this.gameManager.config.get("client/players/size/width",52),frameHeight:this.gameManager.config.get("client/players/size/height",71)},this.useJoystick=this.gameManager.config.getWithoutLogs("client/ui/controls/useJoystick",!1),this.joystick=new h({scenePreloader:this})}preload(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.beforePreload",this,e),this.preloadUiScene(),this.preloadMapJson(),this.preloadMapImages(),this.preloadValidAssets(),this.preloadPlayerDefaultSprite(),this.preloadArrowPointer(),this.load.image(c.ICON_STATS,this.gameManager.config.get("client/general/assets/statsIconPath","/assets/icons/book.png")),this.load.on("fileprogress",this.onFileProgress,this),this.load.on("progress",this.onLoadProgress,this),this.load.on("complete",this.onLoadComplete,this),this.configuredFrameRate=this.gameManager.config.get("client/general/animations/frameRate",10),this.createProgressBar()}preloadMapJson(){this.preloadMapKey&&this.load.tilemapTiledJSON(this.preloadMapKey,"/assets/maps/"+this.preloadMapKey+".json")}preloadArrowPointer(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={frameWidth:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameWidth",32),frameHeight:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameHeight",32)};this.load.spritesheet(c.ARROW_DOWN,this.gameManager.config.get("client/general/assets/arrowDownPath","/assets/sprites/arrow-down.png"),e)}preloadUiScene(){this.uiScene&&(this.eventsManager.emitSync("reldens.beforePreloadUiScene",this),this.gameManager.config.get("client/ui/playerBox/enabled")&&this.load.html("playerBox","/assets/html/ui-player-box.html"),this.gameManager.config.get("client/ui/controls/enabled")&&this.load.html("controls","/assets/html/ui-controls.html"),this.useJoystick&&this.load.html("joystick","/assets/html/ui-joystick.html"),this.gameManager.config.get("client/ui/sceneLabel/enabled")&&this.load.html("sceneLabel","/assets/html/ui-scene-label.html"),this.gameManager.config.get("client/ui/instructions/enabled")&&this.load.html("instructions","/assets/html/ui-instructions.html"),this.gameManager.config.get("client/ui/minimap/enabled")&&this.load.html("minimap","/assets/html/ui-minimap.html"),this.gameManager.config.get("client/ui/settings/enabled")&&(this.load.html("settings","/assets/html/ui-settings.html"),this.load.html("settings-content","/assets/html/ui-settings-content.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadTarget/enabled",!0)&&this.load.html("uiTarget","/assets/html/ui-target.html"),this.gameManager.config.getWithoutLogs("client/ui/preloadOptionsTemplates/enabled",!0)&&(this.load.html("uiOptionButton","/assets/html/ui-option-button.html"),this.load.html("uiOptionIcon","/assets/html/ui-option-icon.html"),this.load.html("uiOptionsContainer","/assets/html/ui-options-container.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadLoading/enabled",!0)&&this.load.html("uiLoading","/assets/html/ui-loading.html"),this.eventsManager.emitSync("reldens.preloadUiScene",this))}preloadMapImages(){if(this.preloadImages)for(let e of this.preloadImages)this.load.image(e,`/assets/maps/${e}`)}preloadValidAssets(){if(!d.isObject(this.preloadAssets)){u.info("None assets available for preload.");return}for(let e of Object.keys(this.preloadAssets)){let t=this.preloadAssets[e];if("spritesheet"!==t.asset_type)continue;let i=d.toJson(t.extra_params);if(!i){u.error("Missing spritesheet params.",t);continue}this.load.spritesheet(t.asset_key,`/assets/custom/sprites/${t.asset_file}`,i)}}create(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.createPreload",this,e),this.uiScene&&this.createUiScene(),this.createPlayerAnimations(d.get(this.gameManager.playerData,"avatarKey",c.IMAGE_PLAYER)),this.createArrowAnimation()}createUiScene(){this.eventsManager.emitSync("reldens.beforeCreateUiScene",this),this.createPlayerBox(),this.createTargetUi(),this.createSceneLabelBox(),this.createControlsBox(),this.createInstructionsBox(),this.createMiniMap(),this.createSettingsUi(),this.eventsManager.emitSync("reldens.createUiScene",this)}createSettingsUi(){let e=this.getUiConfig("settings");e.enabled&&(this.settingsUi=new o,this.settingsUi.createSettings(e,this))}createMiniMap(){let e=this.getUiConfig("minimap");e.enabled&&(this.minimapUi=new s,this.minimapUi.createMinimap(e,this))}createInstructionsBox(){let e=this.getUiConfig("instructions");e.enabled&&(this.instructionsUi=new a,this.instructionsUi.createInstructions(e,this))}createControlsBox(){let e=this.getUiConfig("controls");if(e.enabled)return this.useJoystick?(this.elementsUi.controls=this.createUi("joystick",e),this.joystick.registerJoystickController()):(this.elementsUi.controls=this.createUi("controls",e),this.registerControllers(this.elementsUi.controls))}createUi(e,t){return this.createContent(e,t.uiX,t.uiY)}createContent(e,t,i){return this.add.dom(t,i).createFromCache(e)}createSceneLabelBox(){let e=this.getUiConfig("sceneLabel");e.enabled&&(this.elementsUi.sceneLabel=this.createUi("sceneLabel",e))}createTargetUi(){let e=this.getUiConfig("uiTarget");e.enabled&&(this.uiTarget=this.createUi("uiTarget",e),this.uiTarget.getChildByProperty("className","close-target").addEventListener("click",()=>{this.gameManager.gameEngine.clearTarget()}))}createPlayerBox(){let e=this.getUiConfig("playerBox");if(!e.enabled)return;this.elementsUi.playerBox=this.createUi("playerBox",e);let t=this.elementsUi.playerBox.getChildByProperty("id","logout");t?.addEventListener("click",()=>{this.gameManager.forcedDisconnection=!0,this.gameManager.firebase.isActive&&this.gameManager.firebase.app.auth().signOut(),this.gameManager.gameDom.getWindow().location.reload()})}getUiConfig(e,t,i){let{uiX:n,uiY:r}=this.getUiPosition(e,t,i);return{enabled:this.gameManager.config.getWithoutLogs("client/ui/"+e+"/enabled"),uiX:n,uiY:r}}getUiPosition(e,t,i){""===e&&(e="default");let n=this.gameManager.config.getWithoutLogs("client/ui/"+e,{}),r=d.get(n,"x",0),s=d.get(n,"y",0);if(this.gameManager.config.get("client/ui/screen/responsive")){let e=d.get(n,"responsiveX",!1),a=d.get(n,"responsiveY",!1),o=this.gameManager.gameDom.getElement(".game-container");t||(t=o.offsetWidth),i||(i=o.offsetHeight),r=!1!==e?e*t/100:0,s=!1!==a?a*i/100:0}return{uiX:r,uiY:s}}preloadPlayerDefaultSprite(){let e=this.gameManager.config.get("client/players/animations/fallbackImage","player-base.png");this.load.spritesheet(c.IMAGE_PLAYER,"/assets/custom/sprites/"+e,this.playerSpriteSize)}createPlayerAnimations(e){let t=this.gameManager.config.getWithoutLogs("client/players/animations/"+e+"Frames",this.gameManager.config.get("client/players/animations/defaultFrames"));for(let i of[{k:e+"_"+c.LEFT,img:e,start:t.left.start||3,end:t.left.end||5,repeat:-1,hide:!1},{k:e+"_"+c.RIGHT,img:e,start:t.right.start||6,end:t.right.end||8,repeat:-1,hide:!1},{k:e+"_"+c.UP,img:e,start:t.up.start||9,end:t.up.end||11,repeat:-1,hide:!1},{k:e+"_"+c.DOWN,img:e,start:t.down.start||0,end:t.down.end||2,repeat:-1,hide:!1}])this.createAnimationWith(i);this.eventsManager.emitSync("reldens.createPlayerAnimations",this,e)}createArrowAnimation(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={k:c.ARROW_DOWN,img:c.ARROW_DOWN,start:0,end:2,repeat:3,rate:6};this.createAnimationWith(e)}createAnimationWith(e){if(this.gameManager.createdAnimations[e.k])return;let t={key:e.k,frames:this.anims.generateFrameNumbers(e.img,{start:e.start,end:e.end}),frameRate:d.get(e,"frameRate",this.configuredFrameRate),repeat:e.repeat,hideOnComplete:d.get(e,"hide",!0)};return this.gameManager.createdAnimations[e.k]=this.anims.create(t),this.gameManager.createdAnimations[e.k]}registerControllers(e){this.setupDirButtonInBox(c.UP,e),this.setupDirButtonInBox(c.DOWN,e),this.setupDirButtonInBox(c.LEFT,e),this.setupDirButtonInBox(c.RIGHT,e),this.setupDefaultActionKey(e)}setupDefaultActionKey(e){let t=this.gameManager.config.get("client/ui/controls/defaultActionKey");if(!t)return;let i=this.createActionBox(t);this.gameManager.gameDom.appendToElement(".action-buttons",i),this.setupActionButtonInBox(t,e)}createActionBox(e){let t=this.cache.html.get("actionBox");return this.gameManager.gameEngine.parseTemplate(t,{key:e,actionName:e})}setupDirButtonInBox(e,t){let i=t.getChildByProperty("id",e);i&&this.hold(i,{dir:e})}setupActionButtonInBox(e,t){let i=t.getChildByProperty("id",e);if(i){if(this.gameManager.config.get("client/general/controls/action_button_hold")){this.hold(i,e);return}i?.addEventListener("click",()=>{let t=this.gameManager.activeRoomEvents.getActiveScene(),i={act:l.ACTION,target:t.player.currentTarget,type:e};this.gameManager.activeRoomEvents.send(i)})}}hold(e,t){e.addEventListener("mousedown",i=>{this.startHold(i,e,t)}),e.addEventListener("mouseup",t=>{this.endHold(t,e)}),e.addEventListener("mouseout",t=>{this.endHold(t,e)}),e.addEventListener("touchstart",i=>{this.startHold(i,e,t)}),e.addEventListener("touchend",t=>{this.endHold(t,e)})}startHold(e,t,i){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.add("button-opacity-off");let n=this.gameManager.activeRoomEvents.getActiveScene(),r=i;d.hasOwn(i,"dir")||(r={act:l.ACTION,target:n.player.currentTarget,type:i.type}),this.gameManager.activeRoomEvents.send(r)}endHold(e,t){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.remove("button-opacity-off"),this.gameManager.activeRoomEvents.send({act:c.STOP})}createProgressBar(){if(!this.gameManager.config.getWithoutLogs("client/ui/loading/show",!0))return;let e=r.Rectangle,t=e.Clone(this.cameras.main);this.progressRect=new e(0,0,t.width/2,50),e.CenterOn(this.progressRect,t.centerX,t.centerY),this.progressCompleteRect=r.Rectangle.Clone(this.progressRect),this.progressBar=this.createGraphics();let i=this.cameras.main.width,n=this.cameras.main.height,s=this.gameManager.config.get("client/ui/loading/font"),a=this.gameManager.config.get("client/ui/loading/fontSize"),o=this.gameManager.config.get("client/ui/loading/assetsSize");this.loadingText=this.createText(i/2,n/2-50,"Loading...",{fontFamily:s,fontSize:a}),this.loadingText.setOrigin(.5,.5),this.loadingText.setFill(this.gameManager.config.get("client/ui/loading/loadingColor")),this.percentText=this.createText(i/2,n/2-5,"0%",{fontFamily:s,fontSize:o}),this.percentText.setOrigin(.5,.5),this.percentText.setFill(this.gameManager.config.get("client/ui/loading/percentColor")),this.assetText=this.createText(i/2,n/2+50,"",{fontFamily:s,fontSize:o}),this.assetText.setFill(this.gameManager.config.get("client/ui/loading/assetsColor")),this.assetText.setOrigin(.5,.5)}createText(e,t,i,n){return this.add.text(e,t,i,n)}createGraphics(){return this.add.graphics()}onLoadComplete(){for(let e of this.children.list)e.destroy();this.loadingText.destroy(),this.assetText.destroy(),this.percentText.destroy(),this.scene.shutdown()}onFileProgress(e){this.gameManager.config.get("client/ui/loading/showAssets")&&this.assetText.setText("Loading "+e.key)}onLoadProgress(e){let t=parseInt(100*e)+"%";this.percentText.setText(t),this.progressRect.width=e*this.progressCompleteRect.width,this.progressBar.clear().fillStyle(2236962).fillRectShape(this.progressCompleteRect).fillStyle(16777215).fillRectShape(this.progressRect)}getUiElement(e,t=!0){return d.hasOwn(this.elementsUi,e)?this.elementsUi[e]:(t&&u.error("UI not found.",{uiName:e}),!1)}}},{df67ed4c812038a9:"8S6DV",a689b035cfc5756:"c3rUy","55a2dd84a2e283e3":"d5Xkk","29c970db688707f2":"3lOFf",c747f1452190e301:"qaPo7","475d783a521115cd":"93TbC",b9b9df6bd8016f7d:"59VA7","6e32bad98d4c2ac":"3lwy5"}],c3rUy:[function(e,t,i){let{sc:n}=e("3099c8189d097700");t.exports.MinimapUi=class{createMinimap(e,t){t.elementsUi.minimap=t.add.dom(e.uiX,e.uiY).createFromCache("minimap");let i=t.elementsUi.minimap.getChildByProperty("id","minimap-open"),n=t.elementsUi.minimap.getChildByProperty("id","minimap-close");i?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.remove("hidden"),i.classList.add("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.showMap(r,t,i,n,e)}),n?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.add("hidden"),i&&i.classList.remove("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.hideMap(r,t,n,e)})}showMap(e,t,i,n,r){if(this.awaitForCamera(e)){setTimeout(()=>{this.showMap(e,t,i,n,r)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!0),e.circle&&e.circle.setVisible(!0),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:i,minimap:e,box:r})}hideMap(e,t,i,n){if(this.awaitForCamera(e)){setTimeout(()=>{this.hideMap(e,t,i,n)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!1),e.circle&&e.circle.setVisible(!1),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:i,minimap:e,box:n})}awaitForCamera(e){return 0{r.style.display="block",t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})});let a=t.gameManager.gameDom.getElement("#instructions-close");a?.addEventListener("click",()=>{r.style.display="none",t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})}),t.elementsUi.instructions=i}}},{"5a1cf36c8d3b7e72":"3lwy5"}],"3lOFf":[function(e,t,i){let{Logger:n}=e("203fa7507cacc04f");t.exports.SettingsUi=class{createSettings(e,t){let i=t.add.dom(e.uiX,e.uiY).createFromCache("settings");if(!i)return n.info("Settings dialog box could not be created."),!1;let r=t.cache.html.get("settings-content");if(!r)return n.info("Settings template not found."),!1;t.gameManager.gameDom.appendToElement(".content",r);let s=t.gameManager.gameDom.getElement("#settings-ui");if(!s)return n.info("Settings container not found."),!1;let a=t.gameManager.gameDom.getElement("#settings-close"),o=i.getChildByProperty("id","settings-open");o?.addEventListener("click",()=>{s.style.display="block",o&&(o.style.display="none"),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),a?.addEventListener("click",()=>{s.style.display="none",o&&(o.style.display="block"),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),t.elementsUi.settings=i}}},{"203fa7507cacc04f":"3lwy5"}],qaPo7:[function(e,t,i){let{GameConst:n}=e("88178d0bc5e02e97"),{Logger:r}=e("f4cd4df7f42f9061");t.exports.Joystick=class{constructor(e){this.gameManager=e?.scenePreloader?.gameManager,this.scenePreloader=e?.scenePreloader,this.gameDom=this.gameManager?.gameDom,this.isDragging=!1,this.centerX=!1,this.centerY=!1,this.threshold=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickThreshold",20),this.joystickLeft=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickLeft",25),this.joystickTop=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickTop",25),this.positionSufix="px"}registerJoystickController(){if(!this.gameManager)return r.error("GameManager undefined on Joystick."),!1;this.joystick=this.gameDom.getElement("#joystick"),this.joystickThumb=this.gameDom.getElement("#joystick-thumb"),this.joystickThumb.addEventListener("mousedown",e=>{this.applyMovement(e.clientX,e.clientY)}),this.joystickThumb.addEventListener("touchstart",e=>{e.preventDefault();let t=e.touches?.shift();this.applyMovement(t.clientX,t.clientY)}),this.gameDom.getDocument().addEventListener("mousemove",this.handleMouseMove.bind(this)),this.gameDom.getDocument().addEventListener("mouseup",this.handleStop.bind(this)),this.gameDom.getDocument().addEventListener("touchmove",this.handleTouchMove.bind(this)),this.gameDom.getDocument().addEventListener("touchend",this.handleStop.bind(this))}position(e){return e+this.positionSufix}applyMovement(e,t){this.isDragging=!0;let i=this.joystick.getBoundingClientRect();this.centerX=i.width/2,this.centerY=i.height/2,this.updateThumbPosition(e-i.left,t-i.top)}handleStop(){this.isDragging=!1,this.joystickThumb.style.left=this.position(this.joystickLeft),this.joystickThumb.style.top=this.position(this.joystickTop),this.gameManager.getCurrentPlayer().stop()}updateDirection(e,t){let i=e-this.centerX,r=t-this.centerY,s=n.STOP;if(Math.abs(i)>Math.abs(r)&&Math.abs(i)>this.threshold){for(let e of(s=i>0?Math.abs(r)>this.threshold?r>0?"right-down":"right-up":"right":Math.abs(r)>this.threshold?r>0?"left-down":"left-up":"left").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}if(Math.abs(r)>this.threshold){for(let e of(s=r>0?Math.abs(i)>this.threshold?i>0?"down-right":"down-left":"down":Math.abs(i)>this.threshold?i>0?"up-right":"up-left":"up").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}return this.gameManager.getCurrentPlayer().stop(),s}updateThumbPosition(e,t){let i=e-this.centerX,n=t-this.centerY,r=Math.sqrt(i*i+n*n),s=Math.min(this.centerX,this.centerY);if(r>s){let e=Math.atan2(n,i),t=Math.cos(e)*s+this.centerX-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(t);let r=Math.sin(e)*s+this.centerY-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(r);return}let a=e-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(a);let o=t-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(o)}handleMouseMove(e){if(!this.isDragging)return;let t=this.joystick.getBoundingClientRect(),i=e.clientX-t.left,n=e.clientY-t.top;this.updateThumbPosition(i,n),this.updateDirection(i,n)}handleTouchMove(e){if(!this.isDragging)return;let t=e.touches?.shift(),i=this.joystick.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this.updateThumbPosition(n,r),this.updateDirection(n,r)}}},{"88178d0bc5e02e97":"93TbC",f4cd4df7f42f9061:"3lwy5"}],"401GU":[function(e,t,i){let{RegistrationFormHandler:n}=e("61e9430bb51b7408"),{TermsAndConditionsHandler:r}=e("6e331d321b006ecf"),{LoginFormHandler:s}=e("6146b6a5adb0380b"),{ForgotPasswordFormHandler:a}=e("48bdd5abf515687b"),{GuestFormHandler:o}=e("5b4b95bc89fe7076"),{FullScreenHandler:h}=e("9e3ced5ae6b38dd");t.exports.ClientStartHandler=class{constructor(e){this.gameManager=e}clientStart(){let e=new n(this.gameManager);e.activateRegistration(),new o(this.gameManager).activateGuest();let t=new r(this.gameManager);t.activateTermsAndConditions();let i=new s(this.gameManager);i.activateLogin();let c=new a(this.gameManager);c.activateForgotPassword(),c.displayForgotPassword();let l=new h(this.gameManager);l.activateFullScreen(),this.gameManager.firebase&&this.gameManager.firebase.startFirebase(),Object.assign(this.gameManager.elements,{registrationForm:e,termsAndConditions:t,loginForm:i,forgotPasswordForm:c,fullScreen:l}),this.gameManager.events.emitSync("reldens.clientStartAfter",this)}}},{"61e9430bb51b7408":"gYHC4","6e331d321b006ecf":"ilJrk","6146b6a5adb0380b":"hG35y","48bdd5abf515687b":"jNMHr","5b4b95bc89fe7076":"4jT2q","9e3ced5ae6b38dd":"5GTLr"}],gYHC4:[function(e,t,i){let{ErrorsBlockHandler:n}=e("e090c4bcd3707d9f"),{GameConst:r}=e("e6f38101bdd301e7");t.exports.RegistrationFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.REGISTER_FORM)}activateRegistration(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowRegistration"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS,t=this.gameDom.getElement(e.TERMS.ACCEPT),i=this.gameDom.getElement(e.TERMS.BOX);this.form.addEventListener("submit",n=>{if(n.preventDefault(),!this.form.checkValidity())return!1;let s=this.gameDom.getElement(e.REGISTRATION.PASSWORD).value,a=this.gameDom.getElement(e.REGISTRATION.RE_PASSWORD).value,o=this.form.querySelector(e.RESPONSE_ERROR);if(s!==a&&o)return o.innerHTML="Password and confirmation does not match.",!1;if(!t.checked&&o)return o.innerHTML="Please read and accept the terms and conditions and continue.",!1;i?.classList.add(r.CLASSES.HIDDEN),this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let h={formId:this.form.id,email:this.gameDom.getElement(e.REGISTRATION.EMAIL).value,username:this.gameDom.getElement(e.REGISTRATION.USERNAME).value,password:s,rePassword:a};this.gameManager.startGame(h,!0)})}}},{e090c4bcd3707d9f:"kzsmo",e6f38101bdd301e7:"93TbC"}],kzsmo:[function(e,t,i){let{GameConst:n}=e("32e4ac52cb34a235");t.exports.ErrorsBlockHandler=class{static reset(e){let t=e.querySelector(n.SELECTORS.RESPONSE_ERROR);e.querySelector(n.SELECTORS.INPUT).addEventListener("focus",()=>{t.innerHTML=""})}}},{"32e4ac52cb34a235":"93TbC"}],ilJrk:[function(e,t,i){let{GameConst:n}=e("5e95024018707600"),{Logger:r}=e("b4c60b227487fe12");t.exports.TermsAndConditionsHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.linkContainer=this.gameManager.gameDom.getElement(n.SELECTORS.TERMS.LINK_CONTAINER)}activateTermsAndConditions(){if(!this.linkContainer)return!1;let e=this.gameManager.appServerUrl+n.ROUTE_PATHS.TERMS_AND_CONDITIONS,t=new URL(this.gameDom.getDocument().location).searchParams.get("lang","");""!==t&&(e+="?lang="+t),this.gameDom.getJSON(e,(e,t)=>{if(!t.body||!t.heading||!t.checkboxLabel||!t.link)return!1;if(e)return r.info("Registration error.",e),!1;let i=n.SELECTORS.TERMS;this.gameDom.updateContent(i.HEADING,t.heading),this.gameDom.updateContent(i.BODY,t.body),this.gameDom.updateContent(i.ACCEPT_LABEL,t.checkboxLabel),this.gameDom.updateContent(i.LINK,t.link);let s=this.gameDom.getElement(i.LINK),a=this.gameDom.getElement(i.BOX);s?.addEventListener("click",e=>{e.preventDefault(),a?.classList.remove(n.CLASSES.HIDDEN)}),this.gameDom.getElement(i.CLOSE)?.addEventListener("click",()=>{a?.classList.add(n.CLASSES.HIDDEN)});let o=this.gameDom.getElement(n.SELECTORS.REGISTER_FORM);if(o){let e=this.gameDom.getElement(n.SELECTORS.RESPONSE_ERROR,o),t=this.gameDom.getElement(i.ACCEPT);t.addEventListener("click",()=>{t.checked&&(e.innerHTML="")}),this.gameDom.getElement(i.ACCEPT_LABEL).addEventListener("click",()=>{t.checked&&(e.innerHTML="")})}this.linkContainer?.classList.remove(n.CLASSES.HIDDEN)})}}},{"5e95024018707600":"93TbC",b4c60b227487fe12:"3lwy5"}],hG35y:[function(e,t,i){let{ErrorsBlockHandler:n}=e("d2e27800ca9e6097"),{GameConst:r}=e("9e1bb13aa99be738");t.exports.LoginFormHandler=class{constructor(e){this.gameManager=e,this.form=e.gameDom.getElement(r.SELECTORS.LOGIN_FORM)}activateLogin(){if(!this.form)return!1;n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity()||this.gameManager.submitedForm)return!1;this.gameManager.submitedForm=!0,this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,username:this.form.querySelector(r.SELECTORS.LOGIN.USERNAME).value,password:this.form.querySelector(r.SELECTORS.LOGIN.PASSWORD).value};return this.gameManager.startGame(t,!1)})}}},{d2e27800ca9e6097:"kzsmo","9e1bb13aa99be738":"93TbC"}],jNMHr:[function(e,t,i){let{ErrorsBlockHandler:n}=e("2f903207606daf1a"),{GameConst:r}=e("f41810322298058d");t.exports.ForgotPasswordFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=this.gameManager.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD_FORM)}activateForgotPassword(){return!!this.form&&(this.gameManager.config.get("client/general/users/allowRegistration")?void(n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity())return!1;this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,forgot:!0,email:this.form.querySelector(r.SELECTORS.FORGOT_PASSWORD.EMAIL).value};this.gameManager.startGame(t,!1)})):(this.form.classList.add("hidden"),!0))}displayForgotPassword(){this.gameDom.getJSON(this.gameManager.appServerUrl+r.ROUTE_PATHS.MAILER,(e,t)=>{t.enabled&&this.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD.CONTAINER).classList.remove(r.CLASSES.HIDDEN)})}}},{"2f903207606daf1a":"kzsmo",f41810322298058d:"93TbC"}],"4jT2q":[function(e,t,i){let{ErrorsBlockHandler:n}=e("ed3946e6f3fa9c11"),{GameConst:r}=e("b422c8c562d99fb2"),{sc:s}=e("f241b93688d82620");t.exports.GuestFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.GUEST_FORM)}activateGuest(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowGuest"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS;this.form.addEventListener("submit",t=>{if(t.preventDefault(),!this.form.checkValidity())return!1;this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let i="guest-"+s.randomChars(12),n=this.gameManager.config.getWithoutLogs("client/general/users/allowGuestUserName",!1)?this.gameDom.getElement(e.GUEST.USERNAME).value:i,a={formId:this.form.id,username:n,password:n,rePassword:n,isGuest:!0};this.gameManager.startGame(a,!0)})}}},{ed3946e6f3fa9c11:"kzsmo",b422c8c562d99fb2:"93TbC",f241b93688d82620:"3lwy5"}],"5GTLr":[function(e,t,i){let{GameConst:n}=e("9cf3053a062e3fe1");t.exports.FullScreenHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.body=this.gameDom.getElement(n.SELECTORS.BODY)}activateFullScreen(){this.gameDom.getElement(n.SELECTORS.FULL_SCREEN_BUTTON)?.addEventListener("click",e=>{if(e.preventDefault(),!this.gameDom.getDocument().fullscreenEnabled)return!1;this.body.requestFullscreen(),this.goFullScreen()}),this.gameDom.getWindow().matchMedia("(display-mode: fullscreen)").addEventListener("change",({matches:e})=>{if(e){this.goFullScreen();return}this.exitFullScreen()})}goFullScreen(){this.body.classList.add(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}exitFullScreen(){this.body.classList.remove(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}}},{"9cf3053a062e3fe1":"93TbC"}],"3ZqP5":[function(e,t,i){let{ClientCoreFeatures:n}=e("8ee8ee6c25b82d8c"),{Logger:r,sc:s}=e("5806e45b7c7c3fa8");t.exports.FeaturesManager=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.events=s.get(e,"events",!1)}async loadFeatures(e){if(!this.gameManager)return r.error("Game Manager undefined in FeaturesManager."),!1;if(!this.events)return r.error("EventsManager undefined in FeaturesManager."),!1;this.featuresList={},await this.events.emit("reldens.loadFeatures",this,e);let t=Object.keys(e);if(0===t.length)return this.featuresList;for(let i of t){let t=e[i];s.hasOwn(n,t)&&(this.featuresList[t]=new n[t],"function"==typeof this.featuresList[t].setup&&await this.featuresList[t].setup({gameManager:this.gameManager,events:this.events}),await this.events.emit("reldens.loadFeature_"+t,this.featuresList[t],this))}return this.featuresList}}},{"8ee8ee6c25b82d8c":"2BcLh","5806e45b7c7c3fa8":"3lwy5"}],"2BcLh":[function(e,t,i){let{ChatPlugin:n}=e("949b1921d3bf5140"),{ObjectsPlugin:r}=e("aa8995112e7d6bdb"),{InventoryPlugin:s}=e("d9ef351011c1851b"),{ActionsPlugin:a}=e("408c84b7d592f2b6"),{UsersPlugin:o}=e("12e36b841f0da63e"),{AudioPlugin:h}=e("3fd885750ac6ac6b"),{RoomsPlugin:c}=e("f2563b87854d4a6e"),{PredictionPlugin:l}=e("282babf537556f44"),{TeamsPlugin:u}=e("d0d5a23fa0219ef6"),{SnippetsPlugin:d}=e("ffba7e1c5e50a8a7"),{AdsPlugin:f}=e("d50aaab7df227399"),{WorldPlugin:p}=e("c63ee71351943ae1"),{ScoresPlugin:g}=e("e1d7ab421b11cea0"),{RewardsPlugin:m}=e("bd8f677aa060e20b");t.exports.ClientCoreFeatures={chat:n,objects:r,inventory:s,actions:a,users:o,audio:h,rooms:c,prediction:l,teams:u,snippets:d,ads:f,world:p,scores:g,rewards:m}},{"949b1921d3bf5140":"1pwR6",aa8995112e7d6bdb:"88wg5",d9ef351011c1851b:"83Jlt","408c84b7d592f2b6":"enPaX","12e36b841f0da63e":"1nDQd","3fd885750ac6ac6b":"jRcE9",f2563b87854d4a6e:"3yQhR","282babf537556f44":"80hlx",d0d5a23fa0219ef6:"8MUNa",ffba7e1c5e50a8a7:"tkJox",d50aaab7df227399:"aNIyr",c63ee71351943ae1:"79nNs",e1d7ab421b11cea0:"jv1vT",bd8f677aa060e20b:"4p1ha"}],"1pwR6":[function(e,t,i){let{ChatUi:n}=e("994be9db4994f9a3"),{MessagesListener:r}=e("b6a36cbfb0da5dfe"),{TemplatesHandler:s}=e("deb4c2146b2d1712"),a=e("267812d6128a4b8e"),{TranslationsMapper:o}=e("5e30eadde21dcf94"),{PluginInterface:h}=e("8d1c7a15abb408a"),{ChatConst:c}=e("fe17ff5717202a3b"),{Logger:l,sc:u}=e("ef3698ca9cea9d5");t.exports.ChatPlugin=class extends h{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in ActionsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in ChatPlugin."),this.messagesQueu=[],this.uiManager=!1,this.joinRooms=[c.CHAT_GLOBAL],this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.joinedRoom",async e=>{await r.listenMessages(e,this)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e,this.gameManager.config.get("client/ui/chat/showTabs"))}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi(),this.uiManager.createTabs(),this.uiManager.processMessagesQueue(this.messagesQueu)})}}},{"994be9db4994f9a3":"eLO7b",b6a36cbfb0da5dfe:"lJUIi",deb4c2146b2d1712:"fgdaI","267812d6128a4b8e":"daHmu","5e30eadde21dcf94":"1fcQw","8d1c7a15abb408a":"fC3To",fe17ff5717202a3b:"dUuh0",ef3698ca9cea9d5:"3lwy5"}],eLO7b:[function(e,t,i){let{Input:n}=e("97d93bd9735e7bfb"),{SpriteTextFactory:r}=e("19814f11619c8dd"),{ChatTabs:s}=e("2429a93c399ce990"),{ChatConst:a}=e("644250816f608ee2"),{Logger:o,sc:h}=e("1eb163b9249e21a9");t.exports.ChatUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene?.gameManager,this.gameDom=this.uiScene?.gameManager?.gameDom,this.setChatTypes(),this.setChatConfiguration(),this.uiChat={},this.messagesQueu=[],this.chatInput=!1,this.chatSendButton=!1,this.chatCloseButton=!1,this.chatOpenButton=!1}setChatConfiguration(){if(!this.gameManager||!this.gameManager.config)return!1;this.uiConfig=this.gameManager.config.get("client/ui/chat"),this.overheadChat=h.get(this.uiConfig,"overheadChat",{}),this.overHeadChatEnabled=h.get(this.overheadChat,"enabled",!1),this.overheadText=h.get(this.uiConfig,"overheadText",{}),this.isDefaultOpen=h.get(this.uiConfig,"defaultOpen",!1),this.isTyping=h.get(this.overheadChat,"isTyping",!1),this.showTabs=h.get(this.uiConfig,"showTabs",!1),this.closeChatBoxAfterSend=h.get(this.closeChatBoxAfterSend,"isTyping",!1),this.messagesConfig=this.gameManager.config.get("client/chat/messages"),this.characterLimit=h.get(this.messagesConfig,"characterLimit",0),this.characterLimitOverhead=h.get(this.messagesConfig,"characterLimitOverhead",0),this.appendErrorTypeOnActiveTab=h.get(this.messagesConfig,"appendErrorTypeOnActiveTab",!0)}setChatTypes(){if(!this.gameManager)return o.warning("Missing GameManager on ChatUI."),!1;if(!this.gameDom)return o.warning("Missing GameDom on ChatUI."),!1;if(!this.gameManager.initialGameData)return o.warning('Missing "initialGameData" on ChatUI.'),!1;if(this.chatTypes=h.get(this.gameManager.initialGameData,"chatTypes",[]),0===this.chatTypes.length)return!1;for(let e of(this.chatTypesById={},this.chatTypes))this.chatTypesById[e.id]=e}createUi(){if(!this.uiScene)return o.warning("Missing UI Scene on ChatUI."),!1;let{uiX:e,uiY:t}=this.uiScene.getUiConfig("chat");if(this.uiChat=this.uiScene.add.dom(e,t).createFromCache("chat"),this.uiScene.elementsUi.chat=this.uiChat,this.chatInput=this.uiChat.getChildByProperty("id",a.CHAT_INPUT),!this.chatInput)return o.info("Missing chat input on ChatUI."),!1;this.setupKeyPressBehaviors(),this.chatInput.addEventListener("onfocusout",()=>{this.hideIsTyping()}),this.setupSendButton(),this.setupOpenCloseButtons(),this.overHeadChatEnabled&&this.setupOverheadChatEvents(),this.isDefaultOpen&&this.showChatBox()}createTabs(){return!!this.showTabs&&(this.tabs=new s(this.gameManager,this.uiScene),!0)}setupOverheadChatEvents(){this.gameManager.events.on("reldens.runPlayerAnimation",(e,t,i,n)=>{this.updateOverheadTextPosition(n)})}setupOpenCloseButtons(){this.chatOpenButton=this.uiChat.getChildByProperty("id",a.CHAT_OPEN_BUTTON),this.chatOpenButton?.addEventListener("click",()=>{this.showChatBox(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})}),this.chatCloseButton=this.uiChat.getChildByProperty("id",a.CHAT_CLOSE_BUTTON),this.chatCloseButton?.addEventListener("click",()=>{this.hideChatBox(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:this.chatCloseButton,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})})}setupSendButton(){this.chatSendButton=this.uiChat.getChildByProperty("id",a.CHAT_SEND_BUTTON),this.chatSendButton?.addEventListener("click",e=>{e.preventDefault(),this.sendChatMessage(this.chatInput,this.gameManager.activeRoomEvents),this.chatInput.focus()})}setupKeyPressBehaviors(){this.uiScene.input.keyboard.on("keyup-ENTER",()=>{this.isFocussedOnChatInput()||(this.showChatBox(),this.chatInput.focus())}),this.chatInput.addEventListener("keyup",e=>{if(e.keyCode===n.Keyboard.KeyCodes.ENTER){e.preventDefault(),this.sendChatMessage();return}this.showIsTyping()})}showOverheadChat(e,t){if(!this.overHeadChatEnabled)return!1;e.overheadTextSprite&&this.destroyTextSprite(e),t=this.applyTextLimit(t,this.characterLimitOverhead),e.overheadTextSprite=r.attachTextToSprite(e,t,this.overheadText,h.get(this.overheadText,"topOff",0),"overheadTextSprite",this.gameManager.getActiveScene());let i=h.get(this.overheadText,"timeOut",!1);i&&setTimeout(()=>{this.destroyTextSprite(e)},i)}updateOverheadTextPosition(e){if(!e.overheadTextSprite)return!1;let t=r.getTextPosition(e,e.playerName,this.overheadText,h.get(this.overheadText,"topOff",0));e.overheadTextSprite.x=t.x,e.overheadTextSprite.y=t.y}destroyTextSprite(e){if(!e.overheadTextSprite)return!1;e.overheadTextSprite.destroy(),delete e.overheadTextSprite}showIsTyping(){if(!this.overHeadChatEnabled||!this.isTyping||!this.isFocussedOnChatInput())return!1;this.showOverheadChat(this.gameManager.getCurrentPlayerAnimation(),this.gameManager.config.getWithoutLogs("client/ui/chat/waitingContent",this.t(a.SNIPPETS.WAITING)))}hideIsTyping(){if(!this.isTyping)return!1;this.destroyTextSprite(this.gameManager.getCurrentPlayerAnimation())}isFocussedOnChatInput(){return this.gameManager.gameDom.activeElement()===this.chatInput}showChatBox(){this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.remove("hidden"),this.uiChat.setDepth(4),this.chatOpenButton?.classList.add("hidden");let e=this.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);e&&(e.parentNode.scrollTop=e.scrollHeight),this.hideNotificationsBalloon()}hideChatBox(){let e=this.uiChat.getChildByProperty("id",a.CHAT_UI);if(!e)return o.info("Chat UI box not found."),!1;e.classList.add("hidden"),this.uiChat.setDepth(1),this.chatOpenButton?.classList.remove("hidden")}showNotificationBalloon(){this.getActiveBalloon()?.classList.remove("hidden")}hideNotificationsBalloon(){this.getActiveBalloon()?.classList.add("hidden")}getActiveBalloon(){if(!h.get(this.uiConfig,"notificationBalloon"))return!1;let e=this.uiChat.getChildByProperty("id",a.CHAT_BALLOON);return!!e&&e}processMessagesQueue(e){if(0===e.length)return!1;for(let t of e)this.attachNewMessage(t)}attachNewMessage(e){if(!this.gameManager.gameEngine.uiScene.cache)return;let t=this.gameManager.gameEngine.uiScene.cache.html.get("chatMessage"),i=this.translateMessage(e),n=this.gameManager.gameEngine.parseTemplate(t,{from:this.translateFrom(e),color:a.TYPE_COLOR[e[a.TYPES.KEY]],message:i}),r=this.showTabs?a.TYPES.MESSAGE:"",s=h.get(e,a.TYPES.KEY,r),c=h.get(this.chatTypesById,s,!1),l=!!(""!==s&&c?.show_tab)&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+s);l&&this.appendWithScroll(l,n);let u=!!c.also_show_in_type&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+c.also_show_in_type);u&&u!==l&&this.appendWithScroll(u,n);let d=""===s&&this.gameManager.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);if(d&&this.appendWithScroll(d,n),this.appendErrorTypeOnActiveTab&&a.TYPES.ERROR===s){let e=this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_ACTIVE);e&&e!==l&&e!==u&&this.appendWithScroll(e,n)}if(!l&&!u&&!d){null===l&&o.warning("Element not found for selector: .tab-content-"+s),null===u&&o.warning("Element not found for selector: .tab-content-"+c.also_show_in_type),o.warning("Chat message not attached to any tab or main panel.",{message:e,defaultType:r,messageType:s,chatType:c,appendToMain:d,appendToTab:l});return}if(e[a.MESSAGE.FROM]&&this.isValidMessageType(e[a.TYPES.KEY])){let t=this.fetchPlayerByName(e[a.MESSAGE.FROM]);t&&this.showOverheadChat(t,i)}this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.contains("hidden")&&this.showNotificationBalloon()}appendWithScroll(e,t){e.innerHTML+=t,e.parentNode.scrollTop=e.scrollHeight}translateFrom(e){let t=e[a.TYPES.KEY],i=e[a.MESSAGE.FROM]||a.TYPES.SYSTEM;return this.isValidSnippetFromType(t)?this.t(a.SNIPPETS.PREFIX+a.TYPES.KEY+t):i}translateMessage(e){let t=e[a.TYPES.KEY];if(!this.isValidSnippetType(t))return e[a.MESSAGE.KEY];let i=e[a.MESSAGE.DATA.KEY];if(!i)return this.t(e[a.MESSAGE.KEY]);if(i[a.MESSAGE.DATA.MODIFIERS]){let t="",n=i[a.MESSAGE.DATA.TARGET_LABEL];for(let r of Object.keys(i[a.MESSAGE.DATA.MODIFIERS])){let s=this.t(r),o=i[a.MESSAGE.DATA.MODIFIERS][r];t+=this.t(e[a.MESSAGE.KEY],{propertyValue:o,propertyLabel:s,targetLabel:n})}return t}return this.t(e[a.MESSAGE.KEY],i)}t(e,t={},i=!1){return this.gameManager.services.translator.t(e,t,i)}isValidMessageType(e){return -1===this.validMessageTypes().indexOf(e)}validMessageTypes(){return[Object.values(a.TYPES)]}isValidSnippetType(e){let t=this.snippetsMessageTypes();for(let i of Object.keys(t))if(t[i]===e)return!0;return!1}snippetsMessageTypes(){let e=Object.assign({},a.TYPES);return delete e[a.TYPES.MESSAGE],delete e[a.TYPES.PRIVATE],delete e[a.TYPES.GLOBAL],delete e[a.TYPES.TEAMS],e}isValidSnippetFromType(e){return -1!==[a.TYPES.SYSTEM,a.TYPES.ERROR].indexOf(e)}fetchPlayerByName(e){let t=this.gameManager.getCurrentPlayer().players,i=Object.keys(t);if(1>=i.length)return!1;for(let n of i){let i=t[n];if(i.playerName===e)return i}}sendChatMessage(){if(!this.isValidMessage())return!1;let e=this.applyTextLimit(this.chatInput.value,this.characterLimit),t={act:a.CHAT_ACTION,m:e};this.gameManager.events.emitSync("reldens.chatMessageObjectCreated",this,t),this.useGlobalRoom()?this.useGlobalRoomForMessage(t):this.gameManager.activeRoomEvents.send(t),this.chatInput.value="",this.closeChatBoxAfterSend&&this.hideChatBox()}applyTextLimit(e,t){return 0{let t=this.gameManager.gameDom.getElement(".tab-label.active");t?.classList.remove("active"),e.target.classList.add("active");let i=this.gameManager.gameDom.getElement(".tab-content.active");i?.classList.remove("active");let n=this.gameManager.gameDom.getElement(".tab-content-"+e.target.dataset.tabId);if(!n)return r.warning("Tab content was not found.",e),!1;n.classList.add("active"),n.parentNode.scrollTop=n.scrollHeight})}}},{a22c3a2311bae153:"dUuh0","6e140e18d42fb249":"3lwy5"}],dUuh0:[function(e,t,i){let n="chat.",r="player.",s={KEY:"ctk",MESSAGE:1,JOINED:2,SYSTEM:3,PRIVATE:4,DAMAGE:5,REWARD:6,SKILL:7,TEAMS:8,GLOBAL:9,ERROR:10};t.exports.ChatConst={ROOM_TYPE_CHAT:"chat",CHAT_ACTION:"c",TYPES:s,CHAT_FROM:"f",CHAT_TO:"t",CHAT_UI:"chat-ui",CHAT_FORM:"chat-form",CHAT_INPUT:"chat-input",CHAT_SEND_BUTTON:"chat-send",CHAT_CLOSE_BUTTON:"chat-close",CHAT_OPEN_BUTTON:"chat-open",CHAT_BALLOON:"notification-balloon",CHAT_GLOBAL:"chat",MESSAGE:{KEY:"m",FROM:"f",TO:"t",DATA:{KEY:"md",SNIPPET:"sp",PLAYER_NAME:"pn",ROOM_NAME:"rn",DAMAGE:"d",TARGET_LABEL:"tL",SKILL_LABEL:"sk",MODIFIERS:"mfs"},DATA_VALUES:{NAMESPACE:"chat",pn:"playerName",rn:"roomName",d:"damage",tL:"targetLabel",sk:"skillLabel",mfs:"modifiers"}},SNIPPETS:{PREFIX:n,PLAYER_PREFIX:r,TAB_PREFIX:"tabs.",NPC_DAMAGE:n+"npcDamage",NPC_DODGED_SKILL:n+"dodgedSkill",MODIFIERS_APPLY:n+"modifiersApply",JOINED_ROOM:n+"joinedRoom",LEFT_ROOM:n+"leftRoom",PRIVATE_MESSAGE_PLAYER_NOT_FOUND:n+"playerNotFound",GLOBAL_MESSAGE_NOT_ALLOWED:n+"globalMessageNotAllowed",GLOBAL_MESSAGE_PERMISSION_DENIED:n+"globalMessagePermissionDenied",PLAYER:{DAMAGE:n+r+"damage",DODGED_SKILL:n+r+"dodgedSkill"},GUEST_INVALID_CHANGE_POINT:n+"guestInvalidChangePoint",WAITING:"..."},SELECTORS:{CONTENTS:"#chat-contents",CHAT_MESSAGES:"#chat-messages",TAB_CONTENT_PREFIX:".tab-content-",TAB_CONTENT_ACTIVE:".tab-content.active"},TYPE_COLOR:{[s.MESSAGE]:"#ffffff",[s.PRIVATE]:"#f39c12",[s.PRIVATE+".to"]:"#00afff",[s.GLOBAL]:"#ffff00",[s.SYSTEM]:"#2ecc71",[s.ERROR]:"#ff0000",[s.DAMAGE]:"#ff0000",[s.SYSTEM+".modifiers"]:"#0feeff",[s.REWARD]:"#2ecc71",[s.TEAMS]:"#2ecc71"}}},{}],lJUIi:[function(e,t,i){let{ChatConst:n}=e("7520fddeb5373b09");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.CHAT_ACTION===e.act){if(!t.uiManager){t.messagesQueu.push(e);return}t.uiManager.attachNewMessage(e)}})}}},{"7520fddeb5373b09":"dUuh0"}],fgdaI:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e,t){let i="/assets/features/chat/templates/";e.load.html("chat",i+"ui-chat.html"),e.load.html("chatMessage",i+"message.html"),t&&(e.load.html("chatTabsContainer",i+"tabs-container.html"),e.load.html("chatTabLabel",i+"tab-label.html"),e.load.html("chatTabContent",i+"tab-content.html"))}}},{}],daHmu:[function(e,t,i){t.exports={chat:{ctk3:"System",ctk10:"System",npcDamage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill",modifiersApply:"%propertyValue %propertyLabel on %targetLabel",joinedRoom:"%playerName has joined %roomName",leftRoom:"%playerName has left",playerNotFound:'Player "%playerName" not found',globalMessagesNotAllowed:"Global messages not allowed",globalMessagePermissionDenied:"Global message permission denied",guestInvalidChangePoint:"The room is not available for guest users.",player:{damage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill"},tabs:{message:"General",joined:"Joined",system:"System",private:"Private",damage:"Damage",reward:"Rewards",skill:"Skills",teams:"Teams",global:"Global",error:"Error"}}}},{}],"1fcQw":[function(e,t,i){let{SnippetsConst:n}=e("f5fe63265b673629"),{sc:r}=e("70ef676150c60a42");t.exports.TranslationsMapper=class{static forConfig(e,t,i=!1,s=n.DEFAULT_LOCALE){e.snippets||(e.snippets={}),e.snippets[s]||(e.snippets[s]={});let a=this.fromObject(t);if(e.snippets[s]=r.deepMergeProperties(a,e.snippets[s]),!i)return;e.snippetsDataValues||(e.snippetsDataValues={});let o=i.NAMESPACE||n.DATA_VALUES_DEFAULT_NAMESPACE;r.deepMergeProperties(e.snippetsDataValues,{[o]:i})}static fromObject(e){let t=Object.keys(e);if(0===t.length)return{};let i={};for(let n of t)this.recursiveMap(n,e[n],i);return i}static recursiveMap(e,t,i){if(!r.isObject(t)){i[e]=t;return}let s=Object.keys(t);if(0!==s.length)for(let r of s)this.recursiveMap(e+n.CONCAT_CHARACTER+r,t[r],i)}}},{f5fe63265b673629:"biSFs","70ef676150c60a42":"3lwy5"}],biSFs:[function(e,t,i){t.exports.SnippetsConst={KEY:"snippets",DEFAULT_LOCALE:"en_US",CONCAT_CHARACTER:".",DATA_VALUES_DEFAULT_NAMESPACE:"default",ACTIONS:{UPDATE:"sn.Up"}}},{}],fC3To:[function(e,t,i){let{Logger:n}=e("956b760a8a542b20");t.exports.PluginInterface=class{async setup(e){n.error("Setup plugin not implemented.",e)}}},{"956b760a8a542b20":"3lwy5"}],"88wg5":[function(e,t,i){let{AnimationEngine:n}=e("2d0db67a357a1df6"),{ObjectsMessageListener:r}=e("79a86c288b721c2b"),{DropsMessageListener:s}=e("deab023d199335c9"),a=e("8cedb0a2567e4f93"),{TranslationsMapper:o}=e("52449bab2a32580c"),{UserInterface:h}=e("52476153d5a162e6"),{ObjectsConst:c}=e("f64071d16effca52"),{ActionsConst:l}=e("bef8aa2a761e6924"),{PluginInterface:u}=e("6bb02e09282ac53"),{GameConst:d}=e("cb715b6f39878bc"),{Logger:f,sc:p}=e("c0cb3eea0cda2e5e");t.exports.ObjectsPlugin=class extends u{setup(e){this.gameManager=p.get(e,"gameManager",!1),this.gameManager||f.error("Game Manager undefined in InventoryPlugin."),this.events=p.get(e,"events",!1),this.events||f.error("EventsManager undefined in InventoryPlugin."),this.bodyOnAddCallBack=!1,this.bodyOnRemoveCallBack=!1,this.bullets={},this.changeBodyVisibilityOnInactiveState=this.gameManager.config.getWithoutLogs("client/objects/animations/changeBodyVisibilityOnInactiveState",!0),this.missingSpritesTimeOut=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesTimeOut",200),this.missingSpritesMaxRetries=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesMaxRetries",5),this.missingSpriteRetry=0,this.listenEvents(),this.setTranslations(),this.setListener()}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.traderObject=new r}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async e=>{await this.prepareObjectsUi(e.gameManager,e.sceneData.objectsAnimationsData,e)}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{await this.createDynamicAnimations(e)}),this.events.on("reldens.joinedRoom",(e,t)=>{this.listenMessages(e,t),s.listenMessages(e,t)})}listenMessages(e,t){if(e.onMessage("*",e=>{this.startObjectAnimation(e,t),this.objectBattleEndAnimation(e,t)}),!e.state||!e.state.bodies)return!1;this.setAddBodyCallback(e,t),this.setRemoveBodyCallback(e)}setAddBodyCallback(e,t){this.bodyOnAddCallBack=e.state.bodies.onAdd((i,n)=>{this.setOnChangeBodyCallback(i,n,e,t),this.createBulletSprite(n,t,i)})}createBulletSprite(e,t,i){if(-1===e.indexOf("bullet"))return!1;let n=t.activeRoomEvents.getActiveScene(),r="default_bullet",s=(i.key?i.key+"_":"")+"bullet";p.hasOwn(t.gameEngine.uiScene.directionalAnimations,s)&&(s=s+"_"+i.dir),p.hasOwn(n.anims.anims.entries,s)&&(r=s);let a=n?.physics?.add?.sprite(i.x,i.y,r);if(!a)return f.warning("Could not create bullet sprite.",n),!1;a.setDepth(11e3),this.bullets[e]=a}setOnChangeBodyCallback(e,t,i,n){let r=Object.keys(e),s=Object.keys(e.state??{});for(let i of r)e.listen(i,async r=>{await this.events.emit("reldens.objectBodyChange",{body:e,key:t,changes:{[i]:r}}),this.updateBodyProperties(i,s,e,r);let a=n.activeRoomEvents.getActiveScene();if(!a)return;let o=-1!==t.indexOf("bullet"),h=o?this.bullets[t]:a?.objectsAnimations[t];this.setVisibility(h,d.STATUS.ACTIVE===e.inState),this.logObjectBodyUpdate(t,i,r,h);let c=d.STATUS.AVOID_INTERPOLATION!==e.inState;if(a?.clientInterpolation&&c){a.interpolateObjectsPositions[t]=e;return}return o?this.updateBulletBodyPosition(t,e):this.updateObjectsAnimations(t,e,a)})}logObjectBodyUpdate(e,t,i,n){let r={key:e,propertyKey:t,newValue:i};("x"===t||"y"===t)&&n&&n[t]&&(r.currentValue=n[t]),f.debug(r)}setVisibility(e,t){e&&e.sceneSprite&&e.sceneSprite.setVisible(t)}updateBodyProperties(e,t,i,n){if("state"===e){for(let e of t)i.state[e]=n[e];return}i[e]=n}updateBulletBodyPosition(e,t){this.bullets[e]&&(this.bullets[e].x=t.x,this.bullets[e].y=t.y,this.events.emit("reldens.objectBodyChanged",{body:t,key:e}))}updateObjectsAnimations(e,t,i){let n=p.get(i.objectsAnimations,e);if(!n)return!1;n.updateObjectAndSpritePositions(t.x,t.y),this.events.emit("reldens.objectBodyChanged",{body:t,key:e});let r=n.updateObjectDepth();n.inState=t.inState;let s=this.fetchAvailableAnimationKey(i,n,t);return""!==s&&n.sceneSprite.anims.play(s,!0),this.moveSpritesObjects(n,t.x,t.y,r),!t.mov&&(n.sceneSprite.anims.stop(),n.sceneSprite.mov=t.mov,!!n.autoStart&&(n.sceneSprite.anims.play(this.determineAutoStartAnimation(n,s)),!0))}determineAutoStartAnimation(e,t){return!0===e.autoStart?e.key:e.autoStart===c.DYNAMIC_ANIMATION?t:e.autoStart}fetchAvailableAnimationKey(e,t,i){return p.getByPriority(e.anims.anims.entries,[t.key+"_"+i.dir,t.layerName+"_"+t.id+"_"+i.dir,t.key])||""}setRemoveBodyCallback(e){this.bodyOnRemoveCallBack=e.state.bodies.onRemove((e,t)=>{if(-1===t.indexOf("bullet")||!p.hasOwn(this.bullets,t))return!1;this.bullets[t].destroy(),delete this.bullets[t]})}objectBattleEndAnimation(e,t){if(e.act!==l.BATTLE_ENDED)return!1;let i=p.get(t.config.client.skills.animations,e.k+"_death","default_death"),n=t.activeRoomEvents.getActiveScene();try{this.playDeathAnimation(i,n,e)}catch(e){f.warning('Error on sprite "'+i+'" not available.',e.message)}if(!p.hasOwn(e,l.DATA_OBJECT_KEY_TARGET))return!1;e[l.DATA_OBJECT_KEY_TARGET]===n.player.currentTarget?.id&&t.gameEngine.clearTarget();let r=p.get(n.player.players,e[l.DATA_OBJECT_KEY_TARGET],!1);if(!r)return!1;r.visible=!1,p.hasOwn(r,"nameSprite")&&r.nameSprite&&(r.nameSprite.visible=!1)}playDeathAnimation(e,t,i){if(!t.getAnimationByKey(e))return this.missingSpritesMaxRetries===this.missingSpriteRetry?f.debug('Sprite "'+e+'" not available.',e):(this.missingSpriteRetry++,setTimeout(()=>this.playDeathAnimation(e,t,i),this.missingSpritesTimeOut)),!1;let n=t.physics.add.sprite(i.x,i.y,e);return n.setDepth(10500),n.anims.play(e,!0).on("animationcomplete",()=>{n.destroy()}),!0}startObjectAnimation(e,t){if(e.act!==c.OBJECT_ANIMATION&&e.act!==c.TYPE_ANIMATION)return!1;let i=t.activeRoomEvents.getActiveScene();if(!p.hasOwn(i.objectsAnimations,e.key))return!1;i.objectsAnimations[e.key].runAnimation()}moveSpritesObjects(e,t,i,n){if(!e.moveSprites)return;let r=Object.keys(e.moveSprites);if(0!==r.length)for(let s of r){let r=e.moveSprites[s];r.x=t,r.y=i;let a=n+("above"===p.get(e.animationData,"depthByPlayer","")?1:-.1);r.setDepth(a)}}async prepareObjectsUi(e,t,i){if(!t){f.info(["None objects animations data.",i]);return}for(let n of Object.keys(t)){let r=t[n];if(!p.hasOwn(r,"ui"))continue;if(!r.id){f.error(["Object ID not specified. Skipping registry:",r]);continue}let s=p.get(r,"template","/assets/html/dialog-box.html");i.objectsUi[r.id]=new h(e,r,s,"npcDialog"),await e.events.emit("reldens.createdUserInterface",{gameManager:e,id:r.id,userInterface:i.objectsUi[r.id],ObjectsPlugin:this})}}async createDynamicAnimations(e){let t=e.gameManager.activeRoomEvents.getActiveScene();if(!t.objectsAnimationsData){f.info("None animations defined on this scene: "+t.key);return}for(let i of(await this.events.emit("reldens.createDynamicAnimationsBefore",this,e),Object.keys(t.objectsAnimationsData))){let n=t.objectsAnimationsData[i];await this.createAnimationFromAnimData(n,e)}}async createAnimationFromAnimData(e,t){if(!e.key)return f.error("Animation key not specified. Skipping registry.",e),!1;e.frameRate=t.configuredFrameRate,await this.events.emit("reldens.createDynamicAnimation_"+e.key,this,e);let i=new(t.gameManager.config.getWithoutLogs("client/customClasses/objects/"+e.key,n))(t.gameManager,e,t);return i.createAnimation(),i}}},{"2d0db67a357a1df6":"55aYT","79a86c288b721c2b":"9u1ZW",deab023d199335c9:"8cYlw","8cedb0a2567e4f93":"hznMs","52449bab2a32580c":"1fcQw","52476153d5a162e6":"bzImH",f64071d16effca52:"izuLV",bef8aa2a761e6924:"59VA7","6bb02e09282ac53":"fC3To",cb715b6f39878bc:"93TbC",c0cb3eea0cda2e5e:"3lwy5"}],"55aYT":[function(e,t,i){let{Logger:n,sc:r}=e("69cb276730e319a6"),{ObjectsConst:s}=e("4aa72c897fe49299"),{GameConst:a}=e("e5f3f59c83d28a8d");t.exports.AnimationEngine=class{constructor(e,t,i){this.currentPreloader=i,this.currentAnimation=!1,this.gameManager=e,this.enabled=t.enabled||!1,this.key=t.key,this.id=t.id,this.asset_key=t.asset_key||t.key,this.assetPath=t.assetPath||"/assets/custom/sprites/",this.type=t.type||!1,this.ui=t.ui||!1,this.targetName=t.targetName,this.frameRate=t.frameRate||!1,this.frameStart=t.frameStart||0,this.frameEnd=t.frameEnd||0,this.x=t.x||0,this.y=t.y||0,this.repeat=isNaN(t.repeat)?-1:t.repeat,this.hideOnComplete=t.hideOnComplete||!1,this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.destroyOnComplete=t.destroyOnComplete||!1,this.autoStart=t.autoStart||!1,this.layerName=t.layerName||!1,this.positionFix=t.positionFix||!1,this.zeroPad=t.zeroPad||!1,this.prefix=t.prefix||!1,this.isInteractive=t.isInteractive||!1,this.highlightOnOver=!!r.get(t,"highlightOnOver",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightOnOver",!0)),this.highlightColor=r.get(t,"highlightColor",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightColor","0x00ff00")),this.restartTime=r.get(t,"restartTime",!1),this.calculateAnimPosition(),r.hasOwn(t,"animations")&&this.createObjectAnimations(t.animations)}updateObjectAndSpritePositions(e,t){this.sceneSprite.x=e,this.sceneSprite.y=t,this.x=e,this.y=t,this.calculateAnimPosition()}calculateAnimPosition(){this.animPos={x:this.x,y:this.y},this.positionFix&&(r.hasOwn(this.positionFix,"x")&&(this.animPos.x=this.x+this.positionFix.x),r.hasOwn(this.positionFix,"y")&&(this.animPos.y=this.y+this.positionFix.y))}updateObjectDepth(){let e=this.y+this.sceneSprite.height;return this.sceneSprite.setDepth(e),e}createAnimation(){if(!this.enabled){n.error("Animation disabled: "+this.key);return}let e=this.gameManager.activeRoomEvents.getActiveScene();if(!e){n.error("Active scene not found.");return}let t={start:this.frameStart,end:this.frameEnd};if(!1!==this.prefix&&(t.prefix=this.prefix),!1!==this.zeroPad&&(t.zeroPad=this.zeroPad),!this.currentPreloader.anims.textureManager.list[this.asset_key]){n.warning("Asset not found in preloader.",this.asset_key,t),this.currentPreloader.load.spritesheet(this.asset_key,this.assetPath+this.asset_key,t),this.currentPreloader.load.once("complete",async()=>{this.createAnimation()});return}let i=this.currentPreloader.anims.generateFrameNumbers(this.asset_key,t),r={key:this.key,frames:i,frameRate:this.frameRate,repeat:this.repeat,hideOnComplete:this.hideOnComplete};this.currentAnimation=this.gameManager.createdAnimations[this.key],this.currentAnimation||(n.debug("Creating animation: "+this.key),this.currentAnimation=this.currentPreloader.anims.create(r)),this.currentPreloader.objectsAnimations[this.key]=this.currentAnimation,this.gameManager.createdAnimations[this.key]=this.currentAnimation;let s=this.positionFix?this.animPos.x:this.x,a=this.positionFix?this.animPos.y:this.y;return this.sceneSprite=e.physics.add.sprite(s,a,this.asset_key),this.autoStart&&this.sceneSprite.anims.play(this.key,!0),this.enableInteraction(e),this.enableAutoRestart(),this.automaticDestroyOnComplete(),this.sceneSprite.setDepth(this.y+this.sceneSprite.body.height),e.objectsAnimations[this.key]=this,this.gameManager.events.emitSync("reldens.createAnimationAfter",{animationEngine:this}),this.sceneSprite}automaticDestroyOnComplete(){this.destroyOnComplete&&this.sceneSprite.on("animationcomplete",()=>{this.currentAnimation?.destroy(),this.sceneSprite.destroy()},this)}enableAutoRestart(){this.restartTime&&this.sceneSprite.on("animationcomplete",()=>{setTimeout(()=>{this.sceneSprite.anims&&(this.sceneSprite.anims.restart(),this.sceneSprite.anims.pause())},this.restartTime)},this)}enableInteraction(e){this.isInteractive&&(this.sceneSprite.setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(a.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;let i=this.key===this.asset_key?this.id:this.key,n={act:s.OBJECT_INTERACTION,id:i,type:this.type};if(this.gameManager.activeRoomEvents.send(n),!this.targetName)return!1;let r=Object.assign({},e.player.currentTarget),o={id:i,type:s.TYPE_OBJECT};e.player.currentTarget=o,this.gameManager.gameEngine.showTarget(this.targetName,o,r)}),this.highlightOnOver&&(this.sceneSprite.on("pointerover",()=>{this.sceneSprite.setTint(this.highlightColor)}),this.sceneSprite.on("pointerout",()=>{this.sceneSprite.clearTint()})))}runAnimation(){if(!this.sceneSprite){n.error("Current animation not found: "+this.key);return}this.sceneSprite.anims.play(this.key,!0)}getPosition(){return{x:this.x,y:this.y}}createObjectAnimations(e){if(!e)return;let t=Object.keys(e);if(0!==t.length)for(let i of t){if(this.gameManager.createdAnimations[i]){this.currentPreloader.objectsAnimations[i]=this.gameManager.createdAnimations[i];continue}if(r.hasOwn(this.currentPreloader.objectsAnimations,i))continue;let t=e[i],n={key:i,frames:this.currentPreloader.anims.generateFrameNumbers(t.asset_key||this.asset_key,{start:t.start||this.frameStart,end:t.end||this.frameEnd}),frameRate:t.frameRate||this.frameRate,repeat:t.repeat||this.repeat,hideOnComplete:t.hideOnComplete||this.hideOnComplete,asset_key:t.asset_key||this.asset_key};this.currentPreloader.objectsAnimations[i]=this.currentPreloader.anims.create(n),this.gameManager.createdAnimations[i]=this.currentPreloader.objectsAnimations[i]}}}},{"69cb276730e319a6":"3lwy5","4aa72c897fe49299":"izuLV",e5f3f59c83d28a8d:"93TbC"}],"9u1ZW":[function(e,t,i){let{TraderObjectUi:n}=e("58811b04f3d9bb80"),{Logger:r,sc:s}=e("f04fad6c99485124");t.exports.ObjectsMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on ObjectsMessageListener.",e),!1;if(!s.get(t,"result",!1))return r.error("Missing result data on ObjectsMessageListener.",e),!1;if(!s.get(t,"id",!1))return r.error("Missing Object ID on ObjectsMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on ObjectsMessageListener.",e),!1;let a=new n({roomEvents:i,message:t});if(!a.validate())return!1;a.updateContents()}}},{"58811b04f3d9bb80":"h56Er",f04fad6c99485124:"3lwy5"}],h56Er:[function(e,t,i){let{ItemsConst:n}=e("6f47f46589411c74"),{ObjectsConst:r}=e("5d863b6194329ea"),{Logger:s,sc:a}=e("4eb12b9fd296bfd9");t.exports.TraderObjectUi=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.objectUi=this.roomEvents?.objectsUi[this.message?.id],this.setConfirmMessages()}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene?this.itemsManager?!!this.objectUi||(s.error("Missing objectUi on TraderObjectUi."),!1):(s.error("Missing ItemsManager on TraderObjectUi."),!1):(s.error("Missing UiScene on TraderObjectUi."),!1):(s.error("Missing GameManager on TraderObjectUi."),!1):(s.error("Missing message on TraderObjectUi."),!1):(s.error("Missing RoomEvents on TraderObjectUi."),!1)}setConfirmMessages(){if(!this.gameManager)return!1;this.confirmMessages={buy:this.gameManager.services.translator.t("objects.trader.buyConfirmed"),sell:this.gameManager.services.translator.t("objects.trader.sellConfirmed")}}updateContents(){let e=this.gameManager.gameDom.getElement("#box-"+this.objectUi.id+" .box-content");if(!e)return s.error('Missing container: "#box-'+this.objectUi.id+' .box-content".'),!1;let t=this.message.result.action;if(r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM===this.message.result.subAction)return e.innerHTML=this.confirmMessages[t],!0;let i=a.get(this.message.result,"items",!1),n=this.mapInventoryKeyFromAction(t),o=a.get(this.message.result,"exchangeData",!1),h=a.get(o,n,!1),c=this.message.result.exchangeRequirementsA||[],l=this.message.result.exchangeRewardsB||[];this.updateItemsList(i,t,c,l,e,h),this.updateExchangeData(h,t,c,l,i)}updateItemsList(e,t,i,n,r,s){if(!e)return;let o="",h={};for(let r of Object.keys(e)){let c=e[r],l=Object.assign({manager:this.itemsManager},c,{uid:r}),u=a.get(this.itemsManager.itemClasses,l.key,this.itemsManager.types.classByTypeId(l.type));h[r]=new u(l),h[r].quantityDisplay=1,h[r].quantityMaxDisplay=Math.max(h[r].qty_limit,c.qty),h[r].tradeAction=t,h[r].exchangeRequirements=this.fetchItemRequirements(l.key,i),h[r].exchangeRewards=this.fetchItemRewards(l.key,n),o+=this.createTradeItemBox(h[r],a.get(s,h[r].uid,!1))}r.innerHTML=this.createTradeContainer(t,o),this.activateItemsBoxActions(h),this.activateConfirmButtonAction(t)}activateConfirmButtonAction(e){let t=this.gameManager.gameDom.getElement(".confirm-"+e),i={act:r.OBJECT_INTERACTION,id:this.message.id,value:e,sub:r.TRADE_ACTIONS.CONFIRM};t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send(i)})}updateExchangeData(e,t,i,n,r){if(!1===e)return!1;let a=this.createConfirmItemsBox(e,r,t),o=null;return("buy"===t&&(o=this.gameDom.getElement(".trade-container-buy .trade-col.trade-col-2")),"sell"===t&&(o=this.gameDom.getElement(".trade-container-sell .trade-col.trade-col-1")),null===o)?(s.error('Missing "'+t+'" items container.',{message:this.message}),!1):(o.innerHTML=a,this.assignRemoveActions(e,r,t),!0)}createConfirmItemsBox(e,t,i){let r=Object.keys(e);if(0===r.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on confirmation trader-object-ui.",{message:this.message}),"";let a="",o=this.uiScene.cache.html.get("inventoryTradeItem");if(!o)return s.error('Missing template "inventoryTradeItem".'),"";for(let s of r){let r=e[s],h=t[s],c=n.TRADE_ACTIONS.BUY===i,l=n.TRADE_ACTIONS.SELL===i;a+=this.gameManager.gameEngine.parseTemplate(o,{key:h.key,label:h.label,description:h.description,id:s,qty:h.qty,hiddenClass:"",tradeRequirements:c?this.createTradeRequirementsContent(h):"",tradeRewards:l?this.createTradeRewardsContent(h):"",tradeAction:this.createTradeActionRemove(h),tradeActionKey:i,tradeQuantityContent:r})}return a}assignRemoveActions(e,t,i){let n=Object.keys(e);if(0===n.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on remove trader-object-ui.",{message:this.message}),!1;for(let e of n){let n=".trade-item-to-be-"+i+".trade-item-"+e,a=this.gameDom.getElement(n);if(!a){s.error('Assign trade item "'+e+'" container not found.',{message:this.message});continue}let o=this.gameDom.getElement(".trade-item-"+i+".trade-item-"+e+" .trade-action-remove");if(!o){s.error('Assign trade item "'+e+'" remove button not found.',{message:this.message});continue}let h=t[e];o.addEventListener("click",()=>{a.classList.remove("hidden");let t={act:r.OBJECT_INTERACTION,id:this.message.id,value:i,itemId:e,itemKey:h.key};t[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e,t){let i=this.uiScene.cache.html.get("inventoryTradeContainer");if(!i)return s.error('Missing template "inventoryTradeContainer".'),"";let a=this.message.result.lastErrorData;a?.itemUid&&(a.item=this.fetchItemLabelByUid(a.itemUid)),a?.requiredItemKey&&(a.requiredItem=this.fetchItemLabelByUid(a.requiredItemKey));let o=this.gameManager.services.translator.t(this.message.result.lastErrorMessage,a),h=n.TRADE_ACTIONS.BUY===e?t:"",c=n.TRADE_ACTIONS.SELL===e?t:"";return this.gameManager.gameEngine.parseTemplate(i,{tradeActionKey:e,confirmRequirements:"",lastErrorMessage:o,tradeActionLabel:r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM,tradeItemsBuy:h,tradeItemsSell:c})}fetchItemLabelByUid(e){return this.gameManager?.inventory?.manager?.items[e]?.label||this.message?.result?.items[e]?.label||""}fetchItemRequirements(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}fetchItemRewards(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return s.error('Missing template "inventoryTradeItem".'),"";let r=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!r)return s.error('Missing template "inventoryTradeItemQuantity".'),"";let a=n.TRADE_ACTIONS.BUY===e.tradeAction,o=n.TRADE_ACTIONS.SELL===e.tradeAction,h=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:r.OBJECT_INTERACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}mapInventoryKeyFromAction(e){return a.get({buy:"A",sell:"B"},e,!1)}}},{"6f47f46589411c74":"g4GOK","5d863b6194329ea":"izuLV","4eb12b9fd296bfd9":"3lwy5"}],g4GOK:[function(e,t,i){t.exports={ItemsServer:e("58ccb446d62c749b"),ItemsManager:e("99fbf686cf9954ad"),Inventory:e("d0e0bc002aa0626b"),ItemGroup:e("f76a9d92dd31d5bc"),ItemBase:e("8e9d5aa6534a13ad"),ItemEquipment:e("8451b91f0c937da4"),ItemUsable:e("106627cf30823e76"),ItemSingle:e("a73a08604f94da54"),ItemSingleEquipment:e("72395d9fa7948595"),ItemSingleUsable:e("6d04ae470a68a6bf"),ItemsFactory:e("f5eb7eeb5f537334"),ModelEntity:e("d4ce696862dbcd35"),ItemsConst:e("a5ef4f750b88ecba"),ItemsEvents:e("a180e01e5de133e0"),Receiver:e("33a340330572bf29"),ItemsDataGenerator:e("bf0687569e27057a"),GroupsDataGenerator:e("27ccd3cf572478fc"),ExchangePlatform:e("90218b41bb50ec4b"),ExchangeRequirement:e("c2601b545e947f39"),RequirementsCollection:e("72f6373fd251e1e3"),RequirementsProcessor:e("79f809e040670ce3"),ExchangeReward:e("3e52122617c11229"),RewardsCollection:e("6edee09b19b2994c"),RewardsProcessor:e("441790981610210a"),ItemsError:e("c48f961fa528324f")}},{"58ccb446d62c749b":"fCIqi","99fbf686cf9954ad":"5wpm2",d0e0bc002aa0626b:"8qkfQ",f76a9d92dd31d5bc:"3auVp","8e9d5aa6534a13ad":"gInMY","8451b91f0c937da4":"53uuI","106627cf30823e76":"d0orT",a73a08604f94da54:"lLwiJ","72395d9fa7948595":"a3dXh","6d04ae470a68a6bf":"9iH9y",f5eb7eeb5f537334:"lrNSa",d4ce696862dbcd35:"3ncwO",a5ef4f750b88ecba:"idEfG",a180e01e5de133e0:"fWlRm","33a340330572bf29":"2R9Cx",bf0687569e27057a:"nHDSk","27ccd3cf572478fc":"btt2J","90218b41bb50ec4b":"gRIlz",c2601b545e947f39:"4hpnF","72f6373fd251e1e3":"1wLI1","79f809e040670ce3":"kxCH2","3e52122617c11229":"iuvBV","6edee09b19b2994c":"hU2Lr","441790981610210a":"1sOiW",c48f961fa528324f:"eODT6"}],fCIqi:[function(e,t,i){let n=e("584cf2f2bf66f26b"),{StorageObserver:r}=e("3442076d73bd51e9"),s=e("906b84f8406328ec"),{Logger:a,ErrorManager:o,sc:h}=e("5ac154b5c4320dd9");t.exports=class{constructor(e){h.hasOwn(e,"owner")||o.error("Undefined owner."),this.manager=new n(e),this.createStorageObserver(e),this.createClient(e)}createClient(e){if(!h.hasOwn(e,"client"))return!1;this.client=new s({manager:this.manager,client:e.client})}createStorageObserver(e){if(!h.hasOwn(e,"persistence")||!e.persistence)return!1;let t=!1;if(h.hasOwn(e,"modelsManager")&&(t=e.modelsManager),!h.hasOwn(e.owner,"persistData")||"function"!=typeof e.owner.persistData)return a.error('Required method "persistData" not found in ItemServer props.owner.'),!1;this.dataServer=new r(this.manager,t),this.dataServer.listenEvents()}}},{"584cf2f2bf66f26b":"5wpm2","3442076d73bd51e9":"j7WCD","906b84f8406328ec":"3NxkK","5ac154b5c4320dd9":"lHuVm"}],"5wpm2":[function(e,t,i){let n=e("4fe5cf381ee58ab2"),r=e("419f5262e5a6365c"),s=e("bf63d9f42b20facf"),{ErrorManager:a,sc:o}=e("21ccb6baff6c486e");t.exports=class extends n{constructor(e){o.hasOwn(e,"owner")||a.error("Undefined owner."),super(e),this.itemClasses=o.get(e,"itemClasses",!1),this.groupClasses=o.get(e,"groupClasses",!1),this.itemsModelData=o.get(e,"itemsModelData",!1),this.ownerIdProperty=o.get(e,"ownerIdProperty","id"),this.owner=e.owner,this.groups={},this.eventsPrefix=this.getOwnerEventKey()+o.get(e,"eventsPrefix",""),this.types=new s}getOwnerId(){return this.owner[this.ownerIdProperty]}getOwnerEventKey(){return o.get(this.owner,"eventsPrefix","items.ownerId."+this.getOwnerId())}getOwnerUniqueEventKey(e){return(o.isFunction(this.owner.eventUniqueKey)?this.owner.eventUniqueKey():"items.ownerId."+this.getOwnerId()+".uKey."+o.getTime())+(e?"."+e:"")}async setup(e){await this.fireEvent(r.MANAGER_INIT,{props:e,manager:this}),o.hasOwn(e,"items")&&await this.setItems(e.items),o.hasOwn(e,"groups")&&await this.setGroups(e.groups)}createItemInstance(e,t){let i=o.get(this.itemsModelData,e,!1);if(!1===i)return!1;if(i.data.modifiers)for(let e of Object.keys(i.data.modifiers))i.data.modifiers[e].target=this.owner;let n=i.class.isSingleInstance(),r=void 0!==t&&n?t:1,s=Object.assign({},i.data,{manager:this,item_id:i.data.id,qty:r});if(delete s.uid,!0===n||1===r)return new i.class(s);let a=[];s.qty=1;for(let e=0;ethis.limitPerItem&&0<=this.limitPerItem?(this.setError("Cannot add item, item qty limit exceeded.",s.ERROR_CODES.ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM,{itemUid:t,qty:e.qty}),!1):(o.hasOwn(this.items,t)&&e.singleInstance?await this.increaseItemQty(t,e.qty):(await this.fireEvent(r.ADD_ITEM_BEFORE,this,e),this.items[t]=e,await this.fireEvent(r.ADD_ITEM,this,e)),this.items[t])}async addItems(e){for(let t of e)if(!await this.addItem(t))return this.setError('Cannot add item "'+t.getInventoryId()+'".',s.ERROR_CODES.ADD_ITEMS_ERROR,{itemUid:t.getInventoryId()}),!1;return!0}async setItem(e){if(this.locked)return this.setError("Inventory locked, cannot set item: "+e.getInventoryId(),s.ERROR_CODES.LOCKED_FOR_SET_ITEM,{itemUid:e.getInventoryId()}),!1;this.items[e.getInventoryId()]=e}async removeItem(e){return this.locked?(this.setError("Inventory locked, cannot remove item: "+e,s.ERROR_CODES.LOCKED_FOR_REMOVE_ITEM,{itemUid:e}),!1):o.hasOwn(this.items,e)?(await this.fireEvent(r.REMOVE_ITEM,this,e),delete this.items[e],!0):(this.setError("Cannot remove item, key not found: "+e,s.ERROR_CODES.KEY_NOT_FOUND,{itemUid:e}),!1)}async setItemQty(e,t){return this.modifyItemQty(s.SET,e,t)}async increaseItemQty(e,t){return this.modifyItemQty(s.INCREASE,e,t)}async decreaseItemQty(e,t){return this.modifyItemQty(s.DECREASE,e,t)}async modifyItemQty(e,t,i){if(this.locked)return this.setError("Inventory locked, cannot modify item qty: "+t,s.ERROR_CODES.LOCKED_FOR_MODIFY_ITEM_QTY,{itemUid:t}),!1;if(!o.hasOwn(this.items,t))return this.setError("Cannot "+e+" item qty, undefined item key: "+t,s.ERROR_CODES.UNDEFINED_ITEM_KEY_FOR_OPERATION,{itemUid:t,operation:e}),!1;if(isNaN(i))return this.setError("Cannot "+e+" item qty, qty is not a number: "+i,s.ERROR_CODES.QTY_NOT_A_NUMBER,{itemUid:t,operation:e,qty:i}),!1;if(this.limitPerItem>0&&i>this.limitPerItem&&(e===s.SET||e===s.INCREASE))return this.setError("Cannot "+e+" item qty, item qty limit exceeded: "+i+" > "+this.limitPerItem,s.ERROR_CODES.ITEM_QTY_LIMIT_EXCEEDED,{itemUid:t,operation:e,limitPerItem:this.limitPerItem}),!1;if(e===s.SET&&(this.items[t].qty=i),e===s.INCREASE&&(this.items[t].qty+=i),e===s.DECREASE){let e=this.items[t].qty-i;0>e&&(e=0),this.items[t].qty=e}return 0===this.items[t].qty&&this.items[t].autoRemoveItemOnZeroQty?(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),await this.removeItem(this.items[t].getInventoryId())):(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),!0)}async setItems(e){return this.locked?(this.setError("Inventory locked, cannot set items.",s.ERROR_CODES.LOCKED_FOR_SET_ITEMS),!1):(this.items=e,this.fireEvent(r.SET_ITEMS,{items:e,manager:this}))}async setGroups(e){return this.groups=e,this.fireEvent(r.SET_GROUPS,{groups:e,manager:this})}fireEvent(e,...t){return this.events.emit(this.eventFullName(e),...t)}listenEvent(e,t,i,n){return this.events.onWithKey(this.eventFullName(e),t,i,n)}eventFullName(e){return this.eventsPrefix+"."+e}setError(e="",t="",i={},r=!1){this.lastError=new n(e,t,i,r)}}},{adccac45c69ab6e8:"eODT6","2fd42dbc83a1dbf2":"fWlRm",bb9f4880ce8c412b:"idEfG","4bf1621a8608b780":"lHuVm"}],eODT6:[function(e,t,i){t.exports=class{constructor(e="",t="",i={},n=!1){this.message=e,this.code=t,this.data=i,this.withError=n}}},{}],fWlRm:[function(e,t,i){let n="reldens.items.";t.exports={PREF:n,MANAGER_INIT:n+"setup",EXCHANGE:{INITIALIZED:n+"initialized",CANCELED:n+"canceled",INVALID_PUSH:n+"invalidPush",ITEM_PUSHED:n+"itemPushed",ITEM_REMOVE:n+"itemRemove",CONFIRM:n+"confirm",DISCONFIRM:n+"disconfirm",BEFORE_FINALIZE:n+"beforeFinalize",FINALIZED:n+"finalized"},LOADED_OWNER_ITEMS:n+"loadedOwnerItems",SET_ITEMS:n+"setItems",SET_GROUPS:n+"setGroups",EQUIP_ITEM:n+"equipItem",UNEQUIP_ITEM:n+"unequipItem",ADD_ITEM:n+"addItem",ADD_ITEM_BEFORE:n+"addItemBefore",REMOVE_ITEM:n+"removeItem",MODIFY_ITEM_QTY:n+"modifyItemQty",EQUIP_BEFORE:n+"equipBefore",EQUIP:n+"equip",EXECUTING_ITEM:n+"executingItem",EXECUTED_ITEM:n+"executedItem",VALIDATE:n+"validate"}},{}],idEfG:[function(e,t,i){let n="rinv",r="items.",s="exchange.",a="requirements.",o="reward.",h="equipment.";t.exports={SET:"set",INCREASE:"increase",DECREASE:"decrease",ACTIONS_PREF:n,ACTION_ADD:n+"A",ACTION_REMOVE:n+"R",ACTION_MODIFY_QTY:n+"M",ACTION_EQUIP:n+"E",ACTION_UNEQUIP:n+"U",ACTION_MOD_APPLIED:n+"Ma",ACTION_MOD_REVERTED:n+"Mr",ACTION_EXECUTING:n+"Ex",ACTION_EXECUTED:n+"AExd",ACTION_MANAGER_INIT:n+"Mi",ACTION_SET_ITEMS:n+"Si",ACTION_SET_GROUPS:n+"Sg",BEHAVIOR_SEND:"send",BEHAVIOR_BROADCAST:"broadcast",BEHAVIOR_BOTH:"both",TYPES:{ITEM_BASE:10,EQUIPMENT:1,USABLE:2,SINGLE:3,SINGLE_EQUIPMENT:4,SINGLE_USABLE:5},TRADE_ACTIONS:{BUY:"buy",SELL:"sell",TRADE:"trade"},ERROR_CODES:{PREFIX:r,UNDEFINED_ITEM:r+"undefinedItem",UNDEFINED_METHOD_INVENTORY_ID:r+"undefinedMethodInventoryId",UNDEFINED_ITEM_KEY:r+"undefinedItemKey",INVALID_ITEM_INSTANCE:r+"invalidItemInstance",LOCKED_FOR_ADD_ITEM:r+"lockedForAddItem",MAX_TOTAL_REACHED_FOR_ADD_ITEM:r+"maxTotalReachedForAddItem",ITEM_EXISTS_FOR_ADD_ITEM:r+"itemExistsForAddItem",ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM:r+"itemLimitExceededForAddItem",ADD_ITEMS_ERROR:r+"addItemsError",LOCKED_FOR_SET_ITEM:r+"lockedForSetItem",LOCKED_FOR_REMOVE_ITEM:r+"lockedForRemoveItem",KEY_NOT_FOUND:r+"keyNotFound",LOCKED_FOR_MODIFY_ITEM_QTY:r+"lockedForModifyItemQty",UNDEFINED_ITEM_KEY_FOR_OPERATION:r+"undefinedItemKeyForOperation",QTY_NOT_A_NUMBER:r+"qtyNotANumber",ITEM_QTY_LIMIT_EXCEEDED:r+"itemQtyLimitExceeded",LOCKED_FOR_SET_ITEMS:r+"lockedForSetItems",EXCHANGE:{MISSING_CONFIRMATION:r+s+"missingConfirmation",INVALID_PUSHED_QUANTITY:r+s+"invalidPushedQuantity",INVALID_QUANTITY:r+s+"invalidQuantity",INVALID_EXCHANGE:r+s+"invalidExchange",DECREASE_QUANTITY:r+s+"decreaseQuantity",ITEM_ADD:r+s+"itemAdd"},REQUIREMENTS:{ITEM_NOT_PRESENT:r+a+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+a+"quantityNotAvailable",ITEM_NOT_PUSHED:r+a+"itemNotPushed",ITEM_QUANTITY_NOT_PUSHED:r+a+"itemQuantityNotPushed",ITEM_DOES_NOT_EXISTS:r+a+"itemDoesNotExists",ITEM_ADD:r+a+"itemAdd"},REWARD:{DOES_NOT_EXISTS:r+o+"doesNotExists",MISSING_ITEM:r+o+"missingItem",ITEM_NOT_PRESENT:r+o+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+o+"quantityNotAvailable",MISSING_PUSHED:r+o+"missingPushed",GET_ITEM_DOES_NOT_EXISTS:r+o+"getItemDoesNotExists",PROCESS_ITEM:r+o+"processItem",PROCESS_INVENTORY:r+o+"processInventory",ADD_ITEMS:r+o+"addItems",QUANTITY_OVERLOAD:r+o+"quantityOverload"},EQUIPMENT:{MODIFIERS_APPLY:r+h+"modifiersApply",MODIFIERS_REVERT:r+h+"modifiersRevert"}}}},{}],lHuVm:[function(e,t,i){let n=e("2bcd40494882fb47");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("455423ccd9c84c22"),InteractionArea:e("216924daca797e62"),SchemaValidator:e("85ccbf154c9d134e"),Logger:e("f2f4c65d53676758"),sc:e("c3852ea63c51ea54")}},{"2bcd40494882fb47":"cn4Yn","455423ccd9c84c22":"cBHKQ","216924daca797e62":"4m0ij","85ccbf154c9d134e":"4H6po",f2f4c65d53676758:"8oBG9",c3852ea63c51ea54:"s7JqC"}],cn4Yn:[function(e,t,i){let n=e("221f90b1e4d940d7").default,r=e("cadd03cba4a645cb"),s=e("40604cfb25e507f");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"221f90b1e4d940d7":"46bZC",cadd03cba4a645cb:"8oBG9","40604cfb25e507f":"s7JqC"}],"8oBG9":[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],s7JqC:[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t=t.length)return;let i=e?"revert":"apply";for(let e of t)this.modifiers[e][i](this.target);return this.manager.fireEvent(r.EQUIP+(e?"Reverted":"Applied")+"Modifiers",this)}isType(e){return this.type===e}async fireEvent(e,...t){return this.manager.fireEvent(e,...t)}listenEvent(e,t,i,n){return this.manager.listenEvent(e,t,i,n)}}},{c12e6ac2d5a93063:"idEfG",c6965a9a447f564a:"fWlRm",e634cd5ec6f60b00:"lHuVm"}],"53uuI":[function(e,t,i){let n=e("33cdc889b48aacb0"),r=e("c5fbc38955884411"),s=e("8ae98c100e6c951f"),{sc:a}=e("bcc3d9fdf3135034");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.EQUIPMENT,this.equipped=a.get(e,"equipped",!1)}async equip(e){if(this.equipped=!0,await this.manager.fireEvent(s.EQUIP_ITEM,this),!1===e||!1===this.manager.applyModifiersAuto)return!1;await this.applyModifiers()}async unequip(e){if(this.equipped=!1,await this.manager.fireEvent(s.UNEQUIP_ITEM,this),!1===e||!1===this.manager.revertModifiersAuto)return!1;await this.revertModifiers()}async applyModifiers(){return this.equipped?await super.applyModifiers():(this.manager.setError("Cannot apply modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_APPLY,{itemUid:this.getInventoryId()}),!1)}async revertModifiers(){return this.equipped?(this.manager.setError("Cannot revert modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_REVERT,{itemUid:this.getInventoryId()}),!1):await super.revertModifiers()}}},{"33cdc889b48aacb0":"gInMY",c5fbc38955884411:"idEfG","8ae98c100e6c951f":"fWlRm",bcc3d9fdf3135034:"lHuVm"}],d0orT:[function(e,t,i){let n=e("73e1b5628e255757"),r=e("da3e74df899b07c1"),s=e("31d1c1f3f78c977b"),{sc:a}=e("ba8c76a702e812f2");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.USABLE,this.uses=a.get(e,"uses",1),this.currentUses=this.uses,this.usesLimit=a.get(e,"usesLimit",!1),this.canUse=!0,this.removeAfterUse=!0,this.useTimeOut=!1,this.useTimer=!1,this.execTimeOut=!1,this.execTimer=!1,this.removeQtyAfterUse=a.get(e,"removeQtyAfterUse",1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0)}async use(e=!1){if(!this.canUse||0>=this.currentUses)return!1;if(e&&(this.target=e),this.useTimeOut&&(this.canUse=!1,this.useTimer=setTimeout(async()=>{this.canUse=!0},this.useTimeOut)),await this.manager.fireEvent(s.EXECUTING_ITEM,this),!1===this.execTimeOut){await this.executeItem();return}this.execTimer=setTimeout(async()=>{await this.executeItem()},this.execTimeOut)}async executeItem(){return await this.applyModifiers(),this.currentUses--,!this.removeAfterUse||0t}le(e,t){return e<=t}ge(e,t){return e>=t}}},{"7f32cc4f678fee29":"JMhgy","3ddfbc21a5968711":"7bVCu",ccbf83a7cf179d24:"4bERK"}],JMhgy:[function(e,t,i){let n=e("d691d4fa6cea2950");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("d8e958d8f96101bc"),InteractionArea:e("272503a2730d31a"),SchemaValidator:e("7848250a9f47caf1"),Logger:e("404653b25061da31"),sc:e("9d383f341b9eb1ec")}},{d691d4fa6cea2950:"99okY",d8e958d8f96101bc:"8sWui","272503a2730d31a":"bcvJ4","7848250a9f47caf1":"fQvVq","404653b25061da31":"3u2po","9d383f341b9eb1ec":"4qzmB"}],"99okY":[function(e,t,i){let n=e("bb63facf08805c0e").default,r=e("3edeaecc21521149"),s=e("63662fd363376d05");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{bb63facf08805c0e:"46bZC","3edeaecc21521149":"3u2po","63662fd363376d05":"4qzmB"}],"3u2po":[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"4qzmB":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&tthis.maxValue&&(e=this.maxValue),this.minProperty){let t=this.getPropertyValue(this.minProperty);t&&et&&(e=t)}return e}getPropertyValue(e){return this.propertyManager.getPropertyValue(this.target,e)}setOwnerProperty(e,t){return this.propertyManager.setOwnerProperty(this.target,e,t)}}},{"466f1d6a713f27d":"15YIL","3a9190386e2c269":"jefAk",a7b06831aaf035e5:"7bVCu","3a11d9dd77bf6747":"4bERK","994144a57bf406a1":"JMhgy"}],"3NxkK":[function(e,t,i){let n=e("b644d789ee2b40af"),r=e("45ba412a65c2e357"),{PropertyManager:s}=e("994236dc9aef1f79"),{Logger:a,sc:o}=e("8b1efebe48a67288");t.exports=class{constructor(e){this.client=o.get(e,"client",!1),this.manager=o.get(e,"manager",!1),this.sendProperties=o.get(e,"sendProperties",{}),!1===o.hasOwn(e,"sendProperties")&&this.defineBehaviorForProperties(),this.sendTargetProps=o.hasOwn(e,"sendTargetProps")?e.sendTargetProps:{broadcast:[],send:[]},this.propertyManager=new s,this.listenEvents()}validateManager(){return!!this.manager||(a.critical("Undefined manager for Sender."),!1)}validateClient(){return this.client?o.isObjectFunction(this.client,"send")?!!o.isObjectFunction(this.client,"broadcast")||(a.critical('Required method "broadcast" not found in client.',this.client),!1):(a.critical('Required method "send" not found in client.',this.client,typeof this.client.send),!1):(a.critical("Undefined client for Sender."),!1)}defineBehaviorForProperties(e){e||(e={});let t=n.BEHAVIOR_SEND,i=n.BEHAVIOR_BROADCAST;this.setPropertyBehavior(n.ACTION_ADD,e,{behavior:t,send:["id","key","type","qty","label","description","group_id","qty_limit","uses_limit","useTimeOut","execTimeOut","remaining_uses","is_active"]}),this.setPropertyBehavior(n.ACTION_REMOVE,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MODIFY_QTY,e,{behavior:t,send:["id","key","qty"]}),this.setPropertyBehavior(n.ACTION_MOD_APPLIED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MOD_REVERTED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_UNEQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EXECUTING,e,{behavior:i,broadcast:["id","key","animationData"]}),this.setPropertyBehavior(n.ACTION_EXECUTED,e,{behavior:t,send:["id","key"]})}setPropertyBehavior(e,t,i){o.hasOwn(t,e)&&(this.sendProperties[e]=t[e]),this.sendProperties[e]=i}getItemProperties(e,t,i){if(!o.hasOwn(this.sendProperties,t))return a.critical("Undefined action while getting item properties.",{action:t,sendProperties:this.sendProperties}),!1;if(!o.hasOwn(this.sendProperties[t],i))return a.critical("Undefined behavior while getting item properties.",{behavior:i,action:t,sendProperties:this.sendProperties}),!1;let n={idx:e.getInventoryId()};for(let r of this.sendProperties[t][i]){if(!o.hasOwn(e,r)){a.info("Undefined property: "+r,e);continue}n[r]=e[r]}return n}listenEvents(){if(!this.validateManager())return!1;let e=this.manager.getOwnerEventKey();this.manager.listenEvent(r.ADD_ITEM,this.sendAddItemData.bind(this),this.manager.getOwnerUniqueEventKey("addItemSend"),e),this.manager.listenEvent(r.REMOVE_ITEM,this.sendRemoveItemData.bind(this),this.manager.getOwnerUniqueEventKey("removeItemSend"),e),this.manager.listenEvent(r.MODIFY_ITEM_QTY,this.sendModifyItemQuantityData.bind(this),this.manager.getOwnerUniqueEventKey("modifyItemQtySend"),e),this.manager.listenEvent(r.EQUIP_ITEM,this.sendEquipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemSend"),e),this.manager.listenEvent(r.UNEQUIP_ITEM,this.sendUnequipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("unequipItemSend"),e),this.manager.listenEvent(r.EQUIP+"AppliedModifiers",this.sendEquipItemAppliedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemAppliedModifiersSend"),e),this.manager.listenEvent(r.EQUIP+"RevertedModifiers",this.sendEquipItemRevertedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemRevertedModifiersSend"),e),this.manager.listenEvent(r.EXECUTING_ITEM,this.sendExecutingItemData.bind(this),this.manager.getOwnerUniqueEventKey("executingItemSend"),e),this.manager.listenEvent(r.EXECUTED_ITEM,this.sendExecutedItemData.bind(this),this.manager.getOwnerUniqueEventKey("executedItemSend"),e),this.manager.listenEvent(r.SET_ITEMS,this.sendSetItemsData.bind(this),this.manager.getOwnerUniqueEventKey("setItemsSend"),e),this.manager.listenEvent(r.SET_GROUPS,this.sendSetGroupsData.bind(this),this.manager.getOwnerUniqueEventKey("setGroupsSend"),e)}async sendSetGroupsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i={};for(let t of Object.keys(e.groups)){let{id:n,key:r,label:s,description:a,sort:o}=e.groups[t];i[r]={id:n,key:r,label:s,description:a,sort:o}}return await this.client.send({act:n.ACTION_SET_GROUPS,owner:t,groups:i})}async sendSetItemsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i=this.extractItemsDataForSend(e.items);return await this.client.send({act:n.ACTION_SET_ITEMS,owner:t,items:i})}async sendExecutedItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTED)}async sendExecutingItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTING)}async sendEquipItemRevertedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_REVERTED)}async sendEquipItemAppliedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_APPLIED)}async sendUnequipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_UNEQUIP)}async sendEquipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EQUIP)}async sendModifyItemQuantityData(e,t,i,r,s){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MODIFY_QTY)}async sendRemoveItemData(e,t){let i=e.items[t];return i?await this.runBehaviors(i,i.manager.getOwnerId(),n.ACTION_REMOVE):(a.debug('Item with key "'+t+'" not found.'),!1)}async sendAddItemData(e,t){return await this.runBehaviors(t,t.manager.getOwnerId(),n.ACTION_ADD)}extractItemsDataForSend(e){let t={};for(let i of Object.keys(e)){let r=e[i],s=this.getItemProperties(r,n.ACTION_ADD,n.BEHAVIOR_SEND);s.singleInstance=r.singleInstance,t[r.getInventoryId()]=s}return t}async runBehaviors(e,t,i){if(!e)return a.warning('Invalid "item" parameter.'),!1;if(!this.validateManager()||!this.validateClient())return!1;if(this.manager.getOwnerId()!==t)return a.warning("Item owner ID miss match.",this.manager.getOwnerId(),t),!1;let r=this.sendProperties[i],s=this.getTargetProps(e,r.behavior),o=r.behavior===n.BEHAVIOR_BOTH;if(r.behavior===n.BEHAVIOR_BROADCAST||o){let r=this.getItemProperties(e,i,n.BEHAVIOR_BROADCAST);await this.client.broadcast({act:i,owner:t,item:r,target:s});return}let h=r.behavior===n.BEHAVIOR_SEND,c=r[n.BEHAVIOR_SEND]!==r[n.BEHAVIOR_BROADCAST];if(h||o&&c){let r=this.getItemProperties(e,i,n.BEHAVIOR_SEND);await this.client.send({act:i,owner:t,item:r,targetProps:s})}}getTargetProps(e,t){let i=t===n.BEHAVIOR_BOTH?n.BEHAVIOR_BROADCAST:n.BEHAVIOR_SEND;if(!1===o.hasOwn(this.sendTargetProps,i)||0===this.sendTargetProps[i].length)return{};let r={};for(let t of this.sendTargetProps[i]){let i="id"===t?this.manager.ownerIdProperty:t;r[i]=this.propertyManager.getPropertyValue(e.target,i)}return r}}},{b644d789ee2b40af:"idEfG","45ba412a65c2e357":"fWlRm","994236dc9aef1f79":"iJUHo","8b1efebe48a67288":"lHuVm"}],"3auVp":[function(e,t,i){let n=e("fddf8c3cc708201b"),{ErrorManager:r,sc:s}=e("c1c82d06c77e78b8");t.exports=class extends n{constructor(e){s.hasOwn(e,"id")||r.error("Undefined ItemGroup id."),s.hasOwn(e,"key")||r.error("Undefined ItemGroup key."),e.eventsPref="g"+e.key+"."+s.get(e,"eventsPrefix",""),super(e),this.id=e.id,this.key=e.key,this.label=s.get(e,"label",!1),this.description=s.get(e,"description",!1),this.files_name=s.get(e,"files_name",!1),this.sort=s.get(e,"sort",!1),this.items_limit=s.get(e,"items_limit",!1),this.limit_per_item=s.get(e,"limit_per_item",!1)}}},{fddf8c3cc708201b:"8qkfQ",c1c82d06c77e78b8:"lHuVm"}],"3ncwO":[function(e,t,i){t.exports=class{constructor(e){this.id=e.id,this.key=e.key,this.type=e.type}}},{}],"2R9Cx":[function(e,t,i){let n=e("312a2d95cff483b5"),r=e("f647b9be5cb5de72"),s=e("2edbed84bfb41fb4"),{ErrorManager:a,Logger:o,sc:h}=e("a231b7a801915a72");t.exports=class{constructor(e){h.hasOwn(e,"owner")||a.error("Undefined owner."),this.manager=h.hasOwn(e,"manager")?e.manager:new n(e),this.actions=h.hasOwn(e,"actions")?e.actions:{},!1===h.get(e,"avoidDefaults",!1)&&this.setDefaultActions(),this.recieveErrorsLog=[]}setDefaultActions(){this.actions[r.ACTION_SET_ITEMS]="onSetItems",this.actions[r.ACTION_SET_GROUPS]="onSetGroups",this.actions[r.ACTION_ADD]="onAddItem",this.actions[r.ACTION_REMOVE]="onRemoveItem",this.actions[r.ACTION_MODIFY_QTY]="onSetQty",this.actions[r.ACTION_EQUIP]="onEquipItem",this.actions[r.ACTION_UNEQUIP]="onUnequipItem",this.actions[r.ACTION_MOD_APPLIED]="onModifiersApplied",this.actions[r.ACTION_MOD_REVERTED]="onModifiersReverted",this.actions[r.ACTION_EXECUTING]="onExecuting",this.actions[r.ACTION_EXECUTED]="onExecuted"}processMessage(e){let t=h.get(e,"act","");return 0===t.indexOf(r.ACTIONS_PREF)&&(h.hasOwn(this.actions,t)?"function"!=typeof this[this.actions[t]]?(o.info("Items action is not a function.",e.act),!1):void this[this.actions[t]](e):(o.error("Items action not found",t,e),!1))}onSetItems(e){let t={};for(let i of Object.keys(e.items)){let n=e.items[i],s=Object.assign({manager:this.manager},n,{uid:i}),a=this.getItemClass(s.key,s.type);t[i]=new a(s),t[i].isType(r.TYPES.EQUIPMENT)&&h.hasOwn(s,"is_active")&&(t[i].equipped=1===s.is_active)}return this.manager.setItems(t)}onSetGroups(e){let t={};for(let i of Object.keys(e.groups)){let n=this.getGroupClass(e.groups[i].key);t[e.groups[i].key]=new n(e.groups[i])}return this.manager.setGroups(t)}onAddItem(e){let t=Object.assign({manager:this.manager},e.item,{uid:e.item.idx}),i=new(this.getItemClass(t.key,t.type))(t);this.manager.addItem(i).catch(e=>{this.recieveErrorsLog.push({"Error receiver onAddItem.":e})})}onRemoveItem(e){this.manager.removeItem(e.item.idx).catch(e=>{this.recieveErrorsLog.push({"Error receiver onRemoveItem.":e})})}onSetQty(e){this.manager.setItemQty(e.item.idx,e.item.qty).catch(e=>{this.recieveErrorsLog.push({"Error receiver onSetQty.":e})})}onEquipItem(e){this.manager.items[e.item.idx].equip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onEquipItem.":e})})}onUnequipItem(e){this.manager.items[e.item.idx].unequip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onUnequipItem.":e})})}onModifiersApplied(e){}onModifiersReverted(e){}onExecuting(e){}onExecuted(e){}getItemClass(e,t){return h.get(this.manager.itemClasses,e,this.manager.types.classByTypeId(t))}getGroupClass(e){let t=s;return h.hasOwn(this.manager.groupClasses,e)&&(t=this.manager.groupClasses[e]),t}}},{"312a2d95cff483b5":"5wpm2",f647b9be5cb5de72:"idEfG","2edbed84bfb41fb4":"3auVp",a231b7a801915a72:"lHuVm"}],nHDSk:[function(e,t,i){let n=e("3dd92880a486247f"),{ModifierConst:r,Modifier:s}=e("293ce1d1ff60486a"),{sc:a}=e("45aa0d32b8aa311b");t.exports=class{static itemsListMappedData(e={},t){if(0===t.length)return{};let i={},r=new n;for(let n of t)n.items_modifiers&&(n.modifiers=this.generateItemModifiers(n)),i[n.key]={class:a.get(e,n.key,r.classByTypeId(n.type)),data:n};return i}static generateItemModifiers(e){let t={};for(let i of e.items_modifiers)i.operation!==r.OPS.SET&&(i.value=Number(i.value)),t[i.id]=new s(i);return t}}},{"3dd92880a486247f":"8gXhx","293ce1d1ff60486a":"iJUHo","45aa0d32b8aa311b":"lHuVm"}],btt2J:[function(e,t,i){let{ItemGroup:n}=e("185572600d1291f"),{sc:r}=e("99c50def0f4abb2");t.exports=class{static groupsListMappedData(e,t){if(0===t.length)return{};let i={groupList:{},groupBaseData:{}};for(let n of(i.groupModels=t,t))this.addGroup(n,i,e);return i}static appendGroup(e,t,i){return!!e&&!!t&&!!i&&(r.isArray(t.groupModelsList)||(t.groupModelsList=[]),t.groupModelsList.push(e),this.addGroup(i,e,t),t)}static addGroup(e,t,i){let s=r.get(i,e.key,n),{id:a,key:o,label:h,description:c,sort:l,files_name:u}=e;t.groupList[e.key]={class:s,data:e},t.groupBaseData[o]={id:a,key:o,label:h,description:c,sort:l,files_name:u}}}},{"185572600d1291f":"3auVp","99c50def0f4abb2":"lHuVm"}],gRIlz:[function(e,t,i){let n=e("9ec9f370c69b97e4"),r=e("5bd56f616649a07e"),s=e("f6c0b56ddc826cd5"),a=e("e433549ba9a6abfc"),o=e("24c35dc83734e5b2"),h=e("330f7364569544ad"),c=e("332ac9b4e9ced220"),{EventsManagerSingleton:l,ErrorManager:u,Logger:d,sc:f}=e("71720c1a95ddc1ce");t.exports=class{constructor(e){this.events=f.get(e,"eventsManager",l),this.requirementsProcessor=new s,this.rewardsProcessor=new a,this.exchangeInitializerId=f.get(e,"exchangeInitializerId",!1),this.initializeProperties()}initializeExchangeBetween(e){let t=f.get(e,"inventoryA",null),i=f.get(e,"inventoryB",null);(null===t||null===i)&&u.error("Missing inventories from properties.",e),this.inventories={A:t,B:i},this.lockInventories(),this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:f.get(e,"exchangeRequirementsA",new n),B:f.get(e,"exchangeRequirementsB",new n)},this.exchangeRewards={A:f.get(e,"exchangeRewardsA",new r),B:f.get(e,"exchangeRewardsB",new r)},this.dropExchange={A:f.get(e,"dropExchangeA",!1),B:f.get(e,"dropExchangeB",!1)},this.avoidExchangeDecrease={A:f.get(e,"avoidExchangeDecreaseA",!1),B:f.get(e,"avoidExchangeDecreaseB",!1)},this.setError(),this.events.emit(h.EXCHANGE.INITIALIZED,{exchangePlatform:this,props:e,inventoryA:t,inventoryB:i})}setError(e="",t="",i={},n=!1){this.lastError=new o(e,t,i,n)}cancelExchange(){this.unlockInventories(),this.initializeProperties(),this.events.emit(h.EXCHANGE.CANCELED,{exchangePlatform:this})}initializeProperties(){this.inventories={A:null,B:null},this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:[],B:[]},this.exchangeRewards={A:[],B:[]},this.setError()}async pushForExchange(e,t,i){return this.confirmations.A||this.confirmations.B?(d.info('Push for exchange "'+e+'" was blocked. Exchange for "'+i+'" and owner "'+this.inventories[i].owner_id+'" was already confirmed.'),!1):this.canBePushed(e,t,i)?(this.exchangeBetween[i][e]=t,this.validateRequirements("A")&&this.validateRewards("A")&&this.validateRequirements("B")&&this.validateRewards("B"))?(this.events.emit(h.EXCHANGE.ITEM_PUSHED,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!0):(delete this.exchangeBetween[i][e],!1):(this.events.emit(h.EXCHANGE.INVALID_PUSH,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!1)}async removeFromExchange(e,t){return this.confirmations.A||this.confirmations.B?(d.info('Remove from exchange "'+e+'" was blocked. Exchange for "'+t+'" and owner "'+this.inventories[t].owner_id+'" was already confirmed.'),!1):(this.events.emit(h.EXCHANGE.ITEM_REMOVE,{exchangePlatform:this,itemUid:e,inventoryKey:t}),!!f.hasOwn(this.exchangeBetween[t],e)&&(delete this.exchangeBetween[t][e],!0))}async confirmExchange(e){this.events.emit(h.EXCHANGE.CONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!0}async disconfirmExchange(e){this.events.emit(h.EXCHANGE.DISCONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!1}async finalizeExchange(){return(this.events.emit(h.EXCHANGE.BEFORE_FINALIZE,{exchangePlatform:this}),this.confirmations.A&&this.confirmations.B)?!!(this.validateRequirements("A")&&this.validateRequirements("B")&&this.validateRewards("A")&&this.validateRewards("B"))&&(this.unlockInventories(),!1!==await this.executeExchangeFromTo("A","B")&&!1!==await this.executeExchangeFromTo("B","A")&&(this.events.emit(h.EXCHANGE.FINALIZED,{exchangePlatform:this}),this.setError(),!0)):(this.setError("Missing confirmation.",c.ERROR_CODES.EXCHANGE.MISSING_CONFIRMATION,{confirmations:this.confirmations}),!1)}validateRequirements(e){return this.requirementsProcessor.validateRequirements(e,this)}validateRewards(e){return this.rewardsProcessor.validateRewards(e,this)}lockInventories(){this.setLocks(!0)}unlockInventories(){this.setLocks(!1)}setLocks(e){this.setInventoryLock("A",e),this.setInventoryLock("B",e)}setInventoryLock(e,t){let i=f.get(this.inventories,e,!1);return null!==i&&(!1===i?(d.error('Inventory not found "'+e+'".',this.inventories),!1):(i.locked=t,!0))}canBePushed(e,t,i){if(!f.hasOwn(this.inventories[i].items,e))return d.critical("Item Key does not exists on the inventory",e,this.inventories[i].items),!1;let n=this.inventories[i].items[e],r=t<=n.qty||-1===n.qty;return r||this.setError("Invalid item pushed quantity ("+t+"), available: "+n.qty,c.ERROR_CODES.EXCHANGE.INVALID_PUSHED_QUANTITY,{itemUid:e,qty:t,pushedItemQty:n.qty}),r}async executeExchangeFromTo(e,t){if(e===t)return this.setError('Inventories "FROM" and "TO" are the same, exchange cancelled.',c.ERROR_CODES.EXCHANGE.INVALID_EXCHANGE),this.cancelExchange(),this.inventories;let i=this.inventories[e],n=this.inventories[t];for(let r of Object.keys(this.exchangeBetween[e])){let s=this.exchangeBetween[e][r];if(0===s)return this.setError("Invalid item quantity 0.",c.ERROR_CODES.EXCHANGE.INVALID_QUANTITY,{itemUid:r}),!1;let a=!1===this.dropExchange[t]&&n.createItemInstance(i.items[r].key,s);if(!1===await this.rewardsProcessor.processRewards(e,t,r,i,n,this)||!1===await this.requirementsProcessor.processRequirements(e,t,r,s,i,n,this))return!1;let o=!0;if(!1===this.avoidExchangeDecrease[e]&&(i.frozenItems[r]=Object.assign({},i.items[r]),o=await i.decreaseItemQty(r,s)),!1===o)return this.setError("Exchange inventory decrease error.",c.ERROR_CODES.EXCHANGE.DECREASE_QUANTITY,{itemUid:r},i.lastError),!1;if(!1===this.dropExchange[t]){let e=f.isArray(a)?a:[a];if(!1===await n.addItems(e))return this.setError("Exchange add inventory result error.",c.ERROR_CODES.EXCHANGE.ITEM_ADD,{itemUid:r},n.lastError),!1}}return this.exchangeBetween[e]={},this.inventories}oppositeKey(e){return"A"===e?"B":"A"}}},{"9ec9f370c69b97e4":"1wLI1","5bd56f616649a07e":"hU2Lr",f6c0b56ddc826cd5:"kxCH2",e433549ba9a6abfc:"1sOiW","24c35dc83734e5b2":"eODT6","330f7364569544ad":"fWlRm","332ac9b4e9ced220":"idEfG","71720c1a95ddc1ce":"lHuVm"}],"1wLI1":[function(e,t,i){let n=e("dda1e92f871afe97"),{sc:r}=e("ce7f52b0d100b8f7");t.exports=class{constructor(e){this.requirements=r.get(e,"requirements",[])}count(){return this.requirements.length}add(e,t,i,r,s){this.requirements.push(new n({itemUid:e,itemKey:t,requiredItemKey:i,requiredQuantity:r,autoRemoveRequirement:s}))}remove(e){let t=!1,i=0;for(let n of this.requirements){if(n.itemUid===e){t=!0;break}i++}t&&delete this.requirements[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.requirements,e,t)}}},{dda1e92f871afe97:"4hpnF",ce7f52b0d100b8f7:"lHuVm"}],"4hpnF":[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.requiredItemKey=e.requiredItemKey,this.requiredQuantity=Number(e.requiredQuantity),this.autoRemoveRequirement=!!e.autoRemoveRequirement}}},{}],hU2Lr:[function(e,t,i){let n=e("c75245438c2a820e"),{sc:r}=e("74cd247a8747612e");t.exports=class{constructor(e){this.rewards=r.get(e,"rewards",[])}count(){return this.rewards.length}add(e,t,i,r,s){this.rewards.push(new n({itemUid:e,itemKey:t,rewardItemKey:i,rewardQuantity:r,rewardItemIsRequired:s}))}remove(e){let t=!1,i=0;for(let n of this.rewards){if(n.itemUid===e){t=!0;break}i++}t&&delete this.rewards[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.rewards,e,t)}}},{c75245438c2a820e:"iuvBV","74cd247a8747612e":"lHuVm"}],iuvBV:[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.rewardItemKey=e.rewardItemKey,this.rewardQuantity=Number(e.rewardQuantity),this.rewardItemIsRequired=!!e.rewardItemIsRequired}}},{}],kxCH2:[function(e,t,i){let n=e("b11112aa3d4db9e4"),{Logger:r,sc:s}=e("5342d6a91ce0343f");t.exports=class{constructor(e){this.requirementsByItemUid=s.get(e,"requirementsByItemUid",!0),this.requirementsByItemKey=s.get(e,"requirementsByItemKey",!0),this.requirementsTotals={}}validateRequirements(e,t){let i=t.exchangeRequirements[e];if(0===i.count())return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;this.requirementsTotals={};let o=t.oppositeKey(e);for(let h of a){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.DOES_NOT_EXISTS,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRequirements(i,l);if(0!==u.length&&(this.plusRequirementsQuantity(u,a),!this.validateItemRequirements(u,r[h],o,t)))return!1}return!0}fetchItemRequirements(e,t){let i=[];return this.requirementsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.requirementsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRequirementsQuantity(e,t){for(let i of e)s.hasOwn(this.requirementsTotals,i.requiredItemKey)||(this.requirementsTotals[i.requiredItemKey]=0),this.requirementsTotals[i.requiredItemKey]+=i.requiredQuantity*t}validateItemRequirements(e,t,i,r){if(0===e.length)return!0;for(let a of e){let e=r.inventories[i].findItemByKey(a.requiredItemKey);if(!1===e)return r.setError('Required item "'+a.requiredItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PRESENT,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;let o=a.requiredQuantity*t;if(o>e.qty)return r.setError('Required item "'+a.requiredItemKey+'" required quantity ('+o+') is not available on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.QUANTITY_NOT_AVAILABLE,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1;if(!0===a.autoRemoveRequirement)continue;let h=s.get(r.exchangeBetween[i],e.uid,!1);if(!1===h&&!1===a.autoRemoveRequirement)return r.setError('Required item "'+a.requiredItemKey+'" was not pushed for exchange "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;if(o>h)return r.setError("Required item "+a.requiredItemKey+" required quantity ("+o+") was not pushed for exchange.",n.ERROR_CODES.REQUIREMENTS.ITEM_QUANTITY_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1}return!0}async processRequirements(e,t,i,a,o,h,c){let l=s.get(o.items,i,s.get(o.frozenItems,i,!1));if(!1===l)return c.setError('Requirement error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REQUIREMENTS.ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let u=c.exchangeRequirements[e];if(!u||0===u.count())return!0;let d=this.fetchItemRequirements(u,l);if(0===d.length)return!0;for(let e of d){if(!1===s.get(c.exchangeBetween[t],e.requiredItemKey,!1)&&!1===e.autoRemoveRequirement)return!1;let l=h.findItemByKey(e.requiredItemKey);if(!1===l)return r.error("The required item not longer exists.",i,e.requiredItemKey),!1;let u=e.requiredQuantity*a,d=!1===h.dropExchange&&o.createItemInstance(e.requiredItemKey,u);if(h.frozenItems[l.uid]=Object.assign({},l),!1===await h.decreaseItemQty(l.uid,u))return r.error("There was an error while decreasing the required item quantity.",e,l),!1;if(!1!==d){let e=s.isArray(d)?d:[d];if(!1===await h.addItems(e))return c.setError("Requirement add item error.",n.ERROR_CODES.REQUIREMENTS.ITEM_ADD,{},h.lastError),!1}}return!0}}},{b11112aa3d4db9e4:"idEfG","5342d6a91ce0343f":"lHuVm"}],"1sOiW":[function(e,t,i){let n=e("bddde17fed05deaa"),{Logger:r,sc:s}=e("918bdf09bd16e1b2");t.exports=class{constructor(e){this.rewardsByItemUid=s.get(e,"rewardsByItemUid",!0),this.rewardsByItemKey=s.get(e,"rewardsByItemKey",!0),this.rewardsTotals={}}validateRewards(e,t){let i=t.exchangeRewards[e];if(0===i.length)return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;let o=t.oppositeKey(e);for(let h of(this.rewardsTotals={},a)){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.MISSING_ITEM,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRewards(i,l);if(!1!==u&&0!==u.length&&(this.plusRewardsQuantity(u,a),!this.validateItemRewards(u,a,o,t)))return!1}return!0}fetchItemRewards(e,t){if(!t)return r.error("Item does not exits on inventory.",t),!1;let i=[];return this.rewardsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.rewardsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRewardsQuantity(e,t){for(let i of e)s.hasOwn(this.rewardsTotals,i.rewardItemKey)||(this.rewardsTotals[i.rewardItemKey]=0),this.rewardsTotals[i.rewardItemKey]+=i.rewardQuantity*t}validateItemRewards(e,t,i,r){if(0===e.length)return!0;for(let t of e){if(!1===t.rewardItemIsRequired)continue;let e=r.inventories[i].findItemByKey(t.rewardItemKey);if(!1===e)return r.setError('Reward item "'+t.rewardItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:t.rewardItemKey,inventoryKeyTo:i}),!1;if(this.rewardsTotals[t.rewardItemKey]>e.qty)return r.setError("Reward item "+t.rewardItemKey+" reward quantity ("+t.rewardQuantity+') is not available on inventory "'+i+'".',n.ERROR_CODES.REWARD.QUANTITY_NOT_AVAILABLE,{rewardItemKey:t.rewardItemKey,rewardQuantity:t.rewardQuantity,inventoryKeyTo:i}),!1}return!0}async processRewards(e,t,i,r,a,o){let h=o.exchangeRewards[e];if(0===h.length)return!0;let c=o.oppositeKey(e),l=o.exchangeBetween[e][i];if(!l)return o.setError('Missing pushed for exchange item "'+i+'".',n.ERROR_CODES.REWARD.MISSING_PUSHED,{itemUid:i}),!1;let u=s.get(r.items,i,s.get(r.frozenItems,i,!1));if(!1===u)return o.setError('Reward error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REWARD.GET_ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let d=this.fetchItemRewards(h,u);return!1===d||0===d.length||!!await this.processItemRewards(d,r,a,c,l,i,o)||(o.setError('Process item reward error, item "'+i+'".',n.ERROR_CODES.REWARD.PROCESS_ITEM,{itemUid:i}),!1)}async processItemRewards(e,t,i,a,o,h,c){if(0===e.length)return!0;for(let l of e){let e=l.rewardQuantity*o;if(!1===l.rewardItemIsRequired){let i=t.createItemInstance(l.rewardItemKey,e),r=s.isArray(i)?i:[i];if(!1===await t.addItems(r)){if(""!==t.lastError.message)return c.setError("Rewards process inventory error.",n.ERROR_CODES.REWARD.PROCESS_ITEM,{},t.lastError),!1;let e=Object.keys(r).join(",");return c.setError("Rewards error on add items: "+e+".",n.ERROR_CODES.REWARD.ADD_ITEMS,{itemsKeys:e}),!1}continue}let u=c.inventories[a].findItemByKey(l.rewardItemKey);if(!1===u)return c.setError('Reward item "'+l.rewardItemKey+'" is not present on inventory "'+a+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:l.rewardItemKey,inventoryKeyTo:a}),!1;if(e>u.qty)return c.setError("Reward quantity ("+e+") is bigger than the available in the inventory ("+u.qty+").",n.ERROR_CODES.REWARD.QUANTITY_OVERLOAD,{rewardQuantityTotal:e,rewardInventoryItemQty:u.qty}),!1;let d=i.findItemByKey(l.rewardItemKey);if(!1===d)return r.error("The reward item not longer exists.",h,l.rewardItemKey),!1;let f=t.createItemInstance(l.rewardItemKey,e);if(i.frozenItems[d.uid]=Object.assign({},d),!1===await i.decreaseItemQty(d.uid,l.requiredQuantity))return r.error("There was an error while decreasing the reward item quantity.",l,d),!1;await t.addItem(f)}return!0}}},{bddde17fed05deaa:"idEfG","918bdf09bd16e1b2":"lHuVm"}],"8cYlw":[function(e,t,i){let{ObjectsConst:n}=e("df12497da2e014ac"),{Logger:r,sc:s}=e("bc3fcd89e3b4517e");t.exports.DropsMessageListener=class{static listenMessages(e,t){e.onMessage("*",e=>{let i=s.get(e,n.DROPS.KEY,!1);i&&this.loadObjects(i,t),n.DROPS.REMOVE===e.act&&this.removeDropById(e.id,t)})}static loadObjects(e,t){let i=t.getActiveScene(),n=t.config,r=t.getFeature("objects"),s=i.load;if(!this.validateParams({currentScene:i,gameConfig:n,objectPlugin:r,loader:s}))return!1;for(let[t,a]of Object.entries(e))this.loadSpritesheet(a,s,n),s.once("complete",async e=>{await this.createDropAnimation(r,a,t,i)});return s.start(),!0}static async createDropAnimation(e,t,i,r){let s={type:n.DROPS.PICK_UP_ACT,enabled:!0,ui:!0,frameStart:t[n.DROPS.PARAMS].start,frameEnd:t[n.DROPS.PARAMS].end,repeat:t[n.DROPS.PARAMS].repeat,autoStart:!0,key:i,id:i,targetName:"",layerName:i,isInteractive:!0,asset_key:t[n.DROPS.ASSET_KEY],x:t.x,y:t.y,yoyo:t[n.DROPS.PARAMS].yoyo};return await e.createAnimationFromAnimData(s,r)}static loadSpritesheet(e,t,i){t.spritesheet(e[n.DROPS.ASSET_KEY],this.getSpritesheetPath(e),this.getRewardFrameConfig(e[n.DROPS.PARAMS],i))}static getRewardFrameConfig(e,t){return{frameWidth:s.get(e,"frameWidth",t.getWithoutLogs("client/map/dropsTile/width",t.get("client/map/tileData/width"))),frameHeight:s.get(e,"frameHeight",t.getWithoutLogs("client/map/dropsTile/height",t.get("client/map/tileData/height")))}}static getSpritesheetPath(e){return n.DROPS.ASSETS_PATH+e[n.DROPS.FILE]}static removeDropById(e,t){if(!e)return!1;let i=t.activeRoomEvents.getActiveScene(),n=s.get(i.objectsAnimations,e,!1);if(!n)return!1;n.sceneSprite.destroy(),delete i.objectsAnimations[e]}static validateParams(e){let t=!0;return s.get(e,"currentScene",!1)||(r.error("Scene is undefined in Rewards Message Listener."),t=!1),s.get(e,"gameConfig",!1)||(r.error("Game Config is undefined in Rewards Message Listener."),t=!1),s.get(e,"objectPlugin",!1)||(r.error("Object Plugin is undefined in Rewards Message Listener."),t=!1),s.get(e,"loader",!1)||(r.error("Loader is undefined in Rewards Message Listener."),t=!1),t}}},{df12497da2e014ac:"izuLV",bc3fcd89e3b4517e:"3lwy5"}],hznMs:[function(e,t,i){t.exports={objects:{npcInvalid:"I do not understand.",trader:{content:"Hi there! What would you like to do?",options:{buy:"Buy",sell:"Sell"},buyConfirmed:"Thanks for buying!",sellConfirmed:"Thanks for your products!"}}}},{}],bzImH:[function(e,t,i){let{GameConst:n}=e("d90cf3ac18adcc93"),{Logger:r,sc:s}=e("981fc13f3ba6a83c");t.exports.UserInterface=class{constructor(e,t,i="/assets/html/dialog-box.html",n){this.events=e.events,this.gameDom=e.gameDom,this.initialTitle="",this.initialContent="",this.id=t.id,this.animProps=t,this.template=i,this.uiPositionKey=n||"default",this.openButton=null,this.closeButton=null,this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforePreload",e=>{this.preloadUiElement(e)}),this.events.on("reldens.createPreload",(e,t)=>{this.createUiElement(t)})}preloadUiElement(e){this.template&&e.load.html(this.id,this.template)}createUiElement(e,t=""){""===t&&(t=this.id);let i="box-"+this.id;if(s.get(e.elementsUi,this.id))return this;let n=this.createDialogBox(e,t);this.createBoxContent(e,t,n);let a=this.gameDom.getElement(".ui-box.ui-dialog-box",n.node);return a?(a.id=i,a.classList.add("type-"+(this.animProps?.type||"dialog-box")),this.activateOpenButton(n,a,e),this.activateCloseButton(n,a,e),e.userInterfaces[this.id]=this,e.elementsUi[this.id]=n,this):(r.critical('Missing dialog container for template key: "'+t+'".',{dialogBox:n,dialogContainer:a,objectElementId:i}),!1)}createDialogBox(e,t){let{newWidth:i,newHeight:n}=e.gameManager.gameEngine.getCurrentScreenSize(e.gameManager),{uiX:r,uiY:s}=e.getUiPosition(this.uiPositionKey,i,n);return e.add.dom(r,s).createFromCache(t)}createBoxContent(e,t,i){let n=e.cache.html.get(t);i.innerHTML=e.gameManager.gameEngine.parseTemplate(n,{title:this.initialTitle,content:this.initialContent})}activateOpenButton(e,t,i){return this.openButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_OPEN,e.node),!!this.openButton&&(this.openButton.id=n.UI_BOX+n.UI_OPEN+"-"+this.id,this.openButton.addEventListener("click",()=>{s.get(this.animProps,"defaultOpen",!0)&&(t.style.display="block",this.openButton.style.display="none",!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(this.animProps.depth)),s.isFunction(this.animProps.openCallBack)&&this.animProps.openCallBack(),this.events.emit("reldens.openUI",{ui:this,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})}),this.openButton)}activateCloseButton(e,t,i){if(this.closeButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_CLOSE,e.node),!this.closeButton)return!1;this.closeButton.id=n.UI_BOX+n.UI_CLOSE+"-"+this.id,this.closeButton.addEventListener("click",()=>{s.hasOwn(this.animProps,"sendCloseMessage")&&!1!==this.animProps.sendCloseMessage||i.gameManager.activeRoomEvents.send({act:n.CLOSE_UI_ACTION,id:this.id}),s.get(this.animProps,"defaultClose",!0)&&(t.style.display="none",this.openButton&&(this.openButton.style.display="block"),!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(1)),s.isFunction(this.animProps.closeCallback)&&this.animProps.closeCallback(),this.events.emit("reldens.closeUI",{ui:this,closeButton:this.closeButton,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})})}}},{d90cf3ac18adcc93:"93TbC","981fc13f3ba6a83c":"3lwy5"}],"83Jlt":[function(e,t,i){let{InventoryUi:n}=e("3dbcaecc16a8d7f6"),{InventoryReceiver:r}=e("1b246d1f86d4b52c"),{TradeTargetAction:s}=e("e34196023b491a43"),{TradeMessageListener:a}=e("4891eeec00749c11"),{UserInterface:o}=e("c8568ca446361435"),{PluginInterface:h}=e("f9e95a5e7b3e4385"),{TemplatesHandler:c}=e("9a0084a090b55a0d"),{TranslationsMapper:l}=e("3a8304cb1916a776"),u=e("26049dfb393d7854"),{InventoryConst:d}=e("5532f77de2576b30"),{ItemsEvents:f,ItemsConst:p}=e("75f9030ce424b588"),{GameConst:g}=e("28a98a79420c2754"),{Logger:m,sc:v}=e("ddf286423098af38");t.exports.InventoryPlugin=class extends h{setup(e){this.gameManager=v.get(e,"gameManager",!1),this.gameManager||m.error("Game Manager undefined in InventoryPlugin."),this.events=v.get(e,"events",!1),this.events||m.error("EventsManager undefined in InventoryPlugin."),this.tradeTargetAction=new s,this.setTradeUi(),this.listenEvents(),this.setListener(),this.setTranslations()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,u,d.MESSAGE.DATA_VALUES)}setTradeUi(){if(!this.gameManager)return!1;this.tradeUi=new o(this.gameManager,{id:"trade",type:"trade"})}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.trade=new a}listenEvents(){if(!this.events)return!1;this.events.on("reldens.playersOnAdd",(e,t,i,n)=>{this.onPlayerAdd(t,n,e)}),this.events.on("reldens.preloadUiScene",e=>{c.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>this.onPreloadUiScene(e)),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{this.tradeTargetAction.showTargetExchangeAction(this.gameManager,t,i,n)})}onPreloadUiScene(e){this.uiManager=new n(e),this.uiManager.createUi();let t=e.getUiElement("inventory").getChildByProperty("id",d.INVENTORY_ITEMS);if(!t)return m.error("Inventory UI not found.",t),!1;let i=e.getUiElement("equipment").getChildByProperty("id",d.EQUIPMENT_ITEMS);if(!i)return m.error("Equipment UI not found.",i),!1;let r=e.gameManager.inventory.manager,s=v.get(r,"groups",{});if(Object.keys(s).length)for(let t of(e.gameManager.gameDom.getElement("#"+d.EQUIPMENT_ITEMS).innerHTML="",this.sortGroups(s))){let i=this.createGroupBox(s[t],e.gameManager,e);e.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}let a=v.get(r,"items",{}),o=Object.keys(a);if(0{t.gameManager.inventory.processMessage(e)})}createInventoryInstance(e,t){let i={owner:e,ownerIdProperty:"sessionId",gameManager:t.gameManager},n=t.gameManager.config.getWithoutLogs("client/customClasses/inventory/items",{});n&&0{let s=this.createItemBox(r,"inventoryItem",n,e);n.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(t,r.getInventoryId(),r,e)},n.inventory.manager.getOwnerUniqueEventKey("addItemPack"),r),n.inventory.manager.listenEvent(f.SET_ITEMS,n=>{for(let r of(t.innerHTML="",Object.keys(n.items))){let s=n.items[r];this.displayItem(s,e,i,t,r)}},n.inventory.manager.getOwnerUniqueEventKey("setItemsPack"),r),n.inventory.manager.listenEvent(f.MODIFY_ITEM_QTY,t=>{e.getUiElement("inventory").getChildByID("item-qty-"+t.getInventoryId()).innerHTML=t.qty},n.inventory.manager.getOwnerUniqueEventKey("modifyItemQtyPack"),r),n.inventory.manager.listenEvent(f.REMOVE_ITEM,(t,i)=>{e.getUiElement("inventory").getChildByID("item-"+i).remove()},n.inventory.manager.getOwnerUniqueEventKey("removeItemPack"),r),n.inventory.manager.listenEvent(f.SET_GROUPS,r=>{let s=!1,a=n.gameDom.getElement("#"+d.EQUIPMENT_ITEMS);for(let t of(""!==a.innerHTML&&(s=!0),a.innerHTML="",this.sortGroups(r.groups))){let i=this.createGroupBox(r.groups[t],n,e);n.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}s&&this.resetEquippedItemsDisplay(n,e,i,t)},n.inventory.manager.getOwnerUniqueEventKey("setGroupsPack"),r),n.inventory.manager.listenEvent(f.EQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("equipItemPack"),r),n.inventory.manager.listenEvent(f.UNEQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("unequipItemPack"),r)}resetEquippedItemsDisplay(e,t,i,n){let r=Object.keys(e.inventory.manager.items);if(0===r.length)return!1;for(let s of r){let r=e.inventory.manager.items[s];this.isEquipped(r)&&this.displayItem(r,t,i,n,r.getInventoryId())}}displayItem(e,t,i,n,r){let s=this.createItemBox(e,"inventoryItem",t.gameManager,t),a=t.gameManager.gameDom.getElement("#item-"+e.getInventoryId());if(a&&a.remove(),this.isEquipped(e)){let n=this.getGroupById(e.group_id,t.gameManager.inventory.manager.groups);n&&t.gameManager.gameDom.getElement("#group-item-"+n.key+" .equipped-item")?t.gameManager.gameDom.updateContent("#group-item-"+n.key+" .equipped-item",s):t.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,s),this.setupButtonsActions(i,r,e,t)}else t.gameManager.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(n,r,e,t)}updateEquipmentStatus(e,t){let i=t.gameDom.getElement("#item-equip-"+e.idx),n=e.equipped?"equipped":"unequipped";i.src="/assets/features/inventory/assets/"+n+g.FILES.EXTENSIONS.PNG}createItemBox(e,t,i,n){let r=n.cache.html.get(t);return i.gameEngine.parseTemplate(r,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,usable:this.isUsable(e)?this.getUsableContent(e,i,n):"",equipment:this.isEquipment(e)?this.getEquipContent(e,i,n):""})}isEquipment(e){return e.isType(p.TYPES.EQUIPMENT)||e.isType(p.TYPES.SINGLE_EQUIPMENT)}isEquipped(e){return this.isEquipment(e)&&!0===e.equipped}isUsable(e){return e.isType(p.TYPES.USABLE)||e.isType(p.TYPES.SINGLE_USABLE)}sortGroups(e){return Object.keys(e).sort((t,i)=>e[t].sort>e[i].sort?1:-1)}createGroupBox(e,t,i){let n=i.cache.html.get("inventoryGroup");return t.gameEngine.parseTemplate(n,{key:e.key,label:e.label,description:e.description,fileName:e.files_name})}setupButtonsActions(e,t,i,n){let r=n.gameManager.gameDom,s=e.querySelector("#item-"+t+" .image-container img");if(!s)return m.error(["Missing image element.","#item-"+t]),!1;s.addEventListener("click",()=>{let i=e.querySelector("#item-"+t+" .item-data-container"),n=!1;"block"!==i.style.display&&(n=!0),e.querySelectorAll(".item-box .image-container img").forEach(function(e){e.style.border="none"}),e.querySelectorAll(".item-data-container").forEach(function(e){e.style.display="none"}),n&&(s.style.border="1px solid #fff",i.style.display="block")});let a=e.querySelector("#item-trash-"+t+" img");if(!a)return m.error(["Missing button.",a]),!1;a.addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="block"}),e.querySelector("#trash-cancel-"+t).addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="none"}),e.querySelector("#trash-confirmed-"+t).addEventListener("click",()=>{let e={idx:t,act:d.ACTIONS.REMOVE};n.gameManager.activeRoomEvents.send(e)}),this.isUsable(i)&&r.getElement("#item-use-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.USE,n)),this.isEquipment(i)&&r.getElement("#item-equip-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.EQUIP,n))}clickedBox(e,t,i){i.gameManager.activeRoomEvents.send({act:t,idx:e})}getUsableContent(e,t,i){let n=i.cache.html.get("inventoryItemUse");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId()})}getEquipContent(e,t,i){let n=i.cache.html.get("inventoryItemEquip");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId(),equipStatus:e.equipped?"equipped":"unequipped"})}getGroupById(e,t){let i=Object.keys(t);if(0===i.length)return!1;for(let n of i)if(t[n].id===e)return t[n]}}},{"3dbcaecc16a8d7f6":"i4XYr","1b246d1f86d4b52c":"ecHHP",e34196023b491a43:"2sgZT","4891eeec00749c11":"7M3Uu",c8568ca446361435:"bzImH",f9e95a5e7b3e4385:"fC3To","9a0084a090b55a0d":"hZf8u","3a8304cb1916a776":"1fcQw","26049dfb393d7854":"1SpFi","5532f77de2576b30":"19bl6","75f9030ce424b588":"g4GOK","28a98a79420c2754":"93TbC",ddf286423098af38:"3lwy5"}],i4XYr:[function(e,t,i){let{UiFactory:n}=e("77ab18c1eefc2684"),{InventoryConst:r}=e("55720af454786e61");t.exports.InventoryUi=class extends n{createUi(){this.create("inventory",5,!0,!0,null,()=>{this.inventoryVisibility("inventory")}),this.create("equipment",4,!0,!0,null,()=>{this.inventoryVisibility("inventory")})}inventoryVisibility(e){let t="#"+r[e+"_ITEMS"];for(let e of this.gameManager.gameDom.getElements(t+" .item-box .image-container img"))e.style.border="none";for(let e of this.gameManager.gameDom.getElements(t+" .item-data-container"))e.style.border="none"}}},{"77ab18c1eefc2684":"k6PNR","55720af454786e61":"19bl6"}],k6PNR:[function(e,t,i){let{GameConst:n}=e("33c9292d731c7911");t.exports.UiFactory=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager}create(e,t,i,r,s,a){let{uiX:o,uiY:h}=this.uiScene.getUiConfig(e),c=this.uiScene.add.dom(o,h).createFromCache(e),l=c.getChildByProperty("id",e+n.UI_OPEN),u=c.getChildByProperty("id",e+n.UI_CLOSE);l?.addEventListener("click",()=>{let n=c.getChildByProperty("id",e+"-ui");i&&(n&&(n.style.display="block"),l.style.display="none",c.setDepth(t)),s&&"function"==typeof s&&s(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:l,dialogBox:c,dialogContainer:n,uiScene:this.uiScene})}),u?.addEventListener("click",()=>{let t=c.getChildByProperty("id",e+"-ui");r&&(t&&(t.style.display="none"),c.setDepth(1),l&&(l.style.display="block")),a&&"function"==typeof a&&a(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:u,openButton:l,dialogBox:c,dialogContainer:t,uiScene:this.uiScene})}),this.uiScene.elementsUi[e]=c}}},{"33c9292d731c7911":"93TbC"}],"19bl6":[function(e,t,i){t.exports.InventoryConst={INVENTORY_ITEMS:"inventory-items",INVENTORY_OPEN:"inventory-open",INVENTORY_CLOSE:"inventory-close",EQUIPMENT_ITEMS:"equipment-items",EQUIPMENT_CLOSE:"equipment-close",EQUIPMENT_OPEN:"equipment-open",ANIMATION_KEY_PREFIX:"aK_",GROUP_BUCKET:"/assets/custom/groups",ACTIONS:{PREFIX:"ivp",REMOVE:"ivpRm",USE:"ivpUse",EQUIP:"ivpEqi",TRADE_START:"ivptStart",TRADE_ACCEPTED:"ivptAccepted",TRADE_SHOW:"ivptShow",TRADE_ACTION:"ivptAction"},MESSAGE:{DATA_VALUES:{NAMESPACE:"items"}}}},{}],ecHHP:[function(e,t,i){let{InventoryConst:n}=e("8882a4643448fce8"),{GameConst:r}=e("2bfdc54146457a66"),{Receiver:s}=e("c0cd661b4f31ab90"),{ErrorManager:a,Logger:o,sc:h}=e("86cd80d57b7740fd");t.exports.InventoryReceiver=class extends s{constructor(e){h.hasOwn(e,"gameManager")||a.error("InventoryReceiver gameManager not specified."),super(e),this.gameManager=e.gameManager,this.itemSprites={},this.itemsAnimations={}}onExecuting(e){let t=e.item;if(!h.hasOwn(t,"animationData"))return o.warning("Item does not contain animation data.",e),!1;let i=n.ANIMATION_KEY_PREFIX+t.key,s=this.gameManager.getActiveScene();if(this.itemSprites[i]&&this.itemSprites[i].anims&&s.anims.get(i))return o.debug("Animation already exists, playing: "+i),this.playSpriteAnimation(i,t),!1;s.load.spritesheet(i,"/assets/custom/sprites/"+t.key+r.FILES.EXTENSIONS.PNG,{frameWidth:t.animationData.frameWidth||64,frameHeight:t.animationData.frameHeight||64}).on("loaderror",e=>{o.error("Sprite load error: "+i,e)}),s.load.on("complete",()=>{o.debug("Scene load complete, playing: "+i),this.createItemSprites(i,t,e,s)}),s.load.start()}createItemSprites(e,t,i,n){let r=this.extractTargetId(t,i,n);if(!r)return o.error("Target ID not found."),!1;let s=h.get(n.player.players,r,!1);if(!s)return o.error("Player sprite not found by target ID."),!1;let a=n.anims.get(e);a||(o.debug("Creating new animation on scene: "+e),a=n.anims.create({key:e,frames:n.anims.generateFrameNumbers(e,{start:t.animationData.start||0,end:t.animationData.end||1}),frameRate:h.get(t.animationData,"frameRate",n.configuredFrameRate),repeat:t.animationData.repeat||3,hideOnComplete:h.get(t.animationData,"hide",!0),showOnStart:h.get(t.animationData,"showOnStart",!0)})),this.itemsAnimations[e]=a;let c=h.get(t.animationData,"fixedX",t.animationData.usePlayerPosition?s.x:0),l=h.get(t.animationData,"fixedY",t.animationData.usePlayerPosition?s.y:0);this.itemSprites[e]=n.physics.add.sprite(c,l,e),this.itemSprites[e]=this.itemSprites[e].setDepth(9e4),this.itemSprites[e].depthByPlayer="above",t.animationData.followPlayer&&(s.moveSprites[e]=this.itemSprites[e]),o.debug("Playing sprite: "+e),this.playSpriteAnimation(e,t).on("animationcomplete",()=>{t.animationData.destroyOnComplete&&this.destroyAnimation(t,e,s)})}playSpriteAnimation(e,t){h.get(t.animationData,"closeInventoryOnUse",!1)&&this.gameManager.gameDom.getElement("#inventory-close")?.click();let i=this.itemSprites[e].anims;return i?(i.visible=!0,i.play(e,h.get(t.animationData,"ignoreIfPlaying",!0))):(o.error("Sprite animation not found: "+e),!1)}destroyAnimation(e,t,i){this.itemSprites[t].destroy(),delete this.itemSprites[t],delete this.itemsAnimations[t],e.animationData.followPlayer&&delete i.moveSprites[t],o.debug("Animation and sprite destroyed: "+t)}extractTargetId(e,t,i){return e.animationData.startsOnTarget&&t.target?.playerId?t.target.playerId:i.player?.playerId||!1}}},{"8882a4643448fce8":"19bl6","2bfdc54146457a66":"93TbC",c0cd661b4f31ab90:"g4GOK","86cd80d57b7740fd":"3lwy5"}],"2sgZT":[function(e,t,i){let{InventoryConst:n}=e("6fd8a45050899827"),{GameConst:r}=e("27ccb472a3005f7d"),{Logger:s,sc:a}=e("b754ab6e7b18af41");t.exports.TradeTargetAction=class{showTargetExchangeAction(e,t,i,o){if(r.TYPE_PLAYER!==t.type||e.getCurrentPlayer().playerId===t.id)return!1;let h=e.gameEngine.uiScene;if(!1===a.get(h,"uiTarget",!1))return!1;let c=h.cache.html.get("inventoryTradeStart");if(!c)return s.critical('Template "inventoryTradeStart" not found.'),!1;e.gameDom.appendToElement("#target-container",e.gameEngine.parseTemplate(c,{playerName:o,playerId:t.id}));let l=e.gameDom.getElement(".start-trade-"+t.id+" button");if(!l)return s.critical('Trade start button not found for selector: ".start-trade-'+t.id+' button"'),!1;l.addEventListener("click",()=>{let i={act:n.ACTIONS.TRADE_START,id:t.id};e.activeRoomEvents.send(i)})}}},{"6fd8a45050899827":"19bl6","27ccb472a3005f7d":"93TbC",b754ab6e7b18af41:"3lwy5"}],"7M3Uu":[function(e,t,i){let{TradeMessageHandler:n}=e("f964b12ccb83d2b4"),{Logger:r,sc:s}=e("8a7eb9c3e6d9d186");t.exports.TradeMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on TradeMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on TradeMessageListener.",e),!1;new n({roomEvents:i,message:t}).updateContents()}}},{f964b12ccb83d2b4:"kzLY7","8a7eb9c3e6d9d186":"3lwy5"}],kzLY7:[function(e,t,i){let{ErrorManager:n,Logger:r,sc:s}=e("779d25f0124f02f2"),{InventoryConst:a}=e("58803c0e08c63617"),{ObjectsConst:o}=e("3ddb9dce645de8c3"),{UserInterface:h}=e("c49942f179cbbc0a");t.exports.TradeMessageHandler=class{constructor(e){this.roomEvents=s.get(e,"roomEvents",!1),this.message=s.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.validate()}validate(){this.roomEvents||n.error("Missing RoomEvents."),this.message||n.error("Missing message."),this.gameManager||n.error("Missing GameManager."),this.uiScene||n.error("Missing UiScene."),this.itemsManager||n.error("Missing ItemsManager.")}updateContents(){return a.ACTIONS.TRADE_START===this.message.act?this.showTradeRequest():a.ACTIONS.TRADE_SHOW===this.message.act?this.showTradeBox():void 0}showTradeRequest(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.config.getWithoutLogs("client/trade/titles/tradeRequestFromLabel","Trade request from:"),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:a.ACTIONS.TRADE_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-"+e)?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+e)?.click()})}showTradeBox(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.services.translator.t("items.tradeWith",{playerName:this.message.with}),content:"",options:{}});let t=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!t)return r.error('Missing container: "#box-'+e+' .box-content".'),!1;if(!0===this.message.isTradeEnd)return this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click(),!0;let i=s.get(this.message,"items",!1),n=s.get(this.message,"traderItemsData",{}),a=s.get(this.message,"exchangeData",{}),o=s.get(this.message,"playerToExchangeKey",{}),h="A"===o?"B":"A";this.updateItemsList(i,t,a[h]),this.updateMyExchangeData(a[h]||{},i,h),this.updateTraderExchangeData(a[o]||{},n,o)}createTradeUi(e){let t=s.get(this.roomEvents.tradeUi,e);return t||(this.roomEvents.tradeUi[e]=new h(this.gameManager,{id:e,type:"trade"},"/assets/html/dialog-box.html","trade"),this.roomEvents.tradeUi[e].createUiElement(this.uiScene,"trade")),t}updateItemsList(e,t,i){if(!e)return;let n="",r={};for(let t of Object.keys(e)){let a=e[t],o=Object.assign({manager:this.itemsManager},a,{uid:t}),h=s.get(this.itemsManager.itemClasses,o.key,this.itemsManager.types.classByTypeId(o.type));r[t]=new h(o),r[t].quantityDisplay=1,r[t].quantityMaxDisplay=Math.max(r[t].qty_limit,a.qty),r[t].tradeAction="trade",n+=this.createTradeItemBox(r[t],s.get(i,r[t].uid,!1))}t.innerHTML=this.createTradeContainer(n),this.activateItemsBoxActions(r),this.activateConfirmButtonAction()}activateConfirmButtonAction(){let e=this.gameManager.gameDom.getElement(".confirm-"+this.message.id);e?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.CONFIRM})});let t=this.gameManager.gameDom.getElement(".disconfirm-"+this.message.id);t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.DISCONFIRM})});let i=this.gameManager.gameDom.getElement(".cancel-"+this.message.id);i?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click()})}updateMyExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createConfirmItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-2");return s?(s.innerHTML=n,this.assignRemoveActions(e,t),!0):(r.error('Missing "'+i+'" items container.'),!1)}updateTraderExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createReceivingItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-3");return s?(s.innerHTML=n,!0):(r.error('Missing "'+i+'" items container.'),!1)}createConfirmItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on confirmation trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:this.createTradeActionRemove(a),tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}createReceivingItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on receive trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:"",tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}assignRemoveActions(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on remove trade-message-handler.",{message:this.message}),!1;for(let e of i){let i=".pushed-to-trade .trade-item-"+e,n=this.gameDom.getElement(i);if(!n){r.error('Assign trade item "'+e+'" container not found.');continue}let s=this.gameDom.getElement(".pushed-to-trade .trade-item-"+e+" .trade-action-remove");if(!s){r.error('Assign trade item "'+e+'" remove button not found.');continue}let h=t[e];s.addEventListener("click",()=>{n.classList.remove("hidden");let t={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:"remove",itemId:e,itemKey:h.key};t[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e){let t=this.uiScene.cache.html.get("inventoryTradePlayerContainer");if(!t)return r.error('Missing template "inventoryTradeContainer".'),"";let i=o.TRADE_ACTIONS_FUNCTION_NAME,n={tradeActionKey:this.message.id,confirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/confirmLabel",i.CONFIRM),disconfirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/disconfirmLabel",i.DISCONFIRM),cancelLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/cancelLabel",i.CANCEL),myItems:e,myItemsTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/myItems","My Items:"),pushedToTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/pushedToTradeTitle","Sending:"),gotFromTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/gotFromTradeTitle","Receiving:"),playerConfirmedLabel:this.playerConfirmedLabel()};return this.gameManager.gameEngine.parseTemplate(t,n)}playerConfirmedLabel(){return this.message.playerConfirmed?this.gameManager.config.getWithoutLogs("client/trade/titles/playerConfirmedLabel","%playerName CONFIRMED").replace("%playerName",this.message.with):""}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return r.error('Missing template "inventoryTradeItem".'),"";let n=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!n)return r.error('Missing template "inventoryTradeItemQuantity".'),"";let s=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}}},{"779d25f0124f02f2":"3lwy5","58803c0e08c63617":"19bl6","3ddb9dce645de8c3":"izuLV",c49942f179cbbc0a:"bzImH"}],hZf8u:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/inventory/templates/";e.load.html("inventory",t+"ui-inventory.html"),e.load.html("equipment",t+"ui-equipment.html"),e.load.html("inventoryItem",t+"item.html"),e.load.html("inventoryItemUse",t+"usable.html"),e.load.html("inventoryItemEquip",t+"equip.html"),e.load.html("inventoryGroup",t+"group.html"),e.load.html("inventoryTradeContainer",t+"trade-container.html"),e.load.html("inventoryTradePlayerContainer",t+"trade-player-container.html"),e.load.html("inventoryTradeRequirements",t+"trade-requirements.html"),e.load.html("inventoryTradeRewards",t+"trade-rewards.html"),e.load.html("inventoryTradeAction",t+"trade-action.html"),e.load.html("inventoryTradeActionRemove",t+"trade-action-remove.html"),e.load.html("inventoryTradeItem",t+"trade-item.html"),e.load.html("inventoryTradeItemQuantity",t+"trade-item-quantity.html"),e.load.html("inventoryTradeStart",t+"trade-start.html"),e.load.html("inventoryTradeAccept",t+"trade-accept.html")}}},{}],"1SpFi":[function(e,t,i){t.exports={items:{undefinedItem:"Add item error, undefined item.",undefinedMethodInventoryId:"Add item error, undefined getInventoryId.",undefinedItemKey:"Add item error, undefined item key.",invalidItemInstance:"Invalid item instance.",lockedForAddItem:"Inventory locked, cannot add item: %itemUid",maxTotalReachedForAddItem:"Cannot add item, max total reached.",itemExistsForAddItem:"Cannot add item, item already exists: %itemUid",itemLimitExceededForAddItem:"Cannot add item, item qty limit exceeded.",addItemsError:'Cannot add item "%itemUid".',lockedForSetItem:"Inventory locked, cannot set item: %itemUid.",lockedForRemoveItem:"Inventory locked, cannot remove item: %itemUid.",keyNotFound:"Cannot remove item, key not found: %itemUid.",lockedForModifyItemQty:"Inventory locked, cannot modify item qty: %itemUid.",undefinedItemKeyForOperation:'Cannot "%operation" item qty, undefined item key: %itemUid.',qtyNotANumber:'Cannot "%operation" item qty, quantity is not a number: %qty.',itemQtyLimitExceeded:'Cannot "%operation" item qty, item qty limit exceeded: %qty > %limitPerItem.',lockedForSetItems:"Inventory locked, cannot set items.",tradeWith:"Trading with %playerName",exchange:{missingConfirmation:"Missing confirmation.",invalidPushedQuantity:"Invalid item pushed quantity (%qty), available: %pushedItemQty.",invalidQuantity:"Invalid item quantity 0.",invalidExchange:'Inventories "FROM" and "TO" are the same, exchange cancelled.',decreaseQuantity:"Exchange inventory decrease error.",itemAdd:"Exchange add inventory result error."},requirements:{itemNotPresent:'Required item "%requiredItemKey" is not present.',quantityNotAvailable:'Required item "%requiredItemKey" quantity %totalRequiredQuantity is not available.',itemNotPushed:'Required item "%requiredItemKey" was not pushed for exchange.',itemQuantityNotPushed:'Required item "%requiredItemKey" quantity %totalRequiredQuantity was not pushed for exchange.',itemDoesNotExists:'Requirement error, item "%itemUid" does not exits on inventory.',itemAdd:"Requirement add item error."},reward:{doesNotExists:'Reward error, item "%itemUid" does not exits.',missingItem:'Reward error, item "%itemUid" does not exits.',itemNotPresent:'Reward item "%rewardItemKey" is not present on inventory.',quantityNotAvailable:"Reward item %rewardItemKey reward quantity (%rewardQuantity) is not available.",missingPushed:'Missing pushed for exchange item "%itemUid".',getItemDoesNotExists:'Reward error, item "%itemUid" does not exits on inventory.',processItem:'Process item reward error, item "%itemUid".',processInventory:"Rewards process inventory error.",addItems:"Rewards error on add items: %itemsKeys.",quantityOverload:"Reward quantity (%rewardQuantityTotal) is bigger than the available in the inventory (%rewardInventoryItemQty)."},equipment:{modifiersApply:"Cannot apply modifiers the item is not equipped: %itemUid",modifiersRevert:"Cannot revert modifiers the item is not equipped: %itemUid"}}}},{}],enPaX:[function(e,t,i){let{SkillsUi:n}=e("6b2d3727d1d70b78"),{PluginInterface:r}=e("c34bb8f0c81f8738"),{PlayerSelector:s}=e("566ebfe7409d2a3a"),{PreloaderHandler:a}=e("7af81ec0e9446267"),{MessagesHandler:o}=e("699da6696693061c"),{GameManagerEnricher:h}=e("c162e687344f571d"),c=e("37b783bb3d5ca68"),{TranslationsMapper:l}=e("f892bc1afce6c5ea"),{ActionsConst:u}=e("dbdea295dce66b04"),{Logger:d,sc:f}=e("1ad70aa0a704e98c");t.exports.ActionsPlugin=class extends r{setup(e){this.gameManager=f.get(e,"gameManager",!1),this.gameManager||d.error("Game Manager undefined in ActionsPlugin."),this.events=f.get(e,"events",!1),this.events||d.error("EventsManager undefined in ActionsPlugin."),this.playerSelector=new s(e),this.preloaderHandler=new a(e),this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,c,u.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager)return!1;this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createPreload",e=>{this.preloaderHandler.createAnimations(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi()}),this.events.on("reldens.beforeCreateEngine",e=>{this.playerSelector.populateClassesSelector(f.get(e,"classesData",{}),e.gameConfig.client.players,e.player)}),this.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{o.processOrQueueMessage(e,this.gameManager)})}),this.events.on("reldens.playersOnAddReady",e=>{h.withReceiver(e.player,e.roomEvents,this.gameManager)})}}},{"6b2d3727d1d70b78":"fKq6g",c34bb8f0c81f8738:"fC3To","566ebfe7409d2a3a":"6tkLj","7af81ec0e9446267":"asAAa","699da6696693061c":"gldsT",c162e687344f571d:"4okuX","37b783bb3d5ca68":"8JSjE",f892bc1afce6c5ea:"1fcQw",dbdea295dce66b04:"59VA7","1ad70aa0a704e98c":"3lwy5"}],fKq6g:[function(e,t,i){let{ActionsConst:n}=e("fcb0bd426e0a1381");t.exports.SkillsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.defaultAction=this.gameManager.config.get("client/ui/controls/defaultActionKey")}createUi(){let e=n.SELECTORS.UI_PLAYER_EXTRAS;this.appendToUiContainer(e,"skillsClassPath"),this.appendToUiContainer(e,"skillsLevel"),this.appendToUiContainer(e,"skillsExperience",{experienceLabel:this.gameManager.services.translator.t(n.SNIPPETS.EXPERIENCE_LABEL)}),this.createUiBox("skills",7)}appendSkills(e){let t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t!==this.defaultAction&&this.createSkillBox(t)}}appendToUiContainer(e,t,i={}){let n=this.uiScene.cache.html.get(t);0{let t=e.options[e.selectedIndex].dataset.key;n.style.backgroundImage=`url('/assets/custom/sprites/${t}${r.FILES.EXTENSIONS.PNG}')`}),t.append(n)}}},{b243e92bb3fe291b:"59VA7","99fe71ca25218501":"93TbC","350db309ac69e57e":"3lwy5"}],asAAa:[function(e,t,i){let{Logger:n,sc:r}=e("282e615b5cb3f89e"),{GameConst:s}=e("1d3a9c826831f334");t.exports.PreloaderHandler=class{constructor(e){this.gameManager=r.get(e,"gameManager",!1),this.gameManager||n.error("Game Manager undefined in ActionsPlugin PreloaderHandler."),this.events=r.get(e,"events",!1),this.events||n.error("EventsManager undefined in ActionsPlugin PreloaderHandler."),this.setProperties(e)}setProperties(e){if(!this.gameManager)return!1;this.gameDom=this.gameManager.gameDom,this.initialGameData=this.gameManager.initialGameData,this.levelsAnimConfig=this.gameManager.config.get("client/levels/animations"),this.skillsAnimConfig=this.gameManager.config.get("client/skills/animations"),this.assetsCustomActionsSpritesPath=r.get(e,"assetsCustomActionsSpritesPath","assets/custom/actions/sprites/"),this.gameManager.loadedAssets||(this.gameManager.loadedAssets={}),this.gameManager.createdAnimations||(this.gameManager.createdAnimations={})}loadContents(e){e.load.html("skillsClassPath","/assets/features/skills/templates/ui-class-path.html"),e.load.html("skillsLevel","/assets/features/skills/templates/ui-level.html"),e.load.html("skillsExperience","/assets/features/skills/templates/ui-experience.html"),e.load.html("skills","/assets/features/skills/templates/ui-skills.html"),e.load.html("skillBox","/assets/features/skills/templates/ui-skill-box.html"),e.load.html("actionBox","/assets/html/ui-action-box.html"),this.preloadClassPaths(e),this.loopAnimationsAnd(this.levelsAnimConfig,"preload",e),this.loopAnimationsAnd(this.skillsAnimConfig,"preload",e)}preloadClassPaths(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return!1;for(let i of Object.keys(t)){let n=t[i].key;e.load.spritesheet(n,"/assets/custom/sprites/"+n+s.FILES.EXTENSIONS.PNG,e.playerSpriteSize).on("filecomplete",async e=>{this.gameManager.loadedAssets[e]=e})}}createAnimations(e){let t=this.levelsAnimConfig;this.loopAnimationsAnd(t,"create",e);let i=this.skillsAnimConfig;this.loopAnimationsAnd(i,"create",e),this.createAvatarsAnimations(e)}createAvatarsAnimations(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return n.debug("Classes data not found. Fallback to player avatar."),!1;for(let i of(this.gameManager.mappedAvatars||(this.gameManager.mappedAvatars={}),n.debug({availableClassesData:t}),Object.keys(t))){let r=t[i].key;this.gameManager.loadedAssets[r]||(r=s.IMAGE_PLAYER,n.info('Avatar for class path "'+r+'" not found in assets. Fallback to player avatar.')),this.gameManager.mappedAvatars[r]=r,e.createPlayerAnimations(r)}return this.gameManager.mappedAvatars}loopAnimationsAnd(e,t,i){if(!e)return n.warning("Animations not found.",e),!1;for(let r of Object.keys(e)){let s=e[r];if(!s.animationData.enabled){n.debug('Animation "'+r+'" not enabled, skipping.',s);continue}n.debug({[t+"Animation"]:s}),this[t+"Animation"](s,i)}}preloadAnimation(e,t){r.hasOwn(e.animationData,["type","img"])&&s.ANIMATIONS_TYPE.SPRITESHEET===e.animationData.type&&this.preloadAnimationsInDirections(e,t),e.classKey&&r.isFunction(e.classKey.prepareAnimation)&&e.classKey.prepareAnimation({data:e,uiScene:t,pack:this})}preloadAnimationsInDirections(e,t){let i=r.get(e.animationData,"dir",0);if(0===i){t.load.spritesheet(this.getAnimationKey(e),this.assetsCustomActionsSpritesPath+e.animationData.img+s.FILES.EXTENSIONS.PNG,e.animationData);return}(1===i||2===i)&&(this.preloadSpriteInDirection(t,e,s.UP),this.preloadSpriteInDirection(t,e,s.DOWN)),(1===i||3===i)&&(this.preloadSpriteInDirection(t,e,s.LEFT),this.preloadSpriteInDirection(t,e,s.RIGHT))}preloadSpriteInDirection(e,t,i){e.load.spritesheet(this.getAnimationKey(t,i),this.assetsCustomActionsSpritesPath+t.animationData.img+"_"+i+s.FILES.EXTENSIONS.PNG,t.animationData)}createAnimation(e,t){if(r.hasOwn(e.animationData,["type","img"])&&e.animationData.type===s.ANIMATIONS_TYPE.SPRITESHEET){let i=r.get(e.animationData,"dir",0);0this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],igll6:[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&tr&&t[r],a=!1;h.hasOwn(e,s)&&(a=e[s]),h.hasOwn(a,"key")&&a.key-n.key>0&&await this.createAndAutofillLevelsInstances(n,a)}}async createAndAutofillLevelsInstances(e,t){for(let i=e.key+1;ie[i][t]>e[n][t]?1:-1)}async levelUp(){let e=Object.keys(this.levels).pop();if(this.currentLevel>=this.levels[e].key)return!1;this.currentLevel++,await this.applyLevelModifiers(),await this.fireEvent(n.LEVEL_UP,this)}async levelDown(){if(1>=this.currentLevel)return!1;await this.applyLevelModifiers(!0),this.currentLevel--,await this.fireEvent(n.LEVEL_DOWN,this)}async applyLevelModifiers(e){let t=this.getLevelInstance(this.currentLevel);if(!t)return o.error(["Current level instance not found.","Current Level Key:",this.currentLevel]),!1;if(await this.fireEvent(n.LEVEL_APPLY_MODIFIERS,this,t),!t.modifiers)return!1;for(let i of t.modifiers)e?i.revert(this.owner):i.apply(this.owner)}getLevelInstance(e){return h.get(this.levels,e,!1)}async addExperience(e){let t=this.currentExp+e,i=this.levelsByExperience.indexOf(this.currentLevel.toString()),r=i+1,s=this.levelsByExperience[r],a=this.levels[s],o=0,c=!1;if(h.hasOwn(this.levels,this.currentLevel)&&a&&t>=a.requiredExperience){for(let e of this.levelsByExperience.slice(r))if(t>=this.levels[e].requiredExperience&&(c=!0,await this.levelUp()),t=e.modifiers.length)&&r.warning("Level modifiers were not specified.","Level ID:",e.id," - Key:",e.key),this.key=parseInt(e.key),this.modifiers=e.modifiers,this.label=s.get(e,"label",e.key),this.requiredExperience=s.get(e,"requiredExperience",s.get(e,"required_experience",0))}}},{faf9f4d0a81cecea:"7GVS0"}],cBYkx:[function(e,t,i){let n=e("1a8b79feac2da9b0"),r=e("867678cea9a9cfca"),{PropertyManager:s,Condition:a,Calculator:o}=e("2b878b9cf457d0fc"),{InteractionArea:h,EventsManagerSingleton:c,ErrorManager:l,Logger:u,sc:d}=e("cfa6f665a4da61d4");t.exports=class{constructor(e){d.hasOwn(e,"key")||l.error("Missing skill key."),d.hasOwn(e,"owner")||l.error("Missing skill owner."),"function"!=typeof e.owner.getPosition&&l.error("Undefined owner position method."),this.key=e.key,this.owner=e.owner,this.ownerIdProperty=d.get(e,"ownerIdProperty","id"),this.type=n.SKILL.TYPE.BASE,this.customData=d.get(e,"customData",!1),this.autoValidation=d.get(e,"autoValidation",!1),this.skillDelay=d.get(e,"skillDelay",0),this.castTime=d.get(e,"castTime",0),this.owner.isCasting=!1,this.owner.castingTimer=!1,this.isValid=!0,this.usesLimit=d.get(e,"usesLimit",0),this.uses=0,this.canActivate=d.get(e,"canActivate",!0),this.range=d.get(e,"range",0),this.skillActivationTimer=!1,this.lastState="",this.groups=d.get(e,"groups",[]),this.lastAppliedModifiers={},this.rangeAutomaticValidation=d.get(e,"rangeAutomaticValidation",!1),this.rangePropertyX=d.get(e,"rangePropertyX",!1),this.rangePropertyY=d.get(e,"rangePropertyY",!1),this.rangeTargetPropertyX=d.get(e,"rangeTargetPropertyX",!1),this.rangeTargetPropertyY=d.get(e,"rangeTargetPropertyY",!1),this.allowSelfTarget=d.get(e,"allowSelfTarget",!1),this.target=d.get(e,"target",!1),this.events=d.get(e,"events",c),this.ownerConditions=d.get(e,"ownerConditions",[]),this.ownerEffects=d.get(e,"ownerEffects",[]),this.criticalChance=d.get(e,"criticalChance",0),this.criticalMultiplier=d.get(e,"criticalMultiplier",1),this.criticalFixedValue=d.get(e,"criticalFixedValue",0),this.propertyManager=new s,this.calculator=new o}validate(){return(this.isValid=!0,this.fireEvent(r.VALIDATE_BEFORE,this).catch(e=>{u.error(e)}),!this.canActivate||this.owner.isCasting)?(this.lastState=n.SKILL_STATES.CAN_NOT_ACTIVATE,!1):!!this.validateConditions()&&(!(0=this.usesLimit))&&(0{this.canActivate=!0},this.skillDelay)):this.canActivate=!0,this.fireEvent(r.VALIDATE_SUCCESS,this).catch(e=>{u.error(e)}),this.isValid)}validateConditions(){for(let e of this.ownerConditions)if(e instanceof a||l.error(["Wrong Condition instance.",typeof e,"was specified."]),!e.isValidOn(this.owner))return this.fireEvent(r.VALIDATE_FAIL,this,e).catch(e=>{u.error(e)}),!1;return!0}validateRange(e){this.rangePropertyX&&this.rangePropertyY||l.error("Missing range properties for validation.");let t={x:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyX),y:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyY)},i={x:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyX||this.rangePropertyX),y:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyY||this.rangePropertyY)};return this.isInRange(t,i)}isInRange(e,t){if(this.fireEvent(r.SKILL_BEFORE_IN_RANGE,this).catch(e=>{u.error(e)}),0===this.range)return!0;let i=new h;i.setupInteractionArea(this.range,t.x,t.y);let n=i.isValidInteraction(e.x,e.y);return this.fireEvent(r.SKILL_AFTER_IN_RANGE,this,n).catch(e=>{u.error(e)}),n}async execute(e){if(await this.fireEvent(r.SKILL_BEFORE_EXECUTE,this,e),e&&(this.target=e),this.target||l.error("Target undefined."),!this.onExecuteConditions()||await this.isValidRange(e)||this.autoValidation&&!this.validate())return!1;let t=!1;return this.ownerEffects&&(this.applyModifiers(this.ownerEffects,this.owner,!0),await this.fireEvent(r.SKILL_APPLY_OWNER_EFFECTS,this,e)),0{t=this.finishExecution(e),this.owner.isCasting=!1,this.fireEvent(r.SKILL_AFTER_CAST,this,e,t)},this.castTime)):t=await this.finishExecution(e),this.uses++,await this.onExecuteRewards(),await this.fireEvent(r.SKILL_AFTER_EXECUTE,this,e),t}async isValidRange(e){return this.rangeAutomaticValidation&&this.rangePropertyX&&this.rangePropertyY&&!await this.validateRange(e)}async finishExecution(e){await this.fireEvent(r.SKILL_BEFORE_RUN_LOGIC,this,e);let t=await this.runSkillLogic();return await this.fireEvent(r.SKILL_AFTER_RUN_LOGIC,this,e),t}onExecuteConditions(){return!0}async runSkillLogic(){return!0}async onExecuteRewards(){}applyCriticalValue(e){return this.isCritical()&&(this.criticalMultiplier&&(e*=this.criticalMultiplier),this.criticalFixedValue&&(e+=this.criticalFixedValue)),e}getCriticalDiff(e){return this.applyCriticalValue(e)-e}isCritical(){return!(this.criticalChance<=0)&&this.criticalChancet*this.dodgeOverAimSuccess)return this.lastState=s.SKILL_STATES.DODGED,!1;let n=this.getAffectedPropertyValue(e);if(!this.allowEffectBelowZero&&0>=n)return!1;let a=this.getDiffProportion(t,i),o=this.applyDirectDamage?this.hitDamage:this.calculateProportionDamage(e,this.hitDamage,i,t,a);o+=this.calculateCriticalDamage(o,i,t,a);let c=!this.allowEffectBelowZero&&ni?r:(this.lastState=s.SKILL_STATES.APPLIED_CRITICAL_DAMAGE,r-Math.floor(r*n/100))}calculateProportionDamage(e,t,i,n,r){let s=this.getPropertiesTotal(this.owner,this.attackProperties),a=this.getPropertiesTotal(e,this.defenseProperties),o=s-a;if(o>0){let e=o99?99:e)*t/100);t+=i}if(o<0){let e=-o99?99:e)*t/100);t-=i}if(this.damageAffected&&i>n){let e=Math.floor(t*r/100);t-=e}return t}getPropertiesTotal(e,t){if(!e)return h.warning("Missing object to get properties total."),!1;if(0===t.length)return 0;try{let i=0;for(let n of t){let t=this.propertyManager.getPropertyValue(e,n);i=o.hasOwn(this.propertiesTotalOperators,n)?this.calculator.calculateNewValue(i,this.propertiesTotalOperators[n],t):i+t}return i}catch(e){return h.debug(e.message),!1}}getDiffProportion(e,t){return 100*(t-e)/e}getAffectedPropertyValue(e){return this.propertyManager.getPropertyValue(e,this.affectedProperty)}setAffectedPropertyValue(e,t){return this.propertyManager.setOwnerProperty(e,this.affectedProperty,t)}}},{"9dba7a1ed3b87f64":"cBYkx",d7a74c1b6b680357:"9PsTy",db39812edc044706:"6b010",fbb03c16891d35a5:"7GVS0"}],j4v88:[function(e,t,i){let n=e("e44f791774823c1"),r=e("2db6f1da8a2a090f"),s=e("7b8b51bc133daece"),{ErrorManager:a,sc:o}=e("fba4e87138a39fd8");t.exports=class extends n{constructor(e){super(e),this.type=s.SKILL.TYPE.EFFECT,o.hasOwn(e,"targetEffects")||a.error("Missing targetEffects for skill."),this.targetEffects=e.targetEffects}async runSkillLogic(){if(this.lastState=null,!this.validateRange(this.target))return this.lastState=s.SKILL_STATES.OUT_OF_RANGE,!1;this.lastState=s.SKILL_STATES.APPLYING_EFFECTS,this.applyModifiers(this.targetEffects,this.target),this.lastState=s.SKILL_STATES.APPLIED_EFFECTS,await this.fireEvent(r.SKILL_EFFECT_TARGET_MODIFIERS,this)}}},{e44f791774823c1:"cBYkx","2db6f1da8a2a090f":"9PsTy","7b8b51bc133daece":"6b010",fba4e87138a39fd8:"7GVS0"}],"8uI2I":[function(e,t,i){let n=e("e0c5b517af7e95eb"),{PhysicalPropertiesValidator:r}=e("53bee4a4b8ffb847"),{PhysicalSkillRunner:s}=e("2eeab888db9bf32c"),a=e("816db325f0372799"),o=e("da275099098bc955"),{sc:h}=e("c2948bad11643034");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_ATTACK,this.parentType=a.SKILL.TYPE.ATTACK,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_ATTACK_HIT,e=>{super.runSkillLogic(e)})}}},{e0c5b517af7e95eb:"3f9O5","53bee4a4b8ffb847":"1WOg9","2eeab888db9bf32c":"15hwT","816db325f0372799":"6b010",da275099098bc955:"9PsTy",c2948bad11643034:"7GVS0"}],"1WOg9":[function(e,t,i){let{ErrorManager:n,sc:r}=e("35abe0003c2a362d");t.exports.PhysicalPropertiesValidator=class{static validate(e){"function"!=typeof e.owner.executePhysicalSkill&&n.error("Missing executePhysicalSkill required method."),r.hasOwn(e,"magnitude")||n.error("Missing magnitude property."),r.hasOwn(e,"objectWidth")||n.error("Missing objectWidth property."),r.hasOwn(e,"objectHeight")||n.error("Missing objectHeight property.")}}},{"35abe0003c2a362d":"7GVS0"}],"15hwT":[function(e,t,i){let n=e("633d3b21cd84c369");t.exports.PhysicalSkillRunner=class{static async runSkillLogic(e){return(this.lastState=null,e.validateRange(e.target))?(this.lastState=n.SKILL_STATES.EXECUTE_PHYSICAL_ATTACK,await e.owner.executePhysicalSkill(e.target,e)):this.lastState=n.SKILL_STATES.OUT_OF_RANGE,!1}static async executeOnHit(e,t,i,r){return(await t.fireEvent(i,t,e),t.validateTargetOnHit&&e!==t.target)?(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_INVALID_TARGET,!1):"function"==typeof r&&(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_RUN_LOGIC,await r(e))}}},{"633d3b21cd84c369":"6b010"}],eaAf1:[function(e,t,i){let n=e("d5317b62b21ebf53"),{PhysicalPropertiesValidator:r}=e("161757e13fa22e4c"),{PhysicalSkillRunner:s}=e("63a7f8ae8a1c8d9b"),a=e("1ec320fdf9897900"),o=e("366775bdaf1fe082"),{sc:h}=e("456bc4241930a2a9");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_EFFECT,this.parentType=a.SKILL.TYPE.EFFECT,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_EFFECT_HIT,e=>{super.runSkillLogic(e)})}}},{d5317b62b21ebf53:"j4v88","161757e13fa22e4c":"1WOg9","63a7f8ae8a1c8d9b":"15hwT","1ec320fdf9897900":"6b010","366775bdaf1fe082":"9PsTy","456bc4241930a2a9":"7GVS0"}],"4okuX":[function(e,t,i){let{ReceiverWrapper:n}=e("7b4e6450c890fa8e"),{Logger:r}=e("d1031ffaeea43394");t.exports.GameManagerEnricher=class{static withReceiver(e,t,i){if(!e||!t||!i)return r.error("Invalid input parameters for GameManagerEnricher.withReceiver method."),!1;if(e?.playerId!==t?.room.sessionId||(i.skills||(i.skills=new n({owner:e,roomEvents:t,events:i.events})),!i.skillsQueue?.length))return!1;for(let e of i.skillsQueue)i.skills.processMessage(e);i.skillsQueue=[]}}},{"7b4e6450c890fa8e":"30jum",d1031ffaeea43394:"3lwy5"}],"30jum":[function(e,t,i){let{Receiver:n}=e("c695b3c1a62eb9d1"),{Logger:r,sc:s}=e("84b4ce5800839523"),{GameConst:a}=e("280612dc61e2a50e"),{ActionsConst:o}=e("6868c5c216c81bc5");t.exports.ReceiverWrapper=class extends n{constructor(e){super(e),this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in ReceiverWrapper."),this.gameManager=s.get(e.roomEvents,"gameManager",!1),this.gameManager||r.error("Game Manager undefined in ReceiverWrapper."),this.room=s.get(e.roomEvents,"room",!1),this.room||r.error("Room undefined in ReceiverWrapper."),this.translator=this.gameManager?.services?.translator}processMessage(e){if(!this.gameManager)return!1;let t=this.gameManager.getActiveScene();if(!t||!t.player)return!1;super.processMessage(e),this.playAttackOrEffectAnimation(e,t),this.playHitAnimation(e,t)}playHitAnimation(e,t){-1!==e.act.indexOf("_hit")&&this.runHitAnimation(e.x,e.y,t,e.act)}playAttackOrEffectAnimation(e,t){let i=-1!==e.act.indexOf("_eff");if(!(-1!==e.act.indexOf("_atk"))&&!i)return;this.events.emitSync("reldens.playerAttack",e,this.room);let n=i?"_eff":"_atk",r=e.act.substring(0,e.act.indexOf(n)),{ownerSprite:a,targetSprite:o,targetType:h}=this.extractOwnerTargetAndType(t,e),c=s.get(this.gameManager.config.client.skills.animations,r,"default"+n);if(a&&t.getAnimationByKey(c)){let e=t.physics.add.sprite(a.x,a.y,c);e.setDepth(2e5);let i="";s.hasOwn(this.gameManager.gameEngine.uiScene.directionalAnimations,c)&&(i=3===this.gameManager.gameEngine.uiScene.directionalAnimations[c]?a.x{e.destroy()})}o&&this.runHitAnimation(o.x,o.y,t,r+"_hit",e.target,h)}extractOwnerTargetAndType(e,t){if(!e)return r.critical("Current scene not found.",e,t),!1;let i=!1,n=!1,a=o.DATA_TYPE_VALUE_PLAYER,h=e.player.players,c=e.objectsAnimations;return s.hasOwn(h,t.owner)&&s.hasOwn(h,t.target)?{ownerSprite:i=h[t.owner],targetSprite:n=h[t.target],targetType:a}:(s.hasOwn(c,t.owner)&&(i=c[t.owner].sceneSprite,n=h[t.target]),s.hasOwn(c,t.target)&&(n=c[t.target].sceneSprite,i=h[t.owner],a=o.DATA_TYPE_VALUE_OBJECT),{ownerSprite:i,targetSprite:n,targetType:a})}runHitAnimation(e,t,i,n,r,a){let h=this.gameManager.config.client.skills.animations,c=s.hasOwn(h,n)?n:o.DEFAULT_HIT_ANIMATION_KEY;if(!i.getAnimationByKey(c)||!s.hasOwn(h,c))return!1;let l=!1,u=!1;a===o.DATA_TYPE_VALUE_PLAYER&&(u=(l=this.gameManager.getCurrentPlayer().players[r]).playerId),a===o.DATA_TYPE_VALUE_OBJECT&&(l=i.objectsAnimations[r],u=r);let d=i.physics.add.sprite(e,t,c);(d=this.setTargetSpriteDepth(l,c,u,d,h)).anims.play(c,!0).on("animationcomplete",()=>{d.destroy(),l&&s.hasOwn(l,"moveSprites")&&delete l.moveSprites[c+"_"+u]})}setTargetSpriteDepth(e,t,i,n,r){if(!e)return n.setDepth(3e5),n;s.hasOwn(e,"targetSprite")&&(e.moveSprites[t+"_"+i]=n);let a=r[t],o=e.depth+("above"===s.get(a.animationData,"depthByPlayer","")?100:-.1);return n.depthByPlayer=a.animationData.depthByPlayer,n.setDepth(o),n}updateLevelAndExperience(e){this.gameManager.gameDom.updateContent(o.SELECTORS.LEVEL_LABEL,this.translator.t(o.SNIPPETS.LEVEL,{currentLevel:e.data[o.MESSAGE.DATA.LEVEL]})),this.onLevelExperienceAdded(e);let t=e.data[o.MESSAGE.DATA.CLASS_PATH_LABEL];t&&this.gameManager.gameDom.updateContent(o.SELECTORS.CLASS_PATH_LABEL,this.translator.t(o.SNIPPETS.CLASS_PATH_LABEL,{classPathLabel:t}));let i=e.data[o.MESSAGE.DATA.NEXT_LEVEL_EXPERIENCE];i&&this.gameManager.gameDom.updateContent(o.SELECTORS.NEXT_LEVEL_EXPERIENCE,this.translator.t(o.SNIPPETS.NEXT_LEVEL_EXPERIENCE,{nextLevelExperience:i}))}onInitClassPathEnd(e){if(this.gameManager.skills&&this.gameManager.skills.uiCreated)return!1;this.gameManager.skills.uiCreated=!0,this.updateLevelAndExperience(e),this.gameManager.skills.skills=e.data[o.MESSAGE.DATA.SKILL_LEVEL],this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl)}onLevelUp(e){this.updateLevelAndExperience(e),s.hasOwn(e.data,"skl")&&(Object.assign(this.gameManager.skills.skills,e.data.skl),this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl));let t=this.getLevelUpAnimationKey(e.data.skl);t&&this.playSkillPlayerAnimation(this.gameManager.getCurrentPlayer().playerId,t)}getLevelUpAnimationKey(e){let t=this.gameManager.config.client.levels.animations,i="level_"+this.gameManager.playerData.avatarKey+"_"+e;if(s.hasOwn(t,i))return i;let n="level_"+this.gameManager.playerData.avatarKey;if(s.hasOwn(t,n))return n;let r="level_"+e;return s.hasOwn(t,r)?r:!!s.hasOwn(t,"level_default")&&"level_default"}onLevelExperienceAdded(e){this.gameManager.gameDom.updateContent(o.SELECTORS.CURRENT_EXPERIENCE,this.translator.t(o.SNIPPETS.EXPERIENCE,{experience:e.data[o.MESSAGE.DATA.EXPERIENCE]}))}onSkillBeforeCast(e){this.playSkillPlayerAnimation(e.data.extraData[o.DATA_OWNER_KEY],this.determineCastKey(e))}determineCastKey(e){let t=e.data.skillKey+"_cast";return s.hasOwn(this.gameManager.config.client.skills.animations,t)?t:"default_cast"}playSkillPlayerAnimation(e,t){let i=this.gameManager.getActiveScene(),n=i.getAnimationByKey(t);if(!n)return -1===t.indexOf("default")&&r.error('Animation sprite not found for "'+t+'".',this.gameManager.config.client.skills.animations),!1;let a=this.gameManager.getCurrentPlayer().players[e],o=a.x,h=a.y,c=i.physics.add.sprite(o,h,t),l=s.hasOwn(n,"depthByPlayer")&&"above"===n.depthByPlayer?a.depth+1:a.depth-.1;c.depthByPlayer=n.depthByPlayer,c.setDepth(l),s.get(n,"blockMovement",!1)||(a.moveSprites[t+"_"+a.playerId]=c),c.anims.play(t,!0);let u=s.get(n,"destroyTime",!1);u&&setTimeout(()=>{c.destroy(),delete a.moveSprites[t+"_"+a.playerId]},u)}onSkillAfterCast(e){let t=this.gameManager.getCurrentPlayer();if(!s.hasOwn(e.data.extraData,o.DATA_OWNER_TYPE)||!s.hasOwn(e.data.extraData,o.DATA_OWNER_KEY)||e.data.extraData[o.DATA_OWNER_TYPE]!==o.DATA_TYPE_VALUE_PLAYER||!s.hasOwn(t.players,e.data.extraData[o.DATA_OWNER_KEY]))return!1;let i=this.gameManager.getActiveScene(),n=this.gameManager.getCurrentPlayer().players[e.data.extraData[o.DATA_OWNER_KEY]],r=this.getPlayDirection(e.data.extraData,n,t,i);r&&(n.anims.play(n.avatarKey+"_"+r,!0),n.anims.stop())}onSkillAttackApplyDamage(e){let t=this.gameManager.config.get("client/actions/damage");if(!t.enabled)return!1;let i=this.gameManager.getCurrentPlayer();if(!t.showAll&&e.data.extraData[o.DATA_OWNER_KEY]!==i.playerId)return!1;let n=this.gameManager.getActiveScene(),r=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e.data.extraData,i);if(!r)return!1;n.createFloatingText(r.x,r.y,e.data.d,t.color,t.font,t.fontSize,t.duration,t.top,t.stroke,t.strokeThickness,t.shadowColor)}getPlayDirection(e,t,i,n){let r=!1,s=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e,i);if(!s)return!1;let h=s.x-t.x,c=s.y-t.y;return r=h>=0?a.RIGHT:a.LEFT,Math.abs(h)=0?a.DOWN:a.UP),r}}},{c695b3c1a62eb9d1:"aF25l","84b4ce5800839523":"3lwy5","280612dc61e2a50e":"93TbC","6868c5c216c81bc5":"59VA7"}],"8JSjE":[function(e,t,i){t.exports={actions:{selectClassPath:"Select Your Class-Path",currentLevel:"Level %currentLevel",experience:"%experience",experienceLabel:"XP",classPathLabel:"%classPathLabel",nextLevelExperience:"%nextLevelExperience"}}},{}],"1nDQd":[function(e,t,i){let{LifebarUi:n}=e("8c20660587da4fd1"),{PlayerStatsUi:r}=e("ce28c84d7547fb13"),{ActionsConst:s}=e("f776fabb66dbfa58"),{GameConst:a}=e("182ad229d5814453"),o=e("654cdd1a7a80a011"),{TranslationsMapper:h}=e("63862da16582548e"),{UsersConst:c}=e("356170d1146549c3"),{PluginInterface:l}=e("514d97ef4c40e16"),{Logger:u,sc:d}=e("29f51e27cfc36016");t.exports.UsersPlugin=class extends l{setup(e){this.gameManager=d.get(e,"gameManager",!1),this.events=d.get(e,"events",!1),this.initialGameData={},this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.setupPlayerStatsUi())}validateProperties(){return this.gameManager?!!this.events||(u.error("EventsManager undefined in UsersPlugin."),!1):(u.error("Game Manager undefined in UsersPlugin."),!1)}setupPlayerStatsUi(){this.playerStatsUi=new r({events:this.events}),this.playerStatsUi.createPlayerStatsUi()}listenEvents(){this.events.on("reldens.beforeCreateEngine",(e,t)=>{this.initialGameData=e,this.onBeforeCreateEngine(e,t),this.lifeBarUi||(this.lifeBarUi=new n({events:this.events}),this.lifeBarUi.createLifeBarUi(t))})}setTranslations(){if(!this.events||!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,c.MESSAGE.DATA_VALUES)}onBeforeCreateEngine(e,t){let i=t.config.get("client/players/multiplePlayers/enabled",!1),n=t.config.get("client/rooms/selection/allowOnLogin",!1),r=t.gameDom.getElement("#player-selection"),s=d.isTrue(e,"players")?Object.keys(e.players).length:0;if(0(t.preventDefault(),e.classList.add("hidden"),this.submitSelectedPlayer(i,n,a,r),!1)),this.showAvatarContainer(i,t,a),n.classList.remove("hidden")}submitSelectedPlayer(e,t,i,n){e.events.emitSync("reldens.onPrepareSinglePlayerSelectorFormSubmit",{usersPlugin:this,form:t,selectElement:i,player:n,gameManager:e}),e.initEngine().catch(e=>{u.error(e)})}showAvatarContainer(e,t,i){let n=e.gameDom.getElement(".player-selection-additional-info");if(!n||!this.gameManager.config.getWithoutLogs("client/players/multiplePlayers/showAvatar",!0))return;let r=e.gameDom.createElement("div");r.className="avatar-container";let s=e.gameDom.createElement("div"),o=t.player.avatarKey;s.classList.add("class-path-select-avatar"),s.style.backgroundImage=`url('/assets/custom/sprites/${o}${a.FILES.EXTENSIONS.PNG}')`;let h=this.gameManager.config.getWithoutLogs("client/players/size/width","0")+"px";s.style.backgroundPositionX="-"+h,s.style.width=h,s.style.height=this.gameManager.config.getWithoutLogs("client/players/size/height","0")+"px",r.append(s),n.append(r)}preparePlayerSelector(e,t,i){let n=i.gameDom.getElement("#player-selector-form"),r=i.gameDom.getElement("#player-select-element");if(!n||!r)return!1;for(let s of(n.addEventListener("submit",s=>{s.preventDefault();let a=r.options[r.selectedIndex].value,o=this.getPlayerById(t.players,Number(a));return o&&(e.classList.add("hidden"),i.initialGameData.player=o,i.events.emitSync("reldens.onPreparePlayerSelectorFormSubmit",{usersPlugin:this,form:n,select:r,selectedPlayer:o,gameManager:i}),i.initEngine().catch(e=>{u.error(e)})),!1}),Object.keys(t.players))){let e=t.players[s],i=new Option(this.gameManager.services.translator.t(c.SNIPPETS.OPTION_LABEL,{playerName:e.name,currentLevel:e.currentLevel,classPathLabel:e.currentClassPathLabel}),e.id);i.dataset.key=e.avatarKey,r.append(i)}this.showAvatarContainer(i,t,r),n.classList.remove("hidden")}preparePlayerCreator(e,t,i){let n=i.gameDom.getElement(s.SELECTORS.PLAYER_CREATE_FORM);n&&n.addEventListener("submit",e=>{e.preventDefault(),i.gameDom.getElement("#player-create-form .response-error").innerHTML="";let t=new FormData(n),r=d.serializeFormData(t);if(3>r["new-player-name"].toString().length)return!1;i.submitedForm=!0,i.events.emitSync("reldens.onPreparePlayerCreationFormSubmit",{usersPlugin:this,form:n,gameManager:i});try{i.gameRoom.send("*",{act:a.CREATE_PLAYER,formData:r})}catch(e){u.critical("Create player error.",e),i.gameDom.alertReload(i.services.translator.t("game.errors.connectionLost"))}return!1})}getPlayerById(e,t){if(0===e.length)return!1;for(let i of e)if(i.id===t)return i;return!1}}},{"8c20660587da4fd1":"k9uwf",ce28c84d7547fb13:"bNgpB",f776fabb66dbfa58:"59VA7","182ad229d5814453":"93TbC","654cdd1a7a80a011":"ddEMb","63862da16582548e":"1fcQw","356170d1146549c3":"8dKJt","514d97ef4c40e16":"fC3To","29f51e27cfc36016":"3lwy5"}],k9uwf:[function(e,t,i){let{UsersConst:n}=e("aad623d6d02417c4"),{ActionsConst:r}=e("479d0bf7c66730cb"),{GameConst:s}=e("d5d1589d2f5e4492"),{ObjectsConst:a}=e("50eec9aa11029ed5"),{ObjectsHandler:o}=e("d6180c46f85f20ae"),{sc:h}=e("1d465cbfd4bfebd9");t.exports.LifebarUi=class{constructor(e){this.events=e.events}createLifeBarUi(e){return this.barConfig=e.config.get("client/ui/lifeBar"),!!this.barConfig.enabled&&(this.gameManager=e,this.fixedPositionX=!1,this.fixedPositionY=!1,this.barProperty=this.gameManager.config.get("client/actions/skills/affectedProperty"),this.playerSize=this.gameManager.config.get("client/players/size"),this.lifeBars={},this.lifeDataByKey={},this.listenEvents(),this)}listenEvents(){this.events.on("reldens.playerStatsUpdateAfter",(e,t)=>{this.updatePlayerLifeBar(e,t)}),this.events.on("reldens.joinedRoom",e=>{this.listenMessages(e)}),this.events.on("reldens.runPlayerAnimation",(e,t)=>{this.drawPlayerLifeBar(t)}),this.events.on("reldens.updateGameSizeBefore",(e,t,i)=>{this.drawOnGameResize(t,i)}),this.events.on("reldens.playersOnRemove",(e,t)=>{this.removePlayerLifeBar(t)}),this.events.on("reldens.playerEngineAddPlayer",()=>{this.processLifeBarQueue()}),this.events.on("reldens.createAnimationAfter",()=>{o.drawObjectsLifeBar(this)}),this.events.on("reldens.objectBodyChanged",e=>{o.generateObjectLifeBar(e.key,this)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i)=>{this.showTargetLifeBar(t,i)}),this.events.on("reldens.gameEngineClearTarget",(e,t)=>{this.clearPreviousBar(t)})}drawOnGameResize(e,t){if(!this.barConfig.fixedPosition)return!1;this.setPlayerLifeBarFixedPosition(e,t),this.drawPlayerLifeBar(this.gameManager.getCurrentPlayer().playerId)}clearPreviousBar(e){e&&h.hasOwn(this.lifeBars,e.id)&&this.gameManager.getCurrentPlayer().playerId!==e.id&&this.lifeBars[e.id].destroy()}showTargetLifeBar(e,t){if(!this.barConfig.showOnClick)return!1;this.clearPreviousBar(t),e.type===a.TYPE_OBJECT&&o.generateObjectLifeBar(e.id,this),e.type===s.TYPE_PLAYER&&this.drawPlayerLifeBar(e.id)}barPropertyValue(){return this.barProperty+"Value"}barPropertyTotal(){return this.barProperty+"Total"}setPlayerLifeBarFixedPosition(e,t){if(!e||!t){let i=this.gameManager.gameEngine.getCurrentScreenSize(this.gameManager);e=i.newWidth,t=i.newHeight}let{uiX:i,uiY:n}=this.gameManager.gameEngine.uiScene.getUiConfig("lifeBar",e,t);this.fixedPositionX=i,this.fixedPositionY=n}updatePlayerLifeBar(e,t){let i=t.gameManager.getCurrentPlayer();this.updatePlayerBarData(i.playerId,e.statsBase[this.barProperty],e.stats[this.barProperty]),this.drawPlayerLifeBar(i.playerId)}listenMessages(e){e.onMessage("*",e=>{this.listenBattleEnd(e),this.listenLifeBarUpdates(e)})}listenBattleEnd(e){if(e.act!==r.BATTLE_ENDED||!h.hasOwn(this.lifeBars,e.t))return!1;this.lifeBars[e.t].destroy()}listenLifeBarUpdates(e){if(e.act!==n.ACTION_LIFEBAR_UPDATE)return!1;o.processObjectLifeBarMessage(e,!0,this),this.processPlayerLifeBarMessage(e,!0)}canShowPlayerLifeBar(e){let t=this.gameManager.getCurrentPlayer();if(!h.isFunction(t?.isDeath))return!1;let i=e===t?.playerId;return i&&t&&(t.isDeath()||t.isDisabled())?(this.lifeBars[e]?.setVisible(!1),!1):!!i||!!this.barConfig.showAllPlayers||this.barConfig.showOnClick&&e===this.getCurrentTargetId()}queueLifeBarMessage(e){h.hasOwn(this.gameManager,"lifeBarQueue")||(this.gameManager.lifeBarQueue=[]),this.gameManager.lifeBarQueue.push(e)}processPlayerLifeBarMessage(e,t=!1){if(r.DATA_TYPE_VALUE_PLAYER!==e[r.DATA_OWNER_TYPE])return!1;let i=this.gameManager.getCurrentPlayer(),n=e[r.DATA_OWNER_KEY];return i&&i.players&&i.players[n]?(this.updatePlayerBarData(n,e.totalValue,e.newValue),this.canShowPlayerLifeBar(n)&&this.drawPlayerLifeBar(n),!0):(t&&this.queueLifeBarMessage(e),!1)}updatePlayerBarData(e,t,i){let n=this.gameManager.getCurrentPlayer();n.players[e][this.barPropertyTotal()]=t,n.players[e][this.barPropertyValue()]=i}processLifeBarQueue(){if(0===this.gameManager.lifeBarQueue.length)return!1;let e=[];for(let t of this.gameManager.lifeBarQueue)o.processObjectLifeBarMessage(t,!1,this)&&e.push(t),this.processPlayerLifeBarMessage(t,!1)&&e.push(t);0!e.includes(t)))}drawPlayerLifeBar(e){if(this.destroyByKey(e),!this.canShowPlayerLifeBar(e))return this.lifeBars[e]?.setVisible(!1),!1;let t=this.prepareBarData(e),i=this.barConfig.height,n=this.barConfig.top,r=this.barConfig.width,s=t.player.x-r/2,a=t.player.y-i-n+t.ownerTop/2;return e===this.gameManager.getCurrentPlayer().playerId&&this.barConfig.fixedPosition?(this.lifeBars[e]=this.gameManager.getActiveScenePreloader().add.graphics(),(!1===this.fixedPositionX||!1===this.fixedPositionY)&&this.setPlayerLifeBarFixedPosition(),s=this.fixedPositionX,a=this.fixedPositionY):this.lifeBars[e]=this.gameManager.getActiveScene().add.graphics(),this.drawBar(this.lifeBars[e],t.fullValue,t.filledValue,s,a),this}destroyByKey(e){h.hasOwn(this.lifeBars,e)&&this.lifeBars[e].destroy()}prepareBarData(e){let t=this.gameManager.getCurrentPlayer().players[e],i=t[this.barPropertyTotal()],n=t[this.barPropertyValue()],r=h.get(t,"topOff",0)-this.playerSize.height;return{player:t,fullValue:i,filledValue:n,ownerTop:r}}removePlayerLifeBar(e){if(!h.hasOwn(this.lifeBars,e))return!1;this.lifeBars[e].destroy(),delete this.lifeBars[e]}drawBar(e,t,i,n,r){let s=this.barConfig.height,a=this.barConfig.width;e.clear(),e.fillStyle(parseInt(this.barConfig.fillStyle),1),e.fillRect(n,r,i*a/t,s),e.lineStyle(1,parseInt(this.barConfig.lineStyle)),e.strokeRect(n,r,a,s),e.alpha=.6,e.setDepth(3e5)}getCurrentTargetId(){return h.get(this.gameManager.getCurrentPlayer()?.currentTarget,"id",!1)}getObjectByKey(e){return h.get(this.gameManager.getActiveScene()?.objectsAnimations,e,!1)}}},{aad623d6d02417c4:"8dKJt","479d0bf7c66730cb":"59VA7",d5d1589d2f5e4492:"93TbC","50eec9aa11029ed5":"izuLV",d6180c46f85f20ae:"evhzg","1d465cbfd4bfebd9":"3lwy5"}],"8dKJt":[function(e,t,i){let n="users.";t.exports.UsersConst={ACTION_LIFEBAR_UPDATE:"alu",SNIPPETS:{PREFIX:n,OPTION_LABEL:n+"optionLabel"},MESSAGE:{DATA_VALUES:{NAMESPACE:"users"}}}},{}],evhzg:[function(e,t,i){let{ActionsConst:n}=e("66c72f936244bf4c"),{GameConst:r}=e("4fbfbb1e3b1b87b5");t.exports.ObjectsHandler=class{static processObjectLifeBarMessage(e,t=!1,i){if(!this.isValidMessage(e,i))return!1;let r=e[n.DATA_OWNER_KEY],s={};s[i.barPropertyTotal()]=e.totalValue,s[i.barPropertyValue()]=e.newValue,i.lifeDataByKey[r]=s;let a=i.getObjectByKey(r);return a?(this.drawObjectLifeBar(a,e[n.DATA_OWNER_KEY],e.totalValue,e.newValue,i),!0):(t&&i.queueLifeBarMessage(e),!1)}static isValidMessage(e,t){return n.DATA_TYPE_VALUE_OBJECT===e[n.DATA_OWNER_TYPE]&&t.barConfig.showEnemies}static drawObjectsLifeBar(e){for(let t of Object.keys(e.lifeDataByKey)){let i=e.getObjectByKey(t);this.drawObjectLifeBar(i,t,e.lifeDataByKey[t][e.barPropertyTotal()],e.lifeDataByKey[t][e.barPropertyValue()],e)}}static isValidToDraw(e,t,i){return!!e&&r.STATUS.DEATH!==e.inState&&r.STATUS.DISABLED!==e.inState&&!(i.barConfig.showOnClick&&t!==i.getCurrentTargetId())}static generateObjectLifeBar(e,t){let i=t.lifeDataByKey[e];if(!i)return!1;let n=t.getObjectByKey(e);this.drawObjectLifeBar(n,e,i[t.barPropertyTotal()],i[t.barPropertyValue()],t)}static drawObjectLifeBar(e,t,i,n,r){if(r.destroyByKey(t),!this.isValidToDraw(e,t,r))return!1;this.drawLifeBarInPosition(r,t,e,i,n)}static drawLifeBarInPosition(e,t,i,n,r){e.lifeBars[t]=e.gameManager.getActiveScene().add.graphics();let{x:s,y:a}=this.calculateObjectLifeBarPosition(i,e);e.drawBar(e.lifeBars[t],n,r,s,a)}static calculateObjectLifeBarPosition(e,t){return{x:e.x-e.sceneSprite.width/2,y:e.y-e.sceneSprite.height/2-t.barConfig.height-t.barConfig.top}}}},{"66c72f936244bf4c":"59VA7","4fbfbb1e3b1b87b5":"93TbC"}],bNgpB:[function(e,t,i){t.exports.PlayerStatsUi=class{constructor(e){this.events=e.events}createPlayerStatsUi(){this.events.on("reldens.beforePreloadUiScene",e=>{if(!e.gameManager.config.get("client/ui/playerStats/enabled"))return!1;e.load.html("playerStats","/assets/html/ui-player-stats.html"),e.load.html("playerStat","/assets/html/player-stat.html")}),this.events.on("reldens.beforeCreateUiScene",e=>{let t=e.getUiConfig("playerStats");if(!t.enabled)return!1;let i=e.add.dom(t.uiX,t.uiY).createFromCache("playerStats"),n=i.getChildByProperty("id","player-stats-close"),r=i.getChildByProperty("id","player-stats-open");r?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="block",r.style.display="none",i.setDepth(4),this.events.emit("reldens.openUI",{ui:this,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),n?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="none",r&&(r.style.display="block"),i.setDepth(1),this.events.emit("reldens.closeUI",{ui:this,closeButton:n,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),e.elementsUi.playerStats=i})}}},{}],ddEMb:[function(e,t,i){t.exports={users:{optionLabel:"%playerName - LvL %currentLevel - %classPathLabel"}}},{}],jRcE9:[function(e,t,i){let{AudioManager:n}=e("541d832742a00ab5"),{SceneAudioPlayer:r}=e("fb79730c9351b42b"),{MessagesListener:s}=e("1d50534b7413d902"),{AudioUi:a}=e("c9088bc3e4085a8a"),{TranslationsMapper:o}=e("6f071ff9a7a2b90e"),h=e("818427dea57ab21c"),{PluginInterface:c}=e("21904e239c915c7f"),{AudioConst:l}=e("587f9c67cc5dcf55"),{Logger:u,sc:d}=e("d13dcc30aa283061");t.exports.AudioPlugin=class extends c{setup(e){this.events=d.get(e,"events",!1),this.events||u.error("EventsManager undefined in AudioPlugin."),this.gameManager=d.get(e,"gameManager",!1),this.gameManager||u.error("Game Manager undefined in AudioPlugin."),this.setTranslations(),this.messagesListener=new s,this.sceneAudioPlayer=r,this.initialAudiosData={},this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,h,l.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.audioManager||(t.audioManager=new n({events:this.events,currentPlayerData:e.player}),this.initialAudiosData=d.get(e,"audio",{}))}),this.events.on("reldens.joinedRoom",(e,t)=>{t.audioManager.updateDefaultConfig(t.config.getWithoutLogs("client/general/audio/defaultAudioConfig")),this.messagesListener.listenMessages(e,t)}),this.events.on("reldens.preloadUiScene",async e=>{e.load.html("audio","/assets/html/ui-audio.html"),e.load.html("audio-category","/assets/html/ui-audio-category-row.html")}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new a(e),this.uiManager.createUi()}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{let t=e.gameManager.audioManager;if(!t)return!1;let i=d.get(this.initialAudiosData,"globalAudios",{});await t.loadGlobalAudios(i,e),await this.messagesListener.processQueue(),this.sceneAudioPlayer.associateSceneAnimationsAudios(t,e),e.cameras.main.on("camerafadeincomplete",()=>{this.sceneAudioPlayer.playSceneAudio(t,e)})}),this.events.on("reldens.changeSceneDestroyPrevious",e=>{e.gameManager.audioManager.destroySceneAudios()}),this.events.on("reldens.allAudiosLoaded",(e,t,i)=>{this.sceneAudioPlayer.playSceneAudio(e,i,!0)})}}},{"541d832742a00ab5":"6hRLM",fb79730c9351b42b:"4ld6d","1d50534b7413d902":"khKLI",c9088bc3e4085a8a:"a2LOL","6f071ff9a7a2b90e":"1fcQw","818427dea57ab21c":"i11rh","21904e239c915c7f":"fC3To","587f9c67cc5dcf55":"6GwZf",d13dcc30aa283061:"3lwy5"}],"6hRLM":[function(e,t,i){let{AudioConst:n}=e("326aa6ee5d80738b"),{Logger:r,sc:s}=e("bddd20eeb20a74c3");t.exports.AudioManager=class{constructor(e){this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in AudioManager."),this.globalAudios=s.get(e,"globalAudios",{}),this.roomsAudios=s.get(e,"roomsAudios",{}),this.categories=s.get(e,"categories",{}),this.playerConfig=s.get(e,"playerConfig",{}),this.currentPlayerData=s.get(e,"currentPlayerData",{}),this.playing={},this.currentMuteState=!1,this.changedMutedState={},this.lockedMuteState=!1,this.defaultAudioConfig={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!0,delay:0}}async setAudio(e,t){if(this.lockedMuteState)return r.info("Locked mute state to set audio."),!1;await this.events.emit("reldens.setAudio",{audioManager:this,categoryKey:e,enabled:t});let i=this.categories[e];if(this.playerConfig[i.id]=t?1:0,!s.hasOwn(this.playing,e))return!0;let n=t?"play":"stop",a=this.playing[e];return i.single_audio&&s.isObjectFunction(a,n)?this.setAudioForSingleEntity(a,n,e,t):this.setAudioForElementChildren(a,i,t)}setAudioForSingleEntity(e,t,i,n){if(!e)return r.error("Missing playingElement.",{audioKey:i,playingElement:e}),!1;if(!e.currentConfig)return!1;if(!s.isObjectFunction(e,t))return r.error("Missing playOrStop method in playingElement.",{audioKey:i,playOrStop:t,playingElement:e}),!1;try{e[t](),e.mute=!n}catch(n){r.error("PlayingElement error.",{audioKey:i,playOrStop:t,playingElement:e,error:n})}return!0}setAudioForElementChildren(e,t,i){if(t.single_audio)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let t of n)this.setAudioForSingleEntity(e[t],"stop",t,i);return!0}generateAudio(e,t){let i=Object.assign({},this.defaultAudioConfig,t.config||{});if(!s.hasOwn(e.cache.audio.entries.entries,t.audio_key))return r.error("Audio file does not exists. Audio key: "+t.audio_key,e.cache.audio.entries.entries),!1;let n=e.sound.add(t.audio_key,i);if(t.markers&&0{if(a!==e.audio_key)return!1;let o=this.generateAudio(i,e);if(!1===o)return r.error("AudioLoader can not generate the audio.",{"Audio key:":e.audio_key,"Storage key:":n}),!1;"roomsAudios"===n?this.roomsAudios[i.key][e.audio_key]=o:this.globalAudios[e.audio_key]=o,s++,await this.fireAudioEvents(t,i,e,s)}),h.start()}}async existsFileByXMLHttpRequest(e){try{let t=await fetch(e,{method:"HEAD"});return 404!==t.status}catch(e){return r.error("Error fetching:",e),!1}}async prepareFiles(e){let t=e.files_name.split(","),i=[];for(let e of t){let t=n.AUDIO_BUCKET+"/"+e;!1!==await this.existsFileByXMLHttpRequest(t)&&i.push(t)}return i}async fireAudioEvents(e,t,i,n){await t.gameManager.events.emit("reldens.audioLoaded",this,e,t,i),n===e.length&&await t.gameManager.events.emit("reldens.allAudiosLoaded",this,e,t,i)}removeAudiosFromScene(e,t){if(0===e.length||!t)return!1;for(let i of e)this.removeSceneAudioByAudioKey(t,i.audio_key);return!0}removeSceneAudioByAudioKey(e,t){e.sound.removeByKey(t),s.hasOwn(e.cache.audio.entries.entries,t)&&delete e.cache.audio.entries.entries[t],s.hasOwn(this.roomsAudios[e.key],t)&&delete this.roomsAudios[e.key][t],s.hasOwn(this.globalAudios,t)&&delete this.globalAudios[t]}updateDefaultConfig(e){s.isObject(e)&&Object.assign(this.defaultAudioConfig,e)}async processUpdateData(e,t,i){e.playerConfig&&(this.playerConfig=e.playerConfig),e.categories&&(this.addCategories(e.categories),await this.events.emit("reldens.audioManagerUpdateCategoriesLoaded",this,t,i,e));let n=s.get(e,"audios",{});if(0{if(t.children.list.length<=0)return!1;for(let i of t.children.list)"Sprite"===i.type&&(i.on("animationstart",r=>{let s=n.AUDIO_ANIMATION_KEY_START+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationupdate",r=>{let s=n.AUDIO_ANIMATION_KEY_UPDATE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationcomplete",r=>{let s=n.AUDIO_ANIMATION_KEY_COMPLETE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationrepeat",r=>{let s=n.AUDIO_ANIMATION_KEY_REPEAT+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationstop",r=>{let s=n.AUDIO_ANIMATION_KEY_STOP+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}))})}attachAudioToSprite(e,t,i,n){return s.hasOwn(e.associatedAudio,t)||(s.hasOwn(e,"associatedAudio")||(e.associatedAudio={}),s.hasOwn(e.associatedAudio,t)||(e.associatedAudio[t]=i.findAudio(t,n.key))),e.associatedAudio[t]}playSpriteAudio(e,t,i,n){let a=Number(n.currentPlayerData.id),o=Number(s.get(i,"player_id")),h=this.isCurrentPlayerSprite(o,a);if(e.audio.data.config?.onlyCurrentPlayer&&!h)return!1;let c=t.player;if(h&&c&&(c.isDisabled()||c.isDeath()))return!1;if(!e||!e.audio||!e.audio.data)return r.error("Missing associated audio data.",e),!1;let l=e.audio.data.category.category_key,u=s.get(n.categories,l,!1),d=s.get(n.playerConfig,u.id,u.enabled);if(!u||!d)return!1;let f=e.audio.audioInstance;if(u.single_audio&&s.isObjectFunction(n.playing[u.category_key],"stop")&&n.playing[u.category_key].stop(),u.single_audio)return n.playing[u.category_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(!u.single_audio){if(!e.marker)return n.playing[u.category_key][e.audio.data.audio_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(e.marker)return n.playing[u.category_key][e.marker]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(e.marker),!0)}}isCurrentPlayerSprite(e,t){return e&&e===t}isMutedState(e,t,i){return!1!==e.currentMuteState&&(r.info("AudioManager in muted state to play audio.",{mutedKey:t,audioInstance:i}),e.changedMutedState[t]=e.currentMuteState,!0)}}},{"30220416ce7546a9":"6GwZf",f35c0a4a20893403:"3lwy5"}],khKLI:[function(e,t,i){let{AudioConst:n}=e("f38271dbda4592b9");t.exports.MessagesListener=class{constructor(){this.queueMessages=[],this.sceneReady=!1}listenMessages(e,t){e.onMessage("*",async i=>{await this.processMessage(i,e,t)})}async processQueue(){if(this.sceneReady=!0,0===this.queueMessages.length)return!1;for(let e of this.queueMessages){let{message:t,room:i,gameManager:n}=e;await this.processMessage(t,i,n)}return!0}async processMessage(e,t,i){!1===this.sceneReady&&this.queueMessages.push({message:e,room:t,gameManager:i}),e.act===n.AUDIO_UPDATE&&await i.audioManager.processUpdateData(e,t,i),e.act===n.AUDIO_DELETE&&await i.audioManager.processDeleteData(e,t,i)}}},{f38271dbda4592b9:"6GwZf"}],a2LOL:[function(e,t,i){let{SceneAudioPlayer:n}=e("d9b7615cb55a6656"),{AudioUpdate:r}=e("9bae50dfe6fad086"),{sc:s}=e("fc209b9537d685a9");t.exports.AudioUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.audioManager=this.gameManager.audioManager,this.sceneAudioPlayer=n}createUi(){if(!this.audioManager.categories)return;let e=this.uiScene.cache.html.get("audio"),t=this.uiScene.cache.html.get("audio-category"),i=this.prepareAudioSettingsContent(t,e);this.gameManager.gameDom.appendToElement("#settings-dynamic",i);let n=this.gameManager.gameDom.getElements(".audio-setting");if(0===n.length)return!1;for(let e of n)e.addEventListener("click",async t=>{await this.audioManager.setAudio(t.target.dataset.categoryKey,e.checked),this.gameManager.activeRoomEvents.send(new r(e.value,e.checked)),this.sceneAudioPlayer.playSceneAudio(this.audioManager,this.gameManager.getActiveScene())})}prepareAudioSettingsContent(e,t){let i=this.prepareCategoriesRows(e);return this.gameManager.gameEngine.parseTemplate(t,{audioCategories:i,settingsTitle:this.gameManager.services.translator.t("audio.settingsTitle")})}prepareCategoriesRows(e){let t="";for(let i of Object.keys(this.audioManager.categories)){let n=this.audioManager.categories[i],r=s.get(this.audioManager.playerConfig,n.id,n.enabled);t+=this.gameManager.gameEngine.parseTemplate(e,{categoryId:n.id,categoryLabel:n.category_label,categoryKey:n.category_key,categoryChecked:r?' checked="checked"':""})}return t}}},{d9b7615cb55a6656:"4ld6d","9bae50dfe6fad086":"ibm3l",fc209b9537d685a9:"3lwy5"}],ibm3l:[function(e,t,i){let{AudioConst:n}=e("206716204b95df4c"),{GameConst:r}=e("c7ddf895e347bc66");t.exports.AudioUpdate=class{constructor(e,t){this[r.ACTION_KEY]=n.AUDIO_UPDATE,this[n.MESSAGE.DATA.UPDATE_TYPE]=e,this[n.MESSAGE.DATA.UPDATE_VALUE]=t}}},{"206716204b95df4c":"6GwZf",c7ddf895e347bc66:"93TbC"}],i11rh:[function(e,t,i){t.exports={audio:{settingsTitle:"Audio Settings"}}},{}],"3yQhR":[function(e,t,i){let{ActionsConst:n}=e("1e41f2c4a061523b"),{RoomsConst:r}=e("c28085823a93fbc9"),{PluginInterface:s}=e("6710f6d3bb0219bd"),{Logger:a,sc:o}=e("4de0a3d14a3e7a84");t.exports.RoomsPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.gameManager||a.error("Game Manager undefined in RoomsPlugin."),this.events=o.get(e,"events",!1),this.events||a.error("EventsManager undefined in RoomsPlugin."),this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.config.get("client/rooms/selection/allowOnLogin",!1)&&e.roomSelection&&this.populateSceneSelector(e.roomSelection,t)}),this.events.on("reldens.onPrepareSinglePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerCreationFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)})}populateSceneSelector(e,t){let i=t.gameDom.getElement(n.SELECTORS.PLAYER_CREATION_ADDITIONAL_INFO),r=t.gameDom.getElement(n.SELECTORS.PLAYER_SELECTION_ADDITIONAL_INFO);if(!i&&!r)return a.warning("Missing element.",{playerCreationAdditional:i,playerSelectionAdditional:r}),!1;if(i){let n=this.filterCreationRooms(e),r=this.createSelectorElements(t,n,"creation");i.append(r)}if(r){let i=this.createSelectorElements(t,e,"selection");r.append(i)}}filterCreationRooms(e){let t=[];for(let i of e)i.name!==r.ROOM_LAST_LOCATION_KEY&&t.push(i);return t}appendSelectedScene(e,t){let i=e.gameDom.getElement(".scene-select",t);if(!i)return;let n=i.options[i.selectedIndex].value;n&&(e.initialGameData.selectedScene=n)}createSelectorElements(e,t,i){let n=e.gameDom.createElement("div");n.classList.add("input-box");let r=e.gameDom.createElement("label");r.htmlFor=i+"SelectedScene",r.innerText=this.gameManager.services.translator.t("game.pleaseSelectScene");let s=e.gameDom.createElement("select");for(let e of(s.name=i+"SelectedScene",s.id=i+"SelectedScene",s.classList.add("select-element"),s.classList.add("scene-select"),t)){let t=new Option(e.title,e.name);s.append(t)}return n.append(r),n.append(s),n}}},{"1e41f2c4a061523b":"59VA7",c28085823a93fbc9:"9vHHC","6710f6d3bb0219bd":"fC3To","4de0a3d14a3e7a84":"3lwy5"}],"80hlx":[function(e,t,i){let{PredictionWorldCreator:n}=e("1f99afae6127aa6e"),{RoomEventsOverride:r}=e("fd23b82a5f097c7a"),{PluginInterface:s}=e("eb3ab2d7c28717c2"),{Logger:a,sc:o}=e("fc917919e6e14072");t.exports.PredictionPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.events=o.get(e,"events",!1),this.predictionWorldCreator=new n,this.roomEventsOverride=new r,this.validateProperties()&&this.listenEvents()}validateProperties(){return this.gameManager?!!this.events||(a.error("EventsManager undefined in PredictionPlugin."),!1):(a.error("Game Manager undefined in PredictionPlugin."),!1)}listenEvents(){this.events.on("reldens.createEngineSceneDone",async e=>{await this.predictionWorldCreator.createSceneWorld(e.currentScene)}),this.events.on("reldens.createdRoomsEventsInstance",(e,t)=>{this.roomEventsOverride.createCurrentPlayerOverride(t.activeRoomEvents),this.roomEventsOverride.playerOnChangeOverride(t.activeRoomEvents),this.roomEventsOverride.createPlayerEngineInstanceOverride(t.activeRoomEvents),this.roomEventsOverride.createSceneInstanceOverride(t.activeRoomEvents)})}}},{"1f99afae6127aa6e":"4rqFy",fd23b82a5f097c7a:"4xzUf",eb3ab2d7c28717c2:"fC3To",fc917919e6e14072:"3lwy5"}],"4rqFy":[function(e,t,i){let{CollisionsManager:n}=e("804590972ed05c20"),{P2world:r}=e("398044c66c46a0d1"),{WorldPointsValidator:s}=e("1ceec76f8d305544"),{WorldTimer:a}=e("6582f8b293532f90"),{Logger:o,sc:h}=e("8c1495bc004bacd5");t.exports.PredictionWorldCreator=class{async createSceneWorld(e){if(!e.experimentalClientPrediction)return;let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomMap,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.worldPrediction=this.createWorldInstance(r),e.worldPrediction.createLimits(),await e.worldPrediction.createWorldContent({});let h=e.gameManager.getCurrentPlayer();if(!h){o.error("Current player not present for prediction.");return}let c={id:h.playerId,width:e.configManager.get("client/players/physicalBody/width"),height:e.configManager.get("client/players/physicalBody/height"),bodyState:h.state},l=e.worldPrediction.createPlayerBody(c);l.updateBodyState=this.updateBodyStateOverride(l,h),h.predictionBody=l,e.worldPredictionTimer=new a({callbacks:[()=>{if(!e.worldPrediction){o.error("Scene World not longer exists.",e.roomWorld);return}e.worldPrediction.removeBodiesFromWorld()}]}),e.worldPredictionTimer.startWorldSteps(e.worldPrediction),e.collisionsManager=new n({roomWorld:e.worldPrediction}),h.pointsValidator=new s(i.width,i.height)}cloneMapJson(e,t){return Object.assign({},e.cache?.tilemap?.entries?.entries[e.tileset.name]?.data||{},{layers:t})}findValidLayers(e){let t=[];for(let i of e.cache.tilemap.entries.entries[e.tileset.name].data.layers)-1!==i.name.indexOf("collision")&&t.push(i);return t}updateBodyStateOverride(e,t){return()=>{if(!h.hasOwn(e.bodyState,"x")||!h.hasOwn(e.bodyState,"y")||!e.position[0]||!e.position[1])return;if(e.isNotMoving()){e.bodyState.mov=!1;return}e.bodyState.x!==e.position[0]&&(e.bodyState.x=e.position[0]),e.bodyState.y!==e.position[1]&&(e.bodyState.y=e.position[1]);let i=0!==Number(Number(e.velocity[0]).toFixed(2))||0!==Number(e.velocity[1].toFixed(2));e.bodyState.mov!==i&&(e.bodyState.mov=i);let n={x:e.position[0],y:e.position[1],dir:e.bodyState.dir};t.updatePlayer(t.playerId,{state:n})}}createWorldInstance(e){return new r(e)}}},{"804590972ed05c20":"dlIjw","398044c66c46a0d1":"hvh2r","1ceec76f8d305544":"e44so","6582f8b293532f90":"5zAcU","8c1495bc004bacd5":"3lwy5"}],dlIjw:[function(e,t,i){let{PhysicalBody:n}=e("8b976b60c28092e0"),{ErrorManager:r,Logger:s,sc:a}=e("92f5971959d19587");t.exports.CollisionsManager=class{constructor(e){this.activateCollisions(e)}activateCollisions(e){e&&(this.room=e,a.hasOwn(this.room,"roomWorld")||r.error("Room world not found."),this.guestEmailDomain=this.room.config.getWithoutLogs("server/players/guestsUser/emailDomain"),this.room.roomWorld.on("postBroadphase",this.onWorldStepStart.bind(this)),this.room.roomWorld.on("preSolve",this.beforeResolveCollision.bind(this)),this.room.roomWorld.on("beginContact",this.onCollisionsBegin.bind(this)),this.room.roomWorld.on("endContact",this.onCollisionsEnd.bind(this)))}onWorldStepStart(e){let{pairs:t}=e;if(1>=t.length)return;let i=!1,n=!1,r=!1,s=!1;for(let e of t)e.playerId&&e.pStop&&e.stopFull(),e.roomObject&&e.pStop&&e.stopFull(),e.playerId&&(r=e),e.isBullet&&(i&&!n&&(n=e),i||(i=e),e.removeInvalidStateBulletBody()),e.isRoomObject&&!e.isBullet&&(s=e);this.room.roomWorld.bulletsStopOnPlayer&&r&&i&&r.stopFull(),this.room.roomWorld.bulletsStopOnObject&&s&&i&&s.stopFull(),this.removeIdleBullets()}removeIdleBullets(){if(0!==this.room.roomWorld.removeBulletsStateIds.length)for(let e of this.room.roomWorld.removeBulletsStateIds)this.room.state.removeBody(e),this.room.roomWorld.removeBulletsStateIds.splice(this.room.roomWorld.removeBulletsStateIds.indexOf(e),1)}beforeResolveCollision(e){if(this.room.roomWorld.allowPassWallsFromBelow)for(let t of e.contactEquations){let e=this.getPlayerBody(t),i=this.getWallBody(t);if(!e||!i||i.isWorldWall)return;e.position[1]>i.position[1]&&(t.enabled=!1)}}onCollisionsBegin(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return t.playerId&&i.playerId?this.playerHitPlayerBegin(t,i):(t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectBegin(n,r):n&&r.changeScenePoint?this.playerHitChangePointBegin(n,r):n&&r.isWall?this.playerHitWallBegin(n,r):t.isRoomObject&&i.isRoomObject?this.objectHitObjectBegin(t,i):void(t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall&&this.objectHitWallBegin(s,r))}onCollisionsEnd(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return(e.bodyA.playerId&&e.bodyB.playerId&&this.playerHitPlayerEnd(e.bodyA,e.bodyB),t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectEnd(n,r):n&&r.isWall?this.playerHitWallEnd(n,r):(t.isRoomObject&&i.isRoomObject&&this.objectHitObjectEnd(t,i),t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall)?this.objectHitWallEnd(s,r):void 0}playerHitPlayerBegin(e,t){this.room.events.emit("reldens.playerHitPlayer",{bodyA:e,bodyB:t})}playerHitPlayerEnd(e,t){e.stopFull(),t.stopFull(),this.room.events.emit("reldens.playerHitPlayerEnd",{bodyA:e,bodyB:t})}playerHitObjectBegin(e,t){this.room.events.emit("reldens.startPlayerHitObjectBegin",{playerBody:e,otherBody:t}),this.findAlternativePath(e),t.roomObject&&a.isFunction(t.roomObject.onHit)&&t.roomObject.onHit({bodyA:e,bodyB:t,room:this.room}),this.room.events.emit("reldens.endPlayerHitObjectBegin",{playerBody:e,otherBody:t})}playerHitObjectEnd(e,t){let i={stopFull:!0,continue:!0};if(this.room.events.emit("reldens.playerHitObjectEnd",{playerBody:e,result:i}),!i.continue)return!1;e.stopFull(i.stopFull)}playerHitWallBegin(e,t){this.room.events.emit("reldens.playerHitWallBegin",{playerBody:e,wallBody:t})}playerHitWallEnd(e,t){if(this.room.events.emit("reldens.startPlayerHitWallEnd",{playerBody:e,wallBody:t}),e.autoMoving&&1{s.error("There was an error while setting the next scene initial position.",e)}),this.room.events.emit("reldens.endPlayerHitChangePoint",{collisionsManager:this,playerSchema:i,playerBody:e,changePoint:t,changeData:h})}objectHitObjectBegin(e,t){this.room.events.emit("reldens.startObjectHitObject",{bodyA:e,bodyB:t});let i=a.hasOwn(e,"hitPriority"),n=a.hasOwn(t,"hitPriority"),r={bodyA:e,bodyB:t,room:this.room},s=(i||n)&&(!i||n&&!(i>n))?t:e;s.roomObject&&a.isFunction(s.roomObject?.onHit)&&s.roomObject.onHit(r),e.isBullet&&e.roomObject.removeBullet(e),t.isBullet&&t.roomObject.removeBullet(t),this.findAlternativePath(e),this.findAlternativePath(t),this.room.events.emit("reldens.endObjectHitObject",{bodyA:e,bodyB:t,priorityObject:s})}objectHitObjectEnd(e,t){this.bodyFullStop(e),this.bodyFullStop(t),this.room.events.emit("reldens.objectHitObjectEnd",{bodyA:e,bodyB:t})}objectHitWallBegin(e,t){let i={objectBody:e,wall:t,continue:!0};return this.room.events.emit("reldens.objectHitWallBegin",i),i.continue&&e.isBullet&&e.roomObject.removeBullet(e),i}objectHitWallEnd(e){this.room.events.emit("reldens.startObjectHitWall",{objectBody:e}),this.resetObjectAutoMove(e),this.room.events.emit("reldens.endObjectHitWall",{objectBody:e})}bodyFullStop(e){if(!e)return!1;!(e.autoMoving&&0Math.abs(this.velocity[0])?0:o.roundToPrecision(this.velocity[0],4),this.velocity[1]=1e-4>Math.abs(this.velocity[1])?0:o.roundToPrecision(this.velocity[1],4),.001>Math.abs(this.velocity[0])&&this.stopX(),.001>Math.abs(this.velocity[1])&&this.stopY(),this.updateBodyState()}speedToNext(){if(!this.autoMoving||0===this.autoMoving.length){this.setShapesCollisionGroup(this.originalCollisionGroup);return}if(!this.autoMoving[0]){a.error("Missing autoMoving first index."),this.setShapesCollisionGroup(this.originalCollisionGroup);return}let e=this.autoMoving[0][0],t=this.autoMoving[0][1];if(0!==this.speedToNextRetryCounter.col&&this.speedToNextRetryCounter.col===e&&0!==this.speedToNextRetryCounter.row&&this.speedToNextRetryCounter.row===t&&0!==this.velocity[0]&&0!==this.velocity[1]&&this.speedToNextRetryCounter.retries++,this.speedToNextMaxRetries===this.speedToNextRetryCounter.retries){this.speedToNextRetryCounter.col=0,this.speedToNextRetryCounter.row=0;let e=this.autoMoving.shift(),t=this.autoMoving.pop();this.stopFull(!0),this.alignToTile(),this.autoMoving=this.getPathFinder().findPath(e,t),this.speedToNextRetryCounter.retries=0;return}if(this.speedToNextRetryCounter.col=e,this.speedToNextRetryCounter.row=t,this.currentCol===e&&this.currentRow===t){this.autoMoving.shift(),0===this.autoMoving.length&&this.stopAutoMoving();return}this.currentCol===e&&0!==this.velocity[0]&&(this.stopX(),this.alignToTile()),this.currentCol>e&&this.initMove(s.LEFT,!0),this.currentColt&&this.initMove(s.UP,!0),this.currentRow=Math.abs(i)&&.01>=Math.abs(n)&&(this.position[0]=e,this.position[1]=t)}updateBodyState(){if(!o.hasOwn(this.bodyState,"x")||!o.hasOwn(this.bodyState,"y"))return;if(this.isNotMoving()){this.bodyState.mov=!1;return}let e=o.roundToPrecision(this.position[0],0),t=o.roundToPrecision(this.position[1],0);if(!e||!t)return;this.bodyState.x!==e&&(this.bodyState.x=o.roundToPrecision(e,this.worldPositionPrecision)),this.bodyState.y!==t&&(this.bodyState.y=o.roundToPrecision(t,this.worldPositionPrecision));let i=o.roundToPrecision(this.velocity[0],this.worldSpeedPrecision),n=o.roundToPrecision(this.velocity[1],this.worldSpeedPrecision);this.bodyState.mov=0!==i||0!==n,this.removeInvalidStateBulletBody()}bodyLogKey(){return this.playerId?"PJ-"+this.playerId:this.bodyState?.key}removeInvalidStateBulletBody(){this.isBullet&&(this.isOutOfWorldBounds()||this.hasInvalidSpeed())&&(this.world.removeBodies.push(this),this.bodyStateId&&this.world.removeBulletsStateIds.push(this.bodyStateId))}hasInvalidSpeed(){if(!this.applySpeedThresholdOnBullets&&this.isBullet)return!1;let e=this.isBullet?this.originalSpeed.x:this.movementSpeed,t=this.isBullet?this.originalSpeed.x:this.movementSpeed,i=e*this.speedThreshold,n=t*this.speedThreshold;return Math.abs(this.velocity[0])this.position[0]||this.position[0]>this.worldWidth*this.worldTileWidth||0>this.position[1]||this.position[1]>this.worldHeight*this.worldTileHeight}isNotMoving(){let e=this.movementSpeed*this.speedThreshold,t=o.roundToPrecision(this.velocity[0]),i=o.roundToPrecision(this.velocity[1]);if(0!==this.velocity[0]&&Math.abs(t)this.velocity[0]?-1:1,n=0===this.velocity[1]?0:0>this.velocity[1]?-1:1;e===s.RIGHT&&(i=1),e===s.LEFT&&(i=-1),e===s.UP&&(n=-1),e===s.DOWN&&(n=1);let r=this.normalizeSpeed(i,n);this.velocity[0]=t*i*r,this.velocity[1]=t*n*r,(e===s.RIGHT||e===s.LEFT)&&this.validateAndSetDirection(e,this.diagonalHorizontal,this.velocity[1]),(e===s.UP||e===s.DOWN)&&this.validateAndSetDirection(e,!this.diagonalHorizontal,this.velocity[0])}moveUp(e){if(!this.world.applyGravity){this.velocity[1]=-e;return}this.canJump()&&(this.velocity[1]=-this.jumpSpeed,setTimeout(()=>{this.stopY()},this.jumpTimeMs))}calculateMagnitude(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}checkNonZeroComponents(e,t){return Math.abs(e)>0||Math.abs(t)>0}normalizeSpeed(e,t){return this.checkNonZeroComponents(e,t)?1/this.calculateMagnitude(e,t):0}validateAndSetDirection(e,t,i){(this.animationBasedOnPress||this.bodyState.autoDirection)&&(t||0===i)&&(this.bodyState.dir=e)}stopMove(){this.world&&this.world.applyGravity?this.stopX():this.stopFull()}stopFull(e=!1){this.velocity[0]=0,this.world?.applyGravity||(this.velocity[1]=0),this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopX(e=!1){this.velocity[0]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopY(e=!1){this.velocity[1]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}moveToPoint(e){this.resetAuto(),this.updateCurrentPoints();let t=[this.currentCol,this.currentRow],i=[e.column,e.row],n=this.getPathFinder();return n?(this.autoMoving=n.findPath(t,i),this.autoMoving||(this.setShapesCollisionGroup(this.originalCollisionGroup),this.stopMove()),this.autoMoving):(this.setShapesCollisionGroup(this.originalCollisionGroup),!1)}updateCurrentPoints(){if(!this.world)return;let{currentCol:e,currentRow:t}=this.positionToTiles(this.position[0],this.position[1]);return this.originalCol||(this.originalCol=e),this.originalRow||(this.originalRow=t),this.currentCol=e,this.currentRow=t,this}moveToOriginalPoint(){if(this.originalCol&&this.originalRow||this.updateCurrentPoints(),this.disableObjectsCollisionsOnReturn&&this.setShapesCollisionGroup(0),this.stopFull(),0===this.moveToOriginalPointWithDelay){this.moveToPoint({column:this.originalCol,row:this.originalRow});return}this.moveToOriginalPointTimer=setTimeout(()=>{this.moveToPoint({column:this.originalCol,row:this.originalRow})},this.moveToOriginalPointWithDelay)}setShapesCollisionGroup(e){if(this.lastSetCollisionGroup!==e)for(let t of(this.lastSetCollisionGroup=e,this.shapes))t.collisionGroup=e}canJump(){for(let e of this.world.narrowphase.contactEquations){let t=e.bodyA===this?e.bodyA:e.bodyB,i=e.bodyA.isWall?e.bodyA:e.bodyB;if(t.playerId&&0<=Number(Number(t.velocity[1]).toFixed(2))&&i.isWall&&!i.isWorldWall&&t.position[1]=0?i>this.worldWidth?this.worldWidth:i:0;let n=Math.round((t-this.worldTileHeight/2)/this.worldTileHeight);return{currentCol:i,currentRow:n=n>=0?n>this.worldHeight?this.worldHeight:n:0}}getPathFinder(){return this.pathFinder?this.pathFinder:this.world?.pathFinder}get worldTileWidth(){return this.world?.mapJson?.tilewidth}get worldTileHeight(){return this.world?.mapJson?.tileheight}get worldWidth(){return this.world?.mapJson?.width}get worldHeight(){return this.world?.mapJson?.height}}},{"3304f256e9e76c94":"6bkiu","37df9b723b227260":"93TbC","924061961623cd99":"3lwy5"}],"6bkiu":[function(e,t,i){Object.defineProperty(t.exports={AABB:e("684b4c2f51a7982f"),AngleLockEquation:e("bdffc69900b9d197"),Body:e("3f75664c0e64d6f0"),Broadphase:e("6a91eca7403fbf23"),Capsule:e("856d4f0d9932be15"),Circle:e("2ed19d42da3c562d"),Constraint:e("aa927dde400e3497"),ContactEquation:e("2d074b8afa958c13"),ContactEquationPool:e("c3b18056b7840eb7"),ContactMaterial:e("95c5dc13a3c7c260"),Convex:e("ac59578c032edc9f"),DistanceConstraint:e("5c90feeb31df3d5e"),Equation:e("f8f4511fa21776ff"),EventEmitter:e("c3d3b3771d6558ce"),FrictionEquation:e("cab660c3bd983ee4"),FrictionEquationPool:e("87607de358c9c21"),GearConstraint:e("90a946d116b90b53"),GSSolver:e("6894c0e11a66902e"),Heightfield:e("4b3b7392ecef1240"),Line:e("1e20d14367f50060"),LockConstraint:e("fdc7a4304d635ff8"),Material:e("2ead159ba8c055f3"),Narrowphase:e("9e6fca932dff920d"),NaiveBroadphase:e("b1c0219aba2108d9"),Particle:e("9633119b46909ded"),Plane:e("4f144cae12074657"),Pool:e("a996dbee78852c0f"),RevoluteConstraint:e("34cc4dd48e1d0bad"),PrismaticConstraint:e("53d36735aa65530e"),Ray:e("1d4b6783af535b58"),RaycastResult:e("f9b0bdbeada25bdf"),Box:e("1eaca10f1a6fb0c1"),RotationalVelocityEquation:e("316198d4ce4102e3"),SAPBroadphase:e("60bfc18e7e665b71"),Shape:e("1eb899949248649e"),Solver:e("3c21f4f3806b3be"),Spring:e("e3ff62163c08949b"),TopDownVehicle:e("e782a409308bbff6"),LinearSpring:e("78e7b803f9bca9ee"),RotationalSpring:e("fe49496c221554ba"),Utils:e("36b147cdc3f4bb72"),World:e("551a53932a4cfdc8"),vec2:e("19262ec940ce734e"),version:e("df51020e342624b").version},"Rectangle",{get:function(){return console.warn("The Rectangle class has been renamed to Box."),this.Box}})},{"684b4c2f51a7982f":"7Fman",bdffc69900b9d197:"jaQW1","3f75664c0e64d6f0":"1vLHz","6a91eca7403fbf23":"5ZGdm","856d4f0d9932be15":"iCu6l","2ed19d42da3c562d":"71oh9",aa927dde400e3497:"fl4d5","2d074b8afa958c13":"2hWGL",c3b18056b7840eb7:"c7vmA","95c5dc13a3c7c260":"7VedP",ac59578c032edc9f:"jXoGk","5c90feeb31df3d5e":"eMph3",f8f4511fa21776ff:"kSmDE",c3d3b3771d6558ce:"3wc90",cab660c3bd983ee4:"6o1RQ","87607de358c9c21":"dT2Zx","90a946d116b90b53":"c2nuE","6894c0e11a66902e":"Kc35t","4b3b7392ecef1240":"g5PHm","1e20d14367f50060":"3e8Uk",fdc7a4304d635ff8:"3C7H6","2ead159ba8c055f3":"kKj3c","9e6fca932dff920d":"bsKDm",b1c0219aba2108d9:"liK4P","9633119b46909ded":"hsc7O","4f144cae12074657":"kpexr",a996dbee78852c0f:"5lrfq","34cc4dd48e1d0bad":"aOW07","53d36735aa65530e":"iK7mQ","1d4b6783af535b58":"3aaBs",f9b0bdbeada25bdf:"bK4Qs","1eaca10f1a6fb0c1":"1uf32","316198d4ce4102e3":"dpMuH","60bfc18e7e665b71":"cJxaR","1eb899949248649e":"fyiLV","3c21f4f3806b3be":"cslpB",e3ff62163c08949b:"cXKmN",e782a409308bbff6:"cQjmW","78e7b803f9bca9ee":"4chxn",fe49496c221554ba:"j6tWA","36b147cdc3f4bb72":"7sQcP","551a53932a4cfdc8":"5xqPb","19262ec940ce734e":"geg3A",df51020e342624b:"aPywz"}],"7Fman":[function(e,t,i){var n=e("b3f1d8665c8114ff");function r(e){this.lowerBound=n.create(),e&&e.lowerBound&&n.copy(this.lowerBound,e.lowerBound),this.upperBound=n.create(),e&&e.upperBound&&n.copy(this.upperBound,e.upperBound)}e("def10f340a350e0e"),t.exports=r;var s=n.create();r.prototype.setFromPoints=function(e,t,i,r){var a=this.lowerBound,o=this.upperBound;"number"!=typeof i&&(i=0),0!==i?n.rotate(a,e[0],i):n.copy(a,e[0]),n.copy(o,a);for(var h=Math.cos(i),c=Math.sin(i),l=1;lo[p]&&(o[p]=u[p]),u[p]i&&(this.lowerBound[t]=i);var n=e.upperBound[t];this.upperBound[t]h?-1:o}},{b3f1d8665c8114ff:"geg3A",def10f340a350e0e:"7sQcP"}],geg3A:[function(e,t,i){var n=t.exports={},r=e("d83d88b709f376af");n.crossLength=function(e,t){return e[0]*t[1]-e[1]*t[0]},n.crossVZ=function(e,t,i){return n.rotate(e,t,-Math.PI/2),n.scale(e,e,i),e},n.crossZV=function(e,t,i){return n.rotate(e,i,Math.PI/2),n.scale(e,e,t),e},n.rotate=function(e,t,i){if(0!==i){var n=Math.cos(i),r=Math.sin(i),s=t[0],a=t[1];e[0]=n*s-r*a,e[1]=r*s+n*a}else e[0]=t[0],e[1]=t[1]},n.rotate90cw=function(e,t){var i=t[0],n=t[1];e[0]=n,e[1]=-i},n.toLocalFrame=function(e,t,i,r){n.copy(e,t),n.sub(e,e,i),n.rotate(e,e,-r)},n.toGlobalFrame=function(e,t,i,r){n.copy(e,t),n.rotate(e,e,r),n.add(e,e,i)},n.vectorToLocalFrame=function(e,t,i){n.rotate(e,t,-i)},n.vectorToGlobalFrame=function(e,t,i){n.rotate(e,t,i)},n.centroid=function(e,t,i,r){return n.add(e,t,i),n.add(e,e,r),n.scale(e,e,1/3),e},n.create=function(){var e=new r.ARRAY_TYPE(2);return e[0]=0,e[1]=0,e},n.clone=function(e){var t=new r.ARRAY_TYPE(2);return t[0]=e[0],t[1]=e[1],t},n.fromValues=function(e,t){var i=new r.ARRAY_TYPE(2);return i[0]=e,i[1]=t,i},n.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},n.set=function(e,t,i){return e[0]=t,e[1]=i,e},n.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},n.subtract=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},n.sub=n.subtract,n.multiply=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},n.mul=n.multiply,n.divide=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},n.div=n.divide,n.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},n.distance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},n.dist=n.distance,n.squaredDistance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n},n.sqrDist=n.squaredDistance,n.length=function(e){var t=e[0],i=e[1];return Math.sqrt(t*t+i*i)},n.len=n.length,n.squaredLength=function(e){var t=e[0],i=e[1];return t*t+i*i},n.sqrLen=n.squaredLength,n.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},n.normalize=function(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),e[0]=t[0]*r,e[1]=t[1]*r),e},n.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},n.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},n.lerp=function(e,t,i,n){var r=t[0],s=t[1];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e},n.reflect=function(e,t,i){var n=t[0]*i[0]+t[1]*i[1];e[0]=t[0]-2*i[0]*n,e[1]=t[1]-2*i[1]*n},n.getLineSegmentsIntersection=function(e,t,i,r,s){var a=n.getLineSegmentsIntersectionFraction(t,i,r,s);return!(a<0)&&(e[0]=t[0]+a*(i[0]-t[0]),e[1]=t[1]+a*(i[1]-t[1]),!0)},n.getLineSegmentsIntersectionFraction=function(e,t,i,n){var r,s,a=t[0]-e[0],o=t[1]-e[1],h=n[0]-i[0],c=n[1]-i[1];return(r=(-o*(e[0]-i[0])+a*(e[1]-i[1]))/(-h*o+a*c),s=(h*(e[1]-i[1])-c*(e[0]-i[0]))/(-h*o+a*c),r>=0&&r<=1&&s>=0&&s<=1)?s:-1}},{d83d88b709f376af:"7sQcP"}],"7sQcP":[function(e,t,i){function n(){}t.exports=n,n.appendArray=function(e,t){if(t.length<15e4)e.push.apply(e,t);else for(var i=0,n=t.length;i!==n;++i)e.push(t[i])},n.splice=function(e,t,i){i=i||1;for(var n=t,r=e.length-i;ni&&(i=a+o)}this.boundingRadius=i},l.prototype.addShape=function(e,t,i){if(e.body)throw Error("A shape can only be added to one body.");e.body=this,t?n.copy(e.position,t):n.set(e.position,0,0),e.angle=i||0,this.shapes.push(e),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},l.prototype.removeShape=function(e){var t=this.shapes.indexOf(e);return -1!==t&&(this.shapes.splice(t,1),this.aabbNeedsUpdate=!0,e.body=null,!0)},l.prototype.updateMassProperties=function(){if(this.type===l.STATIC||this.type===l.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var e=this.shapes,t=e.length,i=this.mass/t,r=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var s=0;s0?1/r:0}this.invMass=1/this.mass,n.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}},n.create(),l.prototype.applyForce=function(e,t){if(n.add(this.force,this.force,e),t){var i=n.crossLength(t,e);this.angularForce+=i}};var f=n.create(),p=n.create(),g=n.create();l.prototype.applyForceLocal=function(e,t){t=t||g,this.vectorToWorldFrame(f,e),this.vectorToWorldFrame(p,t),this.applyForce(f,p)};var m=n.create();l.prototype.applyImpulse=function(e,t){if(this.type===l.DYNAMIC&&(n.scale(m,e,this.invMass),n.multiply(m,this.massMultiplier,m),n.add(this.velocity,m,this.velocity),t)){var i=n.crossLength(t,e);i*=this.invInertia,this.angularVelocity+=i}};var v=n.create(),y=n.create(),b=n.create();l.prototype.applyImpulseLocal=function(e,t){t=t||b,this.vectorToWorldFrame(v,e),this.vectorToWorldFrame(y,t),this.applyImpulse(v,y)},l.prototype.toLocalFrame=function(e,t){n.toLocalFrame(e,t,this.position,this.angle)},l.prototype.toWorldFrame=function(e,t){n.toGlobalFrame(e,t,this.position,this.angle)},l.prototype.vectorToLocalFrame=function(e,t){n.vectorToLocalFrame(e,t,this.angle)},l.prototype.vectorToWorldFrame=function(e,t){n.vectorToGlobalFrame(e,t,this.angle)},l.prototype.fromPolygon=function(e,t){t=t||{};for(var i,a=this.shapes.length;a>=0;--a)this.removeShape(this.shapes[a]);var o=new r.Polygon;if(o.vertices=e,o.makeCCW(),"number"==typeof t.removeCollinearPoints&&o.removeCollinearPoints(t.removeCollinearPoints),void 0===t.skipSimpleCheck&&!o.isSimple())return!1;this.concavePath=o.vertices.slice(0);for(var a=0;a=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=l.AWAKE):(this.idleTime+=i,this.sleepState=l.SLEEPY),this.idleTime>this.sleepTimeLimit&&(t?this.wantsToSleep=!0:this.sleep()))},l.prototype.overlaps=function(e){return this.world.overlapKeeper.bodiesAreOverlapping(this,e)};var T=n.create(),S=n.create();l.prototype.integrate=function(e){var t=this.invMass,i=this.force,r=this.position,s=this.velocity;n.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*e),n.scale(T,i,e*t),n.multiply(T,this.massMultiplier,T),n.add(s,T,s),this.integrateToTimeOfImpact(e)||(n.scale(S,s,e),n.add(r,r,S),this.fixedRotation||(this.angle+=this.angularVelocity*e)),this.aabbNeedsUpdate=!0};var A=new a,C=new o({mode:o.ALL}),_=n.create(),I=n.create(),O=n.create(),P=n.create();l.prototype.integrateToTimeOfImpact=function(e){if(this.ccdSpeedThreshold<0||n.squaredLength(this.velocity)=c&&he.vertices.length)throw Error("lol2");if(t<0)throw Error("lol3");for(var n=t;nt[e][0])&&(e=i);r.left(this.at(e-1),this.at(e),this.at(e+1))||this.reverse()},a.prototype.reverse=function(){for(var e=[],t=0,i=this.vertices.length;t!==i;t++)e.push(this.vertices.pop());this.vertices=e},a.prototype.isReflex=function(e){return r.right(this.at(e-1),this.at(e),this.at(e+1))};var o=[],h=[];function c(e,t,i,n,r){r=r||0;var a=t[1]-e[1],o=e[0]-t[0],h=a*e[0]+o*e[1],c=n[1]-i[1],l=i[0]-n[0],u=c*i[0]+l*i[1],d=a*l-c*o;return s.eq(d,0,r)?[0,0]:[(l*h-o*u)/d,(a*u-c*h)/d]}a.prototype.canSee=function(e,t){var i,s;if(r.leftOn(this.at(e+1),this.at(e),this.at(t))&&r.rightOn(this.at(e-1),this.at(e),this.at(t)))return!1;s=r.sqdist(this.at(e),this.at(t));for(var a=0;a!==this.vertices.length;++a)if((a+1)%this.vertices.length!==e&&a!==e&&r.leftOn(this.at(e),this.at(t),this.at(a+1))&&r.rightOn(this.at(e),this.at(t),this.at(a))&&(o[0]=this.at(e),o[1]=this.at(t),h[0]=this.at(a),h[1]=this.at(a+1),i=n.lineInt(o,h),r.sqdist(this.at(e),i)0?this.slice(e):[this]},a.prototype.slice=function(e){if(0==e.length)return[this];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2==e[0].length&&e[0][0]instanceof Array){for(var t=[this],i=0;is)return console.warn("quickDecomp: max level ("+s+") reached."),e;for(var w=0;wm&&(m+=this.vertices.length),g=Number.MAX_VALUE,m3&&i>=0;--i)r.collinear(this.at(i-1),this.at(i),this.at(i+1),e)&&(this.vertices.splice(i%this.vertices.length,1),i--,t++);return t}},{d8008e40e643f58e:"4K6SZ","27760a6f627f557e":"jyNL6",edd1be50e7a94605:"7TFSV"}],"4K6SZ":[function(e,t,i){var n=e("fea8e7ecc9e8fe4");function r(){}t.exports=r,r.lineInt=function(e,t,i){i=i||0;var r,s,a,o,h,c,l,u=[0,0];return r=e[1][1]-e[0][1],s=e[0][0]-e[1][0],a=r*e[0][0]+s*e[0][1],o=t[1][1]-t[0][1],h=t[0][0]-t[1][0],c=o*t[0][0]+h*t[0][1],l=r*h-o*s,n.eq(l,0,i)||(u[0]=(h*a-s*c)/l,u[1]=(r*c-o*a)/l),u},r.segmentsIntersect=function(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}},{fea8e7ecc9e8fe4:"7TFSV"}],"7TFSV":[function(e,t,i){function n(){}t.exports=n,n.eq=function(e,t,i){return Math.abs(e-t)<(i=i||0)}},{}],jyNL6:[function(e,t,i){function n(){}t.exports=n,n.area=function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])},n.left=function(e,t,i){return n.area(e,t,i)>0},n.leftOn=function(e,t,i){return n.area(e,t,i)>=0},n.right=function(e,t,i){return 0>n.area(e,t,i)},n.rightOn=function(e,t,i){return 0>=n.area(e,t,i)};var r=[],s=[];n.collinear=function(e,t,i,a){return a?(r[0]=t[0]-e[0],r[1]=t[1]-e[1],s[0]=i[0]-t[0],s[1]=i[1]-t[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))s)&&(s=n),(null===a||ns){var c=a;a=s,s=c}r.set(t,a,s)},a.prototype.projectOntoWorldAxis=function(e,t,i,n){var s=h;this.projectOntoLocalAxis(e,n),0!==i?r.rotate(s,e,i):s=e;var a=r.dot(t,s);r.set(n,n[0]+a,n[1]+a)},a.prototype.updateTriangles=function(){this.triangles.length=0;for(var e=[],t=0;tt&&(t=n)}this.boundingRadius=Math.sqrt(t)},a.triangleArea=function(e,t,i){return((t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1]))*.5},a.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var e=this.triangles,t=this.vertices,i=0;i!==e.length;i++){var n=e[i],r=t[n[0]],s=t[n[1]],o=t[n[2]],h=a.triangleArea(r,s,o);this.area+=h}},a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)};var p=r.create(),g=r.create(),m=r.create();a.prototype.raycast=function(e,t,i,n){var s=this.vertices;r.toLocalFrame(p,t.from,i,n),r.toLocalFrame(g,t.to,i,n);for(var a=s.length,o=0;o=0&&(r.sub(m,c,h),r.rotate(m,m,-Math.PI/2+n),r.normalize(m,m),t.reportIntersection(e,l,m,o))}}},{"841fd986776e9f0c":"fyiLV",dcb74eb19e59e896:"geg3A","84be6d54e4a9572e":"5fcbo",a884cbe4162e15c3:"5arAY"}],fyiLV:[function(e,t,i){t.exports=r;var n=e("7f0647825fa1536d");function r(e){e=e||{},this.body=null,this.position=n.fromValues(0,0),e.position&&n.copy(this.position,e.position),this.angle=e.angle||0,this.type=e.type||0,this.id=r.idCounter++,this.boundingRadius=0,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:1,this.collisionResponse=void 0===e.collisionResponse||e.collisionResponse,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:1,this.material=e.material||null,this.area=0,this.sensor=void 0!==e.sensor&&e.sensor,this.type&&this.updateBoundingRadius(),this.updateArea()}r.idCounter=0,r.CIRCLE=1,r.PARTICLE=2,r.PLANE=4,r.CONVEX=8,r.LINE=16,r.BOX=32,Object.defineProperty(r,"RECTANGLE",{get:function(){return console.warn("Shape.RECTANGLE is deprecated, use Shape.BOX instead."),r.BOX}}),r.CAPSULE=64,r.HEIGHTFIELD=128,r.prototype.computeMomentOfInertia=function(e){},r.prototype.updateBoundingRadius=function(){},r.prototype.updateArea=function(){},r.prototype.computeAABB=function(e,t,i){},r.prototype.raycast=function(e,t,i,n){}},{"7f0647825fa1536d":"geg3A"}],"5fcbo":[function(e,t,i){var n={};n.GetArea=function(e){if(e.length<6)return 0;for(var t=e.length-2,i=0,n=0;n>1;if(t<3)return[];for(var i=[],r=[],s=0;s3;){var o=r[(s+0)%a],h=r[(s+1)%a],c=r[(s+2)%a],l=e[2*o],u=e[2*o+1],d=e[2*h],f=e[2*h+1],p=e[2*c],g=e[2*c+1],m=!1;if(n._convex(l,u,d,f,p,g)){m=!0;for(var v=0;v3*a)break}return i.push(r[0],r[1],r[2]),i},n._PointInTriangle=function(e,t,i,n,r,s,a,o){var h=a-i,c=o-n,l=r-i,u=s-n,d=e-i,f=t-n,p=h*h+c*c,g=h*l+c*u,m=h*d+c*f,v=l*l+u*u,y=l*d+u*f,b=1/(p*v-g*g),x=(v*m-g*y)*b,E=(p*y-g*m)*b;return x>=0&&E>=0&&x+E<1},n._convex=function(e,t,i,n,r,s){return(t-n)*(r-i)+(i-e)*(s-n)>=0},t.exports=n},{}],bK4Qs:[function(e,t,i){var n=e("ffed16535981586e"),r=e("b8c131fd689cab6d");function s(){this.normal=n.create(),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1}t.exports=s,s.prototype.reset=function(){n.set(this.normal,0,0),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1},s.prototype.getHitDistance=function(e){return n.distance(e.from,e.to)*this.fraction},s.prototype.hasHit=function(){return -1!==this.fraction},s.prototype.getHitPoint=function(e,t){n.lerp(e,t.from,t.to,this.fraction)},s.prototype.stop=function(){this.isStopped=!0},s.prototype.shouldStop=function(e){return this.isStopped||-1!==this.fraction&&e.mode===r.ANY},s.prototype.set=function(e,t,i,r,s){n.copy(this.normal,e),this.shape=t,this.body=i,this.fraction=r,this.faceIndex=s}},{ffed16535981586e:"geg3A",b8c131fd689cab6d:"3aaBs"}],"3aaBs":[function(e,t,i){t.exports=r;var n=e("33edfb61f004dada");function r(e){e=e||{},this.from=e.from?n.fromValues(e.from[0],e.from[1]):n.create(),this.to=e.to?n.fromValues(e.to[0],e.to[1]):n.create(),this.checkCollisionResponse=void 0===e.checkCollisionResponse||e.checkCollisionResponse,this.skipBackfaces=!!e.skipBackfaces,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:-1,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:-1,this.mode=void 0!==e.mode?e.mode:r.ANY,this.callback=e.callback||function(e){},this.direction=n.create(),this.length=1,this.update()}e("9e89c41e6357f79c"),e("197f77279886c828"),e("bb1f87d75f3ca6c0"),r.prototype.constructor=r,r.CLOSEST=1,r.ANY=2,r.ALL=4,r.prototype.update=function(){var e=this.direction;n.sub(e,this.to,this.from),this.length=n.length(e),n.normalize(e,e)},r.prototype.intersectBodies=function(e,t){for(var i=0,n=t.length;!e.shouldStop(this)&&i=0||s.containsPoint(this.from))&&this.intersectBody(e,r)}};var s=n.create();r.prototype.intersectBody=function(e,t){var i=this.checkCollisionResponse;if(!i||t.collisionResponse)for(var r=0,a=t.shapes.length;rt.boundingRadius*t.boundingRadius||(this._currentBody=s,this._currentShape=t,t.raycast(e,this,r,i),this._currentBody=this._currentShape=null)},r.prototype.getAABB=function(e){var t=this.to,i=this.from;n.set(e.lowerBound,Math.min(t[0],i[0]),Math.min(t[1],i[1])),n.set(e.upperBound,Math.max(t[0],i[0]),Math.max(t[1],i[1]))},n.create(),r.prototype.reportIntersection=function(e,t,i,s){this.from,this.to;var a=this._currentShape,o=this._currentBody;if(!(this.skipBackfaces&&n.dot(i,this.direction)>0))switch(this.mode){case r.ALL:e.set(i,a,o,t,s),this.callback(e);break;case r.CLOSEST:(t=0&&(r.rotate(h,u,n),r.scale(h,h,2*f-1),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}for(var m=Math.pow(this.radius,2)+Math.pow(d,2),f=0;f<2;f++){r.set(c,d*(2*f-1),0),r.toGlobalFrame(c,c,i,n);var v=Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2),y=2*((a[0]-s[0])*(s[0]-c[0])+(a[1]-s[1])*(s[1]-c[1])),g=Math.pow(y,2)-4*v*(Math.pow(s[0]-c[0],2)+Math.pow(s[1]-c[1],2)-Math.pow(this.radius,2));if(!(g<0)){if(0===g){if(r.lerp(o,s,a,g),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}else{var b=Math.sqrt(g),x=1/(2*v),E=(-y-b)*x,w=(-y+b)*x;if(E>=0&&E<=1&&(r.lerp(o,s,a,E),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,E,h,-1),e.shouldStop(t)))||w>=0&&w<=1&&(r.lerp(o,s,a,w),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,w,h,-1),e.shouldStop(t))))return}}}}},{"9e9977082ca4fe14":"fyiLV","18975187aa31e1cf":"geg3A"}],"71oh9":[function(e,t,i){var n=e("7b96c457d59a0d0"),r=e("b89d644e39bbe061");function s(e){"number"==typeof arguments[0]&&(e={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),e=e||{},this.radius=e.radius||1,e.type=n.CIRCLE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){var t=this.radius;return e*t*t/2},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},s.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},s.prototype.computeAABB=function(e,t,i){var n=this.radius;r.set(e.upperBound,n,n),r.set(e.lowerBound,-n,-n),t&&(r.add(e.lowerBound,e.lowerBound,t),r.add(e.upperBound,e.upperBound,t))};var a=r.create(),o=r.create();s.prototype.raycast=function(e,t,i,n){var s=t.from,h=t.to,c=this.radius,l=Math.pow(h[0]-s[0],2)+Math.pow(h[1]-s[1],2),u=2*((h[0]-s[0])*(s[0]-i[0])+(h[1]-s[1])*(s[1]-i[1])),d=Math.pow(u,2)-4*l*(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)-Math.pow(c,2));if(!(d<0)){if(0===d)r.lerp(a,s,h,d),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,d,o,-1);else{var f=Math.sqrt(d),p=1/(2*l),g=(-u-f)*p,m=(-u+f)*p;if(g>=0&&g<=1&&(r.lerp(a,s,h,g),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,g,o,-1),e.shouldStop(t)))return;m>=0&&m<=1&&(r.lerp(a,s,h,m),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,m,o,-1))}}}},{"7b96c457d59a0d0":"fyiLV",b89d644e39bbe061:"geg3A"}],fl4d5:[function(e,t,i){t.exports=r;var n=e("72b9dd33e1ac0322");function r(e,t,i,r){this.type=i,r=n.defaults(r,{collideConnected:!0,wakeUpBodies:!0}),this.equations=[],this.bodyA=e,this.bodyB=t,this.collideConnected=r.collideConnected,r.wakeUpBodies&&(e&&e.wakeUp(),t&&t.wakeUp())}r.prototype.update=function(){throw Error("method update() not implmemented in this Constraint subclass!")},r.DISTANCE=1,r.GEAR=2,r.LOCK=3,r.PRISMATIC=4,r.REVOLUTE=5,r.prototype.setStiffness=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.stiffness=e,n.needsUpdate=!0}},r.prototype.setRelaxation=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.relaxation=e,n.needsUpdate=!0}}},{"72b9dd33e1ac0322":"7sQcP"}],"2hWGL":[function(e,t,i){var n=e("d1ef8939b96b621"),r=e("b8f27de80732e752");function s(e,t){n.call(this,e,t,0,Number.MAX_VALUE),this.contactPointA=r.create(),this.penetrationVec=r.create(),this.contactPointB=r.create(),this.normalA=r.create(),this.restitution=0,this.firstImpact=!1,this.shapeA=null,this.shapeB=null}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeB=function(e,t,i){var n,s,a=this.bodyA,o=this.bodyB,h=this.contactPointA,c=this.contactPointB,l=a.position,u=o.position,d=this.penetrationVec,f=this.normalA,p=this.G,g=r.crossLength(h,f),m=r.crossLength(c,f);return p[0]=-f[0],p[1]=-f[1],p[2]=-g,p[3]=f[0],p[4]=f[1],p[5]=m,r.add(d,u,c),r.sub(d,d,l),r.sub(d,d,h),this.firstImpact&&0!==this.restitution?(s=0,n=1/t*(1+this.restitution)*this.computeGW()):(s=r.dot(f,d)+this.offset,n=this.computeGW()),-s*e-n*t-i*this.computeGiMf()};var a=r.create(),o=r.create(),h=r.create();s.prototype.getVelocityAlongNormal=function(){return this.bodyA.getVelocityAtPoint(a,this.contactPointA),this.bodyB.getVelocityAtPoint(o,this.contactPointB),r.subtract(h,a,o),r.dot(this.normalA,h)}},{d1ef8939b96b621:"kSmDE",b8f27de80732e752:"geg3A"}],c7vmA:[function(e,t,i){var n=e("c9592f5c11436c3c"),r=e("16e85c8eda8f563e");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=null,this}},{c9592f5c11436c3c:"2hWGL","16e85c8eda8f563e":"5lrfq"}],"5lrfq":[function(e,t,i){function n(e){e=e||{},this.objects=[],void 0!==e.size&&this.resize(e.size)}t.exports=n,n.prototype.resize=function(e){for(var t=this.objects;t.length>e;)t.pop();for(;t.lengththis.upperLimit&&(a.maxForce=0,a.minForce=-this.maxForce,this.distance=this.upperLimit,u=!0),this.lowerLimitEnabled&&this.positionf*o&&(g=f*o-u),s[e]+=g,t.addToWlambda(g),g}},{"5da883f1a169a767":"geg3A","806c911d364412af":"cslpB","860c6aa487698116":"7sQcP","407b0a2d87bc3b6e":"6o1RQ"}],cslpB:[function(e,t,i){e("ead7d6ca55bdfe1c");var n=e("d16ea32444765393");function r(e,t){e=e||{},n.call(this),this.type=t,this.equations=[],this.equationSortFunction=e.equationSortFunction||!1}t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.solve=function(e,t){throw Error("Solver.solve should be implemented by subclasses!")};var s={bodies:[]};r.prototype.solveIsland=function(e,t){this.removeAllEquations(),t.equations.length&&(this.addEquations(t.equations),s.bodies.length=0,t.getBodies(s.bodies),s.bodies.length&&this.solve(e,s))},r.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},r.prototype.addEquation=function(e){e.enabled&&this.equations.push(e)},r.prototype.addEquations=function(e){for(var t=0,i=e.length;t!==i;t++){var n=e[t];n.enabled&&this.equations.push(n)}},r.prototype.removeEquation=function(e){var t=this.equations.indexOf(e);-1!==t&&this.equations.splice(t,1)},r.prototype.removeAllEquations=function(){this.equations.length=0},r.GS=1,r.ISLAND=2},{ead7d6ca55bdfe1c:"7sQcP",d16ea32444765393:"3wc90"}],g5PHm:[function(e,t,i){var n=e("8b74883bebf2335f"),r=e("2a849db0ba73e95d");function s(e){if(Array.isArray(arguments[0])){if(e={heights:arguments[0]},"object"==typeof arguments[1])for(var t in arguments[1])e[t]=arguments[1][t];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}e=e||{},this.heights=e.heights?e.heights.slice(0):[],this.maxValue=e.maxValue||null,this.minValue=e.minValue||null,this.elementWidth=e.elementWidth||.1,(void 0===e.maxValue||void 0===e.minValue)&&this.updateMaxMinValues(),e.type=n.HEIGHTFIELD,n.call(this,e)}e("2dc7f9a400756551"),t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.updateMaxMinValues=function(){for(var e=this.heights,t=e[0],i=e[0],n=0;n!==e.length;n++){var r=e[n];r>t&&(t=r),rf){var p=d;d=f,f=p}for(var g=0;g=0&&(r.sub(o,c,h),r.rotate(o,o,n+Math.PI/2),r.normalize(o,o),t.reportIntersection(e,m,o,-1),e.shouldStop(t)))return}}},{"8b74883bebf2335f":"fyiLV","2a849db0ba73e95d":"geg3A","2dc7f9a400756551":"7sQcP"}],"3e8Uk":[function(e,t,i){var n=e("e0cff235fc0213eb"),r=e("f3353cee691d66a4");function s(e){"number"==typeof arguments[0]&&(e={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),e=e||{},this.length=e.length||1,e.type=n.LINE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){return e*Math.pow(this.length,2)/12},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var a=[r.create(),r.create()];s.prototype.computeAABB=function(e,t,i){var n=this.length/2;r.set(a[0],-n,0),r.set(a[1],n,0),e.setFromPoints(a,t,i,0)},r.create();var o=r.create(),h=r.create(),c=r.create(),l=r.fromValues(0,1);s.prototype.raycast=function(e,t,i,n){var s=t.from,a=t.to,u=this.length/2;r.set(h,-u,0),r.set(c,u,0),r.toGlobalFrame(h,h,i,n),r.toGlobalFrame(c,c,i,n);var d=r.getLineSegmentsIntersectionFraction(h,c,s,a);d>=0&&(r.rotate(o,l,n),t.reportIntersection(e,d,o,-1))}},{e0cff235fc0213eb:"fyiLV",f3353cee691d66a4:"geg3A"}],"3C7H6":[function(e,t,i){var n=e("97b5dc61d97fd4de"),r=e("48200108ddae2806"),s=e("6dd72d87868993d0");function a(e,t,i){i=i||{},n.call(this,e,t,n.LOCK,i);var a=void 0===i.maxForce?Number.MAX_VALUE:i.maxForce;i.localAngleB;var o=new s(e,t,-a,a),h=new s(e,t,-a,a),c=new s(e,t,-a,a),l=r.create(),u=r.create(),d=this;o.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[0]},h.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[1]};var f=r.create(),p=r.create();c.computeGq=function(){return r.rotate(f,d.localOffsetB,t.angle-d.localAngleB),r.scale(f,f,-1),r.sub(u,e.position,t.position),r.add(u,u,f),r.rotate(p,f,-Math.PI/2),r.normalize(p,p),r.dot(u,p)},this.localOffsetB=r.create(),i.localOffsetB?r.copy(this.localOffsetB,i.localOffsetB):(r.sub(this.localOffsetB,t.position,e.position),r.rotate(this.localOffsetB,this.localOffsetB,-e.angle)),this.localAngleB=0,"number"==typeof i.localAngleB?this.localAngleB=i.localAngleB:this.localAngleB=t.angle-e.angle,this.equations.push(o,h,c),this.setMaxForce(a)}t.exports=a,a.prototype=new n,a.prototype.constructor=a,a.prototype.setMaxForce=function(e){for(var t=this.equations,i=0;iR&&M0)for(var E=0;EMath.pow(p,2))return 0;if(u)return!0;var g=this.createContactEquation(e,o,t,h);return r(g.normalA,c,i),n.normalize(g.normalA,g.normalA),n.scale(g.contactPointA,g.normalA,d),n.scale(g.contactPointB,g.normalA,-f),s(g.contactPointA,g.contactPointA,i),r(g.contactPointA,g.contactPointA,e.position),s(g.contactPointB,g.contactPointB,c),r(g.contactPointB,g.contactPointB,o.position),this.contactEquations.push(g),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(g)),1},k.prototype[f.PLANE|f.CONVEX]=k.prototype[f.PLANE|f.BOX]=k.prototype.planeConvex=function(e,t,i,o,h,c,l,u,d){var f=0;n.rotate(v,g,o);for(var p=0;p!==c.vertices.length;p++){var b=c.vertices[p];if(n.rotate(m,b,u),s(m,m,l),r(y,m,i),0>=a(y,v)){if(d)return!0;f++;var x=this.createContactEquation(e,h,t,c);r(y,m,i),n.copy(x.normalA,v);var E=a(y,x.normalA);n.scale(y,x.normalA,E),r(x.contactPointB,m,h.position),r(x.contactPointA,m,y),r(x.contactPointA,x.contactPointA,e.position),this.contactEquations.push(x),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&f&&this.frictionEquations.push(this.createFrictionFromAverage(f)),f},k.prototype[f.PARTICLE|f.PLANE]=k.prototype.particlePlane=function(e,t,i,s,o,h,c,l,u){l=l||0,r(m,i,c),n.rotate(v,g,l);var d=a(m,v);if(d>0)return 0;if(u)return!0;var f=this.createContactEquation(o,e,h,t);return n.copy(f.normalA,v),n.scale(m,f.normalA,d),r(f.contactPointA,i,m),r(f.contactPointA,f.contactPointA,o.position),r(f.contactPointB,i,e.position),this.contactEquations.push(f),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(f)),1},k.prototype[f.CIRCLE|f.PARTICLE]=k.prototype.circleParticle=function(e,t,i,a,o,h,c,l,u){if(r(m,c,i),n.squaredLength(m)>Math.pow(t.radius,2))return 0;if(u)return!0;var d=this.createContactEquation(e,o,t,h);return n.copy(d.normalA,m),n.normalize(d.normalA,d.normalA),n.scale(d.contactPointA,d.normalA,t.radius),s(d.contactPointA,d.contactPointA,i),r(d.contactPointA,d.contactPointA,e.position),r(d.contactPointB,c,o.position),this.contactEquations.push(d),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(d)),1};var q=new u({radius:1}),J=n.create(),$=n.create();n.create(),k.prototype[f.PLANE|f.CAPSULE]=k.prototype.planeCapsule=function(e,t,i,r,a,o,h,c,l){n.set(J,-o.length/2,0),n.rotate(J,J,c),s(J,J,h),n.set($,o.length/2,0),n.rotate($,$,c),s($,$,h),q.radius=o.radius,this.enableFrictionReduction&&(u=this.enableFriction,this.enableFriction=!1);var u,d=this.circlePlane(a,q,J,0,e,t,i,r,l),f=this.circlePlane(a,q,$,0,e,t,i,r,l);if(this.enableFrictionReduction&&(this.enableFriction=u),l)return d||f;var p=d+f;return this.enableFrictionReduction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p},k.prototype[f.CIRCLE|f.PLANE]=k.prototype.circlePlane=function(e,t,i,o,h,c,l,u,d){var f=u;f=f||0,r(m,i,l),n.rotate(v,g,f);var p=a(v,m);if(p>t.radius)return 0;if(d)return!0;var b=this.createContactEquation(h,e,c,t);return n.copy(b.normalA,v),n.scale(b.contactPointB,b.normalA,-t.radius),s(b.contactPointB,b.contactPointB,i),r(b.contactPointB,b.contactPointB,e.position),n.scale(y,b.normalA,p),r(b.contactPointA,m,y),s(b.contactPointA,b.contactPointA,l),r(b.contactPointA,b.contactPointA,h.position),this.contactEquations.push(b),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(b)),1},k.prototype[f.CONVEX]=k.prototype[f.CONVEX|f.BOX]=k.prototype[f.BOX]=k.prototype.convexConvex=function(e,t,i,o,h,c,l,u,d,f){var p=0,f="number"==typeof f?f:0;if(!k.findSeparatingAxis(t,i,o,c,l,u,m))return 0;r(T,l,i),a(m,T)>0&&n.scale(m,m,-1);var g=k.getClosestEdge(t,o,m,!0),E=k.getClosestEdge(c,u,m);if(-1===g||-1===E)return 0;for(var A=0;A<2;A++){var C,_=g,I=E,O=t,P=c,M=i,R=l,L=o,D=u,N=e,F=h;0===A&&(C=_,_=I,I=C,C=O,O=P,P=C,C=M,M=R,R=C,C=L,L=D,D=C,C=N,N=F,F=C);for(var B=I;B=3){if(d)return!0;var H=this.createContactEquation(N,F,O,P);p++;var j=O.vertices[_%O.vertices.length],W=O.vertices[(_+1)%O.vertices.length];n.rotate(y,j,L),n.rotate(b,W,L),s(y,y,M),s(b,b,M),r(x,b,y),n.rotate90cw(H.normalA,x),n.normalize(H.normalA,H.normalA),r(T,v,y);var Y=a(H.normalA,T);n.scale(w,H.normalA,Y),r(H.contactPointA,v,M),r(H.contactPointA,H.contactPointA,w),s(H.contactPointA,H.contactPointA,M),r(H.contactPointA,H.contactPointA,N.position),r(H.contactPointB,v,R),s(H.contactPointB,H.contactPointB,R),r(H.contactPointB,H.contactPointB,F.position),this.contactEquations.push(H),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(H))}}}return this.enableFrictionReduction&&this.enableFriction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p};var Q=n.fromValues(0,0);k.projectConvexOntoAxis=function(e,t,i,r,s){var o,h=null,c=null;n.rotate(Q,r,-i);for(var l=0;lh)&&(h=o),(null===c||oh){var u=c;c=h,h=u}var d=a(t,r);n.set(s,c+d,h+d)};var Z=n.fromValues(0,0),ee=n.fromValues(0,0),et=n.fromValues(0,0),ei=n.fromValues(0,0),en=n.fromValues(0,0),er=n.fromValues(0,0);k.findSeparatingAxis=function(e,t,i,s,a,o,h){var c=null,l=!1,u=!1;if(e instanceof p&&s instanceof p)for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;2!==m;m++){0===m?n.set(ei,0,1):1===m&&n.set(ei,1,0),0!==g&&n.rotate(ei,ei,g),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}else for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;m!==f.vertices.length;m++){n.rotate(ee,f.vertices[m],g),n.rotate(et,f.vertices[(m+1)%f.vertices.length],g),r(Z,et,ee),n.rotate90cw(ei,Z),n.normalize(ei,ei),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}return u};var es=n.fromValues(0,0),ea=n.fromValues(0,0),eo=n.fromValues(0,0);k.getClosestEdge=function(e,t,i,s){n.rotate(es,i,-t),s&&n.scale(es,es,-1);for(var o=-1,h=e.vertices.length,c=-1,l=0;l!==h;l++){r(ea,e.vertices[(l+1)%h],e.vertices[l%h]),n.rotate90cw(eo,ea),n.normalize(eo,eo);var u=a(eo,es);(-1===o||u>c)&&(o=l%h,c=u)}return o};var eh=n.create(),ec=n.create(),el=n.create(),eu=n.create(),ed=n.create(),ef=n.create(),ep=n.create();k.prototype[f.CIRCLE|f.HEIGHTFIELD]=k.prototype.circleHeightfield=function(e,t,i,a,o,h,c,l,u,d){var f=h.heights,d=d||t.radius,p=h.elementWidth,g=Math.floor((i[0]-d-c[0])/p),m=Math.ceil((i[0]+d-c[0])/p);g<0&&(g=0),m>=f.length&&(m=f.length-1);for(var v=f[g],y=f[m],b=g;bv&&(v=f[b]);if(i[1]-d>v)return!u&&0;for(var x=!1,b=g;b=el[0]&&eh[0]0){for(var b=g;b<=m;b++)if(n.set(el,b*p,f[b]),n.add(el,el,c),n.sub(ec,i,el),n.squaredLength(ec)=l.length&&(f=l.length-1);for(var p=l[d],g=l[f],m=d;mp&&(p=l[m]);if(e.aabb.lowerBound[1]>p)return!c&&0;for(var v=0,m=d;m(0|t)?e<<16|65535&t:t<<16|65535&e)|0},r.prototype.getByKey=function(e){return e|=0,this.data[e]},r.prototype.get=function(e,t){return this.data[this.getKey(e,t)]},r.prototype.set=function(e,t,i){if(!i)throw Error("No data!");var n=this.getKey(e,t);return this.data[n]||this.keys.push(n),this.data[n]=i,n},r.prototype.reset=function(){for(var e=this.data,t=this.keys,i=t.length;i--;)delete e[t[i]];t.length=0},r.prototype.copy=function(e){this.reset(),n.appendArray(this.keys,e.keys);for(var t=e.keys.length;t--;){var i=e.keys[t];this.data[i]=e.data[i]}}},{"8f6c901d02437d27":"7sQcP"}],"1uf32":[function(e,t,i){var n=e("57927c61fbcf992f"),r=e("1e621ded3903d68e"),s=e("a8501ada722b06e1");function a(e){"number"==typeof arguments[0]&&"number"==typeof arguments[1]&&(e={width:arguments[0],height:arguments[1]},console.warn("The Rectangle has been renamed to Box and its constructor signature has changed. Please use the following format: new Box({ width: 1, height: 1, ... })")),e=e||{};var t=this.width=e.width||1,i=this.height=e.height||1,a=[n.fromValues(-t/2,-i/2),n.fromValues(t/2,-i/2),n.fromValues(t/2,i/2),n.fromValues(-t/2,i/2)],o=[n.fromValues(1,0),n.fromValues(0,1)];e.vertices=a,e.axes=o,e.type=r.BOX,s.call(this,e)}t.exports=a,a.prototype=new s,a.prototype.constructor=a,a.prototype.computeMomentOfInertia=function(e){var t=this.width,i=this.height;return e*(i*i+t*t)/12},a.prototype.updateBoundingRadius=function(){var e=this.width,t=this.height;this.boundingRadius=Math.sqrt(e*e+t*t)/2},n.create(),n.create(),n.create(),n.create(),a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)},a.prototype.updateArea=function(){this.area=this.width*this.height}},{"57927c61fbcf992f":"geg3A","1e621ded3903d68e":"fyiLV",a8501ada722b06e1:"jXoGk"}],liK4P:[function(e,t,i){e("852348000d7d6d69"),e("b1906358d63dd535"),e("2589eb1c960dc6a0"),e("41d1d194c5bc6ec2");var n=e("c59906df004f11c2");function r(){n.call(this,n.NAIVE)}e("3a4bfb1510f2f292"),t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.getCollisionPairs=function(e){var t=e.bodies,i=this.result;i.length=0;for(var r=0,s=t.length;r!==s;r++)for(var a=t[r],o=0;o0)&&!(r.squaredDistance(s,c)d)p.angle=d,-1===r.indexOf(p)&&r.push(p);else{var v=r.indexOf(p);-1!==v&&r.splice(v,1)}if(this.lowerLimitEnabled&&mi)a.scale(r.normalA,c,-1),a.sub(r.contactPointA,l,o.position),a.sub(r.contactPointB,u,h.position),a.scale(p,c,i),a.add(r.contactPointA,r.contactPointA,p),-1===e.indexOf(r)&&e.push(r);else{var x=e.indexOf(r);-1!==x&&e.splice(x,1)}if(this.lowerLimitEnabled&&y=0&&!(e[s].aabb.lowerBound[t]<=r.aabb.lowerBound[t]);s--)e[s+1]=e[s];e[s+1]=r}return e},s.prototype.sortList=function(){var e=this.axisList,t=this.axisIndex;s.sortAxisList(e,t)},s.prototype.getCollisionPairs=function(e){var t=this.axisList,i=this.result,n=this.axisIndex;i.length=0;for(var s=t.length;s--;){var a=t[s];a.aabbNeedsUpdate&&a.updateAABB()}this.sortList();for(var o=0,h=0|t.length;o!==h;o++)for(var c=t[o],l=o+1;l=e&&n=0;g-=2)for(var T=b.length-2;T>=0;T-=2)(w[g]===b[T]&&w[g+1]===b[T+1]||w[g+1]===b[T]&&w[g]===b[T+1])&&b.splice(T,2);var A=l.length;for(g=0;g!==A;g++){var C=l[g];if(!C.collideConnected)for(var T=b.length-2;T>=0;T-=2)(C.bodyA===b[T]&&C.bodyB===b[T+1]||C.bodyB===b[T]&&C.bodyA===b[T+1])&&b.splice(T,2)}this.postBroadphaseEvent.pairs=b,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,c.reset(this);for(var g=0,_=b.length;g!==_;g+=2)for(var I=b[g],O=b[g+1],P=0,M=I.shapes.length;P!==M;P++)for(var R=I.shapes[P],L=R.position,D=R.angle,k=0,N=O.shapes.length;k!==N;k++){var F=O.shapes[k],B=F.position,U=F.angle,V=this.defaultContactMaterial;if(R.material&&F.material){var G=this.getContactMaterial(R.material,F.material);G&&(V=G)}this.runNarrowphase(c,I,R,L,D,O,F,B,U,V,this.frictionGravity)}for(var g=0;g!==o;g++){var j=n[g];j._wakeUpAfterNarrowphase&&(j.wakeUp(),j._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(S);for(var W=this.endContactEvent,k=S.length;k--;){var Y=S[k];W.shapeA=Y.shapeA,W.shapeB=Y.shapeB,W.bodyA=Y.bodyA,W.bodyB=Y.bodyB,this.emit(W)}S.length=0}var H=this.preSolveEvent;H.contactEquations=c.contactEquations,H.frictionEquations=c.frictionEquations,this.emit(H),H.contactEquations=H.frictionEquations=null;var A=l.length;for(g=0;g!==A;g++)l[g].update();if(c.contactEquations.length||c.frictionEquations.length||A){if(this.islandSplit){for(f.equations.length=0,v.appendArray(f.equations,c.contactEquations),v.appendArray(f.equations,c.frictionEquations),g=0;g!==A;g++)v.appendArray(f.equations,l[g].equations);f.split(this);for(var g=0;g!==f.islands.length;g++){var z=f.islands[g];z.equations.length&&a.solveIsland(e,z)}}else{for(a.addEquations(c.contactEquations),a.addEquations(c.frictionEquations),g=0;g!==A;g++)a.addEquations(l[g].equations);this.solveConstraints&&a.solve(e,this),a.removeAllEquations()}}for(var g=0;g!==o;g++){var j=n[g];j.integrate(e)}for(var g=0;g!==o;g++)n[g].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,g=0;g!==c.contactEquations.length;g++){var K=c.contactEquations[g];K.firstImpact&&(X.bodyA=K.bodyA,X.bodyB=K.bodyB,X.shapeA=K.shapeA,X.shapeB=K.shapeB,X.contactEquation=K,this.emit(X))}if(this.sleepMode===x.BODY_SLEEPING)for(g=0;g!==o;g++)n[g].sleepTick(this.time,!1,e);else if(this.sleepMode===x.ISLAND_SLEEPING&&this.islandSplit){for(g=0;g!==o;g++)n[g].sleepTick(this.time,!0,e);for(var g=0;g0,e.frictionCoefficient=l.friction,f=t.type===u.STATIC||t.type===u.KINEMATIC?a.mass:a.type===u.STATIC||a.type===u.KINEMATIC?t.mass:t.mass*a.mass/(t.mass+a.mass),e.slipForce=l.friction*d*f,e.restitution=l.restitution,e.surfaceVelocity=l.surfaceVelocity,e.frictionStiffness=l.frictionStiffness,e.frictionRelaxation=l.frictionRelaxation,e.stiffness=l.stiffness,e.relaxation=l.relaxation,e.contactSkinSize=l.contactSkinSize,e.enabledEquations=t.collisionResponse&&a.collisionResponse&&i.collisionResponse&&o.collisionResponse;var m=e[i.type|o.type],v=0;if(m){var y=i.sensor||o.sensor,b=e.frictionEquations.length;v=i.type=2*Math.pow(a.sleepSpeedLimit,2)&&(t._wakeUpAfterNarrowphase=!0),a.allowSleep&&a.type===u.DYNAMIC&&a.sleepState===u.SLEEPING&&t.sleepState===u.AWAKE&&t.type!==u.STATIC&&r.squaredLength(t.velocity)+Math.pow(t.angularVelocity,2)>=2*Math.pow(t.sleepSpeedLimit,2)&&(a._wakeUpAfterNarrowphase=!0),this.overlapKeeper.setOverlapping(t,i,a,o),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(i,o)){var E=this.beginContactEvent;if(E.shapeA=i,E.shapeB=o,E.bodyA=t,E.bodyB=a,E.contactEquations.length=0,"number"==typeof v)for(var S=e.contactEquations.length-v;S1)for(var S=e.frictionEquations.length-x;S=0;t--)this.removeConstraint(e[t]);for(var i=this.bodies,t=i.length-1;t>=0;t--)this.removeBody(i[t]);for(var n=this.springs,t=n.length-1;t>=0;t--)this.removeSpring(n[t]);for(var r=this.contactMaterials,t=r.length-1;t>=0;t--)this.removeContactMaterial(r[t]);x.apply(this)};var A=r.create(),C=(r.fromValues(0,0),r.fromValues(0,0));x.prototype.hitTest=function(e,t,i){i=i||0;var n=new u({position:e}),l=new c;n.addShape(l);for(var d=this.narrowphase,f=[],p=0,g=t.length;p!==g;p++)for(var m=t[p],v=0,y=m.shapes.length;v!==y;v++){var b=m.shapes[v];r.rotate(A,b.position,m.angle),r.add(A,A,m.position);var x=b.angle+m.angle;(b instanceof s&&d.circleParticle(m,b,A,x,n,l,e,0,!0)||b instanceof a&&d.particleConvex(n,l,e,0,m,b,A,x,!0)||b instanceof o&&d.particlePlane(n,l,e,0,m,b,A,x,!0)||b instanceof h&&d.particleCapsule(n,l,e,0,m,b,A,x,!0)||b instanceof c&&r.squaredLength(r.sub(C,A,e)) (http://steffe.se)","keywords":["p2.js","p2","physics","engine","2d"],"main":"./src/p2.js","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/schteppe/p2.js.git"},"bugs":{"url":"https://github.com/schteppe/p2.js/issues"},"licenses":[{"type":"MIT"}],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},"dependencies":{"poly-decomp":"0.1.1"}}')},{}],kYZwj:[function(e,t,i){var n=e("d1c511ff43075908");e("6ad6aae9d3178c1c");var r=e("ae69163b5e95d902");function s(){this.overlappingShapesLastState=new n,this.overlappingShapesCurrentState=new n,this.recordPool=new r({size:16}),this.tmpDict=new n,this.tmpArray1=[]}e("ca81eee98f7bd467"),t.exports=s,s.prototype.tick=function(){for(var e=this.overlappingShapesLastState,t=this.overlappingShapesCurrentState,i=e.keys.length;i--;){var n=e.keys[i],r=e.getByKey(n);t.getByKey(n),r&&this.recordPool.release(r)}e.reset(),e.copy(t),t.reset()},s.prototype.setOverlapping=function(e,t,i,n){this.overlappingShapesLastState;var r=this.overlappingShapesCurrentState;if(!r.get(t.id,n.id)){var s=this.recordPool.get();s.set(e,t,i,n),r.set(t.id,n.id,s)}},s.prototype.getNewOverlaps=function(e){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,e)},s.prototype.getEndOverlaps=function(e){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,e)},s.prototype.bodiesAreOverlapping=function(e,t){for(var i=this.overlappingShapesCurrentState,n=i.keys.length;n--;){var r=i.keys[n],s=i.data[r];if(s.bodyA===e&&s.bodyB===t||s.bodyA===t&&s.bodyB===e)return!0}return!1},s.prototype.getDiff=function(e,t,i){var i=i||[];i.length=0;for(var n=t.keys.length;n--;){var r=t.keys[n],s=t.data[r];if(!s)throw Error("Key "+r+" had no data!");e.data[r]||i.push(s)}return i},s.prototype.isNewOverlap=function(e,t){var i=0|e.id,n=0|t.id,r=this.overlappingShapesLastState,s=this.overlappingShapesCurrentState;return!r.get(i,n)&&!!s.get(i,n)},s.prototype.getNewBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getEndBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getBodyDiff=function(e,t){t=t||[];for(var i=this.tmpDict,n=e.length;n--;){var r=e[n];i.set(0|r.bodyA.id,0|r.bodyB.id,r)}for(n=i.keys.length;n--;){var r=i.getByKey(i.keys[n]);r&&t.push(r.bodyA,r.bodyB)}return i.reset(),t}},{d1c511ff43075908:"gyzPH","6ad6aae9d3178c1c":"cwAfS",ae69163b5e95d902:"fO0xd",ca81eee98f7bd467:"7sQcP"}],cwAfS:[function(e,t,i){function n(e,t,i,n){this.shapeA=t,this.shapeB=n,this.bodyA=e,this.bodyB=i}t.exports=n,n.prototype.set=function(e,t,i,r){n.call(this,e,t,i,r)}},{}],fO0xd:[function(e,t,i){var n=e("ef39e4c8e830c20e"),r=e("6e41b1482492ad2f");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=e.shapeA=e.shapeB=null,this}},{ef39e4c8e830c20e:"cwAfS","6e41b1482492ad2f":"5lrfq"}],bVaR4:[function(e,t,i){e("f7108e810eaecffd"),e("50bfc1b1a312ac2f"),e("2f6d951f62024392");var n=e("9526c01719846e44"),r=e("82ea80983f48bd5f"),s=e("29efc1b1b871dc45");function a(e){this.nodePool=new n({size:16}),this.islandPool=new r({size:8}),this.equations=[],this.islands=[],this.nodes=[],this.queue=[]}t.exports=a,a.getUnvisitedNode=function(e){for(var t=e.length,i=0;i!==t;i++){var n=e[i];if(!n.visited&&n.body.type===s.DYNAMIC)return n}return!1},a.prototype.visit=function(e,t,i){t.push(e.body);for(var n=e.equations.length,r=0;r!==n;r++){var s=e.equations[r];-1===i.indexOf(s)&&i.push(s)}},a.prototype.bfs=function(e,t,i){var n=this.queue;for(n.length=0,n.push(e),e.visited=!0,this.visit(e,t,i);n.length;)for(var r,o=n.pop();r=a.getUnvisitedNode(o.neighbors);)r.visited=!0,this.visit(r,t,i),r.body.type===s.DYNAMIC&&n.push(r)},a.prototype.split=function(e){for(var t,i=e.bodies,n=this.nodes,r=this.equations;n.length;)this.nodePool.release(n.pop());for(var s=0;s!==i.length;s++){var o=this.nodePool.get();o.body=i[s],n.push(o)}for(var h=0;h!==r.length;h++){var c=r[h],s=i.indexOf(c.bodyA),l=i.indexOf(c.bodyB),u=n[s],d=n[l];u.neighbors.push(d),d.neighbors.push(u),u.equations.push(c),d.equations.push(c)}for(var f=this.islands,s=0;s{this.worldDateTime=new Date},1e3)}enablePathFinder(){this.usePathFinder&&(this.pathFinder=new h,this.pathFinder.world=this,this.pathFinder.createGridFromMap())}validateRequiredProperties(e){this.events||f.error("EventsManager undefined in P2world."),this.roomId&&this.sceneName&&this.sceneTiledMapFile||(p.critical("World creation missing data in options.",{roomId:this.roomId,sceneName:this.sceneName,sceneTiledMapFile:this.sceneTiledMapFile}),f.error("World creation missing data in options.")),this.config||f.error("Missing Config Manager.")}async createWorldContent(e){if(!this.validateMapData(this.mapJson)){p.error("Missing map data.",this.mapJson);return}this.shouldGroupBodies()||p.warning("Group bodies fully disabled, this can impact performance."),this.changePoints=this.getSceneChangePoints(e);let t=this.mapJson.layers,i=[];for(let e of t){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayerBefore",t),i.push(...await this.createLayerContents(t.layer)),await this.events.emit("reldens.parsingMapLayerAfter",t)}for(let e of i){let{layer:t,tileIndex:i,tileW:n,tileH:r,posX:s,posY:a}=e;await this.createRoomObjectBody(t,i,n,r,s,a)}for(let e of(this.processBodiesQueue(),t)){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayersAfterBodiesQueue",t)}p.info("Total wall bodies found: "+this.totalBodiesCount,"Total wall bodies created: "+this.totalBodiesCreated)}processBodiesQueue(){for(let e of(this.queueBodies.sort((e,t)=>e.tileIndexes[0]-t.tileIndexes[0]),this.queueBodies))this.addBody(e);this.queueBodies=[]}async createLayerContents(e){let t=this.mapJson.tilewidth,i=this.mapJson.tileheight,n=t/2,r=i/2,s=-1!==e.name.indexOf("change-points"),a=-1!==e.name.indexOf("collisions"),o=[];for(let h=0;he.y?s:-s),h=e.x+(t.x>e.x?a:-a),c=Math.atan2(t.y-o,t.x-h),l=180*c/Math.PI,u=i.key?i.key:"",f=i.magnitude*Math.cos(c),g=i.magnitude*Math.sin(c),m=this.calculateDirection(i,e,t);p.debug('Shooting bullet "'+u+'":',{objectWidth:n,objectHeight:r,bulletY:o,bulletX:h,fromPosition:e,toPosition:t,bulletAngle:l,speedX:f,speedY:g});let v="BULLET_"+this.determineFromType(i),y=this.createCollisionBody(n,r,h,o,this.bulletsBodyType,d.COLLISIONS[v],1,!0,!0,u,m);y.updateMassProperties(),y.roomObject=i,y.hitPriority=i.hitPriority?i.hitPriority:2,y.isRoomObject=!0,y.isBullet=!0,y.key=""===u?"bullet-"+y.id:u,this.addBody(y);let b=u+"_bullet_"+y.id;return y.bodyStateId=b,i.room.state.addBodyToState(y.bodyState,b),y.angle=l,y.originalSpeed={x:f,y:g},y.velocity[0]=f,y.velocity[1]=g,y}determineFromType(e){return this.typeDeterminer.isPlayer(e.owner)?d.FROM_TYPES.PLAYER:this.typeDeterminer.isObject(e.owner)?d.FROM_TYPES.OBJECT:d.FROM_TYPES.OTHER}calculateDirection(e,t,i){return 3===g.get(e,"animDir",!1)?t.x=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t=this.length)){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)}},t.prototype.setAt=function(t,i){if(null==i){console.error("ArraySchema items cannot be null nor undefined; Use `deleteAt(index)` instead.");return}if(this.$items.get(t)!==i){void 0!==i.$changes&&i.$changes.setParent(this,this.$changes.root,t);var n,r,s=null!==(r=null===(n=this.$changes.indexes[t])||void 0===n?void 0:n.op)&&void 0!==r?r:e.OPERATION.ADD;this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,i),this.$changes.change(t,s)}},t.prototype.deleteAt=function(e){var t=Array.from(this.$items.keys())[e];return void 0!==t&&this.$deleteAt(t)},t.prototype.$deleteAt=function(e){return this.$changes.delete(e),this.$indexes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.concat=function(){for(var e,i=[],n=0;n>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,boolean:function(e,t){return S(e,t?1:0)},float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},int16:A,int32:_,int64:O,int8:T,number:F,string:N,uint16:C,uint32:I,uint64:P,uint8:S,utf8Write:w,writeFloat32:D,writeFloat64:k});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),K=new Float32Array(X.buffer),q=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),K[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),q[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,arrayCheck:function(e,t){return e[t.offset]<160},boolean:function(e,t){return V(e,t)>0},float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int16:G,int32:W,int64:H,int8:U,number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},readFloat32:J,readFloat64:$,string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},switchStructureCheck:ee,uint16:j,uint32:Y,uint64:z,uint8:V}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){var t=this.refCounts[e];if(void 0===t){console.warn("trying to remove reference ".concat(e," that doesn't exist"));return}if(0===t){console.warn("trying to remove reference ".concat(e," with 0 refCount"));return}this.refCounts[e]=t-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:l;if(p===e.OPERATION.CLEAR){r.clear(s);continue}var y=f?l%(p||255):Z(i,n),b=f?r._definition.fieldsByIndex[y]:"",x=d.getType(y),E=void 0,w=void 0,T=void 0;if(f?w=r["_".concat(b)]:(w=r.getByIndex(y),(p&e.OPERATION.ADD)===e.OPERATION.ADD?(T=r instanceof m?Q(i,n):y,r.setIndex(y,T)):T=r.getIndex(y)),(p&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(p!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(y),w&&w.$changes&&a.removeRef(w.$changes.refId),E=null),void 0===b){console.warn("@colyseus/schema: definition mismatch");for(var S={offset:n.offset};n.offsets?t[0]+n[0]:s,h=t[1]+n[1]>a?t[1]+n[1]:a,c=t[0]-n[0]<0?t[0]-n[0]:0,l=t[1]-n[1]<0?t[1]-n[1]:0,u=this.grid.getNodeAt(o,t[1]);u&&!u.walkable&&(u=this.grid.getNodeAt(t[0],h))&&!u.walkable&&(u=this.grid.getNodeAt(o,h))&&!u.walkable&&(u=this.grid.getNodeAt(c,t[1]))&&!u.walkable&&(u=this.grid.getNodeAt(t[0],l))&&!u.walkable&&(u=this.grid.getNodeAt(c,l))&&!u.walkable&&(u=this.grid.getNodeAt(c,h))&&!u.walkable&&(u=this.grid.getNodeAt(o,l)),u&&u.walkable&&(i=this.grid.clone(),r=this.finder.findPath(e[0],e[1],u.x,u.y,i))}return r}}},{d026eb33ec4f8a6d:"3lwy5","8e5cc24e68f2d485":"jSlJ0"}],jSlJ0:[function(e,t,i){t.exports=e("c08c5d893d481d77")},{c08c5d893d481d77:"110ct"}],"110ct":[function(e,t,i){t.exports={Heap:e("a11c2d2f6228b64d"),Node:e("5d6357416bae419"),Grid:e("eb2500554bbf40a2"),Util:e("b8fdf53e7c2bda86"),DiagonalMovement:e("ea6942fe46b7874a"),Heuristic:e("cc79ac15c71b85de"),AStarFinder:e("92550c19cc8290da"),BestFirstFinder:e("8fe7b6287e43173"),BreadthFirstFinder:e("49f4cbf7cb03de5a"),DijkstraFinder:e("f055f2df42298a76"),BiAStarFinder:e("ae88c656fdc0b402"),BiBestFirstFinder:e("6dfdccafa1ea046a"),BiBreadthFirstFinder:e("4f4a8a58aa00c271"),BiDijkstraFinder:e("f9f2731f8e4ac9f4"),IDAStarFinder:e("548d4f7f580680d4"),JumpPointFinder:e("c94d58273ef6271a")}},{a11c2d2f6228b64d:"j1Rgs","5d6357416bae419":"eTBTH",eb2500554bbf40a2:"4U8Sg",b8fdf53e7c2bda86:"eXbk6",ea6942fe46b7874a:"44ekP",cc79ac15c71b85de:"7ivQz","92550c19cc8290da":"b9jsj","8fe7b6287e43173":"j0U38","49f4cbf7cb03de5a":"c3dtf",f055f2df42298a76:"aTw5v",ae88c656fdc0b402:"gqRU9","6dfdccafa1ea046a":"OQep8","4f4a8a58aa00c271":"5kxE6",f9f2731f8e4ac9f4:"b2sHM","548d4f7f580680d4":"9146d",c94d58273ef6271a:"8thbF"}],j1Rgs:[function(e,t,i){t.exports=e("30b1093da33c692b")},{"30b1093da33c692b":"jKwEm"}],jKwEm:[function(e,t,i){(function(){var e,i,n,r,s,a,o,h,c,l,u,d,f,p,g;n=Math.floor,l=Math.min,i=function(e,t){return et?1:0},c=function(e,t,r,s,a){var o;if(null==r&&(r=0),null==a&&(a=i),r<0)throw Error("lo must be non-negative");for(null==s&&(s=e.length);ra(t,e[o=n((r+s)/2)])?s=o:r=o+1;return[].splice.apply(e,[r,r-r].concat(t)),t},a=function(e,t,n){return null==n&&(n=i),e.push(t),p(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,g(e,0,t)):r=n,r},h=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,g(e,0,n),r},o=function(e,t,n){var r;return null==n&&(n=i),e.length&&0>n(e[0],t)&&(t=(r=[e[0],t])[0],e[0]=r[1],g(e,0,n)),t},r=function(e,t){var r,s,a,o,h,c;for(null==t&&(t=i),o=(function(){c=[];for(var t=0,i=n(e.length/2);0<=i?ti;0<=i?t++:t--)c.push(t);return c}).apply(this).reverse(),h=[],s=0,a=o.length;sn(a=p[u],o)&&(c(h,a,0,null,n),h.pop(),o=h[h.length-1]);return h}for(r(e,n),m=[],d=0,g=l(t,e.length);0<=g?dg;0<=g?++d:--d)m.push(s(e,n));return m},p=function(e,t,n,r){var s,a,o;for(null==r&&(r=i),s=e[n];n>t;){if(0>r(s,a=e[o=n-1>>1])){e[n]=a,n=o;continue}break}return e[n]=s},g=function(e,t,n){var r,s,a,o,h;for(null==n&&(n=i),s=e.length,h=t,a=e[t],r=2*t+1;rn(e[r],e[o]))&&(r=o),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,p(e,h,t,n)},e=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=a,e.pop=s,e.replace=h,e.pushpop=o,e.heapify=r,e.updateItem=f,e.nlargest=u,e.nsmallest=d,e.prototype.push=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return -1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return h(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return o(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return r(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return f(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(null!==t?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)},{}],eTBTH:[function(e,t,i){t.exports=function(e,t,i){this.x=e,this.y=t,this.walkable=void 0===i||i}},{}],"4U8Sg":[function(e,t,i){var n=e("3debe8dfc5f4b19"),r=e("1630f01fef4aa0f7");function s(e,t,i){var n;"object"!=typeof e?n=e:(t=e.length,n=e[0].length,i=e),this.width=n,this.height=t,this.nodes=this._buildNodes(n,t,i)}s.prototype._buildNodes=function(e,t,i){var r,s,a=Array(t);for(r=0;r=0&&e=0&&t-o&&(h-=o,e+=r),c0&&new Date().getTime()-l>1e3*this.timeLimit)return 1/0;var o,h,f,g,m,v=t+u(e,p)*this.weight;if(v>i)return v;if(e==p)return n[a]=[e.x,e.y],e;var y=s.getNeighbors(e,this.diagonalMovement);for(g=0,h=1/0;m=y[g];++g){if(this.trackRecursion&&(m.retainCount=m.retainCount+1||1,!0!==m.tested&&(m.tested=!0)),(f=d(m,t+(o=m,e.x===o.x||e.y===o.y?1:Math.SQRT2),i,n,a+1))instanceof r)return n[a]=[e.x,e.y],f;this.trackRecursion&&0==--m.retainCount&&(m.tested=!1),fthis.worldWidth?this.worldWidth:e.column,e.row=e.row<0?0:e.row,e.row=e.row>this.worldHeight?this.worldHeight:e.row,e}}},{}],"5zAcU":[function(e,t,i){let{Logger:n,sc:r}=e("9b59b4ef27f548b6");t.exports.WorldTimer=class{constructor(e){this.clockInstance=r.get(e,"clockInstance",!1),this.callbacks=r.get(e,"callbacks",[]),this.worldTimer={},this.paused=!1,this.lastCallTime=0,this.stepTime=0,this.startedTime=new Date().getTime(),this.currentTime=this.startedTime}startWorldSteps(e){if(!e){n.error("World instance invalid.",{world:e});return}if(this.stepTime=1e3*e.timeStep,this.clockInstance){this.worldTimer=this.clockInstance.setInterval(()=>{this.setIntervalCallback(e)},this.stepTime);return}this.worldTimer=setInterval(()=>{this.setIntervalCallback(e)},this.stepTime)}setIntervalCallback(e){this.paused||(this.currentTime+=this.stepTime,this.stepWorld(e),this.executeCallbacks())}stepWorld(e){if(e.useFixedWorldStep){e.step(e.timeStep);return}this.stepWorldWithSubSteps(e)}executeCallbacks(){if(0!==this.callbacks.length)for(let e of this.callbacks)e()}stepWorldWithSubSteps(e){let t=Date.now()/1e3-this.lastCallTime;e.step(e.timeStep,t,e.maxSubSteps)}}},{"9b59b4ef27f548b6":"3lwy5"}],"4xzUf":[function(e,t,i){let{PlayerEnginePrediction:n}=e("35dabd79ba23aa99"),{SceneDynamic:r}=e("caa2ee44a66bdd90");t.exports.RoomEventsOverride=class{createCurrentPlayerOverride(e){e.createCurrentPlayer=async(t,i,n)=>{e.engineStarted=!0,await e.startEngineScene(t,e.room,i);let r=e.getActiveScene();if(!e.isValidScene(r,t))return!1;for(let s of(await e.events.emit("reldens.playersQueueBefore",t,n,i,e),Object.keys(e.playersQueue)))r.player.addPlayer(s,e.playersQueue[s]);r.experimentalClientPrediction&&(r.player.positionFromServer=t);let s={player:t,key:n,previousScene:i,roomEvents:e};return await e.events.emit("reldens.createCurrentPlayer",s),s}}playerOnChangeOverride(e){e.playersOnChange=(t,i,n)=>{if(t.state.scene!==e.roomName)return;let r=e.getActiveScene();if(e.playerExists(r,i)){if(r.experimentalClientPrediction&&e.isCurrentPlayer(i)){r.player.positionFromServer=t;return}r.player.updatePlayer(i,t)}}}createSceneInstanceOverride(e){e.createSceneInstance=(e,t,i)=>{let n=new r(e,t,i);return n.experimentalClientPrediction=i.config.get("client/general/engine/experimentalClientPrediction"),n.worldPrediction=!1,n}}createPlayerEngineInstanceOverride(e){e.createPlayerEngineInstance=(e,t,i,r)=>new n({scene:e,playerData:t,gameManager:i,room:r})}}},{"35dabd79ba23aa99":"8hflc",caa2ee44a66bdd90:"6Vn5m"}],"8hflc":[function(e,t,i){let{PlayerEngine:n}=e("a2861f4cd568519f"),{GameConst:r}=e("78935193245f5a91");t.exports.PlayerEnginePrediction=class extends n{constructor(e){super(e),this.predictionBody=!1,this.positionFromServer=!1;let t=this.gameManager.config.get("client/players/reconciliation/timeOutMs");this.reconciliationTimeOutMs=!1===t?1e3:Number(t)}left(){if("pressed"===this.lastKeyState[r.LEFT])return;let e={dir:r.LEFT};this.lastKeyState[r.LEFT]="pressed",this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.LEFT,!0)),this.roomEvents.send(e)}right(){if("pressed"===this.lastKeyState[r.RIGHT])return;this.lastKeyState[r.RIGHT]="pressed";let e={dir:r.RIGHT};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.RIGHT,!0)),this.roomEvents.send(e)}up(){if("pressed"===this.lastKeyState[r.UP])return;this.lastKeyState[r.UP]="pressed";let e={dir:r.UP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.UP,!0)),this.roomEvents.send(e)}down(){if("pressed"===this.lastKeyState[r.DOWN])return;this.lastKeyState[r.DOWN]="pressed";let e={dir:r.DOWN};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.DOWN,!0)),this.roomEvents.send(e)}stop(){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let e={act:r.STOP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.reconcilePosition()),this.roomEvents.send(e)}reconcilePosition(){this.predictionBody&&this.positionFromServer&&(this.predictionBody.stopFull(),setTimeout(()=>{this.predictionBody.position[0]=this.positionFromServer.state.x,this.predictionBody.position[1]=this.positionFromServer.state.y,this.predictionBody.dir=this.positionFromServer.state.dir,this.updatePlayer(this.playerId,this.positionFromServer)},this.reconciliationByTimeOutMs()))}reconciliationTimeOutCallBack(){return!1}reconciliationByTimeOutMs(){let e=this.reconciliationTimeOutCallBack();return Number(!1!==e?e:this.reconciliationTimeOutMs)}moveToPointer(e){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let t={act:r.POINTER,column:e.worldColumn,row:e.worldRow,x:e.worldX-this.leftOff,y:e.worldY-this.topOff};if(this.predictionBody&&this.pointsValidator){this.reconcilePosition();let e=Object.assign({},t);e=this.pointsValidator.makeValidPoints(e),this.predictionBody.moveToPoint(e)}this.roomEvents.send(t)}}},{a2861f4cd568519f:"3GkIQ","78935193245f5a91":"93TbC"}],"8MUNa":[function(e,t,i){let{PluginInterface:n}=e("ff0cd3a039680b50"),{TargetBoxEnricher:r}=e("bc896f1b30e26c8b"),{TeamMessageListener:s}=e("b9e6a2d82debed5b"),{ClanMessageListener:a}=e("d88cac34aed27f09"),{MessageProcessor:o}=e("187e0a90a62f31a1"),{TemplatesHandler:h}=e("a77183244ab38ca1"),{TeamsConst:c}=e("817bd734dbf4f984"),{Logger:l,sc:u}=e("5bd001817d1a1fe2");t.exports.TeamsPlugin=class extends n{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in TeamsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in TeamsPlugin."),this.teamMessageListener=new s,this.clanMessageListener=new a,this.listenEvents(),this.listenMessages()}listenMessages(){this.gameManager&&this.events&&(this.gameManager.config.client.message.listeners[c.KEY]=this.teamMessageListener,this.gameManager.config.client.message.listeners[c.CLAN_KEY]=this.clanMessageListener)}listenEvents(){this.events&&(this.events.on("reldens.createEngineSceneDone",e=>{let t=e.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Team messages queue on TeamsPlugin.",e),!1;o.processClanMessagesQueue(t,this.clanMessageListener),o.processTeamMessagesQueue(t,this.teamMessageListener)}),this.events.on("reldens.preloadUiScene",e=>{h.preloadTemplates(e)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{r.appendClanInviteButton(this.gameManager,t,i,n),r.appendTeamInviteButton(this.gameManager,t,i,n)}))}fetchTeamPlayerBySessionId(e){let t=this.gameManager.gameEngine.uiScene.currentTeam;if(!t)return!1;for(let i of Object.keys(t)){let n=t[i];if(n.sessionId===e)return n}return!1}}},{ff0cd3a039680b50:"fC3To",bc896f1b30e26c8b:"h6ORZ",b9e6a2d82debed5b:"2r7vd",d88cac34aed27f09:"dhhBt","187e0a90a62f31a1":"58JKl",a77183244ab38ca1:"7FChA","817bd734dbf4f984":"eA0W7","5bd001817d1a1fe2":"3lwy5"}],h6ORZ:[function(e,t,i){let{TeamsConst:n}=e("813960296055cff0"),{GameConst:r}=e("26255ed26260a75a"),{Logger:s,sc:a}=e("603fc0fc02377d1b");t.exports.TargetBoxEnricher=class{static appendClanInviteButton(e,t,i,n){let r=e?.gameEngine?.uiScene?.currentClan;if(!r)return!1;if(!r.ownerId)return s.error("Current clan missing owner.",r),!1;if(this.playerBySessionId(r,t.id))return!1;let a=e.getCurrentPlayer();if(!this.targetIsValidPlayer(t,a))return!1;let o=e.config.getWithoutLogs("client/clan/general/openInvites",!1);return(e.playerData.id.toString()===r.ownerId.toString()||!!o)&&this.appendInviteButton("clan",t,e,n)}static appendTeamInviteButton(e,t,i,n){return!(!this.targetIsValidPlayer(t,e.getCurrentPlayer())||e.getFeature("teams").fetchTeamPlayerBySessionId(t.id))&&this.appendInviteButton("team",t,e,n)}static appendInviteButton(e,t,i,r){let o=i.gameEngine.uiScene;if(!1===a.get(o,"uiTarget",!1))return s.critical('Missing "uiTarget" on uiScene.'),!1;let h=o.cache.html.get(e+"PlayerInvite");if(!h)return s.critical('Template "'+e+'PlayerInvite" not found.'),!1;i.gameDom.appendToElement("#target-container",i.gameEngine.parseTemplate(h,{playerName:r,playerId:t.player_id,inviteLabel:i.config.getWithoutLogs(e+"/labels/inviteLabel",n.LABELS[e.toUpperCase()].INVITE_BUTTON_LABEL)}));let c=i.gameDom.getElement("."+e+"-invite-"+t.player_id+" button");c?.addEventListener("click",()=>{let r={act:n.ACTIONS[e.toUpperCase()+"_INVITE"],id:t.player_id};i.activeRoomEvents.send(r),c.style.display="none",i.gameEngine.clearTarget()})}static targetIsValidPlayer(e,t){return r.TYPE_PLAYER===e.type&&t.playerId!==e.id}static playerBySessionId(e,t){let i=Object.keys(e.players);if(0===i.length)return!1;for(let n of i)if(e.players[n].sessionId===t)return e.players[n];return!1}}},{"813960296055cff0":"eA0W7","26255ed26260a75a":"93TbC","603fc0fc02377d1b":"3lwy5"}],eA0W7:[function(e,t,i){let n="cln.";t.exports.TeamsConst={KEY:"teams",CLAN_KEY:"clan",TEAM_PREF:"tm.",CLAN_PREF:n,NAME_LIMIT:50,CLAN_STARTING_POINTS:1,VALIDATION:{SUCCESS:1,NAME_EXISTS:2,LEVEL_ISSUE:3,CREATE_ERROR:4,CREATE_OWNER_ERROR:5},ACTIONS:{TEAM_INVITE:"tm.inv",TEAM_ACCEPTED:"tm.acp",TEAM_LEAVE:"tm.lev",TEAM_UPDATE:"tm.upd",TEAM_LEFT:"tm.lef",TEAM_REMOVE:"tm.rem",CLAN_INITIALIZE:n+"ini",CLAN_CREATE:n+"new",CLAN_INVITE:n+"inv",CLAN_ACCEPTED:n+"acp",CLAN_LEAVE:n+"lev",CLAN_UPDATE:n+"upd",CLAN_LEFT:n+"lef",CLAN_REMOVE:n+"rem",CLAN_REMOVED:n+"remd",CLAN_NAME:n+"nam"},LABELS:{TEAM:{INVITE_BUTTON_LABEL:"Team - Invite",REQUEST_FROM:"Accept team request from:",LEADER_NAME_TITLE:"Team leader: %leaderName",DISBAND:"Disband Team",LEAVE:"Leave Team",PROPERTY_MAX_VALUE:"/ %propertyMaxValue"},CLAN:{CREATE_CLAN_TITLE:"Clan - Creation",INVITE_BUTTON_LABEL:"Clan - Invite",REQUEST_FROM:"Accept clan request from:",CLAN_TITLE:"Clan: %clanName - Leader: %leaderName",NAME_PLACEHOLDER:"Choose a clan name...",CREATE:"Create",DISBAND:"Disband Clan",LEAVE:"Leave Clan",PROPERTY_MAX_VALUE:"/ %propertyMaxValue",PLAYERS_TITLE:"Connected Players:",MEMBERS_TITLE:"Clan Members:",NONE_CONNECTED:"None"}},CHAT:{MESSAGE:{INVITE_ACCEPTED:"%playerName has accepted your invitation.",INVITE_REJECTED:"%playerName has rejected your invitation.",DISBANDED:"%playerName has disbanded the %groupName.",LEFT:"You left the %groupName.",LEAVE:"%playerName has left the %groupName.",REMOVED:"%playerName has been removed from the %groupName.",ENTER:"%playerName has enter the %groupName.",NOT_ENOUGH_PLAYERS:"The team was disbanded due to a lack of players."}}}},{}],"2r7vd":[function(e,t,i){let{TeamMessageHandler:n}=e("6d14aca88eebc089"),{TeamsConst:r}=e("2253975335b3fdcf"),{Logger:s,sc:a}=e("d3f666b286aee6e5");t.exports.TeamMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on TeamMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on TeamMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isTeamMessage(t)&&this.handleTeamMessage(t,r):(this.isTeamMessage(t)&&(i.teamMessagesQueue||(i.teamMessagesQueue=[]),i.teamMessagesQueue.push(t)),s.error("Invalid TeamMessageHandler",r),!1)}handleTeamMessage(e,t){return r.ACTIONS.TEAM_INVITE===e.act?t.showTeamRequest():r.ACTIONS.TEAM_UPDATE===e.act?t.showTeamBox():r.ACTIONS.TEAM_LEFT!==e.act||t.removeTeamUi()}isTeamMessage(e){return 0===e.act?.indexOf(r.TEAM_PREF)}}},{"6d14aca88eebc089":"4FmFV","2253975335b3fdcf":"eA0W7",d3f666b286aee6e5:"3lwy5"}],"4FmFV":[function(e,t,i){let{UserInterface:n}=e("640ee5228c27b39"),{TeamsConst:r}=e("e52de429595682ab"),{Logger:s,sc:a}=e("3da1dc36372a33e1");t.exports.TeamMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on TeamMessageHandler."),!1):(s.info("Missing message on TeamMessageHandler."),!1):(s.info("Missing RoomEvents on TeamMessageHandler."),!1)}showTeamRequest(){this.createTeamUi(this.teamUiKey()),this.roomEvents.initUi({id:this.teamUiKey(),title:this.gameManager.config.getWithoutLogs("client/team/labels/requestFromTitle",r.LABELS.TEAM.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.TEAM_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-1-"+this.teamUiKey())?.addEventListener("click",()=>{this.gameDom.removeElement(".team-invite")}),this.gameDom.getElement("#opt-2-"+this.teamUiKey())?.addEventListener("click",()=>{this.removeTeamUi()})}removeTeamUi(){let e=this.gameManager.getUiElement(this.teamUiKey());if(!e)return s.error('UI Element not found by team UI key "'+this.teamUiKey()+'".'),!1;e.removeElement(),delete this.uiScene.userInterfaces[this.teamUiKey()],delete this.uiScene.elementsUi[this.teamUiKey()],this.uiScene.currentTeam=!1}teamUiKey(){return r.KEY+this.message.id}showTeamBox(){let e=this.teamUiKey();this.createTeamUi(e);let t=this.gameManager.config.getWithoutLogs("client/team/labels/leaderNameTitle",r.LABELS.TEAM.LEADER_NAME_TITLE).replace("%leaderName",this.message.leaderName),i=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!i)return s.error('Missing container: "#box-'+e+' .box-content".'),!1;let n=this.uiScene.elementsUi[e];this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene);let o=a.get(this.message,"players",!1);this.uiScene.currentTeam=o,this.updateTeamBox(o,i)}createTeamUi(e){return a.get(this.uiScene.userInterfaces,e)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[e]=new n(this.gameManager,{id:e,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-teams.html",r.KEY),this.uiScene.userInterfaces[e].createUiElement(this.uiScene,r.KEY),this.uiScene.userInterfaces[e])}updateTeamBox(e,t){if(!e){s.error("Players not defined.",e);return}let i="";for(let t of Object.keys(e))i+=this.createTeamMemberBox(e[t]);t.innerHTML=this.createTeamContainer(i),this.activateTeamPlayerActions(e),this.activateTeamLeaveButtonAction()}createTeamContainer(e){let t=this.uiScene.cache.html.get("teamContainer");if(!t)return s.error('Missing template "teamContainer".'),"";let i=this.gameManager.playerData.id.toString(),n=i===this.message.id.toString(),a="client/team/labels/",o=n?this.gameManager.config.getWithoutLogs(a+"disbandLabel",r.LABELS.TEAM.DISBAND):this.gameManager.config.getWithoutLogs(a+"leaveLabel",r.LABELS.TEAM.LEAVE),h={teamId:this.message.id,playerId:i,leaveActionLabel:o,teamMembers:e};return this.gameManager.gameEngine.parseTemplate(t,h)}activateTeamLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.gameManager.playerData.id.toString());e?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_LEAVE,id:this.message.id})})}createTeamMemberBox(e){let t=this.uiScene.cache.html.get("teamPlayerData");if(!t)return s.error('Missing template "teamPlayerData".'),"";let i=this.gameManager.playerData.id.toString()===this.message.id.toString();return this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties),playerRemove:i?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("teamRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id}):(s.error('Missing template "teamRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/team/labels/propertyMaxValue",r.LABELS.TEAM.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateTeamPlayerActions(e){for(let t of Object.keys(e)){let i=e[t],n=".team-player-"+i.player_id+" .player-name";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let s=".team-player-"+i.player_id+" .properties-list-container";this.gameDom.getElement(s)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let a=".team-player-"+i.player_id+" .team-remove-button";this.gameDom.getElement(a)?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_REMOVE,id:this.message.id,remove:i.player_id})})}}}},{"640ee5228c27b39":"bzImH",e52de429595682ab:"eA0W7","3da1dc36372a33e1":"3lwy5"}],dhhBt:[function(e,t,i){let{ClanMessageHandler:n}=e("ffee11c5f30da2da"),{TeamsConst:r}=e("80c3d53d947c2511"),{Logger:s,sc:a}=e("b7dc8fe4d702b1c7");t.exports.ClanMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ClanMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ClanMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isClanMessage(t)&&this.handleClanMessage(t,r):(this.isClanMessage(t)&&(i.clanMessagesQueue||(i.clanMessagesQueue=[]),i.clanMessagesQueue.push(t)),!1)}handleClanMessage(e,t){return r.ACTIONS.CLAN_INITIALIZE===e.act?t.initializeClanUi():r.ACTIONS.CLAN_CREATE===e.act?r.VALIDATION.SUCCESS===e.result?t.showNewClan():t.initializeClanUi():r.ACTIONS.CLAN_INVITE===e.act?t.showClanRequest():r.ACTIONS.CLAN_UPDATE===e.act?t.showClanBox():r.ACTIONS.CLAN_LEFT===e.act?t.removeClanUi():!r.ACTIONS.CLAN_REMOVED||(t.removeClanUi(),t.initializeClanUi())}isClanMessage(e){return 0===e.act?.indexOf(r.CLAN_PREF)}}},{ffee11c5f30da2da:"9FVGq","80c3d53d947c2511":"eA0W7",b7dc8fe4d702b1c7:"3lwy5"}],"9FVGq":[function(e,t,i){let{UserInterface:n}=e("2dee0f2dc70de1b2"),{TeamsConst:r}=e("435f9309a487dcac"),{Logger:s,sc:a}=e("937cade469140286");t.exports.ClanMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?!!this.uiScene&&this.gameManager.playerData?.id:(s.info("Missing GameManager on ClanMessageHandler."),!1):(s.info("Missing message on ClanMessageHandler."),!1):(s.info("Missing RoomEvents on ClanMessageHandler."),!1)}initializeClanUi(){this.uiScene.currentClan=!1;let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/createClanTitle",r.LABELS.CLAN.CREATE_CLAN_TITLE),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: "#box-clan .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:this.createClanContent()},this.uiScene),this.activateCreateButton(),this.addAndRemoveCaptureKeys()}showNewClan(){let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.gameManager.currentPlayerName()),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: ".clan-dialog-box .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene),this.updateClanBox(i),this.setClanFromMessage()}showClanRequest(){this.createClanUi(),this.roomEvents.initUi({id:r.CLAN_KEY,title:this.gameManager.config.getWithoutLogs("client/clan/labels/requestFromTitle",r.LABELS.CLAN.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.CLAN_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-clan")?.addEventListener("click",()=>{this.initializeClanUi()})}showClanBox(){this.createClanUi();let e=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.message.leaderName),t=this.gameManager.gameDom.getElement("#box-clan .box-content");if(!t)return s.error('Missing container: "#box-clan .box-content".'),!1;let i=this.uiScene.elementsUi[r.CLAN_KEY];this.roomEvents.uiSetTitle(i,{title:e}),this.roomEvents.uiSetContent(i,{content:""},this.uiScene),this.setClanFromMessage(),this.updateClanBox(t)}setClanFromMessage(){let e=a.get(this.message,"players",!1),t=a.get(this.message,"members",!1);this.uiScene.currentClan={id:this.message.id,name:this.message.clanName,leader:this.message.leaderName,ownerId:this.message.ownerId,players:e,members:t}}removeClanUi(){let e=this.gameManager.getUiElement(r.CLAN_KEY);if(!e)return s.error("Clan UI Element not found for remove."),!1;e.removeElement(),delete this.uiScene.userInterfaces[r.CLAN_KEY],delete this.uiScene.elementsUi[r.CLAN_KEY]}createClanUi(){return a.get(this.uiScene.userInterfaces,r.CLAN_KEY)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[r.CLAN_KEY]=new n(this.gameManager,{id:r.CLAN_KEY,type:r.CLAN_KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-clan.html",r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY].createUiElement(this.uiScene,r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY])}createClanContent(){let e=this.uiScene.cache.html.get("clanCreate");if(!e)return s.error('Missing template "clanCreate".'),"";let t={playerId:this.gameManager.playerData.id.toString(),createLabel:this.gameManager.config.getWithoutLogs("client/clan/labels/createLabel",r.LABELS.CLAN.CREATE),clanNamePlaceholder:this.gameManager.config.getWithoutLogs("client/clan/labels/namePlaceholder",r.LABELS.CLAN.NAME_PLACEHOLDER)};return this.gameManager.gameEngine.parseTemplate(e,t)}activateCreateButton(){let e=this.gameManager.gameDom.getElement(".clan-dialog-box .submit-clan-create");if(!e)return s.warning('Clan create button not found by ".clan-dialog-box .clan-create".'),!1;let t=this.gameManager.gameDom.getElement(".clan-dialog-box .clan-name-input");if(!t)return s.warning('Clan create button not found by ".clan-dialog-box .clan-name-input".'),!1;e.addEventListener("click",()=>{if(0===t.value.length)return!1;this.gameManager.gameDom.updateContent(".clan-dialog-box .box-content",this.uiScene.cache.html.get("uiLoading")),this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_CREATE,[r.ACTIONS.CLAN_NAME]:t.value})})}updateClanBox(e){let t=a.get(this.message,"players",[]),i=Object.keys(t),n=0===i.length?this.gameManager.config.getWithoutLogs("client/clan/labels/noneConnected",r.LABELS.CLAN.NONE_CONNECTED):"";for(let e of i)n+=this.createClanPlayerBox(t[e]);let s=this.gameManager.playerData.id.toString()===this.message.ownerId.toString(),o=a.get(this.message,"members",[]),h="";for(let e of Object.keys(o))h+=this.createClanMemberBox(o[e],s);e.innerHTML=this.createClanContainer(n,h),this.activateClanPlayersActions(t),this.activateClanMembersActions(o),this.activateClanLeaveButtonAction()}addAndRemoveCaptureKeys(){let e=this.gameManager.getActiveScene(),t=e.availableControllersKeyCodes(),i=this.gameManager.gameDom.getElement(".clan-name-input");e.addAndRemoveCapture(t,i)}createClanContainer(e,t){let i=this.uiScene.cache.html.get("clanContainer");if(!i)return s.error('Missing template "clanContainer".'),"";let n=this.gameManager.playerData.id.toString()===this.message.ownerId.toString()?this.gameManager.config.getWithoutLogs("client/clan/labels/disbandLabel",r.LABELS.CLAN.DISBAND):this.gameManager.config.getWithoutLogs("client/clan/labels/leaveLabel",r.LABELS.CLAN.LEAVE),a={clanId:this.message.id,playerId:this.gameManager.playerData.id.toString(),leaveActionLabel:n,clanPlayersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanPlayersTitle",r.LABELS.CLAN.PLAYERS_TITLE),clanPlayers:e,clanMembersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanMembersTitle",r.LABELS.CLAN.MEMBERS_TITLE),clanMembers:t};return this.gameManager.gameEngine.parseTemplate(i,a)}activateClanLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.message.id);e?.addEventListener("click",()=>{let e={act:r.ACTIONS.CLAN_LEAVE,id:this.message.id};this.gameManager.activeRoomEvents.send(e)})}createClanPlayerBox(e){let t=this.uiScene.cache.html.get("clanPlayerData");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties)}):(s.error('Missing template "clanPlayerData".'),"")}createClanMemberBox(e,t){let i=this.uiScene.cache.html.get("clanMemberData");if(!i)return s.error('Missing template "clanMemberData".'),"";let n=e.id.toString()!==this.message.ownerId.toString();return this.gameManager.gameEngine.parseTemplate(i,{playerId:e.id.toString(),playerName:e.name,clanRemove:t&&n?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("clanRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.id.toString()}):(s.error('Missing template "clanRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/clan/labels/propertyMaxValue",r.LABELS.CLAN.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateClanPlayersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-player-"+t+" .player-name",r=".clan-player-"+t+" .properties-list-container",a=this.gameDom.getElement(n);a||s.notice("Player name element not found.",n),a?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let o=this.gameDom.getElement(r);a||s.notice("Player properties element not found.",r),o?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)})}}activateClanMembersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-member-"+i.id+" .clan-remove-button";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_REMOVE,id:this.message.id,remove:i.id})})}}}},{"2dee0f2dc70de1b2":"bzImH","435f9309a487dcac":"eA0W7","937cade469140286":"3lwy5"}],"58JKl":[function(e,t,i){let{ClanMessageHandler:n}=e("b6102a2bc5547886"),{TeamMessageHandler:r}=e("8b82527a10949305"),{sc:s}=e("600e9765de53cf98");t.exports.MessageProcessor=class{static processClanMessagesQueue(e,t){if(s.isArray(e.clanMessagesQueue)&&0!==e.clanMessagesQueue.length){for(let i of e.clanMessagesQueue)t.handleClanMessage(i,new n({roomEvents:e,message:i}));e.clanMessagesQueue=[]}}static processTeamMessagesQueue(e,t){if(s.isArray(e.teamMessagesQueue)&&0!==e.teamMessagesQueue.length){for(let i of e.teamMessagesQueue)t.handleTeamMessage(i,new r({roomEvents:e,message:i}));e.teamMessagesQueue=[]}}}},{b6102a2bc5547886:"9FVGq","8b82527a10949305":"4FmFV","600e9765de53cf98":"3lwy5"}],"7FChA":[function(e,t,i){let{TeamsConst:n}=e("7ae425e7585f8b77");t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/teams/templates/";e.load.html(n.KEY,t+"ui-teams.html"),e.load.html(n.CLAN_KEY,t+"ui-clan.html"),e.load.html("teamPlayerInvite",t+"team-invite.html"),e.load.html("teamPlayerAccept",t+"team-accept.html"),e.load.html("teamRemove",t+"team-remove.html"),e.load.html("teamContainer",t+"team-container.html"),e.load.html("teamPlayerData",t+"team-player-data.html"),e.load.html("clanCreate",t+"clan-create.html"),e.load.html("clanPlayerInvite",t+"clan-invite.html"),e.load.html("clanPlayerAccept",t+"clan-accept.html"),e.load.html("clanRemove",t+"clan-remove.html"),e.load.html("clanContainer",t+"clan-container.html"),e.load.html("clanPlayerData",t+"clan-player-data.html"),e.load.html("clanMemberData",t+"clan-member-data.html"),e.load.html("teamsSharedProperty",t+"shared-property.html")}}},{"7ae425e7585f8b77":"eA0W7"}],tkJox:[function(e,t,i){let{Translator:n}=e("c0b37a63a164ee2"),{SnippetsUi:r}=e("248d3f3dadbe8854"),{TemplatesHandler:s}=e("1f76a945ba4ca26b"),{TranslationsMapper:a}=e("9f2145cb2c70fb80"),o=e("3cdaeb7ca281fdbe"),{SnippetsConst:h}=e("12b107607eac2374"),{PluginInterface:c}=e("b68fb0c66be53b"),{Logger:l,sc:u}=e("b6c13c4a8fae8965");t.exports.SnippetsPlugin=class extends c{setup(e){if(this.gameManager=u.get(e,"gameManager",!1),!this.gameManager)return l.error("Game Manager undefined in InventoryPlugin."),!1;this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in InventoryPlugin."),a.forConfig(this.gameManager.config.client,o),this.activeLocale=this.gameManager.initialGameData?.userLocale?.locale.locale||h.DEFAULT_LOCALE,this.gameManager.services.translator=new n({snippets:Object.assign({},this.gameManager.config.client.snippets),dataValues:Object.assign({},this.gameManager.config.client.snippetsDataValues),locale:h.DEFAULT_LOCALE,activeLocale:this.activeLocale}),this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async(e,t,i,n)=>{this.gameManager.services.translator.snippets=Object.assign(this.gameManager.services.translator.snippets,this.gameManager.config.client.snippets)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new r(e),this.uiManager.createUi()})}}},{c0b37a63a164ee2:"aYgYW","248d3f3dadbe8854":"4basu","1f76a945ba4ca26b":"1GX4b","9f2145cb2c70fb80":"1fcQw","3cdaeb7ca281fdbe":"5lWrq","12b107607eac2374":"biSFs",b68fb0c66be53b:"fC3To",b6c13c4a8fae8965:"3lwy5"}],aYgYW:[function(e,t,i){let{SnippetsConst:n}=e("f53f6da57661aae5"),{sc:r}=e("ca9a001439841d68");t.exports.Translator=class{constructor(e){this.snippets=r.get(e,"snippets",{}),this.dataValues=r.get(e,"dataValues",{}),this.locale=r.get(e,"locale",n.DEFAULT_LOCALE),this.activeLocale=r.get(e,"activeLocale",n.DEFAULT_LOCALE)}translate(e,t={},i=!1){i||(i=this.activeLocale);let n=r.get(this.snippets[i],e,e);if(e===n)return e;if(!r.isObject(t))return n;let s=Object.keys(t);if(0===s.length)return n;let a=this.snippetNameSpace(e);for(let e of s){let i=t[e],r="%"+((this.dataValues[a]||{})[e]||e);for(;-1!==n.indexOf(r);)n=n.replace(r,i)}return n}snippetNameSpace(e){let t=e.split(".");return 1===t.length?n.DATA_VALUES_DEFAULT_NAMESPACE:t[0]}t(e,t={},i=!1){return this.translate(e,t,i)}}},{f53f6da57661aae5:"biSFs",ca9a001439841d68:"3lwy5"}],"4basu":[function(e,t,i){let{SnippetsConst:n}=e("9095968e9689ed1b"),{Logger:r,sc:s}=e("4383b901c356e103");t.exports.SnippetsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.translator=this.gameManager.services.translator,this.locales={}}createUi(){this.locales=s.get(this.gameManager.config.client,"locales",{});let e=Object.keys(this.locales);if(1>=e.length)return!1;let t=this.gameManager.gameEngine.parseTemplate(this.uiScene.cache.html.get(n.KEY),{snippetsTitle:this.translator.t("translator.title"),snippetsLabel:this.translator.t("translator.label"),snippetsNotification:this.translator.t("translator.notification")});if(!this.gameManager.gameDom.appendToElement("#settings-dynamic",t))return r.warning("Could not append snippets settings."),!1;let i=this.gameManager.gameDom.getElement(".snippets-setting");if(!i)return r.warning("Snippets settings container not available."),!1;for(let t of e){let e=this.locales[t],n=this.gameManager.gameDom.createElement("option");n.value=e.id,n.innerHTML=e.country_code,i.appendChild(n)}i.addEventListener("change",async()=>{this.gameManager.activeRoomEvents.send({act:n.ACTIONS.UPDATE,up:i.value})})}}},{"9095968e9689ed1b":"biSFs","4383b901c356e103":"3lwy5"}],"1GX4b":[function(e,t,i){let{SnippetsConst:n}=e("da1bec0d581b3bb0");t.exports.TemplatesHandler=class{static preloadTemplates(e){e.load.html(n.KEY,"/assets/features/snippets/templates/ui-snippets.html")}}},{da1bec0d581b3bb0:"biSFs"}],"5lWrq":[function(e,t,i){t.exports={translator:{title:"Languages Settings",label:"Choose your language:",notification:"Changes will take place after next login."}}},{}],aNIyr:[function(e,t,i){let{MessagesListener:n}=e("85a323b712a32599"),{SdkHandler:r}=e("1313cc258c10bcc1"),{ProvidersList:s}=e("939d602a1b11a3bf"),a=e("e0bd7042f0c03284"),{TranslationsMapper:o}=e("ae904a587e959599"),{AdsConst:h}=e("b33cf15ea82be794"),{PluginInterface:c}=e("9d441f820e5e636d"),{Logger:l,sc:u}=e("d2d2d55e6ca71f4b");t.exports.AdsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in AdsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in AdsPlugin."),this.config={},this.activeProviders={},this.playedAds=null,this.setConfig(),this.setSkdHandler(),this.fetchActiveProviders(),this.setTranslations(),this.listenEvents()}setConfig(){this.config=!!this.gameManager&&this.gameManager.config.get("client/ads/general",{})}setSkdHandler(){let e=this.gameManager?.gameDom;this.sdkHandler=!!e&&new r({gameDom:e,config:this.config})}fetchActiveProviders(){let e=u.get(this.config,"providers",{}),t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t.enabled&&(t.classDefinition=u.get(s,i,!1),this.activeProviders[i]=t)}}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,h.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager||!this.sdkHandler)return l.error("Missing properties for AdsPlugin."),!1;this.events.on("reldens.beforeCreateEngine",async(e,t)=>{if(!this.sdkHandler){l.info("Undefined SDK Handler.");return}await this.sdkHandler.setupProvidersSdk(this.activeProviders,t)}),this.events.on("reldens.joinedRoom",async e=>{await n.listenMessages(e,this)})}}},{"85a323b712a32599":"abfmj","1313cc258c10bcc1":"cOb0P","939d602a1b11a3bf":"dIdRn",e0bd7042f0c03284:"dPTjY",ae904a587e959599:"1fcQw",b33cf15ea82be794:"8NbLx","9d441f820e5e636d":"fC3To",d2d2d55e6ca71f4b:"3lwy5"}],abfmj:[function(e,t,i){let{AdsConst:n}=e("4348dc3fba513ca9"),{Logger:r}=e("c1c750da7e6bb927");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.ACTIONS.ADS_PLAYED!==e.act)return!1;if(t.playedAds={},!e.playedAdsModels)return r.info("None played ads.",e),!1;for(let i of e.playedAdsModels)t.playedAds[i.ads_id]=i;return!0})}}},{"4348dc3fba513ca9":"8NbLx",c1c750da7e6bb927:"3lwy5"}],"8NbLx":[function(e,t,i){t.exports.AdsConst={ENVIRONMENTS:{DISABLED:"disabled"},ADS_TYPES:{EVENT_VIDEO:"eventVideo",BANNER:"banner"},ACTIONS:{ADS_PLAYED:"adsP",AD_STARTED:"adS",AD_ENDED:"adE"},MESSAGE:{DATA_VALUES:{NAMESPACE:"ads"}},AWAIT_ADS_TIME:1e3,VIDEOS_MINIMUM_DURATION:3e3}},{}],cOb0P:[function(e,t,i){let{Logger:n,sc:r}=e("e03372517c231481");t.exports.SdkHandler=class{constructor(e){this.gameDom=r.get(e,"gameDom",!1)}async setupProvidersSdk(e,t){if(!this.gameDom)return n.error("Undefined GameDOM on SdkHandler."),!1;if(!r.isObject(e))return!1;let i=Object.keys(e);if(0===i.length)return!1;for(let r of i){let i=e[r];await this.appendSdk(i),await this.activateSdkInstance(i,t),n.info("Activated Ads SDK: "+i.key,i)}}async appendSdk(e){let t=r.get(e,"sdkUrl","");if(""===t)return!1;let i=this.gameDom.getElement("body"),n=this.gameDom.createElement("script");return n.src=t,i.append(n),!0}async activateSdkInstance(e,t){e.classDefinition&&(e.service=new e.classDefinition(e,t,e.activeAds)),r.isFunction(e.service?.activate)&&await e.service.activate()}}},{e03372517c231481:"3lwy5"}],dIdRn:[function(e,t,i){let{CrazyGames:n}=e("e56ab7764646c7b3"),{GameMonetize:r}=e("1a058a436deb6e61"),{GoogleAdSense:s}=e("e8b34c41dab1ace");t.exports.ProvidersList={crazyGames:n,gameMonetize:r,googleAdSense:s}},{e56ab7764646c7b3:"3CRbF","1a058a436deb6e61":"6XwV3",e8b34c41dab1ace:"8V0yJ"}],"3CRbF":[function(e,t,i){let{BannersHandler:n}=e("f96686ce9c54877d"),{VideosHandler:r}=e("786a85289268fabd"),{AdsProvider:s}=e("25abe1dccff858a9"),{AdsConst:a}=e("9c8391f4374e1d6f"),{Logger:o}=e("ff1ebd8b8b8b16e6");t.exports.CrazyGames=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.sdk=this.window?.CrazyGames?.SDK,this.retry=0,this.environment=a.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.metaData.sdkBannerRefreshTime||(this.metaData.sdkBannerRefreshTime=6e4),this.activeAds=this.fetchActiveAds(e);let i={gameManager:t,metaData:e,sdk:this.sdk,hasAdblock:this.hasAdblock,isEnabled:this.isEnabled};this.bannersHandler=new n(i),this.videosHandler=new r(i)}fetchActiveAds(e){return this.gameManager?.config?s.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}validAdsTypes(){return[a.ADS_TYPES.BANNER,a.ADS_TYPES.EVENT_VIDEO]}async activate(){return this.sdk?(this.environment=await this.sdk.getEnvironment(),this.bannersHandler.sdk=this.sdk,this.videosHandler.sdk=this.sdk,!await this.hasAdblock()&&void await this.activateAds()):(this.retry===this.metaData.sdkMaxRetries?o.critical("CrazyGames required object."):this.retry{this.retry++,o.info("CrazyGames required object, retry #"+this.retry+"."),this.sdk=this.window?.CrazyGames?.SDK,this.sdk&&o.info("CrazyGames object found."),this.activate()},this.metaData.sdkRetryTime),!1)}async hasAdblock(){try{let e=await this.sdk.ad.hasAdblock();return e&&o.critical("Adblock detected, please disable."),e}catch(e){o.info("SDK detected error.",e)}return!1}async isEnabled(){return a.ENVIRONMENTS.DISABLED!==await this.sdk.getEnvironment()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return!1;for(let t of e){let e=this.activeAds[t];a.ADS_TYPES.BANNER===e.type.key&&await this.bannersHandler.activateAdBanner(e),a.ADS_TYPES.EVENT_VIDEO===e.type.key&&await this.videosHandler.activateAdVideo(e)}}}},{f96686ce9c54877d:"rqZs2","786a85289268fabd":"74T2t","25abe1dccff858a9":"iayFu","9c8391f4374e1d6f":"8NbLx",ff1ebd8b8b8b16e6:"3lwy5"}],rqZs2:[function(e,t,i){let{Validator:n}=e("3e58599d4b199bfe"),{Logger:r,sc:s}=e("16dda0dd59cf6195");t.exports.BannersHandler=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.metaData=s.get(e,"metaData",{}),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=s.get(e,"sdk",!1),this.hasAdblock=s.get(e,"hasAdblock",!1),this.isEnabled=s.get(e,"isEnabled",!1),this.activeBanners={},this.validator=new n}availableBanners(){return["728x90","300x250","320x50","468x60","320x100"]}availableResponsiveBanners(){return["970x90","320x50","160x600","336x280","728x90","300x600","468x60","970x250","300x250","250x250","120x600"]}validBannerSize(e){return -1!==this.availableBanners().indexOf(e)}validResponsiveBannerSize(e){return -1!==this.availableResponsiveBanners().indexOf(e)}async activateAdBanner(e){if(!e)return r.info("Missing activate ad.",e),!1;if(!this.validator.validate(this))return r.info("Invalid banner."),!1;let t=e.bannerData;if(!t)return r.info("No banner data."),!1;let i=s.get(t,"fullTime",!1),n=s.get(t,"responsive",!1);if(i)return await this.handleBannerType(n,e);let a=s.get(t,"uiReferenceIds",[]);if(0===a.length)return r.warning("Missing banner reference ID."),!1;this.events.on("reldens.openUI",async t=>{if(-1!==a.indexOf("ANY")||-1!==a.indexOf(t.openButton.id)){let i=e.id+"-"+t.openButton.id,r=new Date().getTime(),a=s.get(this.activeBanners,i,!1);if(a&&r{let i=e.id+"-"+t.openButton.id,n=s.get(this.activeBanners,i,!1);n&&n.banner.classList.add("hidden")})}async handleBannerType(e,t,i){return e?this.createResponsiveBanner(t,i):await this.createBanner(t,i)}async createBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=s.get(e.styles,"width","300"),n=s.get(e.styles,"height","250");if(!this.validBannerSize(i+"x"+n))return r.info("CrazyGames - Invalid Banner size."),!1;let a=t||e.id;if(!a)return r.info("CrazyGames - Missing container ID.",e,t),!1;let o=this.gameDom.createElement("div","banner-container-"+a);this.gameDom.getElement("body")?.append(o),await this.isEnabled()&&await this.sdk.banner.requestBanner({id:o.id,width:i,height:n});let h=this.mapStylesWithValues(Object.assign({width:i,height:n},e));return this.gameDom.setElementStyles(o,h),o.classList.add("ads-banner-container"),o}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}mapStylesWithValues(e){let t={"z-index":2e8,width:s.get(e,"width",300),height:s.get(e,"height",250),position:""===s.get(e.styles,"position","")?e.position:"absolute"},i=s.get(e.styles,"top",null);null!==i&&(t.top=i);let n=s.get(e.styles,"bottom",null);null!==n&&(t.bottom=n);let r=s.get(e.styles,"left",null);null!==r&&(t.left=r);let a=s.get(e.styles,"right",null);return null!==a&&(t.right=a),t}async createResponsiveBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=t||e.id;if(!i)return r.info("CrazyGames - Missing container ID.",e,t),!1;let n=this.gameDom.createElement("div","responsive-banner-container-"+i),s=this.mapStylesWithValues(e);return delete s.width,delete s.height,this.gameDom.setElementStyles(n,s),this.gameDom.getElement("body").append(n),await this.isEnabled()&&await this.sdk.banner.requestResponsiveBanner(n.id),n.classList.add("ads-banner-container"),n}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}}},{"3e58599d4b199bfe":"dZuZ9","16dda0dd59cf6195":"3lwy5"}],dZuZ9:[function(e,t,i){let{Logger:n,sc:r}=e("11b40ed905e7acf1");t.exports.Validator=class{validate(e){return e.gameManager?e.sdk?(e.hasAdblock&&r.isFunction(e.hasAdblock)||n.warning("Missing or invalid hasAdblock function on Validator.",e),!!(e.isEnabled&&r.isFunction(e.isEnabled))||(n.error("Missing or invalid isEnabled function on Validator.",e),!1)):(n.error("Missing SDK on Validator.",e),!1):(n.error("Missing Game Manager on Validator.",e),!1)}async canBeActivated(e){return!(!r.isFunction(e.hasAdblock)||await e.hasAdblock())||(n.info("AdBlocker detected."),!1)}}},{"11b40ed905e7acf1":"3lwy5"}],"74T2t":[function(e,t,i){let{Validator:n}=e("eb221c6f45d898b0"),{AdsConst:r}=e("ff99f7bef03d711b"),{Logger:s,sc:a}=e("111cbb28b14bd31b");t.exports.VideosHandler=class{constructor(e){this.gameManager=a.get(e,"gameManager",!1),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=a.get(e,"sdk",!1),this.hasAdblock=a.get(e,"hasAdblock",!1),this.isEnabled=a.get(e,"isEnabled",!1),this.validator=new n,this.isPlayingAd=!1,this.setConfig()}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}async activateAdVideo(e){let t=a.get(e,"eventKey",!1);if(!t)return s.warning("Missing event key.",e),!1;this.events.on(t,async t=>this.isPlayingAd?(s.info("CrazyGames - Another ad is been played."),!1):this.validator.validate(this)&&await this.validator.canBeActivated(this)?this.isEnabled()?await this.tryRePlay(e):(s.info("CrazyGames - SDK not enabled."),!1):(s.error("CrazyGames - Ad can not be activated."),!1))}async tryRePlay(e){let t=this.gameManager.getFeature("ads");if(null===t.playedAds)return setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1;if(a.get(t?.playedAds,e.id,!1)&&!e.replay)return s.info("Ad already played",e),!1;let i=a.get(e,"adStartedCallback",()=>{this.isPlayingAd=!0,s.info("CrazyGames - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:e.id})}),n=a.get(e,"adFinishedCallback",async()=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),o=a.get(e,"adErrorCallback",async t=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-error callback.",t,new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id,error:t}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),h=a.get(e,"rewardItemKey",!1);await this.gameManager.audioManager.changeMuteState(!0,!0),await this.sdk.ad.requestAd(h?"rewarded":"midgame",{adStarted:i,adFinished:n,adError:o})}send(e){let t=this.gameManager?.activeRoomEvents;return t?t?.send(e):(s.warning("CrazyGames - RoomEvents undefined to send an Ad Video message."),!1)}}},{eb221c6f45d898b0:"dZuZ9",ff99f7bef03d711b:"8NbLx","111cbb28b14bd31b":"3lwy5"}],iayFu:[function(e,t,i){let{Logger:n}=e("55d686c62dfd5353");t.exports.AdsProvider=class{static fetchActiveAdsByProviderId(e,t,i){if(!e)return{};let r=Object.keys(i);if(0===r.length)return{};let s={};for(let a of r){let r=i[a];if(e===r.provider.id){if(!r.enabled){n.info("Ad not enabled.",r);continue}if(-1===t.indexOf(r.type.key)){n.info("Invalid ad type.",r);continue}s[a]=r}}return n.info({providerId:e,activeProviderAds:s}),s}}},{"55d686c62dfd5353":"3lwy5"}],"6XwV3":[function(e,t,i){let{AdsProvider:n}=e("f98142cce04e846c"),{AdsConst:r}=e("44a48259b87a5721"),{Logger:s,sc:a}=e("b637051a2a3ead94");t.exports.GameMonetize=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.setSdkOptions(),this.sdk=this.window?.sdk,this.retry=0,this.isPlayingAd=!1,this.environment=r.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.activeAds=this.fetchActiveAds(e),this.activeAdBeenPlayed=!1,this.setConfig()}fetchActiveAds(e){return this.gameManager?.config?n.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}eventKeys(){return{sdkAdStarted:"CONTENT_PAUSE_REQUESTED",sdkAdEnded:"SDK_GAME_START",sdkReady:"SDK_READY"}}setSdkOptions(){return!!this.gameDom&&(this.metaData.gameId?void(this.gameDom.getWindow().SDK_OPTIONS={gameId:this.metaData.gameId,onEvent:async e=>{switch(s.info("GameMonetize - SDK event fired: "+e.name),e.name){case this.eventKeys().sdkAdStarted:await this.adStartedCallback(e);break;case this.eventKeys().sdkAdEnded:await this.adEndedCallback(e);break;case this.eventKeys().sdkReady:await this.sdkReadyCallback(e)}}}):(s.error("GameMonetize - Game ID undefined."),!1))}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}validAdsTypes(){return[r.ADS_TYPES.EVENT_VIDEO]}async adStartedCallback(e){if(this.isPlayingAd=!0,await this.gameManager.audioManager.changeMuteState(!0,!0),!this.activeAdBeenPlayed)return s.info("AdStartedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:this.activeAdBeenPlayed.id})}async adEndedCallback(e){if(this.isPlayingAd=!1,await this.gameManager.audioManager.changeMuteState(!1,!1),!this.activeAdBeenPlayed)return s.info("AdEndedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:this.activeAdBeenPlayed.id})}async sdkReadyCallback(e){this.sdk=this.window.sdk}async activate(){if(!this.sdk)return this.retry===this.metaData.sdkMaxRetries?s.critical("GameMonetize required object."):this.retry{this.retry++,s.info("GameMonetize required object, retry #"+this.retry+"."),this.sdk=this.window?.sdk,this.sdk&&s.info("GameMonetize object found."),this.activate()},this.metaData.sdkRetryTime),!1;await this.activateAds()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return s.info("None active ads."),!1;for(let t of e){let e=this.activeAds[t];if(r.ADS_TYPES.EVENT_VIDEO!==e.type.key)continue;let i=a.get(e,"eventKey",!1);if(!i)return s.warning("Missing event key.",e),!1;this.events.on(i,async t=>(s.info("GameMonetize - Video event fired, playing ad.",t,e),this.isPlayingAd)?(s.info("GameMonetize - Ad is been played."),!1):await this.tryRePlay(e))}}async tryRePlay(e){return null===this.gameManager.getFeature("ads").playedAds?(setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1):(this.activeAdBeenPlayed=e,a.isObjectFunction(this.sdk,"showBanner"))?void await this.sdk.showBanner():(s.critical("GameMonetize SDK not ready."),!1)}send(e){let t=this.gameManager?.activeRoomEvents;return t?t.send(e):(s.warning("GameMonetize - RoomEvents undefined to send an Ad Video message."),!1)}}},{f98142cce04e846c:"iayFu","44a48259b87a5721":"8NbLx",b637051a2a3ead94:"3lwy5"}],"8V0yJ":[function(e,t,i){t.exports.GoogleAdSense=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e}}},{}],dPTjY:[function(e,t,i){t.exports={ads:{}}},{}],"79nNs":[function(e,t,i){let{DebugWorldCreator:n}=e("2f104c4a1fe36eaf"),{PluginInterface:r}=e("c03d54e76a300c60"),{Logger:s,sc:a}=e("56ce9c7fd2ae3df6");t.exports.WorldPlugin=class extends r{setup(e){this.gameManager=a.get(e,"gameManager",!1),this.events=a.get(e,"events",!1),this.debugWorldCreator=!1,this.validateProperties()&&this.setupDebugMode()}validateProperties(){return this.gameManager?!!this.events||(s.error("EventsManager undefined in PredictionPlugin."),!1):(s.error("Game Manager undefined in PredictionPlugin."),!1)}setupDebugMode(){if(!this.gameManager.config.getWithoutLogs("client/world/debug/enabled",!1))return!1;this.debugWorldCreator=new n,this.events.on("reldens.createEngineSceneDone",async e=>{await this.debugWorldCreator.createSceneWorld(e.currentScene)})}}},{"2f104c4a1fe36eaf":"2tOiq",c03d54e76a300c60:"fC3To","56ce9c7fd2ae3df6":"3lwy5"}],"2tOiq":[function(e,t,i){let{Renderer:n}=e("7f57d693a727d80"),{P2world:r}=e("56e554b827a8b617"),{WorldTimer:s}=e("b75a99257129c956"),{Logger:a}=e("493b121a06799e1e");t.exports.DebugWorldCreator=class{async createSceneWorld(e){let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomName,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.debugWorld=this.createWorldInstance(r),e.debugWorld.createLimits(),await e.debugWorld.createWorldContent({}),e.debugWorldTimer=new s({callbacks:[()=>{if(!e.debugWorld){a.error("Scene World not longer exists.",e.roomWorld);return}e.debugWorld.removeBodiesFromWorld()}]}),e.debugWorldTimer.startWorldSteps(e.debugWorld),e.debugWorldRenderer=new n(e)}cloneMapJson(e,t){let i=e.tilesets[0];return i?Object.assign({},e.cache?.tilemap?.entries?.entries[i.name]?.data||{},{layers:t}):{}}findValidLayers(e){let t=[],i=e.tilesets[0];if(!i)return t;for(let n of e.cache.tilemap.entries.entries[i.name].data.layers)-1!==n.name.indexOf("collision")&&t.push(n);return t}createWorldInstance(e){return new r(e)}}},{"7f57d693a727d80":"6kVuK","56e554b827a8b617":"hvh2r",b75a99257129c956:"5zAcU","493b121a06799e1e":"3lwy5"}],"6kVuK":[function(e,t,i){let{Box:n}=e("43cbaab4204b970");t.exports.Renderer=class{constructor(e){this.scene=e,this.gameDom=e.gameManager.gameDom,this.world=e.debugWorld,this.canvasElement=!1,this.canvasContext=!1}fetchCanvasContext(){this.canvasContext=this.canvasElement.getContext("2d")}createCanvas(e,t){this.canvasElement=this.gameDom.createElement("canvas"),this.canvasElement.width=e,this.canvasElement.height=t,this.canvasElement.id="physicsCanvas",this.gameDom.getDocument().body.appendChild(this.canvasElement),this.fetchCanvasContext()}renderLoop(){this.canvasContext.clearRect(0,0,this.canvasElement.width,this.canvasElement.height),this.renderP2World(),this.gameDom.getWindow().requestAnimationFrame(this.renderLoop.bind(this))}renderP2World(){let e=this.canvasContext;for(let t=0;t{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{let t=e?.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Scores messages queue on ScoresPlugin.",e),!1;s.processScoresMessagesQueue(t,this.scoresMessageListener)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in ScoresPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.scoresMessageListener}}},{"3b8c6a6b532efef7":"l5kMc","886a0d766603abc":"fpFc7",e89935d10dce4cba:"d0zyM",e991266a552fb051:"5oUd3",b0db3ae90acf0cc5:"beAgN",e0289d80f135b58e:"1fcQw","84d6714fa827e3e1":"fC3To",f46d2ddbf227db3d:"3lwy5"}],l5kMc:[function(e,t,i){let{ScoresConst:n}=e("fc16b961896d9e7e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/scores/templates/";e.load.html(n.KEY,t+"ui-scores.html"),e.load.html(n.TEMPLATES.SCORES_TABLE,t+"ui-scores-table.html")}}},{fc16b961896d9e7e:"5oUd3"}],"5oUd3":[function(e,t,i){let n="scores.";t.exports.ScoresConst={KEY:"scores",PREFIX:"sco",ACTIONS:{UPDATE:"scoUp",TOP_SCORES_UPDATE:"scoTops"},TEMPLATES:{SCORES_TABLE:"scoresTable"},MESSAGE:{DATA_VALUES:{NAMESPACE:"scores"}},SNIPPETS:{PREFIX:n,TITLE:n+"scoresTitle",CONTENT:n+"scoresContent",MY_SCORE:n+"myScore"}}},{}],fpFc7:[function(e,t,i){let{ScoresMessageHandler:n}=e("d156c5882f191e51"),{ScoresConst:r}=e("2e4cd336beabe6ca"),{Logger:s,sc:a}=e("aebac8790f258c87");t.exports.ScoresMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ScoresMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ScoresMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isScoresMessage(t)&&this.handleScoresMessage(t,r):this.isScoresMessage(t)?(i.scoresMessagesQueue||(i.scoresMessagesQueue=[]),i.scoresMessagesQueue.push(t),!0):(s.error("Invalid ScoresMessageHandler",r),!1)}handleScoresMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updatePlayerScore():r.ACTIONS.TOP_SCORES_UPDATE!==e.act||t.updateScoresBox()}isScoresMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{d156c5882f191e51:"e8G1n","2e4cd336beabe6ca":"5oUd3",aebac8790f258c87:"3lwy5"}],e8G1n:[function(e,t,i){let{UserInterface:n}=e("a45d421f329cd9bb"),{ScoresConst:r}=e("78e1225607fe67de"),{Logger:s,sc:a}=e("98287ac0824fa508");t.exports.ScoresMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on ScoresMessageHandler."),!1):(s.info("Missing message on ScoresMessageHandler."),!1):(s.info("Missing RoomEvents on ScoresMessageHandler."),!1)}createScoresUi(){let e=a.get(this.uiScene.userInterfaces,r.KEY);if(e)return e;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let t=new n(this.gameManager,{id:r.KEY,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/scores/templates/ui-scores.html",r.KEY);t.createUiElement(this.uiScene,r.KEY);let i=this.uiScene.elementsUi[r.KEY];if(!i)return s.error("Scores UI box not found.",{uiScores:t,uiBox:i}),!1;let o=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/title",r.SNIPPETS.TITLE)),h=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/content",r.SNIPPETS.CONTENT));return this.roomEvents.uiSetTitleAndContent(i,{title:o,content:h},this.uiScene),this.uiScene.userInterfaces[r.KEY]=t,this.uiScene.userInterfaces[r.KEY]}updatePlayerScore(){this.createScoresUi(r.KEY);let e=a.get(this.message,"newTotalScore",!1);if(!e){s.debug("Missing new total score on update message.");return}this.uiScene.currentPlayerScore=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}updateScoresBox(){this.createScoresUi(r.KEY);let e=a.get(this.message,"scores",!1);if(!e){s.debug("Missing scores data on message.");return}this.uiScene.scores=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}createContentsUpdate(){let e=this.uiScene.cache.html.get(r.TEMPLATES.SCORES_TABLE);if(!e)return s.error('Missing template "'+r.TEMPLATES.SCORES_TABLE+'".'),"";let t={scores:this.uiScene.scores,showCurrentPlayer:!0,currentPlayerScore:this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/myScore",r.SNIPPETS.MY_SCORE),{myScore:this.uiScene.currentPlayerScore||"0"})};return this.gameManager.gameEngine.parseTemplate(e,t)}}},{a45d421f329cd9bb:"bzImH","78e1225607fe67de":"5oUd3","98287ac0824fa508":"3lwy5"}],d0zyM:[function(e,t,i){let{ScoresMessageHandler:n}=e("45ab9844bbd919a8"),{sc:r}=e("d9c441fdb0377cf");t.exports.MessageProcessor=class{static processScoresMessagesQueue(e,t){if(r.isArray(e.scoresMessagesQueue)&&0!==e.scoresMessagesQueue.length){for(let i of e.scoresMessagesQueue)t.handleScoresMessage(i,new n({roomEvents:e,message:i}));e.scoresMessagesQueue=[]}}}},{"45ab9844bbd919a8":"e8G1n",d9c441fdb0377cf:"3lwy5"}],beAgN:[function(e,t,i){t.exports={scores:{scoresTitle:"Top Players Scores",scoresContent:"No scores available.",myScore:"My score: %myScore"}}},{}],"4p1ha":[function(e,t,i){let{PreloaderHandler:n}=e("efc9996b9ceaadce"),{MessageListener:r}=e("ef29ab05ba87fd5"),{MessageProcessor:s}=e("bd6312294795cf1c"),{RewardsConst:a}=e("a60c417cf40e6e4e"),o=e("702d39ed6c29ddf6"),{TranslationsMapper:h}=e("e6ea40ce120e2033"),{PluginInterface:c}=e("78f7099074cee28a"),{Logger:l,sc:u}=e("76d1b05ad0acce3a");t.exports.RewardsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.events=u.get(e,"events",!1),this.preloaderHandler=new n,this.messageListener=new r,this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.listenMessages(),l.debug("Plugin READY: Rewards"))}validateProperties(){return this.gameManager?!!this.events||(l.error("EventsManager undefined in RewardsPlugin."),!1):(l.error("Game Manager undefined in RewardsPlugin."),!1)}setTranslations(){if(!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,a.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events){l.error('EventsManager undefined in RewardsPlugin for "listenEvents".');return}this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{s.processRewardsMessagesQueue(e,this)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in RewardsPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.messageListener}}},{efc9996b9ceaadce:"8NCLg",ef29ab05ba87fd5:"jXzBf",bd6312294795cf1c:"h8UKT",a60c417cf40e6e4e:"lIgFH","702d39ed6c29ddf6":"carao",e6ea40ce120e2033:"1fcQw","78f7099074cee28a":"fC3To","76d1b05ad0acce3a":"3lwy5"}],"8NCLg":[function(e,t,i){let{RewardsConst:n}=e("c14067eab2e5b23e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/rewards/templates/";e.load.html(n.KEY,t+"ui-rewards.html"),e.load.html(n.TEMPLATES.REWARDS_LIST,t+"ui-rewards-list.html")}}},{c14067eab2e5b23e:"lIgFH"}],lIgFH:[function(e,t,i){let n="rewards.";t.exports.RewardsConst={KEY:"rewards",PREFIX:"rwd",ACTIONS:{INITIALIZE:"rwdIni",UPDATE:"rwdUp",ACCEPT_REWARD:"rwdAcpt",ACCEPTED_REWARD:"rwdAcpted"},SPLIT_EXPERIENCE:{ALL:0,PROPORTIONAL_BY_LEVEL:1},SPLIT_MODIFIER:{ALL:0,RANDOM:1},SPLIT_ITEMS:{DROP_KEEPS:0,RANDOM:1},MESSAGE:{DATA:{LABEL:"rlbl",DESCRIPTION:"rdes",POSITION:"rpos",SHOW_REWARD_IMAGE:"srimg",REWARD_IMAGE:"rimg",REWARD_IMAGE_PATH:"rimgp",EVENT_DATA:"redt",STATE_DATA:"resd",ITEMS_DATA:"rmid",ITEM_KEY:"rikey",ITEM_LABEL:"rilbl",ITEM_DESCRIPTION:"rides",ITEM_QUANTITY:"riqty"},DATA_VALUES:{NAMESPACE:"rewards"}},TEMPLATES:{REWARDS_LIST:"rewardsList"},SNIPPETS:{PREFIX:n,TITLE:n+"title",ACCEPTED_REWARD:n+"acceptedReward"}}},{}],jXzBf:[function(e,t,i){let{MessageHandler:n}=e("4d23f5e42478957c"),{RewardsConst:r}=e("bda46dc94809b55d"),{Logger:s,sc:a}=e("a4007c1db9e3ae27");t.exports.MessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on RewardsMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on RewardsMessageListener.",e),!1;if(!this.isRewardsMessage(t))return!1;let r=new n({roomEvents:i,message:t});return r.validate()?this.handleRewardsMessage(t,r):(i.rewardsMessagesQueue||(i.rewardsMessagesQueue=[]),i.rewardsMessagesQueue.push(t),!0)}handleRewardsMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updateRewardsBox():r.ACTIONS.ACCEPTED_REWARD!==e.act||t.showAcceptedReward()}isRewardsMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{"4d23f5e42478957c":"4T3oM",bda46dc94809b55d:"lIgFH",a4007c1db9e3ae27:"3lwy5"}],"4T3oM":[function(e,t,i){let{UserInterface:n}=e("8d4a3a8b8eeaff6"),{RewardsConst:r}=e("677bd2d65b92e557"),{GameConst:s}=e("7a270c9c6c08724"),{Logger:a,sc:o}=e("70b77844d02b2070");t.exports.MessageHandler=class{constructor(e){this.roomEvents=o.get(e,"roomEvents",!1),this.message=o.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.config=this.gameManager?.config,this.translator=this.gameManager?.services?.translator,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(a.info("Missing GameManager on RewardsMessageHandler."),!1):(a.info("Missing message on RewardsMessageHandler."),!1):(a.info("Missing RoomEvents on RewardsMessageHandler."),!1)}createRewardsUi(e){let t=o.get(this.uiScene.userInterfaces,e);if(t)return t;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let i=new n(this.gameManager,{id:e,type:e,defaultOpen:!0,defaultClose:!0},"/assets/features/rewards/templates/ui-rewards.html",e);i.createUiElement(this.uiScene,e),i.closeButton.addEventListener("click",()=>{this.gameDom.emptyElement(".accepted-reward")});let s=this.uiScene.elementsUi[e];if(!s)return a.error("Scores UI box not found.",{uiRewards:i,uiBox:s}),!1;let h=this.translator.t(this.config.getWithoutLogs("client/rewards/labels/title",r.SNIPPETS.TITLE));return this.roomEvents.uiSetTitleAndContent(s,{title:h},this.uiScene),this.uiScene.userInterfaces[e]=i,this.uiScene.userInterfaces[e]}updateRewardsBox(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"rewards",!1);if(!e){a.debug("Missing rewards data on message.");return}this.enrichForDisplay(e),this.uiScene.rewards=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene),this.showRewardsNotificationBalloon(),this.activateRewardsAction()}showAcceptedReward(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"acceptedReward",!1);if(!e){a.debug("Missing rewards on update message.");return}this.enrichForDisplay([e]),this.uiScene.acceptedReward=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene)}createUpdateContent(){let e=this.uiScene.cache.html.get(r.TEMPLATES.REWARDS_LIST);if(!e)return a.error('Missing template "'+r.TEMPLATES.REWARDS_LIST+'".'),"";let t=this.uiScene.acceptedReward,i=t?this.translator.t(this.config.getWithoutLogs("client/rewards/labels/acceptedReward",r.SNIPPETS.ACCEPTED_REWARD),{rewardLabel:t.translated.label}):"",n={rewards:this.uiScene.rewards,acceptedReward:t,acceptedRewardMessage:i};return this.gameManager.gameEngine.parseTemplate(e,n)}enrichForDisplay(e){for(let t of e){let e=this.translator.t(t[r.MESSAGE.DATA.DESCRIPTION]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});this.config.getWithoutLogs("client/rewards/labels/includeItemsDescription",!0)&&(e+=this.mapItemsText(t));let i=this.translator.t(t[r.MESSAGE.DATA.LABEL]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});t.translated={label:i,description:e};let n=t[r.MESSAGE.DATA.STATE_DATA];t.activeClass=n?.ready&&!n?.complete?"active":"inactive",t.showRewardImage=t[r.MESSAGE.DATA.SHOW_REWARD_IMAGE]||"",t.rewardImage=t[r.MESSAGE.DATA.REWARD_IMAGE]||"",t.rewardImagePath=t[r.MESSAGE.DATA.REWARD_IMAGE_PATH]||""}return e}mapItemsText(e){let t=this.config.getWithoutLogs("client/rewards/labels/itemsSeparator","
"),i=this.config.getWithoutLogs("client/rewards/labels/itemsTemplate","%label (%quantity)");return t+e[r.MESSAGE.DATA.ITEMS_DATA]?.map(e=>i=(i=i.replace("%label",e[r.MESSAGE.DATA.ITEM_LABEL])).replace("%quantity",e[r.MESSAGE.DATA.ITEM_QUANTITY])).join(t)}showRewardsNotificationBalloon(){let e=this.gameDom.getElement("#rewards-notification-balloon"),t=this.gameDom.getElements(".reward-active");if(e&&t&&0{this.gameManager.activeRoomEvents.send({[s.ACTION_KEY]:r.ACTIONS.ACCEPT_REWARD,id:e.dataset.rewardId})})}}},{"8d4a3a8b8eeaff6":"bzImH","677bd2d65b92e557":"lIgFH","7a270c9c6c08724":"93TbC","70b77844d02b2070":"3lwy5"}],h8UKT:[function(e,t,i){let{MessageHandler:n}=e("31470942304bd302"),{Logger:r,sc:s}=e("32739ae155fa16f3");t.exports.MessageProcessor=class{static processRewardsMessagesQueue(e,t){let i=e?.roomEvents;if(!i)return r.critical("RoomEvents undefined for process Rewards messages queue on RewardsPlugin.",e),!1;if(s.isArray(i.rewardsMessagesQueue)&&0!==i.rewardsMessagesQueue.length){for(let e of i.rewardsMessagesQueue)t.messageListener?.handleRewardsMessage(e,new n({roomEvents:i,message:e}));i.rewardsMessagesQueue=[]}}}},{"31470942304bd302":"4T3oM","32739ae155fa16f3":"3lwy5"}],carao:[function(e,t,i){t.exports={rewards:{title:"Rewards",dailyLogin:"Daily Login",dailyDescription:"Login every day and claim your reward",straightDaysLogin:"%loginCount Days Login",straightDaysDescription:"Login every day for %loginCount days and claim your reward",acceptedReward:'You accepted the "%rewardLabel" reward!'}}},{}],dkVHA:[function(e,t,i){let n=e("e6a5960c3a99bcc9").default,r=e("d306a7719b3b609a"),s=e("d3e0e9ccc057727d"),a=e("eb8d3da15fd6263e"),{ErrorsBlockHandler:o}=e("6645d49b0b5d816f"),{GameConst:h}=e("89df318e7a41c05a"),{ErrorManager:c,Logger:l,sc:u}=e("bf14904e4b931b12");t.exports.FirebaseConnector=class{constructor(e){e||c.error("FirebaseConnector - Missing game manager."),this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.analytics=r,this.app=n,this.firebaseAuth=s,this.ui=a,this.authUi=!1,this.isActive=!1,this.containerId="#firebaseui-auth-container",this.uiConfig={signInOptions:[{provider:this.firebaseAuth.GoogleAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.FacebookAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.GithubAuthProvider.PROVIDER_ID}],signInFlow:"popup"},this.gameManager.events.on("reldens.beforeJoinGame",e=>{"firebase-login"===e.formData.formId&&(e.gameManager.userData.isFirebaseLogin=!0)})}startFirebase(){let e=this.gameManager.appServerUrl+h.ROUTE_PATHS.FIREBASE;this.gameDom.getJSON(e,(e,t)=>{if(!t.enabled)return!1;let i=t.firebaseConfig;this.initAuth(i,this.uiConfig),this.gameDom.getWindow().addEventListener("beforeunload",()=>{this.isActive&&this.app.auth().signOut()}),this.app.auth().onAuthStateChanged(e=>(e?this.setActiveUser(e):this.startAuthUi(),!1));let n=this.gameDom.getElement("#firebase-login");n&&this.activateLoginBehavior(n)})}activateLoginBehavior(e){e.addEventListener("submit",t=>{if(t.preventDefault(),!e.checkValidity())return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden")});let t=this.gameDom.getElement("#firebase-username");if(!t)return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden"),t.addEventListener("change",()=>{o.reset(e)}),t.addEventListener("focus",()=>{o.reset(e)})}startAuthUi(){this.isActive=!1,this.gameDom.getElement(this.containerId)&&(this.gameDom.getElement(this.containerId).innerHTML=""),this.authUi.start(this.containerId,this.uiConfig)}setActiveUser(e){this.isActive=!0;let t={formId:"firebase-login",email:e.email,username:this.gameDom.getElement("#firebase-username").value,password:e.uid};this.gameManager.startGame(t,!0)}initAuth(e,t){if(!e||!t)return l.error("Missing firebase configuration."),!1;this.firebaseConfig=e,this.uiConfig=t,this.app.initializeApp(this.firebaseConfig),u.hasOwn(this.firebaseConfig,"measurementId")&&this.app.analytics(),this.authUi=new this.ui.auth.AuthUI(this.app.auth()),u.hasOwn(this.uiConfig,"callbacks")||(this.uiConfig.callbacks={}),u.hasOwn(this.uiConfig.callbacks,"signInSuccessWithAuthResult")||(this.uiConfig.callbacks.signInSuccessWithAuthResult=()=>!1)}}},{e6a5960c3a99bcc9:"llQKY",d306a7719b3b609a:"jiMXy",d3e0e9ccc057727d:"2s8iN",eb8d3da15fd6263e:"1Z3EC","6645d49b0b5d816f":"kzsmo","89df318e7a41c05a":"93TbC",bf14904e4b931b12:"3lwy5"}],llQKY:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>s.default);var r=e("@firebase/app-compat"),s=n.interopDefault(r);/** * @license * Copyright 2020 Google LLC * @@ -4876,7 +4876,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"CONSTANTS",()=>a),n.export(i,"DecodeBase64StringError",()=>d),n.export(i,"Deferred",()=>_),n.export(i,"ErrorFactory",()=>z),n.export(i,"FirebaseError",()=>H),n.export(i,"MAX_VALUE_MILLIS",()=>eT),n.export(i,"RANDOM_FACTOR",()=>eS),n.export(i,"Sha1",()=>el),n.export(i,"areCookiesEnabled",()=>Y),n.export(i,"assert",()=>o),n.export(i,"assertionError",()=>h),n.export(i,"async",()=>ef),n.export(i,"base64",()=>u),n.export(i,"base64Decode",()=>g),n.export(i,"base64Encode",()=>f),n.export(i,"base64urlEncodeWithoutPadding",()=>p),n.export(i,"calculateBackoffMillis",()=>eA),n.export(i,"contains",()=>et),n.export(i,"createMockUserToken",()=>I),n.export(i,"createSubscribe",()=>eu),n.export(i,"decode",()=>J),n.export(i,"deepCopy",()=>m),n.export(i,"deepEqual",()=>function e(t,i){if(t===i)return!0;let n=Object.keys(t),r=Object.keys(i);for(let s of n){if(!r.includes(s))return!1;let n=t[s],a=i[s];if(es(n)&&es(a)){if(!e(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}),n.export(i,"deepExtend",()=>v),n.export(i,"errorPrefix",()=>em),n.export(i,"extractQuerystring",()=>ec),n.export(i,"getDefaultAppConfig",()=>A),n.export(i,"getDefaultEmulatorHost",()=>T),n.export(i,"getDefaultEmulatorHostnameAndPort",()=>S),n.export(i,"getDefaults",()=>w),n.export(i,"getExperimentalSetting",()=>C),n.export(i,"getGlobal",()=>y),n.export(i,"getModularInstance",()=>e_),n.export(i,"getUA",()=>O),n.export(i,"isAdmin",()=>ee),n.export(i,"isBrowser",()=>R),n.export(i,"isBrowserExtension",()=>k),n.export(i,"isCloudflareWorker",()=>D),n.export(i,"isElectron",()=>F),n.export(i,"isEmpty",()=>en),n.export(i,"isIE",()=>B),n.export(i,"isIndexedDBAvailable",()=>j),n.export(i,"isMobileCordova",()=>P),n.export(i,"isNode",()=>M),n.export(i,"isNodeSdk",()=>V),n.export(i,"isReactNative",()=>N),n.export(i,"isSafari",()=>G),n.export(i,"isUWP",()=>U),n.export(i,"isValidFormat",()=>Z),n.export(i,"isValidTimestamp",()=>$),n.export(i,"isWebWorker",()=>L),n.export(i,"issuedAtTime",()=>Q),n.export(i,"jsonEval",()=>q),n.export(i,"map",()=>er),n.export(i,"ordinal",()=>eC),n.export(i,"promiseWithTimeout",()=>ea),n.export(i,"querystring",()=>eo),n.export(i,"querystringDecode",()=>eh),n.export(i,"safeGet",()=>ei),n.export(i,"stringLength",()=>eE),n.export(i,"stringToByteArray",()=>ex),n.export(i,"stringify",()=>K),n.export(i,"uuidv4",()=>ew),n.export(i,"validateArgCount",()=>eg),n.export(i,"validateCallback",()=>ey),n.export(i,"validateContextObject",()=>eb),n.export(i,"validateIndexedDBOpenable",()=>W),n.export(i,"validateNamespace",()=>ev);var r=arguments[3],s=e("d07263985281b344");let a={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw h(t)},h=function(e){return Error("Firebase Database ("+a.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},c=function(e){let t=[],i=0;for(let n=0;n>6|192:((64512&r)==55296&&n+1>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128)}return t},l=function(e){let t=[],i=0,n=0;for(;i191&&r<224){let s=e[i++];t[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){let s=((7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[i++],a=e[i++];t[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}}return t.join("")},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t>2,l=(3&r)<<4|a>>4,u=(15&a)<<2|h>>6,d=63&h;o||(d=64,s||(u=64)),n.push(i[c],i[l],i[u],i[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let i=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t>4;if(n.push(h),64!==a){let e=s<<4&240|a>>2;if(n.push(e),64!==o){let e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class d extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let f=function(e){let t=c(e);return u.encodeByteArray(t,!0)},p=function(e){return f(e).replace(/\./g,"")},g=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"CONSTANTS",()=>a),n.export(i,"DecodeBase64StringError",()=>d),n.export(i,"Deferred",()=>_),n.export(i,"ErrorFactory",()=>z),n.export(i,"FirebaseError",()=>H),n.export(i,"MAX_VALUE_MILLIS",()=>eT),n.export(i,"RANDOM_FACTOR",()=>eS),n.export(i,"Sha1",()=>el),n.export(i,"areCookiesEnabled",()=>Y),n.export(i,"assert",()=>o),n.export(i,"assertionError",()=>h),n.export(i,"async",()=>ef),n.export(i,"base64",()=>u),n.export(i,"base64Decode",()=>g),n.export(i,"base64Encode",()=>f),n.export(i,"base64urlEncodeWithoutPadding",()=>p),n.export(i,"calculateBackoffMillis",()=>eA),n.export(i,"contains",()=>et),n.export(i,"createMockUserToken",()=>I),n.export(i,"createSubscribe",()=>eu),n.export(i,"decode",()=>J),n.export(i,"deepCopy",()=>m),n.export(i,"deepEqual",()=>function e(t,i){if(t===i)return!0;let n=Object.keys(t),r=Object.keys(i);for(let s of n){if(!r.includes(s))return!1;let n=t[s],a=i[s];if(es(n)&&es(a)){if(!e(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}),n.export(i,"deepExtend",()=>v),n.export(i,"errorPrefix",()=>em),n.export(i,"extractQuerystring",()=>ec),n.export(i,"getDefaultAppConfig",()=>A),n.export(i,"getDefaultEmulatorHost",()=>T),n.export(i,"getDefaultEmulatorHostnameAndPort",()=>S),n.export(i,"getDefaults",()=>w),n.export(i,"getExperimentalSetting",()=>C),n.export(i,"getGlobal",()=>y),n.export(i,"getModularInstance",()=>e_),n.export(i,"getUA",()=>O),n.export(i,"isAdmin",()=>ee),n.export(i,"isBrowser",()=>R),n.export(i,"isBrowserExtension",()=>k),n.export(i,"isCloudflareWorker",()=>D),n.export(i,"isElectron",()=>F),n.export(i,"isEmpty",()=>en),n.export(i,"isIE",()=>B),n.export(i,"isIndexedDBAvailable",()=>j),n.export(i,"isMobileCordova",()=>P),n.export(i,"isNode",()=>M),n.export(i,"isNodeSdk",()=>V),n.export(i,"isReactNative",()=>N),n.export(i,"isSafari",()=>G),n.export(i,"isUWP",()=>U),n.export(i,"isValidFormat",()=>Z),n.export(i,"isValidTimestamp",()=>$),n.export(i,"isWebWorker",()=>L),n.export(i,"issuedAtTime",()=>Q),n.export(i,"jsonEval",()=>K),n.export(i,"map",()=>er),n.export(i,"ordinal",()=>eC),n.export(i,"promiseWithTimeout",()=>ea),n.export(i,"querystring",()=>eo),n.export(i,"querystringDecode",()=>eh),n.export(i,"safeGet",()=>ei),n.export(i,"stringLength",()=>eE),n.export(i,"stringToByteArray",()=>ex),n.export(i,"stringify",()=>q),n.export(i,"uuidv4",()=>ew),n.export(i,"validateArgCount",()=>eg),n.export(i,"validateCallback",()=>ey),n.export(i,"validateContextObject",()=>eb),n.export(i,"validateIndexedDBOpenable",()=>W),n.export(i,"validateNamespace",()=>ev);var r=arguments[3],s=e("d07263985281b344");let a={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw h(t)},h=function(e){return Error("Firebase Database ("+a.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},c=function(e){let t=[],i=0;for(let n=0;n>6|192:((64512&r)==55296&&n+1>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128)}return t},l=function(e){let t=[],i=0,n=0;for(;i191&&r<224){let s=e[i++];t[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){let s=((7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[i++],a=e[i++];t[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}}return t.join("")},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t>2,l=(3&r)<<4|a>>4,u=(15&a)<<2|h>>6,d=63&h;o||(d=64,s||(u=64)),n.push(i[c],i[l],i[u],i[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let i=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t>4;if(n.push(h),64!==a){let e=s<<4&240|a>>2;if(n.push(e),64!==o){let e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class d extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let f=function(e){let t=c(e);return u.encodeByteArray(t,!0)},p=function(e){return f(e).replace(/\./g,"")},g=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2017 Google LLC * @@ -4981,7 +4981,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function q(e){return JSON.parse(e)}function K(e){return JSON.stringify(e)}/** + */function K(e){return JSON.parse(e)}function q(e){return JSON.stringify(e)}/** * @license * Copyright 2017 Google LLC * @@ -4996,7 +4996,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let J=function(e){let t={},i={},n={},r="";try{let s=e.split(".");t=q(g(s[0])||""),i=q(g(s[1])||""),r=s[2],n=i.d||{},delete i.d}catch(e){}return{header:t,claims:i,data:n,signature:r}},$=function(e){let t=J(e).claims,i=Math.floor(new Date().getTime()/1e3),n=0,r=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),r=t.hasOwnProperty("exp")?t.exp:n+86400),!!i&&!!n&&!!r&&i>=n&&i<=r},Q=function(e){let t=J(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},Z=function(e){let t=J(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},ee=function(e){let t=J(e).claims;return"object"==typeof t&&!0===t.admin};/** + */let J=function(e){let t={},i={},n={},r="";try{let s=e.split(".");t=K(g(s[0])||""),i=K(g(s[1])||""),r=s[2],n=i.d||{},delete i.d}catch(e){}return{header:t,claims:i,data:n,signature:r}},$=function(e){let t=J(e).claims,i=Math.floor(new Date().getTime()/1e3),n=0,r=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),r=t.hasOwnProperty("exp")?t.exp:n+86400),!!i&&!!n&&!!r&&i>=n&&i<=r},Q=function(e){let t=J(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},Z=function(e){let t=J(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},ee=function(e){let t=J(e).claims;return"object"==typeof t&&!0===t.admin};/** * @license * Copyright 2017 Google LLC * @@ -5266,7 +5266,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let u=e=>new l(e.getProvider("app-compat").getImmediate(),e.getProvider("analytics").getImmediate());function d(){let e={Analytics:l,settings:h.settings,isSupported:h.isSupported,EventName:r};(0,o.default).INTERNAL.registerComponent(new(0,c.Component)("analytics-compat",u,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}d(),(0,o.default).registerVersion("@firebase/analytics-compat","0.2.14")},{"@firebase/app-compat":"9Npvu","@firebase/analytics":"d71wp","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],d71wp:[function(e,t,i){let n,r,s,a;var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"getAnalytics",()=>G),o.export(i,"getGoogleAnalyticsClientId",()=>H),o.export(i,"initializeAnalytics",()=>j),o.export(i,"isSupported",()=>W),o.export(i,"logEvent",()=>J),o.export(i,"setAnalyticsCollectionEnabled",()=>q),o.export(i,"setConsent",()=>$),o.export(i,"setCurrentScreen",()=>Y),o.export(i,"setDefaultEventParameters",()=>K),o.export(i,"setUserId",()=>z),o.export(i,"setUserProperties",()=>X),o.export(i,"settings",()=>V);var h=e("@firebase/app"),c=e("@firebase/logger"),l=e("@firebase/util"),u=e("@firebase/component");e("@firebase/installations");/** + */let u=e=>new l(e.getProvider("app-compat").getImmediate(),e.getProvider("analytics").getImmediate());function d(){let e={Analytics:l,settings:h.settings,isSupported:h.isSupported,EventName:r};(0,o.default).INTERNAL.registerComponent(new(0,c.Component)("analytics-compat",u,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}d(),(0,o.default).registerVersion("@firebase/analytics-compat","0.2.14")},{"@firebase/app-compat":"9Npvu","@firebase/analytics":"d71wp","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],d71wp:[function(e,t,i){let n,r,s,a;var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"getAnalytics",()=>G),o.export(i,"getGoogleAnalyticsClientId",()=>H),o.export(i,"initializeAnalytics",()=>j),o.export(i,"isSupported",()=>W),o.export(i,"logEvent",()=>J),o.export(i,"setAnalyticsCollectionEnabled",()=>K),o.export(i,"setConsent",()=>$),o.export(i,"setCurrentScreen",()=>Y),o.export(i,"setDefaultEventParameters",()=>q),o.export(i,"setUserId",()=>z),o.export(i,"setUserProperties",()=>X),o.export(i,"settings",()=>V);var h=e("@firebase/app"),c=e("@firebase/logger"),l=e("@firebase/util"),u=e("@firebase/component");e("@firebase/installations");/** * @license * Copyright 2019 Google LLC * @@ -5326,7 +5326,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class L{constructor(e){this.app=e}_delete(){return delete D[this.app.options.appId],Promise.resolve()}}let D={},k=[],N={},F="dataLayer",B="gtag",U=!1;function V(e){if(U)throw g.create("already-initialized");e.dataLayerName&&(F=e.dataLayerName),e.gtagName&&(B=e.gtagName)}function G(e=(0,h.getApp)()){e=(0,l.getModularInstance)(e);let t=(0,h._getProvider)(e,d);return t.isInitialized()?t.getImmediate():j(e)}function j(e,t={}){let i=(0,h._getProvider)(e,d);if(i.isInitialized()){let e=i.getImmediate();if((0,l.deepEqual)(t,i.getOptions()))return e;throw g.create("already-initialized")}return i.initialize({options:t})}async function W(){if((0,l.isBrowserExtension)()||!(0,l.areCookiesEnabled)()||!(0,l.isIndexedDBAvailable)())return!1;try{return await (0,l.validateIndexedDBOpenable)()}catch(e){return!1}}function Y(e,t,i){e=(0,l.getModularInstance)(e),C(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}async function H(e){return e=(0,l.getModularInstance)(e),O(a,D[e.app.options.appId])}function z(e,t,i){e=(0,l.getModularInstance)(e),_(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function X(e,t,i){e=(0,l.getModularInstance)(e),I(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function q(e,t){P(D[(e=(0,l.getModularInstance)(e)).app.options.appId],t).catch(e=>p.error(e))}function K(e){a?a("set",e):n=e}function J(e,t,i,n){e=(0,l.getModularInstance)(e),A(a,D[e.app.options.appId],t,i,n).catch(e=>p.error(e))}function $(e){a?a("consent","update",e):r=e}let Q="@firebase/analytics",Z="0.10.8";(0,h._registerComponent)(new u.Component(d,(e,{options:t})=>(function(e,t,i){!function(){let e=[];if((0,l.isBrowserExtension)()&&e.push("This is a browser extension environment."),(0,l.areCookiesEnabled)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),i=g.create("invalid-analytics-context",{errorInfo:t});p.warn(i.message)}}();let n=e.options.appId;if(!n)throw g.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)p.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw g.create("no-api-key")}if(null!=D[n])throw g.create("already-exists",{id:n});if(!U){var r,o,h,c;let e,t;r=F,e=[],Array.isArray(window[r])?e=window[r]:window[r]=e;let{wrappedGtag:i,gtagCore:n}=(o=F,h=B,t=function(...e){window[o].push(arguments)},window[h]&&"function"==typeof window[h]&&(t=window[h]),window[h]=(c=t,async function(e,...t){try{if("event"===e){let[e,i]=t;await b(c,D,k,e,i)}else if("config"===e){let[e,i]=t;await y(c,D,k,N,e,i)}else if("consent"===e){let[e,i]=t;c("consent",e,i)}else if("get"===e){let[e,i,n]=t;c("get",e,i,n)}else if("set"===e){let[e]=t;c("set",e)}else c(e,...t)}catch(e){p.error(e)}}),{gtagCore:t,wrappedGtag:window[h]});a=i,s=n,U=!0}return D[n]=R(e,k,N,t,s,F,i),new L(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),(0,h._registerComponent)(new u.Component("analytics-internal",function(e){try{let t=e.getProvider(d).getImmediate();return{logEvent:(e,i,n)=>J(t,e,i,n)}}catch(e){throw g.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),(0,h.registerVersion)(Q,Z),(0,h.registerVersion)(Q,Z,"esm2017")},{"@firebase/app":"hZODh","@firebase/logger":"7RF90","@firebase/util":"j1gcd","@firebase/component":"dVjVM","@firebase/installations":"fWFBI","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],fWFBI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"deleteInstallations",()=>$),n.export(i,"getId",()=>X),n.export(i,"getInstallations",()=>Z),n.export(i,"getToken",()=>q),n.export(i,"onIdChange",()=>Q);var r=e("@firebase/app"),s=e("@firebase/component"),a=e("@firebase/util"),o=e("idb");let h="@firebase/installations",c="0.6.9",l=`w:${c}`,u="FIS_v2",d=new a.ErrorFactory("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function f(e){return e instanceof a.FirebaseError&&e.code.includes("request-failed")}/** + */class L{constructor(e){this.app=e}_delete(){return delete D[this.app.options.appId],Promise.resolve()}}let D={},k=[],N={},F="dataLayer",B="gtag",U=!1;function V(e){if(U)throw g.create("already-initialized");e.dataLayerName&&(F=e.dataLayerName),e.gtagName&&(B=e.gtagName)}function G(e=(0,h.getApp)()){e=(0,l.getModularInstance)(e);let t=(0,h._getProvider)(e,d);return t.isInitialized()?t.getImmediate():j(e)}function j(e,t={}){let i=(0,h._getProvider)(e,d);if(i.isInitialized()){let e=i.getImmediate();if((0,l.deepEqual)(t,i.getOptions()))return e;throw g.create("already-initialized")}return i.initialize({options:t})}async function W(){if((0,l.isBrowserExtension)()||!(0,l.areCookiesEnabled)()||!(0,l.isIndexedDBAvailable)())return!1;try{return await (0,l.validateIndexedDBOpenable)()}catch(e){return!1}}function Y(e,t,i){e=(0,l.getModularInstance)(e),C(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}async function H(e){return e=(0,l.getModularInstance)(e),O(a,D[e.app.options.appId])}function z(e,t,i){e=(0,l.getModularInstance)(e),_(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function X(e,t,i){e=(0,l.getModularInstance)(e),I(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function K(e,t){P(D[(e=(0,l.getModularInstance)(e)).app.options.appId],t).catch(e=>p.error(e))}function q(e){a?a("set",e):n=e}function J(e,t,i,n){e=(0,l.getModularInstance)(e),A(a,D[e.app.options.appId],t,i,n).catch(e=>p.error(e))}function $(e){a?a("consent","update",e):r=e}let Q="@firebase/analytics",Z="0.10.8";(0,h._registerComponent)(new u.Component(d,(e,{options:t})=>(function(e,t,i){!function(){let e=[];if((0,l.isBrowserExtension)()&&e.push("This is a browser extension environment."),(0,l.areCookiesEnabled)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),i=g.create("invalid-analytics-context",{errorInfo:t});p.warn(i.message)}}();let n=e.options.appId;if(!n)throw g.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)p.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw g.create("no-api-key")}if(null!=D[n])throw g.create("already-exists",{id:n});if(!U){var r,o,h,c;let e,t;r=F,e=[],Array.isArray(window[r])?e=window[r]:window[r]=e;let{wrappedGtag:i,gtagCore:n}=(o=F,h=B,t=function(...e){window[o].push(arguments)},window[h]&&"function"==typeof window[h]&&(t=window[h]),window[h]=(c=t,async function(e,...t){try{if("event"===e){let[e,i]=t;await b(c,D,k,e,i)}else if("config"===e){let[e,i]=t;await y(c,D,k,N,e,i)}else if("consent"===e){let[e,i]=t;c("consent",e,i)}else if("get"===e){let[e,i,n]=t;c("get",e,i,n)}else if("set"===e){let[e]=t;c("set",e)}else c(e,...t)}catch(e){p.error(e)}}),{gtagCore:t,wrappedGtag:window[h]});a=i,s=n,U=!0}return D[n]=R(e,k,N,t,s,F,i),new L(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),(0,h._registerComponent)(new u.Component("analytics-internal",function(e){try{let t=e.getProvider(d).getImmediate();return{logEvent:(e,i,n)=>J(t,e,i,n)}}catch(e){throw g.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),(0,h.registerVersion)(Q,Z),(0,h.registerVersion)(Q,Z,"esm2017")},{"@firebase/app":"hZODh","@firebase/logger":"7RF90","@firebase/util":"j1gcd","@firebase/component":"dVjVM","@firebase/installations":"fWFBI","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],fWFBI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"deleteInstallations",()=>$),n.export(i,"getId",()=>X),n.export(i,"getInstallations",()=>Z),n.export(i,"getToken",()=>K),n.export(i,"onIdChange",()=>Q);var r=e("@firebase/app"),s=e("@firebase/component"),a=e("@firebase/util"),o=e("idb");let h="@firebase/installations",c="0.6.9",l=`w:${c}`,u="FIS_v2",d=new a.ErrorFactory("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function f(e){return e instanceof a.FirebaseError&&e.code.includes("request-failed")}/** * @license * Copyright 2019 Google LLC * @@ -5491,7 +5491,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function q(e,t=!1){return await K(e),(await j(e,t)).token}async function K(e){let{registrationPromise:t}=await N(e);t&&await t}/** + */async function K(e,t=!1){return await q(e),(await j(e,t)).token}async function q(e){let{registrationPromise:t}=await N(e);t&&await t}/** * @license * Copyright 2019 Google LLC * @@ -5581,7 +5581,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function(e){if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw ee(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=(0,r._getProvider)(t,"heartbeat");return{app:t,appConfig:i,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,r._registerComponent)(new s.Component("installations-internal",e=>{let t=e.getProvider("app").getImmediate(),i=(0,r._getProvider)(t,et).getImmediate();return{getId:()=>X(i),getToken:e=>q(i,e)}},"PRIVATE")),(0,r.registerVersion)(h,c),(0,r.registerVersion)(h,c,"esm2017")},{"@firebase/app":"hZODh","@firebase/component":"dVjVM","@firebase/util":"j1gcd",idb:"4zejX","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"2s8iN":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var r=e("@firebase/auth");n.exportAll(r,i)},{"@firebase/auth":"7aHdK","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"7aHdK":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"ActionCodeOperation",()=>r.A),n.export(i,"ActionCodeURL",()=>r.ai),n.export(i,"AuthCredential",()=>r.L),n.export(i,"AuthErrorCodes",()=>r.I),n.export(i,"EmailAuthCredential",()=>r.M),n.export(i,"EmailAuthProvider",()=>r.V),n.export(i,"FacebookAuthProvider",()=>r.W),n.export(i,"FactorId",()=>r.F),n.export(i,"GithubAuthProvider",()=>r.Y),n.export(i,"GoogleAuthProvider",()=>r.X),n.export(i,"OAuthCredential",()=>r.N),n.export(i,"OAuthProvider",()=>r.Z),n.export(i,"OperationType",()=>r.O),n.export(i,"PhoneAuthCredential",()=>r.Q),n.export(i,"PhoneAuthProvider",()=>r.P),n.export(i,"PhoneMultiFactorGenerator",()=>r.m),n.export(i,"ProviderId",()=>r.p),n.export(i,"RecaptchaVerifier",()=>r.R),n.export(i,"SAMLAuthProvider",()=>r._),n.export(i,"SignInMethod",()=>r.S),n.export(i,"TotpMultiFactorGenerator",()=>r.T),n.export(i,"TotpSecret",()=>r.n),n.export(i,"TwitterAuthProvider",()=>r.$),n.export(i,"applyActionCode",()=>r.a7),n.export(i,"beforeAuthStateChanged",()=>r.x),n.export(i,"browserLocalPersistence",()=>r.b),n.export(i,"browserPopupRedirectResolver",()=>r.k),n.export(i,"browserSessionPersistence",()=>r.a),n.export(i,"checkActionCode",()=>r.a8),n.export(i,"confirmPasswordReset",()=>r.a6),n.export(i,"connectAuthEmulator",()=>r.K),n.export(i,"createUserWithEmailAndPassword",()=>r.aa),n.export(i,"debugErrorMap",()=>r.G),n.export(i,"deleteUser",()=>r.E),n.export(i,"fetchSignInMethodsForEmail",()=>r.af),n.export(i,"getAdditionalUserInfo",()=>r.aq),n.export(i,"getAuth",()=>r.o),n.export(i,"getIdToken",()=>r.an),n.export(i,"getIdTokenResult",()=>r.ao),n.export(i,"getMultiFactorResolver",()=>r.as),n.export(i,"getRedirectResult",()=>r.j),n.export(i,"inMemoryPersistence",()=>r.U),n.export(i,"indexedDBLocalPersistence",()=>r.i),n.export(i,"initializeAuth",()=>r.J),n.export(i,"initializeRecaptchaConfig",()=>r.t),n.export(i,"isSignInWithEmailLink",()=>r.ad),n.export(i,"linkWithCredential",()=>r.a2),n.export(i,"linkWithPhoneNumber",()=>r.l),n.export(i,"linkWithPopup",()=>r.d),n.export(i,"linkWithRedirect",()=>r.g),n.export(i,"multiFactor",()=>r.at),n.export(i,"onAuthStateChanged",()=>r.y),n.export(i,"onIdTokenChanged",()=>r.w),n.export(i,"parseActionCodeURL",()=>r.aj),n.export(i,"prodErrorMap",()=>r.H),n.export(i,"reauthenticateWithCredential",()=>r.a3),n.export(i,"reauthenticateWithPhoneNumber",()=>r.r),n.export(i,"reauthenticateWithPopup",()=>r.e),n.export(i,"reauthenticateWithRedirect",()=>r.h),n.export(i,"reload",()=>r.ar),n.export(i,"revokeAccessToken",()=>r.D),n.export(i,"sendEmailVerification",()=>r.ag),n.export(i,"sendPasswordResetEmail",()=>r.a5),n.export(i,"sendSignInLinkToEmail",()=>r.ac),n.export(i,"setPersistence",()=>r.q),n.export(i,"signInAnonymously",()=>r.a0),n.export(i,"signInWithCredential",()=>r.a1),n.export(i,"signInWithCustomToken",()=>r.a4),n.export(i,"signInWithEmailAndPassword",()=>r.ab),n.export(i,"signInWithEmailLink",()=>r.ae),n.export(i,"signInWithPhoneNumber",()=>r.s),n.export(i,"signInWithPopup",()=>r.c),n.export(i,"signInWithRedirect",()=>r.f),n.export(i,"signOut",()=>r.C),n.export(i,"unlink",()=>r.ap),n.export(i,"updateCurrentUser",()=>r.B),n.export(i,"updateEmail",()=>r.al),n.export(i,"updatePassword",()=>r.am),n.export(i,"updatePhoneNumber",()=>r.u),n.export(i,"updateProfile",()=>r.ak),n.export(i,"useDeviceLanguage",()=>r.z),n.export(i,"validatePassword",()=>r.v),n.export(i,"verifyBeforeUpdateEmail",()=>r.ah),n.export(i,"verifyPasswordResetCode",()=>r.a9);var r=e("./index-68602d24.js");e("@firebase/app"),e("@firebase/util"),e("@firebase/logger"),e("tslib"),e("@firebase/component")},{"./index-68602d24.js":"gWuQ9","@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],gWuQ9:[function(e,t,i){var n,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"$",()=>tE),r.export(i,"A",()=>p),r.export(i,"B",()=>ig),r.export(i,"C",()=>im),r.export(i,"D",()=>iv),r.export(i,"E",()=>iy),r.export(i,"F",()=>l),r.export(i,"G",()=>m),r.export(i,"H",()=>v),r.export(i,"I",()=>b),r.export(i,"J",()=>eq),r.export(i,"K",()=>eK),r.export(i,"L",()=>eQ),r.export(i,"M",()=>tt),r.export(i,"N",()=>tn),r.export(i,"O",()=>f),r.export(i,"P",()=>i8),r.export(i,"Q",()=>tc),r.export(i,"R",()=>i2),r.export(i,"S",()=>d),r.export(i,"T",()=>n$),r.export(i,"U",()=>ex),r.export(i,"V",()=>td),r.export(i,"W",()=>tm),r.export(i,"X",()=>tv),r.export(i,"Y",()=>ty),r.export(i,"Z",()=>tg),r.export(i,"_",()=>tx),r.export(i,"a",()=>iP),r.export(i,"a0",()=>tA),r.export(i,"a1",()=>tD),r.export(i,"a2",()=>tk),r.export(i,"a3",()=>tN),r.export(i,"a4",()=>tB),r.export(i,"a5",()=>tY),r.export(i,"a6",()=>tH),r.export(i,"a7",()=>tz),r.export(i,"a8",()=>tX),r.export(i,"a9",()=>tq),r.export(i,"aA",()=>eR),r.export(i,"aB",()=>T),r.export(i,"aC",()=>I),r.export(i,"aD",()=>nI),r.export(i,"aE",()=>ey),r.export(i,"aF",()=>eE),r.export(i,"aG",()=>nC),r.export(i,"aH",()=>nm),r.export(i,"aI",()=>ng),r.export(i,"aJ",()=>eU),r.export(i,"aK",()=>em),r.export(i,"aL",()=>eB),r.export(i,"aM",()=>eD),r.export(i,"aN",()=>iR),r.export(i,"aO",()=>nW),r.export(i,"aP",()=>N),r.export(i,"aQ",()=>tb),r.export(i,"aa",()=>tK),r.export(i,"ab",()=>tJ),r.export(i,"ac",()=>t$),r.export(i,"ad",()=>tQ),r.export(i,"ae",()=>tZ),r.export(i,"af",()=>t1),r.export(i,"ag",()=>t2),r.export(i,"ah",()=>t3),r.export(i,"ai",()=>tl),r.export(i,"aj",()=>tu),r.export(i,"ak",()=>t4),r.export(i,"al",()=>t9),r.export(i,"am",()=>t6),r.export(i,"an",()=>et),r.export(i,"ao",()=>ei),r.export(i,"ap",()=>tO),r.export(i,"aq",()=>ia),r.export(i,"ar",()=>el),r.export(i,"as",()=>iE),r.export(i,"at",()=>iS),r.export(i,"au",()=>P),r.export(i,"av",()=>eM),r.export(i,"aw",()=>eI),r.export(i,"ax",()=>w),r.export(i,"ay",()=>nH),r.export(i,"az",()=>nM),r.export(i,"b",()=>iI),r.export(i,"c",()=>no),r.export(i,"d",()=>nc),r.export(i,"e",()=>nh),r.export(i,"f",()=>nb),r.export(i,"g",()=>nT),r.export(i,"h",()=>nE),r.export(i,"i",()=>iX),r.export(i,"j",()=>nA),r.export(i,"k",()=>nX),r.export(i,"l",()=>i4),r.export(i,"m",()=>nJ),r.export(i,"n",()=>nZ),r.export(i,"o",()=>n6),r.export(i,"p",()=>u),r.export(i,"q",()=>io),r.export(i,"r",()=>i9),r.export(i,"s",()=>i5),r.export(i,"t",()=>ih),r.export(i,"u",()=>i7),r.export(i,"v",()=>ic),r.export(i,"w",()=>il),r.export(i,"x",()=>iu),r.export(i,"y",()=>id),r.export(i,"z",()=>ip);var s=e("@firebase/app"),a=e("@firebase/util"),o=e("@firebase/logger"),h=e("tslib"),c=e("@firebase/component");/** + */function(e){if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw ee(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=(0,r._getProvider)(t,"heartbeat");return{app:t,appConfig:i,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,r._registerComponent)(new s.Component("installations-internal",e=>{let t=e.getProvider("app").getImmediate(),i=(0,r._getProvider)(t,et).getImmediate();return{getId:()=>X(i),getToken:e=>K(i,e)}},"PRIVATE")),(0,r.registerVersion)(h,c),(0,r.registerVersion)(h,c,"esm2017")},{"@firebase/app":"hZODh","@firebase/component":"dVjVM","@firebase/util":"j1gcd",idb:"4zejX","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"2s8iN":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var r=e("@firebase/auth");n.exportAll(r,i)},{"@firebase/auth":"7aHdK","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"7aHdK":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"ActionCodeOperation",()=>r.A),n.export(i,"ActionCodeURL",()=>r.ai),n.export(i,"AuthCredential",()=>r.L),n.export(i,"AuthErrorCodes",()=>r.I),n.export(i,"EmailAuthCredential",()=>r.M),n.export(i,"EmailAuthProvider",()=>r.V),n.export(i,"FacebookAuthProvider",()=>r.W),n.export(i,"FactorId",()=>r.F),n.export(i,"GithubAuthProvider",()=>r.Y),n.export(i,"GoogleAuthProvider",()=>r.X),n.export(i,"OAuthCredential",()=>r.N),n.export(i,"OAuthProvider",()=>r.Z),n.export(i,"OperationType",()=>r.O),n.export(i,"PhoneAuthCredential",()=>r.Q),n.export(i,"PhoneAuthProvider",()=>r.P),n.export(i,"PhoneMultiFactorGenerator",()=>r.m),n.export(i,"ProviderId",()=>r.p),n.export(i,"RecaptchaVerifier",()=>r.R),n.export(i,"SAMLAuthProvider",()=>r._),n.export(i,"SignInMethod",()=>r.S),n.export(i,"TotpMultiFactorGenerator",()=>r.T),n.export(i,"TotpSecret",()=>r.n),n.export(i,"TwitterAuthProvider",()=>r.$),n.export(i,"applyActionCode",()=>r.a7),n.export(i,"beforeAuthStateChanged",()=>r.x),n.export(i,"browserLocalPersistence",()=>r.b),n.export(i,"browserPopupRedirectResolver",()=>r.k),n.export(i,"browserSessionPersistence",()=>r.a),n.export(i,"checkActionCode",()=>r.a8),n.export(i,"confirmPasswordReset",()=>r.a6),n.export(i,"connectAuthEmulator",()=>r.K),n.export(i,"createUserWithEmailAndPassword",()=>r.aa),n.export(i,"debugErrorMap",()=>r.G),n.export(i,"deleteUser",()=>r.E),n.export(i,"fetchSignInMethodsForEmail",()=>r.af),n.export(i,"getAdditionalUserInfo",()=>r.aq),n.export(i,"getAuth",()=>r.o),n.export(i,"getIdToken",()=>r.an),n.export(i,"getIdTokenResult",()=>r.ao),n.export(i,"getMultiFactorResolver",()=>r.as),n.export(i,"getRedirectResult",()=>r.j),n.export(i,"inMemoryPersistence",()=>r.U),n.export(i,"indexedDBLocalPersistence",()=>r.i),n.export(i,"initializeAuth",()=>r.J),n.export(i,"initializeRecaptchaConfig",()=>r.t),n.export(i,"isSignInWithEmailLink",()=>r.ad),n.export(i,"linkWithCredential",()=>r.a2),n.export(i,"linkWithPhoneNumber",()=>r.l),n.export(i,"linkWithPopup",()=>r.d),n.export(i,"linkWithRedirect",()=>r.g),n.export(i,"multiFactor",()=>r.at),n.export(i,"onAuthStateChanged",()=>r.y),n.export(i,"onIdTokenChanged",()=>r.w),n.export(i,"parseActionCodeURL",()=>r.aj),n.export(i,"prodErrorMap",()=>r.H),n.export(i,"reauthenticateWithCredential",()=>r.a3),n.export(i,"reauthenticateWithPhoneNumber",()=>r.r),n.export(i,"reauthenticateWithPopup",()=>r.e),n.export(i,"reauthenticateWithRedirect",()=>r.h),n.export(i,"reload",()=>r.ar),n.export(i,"revokeAccessToken",()=>r.D),n.export(i,"sendEmailVerification",()=>r.ag),n.export(i,"sendPasswordResetEmail",()=>r.a5),n.export(i,"sendSignInLinkToEmail",()=>r.ac),n.export(i,"setPersistence",()=>r.q),n.export(i,"signInAnonymously",()=>r.a0),n.export(i,"signInWithCredential",()=>r.a1),n.export(i,"signInWithCustomToken",()=>r.a4),n.export(i,"signInWithEmailAndPassword",()=>r.ab),n.export(i,"signInWithEmailLink",()=>r.ae),n.export(i,"signInWithPhoneNumber",()=>r.s),n.export(i,"signInWithPopup",()=>r.c),n.export(i,"signInWithRedirect",()=>r.f),n.export(i,"signOut",()=>r.C),n.export(i,"unlink",()=>r.ap),n.export(i,"updateCurrentUser",()=>r.B),n.export(i,"updateEmail",()=>r.al),n.export(i,"updatePassword",()=>r.am),n.export(i,"updatePhoneNumber",()=>r.u),n.export(i,"updateProfile",()=>r.ak),n.export(i,"useDeviceLanguage",()=>r.z),n.export(i,"validatePassword",()=>r.v),n.export(i,"verifyBeforeUpdateEmail",()=>r.ah),n.export(i,"verifyPasswordResetCode",()=>r.a9);var r=e("./index-68602d24.js");e("@firebase/app"),e("@firebase/util"),e("@firebase/logger"),e("tslib"),e("@firebase/component")},{"./index-68602d24.js":"gWuQ9","@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],gWuQ9:[function(e,t,i){var n,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"$",()=>tE),r.export(i,"A",()=>p),r.export(i,"B",()=>ig),r.export(i,"C",()=>im),r.export(i,"D",()=>iv),r.export(i,"E",()=>iy),r.export(i,"F",()=>l),r.export(i,"G",()=>m),r.export(i,"H",()=>v),r.export(i,"I",()=>b),r.export(i,"J",()=>eK),r.export(i,"K",()=>eq),r.export(i,"L",()=>eQ),r.export(i,"M",()=>tt),r.export(i,"N",()=>tn),r.export(i,"O",()=>f),r.export(i,"P",()=>i8),r.export(i,"Q",()=>tc),r.export(i,"R",()=>i2),r.export(i,"S",()=>d),r.export(i,"T",()=>n$),r.export(i,"U",()=>ex),r.export(i,"V",()=>td),r.export(i,"W",()=>tm),r.export(i,"X",()=>tv),r.export(i,"Y",()=>ty),r.export(i,"Z",()=>tg),r.export(i,"_",()=>tx),r.export(i,"a",()=>iP),r.export(i,"a0",()=>tA),r.export(i,"a1",()=>tD),r.export(i,"a2",()=>tk),r.export(i,"a3",()=>tN),r.export(i,"a4",()=>tB),r.export(i,"a5",()=>tY),r.export(i,"a6",()=>tH),r.export(i,"a7",()=>tz),r.export(i,"a8",()=>tX),r.export(i,"a9",()=>tK),r.export(i,"aA",()=>eR),r.export(i,"aB",()=>T),r.export(i,"aC",()=>I),r.export(i,"aD",()=>nI),r.export(i,"aE",()=>ey),r.export(i,"aF",()=>eE),r.export(i,"aG",()=>nC),r.export(i,"aH",()=>nm),r.export(i,"aI",()=>ng),r.export(i,"aJ",()=>eU),r.export(i,"aK",()=>em),r.export(i,"aL",()=>eB),r.export(i,"aM",()=>eD),r.export(i,"aN",()=>iR),r.export(i,"aO",()=>nW),r.export(i,"aP",()=>N),r.export(i,"aQ",()=>tb),r.export(i,"aa",()=>tq),r.export(i,"ab",()=>tJ),r.export(i,"ac",()=>t$),r.export(i,"ad",()=>tQ),r.export(i,"ae",()=>tZ),r.export(i,"af",()=>t1),r.export(i,"ag",()=>t2),r.export(i,"ah",()=>t3),r.export(i,"ai",()=>tl),r.export(i,"aj",()=>tu),r.export(i,"ak",()=>t4),r.export(i,"al",()=>t9),r.export(i,"am",()=>t6),r.export(i,"an",()=>et),r.export(i,"ao",()=>ei),r.export(i,"ap",()=>tO),r.export(i,"aq",()=>ia),r.export(i,"ar",()=>el),r.export(i,"as",()=>iE),r.export(i,"at",()=>iS),r.export(i,"au",()=>P),r.export(i,"av",()=>eM),r.export(i,"aw",()=>eI),r.export(i,"ax",()=>w),r.export(i,"ay",()=>nH),r.export(i,"az",()=>nM),r.export(i,"b",()=>iI),r.export(i,"c",()=>no),r.export(i,"d",()=>nc),r.export(i,"e",()=>nh),r.export(i,"f",()=>nb),r.export(i,"g",()=>nT),r.export(i,"h",()=>nE),r.export(i,"i",()=>iX),r.export(i,"j",()=>nA),r.export(i,"k",()=>nX),r.export(i,"l",()=>i4),r.export(i,"m",()=>nJ),r.export(i,"n",()=>nZ),r.export(i,"o",()=>n6),r.export(i,"p",()=>u),r.export(i,"q",()=>io),r.export(i,"r",()=>i9),r.export(i,"s",()=>i5),r.export(i,"t",()=>ih),r.export(i,"u",()=>i7),r.export(i,"v",()=>ic),r.export(i,"w",()=>il),r.export(i,"x",()=>iu),r.export(i,"y",()=>id),r.export(i,"z",()=>ip);var s=e("@firebase/app"),a=e("@firebase/util"),o=e("@firebase/logger"),h=e("tslib"),c=e("@firebase/component");/** * @license * Copyright 2021 Google LLC * @@ -5716,7 +5716,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function z(e){return void 0!==e&&void 0!==e.getResponse}function X(e){return void 0!==e&&void 0!==e.enterprise}class q{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}/** + */function z(e){return void 0!==e&&void 0!==e.getResponse}function X(e){return void 0!==e&&void 0!==e.enterprise}class K{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}/** * @license * Copyright 2020 Google LLC * @@ -5731,7 +5731,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function K(e){return(await V(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function J(e,t){return V(e,"GET","/v2/recaptchaConfig",U(e,t))}/** + */async function q(e){return(await V(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function J(e,t){return V(e,"GET","/v2/recaptchaConfig",U(e,t))}/** * @license * Copyright 2020 Google LLC * @@ -6016,7 +6016,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let eG={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ej(e){return eG.loadJS(e)}function eW(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eY{constructor(e){this.type="recaptcha-enterprise",this.auth=eU(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{J(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new q(n);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function n(t,i,n){let r=window.grecaptcha;X(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):n(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,r)=>{i(this.auth).then(i=>{if(!t&&X(window.grecaptcha))n(i,e,r);else{if("undefined"==typeof window){r(Error("RecaptchaVerifier is only supported in browser"));return}let t=eG.recaptchaEnterpriseScript;0!==t.length&&(t+=i),ej(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function eH(e,t,i,n=!1){let r;let s=new eY(e);try{r=await s.verify(i)}catch(e){r=await s.verify(i,!0)}let a=Object.assign({},t);return n?Object.assign(a,{captchaResp:r}):Object.assign(a,{captchaResponse:r}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ez(e,t,i,n){var r;if(null===(r=e._getRecaptchaConfig())||void 0===r||!r.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async r=>{if("auth/missing-recaptcha-token"!==r.code)return Promise.reject(r);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}});{let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}}async function eX(e){let t=eU(e),i=new q(await J(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")&&new eY(t).verify()}/** + */let eG={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ej(e){return eG.loadJS(e)}function eW(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eY{constructor(e){this.type="recaptcha-enterprise",this.auth=eU(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{J(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new K(n);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function n(t,i,n){let r=window.grecaptcha;X(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):n(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,r)=>{i(this.auth).then(i=>{if(!t&&X(window.grecaptcha))n(i,e,r);else{if("undefined"==typeof window){r(Error("RecaptchaVerifier is only supported in browser"));return}let t=eG.recaptchaEnterpriseScript;0!==t.length&&(t+=i),ej(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function eH(e,t,i,n=!1){let r;let s=new eY(e);try{r=await s.verify(i)}catch(e){r=await s.verify(i,!0)}let a=Object.assign({},t);return n?Object.assign(a,{captchaResp:r}):Object.assign(a,{captchaResponse:r}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ez(e,t,i,n){var r;if(null===(r=e._getRecaptchaConfig())||void 0===r||!r.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async r=>{if("auth/missing-recaptcha-token"!==r.code)return Promise.reject(r);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}});{let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}}async function eX(e){let t=eU(e),i=new K(await J(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")&&new eY(t).verify()}/** * @license * Copyright 2020 Google LLC * @@ -6031,7 +6031,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function eq(e,t){let i=(0,s._getProvider)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),n=i.getOptions();if((0,a.deepEqual)(n,null!=t?t:{}))return e;w(e,"already-initialized")}return i.initialize({options:t})}function eK(e,t,i){let n=eU(e);I(n._canInitEmulator,n,"emulator-config-failed"),I(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!(null==i?void 0:i.disableWarnings),s=eJ(t),{host:a,port:o}=function(e){let t=eJ(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let e=r[1];return{host:e,port:e$(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:e$(t)}}}(t),h=null===o?"":`:${o}`;n.config.emulator={url:`${s}//${a}${h}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eJ(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function e$(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** + */function eK(e,t){let i=(0,s._getProvider)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),n=i.getOptions();if((0,a.deepEqual)(n,null!=t?t:{}))return e;w(e,"already-initialized")}return i.initialize({options:t})}function eq(e,t,i){let n=eU(e);I(n._canInitEmulator,n,"emulator-config-failed"),I(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!(null==i?void 0:i.disableWarnings),s=eJ(t),{host:a,port:o}=function(e){let t=eJ(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let e=r[1];return{host:e,port:e$(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:e$(t)}}}(t),h=null===o?"":`:${o}`;n.config.emulator={url:`${s}//${a}${h}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eJ(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function e$(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** * @license * Copyright 2020 Google LLC * @@ -6466,7 +6466,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function tW(e){let t=eU(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function tY(e,t,i){let n=eU(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};i&&tj(n,r,i),await ez(n,r,"getOobCode",e9)}async function tH(e,t,i){await eZ((0,a.getModularInstance)(e),{oobCode:t,newPassword:i}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}async function tz(e,t){await e2((0,a.getModularInstance)(e),{oobCode:t})}async function tX(e,t){let i=(0,a.getModularInstance)(e),n=await eZ(i,{oobCode:t}),r=n.requestType;switch(I(r,i,"internal-error"),r){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":I(n.newEmail,i,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":I(n.mfaInfo,i,"internal-error");default:I(n.email,i,"internal-error")}let s=null;return n.mfaInfo&&(s=tU._fromServerResponse(eU(i),n.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.newEmail:n.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.email:n.newEmail)||null,multiFactorInfo:s},operation:r}}async function tq(e,t){let{data:i}=await tX((0,a.getModularInstance)(e),t);return i.email}async function tK(e,t,i){if((0,s._isFirebaseServerApp)(e.app))return Promise.reject(A(e));let n=eU(e),r=ez(n,{returnSecureToken:!0,email:t,password:i,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tw),a=await r.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t}),o=await tT._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(o.user),o}function tJ(e,t,i){return(0,s._isFirebaseServerApp)(e.app)?Promise.reject(A(e)):tD((0,a.getModularInstance)(e),td.credential(t,i)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}/** + */async function tW(e){let t=eU(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function tY(e,t,i){let n=eU(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};i&&tj(n,r,i),await ez(n,r,"getOobCode",e9)}async function tH(e,t,i){await eZ((0,a.getModularInstance)(e),{oobCode:t,newPassword:i}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}async function tz(e,t){await e2((0,a.getModularInstance)(e),{oobCode:t})}async function tX(e,t){let i=(0,a.getModularInstance)(e),n=await eZ(i,{oobCode:t}),r=n.requestType;switch(I(r,i,"internal-error"),r){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":I(n.newEmail,i,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":I(n.mfaInfo,i,"internal-error");default:I(n.email,i,"internal-error")}let s=null;return n.mfaInfo&&(s=tU._fromServerResponse(eU(i),n.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.newEmail:n.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.email:n.newEmail)||null,multiFactorInfo:s},operation:r}}async function tK(e,t){let{data:i}=await tX((0,a.getModularInstance)(e),t);return i.email}async function tq(e,t,i){if((0,s._isFirebaseServerApp)(e.app))return Promise.reject(A(e));let n=eU(e),r=ez(n,{returnSecureToken:!0,email:t,password:i,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tw),a=await r.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t}),o=await tT._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(o.user),o}function tJ(e,t,i){return(0,s._isFirebaseServerApp)(e.app)?Promise.reject(A(e)):tD((0,a.getModularInstance)(e),td.credential(t,i)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}/** * @license * Copyright 2020 Google LLC * @@ -6721,7 +6721,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let iF="firebaseLocalStorageDb",iB="firebaseLocalStorage",iU="fbase_key";class iV{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function iG(e,t){return e.transaction([iB],t?"readwrite":"readonly").objectStore(iB)}function ij(){let e=indexedDB.open(iF,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(iB,{keyPath:iU})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(iB)?t(i):(i.close(),await new iV(indexedDB.deleteDatabase(iF)).toPromise(),t(await ij()))})})}async function iW(e,t,i){return new iV(iG(e,!0).put({[iU]:t,value:i})).toPromise()}async function iY(e,t){let i=iG(e,!1).get(t),n=await new iV(i).toPromise();return void 0===n?null:n.value}function iH(e,t){return new iV(iG(e,!0).delete(t)).toPromise()}class iz{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await ij()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ik()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iM._getInstance(ik()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await iN(),!this.activeServiceWorker)return;this.sender=new iL(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ij();return await iW(e,iA,"1"),await iH(e,iA),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>iW(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iY(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iH(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iV(iG(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:n,value:r}of e)i.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(r)&&(this.notifyListeners(n,r),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}iz.type="LOCAL";let iX=iz;class iq{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new iK(e,this.auth.name,t||{})),this.counter++,i}reset(e){var t;let i=e||1e12;null===(t=this._widgets.get(i))||void 0===t||t.delete(),this._widgets.delete(i)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class iK{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let n="string"==typeof e?document.getElementById(e):e;I(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],i="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")}(0);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/** + */let iF="firebaseLocalStorageDb",iB="firebaseLocalStorage",iU="fbase_key";class iV{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function iG(e,t){return e.transaction([iB],t?"readwrite":"readonly").objectStore(iB)}function ij(){let e=indexedDB.open(iF,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(iB,{keyPath:iU})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(iB)?t(i):(i.close(),await new iV(indexedDB.deleteDatabase(iF)).toPromise(),t(await ij()))})})}async function iW(e,t,i){return new iV(iG(e,!0).put({[iU]:t,value:i})).toPromise()}async function iY(e,t){let i=iG(e,!1).get(t),n=await new iV(i).toPromise();return void 0===n?null:n.value}function iH(e,t){return new iV(iG(e,!0).delete(t)).toPromise()}class iz{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await ij()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ik()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iM._getInstance(ik()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await iN(),!this.activeServiceWorker)return;this.sender=new iL(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ij();return await iW(e,iA,"1"),await iH(e,iA),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>iW(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iY(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iH(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iV(iG(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:n,value:r}of e)i.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(r)&&(this.notifyListeners(n,r),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}iz.type="LOCAL";let iX=iz;class iK{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new iq(e,this.auth.name,t||{})),this.counter++,i}reset(e){var t;let i=e||1e12;null===(t=this._widgets.get(i))||void 0===t||t.delete(),this._widgets.delete(i)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class iq{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let n="string"==typeof e?document.getElementById(e):e;I(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],i="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")}(0);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/** * @license * Copyright 2020 Google LLC * @@ -6736,7 +6736,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let iJ=eW("rcb"),i$=new D(3e4,6e4);class iQ{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=iD().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return(I(t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t),e,"argument-error"),this.shouldResolveImmediately(t)&&z(iD().grecaptcha))?Promise.resolve(iD().grecaptcha):new Promise((i,n)=>{let r=iD().setTimeout(()=>{n(T(e,"network-request-failed"))},i$.get());iD()[iJ]=()=>{iD().clearTimeout(r),delete iD()[iJ];let s=iD().grecaptcha;if(!s||!z(s)){n(T(e,"internal-error"));return}let a=s.render;s.render=(e,t)=>{let i=a(e,t);return this.counter++,i},this.hostLanguage=t,i(s)},ej(`${eG.recaptchaV2Script}?${(0,a.querystring)({onload:iJ,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(r),n(T(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=iD().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iZ{async load(e){return new iq(e)}clearedOneInstance(){}}/** + */let iJ=eW("rcb"),i$=new D(3e4,6e4);class iQ{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=iD().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return(I(t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t),e,"argument-error"),this.shouldResolveImmediately(t)&&z(iD().grecaptcha))?Promise.resolve(iD().grecaptcha):new Promise((i,n)=>{let r=iD().setTimeout(()=>{n(T(e,"network-request-failed"))},i$.get());iD()[iJ]=()=>{iD().clearTimeout(r),delete iD()[iJ];let s=iD().grecaptcha;if(!s||!z(s)){n(T(e,"internal-error"));return}let a=s.render;s.render=(e,t)=>{let i=a(e,t);return this.counter++,i},this.hostLanguage=t,i(s)},ej(`${eG.recaptchaV2Script}?${(0,a.querystring)({onload:iJ,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(r),n(T(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=iD().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iZ{async load(e){return new iK(e)}clearedOneInstance(){}}/** * @license * Copyright 2020 Google LLC * @@ -6751,7 +6751,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let i0="recaptcha",i1={theme:"light",type:"image"};class i2{constructor(e,t,i=Object.assign({},i1)){this.parameters=i,this.type=i0,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eU(e),this.isInvisible="invisible"===this.parameters.size,I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let n="string"==typeof t?document.getElementById(t):t;I(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iZ:new iQ,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise(i=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),i(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){I(!this.parameters.sitekey,this.auth,"argument-error"),I(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let i=iD()[e];"function"==typeof i&&i(t)}}}assertNotDestroyed(){I(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;I(R()&&!ik(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await K(this.auth);I(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return I(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/** + */let i0="recaptcha",i1={theme:"light",type:"image"};class i2{constructor(e,t,i=Object.assign({},i1)){this.parameters=i,this.type=i0,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eU(e),this.isInvisible="invisible"===this.parameters.size,I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let n="string"==typeof t?document.getElementById(t):t;I(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iZ:new iQ,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise(i=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),i(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){I(!this.parameters.sitekey,this.auth,"argument-error"),I(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let i=iD()[e];"function"==typeof i&&i(t)}}}assertNotDestroyed(){I(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;I(R()&&!ik(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await q(this.auth);I(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return I(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/** * @license * Copyright 2020 Google LLC * @@ -6931,7 +6931,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let nz="webStorageSupport",nX=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=iP,this._completeRedirectFn=nC,this._overrideRedirectResult=nm}async _openPopup(e,t,i,n){var r;P(null===(r=this.eventManagers[e._key()])||void 0===r?void 0:r.manager,"_initialize() not called before _openPopup()");let s=await nH(e,t,i,M(),n);return function(e,t,i,n=500,r=600){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),h="",c=Object.assign(Object.assign({},nj),{width:n.toString(),height:r.toString(),top:s,left:o}),l=(0,a.getUA)().toLowerCase();i&&(h=eC(l)?"_blank":i),eS(l)&&(t=t||"http://localhost",c.scrollbars="yes");let u=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,a.getUA)()){var t;return eM(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==h)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}(t||"",h),new nW(null);let d=window.open(t||"",h,u);I(d,e,"popup-blocked");try{d.focus()}catch(e){}return new nW(d)}(e,s,iR())}async _openRedirect(e,t,i,n){var r;return await this._originValidation(e),r=await nH(e,t,i,M(),n),iD().location.href=r,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(P(i,"If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await nG(e),i=new nI(e);return t.register("authEvent",t=>(I(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nz,{type:nz},i=>{var n;let r=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n[nz];void 0!==r&&t(!!r),w(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nD(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eL()||eA()||eM()}};class nq{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return O("unexpected MultiFactorSessionType")}}}class nK extends nq{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nK(e)}_finalizeEnroll(e,t,i){return V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nJ{constructor(){}static assertion(e){return nK._fromCredential(e)}}nJ.FACTOR_ID="phone";class n${static assertionForEnrollment(e,t){return nQ._fromSecret(e,t)}static assertionForSignIn(e,t){return nQ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;I(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let n=await V(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",U(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return nZ._fromStartTotpMfaEnrollmentResponse(n,e.user.auth)}}n$.FACTOR_ID="totp";class nQ extends nq{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new nQ(t,void 0,e)}static _fromEnrollmentId(e,t){return new nQ(t,e)}async _finalizeEnroll(e,t,i){return I(void 0!==this.secret,e,"argument-error"),V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){I(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class nZ{constructor(e,t,i,n,r,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=r}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nZ(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let n=!1;return(n0(e)||n0(t))&&(n=!0),n&&(n0(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),n0(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function n0(e){return void 0===e||(null==e?void 0:e.length)===0}var n1="@firebase/auth",n2="1.7.9";/** + */let nz="webStorageSupport",nX=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=iP,this._completeRedirectFn=nC,this._overrideRedirectResult=nm}async _openPopup(e,t,i,n){var r;P(null===(r=this.eventManagers[e._key()])||void 0===r?void 0:r.manager,"_initialize() not called before _openPopup()");let s=await nH(e,t,i,M(),n);return function(e,t,i,n=500,r=600){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),h="",c=Object.assign(Object.assign({},nj),{width:n.toString(),height:r.toString(),top:s,left:o}),l=(0,a.getUA)().toLowerCase();i&&(h=eC(l)?"_blank":i),eS(l)&&(t=t||"http://localhost",c.scrollbars="yes");let u=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,a.getUA)()){var t;return eM(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==h)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}(t||"",h),new nW(null);let d=window.open(t||"",h,u);I(d,e,"popup-blocked");try{d.focus()}catch(e){}return new nW(d)}(e,s,iR())}async _openRedirect(e,t,i,n){var r;return await this._originValidation(e),r=await nH(e,t,i,M(),n),iD().location.href=r,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(P(i,"If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await nG(e),i=new nI(e);return t.register("authEvent",t=>(I(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nz,{type:nz},i=>{var n;let r=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n[nz];void 0!==r&&t(!!r),w(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nD(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eL()||eA()||eM()}};class nK{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return O("unexpected MultiFactorSessionType")}}}class nq extends nK{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nq(e)}_finalizeEnroll(e,t,i){return V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nJ{constructor(){}static assertion(e){return nq._fromCredential(e)}}nJ.FACTOR_ID="phone";class n${static assertionForEnrollment(e,t){return nQ._fromSecret(e,t)}static assertionForSignIn(e,t){return nQ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;I(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let n=await V(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",U(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return nZ._fromStartTotpMfaEnrollmentResponse(n,e.user.auth)}}n$.FACTOR_ID="totp";class nQ extends nK{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new nQ(t,void 0,e)}static _fromEnrollmentId(e,t){return new nQ(t,e)}async _finalizeEnroll(e,t,i){return I(void 0!==this.secret,e,"argument-error"),V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){I(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class nZ{constructor(e,t,i,n,r,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=r}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nZ(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let n=!1;return(n0(e)||n0(t))&&(n=!0),n&&(n0(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),n0(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function n0(e){return void 0===e||(null==e?void 0:e.length)===0}var n1="@firebase/auth",n2="1.7.9";/** * @license * Copyright 2020 Google LLC * @@ -6946,7 +6946,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class n3{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){I(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let n5=(0,a.getExperimentalSetting)("authIdTokenMaxAge")||300,n4=null,n9=e=>async t=>{let i=t&&await t.getIdTokenResult(),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>n5)return;let r=null==i?void 0:i.token;n4!==r&&(n4=r,await fetch(e,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))};function n6(e=(0,s.getApp)()){let t=(0,s._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=eq(e,{popupRedirectResolver:nX,persistence:[iX,iI,iP]}),n=(0,a.getExperimentalSetting)("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){let t=n9(e.toString());iu(i,t,()=>t(i.currentUser)),il(i,e=>t(e))}}let r=(0,a.getDefaultEmulatorHost)("auth");return r&&eK(i,`http://${r}`),i}eG={loadJS:e=>new Promise((t,i)=>{var n,r;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=T("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(r=null===(n=document.getElementsByTagName("head"))||void 0===n?void 0:n[0])&&void 0!==r?r:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},n="Browser",(0,s._registerComponent)(new(0,c.Component)("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;I(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let h=new eB(i,r,s,{apiKey:a,authDomain:o,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:eD(n)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],n=(Array.isArray(i)?i:[i]).map(ey);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(h,t),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s._registerComponent)(new(0,c.Component)("auth-internal",e=>new n3(eU(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.registerVersion)(n1,n2,/** + */class n3{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){I(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let n5=(0,a.getExperimentalSetting)("authIdTokenMaxAge")||300,n4=null,n9=e=>async t=>{let i=t&&await t.getIdTokenResult(),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>n5)return;let r=null==i?void 0:i.token;n4!==r&&(n4=r,await fetch(e,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))};function n6(e=(0,s.getApp)()){let t=(0,s._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=eK(e,{popupRedirectResolver:nX,persistence:[iX,iI,iP]}),n=(0,a.getExperimentalSetting)("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){let t=n9(e.toString());iu(i,t,()=>t(i.currentUser)),il(i,e=>t(e))}}let r=(0,a.getDefaultEmulatorHost)("auth");return r&&eq(i,`http://${r}`),i}eG={loadJS:e=>new Promise((t,i)=>{var n,r;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=T("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(r=null===(n=document.getElementsByTagName("head"))||void 0===n?void 0:n[0])&&void 0!==r?r:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},n="Browser",(0,s._registerComponent)(new(0,c.Component)("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;I(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let h=new eB(i,r,s,{apiKey:a,authDomain:o,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:eD(n)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],n=(Array.isArray(i)?i:[i]).map(ey);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(h,t),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s._registerComponent)(new(0,c.Component)("auth-internal",e=>new n3(eU(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.registerVersion)(n1,n2,/** * @license * Copyright 2020 Google LLC * @@ -6961,7 +6961,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(n)),(0,s.registerVersion)(n1,n2,"esm2017")},{"@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"3aD9C":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"__extends",()=>s),n.export(i,"__assign",()=>a),n.export(i,"__rest",()=>o),n.export(i,"__decorate",()=>h),n.export(i,"__param",()=>c),n.export(i,"__esDecorate",()=>l),n.export(i,"__runInitializers",()=>u),n.export(i,"__propKey",()=>d),n.export(i,"__setFunctionName",()=>f),n.export(i,"__metadata",()=>p),n.export(i,"__awaiter",()=>g),n.export(i,"__generator",()=>m),n.export(i,"__createBinding",()=>v),n.export(i,"__exportStar",()=>y),n.export(i,"__values",()=>b),n.export(i,"__read",()=>x),n.export(i,"__spread",()=>E),n.export(i,"__spreadArrays",()=>w),n.export(i,"__spreadArray",()=>T),n.export(i,"__await",()=>S),n.export(i,"__asyncGenerator",()=>A),n.export(i,"__asyncDelegator",()=>C),n.export(i,"__asyncValues",()=>_),n.export(i,"__makeTemplateObject",()=>I),n.export(i,"__importStar",()=>M),n.export(i,"__importDefault",()=>R),n.export(i,"__classPrivateFieldGet",()=>L),n.export(i,"__classPrivateFieldSet",()=>D),n.export(i,"__classPrivateFieldIn",()=>k),n.export(i,"__addDisposableResource",()=>N),n.export(i,"__disposeResources",()=>B),n.export(i,"__rewriteRelativeImportExtension",()=>U);var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var a=function(){return(a=Object.assign||function(e){for(var t,i=1,n=arguments.length;it.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i}function h(e,t,i,n){var r,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t){return function(i,n){t(i,n,e)}}function l(e,t,i,n,r,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,h=n.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!t&&e?n.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,f=i.length-1;f>=0;f--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,i[f])("accessor"===h?{get:u.get,set:u.set}:u[c],p);if("accessor"===h){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=a(m.get))&&(u.get=o),(o=a(m.set))&&(u.set=o),(o=a(m.init))&&r.unshift(o)}else(o=a(m))&&("field"===h?r.unshift(o):u[c]=o)}l&&Object.defineProperty(l,n.name,u),d=!0}function u(e,t,i){for(var n=arguments.length>2,r=0;r0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a}function E(){for(var e=[],t=0;t1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var i;(i=r[e](t)).value instanceof S?Promise.resolve(i.value.v).then(h,c):l(s[0][2],i)}catch(e){l(s[0][3],e)}}function h(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function C(e){var t,i;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:S(e[n](t)),done:!1}:r?r(t):t}:r}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise(function(n,r){!function(e,t,i,n){Promise.resolve(n).then(function(t){e({value:t,done:i})},t)}(n,r,(t=e[i](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return(P=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t})(e)};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=P(e),n=0;nc);var r=e("firebase/compat/app"),s=n.interopDefault(r);e("firebase/compat/auth");var a=e("dialog-polyfill"),o=n.interopDefault(a);e("material-design-lite/src/mdlComponentHandler"),e("material-design-lite/src/button/button"),e("material-design-lite/src/progress/progress"),e("material-design-lite/src/spinner/spinner"),e("material-design-lite/src/textfield/textfield");var h=arguments[3];(function(){(function(){var e,t,i="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)t=Object.setPrototypeOf;else{t:{var n={};try{n.__proto__={xb:!0},n4=n.xb;break t}catch(e){}n4=!1}t=n4?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var r=t;function a(e,t){if(e.prototype=i(t.prototype),e.prototype.constructor=e,r)r(e,t);else for(var n in t)if("prototype"!=n){if(Object.defineProperties){var s=Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(e,n,s)}else e[n]=t[n]}e.K=t.prototype}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c="undefined"!=typeof window&&window===this?this:void 0!==h&&null!=h?h:this;function l(e,t){if(t){var i=c;e=e.split(".");for(var n=0;n(t=t||0)&&(t=Math.max(t+n,0));t>>0),S=0;function A(e,t,i){return e.call.apply(e.bind,arguments)}function C(e,t,i){if(!e)throw Error();if(2/g,J=/"/g,$=/'/g,Q=/\x00/g,Z=/[\x00&<>"']/;function ee(e,t){return et?1:0}function et(e){return Z.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(X,"&")),-1!=e.indexOf("<")&&(e=e.replace(q,"<")),-1!=e.indexOf(">")&&(e=e.replace(K,">")),-1!=e.indexOf('"')&&(e=e.replace(J,""")),-1!=e.indexOf("'")&&(e=e.replace($,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Q,"�"))),e}function ei(e,t,i){for(var n in e)t.call(i,e[n],n,e)}function en(e){var t,i={};for(t in e)i[t]=e[t];return i}var er="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function es(e,t){for(var i,n,r=1;r=e.length)throw ea;if(t in e)return e[t++];t++}},i}throw Error("Not implemented")}function ec(e,t){this.g={},this.a=[],this.j=this.h=0;var i=arguments.length;if(1=n.a.length)throw ea;var r=n.a[t++];return e?r:n.g[r]},r};var ed=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ef(e,t,i,n){for(var r=i.length;0<=(t=e.indexOf(i,t))&&tn)return null;var r=e.indexOf("&",n);return(0>r||r>i)&&(r=i),n+=t.length+1,decodeURIComponent(e.substr(n,r-n).replace(/\+/g," "))}var em=/[?&]($|#)/;function ev(e,t){var i;this.h=this.A=this.j="",this.C=null,this.s=this.g="",this.i=!1,e instanceof ev?(this.i=d(t)?t:e.i,ey(this,e.j),this.A=e.A,this.h=e.h,eb(this,e.C),this.g=e.g,ex(this,eD(e.a)),this.s=e.s):e&&(i=String(e).match(ed))?(this.i=!!t,ey(this,i[1]||"",!0),this.A=ew(i[2]||""),this.h=ew(i[3]||"",!0),eb(this,i[4]),this.g=ew(i[5]||"",!0),ex(this,i[6]||"",!0),this.s=ew(i[7]||"")):(this.i=!!t,this.a=new eP(null,this.i))}function ey(e,t,i){e.j=i?ew(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function eb(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.C=t}else e.C=null}function ex(e,t,i){var n,r;t instanceof eP?(e.a=t,n=e.a,(r=e.i)&&!n.j&&(eM(n),n.h=null,n.a.forEach(function(e,t){var i=t.toLowerCase();t!=i&&(eR(this,t),eR(this,i),0>4&15).toString(16)+(15&e).toString(16)}ev.prototype.toString=function(){var e=[],t=this.j;t&&e.push(eT(t,eA,!0),":");var i=this.h;return(i||"file"==t)&&(e.push("//"),(t=this.A)&&e.push(eT(t,eA,!0),"@"),e.push(encodeURIComponent(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.C)&&e.push(":",String(i))),(i=this.g)&&(this.h&&"/"!=i.charAt(0)&&e.push("/"),e.push(eT(i,"/"==i.charAt(0)?e_:eC,!0))),(i=this.a.toString())&&e.push("?",i),(i=this.s)&&e.push("#",eT(i,eO)),e.join("")};var eA=/[#\/\?@]/g,eC=/[#\?:]/g,e_=/[#\?]/g,eI=/[#\?@]/g,eO=/#/g;function eP(e,t){this.g=this.a=null,this.h=e||null,this.j=!!t}function eM(e){e.a||(e.a=new ec,e.g=0,e.h&&function(e,t){if(e){e=e.split("&");for(var i=0;i2*e.h&&el(e)))}function eL(e,t){return eM(e),t=ek(e,t),eu(e.a.g,t)}function eD(e){var t=new eP;return t.h=e.h,e.a&&(t.a=new ec(e.a),t.g=e.g),t}function ek(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function eN(e){this.a=eE(e)}function eF(e){return e.a.a.get(eU.Pa)||null}function eB(e,t){t?e.a.a.set(eU.PROVIDER_ID,t):eR(e.a.a,eU.PROVIDER_ID)}(e=eP.prototype).add=function(e,t){eM(this),this.h=null,e=ek(this,e);var i=this.a.get(e);return i||this.a.set(e,i=[]),i.push(t),this.g+=1,this},e.clear=function(){this.a=this.h=null,this.g=0},e.forEach=function(e,t){eM(this),this.a.forEach(function(i,n){F(i,function(i){e.call(t,i,n,this)},this)},this)},e.ja=function(){eM(this);for(var e=this.a.la(),t=this.a.ja(),i=[],n=0;nparseFloat(e1)){n7=String(e3);break t}}n7=e1}var e5={};function e4(e){var t;return t=function(){for(var t=0,i=z(String(n7)).split("."),n=z(String(e)).split("."),r=Math.max(i.length,n.length),s=0;0==t&&s",0);var tm=tg("",0);tg("
",0);var tv=(n2=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!!e.firstChild&&(t=e.firstChild.firstChild,e.innerHTML=tf(tm),!t.parentElement)},n5=!1,function(){return n5||(n3=n2(),n5=!0),n3});function ty(e,t){t=t instanceof tn?t:to(t),e.assign(tr(t))}function tb(e,t){this.a=d(e)?e:0,this.g=d(t)?t:0}function tx(e,t){this.width=e,this.height=t}function tE(e){return e?new tM(tI(e)):n9||(n9=new tM)}function tw(e,t){var i=t||document;return i.querySelectorAll&&i.querySelector?i.querySelectorAll("."+e):tS(document,e,t)}function tT(e,t){var i=t||document;if(i.getElementsByClassName)e=i.getElementsByClassName(e)[0];else{i=document;var n=t||i;e=n.querySelectorAll&&n.querySelector&&e?n.querySelector(e?"."+e:""):tS(i,e,t)[0]||null}return e||null}function tS(e,t,i){var n;if((e=i||e).querySelectorAll&&e.querySelector&&t)return e.querySelectorAll(t?"."+t:"");if(t&&e.getElementsByClassName){var r=e.getElementsByClassName(t);return r}if(r=e.getElementsByTagName("*"),t){var s={};for(i=n=0;e=r[i];i++){var a=e.className;"function"==typeof a.split&&G(a.split(/\s+/),t)&&(s[n++]=e)}return s.length=n,s}return r}tb.prototype.toString=function(){return"("+this.a+", "+this.g+")"},tb.prototype.ceil=function(){return this.a=Math.ceil(this.a),this.g=Math.ceil(this.g),this},tb.prototype.floor=function(){return this.a=Math.floor(this.a),this.g=Math.floor(this.g),this},tb.prototype.round=function(){return this.a=Math.round(this.a),this.g=Math.round(this.g),this},(e=tx.prototype).toString=function(){return"("+this.width+" x "+this.height+")"},e.aspectRatio=function(){return this.width/this.height},e.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},e.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},e.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this};var tA={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function tC(e){return e.scrollingElement?e.scrollingElement:(eJ||"CSS1Compat"!=e.compatMode)&&e.body||e.documentElement}function t_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tI(e){return 9==e.nodeType?e:e.ownerDocument||e.document}function tO(e,t){if("textContent"in e)e.textContent=t;else if(3==e.nodeType)e.data=String(t);else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=String(t)}else{for(var i;i=e.firstChild;)e.removeChild(i);e.appendChild(tI(e).createTextNode(String(t)))}}function tP(e,t){return t?function(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}(e,function(e){return!t||f(e.className)&&G(e.className.split(/\s+/),t)}):null}function tM(e){this.a=e||u.document||document}tM.prototype.N=function(){return f(void 0)?this.a.getElementById(void 0):void 0};var tR={Fc:!0},tL={Hc:!0},tD={},tk={Gc:!0};function tN(){throw Error("Do not instantiate directly")}function tF(e,t,i,n){if(e=e(t||tU,void 0,i),n=(n||tE()).a.createElement("DIV"),(e=function(e){if(!w(e))return et(String(e));if(e instanceof tN){if(e.fa===tR)return e.content;if(e.fa===tk)return et(e.content)}return k("Soy template output is unsafe for use as HTML: "+e),"zSoyz"}(e)).match(tB),e=tg(e,null),tv())for(;n.lastChild;)n.removeChild(n.lastChild);return n.innerHTML=tf(e),1==n.childNodes.length&&1==(e=n.firstChild).nodeType&&(n=e),n}tN.prototype.va=null,tN.prototype.toString=function(){return this.content};var tB=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,tU={};function tV(){tN.call(this)}function tG(e){return null!=e&&e.fa===tR?e:e instanceof td?tH(tf(e).toString(),e.g()):tH(et(String(String(e))),function(e){if(null!=e)switch(e.va){case 1:return 1;case -1:return -1;case 0:return 0}return null}(e))}function tj(){tN.call(this)}function tW(e,t){this.content=String(e),this.va=null!=t?t:null}function tY(e){return new tW(e,void 0)}R(tV,tN),tV.prototype.fa=tR,R(tj,tN),tj.prototype.fa=tL,tj.prototype.va=1,R(tW,tN),tW.prototype.fa=tk;var tH=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return e=new t(String(e)),void 0!==i&&(e.va=i),e}}(tV),tz=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e){return new t(String(e))}}(tj);function tX(e){return(e=String(e))?new tW(e,void 0):""}var tq=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return(e=String(e))?(e=new t(e),void 0!==i&&(e.va=i),e):""}}(tV);function tK(e){return null!=e&&e.fa===tR?String(String(e.content).replace(t9,"").replace(t6,"<")).replace(t2,tZ):et(String(e))}function tJ(e){return null!=e&&e.fa===tL?e=String(e).replace(t3,t1):e instanceof tn?e=String(tr(e).toString()).replace(t3,t1):t4.test(e=String(e))?e=e.replace(t3,t1):(k("Bad value `%s` for |filterNormalizeUri",[e]),e="#zSoyz"),e}function t$(e){return null!=e&&e.fa===tD?e=e.content:null==e?e="":e instanceof tl?e instanceof tl&&e.constructor===tl&&e.g===tu?e=e.a:(k("expected object of type SafeStyle, got '"+e+"' of type "+y(e)),e="type_error:SafeStyle"):t5.test(e=String(e))||(k("Bad value `%s` for |filterCssValue",[e]),e="zSoyz"),e}var tQ={"\0":"�"," ":" ","\n":" ","\v":" ","\f":" ","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","…":"…"," ":" ","\u2028":"
","\u2029":"
"};function tZ(e){return tQ[e]}var t0={"\0":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08"," ":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","":"%7F","…":"%C2%85"," ":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","!":"%EF%BC%81","#":"%EF%BC%83","$":"%EF%BC%84","&":"%EF%BC%86","'":"%EF%BC%87","(":"%EF%BC%88",")":"%EF%BC%89","*":"%EF%BC%8A","+":"%EF%BC%8B",",":"%EF%BC%8C","/":"%EF%BC%8F",":":"%EF%BC%9A",";":"%EF%BC%9B","=":"%EF%BC%9D","?":"%EF%BC%9F","@":"%EF%BC%A0","[":"%EF%BC%BB","]":"%EF%BC%BD"};function t1(e){return t0[e]}var t2=/[\x00\x22\x27\x3c\x3e]/g,t3=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,t5=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,t4=/^(?![^#?]*\/(?:\.|%2E){2}(?:[\/?#]|$))(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,t9=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,t6=/=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var ib="closure_listenable_"+(1e6*Math.random()|0),ix=0;function iE(e,t,i,n,r){this.listener=e,this.proxy=null,this.src=t,this.type=i,this.capture=!!n,this.La=r,this.key=++ix,this.sa=this.Ia=!1}function iw(e){e.sa=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function iT(e){this.src=e,this.a={},this.g=0}function iS(e,t){var i=t.type;i in e.a&&j(e.a[i],t)&&(iw(t),0==e.a[i].length&&(delete e.a[i],e.g--))}function iA(e,t,i,n){for(var r=0;rn.keyCode||void 0!=n.returnValue)){t:{var r=!1;if(0==n.keyCode)try{n.keyCode=-1;break t}catch(e){r=!0}(r||void 0==n.returnValue)&&(n.returnValue=!0)}for(n=[],r=t.g;r;r=r.parentNode)n.push(r);for(e=e.type,r=n.length-1;!t.h&&0<=r;r--){t.g=n[r];var s=ik(n[r],e,!0,t);i=i&&s}for(r=0;!t.h&&r>>0);function iV(e){return E(e)?e:(e[iU]||(e[iU]=function(t){return e.handleEvent(t)}),e[iU])}function iG(){ia.call(this),this.J=new iT(this),this.wb=this,this.Ha=null}function ij(e,t){var i,n=e.Ha;if(n)for(i=[];n;n=n.Ha)i.push(n);if(e=e.wb,n=t.type||t,f(t))t=new im(t,e);else if(t instanceof im)t.target=t.target||e;else{var r=t;es(t=new im(n,e),r)}if(r=!0,i)for(var s=i.length-1;!t.h&&0<=s;s--){var a=t.g=i[s];r=iW(a,n,!0,t)&&r}if(t.h||(r=iW(a=t.g=e,n,!0,t)&&r,t.h||(r=iW(a,n,!1,t)&&r)),i)for(s=0;!t.h&&se.g&&(e.g++,t.next=e.a,e.a=t)}function iQ(){this.g=this.a=null}a(iq,iG),iq.prototype.N=function(){return this.a},iq.prototype.register=function(){var e=iX(this.N());iY[e]?G(iY[e],this)||iY[e].push(this):iY[e]=[this]},iJ.prototype.get=function(){if(0',null),i.document.write(tf(t)),i.document.close())):(i=i.open(tr(n).toString(),e,s))&&t.noopener&&(i.opener=null),i}function ng(){try{return!(!window.opener||!window.opener.location||window.opener.location.hostname!==window.location.hostname||window.opener.location.protocol!==window.location.protocol)}catch(e){}return!1}function nm(e){np(e,{target:window.cordova&&window.cordova.InAppBrowser?"_system":"_blank"},void 0)}function nv(e,t){if(null==(e=w(e)&&1==e.nodeType?e:document.querySelector(String(e))))throw Error(t||"Cannot find element.");return e}function ny(){return window.location.href}function nb(e){this.s=[],this.T=nO,this.O=e||null,this.j=this.a=!1,this.h=void 0,this.J=this.l=this.A=!1,this.i=0,this.g=null,this.C=0}function nx(e,t,i){e.a=!0,e.h=i,e.j=!t,nS(e)}function nE(e){if(e.a){if(!e.J)throw new nA(e);e.J=!1}}function nw(e,t,i){e.s.push([t,i,void 0]),e.a&&nS(e)}function nT(e){return V(e.s,function(e){return E(e[1])})}function nS(e){if(e.i&&e.a&&nT(e)){var t=e.i,i=nI[t];i&&(u.clearTimeout(i.a),delete nI[t]),e.i=0}e.g&&(e.g.C--,delete e.g),t=e.h;for(var n=i=!1;e.s.length&&!e.A;){var r=e.s.shift(),s=r[0],a=r[1];if(r=r[2],s=e.j?a:s)try{var o=s.call(r||e.O,t);d(o)&&(e.j=e.j&&(o==t||o instanceof Error),e.h=t=o),(iK(t)||"function"==typeof u.Promise&&t instanceof u.Promise)&&(n=!0,e.A=!0)}catch(n){t=n,e.j=!0,nT(e)||(i=!0)}}e.h=t,n&&(o=_(e.L,e,!0),n=_(e.L,e,!1),t instanceof nb?(nw(t,o,n),t.l=!0):t.then(o,n)),i&&(nI[(t=new n_(t)).a]=t,e.i=t.a)}function nA(){L.call(this)}function nC(){L.call(this)}function n_(e){this.a=u.setTimeout(_(this.h,this),0),this.g=e}R(nf,L),nf.prototype.name="cancel",nb.prototype.cancel=function(e){if(this.a)this.h instanceof nb&&this.h.cancel();else{if(this.g){var t=this.g;delete this.g,e?t.cancel(e):(t.C--,0>=t.C&&t.cancel())}this.T?this.T.call(this.O,this):this.J=!0,this.a||(e=new nC(this),nE(this),nx(this,!1,e))}},nb.prototype.L=function(e,t){this.A=!1,nx(this,e,t)},nb.prototype.callback=function(e){nE(this),nx(this,!0,e)},nb.prototype.then=function(e,t,i){var n,r,s=new i9(function(e,t){n=e,r=t});return nw(this,n,function(e){e instanceof nC?s.cancel():r(e)}),s.then(e,t,i)},nb.prototype.$goog_Thenable=!0,R(nA,L),nA.prototype.message="Deferred has already fired",nA.prototype.name="AlreadyCalledError",R(nC,L),nC.prototype.message="Deferred was canceled",nC.prototype.name="CanceledError",n_.prototype.h=function(){throw delete nI[this.a],this.g};var nI={};function nO(){if(this&&this.rb){var e=this.rb;e&&"SCRIPT"==e.tagName&&nP(e,!0,this.sb)}}function nP(e,t,i){null!=i&&u.clearTimeout(i),e.onload=m,e.onerror=m,e.onreadystatechange=m,t&&window.setTimeout(function(){t_(e)},0)}function nM(e,t){var i="Jsloader error (code #"+e+")";t&&(i+=": "+t),L.call(this,i),this.code=e}function nR(){return u.google&&u.google.accounts&&u.google.accounts.id||null}function nL(e){this.a=e||nR(),this.h=!1,this.g=null}R(nM,L),nL.prototype.cancel=function(){this.a&&this.h&&(this.g&&this.g(null),this.a.cancel())},v(nL);var nD=new e6(e8,"https://accounts.google.com/gsi/client");function nk(){this.a=null}function nN(e,t){this.a=e,this.g=t||function(e){throw e}}function nF(e,t,i){this.reset(e,t,i,void 0,void 0)}nk.prototype.load=function(){var e,t,i,n=this;if(this.a)return this.a;var r=((e=nD)instanceof e6&&e.constructor===e6&&e.g===e7?e=e.a:(k("expected object of type Const, got '"+e+"'"),e="type_error:Const"),(t=new te).a=e,t);return nR()?nn():this.a=(i=null,new i9(function(e){"complete"==u.document.readyState?e():iM(window,"load",i=function(){e()})}).Ca(function(e){throw iR(window,"load",i),e})).then(function(){if(!nR())return new i9(function(e,t){var i,s,a,o,h,c,l,d,f,m=setTimeout(function(){n.a=null,t(Error("Network error!"))},1e4);u.onGoogleLibraryLoad=function(){clearTimeout(m),e()},nn((a=(s={}).document||document,o=tt(r).toString(),l=new nb(c={rb:h=document.createElement("SCRIPT"),sb:void 0}),d=null,0<(f=null!=s.timeout?s.timeout:5e3)&&(d=window.setTimeout(function(){nP(h,!0);var e=new nM(1,"Timeout reached for loading script "+o);nE(l),nx(l,!1,e)},f),c.sb=d),h.onload=h.onreadystatechange=function(){h.readyState&&"loaded"!=h.readyState&&"complete"!=h.readyState||(nP(h,s.xc||!1,d),l.callback(null))},h.onerror=function(){nP(h,!0,d);var e=new nM(0,"Error while loading script "+o);nE(l),nx(l,!1,e)},es(c=s.attributes||{},{type:"text/javascript",charset:"UTF-8"}),ei(c,function(e,t){e&&"object"==typeof e&&e.ma&&(e=e.ka()),"style"==t?h.style.cssText=e:"class"==t?h.className=e:"for"==t?h.htmlFor=e:tA.hasOwnProperty(t)?h.setAttribute(tA[t],e):0==t.lastIndexOf("aria-",0)||0==t.lastIndexOf("data-",0)?h.setAttribute(t,e):h[t]=e}),function(e,t){if(e.src=tt(t),null===g)i:{if((t=(t=u.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&p.test(t)){g=t;break i}g=""}(t=g)&&e.setAttribute("nonce",t)}(h,r),((i=(a||document).getElementsByTagName("HEAD"))&&0!=i.length?i[0]:a.documentElement).appendChild(h),l)).then(function(){nR()&&e()}).Ca(function(e){clearTimeout(m),n.a=null,t(e)})})})},v(nk),nN.prototype.confirm=function(e){return nn(this.a.confirm(e)).Ca(this.g)},nF.prototype.a=null;var nB=0;function nU(e){this.s=e,this.a=this.h=this.j=this.g=null}function nV(e,t){this.name=e,this.value=t}nF.prototype.reset=function(e,t,i,n,r){"number"==typeof r||nB++,this.h=n||P(),this.j=e,this.s=t,this.g=i,delete this.a},nV.prototype.toString=function(){return this.name};var nG=new nV("SEVERE",1e3),nj=new nV("WARNING",900),nW=new nV("CONFIG",700);nU.prototype.log=function(e,t,i){if(e.value>=function e(t){return t.j?t.j:t.g?e(t.g):(k("Root logger has no level set."),null)}(this).value)for(E(t)&&(t=t()),e=new nF(e,String(t),this.s),i&&(e.a=i),i=this;i;){var n=i,r=e;if(n.a)for(var s=0;t=n.a[s];s++)t(r);i=i.g}};var nY={},nH=null;function nz(){nH||(nH=new nU(""),nY[""]=nH,nH.j=nW)}function nX(){this.a=P()}var nq=null;function nK(e){this.j=e||"",nq||(nq=new nX),this.s=nq}function nJ(e){return 10>e?"0"+e:String(e)}function n$(e){nK.call(this,e)}function nQ(){this.s=_(this.h,this),this.a=new n$,this.a.g=!1,this.a.h=!1,this.g=this.a.a=!1,this.j={}}nX.prototype.set=function(e){this.a=e},nX.prototype.reset=function(){this.set(P())},nX.prototype.get=function(){return this.a},nK.prototype.a=!0,nK.prototype.g=!0,nK.prototype.h=!1,R(n$,nK),nQ.prototype.h=function(e){if(!this.j[e.g]){var t,i,n=function(e,t){var i=[];if(i.push(e.j," "),e.g){var n=new Date(t.h);i.push("[",nJ(n.getFullYear()-2e3)+nJ(n.getMonth()+1)+nJ(n.getDate())+" "+nJ(n.getHours())+":"+nJ(n.getMinutes())+":"+nJ(n.getSeconds())+"."+nJ(Math.floor(n.getMilliseconds()/10)),"] ")}return i.push("[",function(e,t){t=(e=(e.h-t)/1e3).toFixed(3);var i=0;if(1>e)i=2;else for(;100>e;)i++,e*=10;for(;0=nG.value)return"error";if(e.value>=nj.value)return"warn";if(e.value>=nW.value)return"log"}return"debug"}(e.j),i=e.a,nZ[t]?nZ[t](n,i||""):nZ.log(n,i||""))}};var nZ=u.console;function n0(e,t){var i=ri;i&&i.log(nG,e,t)}ri=function e(t){if(nz(),!(i=nY[t])){i=new nU(t);var i,n=t.lastIndexOf("."),r=t.substr(n+1);(n=e(t.substr(0,n))).h||(n.h={}),n.h[r]=i,i.g=n,nY[t]=i}return i}("firebaseui");var n1=new nQ;if(1!=n1.g){nz(),rn=nH;var n2,n3,n5,n4,n9,n6,n7,n8,re,rt,ri,rn,rr=n1.s;rn.a||(rn.a=[]),rn.a.push(rr),n1.g=!0}function rs(e){var t=ri;t&&t.log(nj,e,void 0)}function ra(){this.a=("undefined"==typeof document?null:document)||{cookie:""}}function ro(e){e=(e.a.cookie||"").split(";");for(var t,i,n=[],r=[],s=0;si?"":0==i?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(P()+1e3*i).toUTCString(),this.a.cookie=e+"="+t+r+n+i+s},e.get=function(e,t){for(var i,n=e+"=",r=(this.a.cookie||"").split(";"),s=0;s>=8),t[i++]=r}return t}function rm(e){for(this.i=e,this.g=this.i.length/4,this.j=this.g+6,this.h=[[],[],[],[]],this.s=[[],[],[],[]],this.a=Array(rv*(this.j+1)),e=0;er;r++)i=t[i=4*r+n],e.h[n][r]=i}function rb(e){for(var t=[],i=0;in;n++)t[4*n+i]=e.h[i][n];return t}function rx(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]^=e.a[4*t+n][i]}function rE(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]=t[e.h[i][n]]}function rw(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][i]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][(i+t)%rv]}function rT(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][(i+t)%rv]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][i]}function rS(e){e[0]=rA[e[0]],e[1]=rA[e[1]],e[2]=rA[e[2]],e[3]=rA[e[3]]}var rA=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rC=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],r_=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],rI=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,27,25,31,29,19,17,23,21,11,9,15,13,3,1,7,5,59,57,63,61,51,49,55,53,43,41,47,45,35,33,39,37,91,89,95,93,83,81,87,85,75,73,79,77,67,65,71,69,123,121,127,125,115,113,119,117,107,105,111,109,99,97,103,101,155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229],rO=[0,3,6,5,12,15,10,9,24,27,30,29,20,23,18,17,48,51,54,53,60,63,58,57,40,43,46,45,36,39,34,33,96,99,102,101,108,111,106,105,120,123,126,125,116,119,114,113,80,83,86,85,92,95,90,89,72,75,78,77,68,71,66,65,192,195,198,197,204,207,202,201,216,219,222,221,212,215,210,209,240,243,246,245,252,255,250,249,232,235,238,237,228,231,226,225,160,163,166,165,172,175,170,169,184,187,190,189,180,183,178,177,144,147,150,149,156,159,154,153,136,139,142,141,132,135,130,129,155,152,157,158,151,148,145,146,131,128,133,134,143,140,137,138,171,168,173,174,167,164,161,162,179,176,181,182,191,188,185,186,251,248,253,254,247,244,241,242,227,224,229,230,239,236,233,234,203,200,205,206,199,196,193,194,211,208,213,214,223,220,217,218,91,88,93,94,87,84,81,82,67,64,69,70,79,76,73,74,107,104,109,110,103,100,97,98,115,112,117,118,127,124,121,122,59,56,61,62,55,52,49,50,35,32,37,38,47,44,41,42,11,8,13,14,7,4,1,2,19,16,21,22,31,28,25,26],rP=[0,9,18,27,36,45,54,63,72,65,90,83,108,101,126,119,144,153,130,139,180,189,166,175,216,209,202,195,252,245,238,231,59,50,41,32,31,22,13,4,115,122,97,104,87,94,69,76,171,162,185,176,143,134,157,148,227,234,241,248,199,206,213,220,118,127,100,109,82,91,64,73,62,55,44,37,26,19,8,1,230,239,244,253,194,203,208,217,174,167,188,181,138,131,152,145,77,68,95,86,105,96,123,114,5,12,23,30,33,40,51,58,221,212,207,198,249,240,235,226,149,156,135,142,177,184,163,170,236,229,254,247,200,193,218,211,164,173,182,191,128,137,146,155,124,117,110,103,88,81,74,67,52,61,38,47,16,25,2,11,215,222,197,204,243,250,225,232,159,150,141,132,187,178,169,160,71,78,85,92,99,106,113,120,15,6,29,20,43,34,57,48,154,147,136,129,190,183,172,165,210,219,192,201,246,255,228,237,10,3,24,17,46,39,60,53,66,75,80,89,102,111,116,125,161,168,179,186,133,140,151,158,233,224,251,242,205,196,223,214,49,56,35,42,21,28,7,14,121,112,107,98,93,84,79,70],rM=[0,11,22,29,44,39,58,49,88,83,78,69,116,127,98,105,176,187,166,173,156,151,138,129,232,227,254,245,196,207,210,217,123,112,109,102,87,92,65,74,35,40,53,62,15,4,25,18,203,192,221,214,231,236,241,250,147,152,133,142,191,180,169,162,246,253,224,235,218,209,204,199,174,165,184,179,130,137,148,159,70,77,80,91,106,97,124,119,30,21,8,3,50,57,36,47,141,134,155,144,161,170,183,188,213,222,195,200,249,242,239,228,61,54,43,32,17,26,7,12,101,110,115,120,73,66,95,84,247,252,225,234,219,208,205,198,175,164,185,178,131,136,149,158,71,76,81,90,107,96,125,118,31,20,9,2,51,56,37,46,140,135,154,145,160,171,182,189,212,223,194,201,248,243,238,229,60,55,42,33,16,27,6,13,100,111,114,121,72,67,94,85,1,10,23,28,45,38,59,48,89,82,79,68,117,126,99,104,177,186,167,172,157,150,139,128,233,226,255,244,197,206,211,216,122,113,108,103,86,93,64,75,34,41,52,63,14,5,24,19,202,193,220,215,230,237,240,251,146,153,132,143,190,181,168,163],rR=[0,13,26,23,52,57,46,35,104,101,114,127,92,81,70,75,208,221,202,199,228,233,254,243,184,181,162,175,140,129,150,155,187,182,161,172,143,130,149,152,211,222,201,196,231,234,253,240,107,102,113,124,95,82,69,72,3,14,25,20,55,58,45,32,109,96,119,122,89,84,67,78,5,8,31,18,49,60,43,38,189,176,167,170,137,132,147,158,213,216,207,194,225,236,251,246,214,219,204,193,226,239,248,245,190,179,164,169,138,135,144,157,6,11,28,17,50,63,40,37,110,99,116,121,90,87,64,77,218,215,192,205,238,227,244,249,178,191,168,165,134,139,156,145,10,7,16,29,62,51,36,41,98,111,120,117,86,91,76,65,97,108,123,118,85,88,79,66,9,4,19,30,61,48,39,42,177,188,171,166,133,136,159,146,217,212,195,206,237,224,247,250,183,186,173,160,131,142,153,148,223,210,197,200,235,230,241,252,103,106,125,112,83,94,73,68,15,2,21,24,59,54,33,44,12,1,22,27,56,53,34,47,100,105,126,115,80,93,74,71,220,209,198,203,232,229,242,255,180,185,174,163,128,141,154,151],rL=[0,14,28,18,56,54,36,42,112,126,108,98,72,70,84,90,224,238,252,242,216,214,196,202,144,158,140,130,168,166,180,186,219,213,199,201,227,237,255,241,171,165,183,185,147,157,143,129,59,53,39,41,3,13,31,17,75,69,87,89,115,125,111,97,173,163,177,191,149,155,137,135,221,211,193,207,229,235,249,247,77,67,81,95,117,123,105,103,61,51,33,47,5,11,25,23,118,120,106,100,78,64,82,92,6,8,26,20,62,48,34,44,150,152,138,132,174,160,178,188,230,232,250,244,222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,52,58,40,38,124,114,96,110,68,74,88,86,55,57,43,37,15,1,19,29,71,73,91,85,127,113,99,109,215,217,203,197,239,225,243,253,167,169,187,181,159,145,131,141];function rD(e,t){e=new rm(rN(e)),t=rg(t);for(var i,n=t.splice(0,16),r="";n.length;){i=16-n.length;for(var s=0;so;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rI[a[0]]^rO[a[1]]^a[2]^a[3],s[1][o]=a[0]^rI[a[1]]^rO[a[2]]^a[3],s[2][o]=a[0]^a[1]^rI[a[2]]^rO[a[3]],s[3][o]=rO[a[0]]^a[1]^a[2]^rI[a[3]];rx(i,n)}rE(i,rA),rw(i),rx(i,i.j),r+=U(rb(i),function(e){return 1<(e=e.toString(16)).length?e:"0"+e}).join(""),n=t.splice(0,16)}return r}function rk(e,t){e=new rm(rN(e));for(var i=[],n=0;no;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rL[a[0]]^rM[a[1]]^rR[a[2]]^rP[a[3]],s[1][o]=rP[a[0]]^rL[a[1]]^rM[a[2]]^rR[a[3]],s[2][o]=rR[a[0]]^rP[a[1]]^rL[a[2]]^rM[a[3]],s[3][o]=rM[a[0]]^rR[a[1]]^rP[a[2]]^rL[a[3]]}if(rT(n),rE(n,rC),rx(n,0),8192>=(n=rb(n)).length)n=String.fromCharCode.apply(null,n);else{for(s=0,r="";s=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,i)}(n,s,s+8192));n=r}t+=n,r=i.splice(0,16)}return t.replace(/(\x00)+$/,"")}function rN(e){e=rg(e.substring(0,32));for(var t=32-e.length,i=0;i=i.length)throw ea;var n=i.key(t++);if(e)return n;if(!f(n=i.getItem(n)))throw"Storage mechanism: Invalid value was encountered";return n},n},e.clear=function(){this.a.clear()},e.key=function(e){return this.a.key(e)},R(rz,rY),R(rX,rY),R(rq,rW),rq.prototype.set=function(e,t){this.g.set(this.a+e,t)},rq.prototype.get=function(e){return this.g.get(this.a+e)},rq.prototype.ra=function(e){this.g.ra(this.a+e)},rq.prototype.ha=function(e){var t=this.g.ha(!0),i=this,n=new eo;return n.next=function(){for(var n=t.next();n.substr(0,i.a.length)!=i.a;)n=t.next();return e?n.substr(i.a.length):i.g.get(n)},n},rH(new rz);var rK=new rX,rJ=new rj(rH(rK)?new rq(rK,"firebaseui"):null),r$={name:"pendingEmailCredential",storage:rJ},rQ={name:"redirectStatus",storage:rJ},rZ={name:"redirectUrl",storage:rJ},r0={name:"emailForSignIn",storage:new rj(new rl(3600,"/"))},r1={name:"pendingEncryptedCredential",storage:new rj(new rl(3600,"/"))};function r2(e,t){return e.storage.get(t?e.name+":"+t:e.name)}function r3(e,t){e.storage.a.ra(t?e.name+":"+t:e.name)}function r5(e,t,i){e.storage.set(i?e.name+":"+i:e.name,t)}function r4(e){return r2(rZ,e)||null}function r9(e){return rf(e=r2(r$,e)||null)}function r6(e){r3(r$,e)}function r7(e){return(e=r2(rQ,e)||null)&&void 0!==e.tenantId?new rp(e.tenantId):null}function r8(){this.W={}}function se(e,t,i){if(t.toLowerCase() in e.W)throw Error("Configuration "+t+" has already been defined.");e.W[t.toLowerCase()]=i}function st(e,t,i){if(!(t.toLowerCase() in e.W))throw Error("Configuration "+t+" is not defined.");e.W[t.toLowerCase()]=i}function si(e,t){if(!(e=e.get(t)))throw Error("Configuration "+t+" is required.");return e}function sn(){this.g=void 0,this.a={}}function sr(e,t,i,n){for(var r=0;r=e||96<=e&&106>=e||65<=e&&90>=e||(eJ||eX)&&0==e)return!0;switch(e){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:return!0;case 173:return eK;default:return!1}}function at(e){return eK?e=function(e){switch(e){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return e}}(e):eQ&&eJ&&93===e&&(e=91),e}function ai(e){iG.call(this),this.a=e,iO(e,"keydown",this.g,!1,this),iO(e,"click",this.h,!1,this)}function an(e,t){var i=new as(t);if(ij(e,i)){i=new ar(t);try{ij(e,i)}finally{t.stopPropagation()}}}function ar(e){iv.call(this,e.a),this.type="action"}function as(e){iv.call(this,e.a),this.type="beforeaction"}function aa(e){iG.call(this),this.a=e,e=ez?"focusout":"blur",this.g=iO(this.a,ez?"focusin":"focus",this,!ez),this.h=iO(this.a,e,this,!ez)}function ao(e,t){iG.call(this),this.g=e||1,this.a=t||u,this.h=_(this.gc,this),this.j=P()}function ah(e){e.Ka=!1,e.aa&&(e.a.clearTimeout(e.aa),e.aa=null)}function ac(e){ia.call(this),this.g=e,this.a={}}R(ai,iG),ai.prototype.g=function(e){(13==e.keyCode||eJ&&3==e.keyCode)&&an(this,e)},ai.prototype.h=function(e){an(this,e)},ai.prototype.o=function(){ai.K.o.call(this),iR(this.a,"keydown",this.g,!1,this),iR(this.a,"click",this.h,!1,this),delete this.a},R(ar,iv),R(as,iv),R(aa,iG),aa.prototype.handleEvent=function(e){var t=new iv(e.a);t.type="focusin"==e.type||"focus"==e.type?"focusin":"focusout",ij(this,t)},aa.prototype.o=function(){aa.K.o.call(this),iL(this.g),iL(this.h),delete this.a},R(ao,iG),(e=ao.prototype).Ka=!1,e.aa=null,e.gc=function(){if(this.Ka){var e=P()-this.j;0=e.keyCode)return!1;if(ae(e.keyCode))return!0;switch(e.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!eK;default:return 166>e.keyCode||183t.charCode&&ae(n)?t.charCode:0):eH&&!eJ?r=ae(n=this.X)?t.keyCode:0:("keypress"==e.type?(ax&&(i=this.Ua),t.keyCode==t.charCode?32>t.keyCode?(n=t.keyCode,r=0):(n=this.X,r=t.charCode):(n=t.keyCode||this.X,r=t.charCode||0)):(n=t.keyCode||this.X,r=t.charCode||0),eQ&&63==r&&224==n&&(n=191));var s=n=at(n);n?63232<=n&&n in av?s=av[n]:25==n&&e.shiftKey&&(s=9):t.keyIdentifier&&t.keyIdentifier in ay&&(s=ay[t.keyIdentifier]),eK&&ab&&"keypress"==e.type&&!s8(s,this.R,e.shiftKey,e.ctrlKey,i,e.metaKey)||(e=s==this.R,this.R=s,(t=new aw(s,r,e,t)).altKey=i,ij(this,t))},e.N=function(){return this.qa},e.o=function(){am.K.o.call(this),aE(this)},R(aw,iv),aT.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"},aT.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},aT.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},aT.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this};var a_={thin:2,medium:4,thick:6};function aI(e,t){if("none"==(e.currentStyle?e.currentStyle[t+"Style"]:null))return 0;var i=e.currentStyle?e.currentStyle[t+"Width"]:null;if(i in a_)e=a_[i];else if(/^\d+px?$/.test(i))e=parseInt(i,10);else{t=e.style.left;var n=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,e.style.left=i,i=e.style.pixelLeft,e.style.left=t,e.runtimeStyle.left=n,e=+i}return e}function aO(){}function aP(e){iG.call(this),this.s=e||tE(),this.cb=null,this.na=!1,this.g=null,this.L=void 0,this.oa=this.Ea=this.Y=null}function aM(e,t){return e.g?tT(t,e.g||e.s.a):null}function aR(e){return e.L||(e.L=new ac(e)),e.L}function aL(e,t){e.Ea&&F(e.Ea,t,void 0)}function aD(e,t){var i=tP(e,"firebaseui-textfield");t?(s9(e,"firebaseui-input-invalid"),s4(e,"firebaseui-input"),i&&s9(i,"firebaseui-textfield-invalid")):(s9(e,"firebaseui-input"),s4(e,"firebaseui-input-invalid"),i&&s4(i,"firebaseui-textfield-invalid"))}function ak(e,t,i){ic(e,I(il,t=new af(t))),au(aR(e),t,"input",i)}function aN(e,t,i){ic(e,I(il,t=new am(t))),au(aR(e),t,"key",function(e){13==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i(e))})}function aF(e,t,i){ic(e,I(il,t=new ai(t))),au(aR(e),t,"action",function(e){e.stopPropagation(),e.preventDefault(),i(e)})}function aB(e){s4(e,"firebaseui-hidden")}function aU(e,t){t&&tO(e,t),s9(e,"firebaseui-hidden")}function aV(e){return!s5(e,"firebaseui-hidden")&&"none"!=e.style.display}function aG(e){var t=(e=e||{}).email,i=e.disabled,n='

')}function aj(e){e=(e=e||{}).label;var t='")}function aW(){return tH(""+aj({label:tX("Sign In")}))}function aY(){return tH(""+aj({label:tX("Save")}))}function aH(){return tH(""+aj({label:tX("Continue")}))}function az(e){e=(e=e||{}).label;var t='
')}function aX(){var e='

')}function aq(){return tH('Trouble signing in?')}function aK(e){e=(e=e||{}).label;var t='")}function aJ(e){var t="";return e.F&&e.D&&(t+=''),tH(t)}function a$(e){var t="";return e.F&&e.D&&(t+='

By continuing, you are indicating that you accept our Terms of Service and Privacy Policy.

'),tH(t)}function aQ(e){return tH(e='

'+tG(e.message)+'  Dismiss

')}function aZ(e){var t=e.content;return tH(''+tG(t)+"")}function a0(e){var t=e.message;return tH(aZ({content:tq('
'+tG(t)+"
")}))}function a1(e){var t='
';e=e.items;for(var i=e.length,n=0;n'+(r.Ma?'
':"")+'
'+tG(r.label)+"
"}return tH(t=""+aZ({Ab:tX("firebaseui-list-box-dialog"),content:tq(t+"
")}))}function a2(e){return tH((e=e||{}).tb?'
':'
')}function a3(e,t){return tY((e=(e=e||{}).ga).S?e.S:t.hb[e.providerId]?""+t.hb[e.providerId]:e.providerId&&0==e.providerId.indexOf("saml.")?e.providerId.substring(5):e.providerId&&0==e.providerId.indexOf("oidc.")?e.providerId.substring(5):""+e.providerId)}function a5(e){a6(e,"upgradeElement")}function a4(e){a6(e,"downgradeElements")}v(aO),aO.prototype.a=0,R(aP,iG),(e=aP.prototype).Lb=aO.Xa(),e.N=function(){return this.g},e.Za=function(e){if(this.Y&&this.Y!=e)throw Error("Method not supported");aP.K.Za.call(this,e)},e.kb=function(){this.g=this.s.a.createElement("DIV")},e.render=function(e){if(this.na)throw Error("Component already rendered");this.g||this.kb(),e?e.insertBefore(this.g,null):this.s.a.body.appendChild(this.g),this.Y&&!this.Y.na||this.v()},e.v=function(){this.na=!0,aL(this,function(e){!e.na&&e.N()&&e.v()})},e.ya=function(){aL(this,function(e){e.na&&e.ya()}),this.L&&ad(this.L),this.na=!1},e.o=function(){this.na&&this.ya(),this.L&&(this.L.m(),delete this.L),aL(this,function(e){e.m()}),this.g&&t_(this.g),this.Y=this.g=this.oa=this.Ea=null,aP.K.o.call(this)},e.removeChild=function(e,t){if(e){var i=f(e)?e:e.cb||(e.cb=":"+(e.Lb.a++).toString(36));if(e=this.oa&&i&&(null!==(e=this.oa)&&i in e?e[i]:void 0)||null,i&&e){var n=this.oa;if(i in n&&delete n[i],j(this.Ea,e),t&&(e.ya(),e.g&&t_(e.g)),null==(t=e))throw Error("Unable to set parent component");t.Y=null,aP.K.Za.call(t,null)}}if(!e)throw Error("Child is not in parent component");return e},aQ.a="firebaseui.auth.soy2.element.infoBar",a0.a="firebaseui.auth.soy2.element.progressDialog",a1.a="firebaseui.auth.soy2.element.listBoxDialog",a2.a="firebaseui.auth.soy2.element.busyIndicator";var a9=["mdl-js-textfield","mdl-js-progress","mdl-js-spinner","mdl-js-button"];function a6(e,t){e&&window.componentHandler&&window.componentHandler[t]&&a9.forEach(function(i){s5(e,i)&&window.componentHandler[t](e),F(tw(i,e),function(e){window.componentHandler[t](e)})})}function a7(e,t,i){if(a8.call(this),document.body.appendChild(e),e.showModal||window.dialogPolyfill.registerDialog(e),e.showModal(),a5(e),t&&aF(this,e,function(t){var i=e.getBoundingClientRect();(t.clientX
'+(t?aK(null):"")+aj(null)+'
")}function ou(e,t,i){return t=(e=e||{}).ia,tH(e='")}function od(e,t,i){var n=(e=e||{}).Tb;t=e.Ta;var r=e.ia;return i='",tH(i)}function of(e,t,i){return t=(e=e||{}).Ta,tH(e='

Recover password

Get instructions sent to this email that explain how to reset your password

'+aG(e)+'
'+(t?aK(null):"")+aj({label:tX("Send")})+'
")}function op(e,t,i){t=e.G;var n="";return n+='

Check your email

'+(e="Follow the instructions sent to "+tG(e.email)+" to recover your password")+'

',t&&(n+='
'+aj({label:tX("Done")})+"
"),tH(n+='
")}function og(e,t,i){return tH('
'+a2(null,null,i)+"
")}function om(e,t,i){return tH('
'+a2({tb:!0},null,i)+"
")}function ov(){return tH('
')}function oy(e,t,i){return t='",tH(t)}function ob(e,t,i){return e='

Trouble getting email?

Try these common fixes:

  • Check if the email was marked as spam or filtered.
  • Check your internet connection.
  • Check that you did not misspell your email.
  • Check that your inbox space is not running out or other inbox settings related issues.

If the steps above didn\'t work, you can resend the email. Note that this will deactivate the link in the older email.

'+aK({label:tX("Back")})+'
",tH(e)}function ox(e,t,i){return tH(e='")}function oE(){return tH('

New device or browser detected

Try opening the link using the same device or browser where you started the sign-in process.

'+aK({label:tX("Dismiss")})+"
")}function ow(){return tH('

Session ended

The session associated with this sign-in request has either expired or was cleared.

'+aK({label:tX("Dismiss")})+"
")}function oT(e,t,i){return tH('

Sign in

You already have an account

'+(e="You’ve already used "+tG(e.email)+" to sign in. Enter your password for that account.")+"

"+aX()+'
'+aW()+'
")}function oS(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='")}function oA(e,t,i){t="";var n=""+a3(e,i);return tH(t+='")}function oC(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='

Sign in

You already have an account

'+(n="You’ve already used "+tG(n)+". Sign in with "+tG(e)+" to continue.")+'

'+aj({label:tX("Sign in with "+e)})+'
")}function o_(e,t,i){var n=(e=e||{}).kc;t=e.yb,e=e.Eb;var r='

Not Authorized

';return n?r+=n=""+tG(n)+" is not authorized to view the requested page.":r+="User is not authorized to view the requested page.",r+="

",t&&(r+='

'+(t="Please contact "+tG(t)+" for authorization.")+"

"),r+='
'+aK({label:tX("Back")})+'
")}function oI(e,t,i){return tH('

Sign in

'+(e="To continue sign in with "+tG(e.email)+" on this device, you have to recover the password.")+'

'+aK(null)+aj({label:tX("Recover password")})+'
")}function oO(e){var t="";return tH(t+='

Reset your password

for '+tG(e.email)+"

"+az(function(e){function t(){}var i={label:tX("New password")};for(var n in t.prototype=e,e=new t,i)e[n]=i[n];return e}(e))+'
'+aY()+"
")}function oP(e){return tH(e='

Password changed

You can now sign in with your new password

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oM(e){return tH(e='

Try resetting your password again

Your request to reset your password has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oR(e){var t=e.G,i="";return tH(i+='

Updated email address

'+(e="Your sign-in email address has been changed back to "+tG(e.email)+".")+'

If you didn’t ask to change your sign-in email, it’s possible someone is trying to access your account and you should change your password right away.

'+(t?'
'+aH()+"
":"")+"
")}function oL(e){return tH(e='

Unable to update your email address

There was a problem changing your sign-in email back.

If you try again and still can’t reset your email, try asking your administrator for help.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oD(e){return tH(e='

Your email has been verified

You can now sign in with your new account

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function ok(e){return tH(e='

Try verifying your email again

Your request to verify your email has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oN(e){var t=e.G,i="";return tH(i+='

Your email has been verified and changed

'+(e="You can now sign in with your new email "+tG(e.email)+".")+'

'+(t?'
'+aH()+"
":"")+"
")}function oF(e){return tH(e='

Try updating your email again

Your request to verify and update your email has expired or the link has already been used.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oB(e){var t=e.factorId,i=e.phoneNumber;e=e.G;var n='

Removed second factor

';return"phone"===t?n+=t="The "+tG(t)+" "+tG(i)+" was removed as a second authentication step.":n+="The device or app was removed as a second authentication step.",tH(n+='

If you don\'t recognize this device, someone might be trying to access your account. Consider changing your password right away.

'+(e?'
'+aH()+"
":"")+"
")}function oU(e){return tH(e='

Couldn\'t remove your second factor

Something went wrong removing your second factor.

Try removing it again. If that doesn\'t work, contact support for assistance.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oV(e){var t=e.zb;return e='

Error encountered

'+tG(e.errorMessage)+'

',t&&(e+=aj({label:tX("Retry")})),tH(e+"
")}function oG(e){return tH(e='

Error encountered

'+tG(e.errorMessage)+"

")}function oj(e,t,i){var n=e.Qb;return tH('

Sign in

'+(e="Continue with "+tG(e.jc)+"?")+'

'+(n="You originally wanted to sign in with "+tG(n))+'

'+aK(null)+aj({label:tX("Continue")})+'
")}function oW(e,t,i){var n='")}function oY(e,t,i){var n,r=(e=e||{}).Gb,s=e.Va;return t=e.ia,n=(e='")}function oH(e,t,i){t=(e=e||{}).phoneNumber;var n="";return e='Enter the 6-digit code we sent to ‎'+tG(t)+"",tG(t),t=n,i='"))}function oz(){return tH('

Sign Out

You are now successfully signed out.

')}function oX(e,t,i){var n='
    ';t=(e=e.ec).length;for(var r=0;r',s.V?a+=tG(s.V):a+=s="Sign in to "+tG(s.displayName),n+='
  • '+(a=tH(a+''+o+""))+"
  • "}return tH(n+='
")}function oq(e,t,i){return tH('

Sign in

'+aG(null)+'
'+aj(null)+'
")}function oK(){return aM(this,"firebaseui-id-submit")}function oJ(){return aM(this,"firebaseui-id-secondary-link")}function o$(e,t){aF(this,oK.call(this),function(t){e(t)});var i=oJ.call(this);i&&t&&aF(this,i,function(e){t(e)})}function oQ(){return aM(this,"firebaseui-id-password")}function oZ(){return aM(this,"firebaseui-id-password-error")}function o0(){var e=oQ.call(this),t=oZ.call(this);ak(this,e,function(){aV(t)&&(aD(e,!0),aB(t))})}function o1(){var e=oQ.call(this),t=oZ.call(this);return s6(e)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("Enter your password").toString()),t=!1),t?s6(e):null}function o2(e,t,i,n,r,s){oa.call(this,oT,{email:e},s,"passwordLinking",{F:n,D:r}),this.w=t,this.H=i}R(os,im),R(oa,aP),(e=oa.prototype).kb=function(){var e=tF(this.fb,this.eb,this.Z,this.s);a5(e),this.g=e},e.v=function(){if(oa.K.v.call(this),iz(oo(this),new os("pageEnter",oo(this),{pageId:this.Ga})),this.bb()&&this.Z.F){var e=this.Z.F;aF(this,this.bb(),function(){e()})}if(this.ab()&&this.Z.D){var t=this.Z.D;aF(this,this.ab(),function(){t()})}},e.ya=function(){iz(oo(this),new os("pageExit",oo(this),{pageId:this.Ga})),oa.K.ya.call(this)},e.o=function(){window.clearTimeout(this.ca),this.eb=this.fb=this.ca=null,this.Fa=!1,this.A=null,a4(this.N()),oa.K.o.call(this)},e.I=function(e,t,i,n){function r(){if(a.T)return null;a.Fa=!1,window.clearTimeout(a.ca),a.ca=null,a.A&&(a4(a.A),t_(a.A),a.A=null)}var s,a=this;return a.Fa?null:(a.Fa=!0,s=s5(a.N(),"firebaseui-use-spinner"),a.ca=window.setTimeout(function(){a.N()&&null===a.A&&(a.A=tF(a2,{tb:s},null,a.s),a.N().appendChild(a.A),a5(a.A))},500),e.apply(null,t).then(i,n).then(r,r))},O(oa.prototype,{a:function(e){ot.call(this);var t=tF(aQ,{message:e},null,this.s);this.N().appendChild(t),aF(this,on.call(this),function(){t_(t)})},yc:ot,Ac:oi,zc:on,$:function(e,t){e=tF(a0,{Ma:e,message:t},null,this.s),a7.call(this,e)},h:a8,Cb:oe,Cc:function(){return aM(this,"firebaseui-tos")},bb:function(){return aM(this,"firebaseui-tos-link")},ab:function(){return aM(this,"firebaseui-pp-link")},Dc:function(){return aM(this,"firebaseui-tos-list")}}),ol.a="firebaseui.auth.soy2.page.signIn",ou.a="firebaseui.auth.soy2.page.passwordSignIn",od.a="firebaseui.auth.soy2.page.passwordSignUp",of.a="firebaseui.auth.soy2.page.passwordRecovery",op.a="firebaseui.auth.soy2.page.passwordRecoveryEmailSent",og.a="firebaseui.auth.soy2.page.callback",om.a="firebaseui.auth.soy2.page.spinner",ov.a="firebaseui.auth.soy2.page.blank",oy.a="firebaseui.auth.soy2.page.emailLinkSignInSent",ob.a="firebaseui.auth.soy2.page.emailNotReceived",ox.a="firebaseui.auth.soy2.page.emailLinkSignInConfirmation",oE.a="firebaseui.auth.soy2.page.differentDeviceError",ow.a="firebaseui.auth.soy2.page.anonymousUserMismatch",oT.a="firebaseui.auth.soy2.page.passwordLinking",oS.a="firebaseui.auth.soy2.page.emailLinkSignInLinking",oA.a="firebaseui.auth.soy2.page.emailLinkSignInLinkingDifferentDevice",oC.a="firebaseui.auth.soy2.page.federatedLinking",o_.a="firebaseui.auth.soy2.page.unauthorizedUser",oI.a="firebaseui.auth.soy2.page.unsupportedProvider",oO.a="firebaseui.auth.soy2.page.passwordReset",oP.a="firebaseui.auth.soy2.page.passwordResetSuccess",oM.a="firebaseui.auth.soy2.page.passwordResetFailure",oR.a="firebaseui.auth.soy2.page.emailChangeRevokeSuccess",oL.a="firebaseui.auth.soy2.page.emailChangeRevokeFailure",oD.a="firebaseui.auth.soy2.page.emailVerificationSuccess",ok.a="firebaseui.auth.soy2.page.emailVerificationFailure",oN.a="firebaseui.auth.soy2.page.verifyAndChangeEmailSuccess",oF.a="firebaseui.auth.soy2.page.verifyAndChangeEmailFailure",oB.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionSuccess",oU.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionFailure",oV.a="firebaseui.auth.soy2.page.recoverableError",oG.a="firebaseui.auth.soy2.page.unrecoverableError",oj.a="firebaseui.auth.soy2.page.emailMismatch",oW.a="firebaseui.auth.soy2.page.providerSignIn",oY.a="firebaseui.auth.soy2.page.phoneSignInStart",oH.a="firebaseui.auth.soy2.page.phoneSignInFinish",oz.a="firebaseui.auth.soy2.page.signOut",oX.a="firebaseui.auth.soy2.page.selectTenant",oq.a="firebaseui.auth.soy2.page.providerMatchByEmail",a(o2,oa),o2.prototype.v=function(){this.P(),this.M(this.w,this.H),oc(this,this.i(),this.w),this.i().focus(),oa.prototype.v.call(this)},o2.prototype.o=function(){this.w=null,oa.prototype.o.call(this)},o2.prototype.j=function(){return s6(aM(this,"firebaseui-id-email"))},O(o2.prototype,{i:oQ,B:oZ,P:o0,u:o1,ea:oK,ba:oJ,M:o$});var o3=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function o5(){return aM(this,"firebaseui-id-email")}function o4(){return aM(this,"firebaseui-id-email-error")}function o9(e){var t=o5.call(this),i=o4.call(this);ak(this,t,function(){aV(i)&&(aD(t,!0),aB(i))}),e&&aN(this,t,function(){e()})}function o6(){return z(s6(o5.call(this))||"")}function o7(){var e=o5.call(this),t=o4.call(this),i=s6(e)||"";return i?o3.test(i)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("That email address isn't correct").toString()),t=!1):(aD(e,!1),aU(t,tY("Enter your email address to continue").toString()),t=!1),t?z(s6(e)):null}function o8(e,t,i,n,r,s,a){oa.call(this,ou,{email:i,ia:!!s},a,"passwordSignIn",{F:n,D:r}),this.w=e,this.H=t}function he(e,t,i,n,r,s){oa.call(this,e,t,n,r||"notice",s),this.i=i||null}function ht(e,t,i,n,r){he.call(this,op,{email:e,G:!!t},t,r,"passwordRecoveryEmailSent",{F:i,D:n})}function hi(e,t){he.call(this,oD,{G:!!e},e,t,"emailVerificationSuccess")}function hn(e,t){he.call(this,ok,{G:!!e},e,t,"emailVerificationFailure")}function hr(e,t,i){he.call(this,oN,{email:e,G:!!t},t,i,"verifyAndChangeEmailSuccess")}function hs(e,t){he.call(this,oF,{G:!!e},e,t,"verifyAndChangeEmailFailure")}function ha(e,t){he.call(this,oU,{G:!!e},e,t,"revertSecondFactorAdditionFailure")}function ho(e){he.call(this,oz,void 0,void 0,e,"signOut")}function hh(e,t){he.call(this,oP,{G:!!e},e,t,"passwordResetSuccess")}function hc(e,t){he.call(this,oM,{G:!!e},e,t,"passwordResetFailure")}function hl(e,t){he.call(this,oL,{G:!!e},e,t,"emailChangeRevokeFailure")}function hu(e,t,i){he.call(this,oV,{errorMessage:e,zb:!!t},t,i,"recoverableError")}function hd(e,t){he.call(this,oG,{errorMessage:e},void 0,t,"unrecoverableError")}function hf(e){if("auth/invalid-credential"===e.code&&e.message&&-1!==e.message.indexOf("error=consent_required"))return{code:"auth/user-cancelled"};if(e.message&&-1!==e.message.indexOf("HTTP Cloud Function returned an error:")){var t=JSON.parse(e.message.substring(e.message.indexOf("{"),e.message.lastIndexOf("}")+1));return{code:e.code,message:t&&t.error&&t.error.message||e.message}}return e}function hp(e,t,i,n){function r(i){if(!i.name||"cancel"!=i.name){t:{var n=i.message;try{var r=((JSON.parse(n).error||{}).message||"").toLowerCase().match(/invalid.+(access|id)_token/);if(r&&r.length){var s=!0;break t}}catch(e){}s=!1}if(s)i=oo(t),t.m(),hE(e,i,void 0,tY("Your sign-in session has expired. Please try again.").toString());else{if(s=i&&i.message||"",i.code){if("auth/email-already-in-use"==i.code||"auth/credential-already-in-use"==i.code)return;s=hv(i)}t.a(s)}}}if(cN(e),n)return hg(e,i),nn();if(!i.credential)throw Error("No credential found!");if(!cC(e).currentUser&&!i.user)throw Error("User not logged in.");try{var s,a=(s=i,cU(e),cL(e,function(t){if(e.j&&!e.j.isAnonymous&&sx(cB(e))&&!cC(e).currentUser)return cG(e).then(function(){return"password"==s.credential.providerId&&(s.credential=null),s});if(t)return cG(e).then(function(){return t.linkWithCredential(s.credential)}).then(function(e){return s.user=e.user,s.credential=e.credential,s.operationType=e.operationType,s.additionalUserInfo=e.additionalUserInfo,s},function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return cj(e,t,s.credential)});if(!s.user)throw Error('Internal error: An incompatible or outdated version of "firebase.js" may be used.');return cG(e).then(function(){return c_(e).updateCurrentUser(s.user)}).then(function(){return s.user=c_(e).currentUser,s.operationType="signIn",s.credential&&s.credential.providerId&&"password"==s.credential.providerId&&(s.credential=null),s})}))}catch(e){return n0(e.code||e.message,e),t.a(e.code||e.message),nn()}return i=a.then(function(t){hg(e,t)},r).then(void 0,r),ck(e,a),nn(i)}function hg(e,t){if(!t.user)throw Error("No user found");var i=sV(cB(e));if(sU(cB(e))&&i&&rs("Both signInSuccess and signInSuccessWithAuthResult callbacks are provided. Only signInSuccessWithAuthResult callback will be invoked."),i){i=sV(cB(e));var n=r4(cI(e))||void 0;r3(rZ,cI(e));var r=!1;ng()?((!i||i(t,n))&&(r=!0,ty(window.opener.location,hm(e,n))),i||window.close()):(!i||i(t,n))&&(r=!0,ty(window.location,hm(e,n))),r||e.reset()}else{i=t.user,t=t.credential,n=sU(cB(e)),r=r4(cI(e))||void 0,r3(rZ,cI(e));var s=!1;ng()?((!n||n(i,t,r))&&(s=!0,ty(window.opener.location,hm(e,r))),n||window.close()):(!n||n(i,t,r))&&(s=!0,ty(window.location,hm(e,r))),s||e.reset()}}function hm(e,t){if(!(e=t||cB(e).a.get("signInSuccessUrl")))throw Error("No redirect URL has been found. You must either specify a signInSuccessUrl in the configuration, pass in a redirect URL to the widget URL, or return false from the callback.");return e}function hv(e){var t={code:e.code},i="";switch((t=t||{}).code){case"auth/email-already-in-use":i+="The email address is already used by another account";break;case"auth/requires-recent-login":case"auth/user-token-expired":i+=tY("Please login again to perform this operation");break;case"auth/too-many-requests":i+="You have entered an incorrect password too many times. Please try again in a few minutes.";break;case"auth/user-cancelled":i+="Please authorize the required permissions to sign in to the application";break;case"auth/user-not-found":i+="That email address doesn't match an existing account";break;case"auth/weak-password":i+="Strong passwords have at least 6 characters and a mix of letters and numbers";break;case"auth/wrong-password":i+="The email and password you entered don't match";break;case"auth/network-request-failed":i+="A network error has occurred";break;case"auth/invalid-phone-number":i+=t7();break;case"auth/invalid-verification-code":i+=tY("Wrong code. Try again.");break;case"auth/code-expired":i+="This code is no longer valid";break;case"auth/expired-action-code":i+="This code has expired.";break;case"auth/invalid-action-code":i+="The action code is invalid. This can happen if the code is malformed, expired, or has already been used."}if(t=tY(i).toString())return t;try{return JSON.parse(e.message),n0("Internal error: "+e.message,void 0),ie().toString()}catch(t){return e.message}}function hy(e,t,i,n){function r(){var i,n;i=new rp(e.h.tenantId||null),n=cI(e),r5(rQ,{tenantId:i.a},n),ck(e,t.I(_(e.dc,e),[c],function(){if("file:"===(window.location&&window.location.protocol))return ck(e,cT(e).then(function(i){t.m(),r3(rQ,cI(e)),s2("callback",e,h,nn(i))},a))},o))}function a(n){if(r3(rQ,cI(e)),!n.name||"cancel"!=n.name)switch((n=hf(n)).code){case"auth/popup-blocked":r();break;case"auth/popup-closed-by-user":case"auth/cancelled-popup-request":case"auth/credential-already-in-use":break;case"auth/network-request-failed":case"auth/too-many-requests":case"auth/user-cancelled":t.a(hv(n));break;case"auth/admin-restricted-operation":t.m(),sI(cB(e))?s2("handleUnauthorizedUser",e,h,null,i):s2("callback",e,h,nr(n));break;default:t.m(),s2("callback",e,h,nr(n))}}function o(i){r3(rQ,cI(e)),i.name&&"cancel"==i.name||(n0("signInWithRedirect: "+i.code,void 0),i=hv(i),"blank"==t.Ga&&sF(cB(e))?(t.m(),s2("providerSignIn",e,h,i)):t.a(i))}var h=oo(t),c=function(e,t,i){var n=sy[t]&&s.default.auth[sy[t]]?new s.default.auth[sy[t]]:0==t.indexOf("saml.")?new s.default.auth.SAMLAuthProvider(t):new s.default.auth.OAuthProvider(t);if(!n)throw Error("Invalid Firebase Auth provider!");var r=sO(cB(e),t);if(n.addScope)for(var a=0;a(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n?(r=n,i=""):i=t.substring(r+1,n),n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,n=t[0]+(t[1]?"?"+t[1]:"")+t[2]):n=t,cB(this).a.get("popupMode")?(e=(window.screen.availHeight-600)/2,t=(window.screen.availWidth-500)/2,n=n||"about:blank",(e={width:500,height:600,top:0{let t=setTimeout(()=>{e(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})})}/** + */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(n)),(0,s.registerVersion)(n1,n2,"esm2017")},{"@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"3aD9C":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"__extends",()=>s),n.export(i,"__assign",()=>a),n.export(i,"__rest",()=>o),n.export(i,"__decorate",()=>h),n.export(i,"__param",()=>c),n.export(i,"__esDecorate",()=>l),n.export(i,"__runInitializers",()=>u),n.export(i,"__propKey",()=>d),n.export(i,"__setFunctionName",()=>f),n.export(i,"__metadata",()=>p),n.export(i,"__awaiter",()=>g),n.export(i,"__generator",()=>m),n.export(i,"__createBinding",()=>v),n.export(i,"__exportStar",()=>y),n.export(i,"__values",()=>b),n.export(i,"__read",()=>x),n.export(i,"__spread",()=>E),n.export(i,"__spreadArrays",()=>w),n.export(i,"__spreadArray",()=>T),n.export(i,"__await",()=>S),n.export(i,"__asyncGenerator",()=>A),n.export(i,"__asyncDelegator",()=>C),n.export(i,"__asyncValues",()=>_),n.export(i,"__makeTemplateObject",()=>I),n.export(i,"__importStar",()=>M),n.export(i,"__importDefault",()=>R),n.export(i,"__classPrivateFieldGet",()=>L),n.export(i,"__classPrivateFieldSet",()=>D),n.export(i,"__classPrivateFieldIn",()=>k),n.export(i,"__addDisposableResource",()=>N),n.export(i,"__disposeResources",()=>B),n.export(i,"__rewriteRelativeImportExtension",()=>U);var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var a=function(){return(a=Object.assign||function(e){for(var t,i=1,n=arguments.length;it.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i}function h(e,t,i,n){var r,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t){return function(i,n){t(i,n,e)}}function l(e,t,i,n,r,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,h=n.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!t&&e?n.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,f=i.length-1;f>=0;f--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,i[f])("accessor"===h?{get:u.get,set:u.set}:u[c],p);if("accessor"===h){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=a(m.get))&&(u.get=o),(o=a(m.set))&&(u.set=o),(o=a(m.init))&&r.unshift(o)}else(o=a(m))&&("field"===h?r.unshift(o):u[c]=o)}l&&Object.defineProperty(l,n.name,u),d=!0}function u(e,t,i){for(var n=arguments.length>2,r=0;r0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a}function E(){for(var e=[],t=0;t1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var i;(i=r[e](t)).value instanceof S?Promise.resolve(i.value.v).then(h,c):l(s[0][2],i)}catch(e){l(s[0][3],e)}}function h(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function C(e){var t,i;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:S(e[n](t)),done:!1}:r?r(t):t}:r}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise(function(n,r){!function(e,t,i,n){Promise.resolve(n).then(function(t){e({value:t,done:i})},t)}(n,r,(t=e[i](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return(P=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t})(e)};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=P(e),n=0;nc);var r=e("firebase/compat/app"),s=n.interopDefault(r);e("firebase/compat/auth");var a=e("dialog-polyfill"),o=n.interopDefault(a);e("material-design-lite/src/mdlComponentHandler"),e("material-design-lite/src/button/button"),e("material-design-lite/src/progress/progress"),e("material-design-lite/src/spinner/spinner"),e("material-design-lite/src/textfield/textfield");var h=arguments[3];(function(){(function(){var e,t,i="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)t=Object.setPrototypeOf;else{t:{var n={};try{n.__proto__={xb:!0},n4=n.xb;break t}catch(e){}n4=!1}t=n4?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var r=t;function a(e,t){if(e.prototype=i(t.prototype),e.prototype.constructor=e,r)r(e,t);else for(var n in t)if("prototype"!=n){if(Object.defineProperties){var s=Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(e,n,s)}else e[n]=t[n]}e.K=t.prototype}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c="undefined"!=typeof window&&window===this?this:void 0!==h&&null!=h?h:this;function l(e,t){if(t){var i=c;e=e.split(".");for(var n=0;n(t=t||0)&&(t=Math.max(t+n,0));t>>0),S=0;function A(e,t,i){return e.call.apply(e.bind,arguments)}function C(e,t,i){if(!e)throw Error();if(2/g,J=/"/g,$=/'/g,Q=/\x00/g,Z=/[\x00&<>"']/;function ee(e,t){return et?1:0}function et(e){return Z.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(X,"&")),-1!=e.indexOf("<")&&(e=e.replace(K,"<")),-1!=e.indexOf(">")&&(e=e.replace(q,">")),-1!=e.indexOf('"')&&(e=e.replace(J,""")),-1!=e.indexOf("'")&&(e=e.replace($,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Q,"�"))),e}function ei(e,t,i){for(var n in e)t.call(i,e[n],n,e)}function en(e){var t,i={};for(t in e)i[t]=e[t];return i}var er="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function es(e,t){for(var i,n,r=1;r=e.length)throw ea;if(t in e)return e[t++];t++}},i}throw Error("Not implemented")}function ec(e,t){this.g={},this.a=[],this.j=this.h=0;var i=arguments.length;if(1=n.a.length)throw ea;var r=n.a[t++];return e?r:n.g[r]},r};var ed=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ef(e,t,i,n){for(var r=i.length;0<=(t=e.indexOf(i,t))&&tn)return null;var r=e.indexOf("&",n);return(0>r||r>i)&&(r=i),n+=t.length+1,decodeURIComponent(e.substr(n,r-n).replace(/\+/g," "))}var em=/[?&]($|#)/;function ev(e,t){var i;this.h=this.A=this.j="",this.C=null,this.s=this.g="",this.i=!1,e instanceof ev?(this.i=d(t)?t:e.i,ey(this,e.j),this.A=e.A,this.h=e.h,eb(this,e.C),this.g=e.g,ex(this,eD(e.a)),this.s=e.s):e&&(i=String(e).match(ed))?(this.i=!!t,ey(this,i[1]||"",!0),this.A=ew(i[2]||""),this.h=ew(i[3]||"",!0),eb(this,i[4]),this.g=ew(i[5]||"",!0),ex(this,i[6]||"",!0),this.s=ew(i[7]||"")):(this.i=!!t,this.a=new eP(null,this.i))}function ey(e,t,i){e.j=i?ew(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function eb(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.C=t}else e.C=null}function ex(e,t,i){var n,r;t instanceof eP?(e.a=t,n=e.a,(r=e.i)&&!n.j&&(eM(n),n.h=null,n.a.forEach(function(e,t){var i=t.toLowerCase();t!=i&&(eR(this,t),eR(this,i),0>4&15).toString(16)+(15&e).toString(16)}ev.prototype.toString=function(){var e=[],t=this.j;t&&e.push(eT(t,eA,!0),":");var i=this.h;return(i||"file"==t)&&(e.push("//"),(t=this.A)&&e.push(eT(t,eA,!0),"@"),e.push(encodeURIComponent(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.C)&&e.push(":",String(i))),(i=this.g)&&(this.h&&"/"!=i.charAt(0)&&e.push("/"),e.push(eT(i,"/"==i.charAt(0)?e_:eC,!0))),(i=this.a.toString())&&e.push("?",i),(i=this.s)&&e.push("#",eT(i,eO)),e.join("")};var eA=/[#\/\?@]/g,eC=/[#\?:]/g,e_=/[#\?]/g,eI=/[#\?@]/g,eO=/#/g;function eP(e,t){this.g=this.a=null,this.h=e||null,this.j=!!t}function eM(e){e.a||(e.a=new ec,e.g=0,e.h&&function(e,t){if(e){e=e.split("&");for(var i=0;i2*e.h&&el(e)))}function eL(e,t){return eM(e),t=ek(e,t),eu(e.a.g,t)}function eD(e){var t=new eP;return t.h=e.h,e.a&&(t.a=new ec(e.a),t.g=e.g),t}function ek(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function eN(e){this.a=eE(e)}function eF(e){return e.a.a.get(eU.Pa)||null}function eB(e,t){t?e.a.a.set(eU.PROVIDER_ID,t):eR(e.a.a,eU.PROVIDER_ID)}(e=eP.prototype).add=function(e,t){eM(this),this.h=null,e=ek(this,e);var i=this.a.get(e);return i||this.a.set(e,i=[]),i.push(t),this.g+=1,this},e.clear=function(){this.a=this.h=null,this.g=0},e.forEach=function(e,t){eM(this),this.a.forEach(function(i,n){F(i,function(i){e.call(t,i,n,this)},this)},this)},e.ja=function(){eM(this);for(var e=this.a.la(),t=this.a.ja(),i=[],n=0;nparseFloat(e1)){n7=String(e3);break t}}n7=e1}var e5={};function e4(e){var t;return t=function(){for(var t=0,i=z(String(n7)).split("."),n=z(String(e)).split("."),r=Math.max(i.length,n.length),s=0;0==t&&s",0);var tm=tg("",0);tg("
",0);var tv=(n2=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!!e.firstChild&&(t=e.firstChild.firstChild,e.innerHTML=tf(tm),!t.parentElement)},n5=!1,function(){return n5||(n3=n2(),n5=!0),n3});function ty(e,t){t=t instanceof tn?t:to(t),e.assign(tr(t))}function tb(e,t){this.a=d(e)?e:0,this.g=d(t)?t:0}function tx(e,t){this.width=e,this.height=t}function tE(e){return e?new tM(tI(e)):n9||(n9=new tM)}function tw(e,t){var i=t||document;return i.querySelectorAll&&i.querySelector?i.querySelectorAll("."+e):tS(document,e,t)}function tT(e,t){var i=t||document;if(i.getElementsByClassName)e=i.getElementsByClassName(e)[0];else{i=document;var n=t||i;e=n.querySelectorAll&&n.querySelector&&e?n.querySelector(e?"."+e:""):tS(i,e,t)[0]||null}return e||null}function tS(e,t,i){var n;if((e=i||e).querySelectorAll&&e.querySelector&&t)return e.querySelectorAll(t?"."+t:"");if(t&&e.getElementsByClassName){var r=e.getElementsByClassName(t);return r}if(r=e.getElementsByTagName("*"),t){var s={};for(i=n=0;e=r[i];i++){var a=e.className;"function"==typeof a.split&&G(a.split(/\s+/),t)&&(s[n++]=e)}return s.length=n,s}return r}tb.prototype.toString=function(){return"("+this.a+", "+this.g+")"},tb.prototype.ceil=function(){return this.a=Math.ceil(this.a),this.g=Math.ceil(this.g),this},tb.prototype.floor=function(){return this.a=Math.floor(this.a),this.g=Math.floor(this.g),this},tb.prototype.round=function(){return this.a=Math.round(this.a),this.g=Math.round(this.g),this},(e=tx.prototype).toString=function(){return"("+this.width+" x "+this.height+")"},e.aspectRatio=function(){return this.width/this.height},e.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},e.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},e.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this};var tA={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function tC(e){return e.scrollingElement?e.scrollingElement:(eJ||"CSS1Compat"!=e.compatMode)&&e.body||e.documentElement}function t_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tI(e){return 9==e.nodeType?e:e.ownerDocument||e.document}function tO(e,t){if("textContent"in e)e.textContent=t;else if(3==e.nodeType)e.data=String(t);else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=String(t)}else{for(var i;i=e.firstChild;)e.removeChild(i);e.appendChild(tI(e).createTextNode(String(t)))}}function tP(e,t){return t?function(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}(e,function(e){return!t||f(e.className)&&G(e.className.split(/\s+/),t)}):null}function tM(e){this.a=e||u.document||document}tM.prototype.N=function(){return f(void 0)?this.a.getElementById(void 0):void 0};var tR={Fc:!0},tL={Hc:!0},tD={},tk={Gc:!0};function tN(){throw Error("Do not instantiate directly")}function tF(e,t,i,n){if(e=e(t||tU,void 0,i),n=(n||tE()).a.createElement("DIV"),(e=function(e){if(!w(e))return et(String(e));if(e instanceof tN){if(e.fa===tR)return e.content;if(e.fa===tk)return et(e.content)}return k("Soy template output is unsafe for use as HTML: "+e),"zSoyz"}(e)).match(tB),e=tg(e,null),tv())for(;n.lastChild;)n.removeChild(n.lastChild);return n.innerHTML=tf(e),1==n.childNodes.length&&1==(e=n.firstChild).nodeType&&(n=e),n}tN.prototype.va=null,tN.prototype.toString=function(){return this.content};var tB=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,tU={};function tV(){tN.call(this)}function tG(e){return null!=e&&e.fa===tR?e:e instanceof td?tH(tf(e).toString(),e.g()):tH(et(String(String(e))),function(e){if(null!=e)switch(e.va){case 1:return 1;case -1:return -1;case 0:return 0}return null}(e))}function tj(){tN.call(this)}function tW(e,t){this.content=String(e),this.va=null!=t?t:null}function tY(e){return new tW(e,void 0)}R(tV,tN),tV.prototype.fa=tR,R(tj,tN),tj.prototype.fa=tL,tj.prototype.va=1,R(tW,tN),tW.prototype.fa=tk;var tH=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return e=new t(String(e)),void 0!==i&&(e.va=i),e}}(tV),tz=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e){return new t(String(e))}}(tj);function tX(e){return(e=String(e))?new tW(e,void 0):""}var tK=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return(e=String(e))?(e=new t(e),void 0!==i&&(e.va=i),e):""}}(tV);function tq(e){return null!=e&&e.fa===tR?String(String(e.content).replace(t9,"").replace(t6,"<")).replace(t2,tZ):et(String(e))}function tJ(e){return null!=e&&e.fa===tL?e=String(e).replace(t3,t1):e instanceof tn?e=String(tr(e).toString()).replace(t3,t1):t4.test(e=String(e))?e=e.replace(t3,t1):(k("Bad value `%s` for |filterNormalizeUri",[e]),e="#zSoyz"),e}function t$(e){return null!=e&&e.fa===tD?e=e.content:null==e?e="":e instanceof tl?e instanceof tl&&e.constructor===tl&&e.g===tu?e=e.a:(k("expected object of type SafeStyle, got '"+e+"' of type "+y(e)),e="type_error:SafeStyle"):t5.test(e=String(e))||(k("Bad value `%s` for |filterCssValue",[e]),e="zSoyz"),e}var tQ={"\0":"�"," ":" ","\n":" ","\v":" ","\f":" ","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","…":"…"," ":" ","\u2028":"
","\u2029":"
"};function tZ(e){return tQ[e]}var t0={"\0":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08"," ":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","":"%7F","…":"%C2%85"," ":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","!":"%EF%BC%81","#":"%EF%BC%83","$":"%EF%BC%84","&":"%EF%BC%86","'":"%EF%BC%87","(":"%EF%BC%88",")":"%EF%BC%89","*":"%EF%BC%8A","+":"%EF%BC%8B",",":"%EF%BC%8C","/":"%EF%BC%8F",":":"%EF%BC%9A",";":"%EF%BC%9B","=":"%EF%BC%9D","?":"%EF%BC%9F","@":"%EF%BC%A0","[":"%EF%BC%BB","]":"%EF%BC%BD"};function t1(e){return t0[e]}var t2=/[\x00\x22\x27\x3c\x3e]/g,t3=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,t5=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,t4=/^(?![^#?]*\/(?:\.|%2E){2}(?:[\/?#]|$))(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,t9=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,t6=/=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var ib="closure_listenable_"+(1e6*Math.random()|0),ix=0;function iE(e,t,i,n,r){this.listener=e,this.proxy=null,this.src=t,this.type=i,this.capture=!!n,this.La=r,this.key=++ix,this.sa=this.Ia=!1}function iw(e){e.sa=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function iT(e){this.src=e,this.a={},this.g=0}function iS(e,t){var i=t.type;i in e.a&&j(e.a[i],t)&&(iw(t),0==e.a[i].length&&(delete e.a[i],e.g--))}function iA(e,t,i,n){for(var r=0;rn.keyCode||void 0!=n.returnValue)){t:{var r=!1;if(0==n.keyCode)try{n.keyCode=-1;break t}catch(e){r=!0}(r||void 0==n.returnValue)&&(n.returnValue=!0)}for(n=[],r=t.g;r;r=r.parentNode)n.push(r);for(e=e.type,r=n.length-1;!t.h&&0<=r;r--){t.g=n[r];var s=ik(n[r],e,!0,t);i=i&&s}for(r=0;!t.h&&r>>0);function iV(e){return E(e)?e:(e[iU]||(e[iU]=function(t){return e.handleEvent(t)}),e[iU])}function iG(){ia.call(this),this.J=new iT(this),this.wb=this,this.Ha=null}function ij(e,t){var i,n=e.Ha;if(n)for(i=[];n;n=n.Ha)i.push(n);if(e=e.wb,n=t.type||t,f(t))t=new im(t,e);else if(t instanceof im)t.target=t.target||e;else{var r=t;es(t=new im(n,e),r)}if(r=!0,i)for(var s=i.length-1;!t.h&&0<=s;s--){var a=t.g=i[s];r=iW(a,n,!0,t)&&r}if(t.h||(r=iW(a=t.g=e,n,!0,t)&&r,t.h||(r=iW(a,n,!1,t)&&r)),i)for(s=0;!t.h&&se.g&&(e.g++,t.next=e.a,e.a=t)}function iQ(){this.g=this.a=null}a(iK,iG),iK.prototype.N=function(){return this.a},iK.prototype.register=function(){var e=iX(this.N());iY[e]?G(iY[e],this)||iY[e].push(this):iY[e]=[this]},iJ.prototype.get=function(){if(0',null),i.document.write(tf(t)),i.document.close())):(i=i.open(tr(n).toString(),e,s))&&t.noopener&&(i.opener=null),i}function ng(){try{return!(!window.opener||!window.opener.location||window.opener.location.hostname!==window.location.hostname||window.opener.location.protocol!==window.location.protocol)}catch(e){}return!1}function nm(e){np(e,{target:window.cordova&&window.cordova.InAppBrowser?"_system":"_blank"},void 0)}function nv(e,t){if(null==(e=w(e)&&1==e.nodeType?e:document.querySelector(String(e))))throw Error(t||"Cannot find element.");return e}function ny(){return window.location.href}function nb(e){this.s=[],this.T=nO,this.O=e||null,this.j=this.a=!1,this.h=void 0,this.J=this.l=this.A=!1,this.i=0,this.g=null,this.C=0}function nx(e,t,i){e.a=!0,e.h=i,e.j=!t,nS(e)}function nE(e){if(e.a){if(!e.J)throw new nA(e);e.J=!1}}function nw(e,t,i){e.s.push([t,i,void 0]),e.a&&nS(e)}function nT(e){return V(e.s,function(e){return E(e[1])})}function nS(e){if(e.i&&e.a&&nT(e)){var t=e.i,i=nI[t];i&&(u.clearTimeout(i.a),delete nI[t]),e.i=0}e.g&&(e.g.C--,delete e.g),t=e.h;for(var n=i=!1;e.s.length&&!e.A;){var r=e.s.shift(),s=r[0],a=r[1];if(r=r[2],s=e.j?a:s)try{var o=s.call(r||e.O,t);d(o)&&(e.j=e.j&&(o==t||o instanceof Error),e.h=t=o),(iq(t)||"function"==typeof u.Promise&&t instanceof u.Promise)&&(n=!0,e.A=!0)}catch(n){t=n,e.j=!0,nT(e)||(i=!0)}}e.h=t,n&&(o=_(e.L,e,!0),n=_(e.L,e,!1),t instanceof nb?(nw(t,o,n),t.l=!0):t.then(o,n)),i&&(nI[(t=new n_(t)).a]=t,e.i=t.a)}function nA(){L.call(this)}function nC(){L.call(this)}function n_(e){this.a=u.setTimeout(_(this.h,this),0),this.g=e}R(nf,L),nf.prototype.name="cancel",nb.prototype.cancel=function(e){if(this.a)this.h instanceof nb&&this.h.cancel();else{if(this.g){var t=this.g;delete this.g,e?t.cancel(e):(t.C--,0>=t.C&&t.cancel())}this.T?this.T.call(this.O,this):this.J=!0,this.a||(e=new nC(this),nE(this),nx(this,!1,e))}},nb.prototype.L=function(e,t){this.A=!1,nx(this,e,t)},nb.prototype.callback=function(e){nE(this),nx(this,!0,e)},nb.prototype.then=function(e,t,i){var n,r,s=new i9(function(e,t){n=e,r=t});return nw(this,n,function(e){e instanceof nC?s.cancel():r(e)}),s.then(e,t,i)},nb.prototype.$goog_Thenable=!0,R(nA,L),nA.prototype.message="Deferred has already fired",nA.prototype.name="AlreadyCalledError",R(nC,L),nC.prototype.message="Deferred was canceled",nC.prototype.name="CanceledError",n_.prototype.h=function(){throw delete nI[this.a],this.g};var nI={};function nO(){if(this&&this.rb){var e=this.rb;e&&"SCRIPT"==e.tagName&&nP(e,!0,this.sb)}}function nP(e,t,i){null!=i&&u.clearTimeout(i),e.onload=m,e.onerror=m,e.onreadystatechange=m,t&&window.setTimeout(function(){t_(e)},0)}function nM(e,t){var i="Jsloader error (code #"+e+")";t&&(i+=": "+t),L.call(this,i),this.code=e}function nR(){return u.google&&u.google.accounts&&u.google.accounts.id||null}function nL(e){this.a=e||nR(),this.h=!1,this.g=null}R(nM,L),nL.prototype.cancel=function(){this.a&&this.h&&(this.g&&this.g(null),this.a.cancel())},v(nL);var nD=new e6(e8,"https://accounts.google.com/gsi/client");function nk(){this.a=null}function nN(e,t){this.a=e,this.g=t||function(e){throw e}}function nF(e,t,i){this.reset(e,t,i,void 0,void 0)}nk.prototype.load=function(){var e,t,i,n=this;if(this.a)return this.a;var r=((e=nD)instanceof e6&&e.constructor===e6&&e.g===e7?e=e.a:(k("expected object of type Const, got '"+e+"'"),e="type_error:Const"),(t=new te).a=e,t);return nR()?nn():this.a=(i=null,new i9(function(e){"complete"==u.document.readyState?e():iM(window,"load",i=function(){e()})}).Ca(function(e){throw iR(window,"load",i),e})).then(function(){if(!nR())return new i9(function(e,t){var i,s,a,o,h,c,l,d,f,m=setTimeout(function(){n.a=null,t(Error("Network error!"))},1e4);u.onGoogleLibraryLoad=function(){clearTimeout(m),e()},nn((a=(s={}).document||document,o=tt(r).toString(),l=new nb(c={rb:h=document.createElement("SCRIPT"),sb:void 0}),d=null,0<(f=null!=s.timeout?s.timeout:5e3)&&(d=window.setTimeout(function(){nP(h,!0);var e=new nM(1,"Timeout reached for loading script "+o);nE(l),nx(l,!1,e)},f),c.sb=d),h.onload=h.onreadystatechange=function(){h.readyState&&"loaded"!=h.readyState&&"complete"!=h.readyState||(nP(h,s.xc||!1,d),l.callback(null))},h.onerror=function(){nP(h,!0,d);var e=new nM(0,"Error while loading script "+o);nE(l),nx(l,!1,e)},es(c=s.attributes||{},{type:"text/javascript",charset:"UTF-8"}),ei(c,function(e,t){e&&"object"==typeof e&&e.ma&&(e=e.ka()),"style"==t?h.style.cssText=e:"class"==t?h.className=e:"for"==t?h.htmlFor=e:tA.hasOwnProperty(t)?h.setAttribute(tA[t],e):0==t.lastIndexOf("aria-",0)||0==t.lastIndexOf("data-",0)?h.setAttribute(t,e):h[t]=e}),function(e,t){if(e.src=tt(t),null===g)i:{if((t=(t=u.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&p.test(t)){g=t;break i}g=""}(t=g)&&e.setAttribute("nonce",t)}(h,r),((i=(a||document).getElementsByTagName("HEAD"))&&0!=i.length?i[0]:a.documentElement).appendChild(h),l)).then(function(){nR()&&e()}).Ca(function(e){clearTimeout(m),n.a=null,t(e)})})})},v(nk),nN.prototype.confirm=function(e){return nn(this.a.confirm(e)).Ca(this.g)},nF.prototype.a=null;var nB=0;function nU(e){this.s=e,this.a=this.h=this.j=this.g=null}function nV(e,t){this.name=e,this.value=t}nF.prototype.reset=function(e,t,i,n,r){"number"==typeof r||nB++,this.h=n||P(),this.j=e,this.s=t,this.g=i,delete this.a},nV.prototype.toString=function(){return this.name};var nG=new nV("SEVERE",1e3),nj=new nV("WARNING",900),nW=new nV("CONFIG",700);nU.prototype.log=function(e,t,i){if(e.value>=function e(t){return t.j?t.j:t.g?e(t.g):(k("Root logger has no level set."),null)}(this).value)for(E(t)&&(t=t()),e=new nF(e,String(t),this.s),i&&(e.a=i),i=this;i;){var n=i,r=e;if(n.a)for(var s=0;t=n.a[s];s++)t(r);i=i.g}};var nY={},nH=null;function nz(){nH||(nH=new nU(""),nY[""]=nH,nH.j=nW)}function nX(){this.a=P()}var nK=null;function nq(e){this.j=e||"",nK||(nK=new nX),this.s=nK}function nJ(e){return 10>e?"0"+e:String(e)}function n$(e){nq.call(this,e)}function nQ(){this.s=_(this.h,this),this.a=new n$,this.a.g=!1,this.a.h=!1,this.g=this.a.a=!1,this.j={}}nX.prototype.set=function(e){this.a=e},nX.prototype.reset=function(){this.set(P())},nX.prototype.get=function(){return this.a},nq.prototype.a=!0,nq.prototype.g=!0,nq.prototype.h=!1,R(n$,nq),nQ.prototype.h=function(e){if(!this.j[e.g]){var t,i,n=function(e,t){var i=[];if(i.push(e.j," "),e.g){var n=new Date(t.h);i.push("[",nJ(n.getFullYear()-2e3)+nJ(n.getMonth()+1)+nJ(n.getDate())+" "+nJ(n.getHours())+":"+nJ(n.getMinutes())+":"+nJ(n.getSeconds())+"."+nJ(Math.floor(n.getMilliseconds()/10)),"] ")}return i.push("[",function(e,t){t=(e=(e.h-t)/1e3).toFixed(3);var i=0;if(1>e)i=2;else for(;100>e;)i++,e*=10;for(;0=nG.value)return"error";if(e.value>=nj.value)return"warn";if(e.value>=nW.value)return"log"}return"debug"}(e.j),i=e.a,nZ[t]?nZ[t](n,i||""):nZ.log(n,i||""))}};var nZ=u.console;function n0(e,t){var i=ri;i&&i.log(nG,e,t)}ri=function e(t){if(nz(),!(i=nY[t])){i=new nU(t);var i,n=t.lastIndexOf("."),r=t.substr(n+1);(n=e(t.substr(0,n))).h||(n.h={}),n.h[r]=i,i.g=n,nY[t]=i}return i}("firebaseui");var n1=new nQ;if(1!=n1.g){nz(),rn=nH;var n2,n3,n5,n4,n9,n6,n7,n8,re,rt,ri,rn,rr=n1.s;rn.a||(rn.a=[]),rn.a.push(rr),n1.g=!0}function rs(e){var t=ri;t&&t.log(nj,e,void 0)}function ra(){this.a=("undefined"==typeof document?null:document)||{cookie:""}}function ro(e){e=(e.a.cookie||"").split(";");for(var t,i,n=[],r=[],s=0;si?"":0==i?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(P()+1e3*i).toUTCString(),this.a.cookie=e+"="+t+r+n+i+s},e.get=function(e,t){for(var i,n=e+"=",r=(this.a.cookie||"").split(";"),s=0;s>=8),t[i++]=r}return t}function rm(e){for(this.i=e,this.g=this.i.length/4,this.j=this.g+6,this.h=[[],[],[],[]],this.s=[[],[],[],[]],this.a=Array(rv*(this.j+1)),e=0;er;r++)i=t[i=4*r+n],e.h[n][r]=i}function rb(e){for(var t=[],i=0;in;n++)t[4*n+i]=e.h[i][n];return t}function rx(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]^=e.a[4*t+n][i]}function rE(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]=t[e.h[i][n]]}function rw(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][i]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][(i+t)%rv]}function rT(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][(i+t)%rv]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][i]}function rS(e){e[0]=rA[e[0]],e[1]=rA[e[1]],e[2]=rA[e[2]],e[3]=rA[e[3]]}var rA=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rC=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],r_=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],rI=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,27,25,31,29,19,17,23,21,11,9,15,13,3,1,7,5,59,57,63,61,51,49,55,53,43,41,47,45,35,33,39,37,91,89,95,93,83,81,87,85,75,73,79,77,67,65,71,69,123,121,127,125,115,113,119,117,107,105,111,109,99,97,103,101,155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229],rO=[0,3,6,5,12,15,10,9,24,27,30,29,20,23,18,17,48,51,54,53,60,63,58,57,40,43,46,45,36,39,34,33,96,99,102,101,108,111,106,105,120,123,126,125,116,119,114,113,80,83,86,85,92,95,90,89,72,75,78,77,68,71,66,65,192,195,198,197,204,207,202,201,216,219,222,221,212,215,210,209,240,243,246,245,252,255,250,249,232,235,238,237,228,231,226,225,160,163,166,165,172,175,170,169,184,187,190,189,180,183,178,177,144,147,150,149,156,159,154,153,136,139,142,141,132,135,130,129,155,152,157,158,151,148,145,146,131,128,133,134,143,140,137,138,171,168,173,174,167,164,161,162,179,176,181,182,191,188,185,186,251,248,253,254,247,244,241,242,227,224,229,230,239,236,233,234,203,200,205,206,199,196,193,194,211,208,213,214,223,220,217,218,91,88,93,94,87,84,81,82,67,64,69,70,79,76,73,74,107,104,109,110,103,100,97,98,115,112,117,118,127,124,121,122,59,56,61,62,55,52,49,50,35,32,37,38,47,44,41,42,11,8,13,14,7,4,1,2,19,16,21,22,31,28,25,26],rP=[0,9,18,27,36,45,54,63,72,65,90,83,108,101,126,119,144,153,130,139,180,189,166,175,216,209,202,195,252,245,238,231,59,50,41,32,31,22,13,4,115,122,97,104,87,94,69,76,171,162,185,176,143,134,157,148,227,234,241,248,199,206,213,220,118,127,100,109,82,91,64,73,62,55,44,37,26,19,8,1,230,239,244,253,194,203,208,217,174,167,188,181,138,131,152,145,77,68,95,86,105,96,123,114,5,12,23,30,33,40,51,58,221,212,207,198,249,240,235,226,149,156,135,142,177,184,163,170,236,229,254,247,200,193,218,211,164,173,182,191,128,137,146,155,124,117,110,103,88,81,74,67,52,61,38,47,16,25,2,11,215,222,197,204,243,250,225,232,159,150,141,132,187,178,169,160,71,78,85,92,99,106,113,120,15,6,29,20,43,34,57,48,154,147,136,129,190,183,172,165,210,219,192,201,246,255,228,237,10,3,24,17,46,39,60,53,66,75,80,89,102,111,116,125,161,168,179,186,133,140,151,158,233,224,251,242,205,196,223,214,49,56,35,42,21,28,7,14,121,112,107,98,93,84,79,70],rM=[0,11,22,29,44,39,58,49,88,83,78,69,116,127,98,105,176,187,166,173,156,151,138,129,232,227,254,245,196,207,210,217,123,112,109,102,87,92,65,74,35,40,53,62,15,4,25,18,203,192,221,214,231,236,241,250,147,152,133,142,191,180,169,162,246,253,224,235,218,209,204,199,174,165,184,179,130,137,148,159,70,77,80,91,106,97,124,119,30,21,8,3,50,57,36,47,141,134,155,144,161,170,183,188,213,222,195,200,249,242,239,228,61,54,43,32,17,26,7,12,101,110,115,120,73,66,95,84,247,252,225,234,219,208,205,198,175,164,185,178,131,136,149,158,71,76,81,90,107,96,125,118,31,20,9,2,51,56,37,46,140,135,154,145,160,171,182,189,212,223,194,201,248,243,238,229,60,55,42,33,16,27,6,13,100,111,114,121,72,67,94,85,1,10,23,28,45,38,59,48,89,82,79,68,117,126,99,104,177,186,167,172,157,150,139,128,233,226,255,244,197,206,211,216,122,113,108,103,86,93,64,75,34,41,52,63,14,5,24,19,202,193,220,215,230,237,240,251,146,153,132,143,190,181,168,163],rR=[0,13,26,23,52,57,46,35,104,101,114,127,92,81,70,75,208,221,202,199,228,233,254,243,184,181,162,175,140,129,150,155,187,182,161,172,143,130,149,152,211,222,201,196,231,234,253,240,107,102,113,124,95,82,69,72,3,14,25,20,55,58,45,32,109,96,119,122,89,84,67,78,5,8,31,18,49,60,43,38,189,176,167,170,137,132,147,158,213,216,207,194,225,236,251,246,214,219,204,193,226,239,248,245,190,179,164,169,138,135,144,157,6,11,28,17,50,63,40,37,110,99,116,121,90,87,64,77,218,215,192,205,238,227,244,249,178,191,168,165,134,139,156,145,10,7,16,29,62,51,36,41,98,111,120,117,86,91,76,65,97,108,123,118,85,88,79,66,9,4,19,30,61,48,39,42,177,188,171,166,133,136,159,146,217,212,195,206,237,224,247,250,183,186,173,160,131,142,153,148,223,210,197,200,235,230,241,252,103,106,125,112,83,94,73,68,15,2,21,24,59,54,33,44,12,1,22,27,56,53,34,47,100,105,126,115,80,93,74,71,220,209,198,203,232,229,242,255,180,185,174,163,128,141,154,151],rL=[0,14,28,18,56,54,36,42,112,126,108,98,72,70,84,90,224,238,252,242,216,214,196,202,144,158,140,130,168,166,180,186,219,213,199,201,227,237,255,241,171,165,183,185,147,157,143,129,59,53,39,41,3,13,31,17,75,69,87,89,115,125,111,97,173,163,177,191,149,155,137,135,221,211,193,207,229,235,249,247,77,67,81,95,117,123,105,103,61,51,33,47,5,11,25,23,118,120,106,100,78,64,82,92,6,8,26,20,62,48,34,44,150,152,138,132,174,160,178,188,230,232,250,244,222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,52,58,40,38,124,114,96,110,68,74,88,86,55,57,43,37,15,1,19,29,71,73,91,85,127,113,99,109,215,217,203,197,239,225,243,253,167,169,187,181,159,145,131,141];function rD(e,t){e=new rm(rN(e)),t=rg(t);for(var i,n=t.splice(0,16),r="";n.length;){i=16-n.length;for(var s=0;so;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rI[a[0]]^rO[a[1]]^a[2]^a[3],s[1][o]=a[0]^rI[a[1]]^rO[a[2]]^a[3],s[2][o]=a[0]^a[1]^rI[a[2]]^rO[a[3]],s[3][o]=rO[a[0]]^a[1]^a[2]^rI[a[3]];rx(i,n)}rE(i,rA),rw(i),rx(i,i.j),r+=U(rb(i),function(e){return 1<(e=e.toString(16)).length?e:"0"+e}).join(""),n=t.splice(0,16)}return r}function rk(e,t){e=new rm(rN(e));for(var i=[],n=0;no;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rL[a[0]]^rM[a[1]]^rR[a[2]]^rP[a[3]],s[1][o]=rP[a[0]]^rL[a[1]]^rM[a[2]]^rR[a[3]],s[2][o]=rR[a[0]]^rP[a[1]]^rL[a[2]]^rM[a[3]],s[3][o]=rM[a[0]]^rR[a[1]]^rP[a[2]]^rL[a[3]]}if(rT(n),rE(n,rC),rx(n,0),8192>=(n=rb(n)).length)n=String.fromCharCode.apply(null,n);else{for(s=0,r="";s=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,i)}(n,s,s+8192));n=r}t+=n,r=i.splice(0,16)}return t.replace(/(\x00)+$/,"")}function rN(e){e=rg(e.substring(0,32));for(var t=32-e.length,i=0;i=i.length)throw ea;var n=i.key(t++);if(e)return n;if(!f(n=i.getItem(n)))throw"Storage mechanism: Invalid value was encountered";return n},n},e.clear=function(){this.a.clear()},e.key=function(e){return this.a.key(e)},R(rz,rY),R(rX,rY),R(rK,rW),rK.prototype.set=function(e,t){this.g.set(this.a+e,t)},rK.prototype.get=function(e){return this.g.get(this.a+e)},rK.prototype.ra=function(e){this.g.ra(this.a+e)},rK.prototype.ha=function(e){var t=this.g.ha(!0),i=this,n=new eo;return n.next=function(){for(var n=t.next();n.substr(0,i.a.length)!=i.a;)n=t.next();return e?n.substr(i.a.length):i.g.get(n)},n},rH(new rz);var rq=new rX,rJ=new rj(rH(rq)?new rK(rq,"firebaseui"):null),r$={name:"pendingEmailCredential",storage:rJ},rQ={name:"redirectStatus",storage:rJ},rZ={name:"redirectUrl",storage:rJ},r0={name:"emailForSignIn",storage:new rj(new rl(3600,"/"))},r1={name:"pendingEncryptedCredential",storage:new rj(new rl(3600,"/"))};function r2(e,t){return e.storage.get(t?e.name+":"+t:e.name)}function r3(e,t){e.storage.a.ra(t?e.name+":"+t:e.name)}function r5(e,t,i){e.storage.set(i?e.name+":"+i:e.name,t)}function r4(e){return r2(rZ,e)||null}function r9(e){return rf(e=r2(r$,e)||null)}function r6(e){r3(r$,e)}function r7(e){return(e=r2(rQ,e)||null)&&void 0!==e.tenantId?new rp(e.tenantId):null}function r8(){this.W={}}function se(e,t,i){if(t.toLowerCase() in e.W)throw Error("Configuration "+t+" has already been defined.");e.W[t.toLowerCase()]=i}function st(e,t,i){if(!(t.toLowerCase() in e.W))throw Error("Configuration "+t+" is not defined.");e.W[t.toLowerCase()]=i}function si(e,t){if(!(e=e.get(t)))throw Error("Configuration "+t+" is required.");return e}function sn(){this.g=void 0,this.a={}}function sr(e,t,i,n){for(var r=0;r=e||96<=e&&106>=e||65<=e&&90>=e||(eJ||eX)&&0==e)return!0;switch(e){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:return!0;case 173:return eq;default:return!1}}function at(e){return eq?e=function(e){switch(e){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return e}}(e):eQ&&eJ&&93===e&&(e=91),e}function ai(e){iG.call(this),this.a=e,iO(e,"keydown",this.g,!1,this),iO(e,"click",this.h,!1,this)}function an(e,t){var i=new as(t);if(ij(e,i)){i=new ar(t);try{ij(e,i)}finally{t.stopPropagation()}}}function ar(e){iv.call(this,e.a),this.type="action"}function as(e){iv.call(this,e.a),this.type="beforeaction"}function aa(e){iG.call(this),this.a=e,e=ez?"focusout":"blur",this.g=iO(this.a,ez?"focusin":"focus",this,!ez),this.h=iO(this.a,e,this,!ez)}function ao(e,t){iG.call(this),this.g=e||1,this.a=t||u,this.h=_(this.gc,this),this.j=P()}function ah(e){e.Ka=!1,e.aa&&(e.a.clearTimeout(e.aa),e.aa=null)}function ac(e){ia.call(this),this.g=e,this.a={}}R(ai,iG),ai.prototype.g=function(e){(13==e.keyCode||eJ&&3==e.keyCode)&&an(this,e)},ai.prototype.h=function(e){an(this,e)},ai.prototype.o=function(){ai.K.o.call(this),iR(this.a,"keydown",this.g,!1,this),iR(this.a,"click",this.h,!1,this),delete this.a},R(ar,iv),R(as,iv),R(aa,iG),aa.prototype.handleEvent=function(e){var t=new iv(e.a);t.type="focusin"==e.type||"focus"==e.type?"focusin":"focusout",ij(this,t)},aa.prototype.o=function(){aa.K.o.call(this),iL(this.g),iL(this.h),delete this.a},R(ao,iG),(e=ao.prototype).Ka=!1,e.aa=null,e.gc=function(){if(this.Ka){var e=P()-this.j;0=e.keyCode)return!1;if(ae(e.keyCode))return!0;switch(e.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!eq;default:return 166>e.keyCode||183t.charCode&&ae(n)?t.charCode:0):eH&&!eJ?r=ae(n=this.X)?t.keyCode:0:("keypress"==e.type?(ax&&(i=this.Ua),t.keyCode==t.charCode?32>t.keyCode?(n=t.keyCode,r=0):(n=this.X,r=t.charCode):(n=t.keyCode||this.X,r=t.charCode||0)):(n=t.keyCode||this.X,r=t.charCode||0),eQ&&63==r&&224==n&&(n=191));var s=n=at(n);n?63232<=n&&n in av?s=av[n]:25==n&&e.shiftKey&&(s=9):t.keyIdentifier&&t.keyIdentifier in ay&&(s=ay[t.keyIdentifier]),eq&&ab&&"keypress"==e.type&&!s8(s,this.R,e.shiftKey,e.ctrlKey,i,e.metaKey)||(e=s==this.R,this.R=s,(t=new aw(s,r,e,t)).altKey=i,ij(this,t))},e.N=function(){return this.qa},e.o=function(){am.K.o.call(this),aE(this)},R(aw,iv),aT.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"},aT.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},aT.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},aT.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this};var a_={thin:2,medium:4,thick:6};function aI(e,t){if("none"==(e.currentStyle?e.currentStyle[t+"Style"]:null))return 0;var i=e.currentStyle?e.currentStyle[t+"Width"]:null;if(i in a_)e=a_[i];else if(/^\d+px?$/.test(i))e=parseInt(i,10);else{t=e.style.left;var n=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,e.style.left=i,i=e.style.pixelLeft,e.style.left=t,e.runtimeStyle.left=n,e=+i}return e}function aO(){}function aP(e){iG.call(this),this.s=e||tE(),this.cb=null,this.na=!1,this.g=null,this.L=void 0,this.oa=this.Ea=this.Y=null}function aM(e,t){return e.g?tT(t,e.g||e.s.a):null}function aR(e){return e.L||(e.L=new ac(e)),e.L}function aL(e,t){e.Ea&&F(e.Ea,t,void 0)}function aD(e,t){var i=tP(e,"firebaseui-textfield");t?(s9(e,"firebaseui-input-invalid"),s4(e,"firebaseui-input"),i&&s9(i,"firebaseui-textfield-invalid")):(s9(e,"firebaseui-input"),s4(e,"firebaseui-input-invalid"),i&&s4(i,"firebaseui-textfield-invalid"))}function ak(e,t,i){ic(e,I(il,t=new af(t))),au(aR(e),t,"input",i)}function aN(e,t,i){ic(e,I(il,t=new am(t))),au(aR(e),t,"key",function(e){13==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i(e))})}function aF(e,t,i){ic(e,I(il,t=new ai(t))),au(aR(e),t,"action",function(e){e.stopPropagation(),e.preventDefault(),i(e)})}function aB(e){s4(e,"firebaseui-hidden")}function aU(e,t){t&&tO(e,t),s9(e,"firebaseui-hidden")}function aV(e){return!s5(e,"firebaseui-hidden")&&"none"!=e.style.display}function aG(e){var t=(e=e||{}).email,i=e.disabled,n='

')}function aj(e){e=(e=e||{}).label;var t='")}function aW(){return tH(""+aj({label:tX("Sign In")}))}function aY(){return tH(""+aj({label:tX("Save")}))}function aH(){return tH(""+aj({label:tX("Continue")}))}function az(e){e=(e=e||{}).label;var t='

')}function aX(){var e='

')}function aK(){return tH('Trouble signing in?')}function aq(e){e=(e=e||{}).label;var t='")}function aJ(e){var t="";return e.F&&e.D&&(t+=''),tH(t)}function a$(e){var t="";return e.F&&e.D&&(t+='

By continuing, you are indicating that you accept our Terms of Service and Privacy Policy.

'),tH(t)}function aQ(e){return tH(e='

'+tG(e.message)+'  Dismiss

')}function aZ(e){var t=e.content;return tH(''+tG(t)+"")}function a0(e){var t=e.message;return tH(aZ({content:tK('
'+tG(t)+"
")}))}function a1(e){var t='
';e=e.items;for(var i=e.length,n=0;n'+(r.Ma?'
':"")+'
'+tG(r.label)+"
"}return tH(t=""+aZ({Ab:tX("firebaseui-list-box-dialog"),content:tK(t+"
")}))}function a2(e){return tH((e=e||{}).tb?'
':'
')}function a3(e,t){return tY((e=(e=e||{}).ga).S?e.S:t.hb[e.providerId]?""+t.hb[e.providerId]:e.providerId&&0==e.providerId.indexOf("saml.")?e.providerId.substring(5):e.providerId&&0==e.providerId.indexOf("oidc.")?e.providerId.substring(5):""+e.providerId)}function a5(e){a6(e,"upgradeElement")}function a4(e){a6(e,"downgradeElements")}v(aO),aO.prototype.a=0,R(aP,iG),(e=aP.prototype).Lb=aO.Xa(),e.N=function(){return this.g},e.Za=function(e){if(this.Y&&this.Y!=e)throw Error("Method not supported");aP.K.Za.call(this,e)},e.kb=function(){this.g=this.s.a.createElement("DIV")},e.render=function(e){if(this.na)throw Error("Component already rendered");this.g||this.kb(),e?e.insertBefore(this.g,null):this.s.a.body.appendChild(this.g),this.Y&&!this.Y.na||this.v()},e.v=function(){this.na=!0,aL(this,function(e){!e.na&&e.N()&&e.v()})},e.ya=function(){aL(this,function(e){e.na&&e.ya()}),this.L&&ad(this.L),this.na=!1},e.o=function(){this.na&&this.ya(),this.L&&(this.L.m(),delete this.L),aL(this,function(e){e.m()}),this.g&&t_(this.g),this.Y=this.g=this.oa=this.Ea=null,aP.K.o.call(this)},e.removeChild=function(e,t){if(e){var i=f(e)?e:e.cb||(e.cb=":"+(e.Lb.a++).toString(36));if(e=this.oa&&i&&(null!==(e=this.oa)&&i in e?e[i]:void 0)||null,i&&e){var n=this.oa;if(i in n&&delete n[i],j(this.Ea,e),t&&(e.ya(),e.g&&t_(e.g)),null==(t=e))throw Error("Unable to set parent component");t.Y=null,aP.K.Za.call(t,null)}}if(!e)throw Error("Child is not in parent component");return e},aQ.a="firebaseui.auth.soy2.element.infoBar",a0.a="firebaseui.auth.soy2.element.progressDialog",a1.a="firebaseui.auth.soy2.element.listBoxDialog",a2.a="firebaseui.auth.soy2.element.busyIndicator";var a9=["mdl-js-textfield","mdl-js-progress","mdl-js-spinner","mdl-js-button"];function a6(e,t){e&&window.componentHandler&&window.componentHandler[t]&&a9.forEach(function(i){s5(e,i)&&window.componentHandler[t](e),F(tw(i,e),function(e){window.componentHandler[t](e)})})}function a7(e,t,i){if(a8.call(this),document.body.appendChild(e),e.showModal||window.dialogPolyfill.registerDialog(e),e.showModal(),a5(e),t&&aF(this,e,function(t){var i=e.getBoundingClientRect();(t.clientX
'+(t?aq(null):"")+aj(null)+'
")}function ou(e,t,i){return t=(e=e||{}).ia,tH(e='")}function od(e,t,i){var n=(e=e||{}).Tb;t=e.Ta;var r=e.ia;return i='",tH(i)}function of(e,t,i){return t=(e=e||{}).Ta,tH(e='

Recover password

Get instructions sent to this email that explain how to reset your password

'+aG(e)+'
'+(t?aq(null):"")+aj({label:tX("Send")})+'
")}function op(e,t,i){t=e.G;var n="";return n+='

Check your email

'+(e="Follow the instructions sent to "+tG(e.email)+" to recover your password")+'

',t&&(n+='
'+aj({label:tX("Done")})+"
"),tH(n+='
")}function og(e,t,i){return tH('
'+a2(null,null,i)+"
")}function om(e,t,i){return tH('
'+a2({tb:!0},null,i)+"
")}function ov(){return tH('
')}function oy(e,t,i){return t='",tH(t)}function ob(e,t,i){return e='

Trouble getting email?

Try these common fixes:

  • Check if the email was marked as spam or filtered.
  • Check your internet connection.
  • Check that you did not misspell your email.
  • Check that your inbox space is not running out or other inbox settings related issues.

If the steps above didn\'t work, you can resend the email. Note that this will deactivate the link in the older email.

'+aq({label:tX("Back")})+'
",tH(e)}function ox(e,t,i){return tH(e='")}function oE(){return tH('

New device or browser detected

Try opening the link using the same device or browser where you started the sign-in process.

'+aq({label:tX("Dismiss")})+"
")}function ow(){return tH('

Session ended

The session associated with this sign-in request has either expired or was cleared.

'+aq({label:tX("Dismiss")})+"
")}function oT(e,t,i){return tH('

Sign in

You already have an account

'+(e="You’ve already used "+tG(e.email)+" to sign in. Enter your password for that account.")+"

"+aX()+'
'+aW()+'
")}function oS(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='")}function oA(e,t,i){t="";var n=""+a3(e,i);return tH(t+='")}function oC(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='

Sign in

You already have an account

'+(n="You’ve already used "+tG(n)+". Sign in with "+tG(e)+" to continue.")+'

'+aj({label:tX("Sign in with "+e)})+'
")}function o_(e,t,i){var n=(e=e||{}).kc;t=e.yb,e=e.Eb;var r='

Not Authorized

';return n?r+=n=""+tG(n)+" is not authorized to view the requested page.":r+="User is not authorized to view the requested page.",r+="

",t&&(r+='

'+(t="Please contact "+tG(t)+" for authorization.")+"

"),r+='
'+aq({label:tX("Back")})+'
")}function oI(e,t,i){return tH('

Sign in

'+(e="To continue sign in with "+tG(e.email)+" on this device, you have to recover the password.")+'

'+aq(null)+aj({label:tX("Recover password")})+'
")}function oO(e){var t="";return tH(t+='

Reset your password

for '+tG(e.email)+"

"+az(function(e){function t(){}var i={label:tX("New password")};for(var n in t.prototype=e,e=new t,i)e[n]=i[n];return e}(e))+'
'+aY()+"
")}function oP(e){return tH(e='

Password changed

You can now sign in with your new password

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oM(e){return tH(e='

Try resetting your password again

Your request to reset your password has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oR(e){var t=e.G,i="";return tH(i+='

Updated email address

'+(e="Your sign-in email address has been changed back to "+tG(e.email)+".")+'

If you didn’t ask to change your sign-in email, it’s possible someone is trying to access your account and you should change your password right away.

'+(t?'
'+aH()+"
":"")+"
")}function oL(e){return tH(e='

Unable to update your email address

There was a problem changing your sign-in email back.

If you try again and still can’t reset your email, try asking your administrator for help.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oD(e){return tH(e='

Your email has been verified

You can now sign in with your new account

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function ok(e){return tH(e='

Try verifying your email again

Your request to verify your email has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oN(e){var t=e.G,i="";return tH(i+='

Your email has been verified and changed

'+(e="You can now sign in with your new email "+tG(e.email)+".")+'

'+(t?'
'+aH()+"
":"")+"
")}function oF(e){return tH(e='

Try updating your email again

Your request to verify and update your email has expired or the link has already been used.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oB(e){var t=e.factorId,i=e.phoneNumber;e=e.G;var n='

Removed second factor

';return"phone"===t?n+=t="The "+tG(t)+" "+tG(i)+" was removed as a second authentication step.":n+="The device or app was removed as a second authentication step.",tH(n+='

If you don\'t recognize this device, someone might be trying to access your account. Consider changing your password right away.

'+(e?'
'+aH()+"
":"")+"
")}function oU(e){return tH(e='

Couldn\'t remove your second factor

Something went wrong removing your second factor.

Try removing it again. If that doesn\'t work, contact support for assistance.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oV(e){var t=e.zb;return e='

Error encountered

'+tG(e.errorMessage)+'

',t&&(e+=aj({label:tX("Retry")})),tH(e+"
")}function oG(e){return tH(e='

Error encountered

'+tG(e.errorMessage)+"

")}function oj(e,t,i){var n=e.Qb;return tH('

Sign in

'+(e="Continue with "+tG(e.jc)+"?")+'

'+(n="You originally wanted to sign in with "+tG(n))+'

'+aq(null)+aj({label:tX("Continue")})+'
")}function oW(e,t,i){var n='")}function oY(e,t,i){var n,r=(e=e||{}).Gb,s=e.Va;return t=e.ia,n=(e='")}function oH(e,t,i){t=(e=e||{}).phoneNumber;var n="";return e='Enter the 6-digit code we sent to ‎'+tG(t)+"",tG(t),t=n,i='"))}function oz(){return tH('

Sign Out

You are now successfully signed out.

')}function oX(e,t,i){var n='
    ';t=(e=e.ec).length;for(var r=0;r',s.V?a+=tG(s.V):a+=s="Sign in to "+tG(s.displayName),n+='
  • '+(a=tH(a+''+o+""))+"
  • "}return tH(n+='
")}function oK(e,t,i){return tH('

Sign in

'+aG(null)+'
'+aj(null)+'
")}function oq(){return aM(this,"firebaseui-id-submit")}function oJ(){return aM(this,"firebaseui-id-secondary-link")}function o$(e,t){aF(this,oq.call(this),function(t){e(t)});var i=oJ.call(this);i&&t&&aF(this,i,function(e){t(e)})}function oQ(){return aM(this,"firebaseui-id-password")}function oZ(){return aM(this,"firebaseui-id-password-error")}function o0(){var e=oQ.call(this),t=oZ.call(this);ak(this,e,function(){aV(t)&&(aD(e,!0),aB(t))})}function o1(){var e=oQ.call(this),t=oZ.call(this);return s6(e)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("Enter your password").toString()),t=!1),t?s6(e):null}function o2(e,t,i,n,r,s){oa.call(this,oT,{email:e},s,"passwordLinking",{F:n,D:r}),this.w=t,this.H=i}R(os,im),R(oa,aP),(e=oa.prototype).kb=function(){var e=tF(this.fb,this.eb,this.Z,this.s);a5(e),this.g=e},e.v=function(){if(oa.K.v.call(this),iz(oo(this),new os("pageEnter",oo(this),{pageId:this.Ga})),this.bb()&&this.Z.F){var e=this.Z.F;aF(this,this.bb(),function(){e()})}if(this.ab()&&this.Z.D){var t=this.Z.D;aF(this,this.ab(),function(){t()})}},e.ya=function(){iz(oo(this),new os("pageExit",oo(this),{pageId:this.Ga})),oa.K.ya.call(this)},e.o=function(){window.clearTimeout(this.ca),this.eb=this.fb=this.ca=null,this.Fa=!1,this.A=null,a4(this.N()),oa.K.o.call(this)},e.I=function(e,t,i,n){function r(){if(a.T)return null;a.Fa=!1,window.clearTimeout(a.ca),a.ca=null,a.A&&(a4(a.A),t_(a.A),a.A=null)}var s,a=this;return a.Fa?null:(a.Fa=!0,s=s5(a.N(),"firebaseui-use-spinner"),a.ca=window.setTimeout(function(){a.N()&&null===a.A&&(a.A=tF(a2,{tb:s},null,a.s),a.N().appendChild(a.A),a5(a.A))},500),e.apply(null,t).then(i,n).then(r,r))},O(oa.prototype,{a:function(e){ot.call(this);var t=tF(aQ,{message:e},null,this.s);this.N().appendChild(t),aF(this,on.call(this),function(){t_(t)})},yc:ot,Ac:oi,zc:on,$:function(e,t){e=tF(a0,{Ma:e,message:t},null,this.s),a7.call(this,e)},h:a8,Cb:oe,Cc:function(){return aM(this,"firebaseui-tos")},bb:function(){return aM(this,"firebaseui-tos-link")},ab:function(){return aM(this,"firebaseui-pp-link")},Dc:function(){return aM(this,"firebaseui-tos-list")}}),ol.a="firebaseui.auth.soy2.page.signIn",ou.a="firebaseui.auth.soy2.page.passwordSignIn",od.a="firebaseui.auth.soy2.page.passwordSignUp",of.a="firebaseui.auth.soy2.page.passwordRecovery",op.a="firebaseui.auth.soy2.page.passwordRecoveryEmailSent",og.a="firebaseui.auth.soy2.page.callback",om.a="firebaseui.auth.soy2.page.spinner",ov.a="firebaseui.auth.soy2.page.blank",oy.a="firebaseui.auth.soy2.page.emailLinkSignInSent",ob.a="firebaseui.auth.soy2.page.emailNotReceived",ox.a="firebaseui.auth.soy2.page.emailLinkSignInConfirmation",oE.a="firebaseui.auth.soy2.page.differentDeviceError",ow.a="firebaseui.auth.soy2.page.anonymousUserMismatch",oT.a="firebaseui.auth.soy2.page.passwordLinking",oS.a="firebaseui.auth.soy2.page.emailLinkSignInLinking",oA.a="firebaseui.auth.soy2.page.emailLinkSignInLinkingDifferentDevice",oC.a="firebaseui.auth.soy2.page.federatedLinking",o_.a="firebaseui.auth.soy2.page.unauthorizedUser",oI.a="firebaseui.auth.soy2.page.unsupportedProvider",oO.a="firebaseui.auth.soy2.page.passwordReset",oP.a="firebaseui.auth.soy2.page.passwordResetSuccess",oM.a="firebaseui.auth.soy2.page.passwordResetFailure",oR.a="firebaseui.auth.soy2.page.emailChangeRevokeSuccess",oL.a="firebaseui.auth.soy2.page.emailChangeRevokeFailure",oD.a="firebaseui.auth.soy2.page.emailVerificationSuccess",ok.a="firebaseui.auth.soy2.page.emailVerificationFailure",oN.a="firebaseui.auth.soy2.page.verifyAndChangeEmailSuccess",oF.a="firebaseui.auth.soy2.page.verifyAndChangeEmailFailure",oB.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionSuccess",oU.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionFailure",oV.a="firebaseui.auth.soy2.page.recoverableError",oG.a="firebaseui.auth.soy2.page.unrecoverableError",oj.a="firebaseui.auth.soy2.page.emailMismatch",oW.a="firebaseui.auth.soy2.page.providerSignIn",oY.a="firebaseui.auth.soy2.page.phoneSignInStart",oH.a="firebaseui.auth.soy2.page.phoneSignInFinish",oz.a="firebaseui.auth.soy2.page.signOut",oX.a="firebaseui.auth.soy2.page.selectTenant",oK.a="firebaseui.auth.soy2.page.providerMatchByEmail",a(o2,oa),o2.prototype.v=function(){this.P(),this.M(this.w,this.H),oc(this,this.i(),this.w),this.i().focus(),oa.prototype.v.call(this)},o2.prototype.o=function(){this.w=null,oa.prototype.o.call(this)},o2.prototype.j=function(){return s6(aM(this,"firebaseui-id-email"))},O(o2.prototype,{i:oQ,B:oZ,P:o0,u:o1,ea:oq,ba:oJ,M:o$});var o3=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function o5(){return aM(this,"firebaseui-id-email")}function o4(){return aM(this,"firebaseui-id-email-error")}function o9(e){var t=o5.call(this),i=o4.call(this);ak(this,t,function(){aV(i)&&(aD(t,!0),aB(i))}),e&&aN(this,t,function(){e()})}function o6(){return z(s6(o5.call(this))||"")}function o7(){var e=o5.call(this),t=o4.call(this),i=s6(e)||"";return i?o3.test(i)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("That email address isn't correct").toString()),t=!1):(aD(e,!1),aU(t,tY("Enter your email address to continue").toString()),t=!1),t?z(s6(e)):null}function o8(e,t,i,n,r,s,a){oa.call(this,ou,{email:i,ia:!!s},a,"passwordSignIn",{F:n,D:r}),this.w=e,this.H=t}function he(e,t,i,n,r,s){oa.call(this,e,t,n,r||"notice",s),this.i=i||null}function ht(e,t,i,n,r){he.call(this,op,{email:e,G:!!t},t,r,"passwordRecoveryEmailSent",{F:i,D:n})}function hi(e,t){he.call(this,oD,{G:!!e},e,t,"emailVerificationSuccess")}function hn(e,t){he.call(this,ok,{G:!!e},e,t,"emailVerificationFailure")}function hr(e,t,i){he.call(this,oN,{email:e,G:!!t},t,i,"verifyAndChangeEmailSuccess")}function hs(e,t){he.call(this,oF,{G:!!e},e,t,"verifyAndChangeEmailFailure")}function ha(e,t){he.call(this,oU,{G:!!e},e,t,"revertSecondFactorAdditionFailure")}function ho(e){he.call(this,oz,void 0,void 0,e,"signOut")}function hh(e,t){he.call(this,oP,{G:!!e},e,t,"passwordResetSuccess")}function hc(e,t){he.call(this,oM,{G:!!e},e,t,"passwordResetFailure")}function hl(e,t){he.call(this,oL,{G:!!e},e,t,"emailChangeRevokeFailure")}function hu(e,t,i){he.call(this,oV,{errorMessage:e,zb:!!t},t,i,"recoverableError")}function hd(e,t){he.call(this,oG,{errorMessage:e},void 0,t,"unrecoverableError")}function hf(e){if("auth/invalid-credential"===e.code&&e.message&&-1!==e.message.indexOf("error=consent_required"))return{code:"auth/user-cancelled"};if(e.message&&-1!==e.message.indexOf("HTTP Cloud Function returned an error:")){var t=JSON.parse(e.message.substring(e.message.indexOf("{"),e.message.lastIndexOf("}")+1));return{code:e.code,message:t&&t.error&&t.error.message||e.message}}return e}function hp(e,t,i,n){function r(i){if(!i.name||"cancel"!=i.name){t:{var n=i.message;try{var r=((JSON.parse(n).error||{}).message||"").toLowerCase().match(/invalid.+(access|id)_token/);if(r&&r.length){var s=!0;break t}}catch(e){}s=!1}if(s)i=oo(t),t.m(),hE(e,i,void 0,tY("Your sign-in session has expired. Please try again.").toString());else{if(s=i&&i.message||"",i.code){if("auth/email-already-in-use"==i.code||"auth/credential-already-in-use"==i.code)return;s=hv(i)}t.a(s)}}}if(cN(e),n)return hg(e,i),nn();if(!i.credential)throw Error("No credential found!");if(!cC(e).currentUser&&!i.user)throw Error("User not logged in.");try{var s,a=(s=i,cU(e),cL(e,function(t){if(e.j&&!e.j.isAnonymous&&sx(cB(e))&&!cC(e).currentUser)return cG(e).then(function(){return"password"==s.credential.providerId&&(s.credential=null),s});if(t)return cG(e).then(function(){return t.linkWithCredential(s.credential)}).then(function(e){return s.user=e.user,s.credential=e.credential,s.operationType=e.operationType,s.additionalUserInfo=e.additionalUserInfo,s},function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return cj(e,t,s.credential)});if(!s.user)throw Error('Internal error: An incompatible or outdated version of "firebase.js" may be used.');return cG(e).then(function(){return c_(e).updateCurrentUser(s.user)}).then(function(){return s.user=c_(e).currentUser,s.operationType="signIn",s.credential&&s.credential.providerId&&"password"==s.credential.providerId&&(s.credential=null),s})}))}catch(e){return n0(e.code||e.message,e),t.a(e.code||e.message),nn()}return i=a.then(function(t){hg(e,t)},r).then(void 0,r),ck(e,a),nn(i)}function hg(e,t){if(!t.user)throw Error("No user found");var i=sV(cB(e));if(sU(cB(e))&&i&&rs("Both signInSuccess and signInSuccessWithAuthResult callbacks are provided. Only signInSuccessWithAuthResult callback will be invoked."),i){i=sV(cB(e));var n=r4(cI(e))||void 0;r3(rZ,cI(e));var r=!1;ng()?((!i||i(t,n))&&(r=!0,ty(window.opener.location,hm(e,n))),i||window.close()):(!i||i(t,n))&&(r=!0,ty(window.location,hm(e,n))),r||e.reset()}else{i=t.user,t=t.credential,n=sU(cB(e)),r=r4(cI(e))||void 0,r3(rZ,cI(e));var s=!1;ng()?((!n||n(i,t,r))&&(s=!0,ty(window.opener.location,hm(e,r))),n||window.close()):(!n||n(i,t,r))&&(s=!0,ty(window.location,hm(e,r))),s||e.reset()}}function hm(e,t){if(!(e=t||cB(e).a.get("signInSuccessUrl")))throw Error("No redirect URL has been found. You must either specify a signInSuccessUrl in the configuration, pass in a redirect URL to the widget URL, or return false from the callback.");return e}function hv(e){var t={code:e.code},i="";switch((t=t||{}).code){case"auth/email-already-in-use":i+="The email address is already used by another account";break;case"auth/requires-recent-login":case"auth/user-token-expired":i+=tY("Please login again to perform this operation");break;case"auth/too-many-requests":i+="You have entered an incorrect password too many times. Please try again in a few minutes.";break;case"auth/user-cancelled":i+="Please authorize the required permissions to sign in to the application";break;case"auth/user-not-found":i+="That email address doesn't match an existing account";break;case"auth/weak-password":i+="Strong passwords have at least 6 characters and a mix of letters and numbers";break;case"auth/wrong-password":i+="The email and password you entered don't match";break;case"auth/network-request-failed":i+="A network error has occurred";break;case"auth/invalid-phone-number":i+=t7();break;case"auth/invalid-verification-code":i+=tY("Wrong code. Try again.");break;case"auth/code-expired":i+="This code is no longer valid";break;case"auth/expired-action-code":i+="This code has expired.";break;case"auth/invalid-action-code":i+="The action code is invalid. This can happen if the code is malformed, expired, or has already been used."}if(t=tY(i).toString())return t;try{return JSON.parse(e.message),n0("Internal error: "+e.message,void 0),ie().toString()}catch(t){return e.message}}function hy(e,t,i,n){function r(){var i,n;i=new rp(e.h.tenantId||null),n=cI(e),r5(rQ,{tenantId:i.a},n),ck(e,t.I(_(e.dc,e),[c],function(){if("file:"===(window.location&&window.location.protocol))return ck(e,cT(e).then(function(i){t.m(),r3(rQ,cI(e)),s2("callback",e,h,nn(i))},a))},o))}function a(n){if(r3(rQ,cI(e)),!n.name||"cancel"!=n.name)switch((n=hf(n)).code){case"auth/popup-blocked":r();break;case"auth/popup-closed-by-user":case"auth/cancelled-popup-request":case"auth/credential-already-in-use":break;case"auth/network-request-failed":case"auth/too-many-requests":case"auth/user-cancelled":t.a(hv(n));break;case"auth/admin-restricted-operation":t.m(),sI(cB(e))?s2("handleUnauthorizedUser",e,h,null,i):s2("callback",e,h,nr(n));break;default:t.m(),s2("callback",e,h,nr(n))}}function o(i){r3(rQ,cI(e)),i.name&&"cancel"==i.name||(n0("signInWithRedirect: "+i.code,void 0),i=hv(i),"blank"==t.Ga&&sF(cB(e))?(t.m(),s2("providerSignIn",e,h,i)):t.a(i))}var h=oo(t),c=function(e,t,i){var n=sy[t]&&s.default.auth[sy[t]]?new s.default.auth[sy[t]]:0==t.indexOf("saml.")?new s.default.auth.SAMLAuthProvider(t):new s.default.auth.OAuthProvider(t);if(!n)throw Error("Invalid Firebase Auth provider!");var r=sO(cB(e),t);if(n.addScope)for(var a=0;a(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n?(r=n,i=""):i=t.substring(r+1,n),n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,n=t[0]+(t[1]?"?"+t[1]:"")+t[2]):n=t,cB(this).a.get("popupMode")?(e=(window.screen.availHeight-600)/2,t=(window.screen.availWidth-500)/2,n=n||"about:blank",(e={width:500,height:600,top:0{let t=setTimeout(()=>{e(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})})}/** * @license * Copyright 2020 Google LLC * diff --git a/dist/index.3928b1e6.js b/dist/index.3928b1e6.js index b6eee29..4d4097b 100644 --- a/dist/index.3928b1e6.js +++ b/dist/index.3928b1e6.js @@ -1,4 +1,4 @@ -!function(e,t,i,n,r){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],o=a.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!o[t]){if(!e[t]){var r="function"==typeof s[n]&&s[n];if(!i&&r)return r(t,!0);if(a)return a(t,!0);if(h&&"string"==typeof t)return h(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return o[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=a,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return s[n]}}),s[n]=c;for(var l=0;l{s.clientStart()}),s.events.on("reldens.afterInitEngineAndStartGame",()=>{s.gameDom.getElement("#current-version").innerHTML=s.config.client.gameEngine.version+" -"}),s.events.on("reldens.startGameAfter",()=>{s.gameDom.getElement(".row-disclaimer")?.remove()}),s.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{if("rski.Bc"!==e.act)return;let t=(e.data?.skillKey||"").toString(),i=Number(e.data?.extraData?.sd||0);if(""!==t&&0=r){e.style.setProperty("--angle","360deg"),e.classList.remove("cooldown");return}e.style.setProperty("--angle",`${(i-r)/i*360}deg`),requestAnimationFrame(t)}()}})}),window.reldens=s},{f6a573e6a894b077:"blTPb","22d25a4cea3c3bc":"7ASKi"}],blTPb:[function(e,t,i){e("684699bf663c3eb9"),e("8524ab6b767fe50d");let{GameManager:n}=e("163628b93f1bf46b");t.exports.GameManager=n},{"684699bf663c3eb9":"6H8Vf","8524ab6b767fe50d":"ikKUq","163628b93f1bf46b":"eDoZE"}],"6H8Vf":[function(e,t,i){e("1784995cff40f4ee"),e("3db84f65815009e9"),e("eaee9f5716583d73"),e("375d8cdc37856052"),e("b97ac47c987ae87a"),e("a021542673f3dca5"),e("4917cb57871d338e"),e("32b253e39e74d8bb"),e("389e51d5714f687f"),e("f5e993e561fd02cd"),e("bb2bc4d4414bdde6"),e("efe695102c445413"),e("ccd56f09b115e545"),e("fcaf4e6617f043bc"),e("653d106c82dca6c3"),e("e3cead5be66b9f0d"),e("f0a4c78fa0016f60"),e("1d68ebee0b3f96f0"),e("af40359e9eb052ec"),e("b57c55c586369faa"),e("6e929cb8fa33300f"),e("a021c9c924d06b99"),e("c3a2ae3c387d24da"),e("4b806e1bc40e42a5"),e("4e1bbb4edd22e0ae"),e("716f90fa84e1f77c"),e("a4c895062bc52ef"),e("ab8b1e642f069677"),e("1c9c9c4583180611"),e("f74bd522ba638140"),e("161807fa85856503"),e("f48a3c099ac8e2b5"),e("8cf2e5f73ade81b4"),e("a9422cf3f5275913"),e("cc95b5c4842b3cba"),e("d5f0f9adde262121"),e("c2de5cf351f42e3e"),e("9b044f9dbdd9a543"),e("2c6c7828d3cbd4f7"),e("e4df5de4d418cbbb"),e("914cd91ef0bfb6f9"),e("6f128d6969e825b2"),e("f4ead5d4eb2af5d5"),e("b35e2d13cb589276"),e("c410e1b69fdd7adf"),e("312dd5f9138d6e43"),e("38530968f16263a0"),e("14af908df009beac"),e("dcd91f07678eb4c9"),e("c69d702ec59c2500"),e("4725bcb6f24869b3"),e("3cf52eabf83551bf"),e("c9cbfc3b3c78d70d"),e("6b0227180c3df38c"),e("e0fd70d02f07a4a0"),e("31a608e674c817eb"),e("b880a9dbebb02a2e"),e("46b1ee4ddc311f0"),e("8cf2fe9261c818db"),e("52fba706500b4b2d"),e("ffbe65a8f5be01e6"),e("e1e627d3acaf8d18"),e("f4d9392585892a5b"),e("b04a1a032c30e8d5"),e("c1de8697c29b0da"),e("16d0f8a09ff973a0"),e("a48b7fc982febaf8"),e("b40fbc8703ed802d"),e("71533dcee95bced0"),e("38d8d405ad51cb0c"),e("c8503c219bf01ed1"),e("bc082cafa79546ad"),e("204a0882af55ce2b"),e("a3152d34d8dd7b45"),e("873b1b5c61bcd33"),e("16d6ef4f50e3e6e9"),e("e872f08087c6cb33"),e("657cbbcd48650779"),e("4252d65d3677af5a"),e("281c6fd1d9df7324"),e("c31154b4d54b87f"),e("610034140e218c33"),e("1bc59f7bc4d02b94"),e("1ac49ff73550904e"),e("8fd22c15c1dc3fdb"),e("722244e22d484cd4"),e("d7ec35bad14a1f3f"),e("9bb45158b3bb60e5"),e("dbfda47097dcdc05"),e("62df99a6374ea8e7"),e("30f5c44d5b0c5882"),e("fa34aad1a54cb74f"),e("6e7dfd5f426811ae"),e("f6587d23159bb2e"),e("bb688511262fa331"),e("4ba8f97c77fe72fb"),e("d400d9af20e5e158"),e("89eb5ddf4e423e14"),e("cfeb658fb1129c7d"),e("cf52518d7e23221c"),e("593d4e7884fc0918"),e("30b35f30b6dba51d"),e("24519596b23105e8"),e("69b53c2db51c07c6"),e("cd51cbb6a384e947"),e("b2bec95e117c35ff"),e("e02033538de8d8c6"),e("bb0f24f71db75179"),e("7334e4338273fd72"),e("a00519108abb0534"),e("2835a3239b6a1bc4"),e("f5faf41ae9cf1c5"),e("5e6fa649046f5df2"),e("84775698f8fef6c0"),e("8c2455e35e11d959"),e("1cee7874e0ff2b2b"),e("6d098447a1b2abdc"),e("7d7d81ff5b818a49"),e("c33461c993e8e491"),e("64a89b8cfcf7ab12"),e("300ca7e5c4ba71de"),e("5ea06ea856112f5d"),e("2f95ea182a42efc3"),e("7e00e0c0121e6a90"),e("43c70c31a61cc402"),e("7f64762e2c0d0f2e"),e("7a6c9bba2845dabe"),e("73d9d26ef5a08f08"),e("f671014547fe0e5e"),e("b36c3c3b6e78e925"),e("a7f5dbf9fb623d0a"),e("465fceaf1bde589b"),e("7766539bc795a94"),e("4faee6716fa8629d"),e("7737fbcafb7ce523"),e("e90b0a3a493c0ede"),e("26317a793dea7e9a"),e("9f5e020a3549a118"),e("9d0bfe01231db1a7"),e("b1221eae0bc5f9b"),e("c5352c47687ac7c"),e("34fe45ae8ed17da0"),e("781c619e0cad12e2"),e("7c6b58bad8dc3b81"),e("736ca46bafb50f8f"),e("4a8b2b3ca7e4d0f0"),e("3fd33a4a9e23fb29"),e("88ad2704384a1a6e"),e("1c6c6da898bf18bb"),e("d239d0cd4a8ca65b"),e("11eae3d8cd132ecd"),e("31d0c33ce951164f"),e("55fc79bd0e9015ff"),e("4c7f59100f9f15df"),e("45eab59e8e26538d"),e("46220f971d58285"),e("37e3f8df977640b7"),e("4449d13eae7996a8"),e("197d7cc5dd2340b0"),e("1ec03223143b45c0"),e("b3160300f21af751"),e("efbae5e5ed53d7a4"),e("78d707d60e5ff2ef"),e("6aa1c963ba0fa26a"),e("29093847653ffb17"),e("b0554b151edd2f4"),e("c5299b37711c29ed"),e("334e6eea450261d0"),e("12c4df9fff4b4031"),e("9121fee042bcac7e"),e("5d62685ef5ad6e57"),e("3e4b4c735ca60ab9"),e("bb7017f5a1be1e59"),e("e8e708482f11c7ff"),e("74095422c65e093c"),e("6d6ea5c3920f0ba9"),e("3447041b04906440"),e("90c4a005313bad84"),e("4769b7aec07e6de3"),e("925b64021990cd94"),e("6b93322692746037"),e("faa76facff418618"),e("c9933e8bbe42bd93"),e("8689abb82cc2e305"),e("2b087e045ed8c999"),e("5345958572918685"),e("3be5275c466b41f8"),e("8aac76b9f2cbbdb5"),e("be9c14095a58943"),e("43202def26bf6f4d"),e("2d80f533903ef8af"),e("218de58a047e4122"),e("e9c3dc5d87196314"),e("e941f90445a42817"),e("5ec6c25f739e2e3"),e("dcf33a0bfc9dbd80"),e("11e994014f9ea4ef"),e("d3d2c1ecea6b651e"),e("2942bfa075e0734"),e("d33b293dd98ee251"),e("4d67970b1d16e278"),e("ea23a5ff87e419a"),e("a4ec7d06d49f6770"),e("68de4d9a4e90a51d"),e("91a33ef14a8f152c"),e("55178304aaa34b5d"),e("100585ac292d4d0a"),e("11bb9bd5ef85c385"),e("6985fc4c13b8c019"),e("9632a736fdb17734"),e("645f58b86974fd27"),e("679ce5136028bc60"),e("16129f94bb5d1db1"),e("4a20575877b9aa9"),e("f493cf27dec8fda2"),e("9455107212c82097"),e("7abb352823d027e3"),e("23cd38aa92bb5713"),e("7fa171f672c06c5"),e("d6c3f6742b067ddd"),e("687e66ea18227d4f"),e("4be9f7f33ab31972"),e("4b97ceec572fb5ac"),e("6962fb765acff151"),e("1a45d71179cc6824"),e("546ab40a97e46161"),e("b9d67d5f8399a961"),e("4d6a7c1e95ef8439"),e("61fca23ef75aa33f"),e("1c1cdf9b06016701"),e("397bfa6741ea05a1"),e("ec6da7c8737ed287"),e("9a3b23b9904e7580"),e("42c1ca9f44d09740"),e("6c230af164d5e531"),e("a1fd07c504fbd6e2"),e("c5418e31406f900c"),e("6bd1db6cc401cbae"),e("5cc85e0e2e9dc320"),e("e50d5b519a148fce"),e("57eafc4eec0ed5ad"),e("9f4e766b833041e1"),e("51d5ec10d288761f"),e("3df881631b0076c1"),e("6446691a409777d1"),e("65a0e8ac0e64097a"),e("ad09ac1fd0978c3"),e("c80f8d7a3d38c630"),e("c0e2fa2805edb141"),e("52fea7a5cc5e8460"),e("676052465cde8b83"),e("46e3f0ef3febe378"),e("901f94f4ed6ef4d5"),e("2f2afc7fe70ef5f"),e("fa4d7e950018d69e"),e("d0d844c58571e80e"),e("570e34e061eaecd7"),e("557af6dc34fe070e"),e("5dd137372fb5b1ae"),e("812633ee0adaf5e"),e("5be5bf591a25d61c"),e("c98746bc7e199094"),e("52278c0a5be7b19f"),e("fde31c759e8e1c42"),e("5254289c25b91dcf"),e("48ca9e9993ba0327"),e("72aac35e49a6d4bd"),e("37312397abe6d28c"),e("12be35b2aeed3ca4"),e("647a7c082cca257b"),e("a0e00f30db9559ea"),e("6c3ebd0eef294356"),e("a66668b79822160a"),e("72aa7e00c8a7b68f"),e("b1d489d5f98dd626"),e("687c365e52ca4b5b"),e("eedef7a537267c12"),e("f888c4da93185eae"),e("69fc7ceed4f23a4b"),e("a70b9f7f981f56ed"),e("698834137971c6a0"),e("6cbcff253173613e"),e("2d4e83632877e8a1"),e("1f6030e01de03bb8"),e("9e73dc5e3d85a023"),e("d24e5da7655d31c6"),e("e2c547d0925efa21"),e("9cb64708d269ee4d"),e("bad110743800027a"),t.exports=e("b02006442da3179e")},{"1784995cff40f4ee":"emAqF","3db84f65815009e9":"h8vRJ",eaee9f5716583d73:"1JQKT","375d8cdc37856052":"58q3y",b97ac47c987ae87a:"5NvUG",a021542673f3dca5:"lG7CT","4917cb57871d338e":"507Fo","32b253e39e74d8bb":"8PIx1","389e51d5714f687f":"a2cUC",f5e993e561fd02cd:"1yLDd",bb2bc4d4414bdde6:"9Ujdq",efe695102c445413:"45PgI",ccd56f09b115e545:"bJ9qS",fcaf4e6617f043bc:"3tmT4","653d106c82dca6c3":"lbpGg",e3cead5be66b9f0d:"hHHDm",f0a4c78fa0016f60:"aSTrG","1d68ebee0b3f96f0":"8nyV3",af40359e9eb052ec:"j1ABh",b57c55c586369faa:"3LJSA","6e929cb8fa33300f":"jYNHr",a021c9c924d06b99:"9D9sM",c3a2ae3c387d24da:"c1k6c","4b806e1bc40e42a5":"lbPxO","4e1bbb4edd22e0ae":"jKklH","716f90fa84e1f77c":"lMNyP",a4c895062bc52ef:"hPNfA",ab8b1e642f069677:"fURyF","1c9c9c4583180611":"6XyUS",f74bd522ba638140:"d83iu","161807fa85856503":"lc4NN",f48a3c099ac8e2b5:"gjqcj","8cf2e5f73ade81b4":"j3v3L",a9422cf3f5275913:"3rrfH",cc95b5c4842b3cba:"b10MD",d5f0f9adde262121:"2JgXG",c2de5cf351f42e3e:"3prNk","9b044f9dbdd9a543":"le1uL","2c6c7828d3cbd4f7":"eli4M",e4df5de4d418cbbb:"zkrYn","914cd91ef0bfb6f9":"6cM5k","6f128d6969e825b2":"j9q44",f4ead5d4eb2af5d5:"k2yB7",b35e2d13cb589276:"YvN4R",c410e1b69fdd7adf:"eqr1I","312dd5f9138d6e43":"gW4UQ","38530968f16263a0":"joaAA","14af908df009beac":"g2wAi",dcd91f07678eb4c9:"iJYnd",c69d702ec59c2500:"dnmIv","4725bcb6f24869b3":"i9xty","3cf52eabf83551bf":"iGG3n",c9cbfc3b3c78d70d:"iJJcs","6b0227180c3df38c":"afcZD",e0fd70d02f07a4a0:"dpjAZ","31a608e674c817eb":"dI1Cn",b880a9dbebb02a2e:"4XBJJ","46b1ee4ddc311f0":"4u8Zq","8cf2fe9261c818db":"9DwR1","52fba706500b4b2d":"hihCW",ffbe65a8f5be01e6:"cl0wd",e1e627d3acaf8d18:"kDbyn",f4d9392585892a5b:"v0oet",b04a1a032c30e8d5:"ilodQ",c1de8697c29b0da:"3sjfy","16d0f8a09ff973a0":"aJQbh",a48b7fc982febaf8:"cl2UC",b40fbc8703ed802d:"l89H5","71533dcee95bced0":"cHGz3","38d8d405ad51cb0c":"6OeqH",c8503c219bf01ed1:"j16TA",bc082cafa79546ad:"ltluo","204a0882af55ce2b":"l0eoZ",a3152d34d8dd7b45:"40OpE","873b1b5c61bcd33":"bC9Ow","16d6ef4f50e3e6e9":"dHKDg",e872f08087c6cb33:"giNSP","657cbbcd48650779":"1HJ0t","4252d65d3677af5a":"gfJCq","281c6fd1d9df7324":"2vgpU",c31154b4d54b87f:"aan7W","610034140e218c33":"h9LbS","1bc59f7bc4d02b94":"ldCGF","1ac49ff73550904e":"6gXbc","8fd22c15c1dc3fdb":"7deV1","722244e22d484cd4":"inQWU",d7ec35bad14a1f3f:"2qLeT","9bb45158b3bb60e5":"c3ILr",dbfda47097dcdc05:"223lQ","62df99a6374ea8e7":"f8Q6z","30f5c44d5b0c5882":"fKGrW",fa34aad1a54cb74f:"7o3jD","6e7dfd5f426811ae":"hXIP7",f6587d23159bb2e:"1aJqY",bb688511262fa331:"DQpS3","4ba8f97c77fe72fb":"9m0ga",d400d9af20e5e158:"6OW8r","89eb5ddf4e423e14":"8Ipne",cfeb658fb1129c7d:"bbe5P",cf52518d7e23221c:"giuXg","593d4e7884fc0918":"4Dfiq","30b35f30b6dba51d":"cIxH8","24519596b23105e8":"khz6l","69b53c2db51c07c6":"flBRC",cd51cbb6a384e947:"OdIjN",b2bec95e117c35ff:"5N41O",e02033538de8d8c6:"gqwBy",bb0f24f71db75179:"cjDQT","7334e4338273fd72":"hjxfV",a00519108abb0534:"lGEJr","2835a3239b6a1bc4":"8Egu9",f5faf41ae9cf1c5:"jWST5","5e6fa649046f5df2":"hrnKP","84775698f8fef6c0":"aXsIP","8c2455e35e11d959":"lsaNY","1cee7874e0ff2b2b":"8eW4I","6d098447a1b2abdc":"h5WTU","7d7d81ff5b818a49":"glrUF",c33461c993e8e491:"91CVe","64a89b8cfcf7ab12":"5JCvB","300ca7e5c4ba71de":"1UYJO","5ea06ea856112f5d":"966g1","2f95ea182a42efc3":"2u6nF","7e00e0c0121e6a90":"3Zya8","43c70c31a61cc402":"kEs9R","7f64762e2c0d0f2e":"czjHQ","7a6c9bba2845dabe":"9DWg9","73d9d26ef5a08f08":"8uazT",f671014547fe0e5e:"dLOib",b36c3c3b6e78e925:"bVBB2",a7f5dbf9fb623d0a:"9laFo","465fceaf1bde589b":"1E3wB","7766539bc795a94":"cCotT","4faee6716fa8629d":"htZZS","7737fbcafb7ce523":"b3JIq",e90b0a3a493c0ede:"kPfIJ","26317a793dea7e9a":"9ERxS","9f5e020a3549a118":"6T09z","9d0bfe01231db1a7":"nZQfS",b1221eae0bc5f9b:"6GBQI",c5352c47687ac7c:"g4f9X","34fe45ae8ed17da0":"eNC2R","781c619e0cad12e2":"czmee","7c6b58bad8dc3b81":"96RAZ","736ca46bafb50f8f":"3SReg","4a8b2b3ca7e4d0f0":"dOXap","3fd33a4a9e23fb29":"evHBo","88ad2704384a1a6e":"liWu9","1c6c6da898bf18bb":"a2AOJ",d239d0cd4a8ca65b:"yqtQx","11eae3d8cd132ecd":"4M7RG","31d0c33ce951164f":"7ybM1","55fc79bd0e9015ff":"csFkS","4c7f59100f9f15df":"6V0HA","45eab59e8e26538d":"26fdt","46220f971d58285":"8nI8r","37e3f8df977640b7":"dPzjA","4449d13eae7996a8":"50y6Q","197d7cc5dd2340b0":"cv1IN","1ec03223143b45c0":"g4HyM",b3160300f21af751:"fDjj9",efbae5e5ed53d7a4:"dejPc","78d707d60e5ff2ef":"kL7gw","6aa1c963ba0fa26a":"lQsQz","29093847653ffb17":"jy0xe",b0554b151edd2f4:"N0A9g",c5299b37711c29ed:"bnSd3","334e6eea450261d0":"hCLFJ","12c4df9fff4b4031":"jFiZs","9121fee042bcac7e":"1BYUa","5d62685ef5ad6e57":"3gYE0","3e4b4c735ca60ab9":"8Ariw",bb7017f5a1be1e59:"fpMBl",e8e708482f11c7ff:"5tIGd","74095422c65e093c":"14MkC","6d6ea5c3920f0ba9":"2JQK3","3447041b04906440":"9radj","90c4a005313bad84":"4cips","4769b7aec07e6de3":"eNQOe","925b64021990cd94":"5K8rr","6b93322692746037":"kdtyD",faa76facff418618:"aGaAQ",c9933e8bbe42bd93:"4l0Mz","8689abb82cc2e305":"1W6O8","2b087e045ed8c999":"iIMfF","5345958572918685":"ebh58","3be5275c466b41f8":"5aq0U","8aac76b9f2cbbdb5":"8hV4V",be9c14095a58943:"aU3RB","43202def26bf6f4d":"9kNJt","2d80f533903ef8af":"if1fM","218de58a047e4122":"g0fSy",e9c3dc5d87196314:"eKkbH",e941f90445a42817:"dLJLG","5ec6c25f739e2e3":"cDQpr",dcf33a0bfc9dbd80:"kFTda","11e994014f9ea4ef":"i2qFG",d3d2c1ecea6b651e:"6dNpA","2942bfa075e0734":"5JfZw",d33b293dd98ee251:"fU7MD","4d67970b1d16e278":"iz82g",ea23a5ff87e419a:"5PH9s",a4ec7d06d49f6770:"f2AVd","68de4d9a4e90a51d":"j2dUp","91a33ef14a8f152c":"2HEOd","55178304aaa34b5d":"4kyL0","100585ac292d4d0a":"fx5cJ","11bb9bd5ef85c385":"9GM5b","6985fc4c13b8c019":"ilZVq","9632a736fdb17734":"hUcmJ","645f58b86974fd27":"l2p2s","679ce5136028bc60":"3o3Gk","16129f94bb5d1db1":"4Lt39","4a20575877b9aa9":"3qZNd",f493cf27dec8fda2:"20tl2","9455107212c82097":"ahutJ","7abb352823d027e3":"f2UI4","23cd38aa92bb5713":"4XIfF","7fa171f672c06c5":"l1rs2",d6c3f6742b067ddd:"adYvn","687e66ea18227d4f":"gidCX","4be9f7f33ab31972":"bv1yh","4b97ceec572fb5ac":"kO1Zg","6962fb765acff151":"bgZU7","1a45d71179cc6824":"jgQND","546ab40a97e46161":"hB11V",b9d67d5f8399a961:"31EdS","4d6a7c1e95ef8439":"5PjpG","61fca23ef75aa33f":"fxnuD","1c1cdf9b06016701":"6jDOT","397bfa6741ea05a1":"gG1e8",ec6da7c8737ed287:"17kvf","9a3b23b9904e7580":"9B0y9","42c1ca9f44d09740":"3kbwg","6c230af164d5e531":"5wzd5",a1fd07c504fbd6e2:"1dCBn",c5418e31406f900c:"2Mqsz","6bd1db6cc401cbae":"eZZyP","5cc85e0e2e9dc320":"go8ZW",e50d5b519a148fce:"iCErC","57eafc4eec0ed5ad":"e8hfX","9f4e766b833041e1":"2kMmr","51d5ec10d288761f":"212MV","3df881631b0076c1":"9AC43","6446691a409777d1":"aqoug","65a0e8ac0e64097a":"iuJoY",ad09ac1fd0978c3:"czX8g",c80f8d7a3d38c630:"9XxKn",c0e2fa2805edb141:"7aRDd","52fea7a5cc5e8460":"k5Rlo","676052465cde8b83":"f3FBF","46e3f0ef3febe378":"4ZhIs","901f94f4ed6ef4d5":"9uG4h","2f2afc7fe70ef5f":"ccgrY",fa4d7e950018d69e:"dESGS",d0d844c58571e80e:"7G7OX","570e34e061eaecd7":"lGF1i","557af6dc34fe070e":"6biAe","5dd137372fb5b1ae":"8qlqb","812633ee0adaf5e":"lGQwY","5be5bf591a25d61c":"5EgJz",c98746bc7e199094:"hUSBX","52278c0a5be7b19f":"bN7du",fde31c759e8e1c42:"accWj","5254289c25b91dcf":"8zMXu","48ca9e9993ba0327":"bwjPE","72aac35e49a6d4bd":"4AZtq","37312397abe6d28c":"8EnX5","12be35b2aeed3ca4":"4Puey","647a7c082cca257b":"jxrdF",a0e00f30db9559ea:"jwPXF","6c3ebd0eef294356":"khTY5",a66668b79822160a:"a2DYE","72aa7e00c8a7b68f":"6bhjG",b1d489d5f98dd626:"fJnNi","687c365e52ca4b5b":"4teOf",eedef7a537267c12:"lCP8o",f888c4da93185eae:"1mZsz","69fc7ceed4f23a4b":"f5KUv",a70b9f7f981f56ed:"kONpx","698834137971c6a0":"h5L1l","6cbcff253173613e":"4J9Kt","2d4e83632877e8a1":"6WXZj","1f6030e01de03bb8":"jUFLb","9e73dc5e3d85a023":"fisJQ",d24e5da7655d31c6:"drhch",e2c547d0925efa21:"k5k9P","9cb64708d269ee4d":"eZzIO",bad110743800027a:"RkUgQ",b02006442da3179e:"iwjHr"}],emAqF:[function(e,t,i){e("9907e25c4a0aca96"),e("6ca7b218a3c5142b"),e("733763f50161f4ff"),e("c7e8ec39e8a501c2"),e("c7f11a8d456724")},{"9907e25c4a0aca96":"jpVKZ","6ca7b218a3c5142b":"epSXE","733763f50161f4ff":"k89ua",c7e8ec39e8a501c2:"fKGrW",c7f11a8d456724:"dZVa2"}],jpVKZ:[function(e,t,i){var n=e("aa5b0a4df7071e1c"),r=e("8c408afdfdfd6dab"),s=e("ec29447784c0114a"),a=e("2ae82c68e0ae40f"),o=e("33b2452838c11281"),h=e("fe806d898b4ac536"),c=e("22d83c4d1a79086a"),l=e("4d2b1c3a38702ef3"),u=e("e759feb93fde3dec"),d=e("5787c74359c86565"),f=e("cb32a2177bbbabaa"),p=e("20c01e2a38c99bca"),g=e("db20fe52e48e74e7"),m=e("62c50d67351dd58a"),v=e("22cebb6457d12409"),y=e("31dc62cd3a5d2fda"),b=e("14509c82c4f3e2e9"),x=e("e62ee144604e88fa"),E=e("d7fe574b8ddea4e9"),w=e("fc2b88a87581c564"),T=e("7260979738a18766"),S=e("c58a10205146713c"),A=e("a86b1c2861165466"),C=e("dfca683f72250bcc"),_=e("55a26bb040d83918"),I=e("97712bd669b06ccf"),O=e("b2130786c0cb0f80"),P=e("aaac558287b5aa94"),M=e("c6ea7d7218c4c1f0"),R=e("f4a251fc6a0ec32a"),L=e("2d3c3a8ae405672f"),D=e("a99e55c559023f8b"),k=e("baa63ea979fa51ca"),N=e("ecef47c4fbdd606b"),F=e("f57a8c7fd7d84ffb"),B=e("37236ad9fe95a3e"),U=e("c50230ad6eef7275").forEach,V=P("hidden"),G="Symbol",j="prototype",W=B.set,Y=B.getterFor(G),H=Object[j],z=r.Symbol,X=z&&z[j],q=r.RangeError,K=r.TypeError,J=r.QObject,$=T.f,Q=S.f,Z=E.f,ee=C.f,et=a([].push),ei=O("symbols"),en=O("op-symbols"),er=O("wks"),es=!J||!J[j]||!J[j].findChild,ea=function(e,t,i){var n=$(H,t);n&&delete H[t],Q(e,t,i),n&&e!==H&&Q(H,t,n)},eo=h&&l(function(){return 7!==y(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?ea:Q,eh=function(e,t){var i=ei[e]=y(X);return W(i,{type:G,tag:e,description:t}),h||(i.description=t),i},ec=function(e,t,i){e===H&&ec(en,t,i),f(e);var n=g(t);return(f(i),u(ei,n))?(i.enumerable?(u(e,V)&&e[V][n]&&(e[V][n]=!1),i=y(i,{enumerable:v(0,!1)})):(u(e,V)||Q(e,V,v(1,y(null))),e[V][n]=!0),eo(e,n,i)):Q(e,n,i)},el=function(e,t){f(e);var i=p(t);return U(b(i).concat(ep(i)),function(t){(!h||s(eu,i,t))&&ec(e,t,i[t])}),e},eu=function(e){var t=g(e),i=s(ee,this,t);return(!(this===H&&u(ei,t))||!!u(en,t))&&(!(i||!u(this,t)||!u(ei,t)||u(this,V)&&this[V][t])||i)},ed=function(e,t){var i=p(e),n=g(t);if(!(i===H&&u(ei,n))||u(en,n)){var r=$(i,n);return r&&u(ei,n)&&!(u(i,V)&&i[V][n])&&(r.enumerable=!0),r}},ef=function(e){var t=Z(p(e)),i=[];return U(t,function(e){u(ei,e)||u(M,e)||et(i,e)}),i},ep=function(e){var t=e===H,i=Z(t?en:p(e)),n=[];return U(i,function(e){u(ei,e)&&(!t||u(H,e))&&et(n,ei[e])}),n};c||(_(X=(z=function(){if(d(X,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=R(e),i=function(e){var n=void 0===this?r:this;n===H&&s(i,en,e),u(n,V)&&u(n[V],t)&&(n[V][t]=!1);var a=v(1,e);try{eo(n,t,a)}catch(e){if(!(e instanceof q))throw e;ea(n,t,a)}};return h&&es&&eo(H,t,{configurable:!0,set:i}),eh(t,e)})[j],"toString",function(){return Y(this).tag}),_(z,"withoutSetter",function(e){return eh(R(e),e)}),C.f=eu,S.f=ec,A.f=el,T.f=ed,x.f=E.f=ef,w.f=ep,D.f=function(e){return eh(L(e),e)},h&&(I(X,"description",{configurable:!0,get:function(){return Y(this).description}}),o||_(H,"propertyIsEnumerable",eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),U(b(er),function(e){k(e)}),n({target:G,stat:!0,forced:!c},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!h},{create:function(e,t){return void 0===t?y(e):el(y(e),t)},defineProperty:ec,defineProperties:el,getOwnPropertyDescriptor:ed}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ef}),N(),F(z,G),M[V]=!0},{aa5b0a4df7071e1c:"gJg5v","8c408afdfdfd6dab":"7Z171",ec29447784c0114a:"bOssl","2ae82c68e0ae40f":"2iJ57","33b2452838c11281":"jHRGA",fe806d898b4ac536:"6mXK1","22d83c4d1a79086a":"kkRwC","4d2b1c3a38702ef3":"cXVrS",e759feb93fde3dec:"9JWVX","5787c74359c86565":"d5bNd",cb32a2177bbbabaa:"dPzbI","20c01e2a38c99bca":"h9ut0",db20fe52e48e74e7:"gvuJs","62c50d67351dd58a":"4x6uB","22cebb6457d12409":"5toj2","31dc62cd3a5d2fda":"7isQ3","14509c82c4f3e2e9":"kQgZQ",e62ee144604e88fa:"dDV3S",d7fe574b8ddea4e9:"bBGHM",fc2b88a87581c564:"f3eHQ","7260979738a18766":"aRu9T",c58a10205146713c:"hvqCQ",a86b1c2861165466:"ePigI",dfca683f72250bcc:"7Av2Z","55a26bb040d83918":"4CPdc","97712bd669b06ccf":"3NI4M",b2130786c0cb0f80:"i30ST",aaac558287b5aa94:"k5X1l",c6ea7d7218c4c1f0:"4qgYA",f4a251fc6a0ec32a:"55cC0","2d3c3a8ae405672f":"5CuF7",a99e55c559023f8b:"cwsJo",baa63ea979fa51ca:"jiIFu",ecef47c4fbdd606b:"3ujL7",f57a8c7fd7d84ffb:"dkhk9","37236ad9fe95a3e":"ixHS2",c50230ad6eef7275:"daQdc"}],gJg5v:[function(e,t,i){var n=e("23dea28abc8414d1"),r=e("2ec751f39e500b85").f,s=e("b4567636b28a3b3a"),a=e("50460aa43dd4048a"),o=e("581238c99f8c2c30"),h=e("566a383894c688bc"),c=e("f0e2e697f04e8ad9");t.exports=function(e,t){var i,l,u,d,f,p=e.target,g=e.global,m=e.stat;if(i=g?n:m?n[p]||o(p,{}):n[p]&&n[p].prototype)for(l in t){if(d=t[l],u=e.dontCallGetSet?(f=r(i,l))&&f.value:i[l],!c(g?l:p+(m?".":"#")+l,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;h(d,u)}(e.sham||u&&u.sham)&&s(d,"sham",!0),a(i,l,d,e)}}},{"23dea28abc8414d1":"7Z171","2ec751f39e500b85":"aRu9T",b4567636b28a3b3a:"gKM90","50460aa43dd4048a":"4CPdc","581238c99f8c2c30":"huhcf","566a383894c688bc":"d9xyM",f0e2e697f04e8ad9:"gE5NQ"}],"7Z171":[function(e,t,i){var n=arguments[3],r=function(e){return e&&e.Math===Math&&e};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},{}],aRu9T:[function(e,t,i){var n=e("c04e6fb248689dba"),r=e("553ec943aa2a4554"),s=e("bbc5e69071aa2fbd"),a=e("1d2ffbfd99e01f41"),o=e("c4ea69a78a643d87"),h=e("8ab18ff766aa2ab9"),c=e("3761c5d34b7aa48f"),l=e("c4dfcc26308f1b4a"),u=Object.getOwnPropertyDescriptor;i.f=n?u:function(e,t){if(e=o(e),t=h(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!r(s.f,e,t),e[t])}},{c04e6fb248689dba:"6mXK1","553ec943aa2a4554":"bOssl",bbc5e69071aa2fbd:"7Av2Z","1d2ffbfd99e01f41":"5toj2",c4ea69a78a643d87:"h9ut0","8ab18ff766aa2ab9":"gvuJs","3761c5d34b7aa48f":"9JWVX",c4dfcc26308f1b4a:"lahqe"}],"6mXK1":[function(e,t,i){var n=e("735b783268fd06c0");t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"735b783268fd06c0":"cXVrS"}],cXVrS:[function(e,t,i){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],bOssl:[function(e,t,i){var n=e("44e025d030d66023"),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},{"44e025d030d66023":"3p5v0"}],"3p5v0":[function(e,t,i){var n=e("2642aa7619056f20");t.exports=!n(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"2642aa7619056f20":"cXVrS"}],"7Av2Z":[function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);i.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},{}],"5toj2":[function(e,t,i){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],h9ut0:[function(e,t,i){var n=e("9d8f8f50ac9468eb"),r=e("f7224aed72953ac4");t.exports=function(e){return n(r(e))}},{"9d8f8f50ac9468eb":"kuAas",f7224aed72953ac4:"cHxZN"}],kuAas:[function(e,t,i){var n=e("7ba7e65983d7b662"),r=e("df551e12a7c872dd"),s=e("1d34ea813cebff9c"),a=Object,o=n("".split);t.exports=r(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):a(e)}:a},{"7ba7e65983d7b662":"2iJ57",df551e12a7c872dd:"cXVrS","1d34ea813cebff9c":"161sQ"}],"2iJ57":[function(e,t,i){var n=e("829dd7a4e960cf9e"),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);t.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},{"829dd7a4e960cf9e":"3p5v0"}],"161sQ":[function(e,t,i){var n=e("1c71c3f6daac476c"),r=n({}.toString),s=n("".slice);t.exports=function(e){return s(r(e),8,-1)}},{"1c71c3f6daac476c":"2iJ57"}],cHxZN:[function(e,t,i){var n=e("74607922ed30019f"),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},{"74607922ed30019f":"8AxCV"}],"8AxCV":[function(e,t,i){t.exports=function(e){return null==e}},{}],gvuJs:[function(e,t,i){var n=e("53a3a67ac381c4e8"),r=e("b992ca9cdcf7937b");t.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},{"53a3a67ac381c4e8":"cCley",b992ca9cdcf7937b:"2ZU2p"}],cCley:[function(e,t,i){var n=e("70235907dc93b4b0"),r=e("46fb53dace408c8e"),s=e("677bdc4d74d2f983"),a=e("80395bcde336a28b"),o=e("49552a7324952190"),h=e("aea01c71276624bf"),c=TypeError,l=h("toPrimitive");t.exports=function(e,t){if(!r(e)||s(e))return e;var i,h=a(e,l);if(h){if(void 0===t&&(t="default"),!r(i=n(h,e,t))||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},{"70235907dc93b4b0":"bOssl","46fb53dace408c8e":"8mxCV","677bdc4d74d2f983":"2ZU2p","80395bcde336a28b":"2qR8N","49552a7324952190":"6aMZM",aea01c71276624bf:"5CuF7"}],"8mxCV":[function(e,t,i){var n=e("f87cee1cb79cbcca");t.exports=function(e){return"object"==typeof e?null!==e:n(e)}},{f87cee1cb79cbcca:"h1Wnr"}],h1Wnr:[function(e,t,i){var n="object"==typeof document&&document.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},{}],"2ZU2p":[function(e,t,i){var n=e("6b6c481cdfb7df35"),r=e("2af44fcbdbf14c83"),s=e("76e903e830c40e7c"),a=e("7e2fe930b3598e22"),o=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},{"6b6c481cdfb7df35":"e5ie6","2af44fcbdbf14c83":"h1Wnr","76e903e830c40e7c":"d5bNd","7e2fe930b3598e22":"6doR5"}],e5ie6:[function(e,t,i){var n=e("e057fc33d60763c1"),r=e("f1d62079325906cb");t.exports=function(e,t){var i;return arguments.length<2?r(i=n[e])?i:void 0:n[e]&&n[e][t]}},{e057fc33d60763c1:"7Z171",f1d62079325906cb:"h1Wnr"}],d5bNd:[function(e,t,i){var n=e("83f14842ef67e16a");t.exports=n({}.isPrototypeOf)},{"83f14842ef67e16a":"2iJ57"}],"6doR5":[function(e,t,i){var n=e("da4a972af0214ea0");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{da4a972af0214ea0:"kkRwC"}],kkRwC:[function(e,t,i){var n=e("53b951dfb9de4d22"),r=e("b37df495bcdc1d99"),s=e("e5929e9affd2affc").String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"53b951dfb9de4d22":"co76c",b37df495bcdc1d99:"cXVrS",e5929e9affd2affc:"7Z171"}],co76c:[function(e,t,i){var n,r,s=e("d049c1c2aa0eee5b"),a=e("4eb5796bbafe334d"),o=s.process,h=s.Deno,c=o&&o.versions||h&&h.version,l=c&&c.v8;l&&(r=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},{d049c1c2aa0eee5b:"7Z171","4eb5796bbafe334d":"5hj4U"}],"5hj4U":[function(e,t,i){var n=e("888bcb4c75dc4ad").navigator,r=n&&n.userAgent;t.exports=r?String(r):""},{"888bcb4c75dc4ad":"7Z171"}],"2qR8N":[function(e,t,i){var n=e("bbfed17b24e215f4"),r=e("492a86e2970f6a26");t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},{bbfed17b24e215f4:"alrlv","492a86e2970f6a26":"8AxCV"}],alrlv:[function(e,t,i){var n=e("4094667126ecac05"),r=e("fce2a7573db493fa"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},{"4094667126ecac05":"h1Wnr",fce2a7573db493fa:"3zerS"}],"3zerS":[function(e,t,i){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],"6aMZM":[function(e,t,i){var n=e("abe9ca006f56626e"),r=e("c96b3a89fec6248a"),s=e("551615fda0214f1b"),a=TypeError;t.exports=function(e,t){var i,o;if("string"===t&&r(i=e.toString)&&!s(o=n(i,e))||r(i=e.valueOf)&&!s(o=n(i,e))||"string"!==t&&r(i=e.toString)&&!s(o=n(i,e)))return o;throw new a("Can't convert object to primitive value")}},{abe9ca006f56626e:"bOssl",c96b3a89fec6248a:"h1Wnr","551615fda0214f1b":"8mxCV"}],"5CuF7":[function(e,t,i){var n=e("ad5ef4474219c101"),r=e("6a2cda01df6b4c79"),s=e("dccc28ffa5beeb54"),a=e("48d6af1225853d44"),o=e("9f762329148684"),h=e("1ce268781e409df2"),c=n.Symbol,l=r("wks"),u=h?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return s(l,e)||(l[e]=o&&s(c,e)?c[e]:u("Symbol."+e)),l[e]}},{ad5ef4474219c101:"7Z171","6a2cda01df6b4c79":"i30ST",dccc28ffa5beeb54:"9JWVX","48d6af1225853d44":"55cC0","9f762329148684":"kkRwC","1ce268781e409df2":"6doR5"}],i30ST:[function(e,t,i){var n=e("84eeed9891aafe14");t.exports=function(e,t){return n[e]||(n[e]=t||{})}},{"84eeed9891aafe14":"jKWHg"}],jKWHg:[function(e,t,i){var n=e("7b43004672b1879f"),r=e("bc8329e77dc2c1cc"),s=e("dfb72a1d809f7b02"),a="__core-js_shared__",o=t.exports=r[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"7b43004672b1879f":"jHRGA",bc8329e77dc2c1cc:"7Z171",dfb72a1d809f7b02:"huhcf"}],jHRGA:[function(e,t,i){t.exports=!1},{}],huhcf:[function(e,t,i){var n=e("2d1c29655635b9ea"),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},{"2d1c29655635b9ea":"7Z171"}],"9JWVX":[function(e,t,i){var n=e("f5dcaa60a713971f"),r=e("ab17c4f45fcf0841"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},{f5dcaa60a713971f:"2iJ57",ab17c4f45fcf0841:"6oQEu"}],"6oQEu":[function(e,t,i){var n=e("f45a7b5dcdc4a410"),r=Object;t.exports=function(e){return r(n(e))}},{f45a7b5dcdc4a410:"cHxZN"}],"55cC0":[function(e,t,i){var n=e("5da0fe4507da20a3"),r=0,s=Math.random(),a=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+s,36)}},{"5da0fe4507da20a3":"2iJ57"}],lahqe:[function(e,t,i){var n=e("9b4278b13c076bf"),r=e("8aee5d88a5f9b6b5"),s=e("1db4d60148afcf21");t.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"9b4278b13c076bf":"6mXK1","8aee5d88a5f9b6b5":"cXVrS","1db4d60148afcf21":"SppDD"}],SppDD:[function(e,t,i){var n=e("845bcece0e6d354"),r=e("824df78b2e007250"),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"845bcece0e6d354":"7Z171","824df78b2e007250":"8mxCV"}],gKM90:[function(e,t,i){var n=e("a8753383ef98ee18"),r=e("189ab650b8f71085"),s=e("1168c8162aa30435");t.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},{a8753383ef98ee18:"6mXK1","189ab650b8f71085":"hvqCQ","1168c8162aa30435":"5toj2"}],hvqCQ:[function(e,t,i){var n=e("ca50eb9163928400"),r=e("d482f9e5478795e8"),s=e("b6ad7537efb06f4b"),a=e("16365a73399e7fe7"),o=e("fab1d366c47796d9"),h=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";i.f=n?s?function(e,t,i){if(a(e),t=o(t),a(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=l(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(a(e),t=o(t),a(i),r)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},{ca50eb9163928400:"6mXK1",d482f9e5478795e8:"lahqe",b6ad7537efb06f4b:"e457x","16365a73399e7fe7":"dPzbI",fab1d366c47796d9:"gvuJs"}],e457x:[function(e,t,i){var n=e("b22a5a2de93e3ad2"),r=e("249a5b857c2dfccd");t.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{b22a5a2de93e3ad2:"6mXK1","249a5b857c2dfccd":"cXVrS"}],dPzbI:[function(e,t,i){var n=e("2b6c6258a0a6082f"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},{"2b6c6258a0a6082f":"8mxCV"}],"4CPdc":[function(e,t,i){var n=e("99ee13632b3fa68"),r=e("9ebb3e3004fccc0a"),s=e("f10cc812a3094053"),a=e("d354802d852d9c2b");t.exports=function(e,t,i,o){o||(o={});var h=o.enumerable,c=void 0!==o.name?o.name:t;if(n(i)&&s(i,c,o),o.global)h?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(h=!0):delete e[t]}catch(e){}h?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},{"99ee13632b3fa68":"h1Wnr","9ebb3e3004fccc0a":"hvqCQ",f10cc812a3094053:"1fkJp",d354802d852d9c2b:"huhcf"}],"1fkJp":[function(e,t,i){var n=e("ca84677f1ebd1804"),r=e("13360f2842eba261"),s=e("103e488c0928755a"),a=e("cbf9b0e0779cc368"),o=e("3f2eb7efeae2f72b"),h=e("548b10f284264c72").CONFIGURABLE,c=e("358f00f3103bd55b"),l=e("9b2ce14119fd2412"),u=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=o&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=t.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+m(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||h&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&i&&a(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return a(n,"source")||(n.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function(){return s(this)&&d(this).source||c(this)},"toString")},{ca84677f1ebd1804:"2iJ57","13360f2842eba261":"cXVrS","103e488c0928755a":"h1Wnr",cbf9b0e0779cc368:"9JWVX","3f2eb7efeae2f72b":"6mXK1","548b10f284264c72":"jmu0n","358f00f3103bd55b":"3JJEO","9b2ce14119fd2412":"ixHS2"}],jmu0n:[function(e,t,i){var n=e("8ad2bacb0e20b95c"),r=e("4eabfd8f83afc9d5"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),h=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:o&&"something"===(function(){}).name,CONFIGURABLE:h}},{"8ad2bacb0e20b95c":"6mXK1","4eabfd8f83afc9d5":"9JWVX"}],"3JJEO":[function(e,t,i){var n=e("26e26db98367212e"),r=e("40ed9a4f6ae66648"),s=e("485d48d6f4c6739e"),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),t.exports=s.inspectSource},{"26e26db98367212e":"2iJ57","40ed9a4f6ae66648":"h1Wnr","485d48d6f4c6739e":"jKWHg"}],ixHS2:[function(e,t,i){var n,r,s,a=e("d3f0c9f3327b2fd6"),o=e("28c3574d0c39fe7e"),h=e("f82e6cc0ac249fa5"),c=e("c0ae163eea4ef97"),l=e("6dea7358344877bb"),u=e("3e035a1241da2f0"),d=e("88d6ccc27e779e5a"),f=e("d40b9b3abdbb956e"),p="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||u.state){var v=u.state||(u.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(p);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(l(e,y))throw new g(p);return t.facade=e,c(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},s=function(e){return l(e,y)}}t.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!h(t)||(i=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}}}},{d3f0c9f3327b2fd6:"lIC7p","28c3574d0c39fe7e":"7Z171",f82e6cc0ac249fa5:"8mxCV",c0ae163eea4ef97:"gKM90","6dea7358344877bb":"9JWVX","3e035a1241da2f0":"jKWHg","88d6ccc27e779e5a":"k5X1l",d40b9b3abdbb956e:"4qgYA"}],lIC7p:[function(e,t,i){var n=e("8b1a8c1dbfd18eb5"),r=e("aa77fff8d5ef0565"),s=n.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},{"8b1a8c1dbfd18eb5":"7Z171",aa77fff8d5ef0565:"h1Wnr"}],k5X1l:[function(e,t,i){var n=e("dbc8182adeb8c92f"),r=e("90b4ffb58508a6e5"),s=n("keys");t.exports=function(e){return s[e]||(s[e]=r(e))}},{dbc8182adeb8c92f:"i30ST","90b4ffb58508a6e5":"55cC0"}],"4qgYA":[function(e,t,i){t.exports={}},{}],d9xyM:[function(e,t,i){var n=e("d91d786cc71453ce"),r=e("88cb809f98beddc6"),s=e("10ea642aad5f7c21"),a=e("39ff598ce822187e");t.exports=function(e,t,i){for(var o=r(t),h=a.f,c=s.f,l=0;lc;)r(n,i=t[c++])&&(~a(l,i)||h(l,i));return l}},{"363ee0e6bb4f46a7":"2iJ57","3183fe0b0bf6f6ac":"9JWVX","28192ac12e934672":"h9ut0",a5f9c5d8e993ccd6:"7HT32","57775908f1581bc6":"4qgYA"}],"7HT32":[function(e,t,i){var n=e("d5dcbcd68ac5acd0"),r=e("212b13aecfa48226"),s=e("e5a8b3e1da4c5637"),a=function(e){return function(t,i,a){var o,h=n(t),c=s(h);if(0===c)return!e&&-1;var l=r(a,c);if(e&&i!=i){for(;c>l;)if((o=h[l++])!=o)return!0}else for(;c>l;l++)if((e||l in h)&&h[l]===i)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{d5dcbcd68ac5acd0:"h9ut0","212b13aecfa48226":"47gaI",e5a8b3e1da4c5637:"kHSes"}],"47gaI":[function(e,t,i){var n=e("72fe0a53ad43912c"),r=Math.max,s=Math.min;t.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},{"72fe0a53ad43912c":"gAgUH"}],gAgUH:[function(e,t,i){var n=e("3403cba02b5f61d8");t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},{"3403cba02b5f61d8":"8w9Yn"}],"8w9Yn":[function(e,t,i){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}},{}],kHSes:[function(e,t,i){var n=e("23d9716c54a2ab90");t.exports=function(e){return n(e.length)}},{"23d9716c54a2ab90":"lQsU7"}],lQsU7:[function(e,t,i){var n=e("c48d3a8b8ac52b0b"),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},{c48d3a8b8ac52b0b:"gAgUH"}],"7POW9":[function(e,t,i){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],f3eHQ:[function(e,t,i){i.f=Object.getOwnPropertySymbols},{}],gE5NQ:[function(e,t,i){var n=e("10299561ea0c7870"),r=e("8b1ecdaf59f07210"),s=/#|\.prototype\./,a=function(e,t){var i=h[o(e)];return i===l||i!==c&&(r(t)?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},h=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},{"10299561ea0c7870":"cXVrS","8b1ecdaf59f07210":"h1Wnr"}],"4x6uB":[function(e,t,i){var n=e("3e4265f3f6994add"),r=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},{"3e4265f3f6994add":"cRCRk"}],cRCRk:[function(e,t,i){var n=e("397e535b3976d304"),r=e("eebd8012c2d2c3ae"),s=e("8da113eeaf06c4ba"),a=e("df252844008f634")("toStringTag"),o=Object,h="Arguments"===s(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};t.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=o(e),a))?i:h?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},{"397e535b3976d304":"9axlf",eebd8012c2d2c3ae:"h1Wnr","8da113eeaf06c4ba":"161sQ",df252844008f634:"5CuF7"}],"9axlf":[function(e,t,i){var n=e("6306cd4835715127")("toStringTag"),r={};r[n]="z",t.exports="[object z]"===String(r)},{"6306cd4835715127":"5CuF7"}],"7isQ3":[function(e,t,i){var n,r=e("3bbe31d8f504111f"),s=e("a9712f03fc468b49"),a=e("d9e0c389f84efa79"),o=e("8a43b6a211717cde"),h=e("78d31e3a50d79c6e"),c=e("e29f7e32a0583f3"),l=e("a6edaba97f293fc9"),u="prototype",d="script",f=l("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe");return t.style.display="none",h.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},y=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}y="undefined"!=typeof document?document.domain&&n?m(n):v():m(n);for(var e=a.length;e--;)delete y[u][a[e]];return y()};o[f]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(p[u]=r(e),i=new p,p[u]=null,i[f]=e):i=y(),void 0===t?i:s.f(i,t)}},{"3bbe31d8f504111f":"dPzbI",a9712f03fc468b49:"ePigI",d9e0c389f84efa79:"7POW9","8a43b6a211717cde":"4qgYA","78d31e3a50d79c6e":"23b1K",e29f7e32a0583f3:"SppDD",a6edaba97f293fc9:"k5X1l"}],ePigI:[function(e,t,i){var n=e("aa39c539d0a1ec3f"),r=e("2e9118dcee7eb93e"),s=e("d88f5f00164c2da2"),a=e("12ac356c5e06e57d"),o=e("3cbdc44082c2f8b8"),h=e("634da70e74fce29b");i.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=o(t),r=h(t),c=r.length,l=0;c>l;)s.f(e,i=r[l++],n[i]);return e}},{aa39c539d0a1ec3f:"6mXK1","2e9118dcee7eb93e":"e457x",d88f5f00164c2da2:"hvqCQ","12ac356c5e06e57d":"dPzbI","3cbdc44082c2f8b8":"h9ut0","634da70e74fce29b":"kQgZQ"}],kQgZQ:[function(e,t,i){var n=e("fb982c683f43ec98"),r=e("7cabc30df1982d48");t.exports=Object.keys||function(e){return n(e,r)}},{fb982c683f43ec98:"4o1p7","7cabc30df1982d48":"7POW9"}],"23b1K":[function(e,t,i){var n=e("14cb391fa4a0dda8");t.exports=n("document","documentElement")},{"14cb391fa4a0dda8":"e5ie6"}],bBGHM:[function(e,t,i){var n=e("279dbc8649868a7a"),r=e("430d7ab8977dd85e"),s=e("a5a6278a4291e239").f,a=e("a0e199be640bf61f"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(e){try{return s(e)}catch(e){return a(o)}};t.exports.f=function(e){return o&&"Window"===n(e)?h(e):s(r(e))}},{"279dbc8649868a7a":"161sQ","430d7ab8977dd85e":"h9ut0",a5a6278a4291e239:"dDV3S",a0e199be640bf61f:"eO8Ta"}],eO8Ta:[function(e,t,i){var n=e("5250b5c9324ccbe");t.exports=n([].slice)},{"5250b5c9324ccbe":"2iJ57"}],"3NI4M":[function(e,t,i){var n=e("5bd1cd8472955124"),r=e("1413185c6323bbbc");t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},{"5bd1cd8472955124":"1fkJp","1413185c6323bbbc":"hvqCQ"}],cwsJo:[function(e,t,i){var n=e("2e34ececd06658d9");i.f=n},{"2e34ececd06658d9":"5CuF7"}],jiIFu:[function(e,t,i){var n=e("8d5159b7d317832f"),r=e("42a3ea18819bfbb"),s=e("7ec639749e279eeb"),a=e("cbbe4becefd5c21c").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:s.f(e)})}},{"8d5159b7d317832f":"iwjHr","42a3ea18819bfbb":"9JWVX","7ec639749e279eeb":"cwsJo",cbbe4becefd5c21c:"hvqCQ"}],iwjHr:[function(e,t,i){var n=e("34c09090b9638032");t.exports=n},{"34c09090b9638032":"7Z171"}],"3ujL7":[function(e,t,i){var n=e("b56ca5a55bb4c0e1"),r=e("f5359b167e9be384"),s=e("e7eef3415c62682d"),a=e("8cc59229c8e85f40");t.exports=function(){var e=r("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,o=s("toPrimitive");t&&!t[o]&&a(t,o,function(e){return n(i,this)},{arity:1})}},{b56ca5a55bb4c0e1:"bOssl",f5359b167e9be384:"e5ie6",e7eef3415c62682d:"5CuF7","8cc59229c8e85f40":"4CPdc"}],dkhk9:[function(e,t,i){var n=e("93a3d85da48077c").f,r=e("2ebf7179e87d878f"),s=e("5b1eb5d1639e9eb7")("toStringTag");t.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!r(e,s)&&n(e,s,{configurable:!0,value:t})}},{"93a3d85da48077c":"hvqCQ","2ebf7179e87d878f":"9JWVX","5b1eb5d1639e9eb7":"5CuF7"}],daQdc:[function(e,t,i){var n=e("13e0747865316a42"),r=e("99224cc18a4a792e"),s=e("57aaeabd9d30911"),a=e("3acffc809f3b03fb"),o=e("1fc4c4e55871562c"),h=e("76c922b575fbf7bd"),c=r([].push),l=function(e){var t=1===e,i=2===e,r=3===e,l=4===e,u=6===e,d=7===e,f=5===e||u;return function(p,g,m,v){for(var y,b,x=a(p),E=s(x),w=o(E),T=n(g,m),S=0,A=v||h,C=t?A(p,w):i||d?A(p,0):void 0;w>S;S++)if((f||S in E)&&(b=T(y=E[S],S,x),e)){if(t)C[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}}return u?-1:r||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},{"13e0747865316a42":"f1CxE","99224cc18a4a792e":"2iJ57","57aaeabd9d30911":"kuAas","3acffc809f3b03fb":"6oQEu","1fc4c4e55871562c":"kHSes","76c922b575fbf7bd":"kfoQr"}],f1CxE:[function(e,t,i){var n=e("92f6f475baa85665"),r=e("547ee4f9dab0cc76"),s=e("5acd31cba656d393"),a=n(n.bind);t.exports=function(e,t){return r(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},{"92f6f475baa85665":"c4z5p","547ee4f9dab0cc76":"alrlv","5acd31cba656d393":"3p5v0"}],c4z5p:[function(e,t,i){var n=e("8e77093015e1e67f"),r=e("9daa4dbbca634c9e");t.exports=function(e){if("Function"===n(e))return r(e)}},{"8e77093015e1e67f":"161sQ","9daa4dbbca634c9e":"2iJ57"}],kfoQr:[function(e,t,i){var n=e("4580767bbbe40f0b");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"4580767bbbe40f0b":"3SXid"}],"3SXid":[function(e,t,i){var n=e("a9e5b9af57e551f6"),r=e("2b4d84c184e08f4f"),s=e("f4bec83e8d6008c9"),a=e("4a13cf47b259a825")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(r(t=e.constructor)&&(t===o||n(t.prototype))?t=void 0:s(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?o:t}},{a9e5b9af57e551f6:"7GYYD","2b4d84c184e08f4f":"eytEI",f4bec83e8d6008c9:"8mxCV","4a13cf47b259a825":"5CuF7"}],"7GYYD":[function(e,t,i){var n=e("ccb261b2d73a4fca");t.exports=Array.isArray||function(e){return"Array"===n(e)}},{ccb261b2d73a4fca:"161sQ"}],eytEI:[function(e,t,i){var n=e("3b3e7fa8cfe4b3ac"),r=e("84df2127d2d40501"),s=e("ae35eceee587c4bc"),a=e("7bd40df22601ee7e"),o=e("271ff92378cbc486"),h=e("74840ba4357c1c30"),c=function(){},l=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!s(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},g=function(e){if(!s(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(u,h(e))}catch(e){return!0}};g.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?g:p},{"3b3e7fa8cfe4b3ac":"2iJ57","84df2127d2d40501":"cXVrS",ae35eceee587c4bc:"h1Wnr","7bd40df22601ee7e":"cRCRk","271ff92378cbc486":"e5ie6","74840ba4357c1c30":"3JJEO"}],epSXE:[function(e,t,i){var n=e("5bb0291a1de27cc2"),r=e("8e0d0366f8700097"),s=e("1d19a51e347c2d9e"),a=e("eab6cb58642f38b1"),o=e("41937bc543544e22"),h=e("8877198f0deded1d"),c=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{for:function(e){var t=a(e);if(s(c,t))return c[t];var i=r("Symbol")(t);return c[t]=i,l[i]=t,i}})},{"5bb0291a1de27cc2":"gJg5v","8e0d0366f8700097":"e5ie6","1d19a51e347c2d9e":"9JWVX",eab6cb58642f38b1:"4x6uB","41937bc543544e22":"i30ST","8877198f0deded1d":"lqpzY"}],lqpzY:[function(e,t,i){var n=e("a735884940a2eb73");t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},{a735884940a2eb73:"kkRwC"}],k89ua:[function(e,t,i){var n=e("8dbad7485118eaf8"),r=e("9fce8a9af4b186a4"),s=e("4e16fd56c67f82fb"),a=e("59b7b3dea7d1b71d"),o=e("77b2ea800463b7d6"),h=e("ca42326fb3cb6e68"),c=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{keyFor:function(e){if(!s(e))throw TypeError(a(e)+" is not a symbol");if(r(c,e))return c[e]}})},{"8dbad7485118eaf8":"gJg5v","9fce8a9af4b186a4":"9JWVX","4e16fd56c67f82fb":"2ZU2p","59b7b3dea7d1b71d":"3zerS","77b2ea800463b7d6":"i30ST",ca42326fb3cb6e68:"lqpzY"}],fKGrW:[function(e,t,i){var n=e("c758539029f56af9"),r=e("cd08b356bcae0b47"),s=e("2f13fa715711850"),a=e("4cfb95fb9a0e28fc"),o=e("50b40a77c21daf7f"),h=e("56cf5d4bc1afd666"),c=e("42bed86e3e73f3d2"),l=e("bca8b9ce5f71243b"),u=e("1bb05f05134df4c2"),d=e("1136e300bbee8f1e"),f=e("d8156a48adf3010b"),p=String,g=r("JSON","stringify"),m=o(/./.exec),v=o("".charAt),y=o("".charCodeAt),b=o("".replace),x=o(1..toString),E=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,S=!f||h(function(){var e=r("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),A=h(function(){return'"\udf06\ud834"'!==g("\uDF06\uD834")||'"\udead"'!==g("\uDEAD")}),C=function(e,t){var i=u(arguments),n=d(t);if(!(!c(n)&&(void 0===e||l(e))))return i[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},s(g,null,i)},_=function(e,t,i){var n=v(i,t-1),r=v(i,t+1);return m(w,e)&&!m(T,r)||m(T,e)&&!m(w,n)?"\\u"+x(y(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:S||A},{stringify:function(e,t,i){var n=u(arguments),r=s(S?C:g,null,n);return A&&"string"==typeof r?b(r,E,_):r}})},{c758539029f56af9:"gJg5v",cd08b356bcae0b47:"e5ie6","2f13fa715711850":"2fjXG","4cfb95fb9a0e28fc":"bOssl","50b40a77c21daf7f":"2iJ57","56cf5d4bc1afd666":"cXVrS","42bed86e3e73f3d2":"h1Wnr",bca8b9ce5f71243b:"2ZU2p","1bb05f05134df4c2":"eO8Ta","1136e300bbee8f1e":"gQett",d8156a48adf3010b:"kkRwC"}],"2fjXG":[function(e,t,i){var n=e("d07466971ded2aca"),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},{d07466971ded2aca:"3p5v0"}],gQett:[function(e,t,i){var n=e("d58a1810bb01cb9f"),r=e("fc692ad896e8fbbf"),s=e("78f870626b97cbe9"),a=e("1da5109b0acae5a0"),o=e("71deb4f6b3f33cf0"),h=n([].push);t.exports=function(e){if(s(e))return e;if(r(e)){for(var t=e.length,i=[],n=0;ny&&d(n,arguments[y]),n});if(S.prototype=w,"Error"!==x?o?o(S,T):h(S,T,{name:!0}):p&&v in E&&(c(S,E,v),c(S,E,"prepareStackTrace")),h(S,E),!g)try{w.name!==x&&s(w,"name",x),w.constructor=S}catch(e){}return S}}},{a06eacb797618572:"e5ie6","665a8da8d6942429":"9JWVX","1eafe025967456f7":"gKM90","56a7065490020014":"d5bNd","4950e85505e95dbc":"arrdQ","6c7bc1a190dc31c1":"d9xyM","84e57d08170f4fac":"7fWkz",a85bdac1120897b:"30not",efb60f912a162fda:"dwhvK","30c8c4978beb6a3c":"5QVLO",f4c1a33f96dc17e0:"1H0Ar","9afe587c962877da":"6mXK1","74e210db508a9809":"jHRGA"}],arrdQ:[function(e,t,i){var n=e("995a94425a563d6"),r=e("caa27fe2635f1f44"),s=e("a751660a0fcdf70"),a=e("6e2c833ee2a62cf6");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return s(i),a(n),r(i)&&(t?e(i,n):i.__proto__=n),i}}():void 0)},{"995a94425a563d6":"j4YhT",caa27fe2635f1f44:"8mxCV",a751660a0fcdf70:"cHxZN","6e2c833ee2a62cf6":"hEWXk"}],j4YhT:[function(e,t,i){var n=e("27a2d181325e1926"),r=e("36b26076b1e2fac1");t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},{"27a2d181325e1926":"2iJ57","36b26076b1e2fac1":"alrlv"}],hEWXk:[function(e,t,i){var n=e("fcc5bbb526d602c6"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},{fcc5bbb526d602c6:"6XW5L"}],"6XW5L":[function(e,t,i){var n=e("a504c97d35bacd6c");t.exports=function(e){return n(e)||null===e}},{a504c97d35bacd6c:"8mxCV"}],"7fWkz":[function(e,t,i){var n=e("e52fa9ee07db5896").f;t.exports=function(e,t,i){i in e||n(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},{e52fa9ee07db5896:"hvqCQ"}],"30not":[function(e,t,i){var n=e("9f474ed504af79a9"),r=e("bd2a6951ff768696"),s=e("972057e738a2788f");t.exports=function(e,t,i){var a,o;return s&&n(a=t.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&s(e,o),e}},{"9f474ed504af79a9":"h1Wnr",bd2a6951ff768696:"8mxCV","972057e738a2788f":"arrdQ"}],dwhvK:[function(e,t,i){var n=e("c9fe0c0d0cc00953");t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},{c9fe0c0d0cc00953:"4x6uB"}],"5QVLO":[function(e,t,i){var n=e("b476c95c984a6a8d"),r=e("3c6bf72ab0382560");t.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},{b476c95c984a6a8d:"8mxCV","3c6bf72ab0382560":"gKM90"}],"1H0Ar":[function(e,t,i){var n=e("6a8c56dba61494ec"),r=e("a58d6d3fbc24091c"),s=e("13a68d58956ea123"),a=Error.captureStackTrace;t.exports=function(e,t,i,o){s&&(a?a(e,t):n(e,"stack",r(i,o)))}},{"6a8c56dba61494ec":"gKM90",a58d6d3fbc24091c:"7dart","13a68d58956ea123":"3Scc5"}],"7dart":[function(e,t,i){var n=e("eabcb03034bf2114"),r=Error,s=n("".replace),a=String(new r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,h=o.test(a);t.exports=function(e,t){if(h&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},{eabcb03034bf2114:"2iJ57"}],"3Scc5":[function(e,t,i){var n=e("89db331f671f42e0"),r=e("df11a3c4166c3491");t.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)})},{"89db331f671f42e0":"cXVrS",df11a3c4166c3491:"5toj2"}],aSTrG:[function(e,t,i){var n=e("f781bd5f2d18cfa7"),r=e("3eb4aef2f58a6fea"),s=Error.prototype;s.toString!==r&&n(s,"toString",r)},{f781bd5f2d18cfa7:"4CPdc","3eb4aef2f58a6fea":"9hDDf"}],"9hDDf":[function(e,t,i){var n=e("ea2a4236860a8cd8"),r=e("e3d0938fe2af7a6b"),s=e("10baca5ba543cdd8"),a=e("b4dc1328db6268c"),o=Error.prototype.toString,h=r(function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})});t.exports=h?function(){var e=s(this),t=a(e.name,"Error"),i=a(e.message);return t?i?t+": "+i:t:i}:o},{ea2a4236860a8cd8:"6mXK1",e3d0938fe2af7a6b:"cXVrS","10baca5ba543cdd8":"dPzbI",b4dc1328db6268c:"dwhvK"}],"8nyV3":[function(e,t,i){e("84cae8994b2a2f5")},{"84cae8994b2a2f5":"esMFt"}],esMFt:[function(e,t,i){var n=e("c0cc68e328095af5"),r=e("faa2bddf0ac478ea"),s=e("4413a40f7d436a10"),a=e("6bef4cb0d407baac"),o=e("16d669a6cb07e14c"),h=e("44313d9c6ae01d88"),c=e("fa987207071f401e"),l=e("e46f2df37a9caee7"),u=e("6f34595d479a3d16"),d=e("971d0ec70b5cd696"),f=e("8cb104a68ce09b9a"),p=e("57c5336285df243"),g=e("2e2daca8a25d7233")("toStringTag"),m=Error,v=[].push,y=function(e,t){var i,n=r(b,this);a?i=a(new m,n?s(this):b):c(i=n?this:h(b),g,"Error"),void 0!==t&&c(i,"message",p(t)),d(i,y,i.stack,1),arguments.length>2&&u(i,arguments[2]);var o=[];return f(e,v,{that:o}),c(i,"errors",o),i};a?a(y,m):o(y,m,{name:!0});var b=y.prototype=h(m.prototype,{constructor:l(1,y),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:y})},{c0cc68e328095af5:"gJg5v",faa2bddf0ac478ea:"d5bNd","4413a40f7d436a10":"e8mfS","6bef4cb0d407baac":"arrdQ","16d669a6cb07e14c":"d9xyM","44313d9c6ae01d88":"7isQ3",fa987207071f401e:"gKM90",e46f2df37a9caee7:"5toj2","6f34595d479a3d16":"5QVLO","971d0ec70b5cd696":"1H0Ar","8cb104a68ce09b9a":"dCEHX","57c5336285df243":"dwhvK","2e2daca8a25d7233":"5CuF7"}],e8mfS:[function(e,t,i){var n=e("da54a59ea207dd"),r=e("71ab2a7bcc8c8fc8"),s=e("7a3afd2bb40b0292"),a=e("296d7a2db8e23969"),o=e("58de29d5e883862f"),h=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=s(e);if(n(t,h))return t[h];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof c?l:null}},{da54a59ea207dd:"9JWVX","71ab2a7bcc8c8fc8":"h1Wnr","7a3afd2bb40b0292":"6oQEu","296d7a2db8e23969":"k5X1l","58de29d5e883862f":"2SHZm"}],"2SHZm":[function(e,t,i){var n=e("85ffc28af2e8afc1");t.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"85ffc28af2e8afc1":"cXVrS"}],dCEHX:[function(e,t,i){var n=e("2f267ed50e670495"),r=e("c0af58bb1ef1cc62"),s=e("7fa6542c03ca9239"),a=e("fa596d1a4c07b72a"),o=e("fd753cc641a6f10a"),h=e("2a15dee148d3db96"),c=e("417f9a13deeb58a6"),l=e("43af53be1b24dae5"),u=e("bf7ad32b21aed0b4"),d=e("5241389e1d6eeb73"),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;t.exports=function(e,t,i){var m,v,y,b,x,E,w,T=i&&i.that,S=!!(i&&i.AS_ENTRIES),A=!!(i&&i.IS_RECORD),C=!!(i&&i.IS_ITERATOR),_=!!(i&&i.INTERRUPTED),I=n(t,T),O=function(e){return m&&d(m,"normal",e),new p(!0,e)},P=function(e){return S?(s(e),_?I(e[0],e[1],O):I(e[0],e[1])):_?I(e,O):I(e)};if(A)m=e.iterator;else if(C)m=e;else{if(!(v=u(e)))throw new f(a(e)+" is not iterable");if(o(v)){for(y=0,b=h(e);b>y;y++)if((x=P(e[y]))&&c(g,x))return x;return new p(!1)}m=l(e,v)}for(E=A?e.next:m.next;!(w=r(E,m)).done;){try{x=P(w.value)}catch(e){d(m,"throw",e)}if("object"==typeof x&&x&&c(g,x))return x}return new p(!1)}},{"2f267ed50e670495":"f1CxE",c0af58bb1ef1cc62:"bOssl","7fa6542c03ca9239":"dPzbI",fa596d1a4c07b72a:"3zerS",fd753cc641a6f10a:"88nHe","2a15dee148d3db96":"kHSes","417f9a13deeb58a6":"d5bNd","43af53be1b24dae5":"kBMjp",bf7ad32b21aed0b4:"3624P","5241389e1d6eeb73":"58eij"}],"88nHe":[function(e,t,i){var n=e("85b004b6ab4bc5da"),r=e("6de391ad2976ca02"),s=n("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||a[s]===e)}},{"85b004b6ab4bc5da":"5CuF7","6de391ad2976ca02":"bABtS"}],bABtS:[function(e,t,i){t.exports={}},{}],kBMjp:[function(e,t,i){var n=e("132ebf774107ae29"),r=e("e248489b4825ceb7"),s=e("18a343d2ef625577"),a=e("7e576a1564cef99e"),o=e("4a7b0311be0471b2"),h=TypeError;t.exports=function(e,t){var i=arguments.length<2?o(e):t;if(r(i))return s(n(i,e));throw new h(a(e)+" is not iterable")}},{"132ebf774107ae29":"bOssl",e248489b4825ceb7:"alrlv","18a343d2ef625577":"dPzbI","7e576a1564cef99e":"3zerS","4a7b0311be0471b2":"3624P"}],"3624P":[function(e,t,i){var n=e("32d61dafd81dde78"),r=e("84e24a6ac7559d3a"),s=e("f0707282c0d93eeb"),a=e("1c181d5c49efd5d1"),o=e("d10d0e0ae49498c5")("iterator");t.exports=function(e){if(!s(e))return r(e,o)||r(e,"@@iterator")||a[n(e)]}},{"32d61dafd81dde78":"cRCRk","84e24a6ac7559d3a":"2qR8N",f0707282c0d93eeb:"8AxCV","1c181d5c49efd5d1":"bABtS",d10d0e0ae49498c5:"5CuF7"}],"58eij":[function(e,t,i){var n=e("a4a3a7d4a45c4219"),r=e("feb876e7da2df7bd"),s=e("2e660cdfabd9c61f");t.exports=function(e,t,i){var a,o;r(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw i;return i}a=n(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw i;if(o)throw a;return r(a),i}},{a4a3a7d4a45c4219:"bOssl",feb876e7da2df7bd:"dPzbI","2e660cdfabd9c61f":"2qR8N"}],j1ABh:[function(e,t,i){var n=e("1051ab5946792444"),r=e("901806552daaa9d1"),s=e("c2da5f9111ec0d0d"),a=e("bbf9283d8426dd54"),o=e("2df6383956d55950"),h="AggregateError",c=r(h),l=!a(function(){return 1!==c([1]).errors[0]})&&a(function(){return 7!==c([1],h,{cause:7}).cause});n({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:o(h,function(e){return function(t,i){return s(e,this,arguments)}},l,!0)})},{"1051ab5946792444":"gJg5v","901806552daaa9d1":"e5ie6",c2da5f9111ec0d0d:"2fjXG",bbf9283d8426dd54:"cXVrS","2df6383956d55950":"ja1ZQ"}],"3LJSA":[function(e,t,i){var n=e("17b6274b31efea6a"),r=e("bd1f09a15df9c54b"),s=e("aeeef420262f9436"),a=e("d3a5a5518b6afdf1"),o=e("a3c99fc0a91390b5");n({target:"Array",proto:!0},{at:function(e){var t=r(this),i=s(t),n=a(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]}}),o("at")},{"17b6274b31efea6a":"gJg5v",bd1f09a15df9c54b:"6oQEu",aeeef420262f9436:"kHSes",d3a5a5518b6afdf1:"gAgUH",a3c99fc0a91390b5:"4jzvR"}],"4jzvR":[function(e,t,i){var n=e("d4032cdcc50314e7"),r=e("3ca2a6909ac2dcef"),s=e("545ab457bf71d338").f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}},{d4032cdcc50314e7:"5CuF7","3ca2a6909ac2dcef":"7isQ3","545ab457bf71d338":"hvqCQ"}],jYNHr:[function(e,t,i){var n=e("ae9bcc3c886d2e43"),r=e("320b7f8f99977d72"),s=e("c9c4d35908c64a9b"),a=e("e40ffb4fd8cdd6ef"),o=e("600c6b55241cb08d"),h=e("c35064fc908d412e"),c=e("d3e233a6dd5508d7"),l=e("4da7fb5e70719532"),u=e("706ee6e3130d3c44"),d=e("76c3a5d37e98bd2f"),f=e("210a9ec1468bd8f4"),p=e("64448af9c74a3ff5"),g=f("isConcatSpreadable"),m=p>=51||!r(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),v=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:s(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!d("concat")},{concat:function(e){var t,i,n,r,s,a=o(this),d=u(a,0),f=0;for(t=-1,n=arguments.length;t9007199254740991)throw n("Maximum allowed index exceeded");return e}},{}],SVTZV:[function(e,t,i){var n=e("667a2d5a858194a6"),r=e("2daa2f41b7310fd4"),s=e("7bb9efd811e3f83f");t.exports=function(e,t,i){n?r.f(e,t,s(0,i)):e[t]=i}},{"667a2d5a858194a6":"6mXK1","2daa2f41b7310fd4":"hvqCQ","7bb9efd811e3f83f":"5toj2"}],ca1EV:[function(e,t,i){var n=e("bbe4de7ca7a1c6be"),r=e("6cb3e4ca309911dc"),s=e("4d1dd9e6baf7a81f"),a=r("species");t.exports=function(e){return s>=51||!n(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},{bbe4de7ca7a1c6be:"cXVrS","6cb3e4ca309911dc":"5CuF7","4d1dd9e6baf7a81f":"co76c"}],"9D9sM":[function(e,t,i){var n=e("4890937a7e7c636b"),r=e("7256897b95da01b3"),s=e("4c4cc4b0d9ea98ec");n({target:"Array",proto:!0},{copyWithin:r}),s("copyWithin")},{"4890937a7e7c636b":"gJg5v","7256897b95da01b3":"toMXb","4c4cc4b0d9ea98ec":"4jzvR"}],toMXb:[function(e,t,i){var n=e("67e19c72f7fbebd0"),r=e("5063d303bf924d87"),s=e("e3d01b6d6197aedd"),a=e("6ffaf2643c0abf62"),o=Math.min;t.exports=[].copyWithin||function(e,t){var i=n(this),h=s(i),c=r(e,h),l=r(t,h),u=arguments.length>2?arguments[2]:void 0,d=o((void 0===u?h:r(u,h))-l,h-c),f=1;for(l0;)l in i?i[c]=i[l]:a(i,c),c+=f,l+=f;return i}},{"67e19c72f7fbebd0":"6oQEu","5063d303bf924d87":"47gaI",e3d01b6d6197aedd:"kHSes","6ffaf2643c0abf62":"hb7MO"}],hb7MO:[function(e,t,i){var n=e("49f65044bb4dad7f"),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw new r("Cannot delete property "+n(t)+" of "+n(e))}},{"49f65044bb4dad7f":"3zerS"}],c1k6c:[function(e,t,i){var n=e("c1238b63d9c8719e"),r=e("f6644a21f0f5983").every;n({target:"Array",proto:!0,forced:!e("8bc22f42d8ee353c")("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{c1238b63d9c8719e:"gJg5v",f6644a21f0f5983:"daQdc","8bc22f42d8ee353c":"lz8BN"}],lz8BN:[function(e,t,i){var n=e("77f0d106558781f");t.exports=function(e,t){var i=[][e];return!!i&&n(function(){i.call(null,t||function(){return 1},1)})}},{"77f0d106558781f":"cXVrS"}],lbPxO:[function(e,t,i){var n=e("52cb142d804aabd3"),r=e("daf335b8230cfcc7"),s=e("3e31c661bed82a2d");n({target:"Array",proto:!0},{fill:r}),s("fill")},{"52cb142d804aabd3":"gJg5v",daf335b8230cfcc7:"9XPgi","3e31c661bed82a2d":"4jzvR"}],"9XPgi":[function(e,t,i){var n=e("45e35cf118865951"),r=e("ae17acf5d72570ed"),s=e("94aaef7256431b15");t.exports=function(e){for(var t=n(this),i=s(t),a=arguments.length,o=r(a>1?arguments[1]:void 0,i),h=a>2?arguments[2]:void 0,c=void 0===h?i:r(h,i);c>o;)t[o++]=e;return t}},{"45e35cf118865951":"6oQEu",ae17acf5d72570ed:"47gaI","94aaef7256431b15":"kHSes"}],jKklH:[function(e,t,i){var n=e("a465bc55e057d26f"),r=e("fa9926c68c33923f").filter;n({target:"Array",proto:!0,forced:!e("9232c94be2f9c639")("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{a465bc55e057d26f:"gJg5v",fa9926c68c33923f:"daQdc","9232c94be2f9c639":"ca1EV"}],lMNyP:[function(e,t,i){var n=e("a6cb3a492b52d21c"),r=e("ad97e1511b32e588").find,s=e("62fd950aac3d5249"),a="find",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{a6cb3a492b52d21c:"gJg5v",ad97e1511b32e588:"daQdc","62fd950aac3d5249":"4jzvR"}],hPNfA:[function(e,t,i){var n=e("dcce3e96aeb32c26"),r=e("25f2fe0b92321096").findIndex,s=e("1c93cc746ac8ffb1"),a="findIndex",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{dcce3e96aeb32c26:"gJg5v","25f2fe0b92321096":"daQdc","1c93cc746ac8ffb1":"4jzvR"}],fURyF:[function(e,t,i){var n=e("7c9570dd28371e00"),r=e("43d20d51fd072b05").findLast,s=e("8c5f13eb9efbfd84");n({target:"Array",proto:!0},{findLast:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLast")},{"7c9570dd28371e00":"gJg5v","43d20d51fd072b05":"cyWXz","8c5f13eb9efbfd84":"4jzvR"}],cyWXz:[function(e,t,i){var n=e("c1d87d2297f1acca"),r=e("e5df4a29c897e724"),s=e("42c314ae435e3665"),a=e("a64fff03b4e929f6"),o=function(e){var t=1===e;return function(i,o,h){for(var c,l=s(i),u=r(l),d=a(u),f=n(o,h);d-- >0;)if(f(c=u[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};t.exports={findLast:o(0),findLastIndex:o(1)}},{c1d87d2297f1acca:"f1CxE",e5df4a29c897e724:"kuAas","42c314ae435e3665":"6oQEu",a64fff03b4e929f6:"kHSes"}],"6XyUS":[function(e,t,i){var n=e("bba50227ea399df7"),r=e("c196d65aab15955b").findLastIndex,s=e("5f02d29251865622");n({target:"Array",proto:!0},{findLastIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLastIndex")},{bba50227ea399df7:"gJg5v",c196d65aab15955b:"cyWXz","5f02d29251865622":"4jzvR"}],d83iu:[function(e,t,i){var n=e("eea83811f9bf5b44"),r=e("d9157408980dcae4"),s=e("1603b1d7d71c6d78"),a=e("95d7017c9e9cedeb"),o=e("9b0770c8bd20c0f9"),h=e("4c36764bcb49234f");n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=s(this),i=a(t),n=h(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:o(e)),n}})},{eea83811f9bf5b44:"gJg5v",d9157408980dcae4:"2QW86","1603b1d7d71c6d78":"6oQEu","95d7017c9e9cedeb":"kHSes","9b0770c8bd20c0f9":"gAgUH","4c36764bcb49234f":"kfoQr"}],"2QW86":[function(e,t,i){var n=e("ebb82f00ac94e25c"),r=e("d2ce61b77ec49b3f"),s=e("d3f4210cd620e3d6"),a=e("a7c8b8651480c6c9"),o=function(e,t,i,h,c,l,u,d){for(var f,p,g=c,m=0,v=!!u&&a(u,d);m0&&n(f)?(p=r(f),g=o(e,t,f,p,g,l-1)-1):(s(g+1),e[g]=f),g++),m++;return g};t.exports=o},{ebb82f00ac94e25c:"7GYYD",d2ce61b77ec49b3f:"kHSes",d3f4210cd620e3d6:"6TggQ",a7c8b8651480c6c9:"f1CxE"}],lc4NN:[function(e,t,i){var n=e("e4ee3b9d2bc1ffb2"),r=e("378c1e23131cdaae"),s=e("74e7f70118e2a778"),a=e("1a2d0561d09775b8"),o=e("f7bbb0ab5ee7446c"),h=e("51d35c0066e59cdb");n({target:"Array",proto:!0},{flatMap:function(e){var t,i=a(this),n=o(i);return s(e),(t=h(i,0)).length=r(t,i,i,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},{e4ee3b9d2bc1ffb2:"gJg5v","378c1e23131cdaae":"2QW86","74e7f70118e2a778":"alrlv","1a2d0561d09775b8":"6oQEu",f7bbb0ab5ee7446c:"kHSes","51d35c0066e59cdb":"kfoQr"}],gjqcj:[function(e,t,i){var n=e("214b5a111591d046"),r=e("658aa5ae0eee38b0");n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},{"214b5a111591d046":"gJg5v","658aa5ae0eee38b0":"4w3Nn"}],"4w3Nn":[function(e,t,i){var n=e("1a0535b754110eb5").forEach,r=e("df61bc1b7a92de0f")("forEach");t.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},{"1a0535b754110eb5":"daQdc",df61bc1b7a92de0f:"lz8BN"}],j3v3L:[function(e,t,i){var n=e("76f1b3b688a029fa"),r=e("55358907c05b685d");n({target:"Array",stat:!0,forced:!e("98fd99047e51c8be")(function(e){Array.from(e)})},{from:r})},{"76f1b3b688a029fa":"gJg5v","55358907c05b685d":"lrrJd","98fd99047e51c8be":"dR8Bu"}],lrrJd:[function(e,t,i){var n=e("c006aee3ec90867f"),r=e("bdaed06b86eeb767"),s=e("ca05db7523b31410"),a=e("47fe223c8f6c2dd5"),o=e("75eba7673a242ae6"),h=e("188dc0b37c140076"),c=e("32c4effc8b33b2c2"),l=e("a6ed280c439df9d0"),u=e("3faaa09a63a90825"),d=e("13cbec27e4dd055f"),f=Array;t.exports=function(e){var t,i,p,g,m,v,y=s(e),b=h(this),x=arguments.length,E=x>1?arguments[1]:void 0,w=void 0!==E;w&&(E=n(E,x>2?arguments[2]:void 0));var T=d(y),S=0;if(T&&!(this===f&&o(T)))for(i=b?new this:[],m=(g=u(y,T)).next;!(p=r(m,g)).done;S++)v=w?a(g,E,[p.value,S],!0):p.value,l(i,S,v);else for(t=c(y),i=b?new this(t):f(t);t>S;S++)v=w?E(y[S],S):y[S],l(i,S,v);return i.length=S,i}},{c006aee3ec90867f:"f1CxE",bdaed06b86eeb767:"bOssl",ca05db7523b31410:"6oQEu","47fe223c8f6c2dd5":"hyn7H","75eba7673a242ae6":"88nHe","188dc0b37c140076":"eytEI","32c4effc8b33b2c2":"kHSes",a6ed280c439df9d0:"SVTZV","3faaa09a63a90825":"kBMjp","13cbec27e4dd055f":"3624P"}],hyn7H:[function(e,t,i){var n=e("4afbb4be48dcf066"),r=e("d24fa1ffea48fa52");t.exports=function(e,t,i,s){try{return s?t(n(i)[0],i[1]):t(i)}catch(t){r(e,"throw",t)}}},{"4afbb4be48dcf066":"dPzbI",d24fa1ffea48fa52:"58eij"}],dR8Bu:[function(e,t,i){var n=e("a5154de5c7fcf21e")("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){try{if(!t&&!r)return!1}catch(e){return!1}var i=!1;try{var s={};s[n]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(e){}return i}},{a5154de5c7fcf21e:"5CuF7"}],"3rrfH":[function(e,t,i){var n=e("ffa5d46bdab873f9"),r=e("abe71b6f5a2c149").includes,s=e("119354898116a770"),a=e("9a828f869e1adf81");n({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{ffa5d46bdab873f9:"gJg5v",abe71b6f5a2c149:"7HT32","119354898116a770":"cXVrS","9a828f869e1adf81":"4jzvR"}],b10MD:[function(e,t,i){var n=e("9d4bf984c01e8ef7"),r=e("ff94ec157dbe45f"),s=e("84db9b100b66a9f4").indexOf,a=e("928c12f9f760e965"),o=r([].indexOf),h=!!o&&1/o([1],1,-0)<0;n({target:"Array",proto:!0,forced:h||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return h?o(this,e,t)||0:s(this,e,t)}})},{"9d4bf984c01e8ef7":"gJg5v",ff94ec157dbe45f:"c4z5p","84db9b100b66a9f4":"7HT32","928c12f9f760e965":"lz8BN"}],"2JgXG":[function(e,t,i){e("e1a67b4aafecad9a")({target:"Array",stat:!0},{isArray:e("1fa49986380c79ad")})},{e1a67b4aafecad9a:"gJg5v","1fa49986380c79ad":"7GYYD"}],"3prNk":[function(e,t,i){var n=e("c8e067881939a0cb"),r=e("275b8f0cb65b77aa"),s=e("21f4d3653c90f049"),a=e("85efa8d5848315f6"),o=e("94a17682acfdceb4").f,h=e("bb30bdef31147b17"),c=e("d8384af5151f994c"),l=e("fdcc207797f592fe"),u=e("11e42ff2bbda8d0a"),d="Array Iterator",f=a.set,p=a.getterFor(d);t.exports=h(Array,"Array",function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(i,!1);case"values":return c(t[i],!1)}return c([i,t[i]],!1)},"values");var g=s.Arguments=s.Array;if(r("keys"),r("values"),r("entries"),!l&&u&&"values"!==g.name)try{o(g,"name",{value:"values"})}catch(e){}},{c8e067881939a0cb:"h9ut0","275b8f0cb65b77aa":"4jzvR","21f4d3653c90f049":"bABtS","85efa8d5848315f6":"ixHS2","94a17682acfdceb4":"hvqCQ",bb30bdef31147b17:"klSVb",d8384af5151f994c:"dwU83",fdcc207797f592fe:"jHRGA","11e42ff2bbda8d0a":"6mXK1"}],klSVb:[function(e,t,i){var n=e("923c1bf4a39ae90c"),r=e("46a3f73465955199"),s=e("c1577e63189cf935"),a=e("dc625e1bb584faf6"),o=e("d55d91c410baca17"),h=e("3e4ae607dbb6e78b"),c=e("48ca4ae1d4998232"),l=e("1263258b63630933"),u=e("9b61caf69f87dfde"),d=e("7f30a3ab1bf5e1c1"),f=e("c027b4da648348d3"),p=e("d4ad91965213ee1"),g=e("b616a206eb405268"),m=e("4f9ec7e9f5d20965"),v=a.PROPER,y=a.CONFIGURABLE,b=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,E=p("iterator"),w="keys",T="values",S="entries",A=function(){return this};t.exports=function(e,t,i,a,p,m,C){h(i,t,a);var _,I,O,P=function(e){if(e===p&&k)return k;if(!x&&e&&e in L)return L[e];switch(e){case w:case T:case S:return function(){return new i(this,e)}}return function(){return new i(this)}},M=t+" Iterator",R=!1,L=e.prototype,D=L[E]||L["@@iterator"]||p&&L[p],k=!x&&D||P(p),N="Array"===t&&L.entries||D;if(N&&(_=c(N.call(new e)))!==Object.prototype&&_.next&&(s||c(_)===b||(l?l(_,b):o(_[E])||f(_,E,A)),u(_,M,!0,!0),s&&(g[M]=A)),v&&p===T&&D&&D.name!==T&&(!s&&y?d(L,"name",T):(R=!0,k=function(){return r(D,this)})),p){if(I={values:P(T),keys:m?k:P(w),entries:P(S)},C)for(O in I)!x&&!R&&O in L||f(L,O,I[O]);else n({target:t,proto:!0,forced:x||R},I)}return(!s||C)&&L[E]!==k&&f(L,E,k,{name:p}),g[t]=k,I}},{"923c1bf4a39ae90c":"gJg5v","46a3f73465955199":"bOssl",c1577e63189cf935:"jHRGA",dc625e1bb584faf6:"jmu0n",d55d91c410baca17:"h1Wnr","3e4ae607dbb6e78b":"1Abii","48ca4ae1d4998232":"e8mfS","1263258b63630933":"arrdQ","9b61caf69f87dfde":"dkhk9","7f30a3ab1bf5e1c1":"gKM90",c027b4da648348d3:"4CPdc",d4ad91965213ee1:"5CuF7",b616a206eb405268:"bABtS","4f9ec7e9f5d20965":"6nE00"}],"1Abii":[function(e,t,i){var n=e("6d3197d79123a33d").IteratorPrototype,r=e("f19338a88747fb05"),s=e("cc176dfbf6ea0553"),a=e("bc433e6ab6880430"),o=e("2f833e0e1738e7e0"),h=function(){return this};t.exports=function(e,t,i,c){var l=t+" Iterator";return e.prototype=r(n,{next:s(+!c,i)}),a(e,l,!1,!0),o[l]=h,e}},{"6d3197d79123a33d":"6nE00",f19338a88747fb05:"7isQ3",cc176dfbf6ea0553:"5toj2",bc433e6ab6880430:"dkhk9","2f833e0e1738e7e0":"bABtS"}],"6nE00":[function(e,t,i){var n,r,s,a=e("cdb9dcd93b52b3fc"),o=e("db955145706fc55a"),h=e("83e5df3d56e8834f"),c=e("45d6f1a3c372cdf6"),l=e("a97459767d74fdc3"),u=e("3bdf78f362001d7c"),d=e("d3901e60df7842c9"),f=e("e736fd193ddc96e5"),p=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(r=l(l(s)))!==Object.prototype&&(n=r):g=!0),!h(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:f&&(n=c(n)),o(n[p])||u(n,p,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},{cdb9dcd93b52b3fc:"cXVrS",db955145706fc55a:"h1Wnr","83e5df3d56e8834f":"8mxCV","45d6f1a3c372cdf6":"7isQ3",a97459767d74fdc3:"e8mfS","3bdf78f362001d7c":"4CPdc",d3901e60df7842c9:"5CuF7",e736fd193ddc96e5:"jHRGA"}],dwU83:[function(e,t,i){t.exports=function(e,t){return{value:e,done:t}}},{}],le1uL:[function(e,t,i){var n=e("1fd3a81d59354079"),r=e("878a42cfd07db75d"),s=e("c417af28e9abb2b"),a=e("cdcc2dbc58a28c02"),o=e("733e226e143494d1"),h=r([].join);n({target:"Array",proto:!0,forced:s!==Object||!o("join",",")},{join:function(e){return h(a(this),void 0===e?",":e)}})},{"1fd3a81d59354079":"gJg5v","878a42cfd07db75d":"2iJ57",c417af28e9abb2b:"kuAas",cdcc2dbc58a28c02:"h9ut0","733e226e143494d1":"lz8BN"}],eli4M:[function(e,t,i){var n=e("962fe7a81cad1a6"),r=e("9a92cbcc02ff28cd");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},{"962fe7a81cad1a6":"gJg5v","9a92cbcc02ff28cd":"cfsWk"}],cfsWk:[function(e,t,i){var n=e("4ca7787412cb919d"),r=e("883419ed27232d44"),s=e("ec6d0c7c9b243b67"),a=e("f185a9d11d03524a"),o=e("6d58dcee43d16a4d"),h=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf");t.exports=l||!u?function(e){if(l)return n(c,this,arguments)||0;var t=r(this),i=a(t);if(0===i)return -1;var o=i-1;for(arguments.length>1&&(o=h(o,s(arguments[1]))),o<0&&(o=i+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return -1}:c},{"4ca7787412cb919d":"2fjXG","883419ed27232d44":"h9ut0",ec6d0c7c9b243b67:"gAgUH",f185a9d11d03524a:"kHSes","6d58dcee43d16a4d":"lz8BN"}],zkrYn:[function(e,t,i){var n=e("5fce1361821ac187"),r=e("a7a3b0905c6ea58c").map;n({target:"Array",proto:!0,forced:!e("869912db050ffcc6")("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"5fce1361821ac187":"gJg5v",a7a3b0905c6ea58c:"daQdc","869912db050ffcc6":"ca1EV"}],"6cM5k":[function(e,t,i){var n=e("c49bbaeadf669473"),r=e("2b7c23018838f50"),s=e("5ca03f92538fd001"),a=e("d87cf2a2bcbb5c2c"),o=Array;n({target:"Array",stat:!0,forced:r(function(){function e(){}return!(o.of.call(e) instanceof e)})},{of:function(){for(var e=0,t=arguments.length,i=new(s(this)?this:o)(t);t>e;)a(i,e,arguments[e++]);return i.length=t,i}})},{c49bbaeadf669473:"gJg5v","2b7c23018838f50":"cXVrS","5ca03f92538fd001":"eytEI",d87cf2a2bcbb5c2c:"SVTZV"}],j9q44:[function(e,t,i){var n=e("b6ccafca6520a091"),r=e("617fddde3018a247"),s=e("59103d39edb4650b"),a=e("92e23121d8e92745"),o=e("e72c330067644bc");n({target:"Array",proto:!0,arity:1,forced:e("a33adf7f040c3b17")(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=r(this),i=s(t),n=arguments.length;o(i+n);for(var h=0;h79&&a<83||!s("reduce")},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},{aa6d80bc3b697f48:"gJg5v","1ee240c0462acdf8":"dEdT1","161424d627b72094":"lz8BN",bc7f601de74ac73e:"co76c",fbcc11805e216a7d:"hdoIk"}],dEdT1:[function(e,t,i){var n=e("93e7a99f8d3bc817"),r=e("915d05570b61a3c9"),s=e("da310552be96f5db"),a=e("f4209260f2003c23"),o=TypeError,h="Reduce of empty array with no initial value",c=function(e){return function(t,i,c,l){var u=r(t),d=s(u),f=a(u);if(n(i),0===f&&c<2)throw new o(h);var p=e?f-1:0,g=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=g;break}if(p+=g,e?p<0:f<=p)throw new o(h)}for(;e?p>=0:f>p;p+=g)p in d&&(l=i(l,d[p],p,u));return l}};t.exports={left:c(!1),right:c(!0)}},{"93e7a99f8d3bc817":"alrlv","915d05570b61a3c9":"6oQEu",da310552be96f5db:"kuAas",f4209260f2003c23:"kHSes"}],hdoIk:[function(e,t,i){var n=e("5fac34e3c4c0e043");t.exports="NODE"===n},{"5fac34e3c4c0e043":"ah0ZS"}],ah0ZS:[function(e,t,i){var n=e("7dc361f46ecde901"),r=e("9f6e24ecbba66a9e"),s=e("a008a59fdc341842"),a=function(e){return r.slice(0,e.length)===e};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},{"7dc361f46ecde901":"7Z171","9f6e24ecbba66a9e":"5hj4U",a008a59fdc341842:"161sQ"}],YvN4R:[function(e,t,i){var n=e("fce4aa67eb1fe4da"),r=e("9bb83011bb72081c").right,s=e("86ebd8f03f19e7b"),a=e("c87ecf8f0d069a25");n({target:"Array",proto:!0,forced:!e("ceeda59dcd941a57")&&a>79&&a<83||!s("reduceRight")},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},{fce4aa67eb1fe4da:"gJg5v","9bb83011bb72081c":"dEdT1","86ebd8f03f19e7b":"lz8BN",c87ecf8f0d069a25:"co76c",ceeda59dcd941a57:"hdoIk"}],eqr1I:[function(e,t,i){var n=e("96e1bf170d634a10"),r=e("ccf1d267c2b85a6"),s=e("683c722e26101e35"),a=r([].reverse),o=[1,2];n({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return s(this)&&(this.length=this.length),a(this)}})},{"96e1bf170d634a10":"gJg5v",ccf1d267c2b85a6:"2iJ57","683c722e26101e35":"7GYYD"}],gW4UQ:[function(e,t,i){var n=e("f4626508f1e86a5e"),r=e("c55f884cac32042"),s=e("c7ab28f7c42930d4"),a=e("d62f4c68d4a29c88"),o=e("598be77178793bf1"),h=e("f9b9299dc750b2dd"),c=e("ff620c60ded20435"),l=e("49168568b59df51b"),u=e("f02f140688adf449"),d=e("eb9bbc0536d1f202"),f=e("88cb1064f5f88f9e"),p=d("slice"),g=u("species"),m=Array,v=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var i,n,u,d=c(this),p=h(d),y=o(e,p),b=o(void 0===t?p:t,p);if(r(d)&&(s(i=d.constructor)&&(i===m||r(i.prototype))?i=void 0:a(i)&&null===(i=i[g])&&(i=void 0),i===m||void 0===i))return f(d,y,b);for(u=0,n=new(void 0===i?m:i)(v(b-y,0));y1?arguments[1]:void 0)}})},{"7d2f6f3fe52919ae":"gJg5v",b1828f452e0c06d:"daQdc","2a793f2ccd9f7f4e":"lz8BN"}],g2wAi:[function(e,t,i){var n=e("bcbafe2730da3578"),r=e("45fd6781824a0ecc"),s=e("227e835045b72b76"),a=e("d460a9dbedc2e639"),o=e("eb5d266a4b580e05"),h=e("ab9af39e90a45cab"),c=e("2874e3c4ed670355"),l=e("b077ecec4e3b8790"),u=e("b1c0993c5b4a0232"),d=e("fc67c1f531962716"),f=e("5463fbeb0c308d9"),p=e("44ffda3b5c0f4b25"),g=e("f9fbdc3cf34ed30"),m=e("f4067f6b9a5e38cb"),v=[],y=r(v.sort),b=r(v.push),x=l(function(){v.sort(void 0)}),E=l(function(){v.sort(null)}),w=d("sort"),T=!l(function(){if(g)return g<70;if(!f||!(f>3)){if(p)return!0;if(m)return m<603;var e,t,i,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)v.push({k:t+n,v:i})}for(v.sort(function(e,t){return t.v-e.v}),n=0;nc(i)?1:-1}),t=o(r),i=0;i0;)e[o]=e[--o];o!==h++&&(e[o]=a)}else for(var c=r(i/2),l=s(n(e,0,c),t),u=s(n(e,c),t),d=l.length,f=u.length,p=0,g=0;p=t(l[p],u[g])?l[p++]:u[g++]:px-n+i;m--)d(b,m-1)}else if(i>n)for(m=x-n;m>E;m--)v=m+n-1,y=m+i-1,v in b?b[y]=b[v]:d(b,y);for(m=0;m2?i:n(t),a=new e(s);s>r;)a[r]=t[r++];return a}},{"2dee1f257e46a7db":"kHSes"}],"6NIFY":[function(e,t,i){var n=e("63ff55de103c0dc5");t.exports=function(e,t){var i=n[e],r=i&&i.prototype;return r&&r[t]}},{"63ff55de103c0dc5":"7Z171"}],iJJcs:[function(e,t,i){var n=e("c44d9276f6e49c66"),r=e("ccd8819e12261215"),s=e("95891e25a6f53375"),a=e("71fb5de0045d079d"),o=e("150c173e099ddbe3"),h=e("bc8453913d7979ca"),c=e("a4502cc79d58ffee"),l=Array,u=Math.max,d=Math.min;n({target:"Array",proto:!0},{toSpliced:function(e,t){var i,n,r,f,p=h(this),g=a(p),m=o(e,g),v=arguments.length,y=0;for(0===v?i=n=0:1===v?(i=0,n=g-m):(i=v-2,n=d(u(c(t),0),g-m)),f=l(r=s(g+i-n));y=o||c<0)throw new s("Incorrect index");for(var l=new t(o),u=0;u>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},J=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return H(m(e),23,4)},Q=function(e){return H(e,52,8)},Z=function(e,t,i){c(e[P],t,{configurable:!0,get:function(){return i(this)[t]}})},ee=function(e,t,i,n){var r=L(e),s=g(i);if(s+t>r.byteLength)throw new j(M);var a=r.bytes,o=s+r.byteOffset,h=E(a,o,o+t);return n?h:Y(h)},et=function(e,t,i,n,r,s){var a=L(e),o=g(i),h=n(+r),c=!!s;if(o+t>a.byteLength)throw new j(M);for(var l=a.bytes,u=o+a.byteOffset,d=0;d>24)},setUint8:function(e,t){er(this,e,t<<24>>24)}},{unsafe:!0})}else F=(N=function(e){d(this,F);var t=g(e);D(this,{type:I,bytes:W(G(t),0),byteLength:t}),s||(this.byteLength=t,this.detached=!1)})[P],U=(B=function(e,t,i){d(this,U),d(e,F);var n=R(e),r=n.byteLength,a=f(t);if(a<0||a>r)throw new j("Wrong offset");if(i=void 0===i?r-a:p(i),a+i>r)throw new j("Wrong length");D(this,{type:O,buffer:e,byteLength:i,byteOffset:a,bytes:n.bytes}),s||(this.buffer=e,this.byteLength=i,this.byteOffset=a)})[P],s&&(Z(N,"byteLength",R),Z(B,"buffer",L),Z(B,"byteLength",L),Z(B,"byteOffset",L)),l(U,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){et(this,1,e,X,t)},setUint8:function(e,t){et(this,1,e,X,t)},setInt16:function(e,t){et(this,2,e,q,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){et(this,2,e,q,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){et(this,4,e,K,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){et(this,4,e,K,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){et(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){et(this,8,e,Q,t,arguments.length>2&&arguments[2])}});S(N,I),S(B,O),t.exports={ArrayBuffer:N,DataView:B}},{b2866645d252be10:"7Z171","6f1278f8f2a16115":"2iJ57","82c590a9dd8cc3ac":"6mXK1","923679fae99d4d2f":"i5ikG","9840ef06cc46dddb":"jmu0n","78ca6eb037349755":"gKM90",e693d9164e48343:"3NI4M","649a7a39c0607d74":"43JWW","57aab94a1cd1d913":"cXVrS","7333f43e52f40b38":"95yA1","1fd77d2940b4fd75":"gAgUH","8739fe5c743af579":"lQsU7",e3fc7a8bc754578a:"g2ruQ","93dd6846d2a65063":"lyxmB",d85071d33c34155a:"7M4Fp",eae7b83555f02284:"e8mfS",fd01028813b4814f:"arrdQ","8fdeb7296fb95696":"9XPgi",c0dac2bdd3636e95:"eO8Ta","3606a69f7ceacab3":"30not","5a0e685d057e2415":"d9xyM",dd3d1adef426fc5:"dkhk9",ea12fbd2f22b2f25:"ixHS2"}],i5ikG:[function(e,t,i){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],"43JWW":[function(e,t,i){var n=e("e34e683e23dcb4bb");t.exports=function(e,t,i){for(var r in t)n(e,r,t[r],i);return e}},{e34e683e23dcb4bb:"4CPdc"}],"95yA1":[function(e,t,i){var n=e("55f8840091c5bf21"),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},{"55f8840091c5bf21":"d5bNd"}],g2ruQ:[function(e,t,i){var n=e("10a259b760ce2864"),r=e("f24767d66362404d"),s=RangeError;t.exports=function(e){if(void 0===e)return 0;var t=n(e),i=r(t);if(t!==i)throw new s("Wrong length or index");return i}},{"10a259b760ce2864":"gAgUH",f24767d66362404d:"lQsU7"}],lyxmB:[function(e,t,i){var n=e("8f9dfe0502a74d7");t.exports=Math.fround||function(e){return n(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)}},{"8f9dfe0502a74d7":"b6uSw"}],b6uSw:[function(e,t,i){var n=e("9113322676fa66ef"),r=Math.abs;t.exports=function(e,t,i,s){var a=+e,o=r(a),h=n(a);if(oi||l!=l?1/0*h:h*l}},{"9113322676fa66ef":"9QHoq"}],"9QHoq":[function(e,t,i){t.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},{}],"7M4Fp":[function(e,t,i){var n=Array,r=Math.abs,s=Math.pow,a=Math.floor,o=Math.log,h=Math.LN2;t.exports={pack:function(e,t,i){var c,l,u,d=n(i),f=8*i-t-1,p=(1<>1,m=23===t?s(2,-24)-s(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(u=s(2,-(c=a(o(e)/h))),e*u<1&&(c--,u*=2),c+g>=1?e+=m/u:e+=m*s(2,1-g),e*u>=2&&(c++,u/=2),c+g>=p?(l=0,c=p):c+g>=1?(l=(e*u-1)*s(2,t),c+=g):(l=e*s(2,g-1)*s(2,t),c=0));t>=8;)d[y++]=255&l,l/=256,t-=8;for(c=c<0;)d[y++]=255&c,c/=256,f-=8;return d[y-1]|=128*v,d},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<>1,h=r-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;h>0;)u=256*u+e[c--],h-=8;for(i=u&(1<<-h)-1,u>>=-h,h+=t;h>0;)i=256*i+e[c--],h-=8;if(0===u)u=1-o;else{if(u===a)return i?NaN:l?-1/0:1/0;i+=s(2,t),u-=o}return(l?-1:1)*i*s(2,u-t)}}},{}],"9DwR1":[function(e,t,i){var n=e("46c87ab471833e50"),r=e("3efc956d746e3978");n({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},{"46c87ab471833e50":"gJg5v","3efc956d746e3978":"b6692"}],b6692:[function(e,t,i){var n,r,s,a=e("4142cc1b1f950662"),o=e("fa237bbf2050dd6d"),h=e("9603af1373955d3d"),c=e("1b44b7e19e6f660d"),l=e("af39713fe0cf7587"),u=e("dd5eec94b1519471"),d=e("b9eebb2d4c13b0d6"),f=e("36a2290066710aa0"),p=e("fdfbb82e20f81a19"),g=e("81ef6d90bc6acdce"),m=e("96421c541af03be5"),v=e("ab8263bb2af6274"),y=e("ba5da2480b30b79"),b=e("b6e4d282cbe3e34a"),x=e("3d5af0d43aa6e42b"),E=e("8007fa7370557b8e"),w=e("82848943f937d383"),T=w.enforce,S=w.get,A=h.Int8Array,C=A&&A.prototype,_=h.Uint8ClampedArray,I=_&&_.prototype,O=A&&y(A),P=C&&y(C),M=Object.prototype,R=h.TypeError,L=x("toStringTag"),D=E("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",N=a&&!!b&&"Opera"!==d(h.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},V=function(e){var t=y(e);if(l(t)){var i=S(t);return i&&u(i,k)?i[k]:V(t)}},G=function(e){if(!l(e))return!1;var t=d(e);return u(B,t)||u(U,t)};for(n in B)(s=(r=h[n])&&r.prototype)?T(s)[k]=r:N=!1;for(n in U)(s=(r=h[n])&&r.prototype)&&(T(s)[k]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw new R("Incorrect invocation")},N))for(n in B)h[n]&&b(h[n],O);if((!N||!P||P===M)&&(P=O.prototype,N))for(n in B)h[n]&&b(h[n].prototype,P);if(N&&y(I)!==P&&b(I,P),o&&!u(P,L))for(n in F=!0,m(P,L,{configurable:!0,get:function(){return l(this)?this[D]:void 0}}),B)h[n]&&p(h[n],D,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&D,aTypedArray:function(e){if(G(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||v(O,e)))return e;throw new R(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,n){if(o){if(i)for(var r in B){var s=h[r];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}(!P[e]||i)&&g(P,e,i?t:N&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(o){if(b){if(i){for(n in B)if((r=h[n])&&u(r,e))try{delete r[e]}catch(e){}}if(O[e]&&!i)return;try{return g(O,e,i?t:N&&O[e]||t)}catch(e){}}for(n in B)(r=h[n])&&(!r[e]||i)&&g(r,e,t)}},getTypedArrayConstructor:V,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||u(B,t)||u(U,t)},isTypedArray:G,TypedArray:O,TypedArrayPrototype:P}},{"4142cc1b1f950662":"i5ikG",fa237bbf2050dd6d:"6mXK1","9603af1373955d3d":"7Z171","1b44b7e19e6f660d":"h1Wnr",af39713fe0cf7587:"8mxCV",dd5eec94b1519471:"9JWVX",b9eebb2d4c13b0d6:"cRCRk","36a2290066710aa0":"3zerS",fdfbb82e20f81a19:"gKM90","81ef6d90bc6acdce":"4CPdc","96421c541af03be5":"3NI4M",ab8263bb2af6274:"d5bNd",ba5da2480b30b79:"e8mfS",b6e4d282cbe3e34a:"arrdQ","3d5af0d43aa6e42b":"5CuF7","8007fa7370557b8e":"55cC0","82848943f937d383":"ixHS2"}],hihCW:[function(e,t,i){var n=e("de35f4868f3fe074"),r=e("41f3b5783dddf1cc"),s=e("da813d2481635a75"),a=e("7ac9e92946b0cbd8"),o=e("d8dca2550bf1cdc9"),h=e("881de7865554c8ed"),c=e("9f7b0710000cb4e4"),l=a.ArrayBuffer,u=a.DataView,d=u.prototype,f=r(l.prototype.slice),p=r(d.getUint8),g=r(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:s(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(f&&void 0===t)return f(o(this),e);for(var i=o(this).byteLength,n=h(e,i),r=h(void 0===t?i:t,i),s=new l(c(r-n)),a=new u(this),d=new u(s),m=0;n=s&&(!i||g))n=v(e,0,s);else{n=new d(s,i&&!g&&b?{maxByteLength:b(e)}:void 0);for(var m=new f(e),w=new f(n),T=p(s,r),S=0;S92||"NODE"===a&&s>94||"BROWSER"===a&&s>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},{"6bcfdfa15a0af40c":"7Z171","5bfa734fa18d01bd":"cXVrS","504e63b697c2418c":"co76c","2f39a8269e626373":"ah0ZS"}],ilodQ:[function(e,t,i){var n=e("2ee97e669ed348d2"),r=e("6010ab662274272a");r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},{"2ee97e669ed348d2":"gJg5v","6010ab662274272a":"dmTWg"}],"3sjfy":[function(e,t,i){var n=e("cf63881ba58455e7"),r=e("712c5b724e238772"),s=e("9542983db09542aa")(function(){return 120!==new Date(16e11).getYear()}),a=r(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:s},{getYear:function(){return a(this)-1900}})},{cf63881ba58455e7:"gJg5v","712c5b724e238772":"2iJ57","9542983db09542aa":"cXVrS"}],aJQbh:[function(e,t,i){var n=e("1b76219dfd05b069"),r=e("9cd428d337baa08f"),s=Date,a=r(s.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new s)}})},{"1b76219dfd05b069":"gJg5v","9cd428d337baa08f":"2iJ57"}],cl2UC:[function(e,t,i){var n=e("45b3958e6ed27545"),r=e("bb0b969d98296e93"),s=e("1bfaa736b448a80b"),a=Date.prototype,o=r(a.getTime),h=r(a.setFullYear);n({target:"Date",proto:!0},{setYear:function(e){o(this);var t=s(e);return h(this,t>=0&&t<=99?t+1900:t)}})},{"45b3958e6ed27545":"gJg5v",bb0b969d98296e93:"2iJ57","1bfaa736b448a80b":"gAgUH"}],l89H5:[function(e,t,i){e("382df40000aa3419")({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},{"382df40000aa3419":"gJg5v"}],cHGz3:[function(e,t,i){var n=e("ce28eb9d99ee133e"),r=e("f6428e9a2d433b20");n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},{ce28eb9d99ee133e:"gJg5v",f6428e9a2d433b20:"jjIBo"}],jjIBo:[function(e,t,i){var n=e("8ef03d8aa78a1a05"),r=e("d77f9603e3197abc"),s=e("de264358de0ee0b0").start,a=RangeError,o=isFinite,h=Math.abs,c=Date.prototype,l=c.toISOString,u=n(c.getTime),d=n(c.getUTCDate),f=n(c.getUTCFullYear),p=n(c.getUTCHours),g=n(c.getUTCMilliseconds),m=n(c.getUTCMinutes),v=n(c.getUTCMonth),y=n(c.getUTCSeconds);t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))})||!r(function(){l.call(new Date(NaN))})?function(){if(!o(u(this)))throw new a("Invalid time value");var e=f(this),t=g(this),i=e<0?"-":e>9999?"+":"";return i+s(h(e),i?6:4,0)+"-"+s(v(this)+1,2,0)+"-"+s(d(this),2,0)+"T"+s(p(this),2,0)+":"+s(m(this),2,0)+":"+s(y(this),2,0)+"."+s(t,3,0)+"Z"}:l},{"8ef03d8aa78a1a05":"2iJ57",d77f9603e3197abc:"cXVrS",de264358de0ee0b0:"15Fl7"}],"15Fl7":[function(e,t,i){var n=e("3f3ae64f3613324a"),r=e("86f2220ab33aea88"),s=e("ce16e4ba37e115ac"),a=e("3fe5759e7801b635"),o=e("3c8ec8ea0d5bc9c"),h=n(a),c=n("".slice),l=Math.ceil,u=function(e){return function(t,i,n){var a,u,d=s(o(t)),f=r(i),p=d.length,g=void 0===n?" ":s(n);return f<=p||""===g?d:((u=h(g,l((a=f-p)/g.length))).length>a&&(u=c(u,0,a)),e?d+u:u+d)}};t.exports={start:u(!1),end:u(!0)}},{"3f3ae64f3613324a":"2iJ57","86f2220ab33aea88":"lQsU7",ce16e4ba37e115ac:"4x6uB","3fe5759e7801b635":"dsk9g","3c8ec8ea0d5bc9c":"cHxZN"}],dsk9g:[function(e,t,i){var n=e("810ed4f57c077da5"),r=e("f870ae4664ae9b8c"),s=e("b05eac101d7c2112"),a=RangeError;t.exports=function(e){var t=r(s(this)),i="",o=n(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(i+=t);return i}},{"810ed4f57c077da5":"gAgUH",f870ae4664ae9b8c:"4x6uB",b05eac101d7c2112:"cHxZN"}],"6OeqH":[function(e,t,i){var n=e("a9ca9c4e2bd47ff4"),r=e("b11d0c7c0b2675d5"),s=e("60b061d7c8f57ad8"),a=e("e362bf7168d77860");n({target:"Date",proto:!0,arity:1,forced:r(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=s(this),i=a(t,"number");return"number"!=typeof i||isFinite(i)?t.toISOString():null}})},{a9ca9c4e2bd47ff4:"gJg5v",b11d0c7c0b2675d5:"cXVrS","60b061d7c8f57ad8":"6oQEu",e362bf7168d77860:"cCley"}],j16TA:[function(e,t,i){var n=e("af14b1f4d994a127"),r=e("53d6ff102d14faf"),s=e("5ca81c5eeb540a34"),a=e("5e5f3eb0bfd879e9")("toPrimitive"),o=Date.prototype;n(o,a)||r(o,a,s)},{af14b1f4d994a127:"9JWVX","53d6ff102d14faf":"4CPdc","5ca81c5eeb540a34":"5DgYa","5e5f3eb0bfd879e9":"5CuF7"}],"5DgYa":[function(e,t,i){var n=e("38c74c72615b5acf"),r=e("474ad3f08d0bd65b"),s=TypeError;t.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new s("Incorrect hint");return r(this,e)}},{"38c74c72615b5acf":"dPzbI","474ad3f08d0bd65b":"6aMZM"}],ltluo:[function(e,t,i){var n=e("be835518f2abbc78"),r=e("7997503c8dda7ce0"),s=Date.prototype,a="Invalid Date",o="toString",h=n(s[o]),c=n(s.getTime);String(new Date(NaN))!==a&&r(s,o,function(){var e=c(this);return e==e?h(this):a})},{be835518f2abbc78:"2iJ57","7997503c8dda7ce0":"4CPdc"}],l0eoZ:[function(e,t,i){var n=e("ffabd3103ccbbe88"),r=e("3b0c6b91d4084705"),s=e("9544189b2ef4f6a8"),a=r("".charAt),o=r("".charCodeAt),h=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),u=/[\w*+\-./@]/,d=function(e,t){for(var i=c(e,16);i.length1?arguments[1]:void 0);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),s(d,i?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&r(d,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var n=t+" Iterator",r=v(t),s=v(n);l(e,t,function(e,t){m(this,{type:n,target:e,state:r(e),kind:t,last:null})},function(){for(var e=s(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"===t?u(i.key,!1):"values"===t?u(i.value,!1):u([i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),d(t)}}},{"4087699e0041f387":"7isQ3","1731ca06a03e84a3":"3NI4M",c048d7069b65e14b:"43JWW","5aecbe8fa3c5a74e":"f1CxE",d3ad95b3aaf27c8a:"95yA1",cac009f0bbf34bb8:"8AxCV",a9a2814559569c97:"dCEHX",eb2045e367047a1c:"klSVb","14b36f47f4e70181":"dwU83",dfd8ed3bea972a50:"c7jXZ",b83fb10f1c8587e6:"6mXK1","77d5ccb3a2fbc893":"3Q1Z8","79afb9c26314edc8":"ixHS2"}],"1aJqY":[function(e,t,i){var n=e("6567f4dade5d8960"),r=e("f35d7393646ad055"),s=e("c4503f7eb1018306"),a=e("d7c6ba4f404b5360"),o=e("ff883ec9010d6328"),h=e("f9f796f22480c881"),c=e("dc5cfe657d3f962b"),l=e("59f5d275c85c76"),u=h.Map,d=h.has,f=h.get,p=h.set,g=r([].push),m=c||l(function(){return 1!==u.groupBy("ab",function(e){return e}).get("a").length});n({target:"Map",stat:!0,forced:c||m},{groupBy:function(e,t){a(e),s(t);var i=new u,n=0;return o(e,function(e){var r=t(e,n++);d(i,r)?g(f(i,r),e):p(i,r,[e])}),i}})},{"6567f4dade5d8960":"gJg5v",f35d7393646ad055:"2iJ57",c4503f7eb1018306:"alrlv",d7c6ba4f404b5360:"cHxZN",ff883ec9010d6328:"dCEHX",f9f796f22480c881:"fY40v",dc5cfe657d3f962b:"jHRGA","59f5d275c85c76":"cXVrS"}],fY40v:[function(e,t,i){var n=e("89734044d2e98b8d"),r=Map.prototype;t.exports={Map:Map,set:n(r.set),get:n(r.get),has:n(r.has),remove:n(r.delete),proto:r}},{"89734044d2e98b8d":"2iJ57"}],DQpS3:[function(e,t,i){var n=e("902411673b5fb2fc"),r=e("a4cfbc2e86c91e88"),s=Math.acosh,a=Math.log,o=Math.sqrt,h=Math.LN2;n({target:"Math",stat:!0,forced:!s||710!==Math.floor(s(Number.MAX_VALUE))||s(1/0)!==1/0},{acosh:function(e){var t=+e;return t<1?NaN:t>94906265.62425156?a(t)+h:r(t-1+o(t-1)*o(t+1))}})},{"902411673b5fb2fc":"gJg5v",a4cfbc2e86c91e88:"fdW4O"}],fdW4O:[function(e,t,i){var n=Math.log;t.exports=Math.log1p||function(e){var t=+e;return t>-.00000001&&t<1e-8?t-t*t/2:n(1+t)}},{}],"9m0ga":[function(e,t,i){var n=e("7dffb6067574667e"),r=Math.asinh,s=Math.log,a=Math.sqrt;n({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function e(t){var i=+t;return isFinite(i)&&0!==i?i<0?-e(-i):s(i+a(i*i+1)):i}})},{"7dffb6067574667e":"gJg5v"}],"6OW8r":[function(e,t,i){var n=e("852dfc47c3d9c449"),r=Math.atanh,s=Math.log;n({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){var t=+e;return 0===t?t:s((1+t)/(1-t))/2}})},{"852dfc47c3d9c449":"gJg5v"}],"8Ipne":[function(e,t,i){var n=e("387aa8b70c72a94d"),r=e("dac8a302b6d1f627"),s=Math.abs,a=Math.pow;n({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return r(t)*a(s(t),1/3)}})},{"387aa8b70c72a94d":"gJg5v",dac8a302b6d1f627:"9QHoq"}],bbe5P:[function(e,t,i){var n=e("2c4d345d25b6d18c"),r=Math.floor,s=Math.log,a=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-r(s(t+.5)*a):32}})},{"2c4d345d25b6d18c":"gJg5v"}],giuXg:[function(e,t,i){var n=e("f8f6f4e4d2e4cfe0"),r=e("c0bbc641191a15a9"),s=Math.cosh,a=Math.abs,o=Math.E;n({target:"Math",stat:!0,forced:!s||s(710)===1/0},{cosh:function(e){var t=r(a(e)-1)+1;return o/2*(t+1/(t*o*o))}})},{f8f6f4e4d2e4cfe0:"gJg5v",c0bbc641191a15a9:"fQMM6"}],fQMM6:[function(e,t,i){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||22025.465794806718>n(10)||-.00000000000000002!==n(-.00000000000000002)?function(e){var t=+e;return 0===t?t:t>-.000001&&t<1e-6?t+t*t/2:r(t)-1}:n},{}],"4Dfiq":[function(e,t,i){var n=e("54b4d24b57e9de25"),r=e("5648f7662bee3fb6");n({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},{"54b4d24b57e9de25":"gJg5v","5648f7662bee3fb6":"fQMM6"}],cIxH8:[function(e,t,i){e("1c1b96b0ca7c4a89")({target:"Math",stat:!0},{fround:e("47950f9c73209332")})},{"1c1b96b0ca7c4a89":"gJg5v","47950f9c73209332":"lyxmB"}],khz6l:[function(e,t,i){var n=e("bf5ef278fe0c2a2d"),r=Math.hypot,s=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i,n,r=0,o=0,h=arguments.length,c=0;o0?r+=(n=i/c)*n:r+=i;return c===1/0?1/0:c*a(r)}})},{bf5ef278fe0c2a2d:"gJg5v"}],flBRC:[function(e,t,i){var n=e("26821e3060ae31ef"),r=e("4ae16bb469711695"),s=Math.imul;n({target:"Math",stat:!0,forced:r(function(){return -5!==s(4294967295,5)||2!==s.length})},{imul:function(e,t){var i=+e,n=+t,r=65535&i,s=65535&n;return 0|r*s+((65535&i>>>16)*s+r*(65535&n>>>16)<<16>>>0)}})},{"26821e3060ae31ef":"gJg5v","4ae16bb469711695":"cXVrS"}],OdIjN:[function(e,t,i){e("e28aca710c97445a")({target:"Math",stat:!0},{log10:e("e386fc2f96575e54")})},{e28aca710c97445a:"gJg5v",e386fc2f96575e54:"7QVwX"}],"7QVwX":[function(e,t,i){var n=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(e){return n(e)*r}},{}],"5N41O":[function(e,t,i){e("ec799bb6317cd425")({target:"Math",stat:!0},{log1p:e("a686ef564d9d2882")})},{ec799bb6317cd425:"gJg5v",a686ef564d9d2882:"fdW4O"}],gqwBy:[function(e,t,i){var n=e("266355161c4f030d"),r=Math.log,s=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return r(e)/s}})},{"266355161c4f030d":"gJg5v"}],cjDQT:[function(e,t,i){e("69e2ea3a560b4a42")({target:"Math",stat:!0},{sign:e("22dfbc4f803ce611")})},{"69e2ea3a560b4a42":"gJg5v","22dfbc4f803ce611":"9QHoq"}],hjxfV:[function(e,t,i){var n=e("ebfcc20cba7b1e4e"),r=e("e96ed0b70941abe1"),s=e("cfb0aa3c75dc889"),a=Math.abs,o=Math.exp,h=Math.E;n({target:"Math",stat:!0,forced:r(function(){return -.00000000000000002!==Math.sinh(-.00000000000000002)})},{sinh:function(e){var t=+e;return 1>a(t)?(s(t)-s(-t))/2:(o(t-1)-o(-t-1))*(h/2)}})},{ebfcc20cba7b1e4e:"gJg5v",e96ed0b70941abe1:"cXVrS",cfb0aa3c75dc889:"fQMM6"}],lGEJr:[function(e,t,i){var n=e("75ca6aa3ab3c490c"),r=e("fbda4dec68bbb02f"),s=Math.exp;n({target:"Math",stat:!0},{tanh:function(e){var t=+e,i=r(t),n=r(-t);return i===1/0?1:n===1/0?-1:(i-n)/(s(t)+s(-t))}})},{"75ca6aa3ab3c490c":"gJg5v",fbda4dec68bbb02f:"fQMM6"}],"8Egu9":[function(e,t,i){e("8c4fc1e6a65b6d2f")(Math,"Math",!0)},{"8c4fc1e6a65b6d2f":"dkhk9"}],jWST5:[function(e,t,i){e("f97de92e01c210b9")({target:"Math",stat:!0},{trunc:e("15d9fc8fa50b9dc3")})},{f97de92e01c210b9:"gJg5v","15d9fc8fa50b9dc3":"8w9Yn"}],hrnKP:[function(e,t,i){var n=e("6a137a118d1bb06a"),r=e("6befc110db857fa5"),s=e("dac0f49ddd258f02"),a=e("be627f07e88786cb"),o=e("2945e9e965681f9c"),h=e("d6ad03f4a8d178a7"),c=e("b7d12a59a0877cf0"),l=e("a63fe8ba771ddd66"),u=e("1fa70215a385f43f"),d=e("ac9a98828b299940"),f=e("a2f71c36cf1dfa06"),p=e("1398c779e833098a"),g=e("58c10e766b715db4"),m=e("eae30770a8520200").f,v=e("a3f2314ca43c8870").f,y=e("673bf972e777267f").f,b=e("dc2cfe6c86ab9553"),x=e("27f6d5a76060ef23").trim,E="Number",w=a[E],T=o[E],S=w.prototype,A=a.TypeError,C=h("".slice),_=h("".charCodeAt),I=function(e){var t=p(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,i,n,r,s,a,o,h,c=p(e,"number");if(f(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2){if(43===(t=_(c=x(c),0))||45===t){if(88===(i=_(c,2))||120===i)return NaN}else if(48===t){switch(_(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(o=0,a=(s=C(c,2)).length;or)return NaN;return parseInt(s,n)}}return+c},P=c(E,!w(" 0o1")||!w("0b1")||w("+0x1")),M=function(e){var t,i=arguments.length<1?0:w(I(e));return(t=this,d(S,t)&&g(function(){b(t)}))?u(Object(i),this,M):i};M.prototype=S,P&&!r&&(S.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:P},{Number:M});var R=function(e,t){for(var i,n=s?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;n.length>r;r++)l(t,i=n[r])&&!l(e,i)&&y(e,i,v(t,i))};r&&T&&R(o[E],T),(P||r)&&R(o[E],w)},{"6a137a118d1bb06a":"gJg5v","6befc110db857fa5":"jHRGA",dac0f49ddd258f02:"6mXK1",be627f07e88786cb:"7Z171","2945e9e965681f9c":"iwjHr",d6ad03f4a8d178a7:"2iJ57",b7d12a59a0877cf0:"gE5NQ",a63fe8ba771ddd66:"9JWVX","1fa70215a385f43f":"30not",ac9a98828b299940:"d5bNd",a2f71c36cf1dfa06:"2ZU2p","1398c779e833098a":"cCley","58c10e766b715db4":"cXVrS",eae30770a8520200:"dDV3S",a3f2314ca43c8870:"aRu9T","673bf972e777267f":"hvqCQ",dc2cfe6c86ab9553:"gPsjs","27f6d5a76060ef23":"jX5uQ"}],gPsjs:[function(e,t,i){var n=e("4875831adea9aec3");t.exports=n(1..valueOf)},{"4875831adea9aec3":"2iJ57"}],jX5uQ:[function(e,t,i){var n=e("17f5a3ff1a1c6ce6"),r=e("56083d5e0450dab9"),s=e("3c5616504c7d56e9"),a=e("eacd32ca91d3c555"),o=n("".replace),h=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var i=s(r(t));return 1&e&&(i=o(i,h,"")),2&e&&(i=o(i,c,"$1")),i}};t.exports={start:l(1),end:l(2),trim:l(3)}},{"17f5a3ff1a1c6ce6":"2iJ57","56083d5e0450dab9":"cHxZN","3c5616504c7d56e9":"4x6uB",eacd32ca91d3c555:"heeAP"}],heeAP:[function(e,t,i){t.exports=" \n\v\f\r                 \u2028\u2029\uFEFF"},{}],aXsIP:[function(e,t,i){e("6a152397506f58aa")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:2220446049250313e-31})},{"6a152397506f58aa":"gJg5v"}],lsaNY:[function(e,t,i){e("1cd8bc612ab8a9aa")({target:"Number",stat:!0},{isFinite:e("2741aaae50f5c5db")})},{"1cd8bc612ab8a9aa":"gJg5v","2741aaae50f5c5db":"jGkAe"}],jGkAe:[function(e,t,i){var n=e("7a63d25015bc275e").isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},{"7a63d25015bc275e":"7Z171"}],"8eW4I":[function(e,t,i){e("ce2c3fa51ce7a2b6")({target:"Number",stat:!0},{isInteger:e("3e3a085edc93c707")})},{ce2c3fa51ce7a2b6:"gJg5v","3e3a085edc93c707":"3kBvt"}],"3kBvt":[function(e,t,i){var n=e("de18539dea9401a"),r=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},{de18539dea9401a:"8mxCV"}],h5WTU:[function(e,t,i){e("677c53d72f4dc4b5")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"677c53d72f4dc4b5":"gJg5v"}],glrUF:[function(e,t,i){var n=e("dab33bcdb73caa98"),r=e("3e8bd2979ca91bb4"),s=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&9007199254740991>=s(e)}})},{dab33bcdb73caa98:"gJg5v","3e8bd2979ca91bb4":"3kBvt"}],"91CVe":[function(e,t,i){e("f08cf5dcc31074a6")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},{f08cf5dcc31074a6:"gJg5v"}],"5JCvB":[function(e,t,i){e("d7c9fce3c9d3d189")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},{d7c9fce3c9d3d189:"gJg5v"}],"1UYJO":[function(e,t,i){var n=e("6edfd3b7fb98ea3e"),r=e("bae0a47a096d7522");n({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},{"6edfd3b7fb98ea3e":"gJg5v",bae0a47a096d7522:"guYqF"}],guYqF:[function(e,t,i){var n=e("69bd3378e63391c8"),r=e("842d738e09e8ac6b"),s=e("1779e25eab454452"),a=e("a6c37474f58f0739"),o=e("595d7b3426fbca88").trim,h=e("3acff994bd3a41b1"),c=s("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,f=1/l(h+"-0")!=-1/0||d&&!r(function(){l(Object(d))});t.exports=f?function(e){var t=o(a(e)),i=l(t);return 0===i&&"-"===c(t,0)?-0:i}:l},{"69bd3378e63391c8":"7Z171","842d738e09e8ac6b":"cXVrS","1779e25eab454452":"2iJ57",a6c37474f58f0739:"4x6uB","595d7b3426fbca88":"jX5uQ","3acff994bd3a41b1":"heeAP"}],"966g1":[function(e,t,i){var n=e("3882f0ce9a7bc56f"),r=e("f2f29cbfccb05e47");n({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},{"3882f0ce9a7bc56f":"gJg5v",f2f29cbfccb05e47:"9rXua"}],"9rXua":[function(e,t,i){var n=e("272fde501e24d305"),r=e("48c528ae508d02e"),s=e("7e7198f2f1540a47"),a=e("dd517d0a64474028"),o=e("b0ec8b6ceac29d85").trim,h=e("5252068313c033be"),c=n.parseInt,l=n.Symbol,u=l&&l.iterator,d=/^[+-]?0x/i,f=s(d.exec),p=8!==c(h+"08")||22!==c(h+"0x16")||u&&!r(function(){c(Object(u))});t.exports=p?function(e,t){var i=o(a(e));return c(i,t>>>0||(f(d,i)?16:10))}:c},{"272fde501e24d305":"7Z171","48c528ae508d02e":"cXVrS","7e7198f2f1540a47":"2iJ57",dd517d0a64474028:"4x6uB",b0ec8b6ceac29d85:"jX5uQ","5252068313c033be":"heeAP"}],"2u6nF":[function(e,t,i){var n=e("8acff5e43ec1ac00"),r=e("a791fae730bb52f8"),s=e("eaaedcaf85694da0"),a=e("5cfce35661f01b6f"),o=e("6c8e5def45c211a1"),h=e("876da316e0a42221"),c=e("2c3e63cad4b974da"),l=RangeError,u=String,d=isFinite,f=Math.abs,p=Math.floor,g=Math.pow,m=Math.round,v=r(1..toExponential),y=r(o),b=r("".slice),x="-6.9000e-11"===v(-.000000000069,4)&&"1.25e+0"===v(1.255,2)&&"1.235e+4"===v(12345,3)&&"3e+1"===v(25,0);n({target:"Number",proto:!0,forced:!x||!(c(function(){v(1,1/0)})&&c(function(){v(1,-1/0)}))||!!c(function(){v(1/0,1/0),v(NaN,1/0)})},{toExponential:function(e){var t,i,n,r,o=a(this);if(void 0===e)return v(o);var c=s(e);if(!d(o))return String(o);if(c<0||c>20)throw new l("Incorrect fraction digits");if(x)return v(o,c);var E="";if(o<0&&(E="-",o=-o),0===o)i=0,t=y("0",c+1);else{var w=g(10,(i=p(h(o)))-c),T=m(o/w);2*o>=(2*T+1)*w&&(T+=1),T>=g(10,c+1)&&(T/=10,i+=1),t=u(T)}return 0!==c&&(t=b(t,0,1)+"."+b(t,1)),0===i?(n="+",r="0"):(n=i>0?"+":"-",r=u(f(i))),E+(t+="e"+n+r)}})},{"8acff5e43ec1ac00":"gJg5v",a791fae730bb52f8:"2iJ57",eaaedcaf85694da0:"gAgUH","5cfce35661f01b6f":"gPsjs","6c8e5def45c211a1":"dsk9g","876da316e0a42221":"7QVwX","2c3e63cad4b974da":"cXVrS"}],"3Zya8":[function(e,t,i){var n=e("cd4f6c8df33e40b4"),r=e("46d8af161e2dc0d6"),s=e("fb6b6174bcfa90f"),a=e("a88d9905e1f83adc"),o=e("9b93ef6d7f240c15"),h=e("d57e63cfa5cbb68e"),c=RangeError,l=String,u=Math.floor,d=r(o),f=r("".slice),p=r(1..toFixed),g=function(e,t,i){return 0===t?i:t%2==1?g(e,t-1,i*e):g(e*e,t/2,i)},m=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=u(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=u(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=l(e[t]);i=""===i?n:i+d("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:h(function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)})||!h(function(){p({})})},{toFixed:function(e){var t,i,n,r,o=a(this),h=s(e),u=[0,0,0,0,0,0],p="",x="0";if(h<0||h>20)throw new c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return l(o);if(o<0&&(p="-",o=-o),o>1e-21){if(i=((t=m(o*g(2,69,1))-69)<0?o*g(2,-t,1):o/g(2,t,1))*4503599627370496,(t=52-t)>0){for(v(u,0,i),n=h;n>=7;)v(u,1e7,0),n-=7;for(v(u,g(10,n,1),0),n=t-1;n>=23;)y(u,8388608),n-=23;y(u,1<0?p+((r=x.length)<=h?"0."+d("0",h-r)+x:f(x,0,r-h)+"."+f(x,r-h)):p+x}})},{cd4f6c8df33e40b4:"gJg5v","46d8af161e2dc0d6":"2iJ57",fb6b6174bcfa90f:"gAgUH",a88d9905e1f83adc:"gPsjs","9b93ef6d7f240c15":"dsk9g",d57e63cfa5cbb68e:"cXVrS"}],kEs9R:[function(e,t,i){var n=e("a8898a73ab91d290"),r=e("ce4a637ab8de47ca"),s=e("4308932cb74d1989"),a=e("b09e8a0929dbee09"),o=r(1..toPrecision);n({target:"Number",proto:!0,forced:s(function(){return"1"!==o(1,void 0)})||!s(function(){o({})})},{toPrecision:function(e){return void 0===e?o(a(this)):o(a(this),e)}})},{a8898a73ab91d290:"gJg5v",ce4a637ab8de47ca:"2iJ57","4308932cb74d1989":"cXVrS",b09e8a0929dbee09:"gPsjs"}],czjHQ:[function(e,t,i){var n=e("9e39c36176ea9027"),r=e("eca15ea3e03a62cf");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},{"9e39c36176ea9027":"gJg5v",eca15ea3e03a62cf:"cKgWo"}],cKgWo:[function(e,t,i){var n=e("6bef1f1b71c0d15f"),r=e("d01fdbe6acf1dc69"),s=e("152344c6f1cc0727"),a=e("e500b6660dae4ed2"),o=e("a51f09aa538cbbc9"),h=e("1e00e3b82b1b3cb6"),c=e("df8aa13044dccc97"),l=e("fb90ba2f91e5c029"),u=e("33842bab271c4900"),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||a(function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach(function(e){t[e]=e}),7!==d({},e)[i]||o(d({},t)).join("")!==r})?function(e,t){for(var i=l(e),r=arguments.length,a=1,d=h.f,f=c.f;r>a;)for(var g,m=u(arguments[a++]),v=d?p(o(m),d(m)):o(m),y=v.length,b=0;y>b;)g=v[b++],(!n||s(f,m,g))&&(i[g]=m[g]);return i}:d},{"6bef1f1b71c0d15f":"6mXK1",d01fdbe6acf1dc69:"2iJ57","152344c6f1cc0727":"bOssl",e500b6660dae4ed2:"cXVrS",a51f09aa538cbbc9:"kQgZQ","1e00e3b82b1b3cb6":"f3eHQ",df8aa13044dccc97:"7Av2Z",fb90ba2f91e5c029:"6oQEu","33842bab271c4900":"kuAas"}],"9DWg9":[function(e,t,i){e("17cb8072b960d33f")({target:"Object",stat:!0,sham:!e("b7e43977f87f28a2")},{create:e("af73c0503e5e2dd8")})},{"17cb8072b960d33f":"gJg5v",b7e43977f87f28a2:"6mXK1",af73c0503e5e2dd8:"7isQ3"}],"8uazT":[function(e,t,i){var n=e("8f6b558a4e940099"),r=e("96523e310a3fe908"),s=e("67741c7cd2815bff"),a=e("60e72fdc0dc9cee8"),o=e("81722f8311309945"),h=e("e74b2be534174483");r&&n({target:"Object",proto:!0,forced:s},{__defineGetter__:function(e,t){h.f(o(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},{"8f6b558a4e940099":"gJg5v","96523e310a3fe908":"6mXK1","67741c7cd2815bff":"hh3RM","60e72fdc0dc9cee8":"alrlv","81722f8311309945":"6oQEu",e74b2be534174483:"hvqCQ"}],hh3RM:[function(e,t,i){var n=e("8edc7d10fd60cc1f"),r=e("199488e7120262f2"),s=e("67c1b3060370d6f1"),a=e("a7f7bf4b6fabffe9");t.exports=n||!s(function(){if(!a||!(a<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r[e]}})},{"8edc7d10fd60cc1f":"jHRGA","199488e7120262f2":"7Z171","67c1b3060370d6f1":"cXVrS",a7f7bf4b6fabffe9:"1CWLZ"}],dLOib:[function(e,t,i){var n=e("79249a239f48e2d4"),r=e("b64da2842e228b05"),s=e("45e48b7437d67551").f;n({target:"Object",stat:!0,forced:Object.defineProperties!==s,sham:!r},{defineProperties:s})},{"79249a239f48e2d4":"gJg5v",b64da2842e228b05:"6mXK1","45e48b7437d67551":"ePigI"}],bVBB2:[function(e,t,i){var n=e("b118adf01477032"),r=e("a3127abbf747d8e2"),s=e("dec8f826adb685fc").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!r},{defineProperty:s})},{b118adf01477032:"gJg5v",a3127abbf747d8e2:"6mXK1",dec8f826adb685fc:"hvqCQ"}],"9laFo":[function(e,t,i){var n=e("9bd3ca02d43a34c6"),r=e("14adf2205f0de0f1"),s=e("25f3087f814cb2fd"),a=e("8f5516e8b83f7c81"),o=e("1864c5e0fe7b94e4"),h=e("fbfc447cbc7c8274");r&&n({target:"Object",proto:!0,forced:s},{__defineSetter__:function(e,t){h.f(o(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},{"9bd3ca02d43a34c6":"gJg5v","14adf2205f0de0f1":"6mXK1","25f3087f814cb2fd":"hh3RM","8f5516e8b83f7c81":"alrlv","1864c5e0fe7b94e4":"6oQEu",fbfc447cbc7c8274:"hvqCQ"}],"1E3wB":[function(e,t,i){var n=e("f61a79561ef771d5"),r=e("f45db476330e9273").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},{f61a79561ef771d5:"gJg5v",f45db476330e9273:"iwcqE"}],iwcqE:[function(e,t,i){var n=e("d3708b44f56d5dbe"),r=e("41285041ee215b4b"),s=e("fae894139558d631"),a=e("d1ebe3ffdc898f92"),o=e("8ca7d570e80b9ce7"),h=e("cd0bc0f155d9ce86"),c=s(e("8a6b90d3c1a4843d").f),l=s([].push),u=n&&r(function(){var e=Object.create(null);return e[2]=2,!c(e,2)}),d=function(e){return function(t){for(var i,r=h(t),s=o(r),d=u&&null===a(r),f=s.length,p=0,g=[];f>p;)i=s[p++],(!n||(d?i in r:c(r,i)))&&l(g,e?[i,r[i]]:r[i]);return g}};t.exports={entries:d(!0),values:d(!1)}},{d3708b44f56d5dbe:"6mXK1","41285041ee215b4b":"cXVrS",fae894139558d631:"2iJ57",d1ebe3ffdc898f92:"e8mfS","8ca7d570e80b9ce7":"kQgZQ",cd0bc0f155d9ce86:"h9ut0","8a6b90d3c1a4843d":"7Av2Z"}],cCotT:[function(e,t,i){var n=e("41df7dcb1db288e9"),r=e("fff8fcdf7f021ed"),s=e("349eb9a58219946d"),a=e("aba4dbd0c2e0df38"),o=e("83d388d2147293dd").onFreeze,h=Object.freeze;n({target:"Object",stat:!0,forced:s(function(){h(1)}),sham:!r},{freeze:function(e){return h&&a(e)?h(o(e)):e}})},{"41df7dcb1db288e9":"gJg5v",fff8fcdf7f021ed:"cPqlV","349eb9a58219946d":"cXVrS",aba4dbd0c2e0df38:"8mxCV","83d388d2147293dd":"3Q1Z8"}],htZZS:[function(e,t,i){var n=e("48c4d449b4b6a74e"),r=e("ee4e4a7ea4b35347"),s=e("34466cd01816d06a");n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,function(e,i){s(t,e,i)},{AS_ENTRIES:!0}),t}})},{"48c4d449b4b6a74e":"gJg5v",ee4e4a7ea4b35347:"dCEHX","34466cd01816d06a":"SVTZV"}],b3JIq:[function(e,t,i){var n=e("5e9e720f67356476"),r=e("c8df38aee3cb5769"),s=e("10375c86bad61030"),a=e("3b00a68c12a1896c").f,o=e("76539d9475dc0bf0");n({target:"Object",stat:!0,forced:!o||r(function(){a(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return a(s(e),t)}})},{"5e9e720f67356476":"gJg5v",c8df38aee3cb5769:"cXVrS","10375c86bad61030":"h9ut0","3b00a68c12a1896c":"aRu9T","76539d9475dc0bf0":"6mXK1"}],kPfIJ:[function(e,t,i){var n=e("40e7403e4fec8fc5"),r=e("4e8e0ded689e341a"),s=e("ca8e12f795281afd"),a=e("2a0629723aea50a6"),o=e("d8f1f7a76c234914"),h=e("d34666d556a98edd");n({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,i,n=a(e),r=o.f,c=s(n),l={},u=0;c.length>u;)void 0!==(i=r(n,t=c[u++]))&&h(l,t,i);return l}})},{"40e7403e4fec8fc5":"gJg5v","4e8e0ded689e341a":"6mXK1",ca8e12f795281afd:"k5rhT","2a0629723aea50a6":"h9ut0",d8f1f7a76c234914:"aRu9T",d34666d556a98edd:"SVTZV"}],"9ERxS":[function(e,t,i){var n=e("effeafa72fa4fcc2"),r=e("9f4f815a609d62de"),s=e("4a158a7faad2d27f").f;n({target:"Object",stat:!0,forced:r(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:s})},{effeafa72fa4fcc2:"gJg5v","9f4f815a609d62de":"cXVrS","4a158a7faad2d27f":"bBGHM"}],"6T09z":[function(e,t,i){var n=e("9b00c005c1d693fb"),r=e("ffe585e19c7a1096"),s=e("a7cc68351642ae12"),a=e("46d7a597f20859a8"),o=e("765be3ffdd1dfa5d");n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!o},{getPrototypeOf:function(e){return a(s(e))}})},{"9b00c005c1d693fb":"gJg5v",ffe585e19c7a1096:"cXVrS",a7cc68351642ae12:"6oQEu","46d7a597f20859a8":"e8mfS","765be3ffdd1dfa5d":"2SHZm"}],nZQfS:[function(e,t,i){var n=e("b06b32f47a30ec7f"),r=e("6a46da92f3f73121"),s=e("af1ec4f8b421ab5c"),a=e("2ef79b8f3bb016c7"),o=e("a668398ad3de0d7d"),h=e("70005dfdb718ef94"),c=e("972dd804937bc18f"),l=e("281c63cf55e8b57b"),u=Object.groupBy,d=r("Object","create"),f=s([].push);n({target:"Object",stat:!0,forced:!u||l(function(){return 1!==u("ab",function(e){return e}).a.length})},{groupBy:function(e,t){o(e),a(t);var i=d(null),n=0;return c(e,function(e){var r=h(t(e,n++));r in i?f(i[r],e):i[r]=[e]}),i}})},{b06b32f47a30ec7f:"gJg5v","6a46da92f3f73121":"e5ie6",af1ec4f8b421ab5c:"2iJ57","2ef79b8f3bb016c7":"alrlv",a668398ad3de0d7d:"cHxZN","70005dfdb718ef94":"gvuJs","972dd804937bc18f":"dCEHX","281c63cf55e8b57b":"cXVrS"}],"6GBQI":[function(e,t,i){e("98e893e3166a4362")({target:"Object",stat:!0},{hasOwn:e("12a9e94ed897fcaf")})},{"98e893e3166a4362":"gJg5v","12a9e94ed897fcaf":"9JWVX"}],g4f9X:[function(e,t,i){e("451600d6bdd8e576")({target:"Object",stat:!0},{is:e("56b2e52d42ffd002")})},{"451600d6bdd8e576":"gJg5v","56b2e52d42ffd002":"3Lhyq"}],"3Lhyq":[function(e,t,i){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],eNC2R:[function(e,t,i){var n=e("435e06d616210775"),r=e("cdaf74e91df56e60");n({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},{"435e06d616210775":"gJg5v",cdaf74e91df56e60:"kKQ3P"}],czmee:[function(e,t,i){var n=e("d0fbaa7eb6b5ad4d"),r=e("421049f6c11462a7"),s=e("9ed59196a9b50c30"),a=e("590e67d09aaa38f"),o=e("c1ee6c6b89bec975"),h=Object.isFrozen;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isFrozen:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{d0fbaa7eb6b5ad4d:"gJg5v","421049f6c11462a7":"cXVrS","9ed59196a9b50c30":"8mxCV","590e67d09aaa38f":"161sQ",c1ee6c6b89bec975:"fKJ3g"}],"96RAZ":[function(e,t,i){var n=e("e0d9427683afd111"),r=e("8b49b6806ae62eca"),s=e("97ad0f68c00a1ff0"),a=e("7f6c54dd5bc88c64"),o=e("c8a04ae167e7ad37"),h=Object.isSealed;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isSealed:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{e0d9427683afd111:"gJg5v","8b49b6806ae62eca":"cXVrS","97ad0f68c00a1ff0":"8mxCV","7f6c54dd5bc88c64":"161sQ",c8a04ae167e7ad37:"fKJ3g"}],"3SReg":[function(e,t,i){var n=e("928eae3c9269318e"),r=e("bffeb5a63b3d1ddc"),s=e("4e7619f3294f09c8");n({target:"Object",stat:!0,forced:e("16ceb2cf691ec6a8")(function(){s(1)})},{keys:function(e){return s(r(e))}})},{"928eae3c9269318e":"gJg5v",bffeb5a63b3d1ddc:"6oQEu","4e7619f3294f09c8":"kQgZQ","16ceb2cf691ec6a8":"cXVrS"}],dOXap:[function(e,t,i){var n=e("3213681dc3c35763"),r=e("4aa54b730f2d3e5b"),s=e("f722ba9b4a4e493a"),a=e("d9187b4f4abc84a2"),o=e("a283188d11fd1310"),h=e("81f1f2335bc409e6"),c=e("73cff62f53644df3").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupGetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.get;while(i=h(i))}})},{"3213681dc3c35763":"gJg5v","4aa54b730f2d3e5b":"6mXK1",f722ba9b4a4e493a:"hh3RM",d9187b4f4abc84a2:"6oQEu",a283188d11fd1310:"gvuJs","81f1f2335bc409e6":"e8mfS","73cff62f53644df3":"aRu9T"}],evHBo:[function(e,t,i){var n=e("cfcc7acaa30d169a"),r=e("95cf98e445e49077"),s=e("32af9c4b10e71d8a"),a=e("a3a2f8d0bb0d269a"),o=e("fc6f1b0f9f6a3207"),h=e("4f72764854999276"),c=e("940efcd169764424").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupSetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.set;while(i=h(i))}})},{cfcc7acaa30d169a:"gJg5v","95cf98e445e49077":"6mXK1","32af9c4b10e71d8a":"hh3RM",a3a2f8d0bb0d269a:"6oQEu",fc6f1b0f9f6a3207:"gvuJs","4f72764854999276":"e8mfS","940efcd169764424":"aRu9T"}],liWu9:[function(e,t,i){var n=e("dd30e23e7eea933c"),r=e("16f89a44f17d8f35"),s=e("4ddba3dd9dcca781").onFreeze,a=e("fa786d6ffa5b300e"),o=e("3a7088156a6b24b9"),h=Object.preventExtensions;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{preventExtensions:function(e){return h&&r(e)?h(s(e)):e}})},{dd30e23e7eea933c:"gJg5v","16f89a44f17d8f35":"8mxCV","4ddba3dd9dcca781":"3Q1Z8",fa786d6ffa5b300e:"cPqlV","3a7088156a6b24b9":"cXVrS"}],a2AOJ:[function(e,t,i){var n=e("12120dafa98cd91b"),r=e("8a5ee5120083625d"),s=e("dacee5d02a7d8660"),a=e("9f80f8e0960690f0"),o=e("f3ab8c15cd26e8b0"),h=e("cf1c31853a2dbd73"),c=Object.getPrototypeOf,l=Object.setPrototypeOf,u=Object.prototype,d="__proto__";if(n&&c&&l&&!(d in u))try{r(u,d,{configurable:!0,get:function(){return c(o(this))},set:function(e){var t=h(this);a(e)&&s(t)&&l(t,e)}})}catch(e){}},{"12120dafa98cd91b":"6mXK1","8a5ee5120083625d":"3NI4M",dacee5d02a7d8660:"8mxCV","9f80f8e0960690f0":"6XW5L",f3ab8c15cd26e8b0:"6oQEu",cf1c31853a2dbd73:"cHxZN"}],yqtQx:[function(e,t,i){var n=e("7431c9c36c061192"),r=e("254eb19750975bda"),s=e("2f01f54810b729a0").onFreeze,a=e("f352701af16ccb01"),o=e("c5798f0bf47c2f71"),h=Object.seal;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{seal:function(e){return h&&r(e)?h(s(e)):e}})},{"7431c9c36c061192":"gJg5v","254eb19750975bda":"8mxCV","2f01f54810b729a0":"3Q1Z8",f352701af16ccb01:"cPqlV",c5798f0bf47c2f71:"cXVrS"}],"4M7RG":[function(e,t,i){e("9b49024ba2cb31fd")({target:"Object",stat:!0},{setPrototypeOf:e("3492d4712278eb46")})},{"9b49024ba2cb31fd":"gJg5v","3492d4712278eb46":"arrdQ"}],"7ybM1":[function(e,t,i){var n=e("2f5378debd330ed5"),r=e("5e0718aecf12f1e8"),s=e("6b32f4accffdcba8");n||r(Object.prototype,"toString",s,{unsafe:!0})},{"2f5378debd330ed5":"9axlf","5e0718aecf12f1e8":"4CPdc","6b32f4accffdcba8":"a9Vf3"}],a9Vf3:[function(e,t,i){var n=e("312e54676af41375"),r=e("2dbce13c946fe9d0");t.exports=n?({}).toString:function(){return"[object "+r(this)+"]"}},{"312e54676af41375":"9axlf","2dbce13c946fe9d0":"cRCRk"}],csFkS:[function(e,t,i){var n=e("eb35dc894cb42ba5"),r=e("f1b9830bcb61759d").values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},{eb35dc894cb42ba5:"gJg5v",f1b9830bcb61759d:"iwcqE"}],"6V0HA":[function(e,t,i){var n=e("c1505c05c57d39cb"),r=e("fd7eb946ed597b55");n({global:!0,forced:parseFloat!==r},{parseFloat:r})},{c1505c05c57d39cb:"gJg5v",fd7eb946ed597b55:"guYqF"}],"26fdt":[function(e,t,i){var n=e("3ca2a8550b205bbe"),r=e("f57aad6998179c26");n({global:!0,forced:parseInt!==r},{parseInt:r})},{"3ca2a8550b205bbe":"gJg5v",f57aad6998179c26:"9rXua"}],"8nI8r":[function(e,t,i){e("71201fb984fca5e2"),e("944d2d67bf4aa279"),e("259dee16b78a9293"),e("bac68e84460cf44d"),e("35807fabff0322bf"),e("8713c69981abff7e")},{"71201fb984fca5e2":"dkJyI","944d2d67bf4aa279":"2zMO8","259dee16b78a9293":"bizKp",bac68e84460cf44d:"fDY5E","35807fabff0322bf":"2dUxj","8713c69981abff7e":"6tXif"}],dkJyI:[function(e,t,i){var n,r,s,a,o=e("cdd137752c5b4a8e"),h=e("27c8c7e1f0444fd2"),c=e("e9cf171cc5f9ff78"),l=e("d198a89966b49f7a"),u=e("643c25bd5b0dfc21"),d=e("76c41f8cfb7124b7"),f=e("6f7c1c1190868f98"),p=e("8b9ff6cd5f4bf470"),g=e("e2d999cd3139e29e"),m=e("37ba5f9496a9ce6f"),v=e("c754acf38f3fbf83"),y=e("f9d3438feb00503"),b=e("eea1cec1753c28d3"),x=e("2b3f8c9a01947fd4"),E=e("d7da4b96347ff949").set,w=e("5967e7e0ab765b55"),T=e("45c77ce65cdfa56e"),S=e("ed2bd3e4981b5b7f"),A=e("67a62e6e19993e50"),C=e("d047e80fbdc4abaf"),_=e("cb21f79465bb7a4f"),I=e("d92ec88829ba956d"),O=e("f518fe10c60b8bee"),P="Promise",M=I.CONSTRUCTOR,R=I.REJECTION_EVENT,L=I.SUBCLASSING,D=C.getterFor(P),k=C.set,N=_&&_.prototype,F=_,B=N,U=l.TypeError,V=l.document,G=l.process,j=O.f,W=j,Y=!!(V&&V.createEvent&&l.dispatchEvent),H="unhandledrejection",z=function(e){var t;return!!(y(e)&&v(t=e.then))&&t},X=function(e,t){var i,n,r,s=t.value,a=1===t.state,o=a?e.ok:e.fail,h=e.resolve,c=e.reject,l=e.domain;try{o?(a||(2===t.rejection&&Q(t),t.rejection=1),!0===o?i=s:(l&&l.enter(),i=o(s),l&&(l.exit(),r=!0)),i===e.promise?c(new U("Promise-chain cycle")):(n=z(i))?u(n,i,h,c):h(i)):c(s)}catch(e){l&&!r&&l.exit(),c(e)}},q=function(e,t){e.notified||(e.notified=!0,w(function(){for(var i,n=e.reactions;i=n.get();)X(i,e);e.notified=!1,t&&!e.rejection&&J(e)}))},K=function(e,t,i){var n,r;Y?((n=V.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:i},!R&&(r=l["on"+e])?r(n):e===H&&T("Unhandled promise rejection",i)},J=function(e){u(E,l,function(){var t,i=e.facade,n=e.value;if($(e)&&(t=S(function(){c?G.emit("unhandledRejection",n,i):K(H,i,n)}),e.rejection=c||$(e)?2:1,t.error))throw t.value})},$=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){u(E,l,function(){var t=e.facade;c?G.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)})},Z=function(e,t,i){return function(n){e(t,n,i)}},ee=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,q(e,!0))},et=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new U("Promise can't be resolved itself");var n=z(t);n?w(function(){var i={done:!1};try{u(n,t,Z(et,i,e),Z(ee,i,e))}catch(t){ee(i,t,e)}}):(e.value=t,e.state=1,q(e,!1))}catch(t){ee({done:!1},t,e)}}};if(M&&(B=(F=function(e){b(this,B),m(e),u(n,this);var t=D(this);try{e(Z(et,t),Z(ee,t))}catch(e){ee(t,e)}}).prototype,(n=function(e){k(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:null})}).prototype=d(B,"then",function(e,t){var i=D(this),n=j(x(this,F));return i.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=c?G.domain:void 0,0===i.state?i.reactions.add(n):w(function(){X(n,i)}),n.promise}),r=function(){var e=new n,t=D(e);this.promise=e,this.resolve=Z(et,t),this.reject=Z(ee,t)},O.f=j=function(e){return e===F||e===s?new r(e):W(e)},!h&&v(_)&&N!==Object.prototype)){a=N.then,L||d(N,"then",function(e,t){var i=this;return new F(function(e,t){u(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}f&&f(N,B)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:F}),p(F,P,!1,!0),g(P)},{cdd137752c5b4a8e:"gJg5v","27c8c7e1f0444fd2":"jHRGA",e9cf171cc5f9ff78:"hdoIk",d198a89966b49f7a:"7Z171","643c25bd5b0dfc21":"bOssl","76c41f8cfb7124b7":"4CPdc","6f7c1c1190868f98":"arrdQ","8b9ff6cd5f4bf470":"dkhk9",e2d999cd3139e29e:"c7jXZ","37ba5f9496a9ce6f":"alrlv",c754acf38f3fbf83:"h1Wnr",f9d3438feb00503:"8mxCV",eea1cec1753c28d3:"95yA1","2b3f8c9a01947fd4":"CaSkn",d7da4b96347ff949:"iEUCI","5967e7e0ab765b55":"fhIs0","45c77ce65cdfa56e":"8UxN2",ed2bd3e4981b5b7f:"7qEEW","67a62e6e19993e50":"74jUI",d047e80fbdc4abaf:"ixHS2",cb21f79465bb7a4f:"BGWp5",d92ec88829ba956d:"cAqqZ",f518fe10c60b8bee:"iq5DC"}],CaSkn:[function(e,t,i){var n=e("1dd3546388607f52"),r=e("1407b26f20411731"),s=e("e59a7a10597b8e96"),a=e("16c256a8cc3c03fd")("species");t.exports=function(e,t){var i,o=n(e).constructor;return void 0===o||s(i=n(o)[a])?t:r(i)}},{"1dd3546388607f52":"dPzbI","1407b26f20411731":"euAEP",e59a7a10597b8e96:"8AxCV","16c256a8cc3c03fd":"5CuF7"}],euAEP:[function(e,t,i){var n=e("f0753b26326019c1"),r=e("8e6a26f37529644e"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a constructor")}},{f0753b26326019c1:"eytEI","8e6a26f37529644e":"3zerS"}],iEUCI:[function(e,t,i){var n,r,s,a,o=e("629a4d99f4fe5b2e"),h=e("e574be68c288c7c8"),c=e("df212787338802d3"),l=e("afdf018c2d01bbc6"),u=e("35a3e849940fd612"),d=e("b8bf5434d2248ca7"),f=e("731f9370cc21fc3b"),p=e("ec358060964e4bde"),g=e("907adb6d219da7a3"),m=e("f398561ebd49a798"),v=e("8a8e342aaad83bb"),y=e("6eef8b4e43dd6731"),b=o.setImmediate,x=o.clearImmediate,E=o.process,w=o.Dispatch,T=o.Function,S=o.MessageChannel,A=o.String,C=0,_={},I="onreadystatechange";d(function(){n=o.location});var O=function(e){if(u(_,e)){var t=_[e];delete _[e],t()}},P=function(e){return function(){O(e)}},M=function(e){O(e.data)},R=function(e){o.postMessage(A(e),n.protocol+"//"+n.host)};b&&x||(b=function(e){m(arguments.length,1);var t=l(e)?e:T(e),i=p(arguments,1);return _[++C]=function(){h(t,void 0,i)},r(C),C},x=function(e){delete _[e]},y?r=function(e){E.nextTick(P(e))}:w&&w.now?r=function(e){w.now(P(e))}:S&&!v?(a=(s=new S).port2,s.port1.onmessage=M,r=c(a.postMessage,a)):o.addEventListener&&l(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(r=R,o.addEventListener("message",M,!1)):r=I in g("script")?function(e){f.appendChild(g("script"))[I]=function(){f.removeChild(this),O(e)}}:function(e){setTimeout(P(e),0)}),t.exports={set:b,clear:x}},{"629a4d99f4fe5b2e":"7Z171",e574be68c288c7c8:"2fjXG",df212787338802d3:"f1CxE",afdf018c2d01bbc6:"h1Wnr","35a3e849940fd612":"9JWVX",b8bf5434d2248ca7:"cXVrS","731f9370cc21fc3b":"23b1K",ec358060964e4bde:"eO8Ta","907adb6d219da7a3":"SppDD",f398561ebd49a798:"h3DcZ","8a8e342aaad83bb":"bUue9","6eef8b4e43dd6731":"hdoIk"}],h3DcZ:[function(e,t,i){var n=TypeError;t.exports=function(e,t){if(e1?a(arguments,1):[],i=o.f(this),n=c(function(){return s(h(e),void 0,t)});return(n.error?i.reject:i.resolve)(n.value),i.promise}})},{e891936b921586ce:"gJg5v",be55d0d9787f386c:"7Z171","53a5a11417313428":"2fjXG",b6f9059ddb81e98b:"eO8Ta","4e74861c17e890c3":"iq5DC","7900efa3cdb7a624":"alrlv","1fb2dc6087d1e9d5":"7qEEW"}],fDjj9:[function(e,t,i){var n=e("c539d5627c4a86aa"),r=e("f3ae7f423c78fd60");n({target:"Promise",stat:!0},{withResolvers:function(){var e=r.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},{c539d5627c4a86aa:"gJg5v",f3ae7f423c78fd60:"iq5DC"}],dejPc:[function(e,t,i){var n=e("1c621266486af366"),r=e("8dc2c7c905c7079"),s=e("65b541dabe35d529"),a=e("536113b176a05b60");n({target:"Reflect",stat:!0,forced:!e("e032bfdb61e2620b")(function(){Reflect.apply(function(){})})},{apply:function(e,t,i){return r(s(e),t,a(i))}})},{"1c621266486af366":"gJg5v","8dc2c7c905c7079":"2fjXG","65b541dabe35d529":"alrlv","536113b176a05b60":"dPzbI",e032bfdb61e2620b:"cXVrS"}],kL7gw:[function(e,t,i){var n=e("df593a7c66399ae2"),r=e("aa786cd255199284"),s=e("c585a7fc86970645"),a=e("d05ce57b271ff568"),o=e("488fff441ba5bfef"),h=e("688b651555d83b8f"),c=e("c7a921b7c24a97c"),l=e("2ff4acc7df7eb046"),u=e("2ad48193afce6a95"),d=r("Reflect","construct"),f=Object.prototype,p=[].push,g=u(function(){function e(){}return!(d(function(){},[],e) instanceof e)}),m=!u(function(){d(function(){})}),v=g||m;n({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){o(e),h(t);var i=arguments.length<3?e:o(arguments[2]);if(m&&!g)return d(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return s(p,n,t),new(s(a,e,n))}var r=i.prototype,u=l(c(r)?r:f),v=s(e,u,t);return c(v)?v:u}})},{df593a7c66399ae2:"gJg5v",aa786cd255199284:"e5ie6",c585a7fc86970645:"2fjXG",d05ce57b271ff568:"7PoYT","488fff441ba5bfef":"euAEP","688b651555d83b8f":"dPzbI",c7a921b7c24a97c:"8mxCV","2ff4acc7df7eb046":"7isQ3","2ad48193afce6a95":"cXVrS"}],lQsQz:[function(e,t,i){var n=e("dc2eaf4c122f82d4"),r=e("55416992b3cdb7ec"),s=e("c2c755875e2adbfa"),a=e("578d27629d28889e"),o=e("426724837dbcc1e9");n({target:"Reflect",stat:!0,forced:e("71d0ba7a21c21fc7")(function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})}),sham:!r},{defineProperty:function(e,t,i){s(e);var n=a(t);s(i);try{return o.f(e,n,i),!0}catch(e){return!1}}})},{dc2eaf4c122f82d4:"gJg5v","55416992b3cdb7ec":"6mXK1",c2c755875e2adbfa:"dPzbI","578d27629d28889e":"gvuJs","426724837dbcc1e9":"hvqCQ","71d0ba7a21c21fc7":"cXVrS"}],jy0xe:[function(e,t,i){var n=e("6dcb929d30bdbfde"),r=e("3dedf4d14121a863"),s=e("fbd53ec455a05b95").f;n({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var i=s(r(e),t);return(!i||!!i.configurable)&&delete e[t]}})},{"6dcb929d30bdbfde":"gJg5v","3dedf4d14121a863":"dPzbI",fbd53ec455a05b95:"aRu9T"}],N0A9g:[function(e,t,i){var n=e("36af64a139a04a9f"),r=e("2b0e8e0105e0ccfb"),s=e("c12275a56fb80891"),a=e("8afae34daed2ddfd"),o=e("a0fe3971b7cb6675"),h=e("64fb71955ccea62a"),c=e("42f515e0257c869d");n({target:"Reflect",stat:!0},{get:function e(t,i){var n,l,u=arguments.length<3?t:arguments[2];return a(t)===u?t[i]:(n=h.f(t,i))?o(n)?n.value:void 0===n.get?void 0:r(n.get,u):s(l=c(t))?e(l,i,u):void 0}})},{"36af64a139a04a9f":"gJg5v","2b0e8e0105e0ccfb":"bOssl",c12275a56fb80891:"8mxCV","8afae34daed2ddfd":"dPzbI",a0fe3971b7cb6675:"gi9DO","64fb71955ccea62a":"aRu9T","42f515e0257c869d":"e8mfS"}],gi9DO:[function(e,t,i){var n=e("50fb4bd8f6d0c370");t.exports=function(e){return void 0!==e&&(n(e,"value")||n(e,"writable"))}},{"50fb4bd8f6d0c370":"9JWVX"}],bnSd3:[function(e,t,i){var n=e("d7bd54e98aaffcc7"),r=e("7232f0c071c940d0"),s=e("10cdead7a28df296"),a=e("de341026ceb57ac3");n({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(s(e),t)}})},{d7bd54e98aaffcc7:"gJg5v","7232f0c071c940d0":"6mXK1","10cdead7a28df296":"dPzbI",de341026ceb57ac3:"aRu9T"}],hCLFJ:[function(e,t,i){var n=e("e0d7bd3b2cd5e427"),r=e("28c21999f76acbe2"),s=e("5d4e809754fe7c85");n({target:"Reflect",stat:!0,sham:!e("b7b6a27574b33ffc")},{getPrototypeOf:function(e){return s(r(e))}})},{e0d7bd3b2cd5e427:"gJg5v","28c21999f76acbe2":"dPzbI","5d4e809754fe7c85":"e8mfS",b7b6a27574b33ffc:"2SHZm"}],jFiZs:[function(e,t,i){e("f5a4987d6328de60")({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},{f5a4987d6328de60:"gJg5v"}],"1BYUa":[function(e,t,i){var n=e("f1cf95331dac0a5c"),r=e("6ffd352ee2b78315"),s=e("ec1223a1980707d0");n({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),s(e)}})},{f1cf95331dac0a5c:"gJg5v","6ffd352ee2b78315":"dPzbI",ec1223a1980707d0:"kKQ3P"}],"3gYE0":[function(e,t,i){e("e6256b53ff8e7ff7")({target:"Reflect",stat:!0},{ownKeys:e("62694a198a2d39f1")})},{e6256b53ff8e7ff7:"gJg5v","62694a198a2d39f1":"k5rhT"}],"8Ariw":[function(e,t,i){var n=e("21a794712b7c3b28"),r=e("b2540e28cfeb7421"),s=e("5c89b74916f5e3f1");n({target:"Reflect",stat:!0,sham:!e("368dee480fe6c03a")},{preventExtensions:function(e){s(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(e){return!1}}})},{"21a794712b7c3b28":"gJg5v",b2540e28cfeb7421:"e5ie6","5c89b74916f5e3f1":"dPzbI","368dee480fe6c03a":"cPqlV"}],fpMBl:[function(e,t,i){var n=e("ecfb0dd8a941692d"),r=e("ff301a827b8a1848"),s=e("2c02940a559ef1bc"),a=e("7a2e80973762c50c"),o=e("21efaf46e8fea96f"),h=e("8f78be83a230ea4a"),c=e("acf3c26369354b83"),l=e("4893e43c9a11fc63"),u=e("48482fa6862b803a"),d=e("de1987fde7f85915");n({target:"Reflect",stat:!0,forced:h(function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)})},{set:function e(t,i,n){var h,f,p,g=arguments.length<4?t:arguments[3],m=l.f(s(t),i);if(!m){if(a(f=u(t)))return e(f,i,n,g);m=d(0)}if(o(m)){if(!1===m.writable||!a(g))return!1;if(h=l.f(g,i)){if(h.get||h.set||!1===h.writable)return!1;h.value=n,c.f(g,i,h)}else c.f(g,i,d(0,n))}else{if(void 0===(p=m.set))return!1;r(p,g,n)}return!0}})},{ecfb0dd8a941692d:"gJg5v",ff301a827b8a1848:"bOssl","2c02940a559ef1bc":"dPzbI","7a2e80973762c50c":"8mxCV","21efaf46e8fea96f":"gi9DO","8f78be83a230ea4a":"cXVrS",acf3c26369354b83:"hvqCQ","4893e43c9a11fc63":"aRu9T","48482fa6862b803a":"e8mfS",de1987fde7f85915:"5toj2"}],"5tIGd":[function(e,t,i){var n=e("1901fc8accbc2376"),r=e("1c4ec63b43256656"),s=e("2fee865898c5ee13"),a=e("f549073ca7dfb3d2");a&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),s(t);try{return a(e,t),!0}catch(e){return!1}}})},{"1901fc8accbc2376":"gJg5v","1c4ec63b43256656":"dPzbI","2fee865898c5ee13":"hEWXk",f549073ca7dfb3d2:"arrdQ"}],"14MkC":[function(e,t,i){var n=e("9aa7ab2c6cbf6701"),r=e("28bf5c0ba6cfd67b"),s=e("717556d45c34d721");n({global:!0},{Reflect:{}}),s(r.Reflect,"Reflect",!0)},{"9aa7ab2c6cbf6701":"gJg5v","28bf5c0ba6cfd67b":"7Z171","717556d45c34d721":"dkhk9"}],"2JQK3":[function(e,t,i){var n=e("c8639d3a74e6bb07"),r=e("31e10ac977d93a17"),s=e("7f079a60fe35f235"),a=e("66b0d772c6e443af"),o=e("11d7cdfa8687037e"),h=e("5fcf789712ec006"),c=e("488fe57e39be2d0d"),l=e("8b1d3e9ebc10b376").f,u=e("6c4ec99bc7b85243"),d=e("28b4ed60c7ffe147"),f=e("f00c99d31179ed39"),p=e("867ea555b957a0aa"),g=e("86e9756a5a6a0176"),m=e("438bf11983e20900"),v=e("818c2b1aecf93017"),y=e("5b540f0dbf00266f"),b=e("5cfbf10059a84a33"),x=e("2ff319236881379d").enforce,E=e("7f2183994b17a7e8"),w=e("7edc7513ec6ac4d0"),T=e("fbaf905791cdbfe"),S=e("28f5087d79ccd92a"),A=w("match"),C=r.RegExp,_=C.prototype,I=r.SyntaxError,O=s(_.exec),P=s("".charAt),M=s("".replace),R=s("".indexOf),L=s("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,k=/a/g,N=/a/g,F=new C(k)!==k,B=g.MISSED_STICKY,U=g.UNSUPPORTED_Y,V=n&&(!F||B||T||S||y(function(){return N[A]=!1,C(k)!==k||C(N)===N||"/a/i"!==String(C(k,"i"))})),G=function(e){for(var t,i=e.length,n=0,r="",s=!1;n<=i;n++){if("\\"===(t=P(e,n))){r+=t+P(e,++n);continue}s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),r+=t):r+="[\\s\\S]"}return r},j=function(e){for(var t,i=e.length,n=0,r="",s=[],a=c(null),o=!1,h=!1,l=0,u="";n<=i;n++){if("\\"===(t=P(e,n)))t+=P(e,++n);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(r+=t,"?:"===L(e,n+1,n+3))continue;O(D,L(e,n+1))&&(n+=2,h=!0),l++;continue;case">"===t&&h:if(""===u||b(a,u))throw new I("Invalid capture group name");a[u]=!0,s[s.length]=[u,l],h=!1,u="";continue}h?u+=t:r+=t}return[r,s]};if(a("RegExp",V)){for(var W=function(e,t){var i,n,r,s,a,c,l=u(_,this),g=d(e),m=void 0===t,v=[],y=e;if(!l&&g&&m&&e.constructor===W)return e;if((g||u(_,e))&&(e=e.source,m&&(t=p(y))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),y=e,T&&"dotAll"in k&&(n=!!t&&R(t,"s")>-1)&&(t=M(t,/s/g,"")),i=t,B&&"sticky"in k&&(r=!!t&&R(t,"y")>-1)&&U&&(t=M(t,/y/g,"")),S&&(e=(s=j(e))[0],v=s[1]),a=o(C(e,t),l?this:_,W),(n||r||v.length)&&(c=x(a),n&&(c.dotAll=!0,c.raw=W(G(e),i)),r&&(c.sticky=!0),v.length&&(c.groups=v)),e!==y)try{h(a,"source",""===y?"(?:)":y)}catch(e){}return a},Y=l(C),H=0;Y.length>H;)m(W,C,Y[H++]);_.constructor=W,W.prototype=_,v(r,"RegExp",W,{constructor:!0})}E("RegExp")},{c8639d3a74e6bb07:"6mXK1","31e10ac977d93a17":"7Z171","7f079a60fe35f235":"2iJ57","66b0d772c6e443af":"gE5NQ","11d7cdfa8687037e":"30not","5fcf789712ec006":"gKM90","488fe57e39be2d0d":"7isQ3","8b1d3e9ebc10b376":"dDV3S","6c4ec99bc7b85243":"d5bNd","28b4ed60c7ffe147":"4WTYw",f00c99d31179ed39:"4x6uB","867ea555b957a0aa":"iG8db","86e9756a5a6a0176":"arHMc","438bf11983e20900":"7fWkz","818c2b1aecf93017":"4CPdc","5b540f0dbf00266f":"cXVrS","5cfbf10059a84a33":"9JWVX","2ff319236881379d":"ixHS2","7f2183994b17a7e8":"c7jXZ","7edc7513ec6ac4d0":"5CuF7",fbaf905791cdbfe:"9jBfE","28f5087d79ccd92a":"9XBEq"}],"4WTYw":[function(e,t,i){var n=e("4ca57df9821dbfa3"),r=e("b867bee476fc5018"),s=e("42cd33b6dbd61bee")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===r(e))}},{"4ca57df9821dbfa3":"8mxCV",b867bee476fc5018:"161sQ","42cd33b6dbd61bee":"5CuF7"}],iG8db:[function(e,t,i){var n=e("fd54476372f3a204"),r=e("a12d2126c329f45"),s=e("815509f48e0b1e36"),a=e("37fba4854c4ab846"),o=RegExp.prototype;t.exports=function(e){var t=e.flags;return!(void 0===t&&!("flags"in o)&&!r(e,"flags")&&s(o,e))?t:n(a,e)}},{fd54476372f3a204:"bOssl",a12d2126c329f45:"9JWVX","815509f48e0b1e36":"d5bNd","37fba4854c4ab846":"jjoUH"}],jjoUH:[function(e,t,i){var n=e("136abace0aec2b5c");t.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},{"136abace0aec2b5c":"dPzbI"}],arHMc:[function(e,t,i){var n=e("797bef35e651cb5e"),r=e("d87f6288614c07bc").RegExp,s=n(function(){var e=r("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=s||n(function(){return!r("a","y").sticky}),o=s||n(function(){var e=r("^r","gy");return e.lastIndex=2,null!==e.exec("str")});t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},{"797bef35e651cb5e":"cXVrS",d87f6288614c07bc:"7Z171"}],"9jBfE":[function(e,t,i){var n=e("e4784e58ea762065"),r=e("ea51a856230c58ac").RegExp;t.exports=n(function(){var e=r(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},{e4784e58ea762065:"cXVrS",ea51a856230c58ac:"7Z171"}],"9XBEq":[function(e,t,i){var n=e("b9b1a0fbdd999ded"),r=e("f47a97b0c4cfeafc").RegExp;t.exports=n(function(){var e=r("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},{b9b1a0fbdd999ded:"cXVrS",f47a97b0c4cfeafc:"7Z171"}],"9radj":[function(e,t,i){var n=e("a9f8f60f2f751fb4"),r=e("f4bf414038137d54"),s=e("f6019dcdb547562c"),a=e("ca788245c2356b08"),o=e("ff536bd90d3c7c05").get,h=RegExp.prototype,c=TypeError;n&&r&&a(h,"dotAll",{configurable:!0,get:function(){if(this!==h){if("RegExp"===s(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},{a9f8f60f2f751fb4:"6mXK1",f4bf414038137d54:"9jBfE",f6019dcdb547562c:"161sQ",ca788245c2356b08:"3NI4M",ff536bd90d3c7c05:"ixHS2"}],"4cips":[function(e,t,i){var n=e("72ba4de9841213e"),r=e("d4ebaff1663cc5b9");n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},{"72ba4de9841213e":"gJg5v",d4ebaff1663cc5b9:"gpoGl"}],gpoGl:[function(e,t,i){var n,r,s=e("698f504b4733b02d"),a=e("6d0d2df39383a10b"),o=e("382af5492ddc18e6"),h=e("96e0244464229d3"),c=e("3bd1d72d4987e0ff"),l=e("12c3e6e355312395"),u=e("38d060dff8e4ab54"),d=e("aec1e11e2cd92d19").get,f=e("7d9db6b4177b833a"),p=e("b26a8ca5152d0a8d"),g=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,v=m,y=a("".charAt),b=a("".indexOf),x=a("".replace),E=a("".slice),w=(r=/b*/g,s(m,n=/a/,"a"),s(m,r,"a"),0!==n.lastIndex||0!==r.lastIndex),T=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(w||S||T||f||p)&&(v=function(e){var t,i,n,r,a,c,l,f=d(this),p=o(e),A=f.raw;if(A)return A.lastIndex=this.lastIndex,t=s(v,A,p),this.lastIndex=A.lastIndex,t;var C=f.groups,_=T&&this.sticky,I=s(h,this),O=this.source,P=0,M=p;if(_&&(-1===b(I=x(I,"y",""),"g")&&(I+="g"),M=E(p,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==y(p,this.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,P++),i=RegExp("^(?:"+O+")",I)),S&&(i=RegExp("^"+O+"$(?!\\s)",I)),w&&(n=this.lastIndex),r=s(m,_?i:this,M),_?r?(r.input=E(r.input,P),r[0]=E(r[0],P),r.index=this.lastIndex,this.lastIndex+=r[0].length):this.lastIndex=0:w&&r&&(this.lastIndex=this.global?r.index+r[0].length:n),S&&r&&r.length>1&&s(g,r[0],i,function(){for(a=1;ai.size?h(i.getIterator(),function(e){u(t,e)&&l(r,e)}):o(t,function(e){i.includes(e)&&l(r,e)}),r}},{"7bfb130f16b8292a":"1uHXp","47146aea8f1cd561":"aKtSD",d1a604e694f4d1c9:"dDfau",cd0f29a36bce3c77:"2mzII","569d3010c2a051bc":"dSeD9",f15171665078c946:"hUCXP"}],ebh58:[function(e,t,i){var n=e("a1707a0c61f5a536"),r=e("cb8bc5c7a60da2c0");n({target:"Set",proto:!0,real:!0,forced:!e("d245d89a0dca71e2")("isDisjointFrom")},{isDisjointFrom:r})},{a1707a0c61f5a536:"gJg5v",cb8bc5c7a60da2c0:"fsPLP",d245d89a0dca71e2:"cAght"}],fsPLP:[function(e,t,i){var n=e("4bcf2c126f0ee7e9"),r=e("5f2538d74cbdf8b3").has,s=e("edcd27260fbf6ef5"),a=e("9b207c4104d5301c"),o=e("bae422673873a59e"),h=e("ba88aed3f0227034"),c=e("11af6bfd4840cc69");t.exports=function(e){var t=n(this),i=a(e);if(s(t)<=i.size)return!1!==o(t,function(e){if(i.includes(e))return!1},!0);var l=i.getIterator();return!1!==h(l,function(e){if(r(t,e))return c(l,"normal",!1)})}},{"4bcf2c126f0ee7e9":"1uHXp","5f2538d74cbdf8b3":"aKtSD",edcd27260fbf6ef5:"dDfau","9b207c4104d5301c":"2mzII",bae422673873a59e:"dSeD9",ba88aed3f0227034:"hUCXP","11af6bfd4840cc69":"58eij"}],"5aq0U":[function(e,t,i){var n=e("67c95d67210a1f28"),r=e("ad07e334c2be4c40");n({target:"Set",proto:!0,real:!0,forced:!e("87c6020e8c27ff9d")("isSubsetOf")},{isSubsetOf:r})},{"67c95d67210a1f28":"gJg5v",ad07e334c2be4c40:"6M8p1","87c6020e8c27ff9d":"cAght"}],"6M8p1":[function(e,t,i){var n=e("3d5a277c60f35ee0"),r=e("8b5056cb353b9363"),s=e("5c8afb92d90a7afe"),a=e("5d0efb34cef239d0");t.exports=function(e){var t=n(this),i=a(e);return!(r(t)>i.size)&&!1!==s(t,function(e){if(!i.includes(e))return!1},!0)}},{"3d5a277c60f35ee0":"1uHXp","8b5056cb353b9363":"dDfau","5c8afb92d90a7afe":"dSeD9","5d0efb34cef239d0":"2mzII"}],"8hV4V":[function(e,t,i){var n=e("709d88585366e67"),r=e("56957227e511c32f");n({target:"Set",proto:!0,real:!0,forced:!e("96eae72d49b9b957")("isSupersetOf")},{isSupersetOf:r})},{"709d88585366e67":"gJg5v","56957227e511c32f":"eyhzP","96eae72d49b9b957":"cAght"}],eyhzP:[function(e,t,i){var n=e("93254e314b2e5736"),r=e("be41c371321728ce").has,s=e("95f22a3e4ec3e3cd"),a=e("3cd91641e66e9eeb"),o=e("9565d7b14e850c29"),h=e("9f7dd30215d71bc9");t.exports=function(e){var t=n(this),i=a(e);if(s(t)=0?n:i+n;return r<0||r>=i?void 0:c(t,r)}})},{"473defaa8915e9e4":"gJg5v",dd4afa154631abab:"2iJ57",d699b04e9a9f7a28:"cHxZN",df1114985710f2b3:"gAgUH","3b247286b7d8c4d5":"4x6uB",da5b773a057f92aa:"cXVrS"}],g0fSy:[function(e,t,i){var n=e("4793fe8f86582840"),r=e("785f7a78d0dffe20").codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},{"4793fe8f86582840":"gJg5v","785f7a78d0dffe20":"fVu0j"}],fVu0j:[function(e,t,i){var n=e("8b9beff9818f042"),r=e("d3e375e7697978fb"),s=e("545a72c28133c459"),a=e("5bafa9e5b372669c"),o=n("".charAt),h=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,i){var n,l,u=s(a(t)),d=r(i),f=u.length;return d<0||d>=f?e?"":void 0:(n=h(u,d))<55296||n>56319||d+1===f||(l=h(u,d+1))<56320||l>57343?e?o(u,d):n:e?c(u,d,d+2):(n-55296<<10)+(l-56320)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},{"8b9beff9818f042":"2iJ57",d3e375e7697978fb:"gAgUH","545a72c28133c459":"4x6uB","5bafa9e5b372669c":"cHxZN"}],eKkbH:[function(e,t,i){var n,r=e("b3cd31deb9d32a8c"),s=e("c719ddda901eac13"),a=e("e75304a6599a5e3c").f,o=e("99883df659b0f5cb"),h=e("e5d8defa036db553"),c=e("4c78f4ce8264459e"),l=e("da4ce5f132e95194"),u=e("58da9c5323c25a0f"),d=e("e85ff4c5cebafc14"),f=s("".slice),p=Math.min,g=u("endsWith");r({target:"String",proto:!0,forced:!(!d&&!g&&(n=a(String.prototype,"endsWith"))&&!n.writable)&&!g},{endsWith:function(e){var t=h(l(this));c(e);var i=arguments.length>1?arguments[1]:void 0,n=t.length,r=void 0===i?n:p(o(i),n),s=h(e);return f(t,r-s.length,r)===s}})},{b3cd31deb9d32a8c:"gJg5v",c719ddda901eac13:"c4z5p",e75304a6599a5e3c:"aRu9T","99883df659b0f5cb":"lQsU7",e5d8defa036db553:"4x6uB","4c78f4ce8264459e":"6Sz3M",da4ce5f132e95194:"cHxZN","58da9c5323c25a0f":"i38lK",e85ff4c5cebafc14:"jHRGA"}],"6Sz3M":[function(e,t,i){var n=e("7b932b7711b6ae16"),r=TypeError;t.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},{"7b932b7711b6ae16":"4WTYw"}],i38lK:[function(e,t,i){var n=e("303b9f26f388462e")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},{"303b9f26f388462e":"5CuF7"}],dLJLG:[function(e,t,i){var n=e("f7ab90f668dfed5f"),r=e("f19d1a907413c68d"),s=e("6914a342ea61c319"),a=RangeError,o=String.fromCharCode,h=String.fromCodePoint,c=r([].join);n({target:"String",stat:!0,arity:1,forced:!!h&&1!==h.length},{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,r=0;n>r;){if(t=+arguments[r++],s(t,1114111)!==t)throw new a(t+" is not a valid code point");i[r]=t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320)}return c(i,"")}})},{f7ab90f668dfed5f:"gJg5v",f19d1a907413c68d:"2iJ57","6914a342ea61c319":"47gaI"}],cDQpr:[function(e,t,i){var n=e("1cde7a4fbe24deb1"),r=e("d9ff51b37cd276ef"),s=e("b1c9b74814a0e4ee"),a=e("36f262aff4650984"),o=e("c6f2de0a65cb2a09"),h=e("30dec888dfe829e2"),c=r("".indexOf);n({target:"String",proto:!0,forced:!h("includes")},{includes:function(e){return!!~c(o(a(this)),o(s(e)),arguments.length>1?arguments[1]:void 0)}})},{"1cde7a4fbe24deb1":"gJg5v",d9ff51b37cd276ef:"2iJ57",b1c9b74814a0e4ee:"6Sz3M","36f262aff4650984":"cHxZN",c6f2de0a65cb2a09:"4x6uB","30dec888dfe829e2":"i38lK"}],kFTda:[function(e,t,i){var n=e("119056f2894f6d80"),r=e("5d2e4bc1718ad78f"),s=e("9410272c8796c548"),a=e("8f81c73916cb66a4"),o=r("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var e=a(s(this)),t=e.length,i=0;i=56320||++i>=t||(64512&o(e,i))!=56320))return!1}return!0}})},{"119056f2894f6d80":"gJg5v","5d2e4bc1718ad78f":"2iJ57","9410272c8796c548":"cHxZN","8f81c73916cb66a4":"4x6uB"}],i2qFG:[function(e,t,i){var n=e("e8b36e9e8f60deb1").charAt,r=e("99724183e9ac759e"),s=e("75c45c226da41a58"),a=e("5bce8e62b9ff7984"),o=e("cab4a14c8e102263"),h="String Iterator",c=s.set,l=s.getterFor(h);a(String,"String",function(e){c(this,{type:h,string:r(e),index:0})},function(){var e,t=l(this),i=t.string,r=t.index;return r>=i.length?o(void 0,!0):(e=n(i,r),t.index+=e.length,o(e,!1))})},{e8b36e9e8f60deb1:"fVu0j","99724183e9ac759e":"4x6uB","75c45c226da41a58":"ixHS2","5bce8e62b9ff7984":"klSVb",cab4a14c8e102263:"dwU83"}],"6dNpA":[function(e,t,i){var n=e("1a72ba86dc4099cd"),r=e("3e8300c8dcd37861"),s=e("4e367ba2e602279b"),a=e("a9817085717103ac"),o=e("3ad5c9f9719d1735"),h=e("a1912f278569b4e6"),c=e("d83ac9e10edfa0ef"),l=e("4fa13f5559b9cbba"),u=e("357167b0f8a6ba45"),d=e("3b40f00a568e6a6b");r("match",function(e,t,i){return[function(t){var i=c(this),r=a(t)?void 0:l(t,e);return r?n(r,t,i):new RegExp(t)[e](h(i))},function(e){var n,r=s(this),a=h(e),c=i(t,r,a);if(c.done)return c.value;if(!r.global)return d(r,a);var l=r.unicode;r.lastIndex=0;for(var f=[],p=0;null!==(n=d(r,a));){var g=h(n[0]);f[p]=g,""===g&&(r.lastIndex=u(a,o(r.lastIndex),l)),p++}return 0===p?null:f}]})},{"1a72ba86dc4099cd":"bOssl","3e8300c8dcd37861":"a7eSP","4e367ba2e602279b":"dPzbI",a9817085717103ac:"8AxCV","3ad5c9f9719d1735":"lQsU7",a1912f278569b4e6:"4x6uB",d83ac9e10edfa0ef:"cHxZN","4fa13f5559b9cbba":"2qR8N","357167b0f8a6ba45":"jbkzM","3b40f00a568e6a6b":"gcJzM"}],a7eSP:[function(e,t,i){e("a7057ee05361671");var n=e("771b9a32e3d08596"),r=e("5a9ef6cc43262548"),s=e("b286e3fd8e91d745"),a=e("f56adef42dd3c42"),o=e("39c5bea895574e43"),h=e("1c6881441295e4f4"),c=o("species"),l=RegExp.prototype;t.exports=function(e,t,i,u){var d=o(e),f=!a(function(){var t={};return t[d]=function(){return 7},7!==""[e](t)}),p=f&&!a(function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[c]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return t=!0,null},i[d](""),!t});if(!f||!p||i){var g=/./[d],m=t(d,""[e],function(e,t,i,r,a){var o=t.exec;return o===s||o===l.exec?f&&!a?{done:!0,value:n(g,t,i,r)}:{done:!0,value:n(e,i,t,r)}:{done:!1}});r(String.prototype,e,m[0]),r(l,d,m[1])}u&&h(l[d],"sham",!0)}},{a7057ee05361671:"4cips","771b9a32e3d08596":"bOssl","5a9ef6cc43262548":"4CPdc",b286e3fd8e91d745:"gpoGl",f56adef42dd3c42:"cXVrS","39c5bea895574e43":"5CuF7","1c6881441295e4f4":"gKM90"}],jbkzM:[function(e,t,i){var n=e("7830b1b106fe9c2f").charAt;t.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},{"7830b1b106fe9c2f":"fVu0j"}],gcJzM:[function(e,t,i){var n=e("fe012fd0e62b041c"),r=e("953f0ef3a583db2e"),s=e("7b1bebb22aa6d09f"),a=e("41458309d054e6d9"),o=e("2da13aa8500d5870"),h=TypeError;t.exports=function(e,t){var i=e.exec;if(s(i)){var c=n(i,e,t);return null!==c&&r(c),c}if("RegExp"===a(e))return n(o,e,t);throw new h("RegExp#exec called on incompatible receiver")}},{fe012fd0e62b041c:"bOssl","953f0ef3a583db2e":"dPzbI","7b1bebb22aa6d09f":"h1Wnr","41458309d054e6d9":"161sQ","2da13aa8500d5870":"gpoGl"}],"5JfZw":[function(e,t,i){var n=e("ab7506693563188f"),r=e("bc392a1870cac46c"),s=e("518f2de578425815"),a=e("5413f14f6fa8d586"),o=e("b080d5b6d2874bb9"),h=e("500412608beb0fa4"),c=e("d27dba1be9ae2ec7"),l=e("304a5dfbef2eca6a"),u=e("c369a3c8053cdec1"),d=e("c7ae38c574bac52a"),f=e("f127fd901a8322fa"),p=e("3da774f1ac5cef39"),g=e("5e13bde3b69470d3"),m=e("d67b0fe73b3441f6"),v=e("c3d9a3b5ce1a0134"),y=e("f824fce70460b786"),b=e("fe46150a38a85a5d"),x=e("c158ae31b64e4ec2"),E=e("2eeb2389fe600209"),w=e("a803aed269f0019b"),T=e("e9503db7c8f89e91"),S=e("d919927dacd61c64"),A=b("matchAll"),C="RegExp String",_=C+" Iterator",I=T.set,O=T.getterFor(_),P=RegExp.prototype,M=TypeError,R=s("".indexOf),L=s("".matchAll),D=!!L&&!y(function(){L("a",/./)}),k=a(function(e,t,i,n){I(this,{type:_,regexp:e,string:t,global:i,unicode:n,done:!1})},C,function(){var e=O(this);if(e.done)return o(void 0,!0);var t=e.regexp,i=e.string,n=w(t,i);return null===n?(e.done=!0,o(void 0,!0)):(e.global?""===l(n[0])&&(t.lastIndex=E(i,c(t.lastIndex),e.unicode)):e.done=!0,o(n,!1))}),N=function(e){var t,i,n,r=u(this),s=l(e),a=x(r,RegExp),o=l(g(r));return t=new a(a===RegExp?r.source:r,o),i=!!~R(o,"g"),n=!!~R(o,"u"),t.lastIndex=c(r.lastIndex),new k(t,s,i,n)};n({target:"String",proto:!0,forced:D},{matchAll:function(e){var t,i,n,s=h(this);if(d(e)){if(D)return L(s,e)}else{if(p(e)&&!~R(l(h(g(e))),"g"))throw new M("`.matchAll` does not allow non-global regexes");if(D)return L(s,e);if(void 0===(i=m(e,A))&&S&&"RegExp"===f(e)&&(i=N),i)return r(i,e,s)}return t=l(s),n=RegExp(e,"g"),S?r(N,n,t):n[A](t)}}),S||A in P||v(P,A,N)},{ab7506693563188f:"gJg5v",bc392a1870cac46c:"bOssl","518f2de578425815":"c4z5p","5413f14f6fa8d586":"1Abii",b080d5b6d2874bb9:"dwU83","500412608beb0fa4":"cHxZN",d27dba1be9ae2ec7:"lQsU7","304a5dfbef2eca6a":"4x6uB",c369a3c8053cdec1:"dPzbI",c7ae38c574bac52a:"8AxCV",f127fd901a8322fa:"161sQ","3da774f1ac5cef39":"4WTYw","5e13bde3b69470d3":"iG8db",d67b0fe73b3441f6:"2qR8N",c3d9a3b5ce1a0134:"4CPdc",f824fce70460b786:"cXVrS",fe46150a38a85a5d:"5CuF7",c158ae31b64e4ec2:"CaSkn","2eeb2389fe600209":"jbkzM",a803aed269f0019b:"gcJzM",e9503db7c8f89e91:"ixHS2",d919927dacd61c64:"jHRGA"}],fU7MD:[function(e,t,i){var n=e("bde41783ec0f17a4"),r=e("794108b869e92a52").end;n({target:"String",proto:!0,forced:e("271b5f05be76b6dd")},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{bde41783ec0f17a4:"gJg5v","794108b869e92a52":"15Fl7","271b5f05be76b6dd":"38Jla"}],"38Jla":[function(e,t,i){var n=e("ea42f18a4a6e86a9");t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},{ea42f18a4a6e86a9:"5hj4U"}],iz82g:[function(e,t,i){var n=e("31f9b30345fd3179"),r=e("10950b9580001d1d").start;n({target:"String",proto:!0,forced:e("c86924140d1ee1af")},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"31f9b30345fd3179":"gJg5v","10950b9580001d1d":"15Fl7",c86924140d1ee1af:"38Jla"}],"5PH9s":[function(e,t,i){var n=e("d77bea9ed21ff4bc"),r=e("7ed823ef2298b758"),s=e("1210aa921fc34970"),a=e("4320a1855b3e38fb"),o=e("c2348ecf591fb82d"),h=e("4b1f320aa7c99da8"),c=r([].push),l=r([].join);n({target:"String",stat:!0},{raw:function(e){var t=s(a(e).raw),i=h(t);if(!i)return"";for(var n=arguments.length,r=[],u=0;;){if(c(r,o(t[u++])),u===i)return l(r,"");u=_&&(C+=A(o,_,D)+R,_=D+L.length)}return C+A(o,_)}]},!!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})||!C||_)},{f8fd16f994f85406:"2fjXG",b5234e1018cb2916:"bOssl",c3560c75b4ad1ef2:"2iJ57",c4a2369a79c5aaa2:"a7eSP",daa534dec0372986:"cXVrS","317f495e148be81e":"dPzbI","36464dd17d2a7224":"h1Wnr",cea091f017783d94:"8AxCV","3847a5ff118f8ebb":"gAgUH",effd88adfbb6b4bc:"lQsU7","953b724c90cd8db6":"4x6uB","154963922e7c9354":"cHxZN","90f011aa61b831b4":"jbkzM",af552ab4c89e35be:"2qR8N","3726cfd8dc51c82c":"gSNtK","6de55154ce28598":"gcJzM","4b6a0c7e75a1080a":"5CuF7"}],gSNtK:[function(e,t,i){var n=e("3cf51fea5d34c201"),r=e("999f669befd62c27"),s=Math.floor,a=n("".charAt),o=n("".replace),h=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,n,u,d){var f=i+e.length,p=n.length,g=l;return void 0!==u&&(u=r(u),g=c),o(d,g,function(r,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"`":return h(t,0,i);case"'":return h(t,f);case"<":c=u[h(o,1,-1)];break;default:var l=+o;if(0===l)return r;if(l>p){var d=s(l/10);if(0===d)return r;if(d<=p)return void 0===n[d-1]?a(o,1):n[d-1]+a(o,1);return r}c=n[l-1]}return void 0===c?"":c})}},{"3cf51fea5d34c201":"2iJ57","999f669befd62c27":"6oQEu"}],"2HEOd":[function(e,t,i){var n=e("69381acad0f1f180"),r=e("be2b5a787b4341ed"),s=e("70979a707458e2bc"),a=e("ede342a754b29b08"),o=e("7b33c58d7c6a633e"),h=e("bc393499bad934a6"),c=e("1f633e1cea7bfece"),l=e("5a07dc19106ad672"),u=e("40b88ab8d2a68602"),d=e("c009564a6e08e49f"),f=e("49118a84cede6c94"),p=e("d9c85063e2fa18d1"),g=e("179cb9efb80dcae1"),m=p("replace"),v=TypeError,y=s("".indexOf),b=s("".replace),x=s("".slice),E=Math.max;n({target:"String",proto:!0},{replaceAll:function(e,t){var i,n,s,p,w,T,S,A,C,_=a(this),I=0,O="";if(!h(e)){if((i=c(e))&&!~y(l(a(d(e))),"g"))throw new v("`.replaceAll` does not allow non-global regexes");if(n=u(e,m))return r(n,e,_,t);if(g&&i)return b(l(_),e,t)}for(s=l(_),p=l(e),(w=o(t))||(t=l(t)),S=E(1,T=p.length),A=y(s,p);-1!==A;)C=w?l(t(p,A,s)):f(p,s,A,[],void 0,t),O+=x(s,I,A)+C,I=A+T,A=A+S>s.length?-1:y(s,p,A+S);return I1||"".split(/.?/).length;s("split",function(e,t,i){var r="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n(t,this,e,i)}:t;return[function(t,i){var s=h(this),a=o(t)?void 0:f(t,e);return a?n(a,t,s,i):n(r,d(s),t,i)},function(e,n){var s=a(this),o=d(e);if(!w){var h=i(r,s,o,n,r!==t);if(h.done)return h.value}var f=c(s,RegExp),g=s.unicode,m=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(v?"g":"y"),E=new f(v?"^(?:"+s.source+")":s,m),T=void 0===n?4294967295:n>>>0;if(0===T)return[];if(0===o.length)return null===p(E,o)?[o]:[];for(var S=0,A=0,C=[];A1?arguments[1]:void 0,t.length)),n=h(e);return f(t,i,i+n.length)===n}})},{dde854d8a76d436d:"gJg5v","75ef62d12e51b46c":"c4z5p",ff3b80c156be6132:"aRu9T","573cc620487e2f6b":"lQsU7","3d6be1b7c00bafd":"4x6uB","40ed833d044b85cd":"6Sz3M","7b57b8afdd10d7e4":"cHxZN","80ffa3ecff44b920":"i38lK",d76fe9fb1319d805:"jHRGA"}],ilZVq:[function(e,t,i){var n=e("e3f052c25e9ce7a0"),r=e("79d87d02e012ddb6"),s=e("d9b0f8ef34c7f588"),a=e("7684d557cb0eafb9"),o=e("a0c96765c2fd3918"),h=r("".slice),c=Math.max,l=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var i,n,r=o(s(this)),u=r.length,d=a(e);return(d===1/0&&(d=0),d<0&&(d=c(u+d,0)),(i=void 0===t?u:a(t))<=0||i===1/0)?"":(n=l(d+i,u),d>=n?"":h(r,d,n))}})},{e3f052c25e9ce7a0:"gJg5v","79d87d02e012ddb6":"2iJ57",d9b0f8ef34c7f588:"cHxZN","7684d557cb0eafb9":"gAgUH",a0c96765c2fd3918:"4x6uB"}],hUcmJ:[function(e,t,i){var n=e("abdac43301199021"),r=e("46e4a85192f95918"),s=e("63c730f9593a416e"),a=e("2fb31922ea5ff27d"),o=e("6f82048edf356822"),h=e("2f2665d060e5f6a1"),c=Array,l=s("".charAt),u=s("".charCodeAt),d=s([].join),f="".toWellFormed,p=f&&h(function(){return"1"!==r(f,1)});n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var e=o(a(this));if(p)return r(f,e);for(var t=e.length,i=c(t),n=0;n=56320||n+1>=t||(64512&u(e,n+1))!=56320?i[n]="�":(i[n]=l(e,n),i[++n]=l(e,n))}return d(i,"")}})},{abdac43301199021:"gJg5v","46e4a85192f95918":"bOssl","63c730f9593a416e":"2iJ57","2fb31922ea5ff27d":"cHxZN","6f82048edf356822":"4x6uB","2f2665d060e5f6a1":"cXVrS"}],l2p2s:[function(e,t,i){var n=e("4a60febef79e9fd2"),r=e("aa85dc53780a7a31").trim;n({target:"String",proto:!0,forced:e("d62e07fb0a0f0c26")("trim")},{trim:function(){return r(this)}})},{"4a60febef79e9fd2":"gJg5v",aa85dc53780a7a31:"jX5uQ",d62e07fb0a0f0c26:"cZ2PC"}],cZ2PC:[function(e,t,i){var n=e("9e0c4c0dbddf03dd").PROPER,r=e("92328d780355dc79"),s=e("8c0d7fed4094a2b6"),a="​…᠎";t.exports=function(e){return r(function(){return!!s[e]()||a[e]()!==a||n&&s[e].name!==e})}},{"9e0c4c0dbddf03dd":"jmu0n","92328d780355dc79":"cXVrS","8c0d7fed4094a2b6":"heeAP"}],"3o3Gk":[function(e,t,i){e("251a593a444ed436");var n=e("91f4001402f2b9ee"),r=e("c6b02e29a67a6f26");n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},{"251a593a444ed436":"94n2Q","91f4001402f2b9ee":"gJg5v",c6b02e29a67a6f26:"eV55a"}],"94n2Q":[function(e,t,i){var n=e("de7842587ae70a42"),r=e("324b25d4226efe2d");n({target:"String",proto:!0,name:"trimEnd",forced:void 0!==r},{trimRight:r})},{de7842587ae70a42:"gJg5v","324b25d4226efe2d":"eV55a"}],eV55a:[function(e,t,i){var n=e("bc94349b4fc95bb3").end,r=e("71fc76130b4f9a6");t.exports=r("trimEnd")?function(){return n(this)}:"".trimEnd},{bc94349b4fc95bb3:"jX5uQ","71fc76130b4f9a6":"cZ2PC"}],"4Lt39":[function(e,t,i){e("654c60d6d97014cd");var n=e("26b6a882a1c5bba9"),r=e("b5f2740011c04718");n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},{"654c60d6d97014cd":"7XL4A","26b6a882a1c5bba9":"gJg5v",b5f2740011c04718:"lOELU"}],"7XL4A":[function(e,t,i){var n=e("2da1b55d02d90d4a"),r=e("8b6aefe7df6c88a");n({target:"String",proto:!0,name:"trimStart",forced:void 0!==r},{trimLeft:r})},{"2da1b55d02d90d4a":"gJg5v","8b6aefe7df6c88a":"lOELU"}],lOELU:[function(e,t,i){var n=e("a3878f82301e4d4").start,r=e("ee8e5c2b54df0ba4");t.exports=r("trimStart")?function(){return n(this)}:"".trimStart},{a3878f82301e4d4:"jX5uQ",ee8e5c2b54df0ba4:"cZ2PC"}],"3qZNd":[function(e,t,i){var n=e("e7d648b06f4dd9c6"),r=e("8b0114ba5e653efc");n({target:"String",proto:!0,forced:e("1caf9e0d6204ce0a")("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},{e7d648b06f4dd9c6:"gJg5v","8b0114ba5e653efc":"8K5FK","1caf9e0d6204ce0a":"ftpai"}],"8K5FK":[function(e,t,i){var n=e("427762aaf6075552"),r=e("3a91b63413ffe383"),s=e("515bd1582fb5b4c0"),a=/"/g,o=n("".replace);t.exports=function(e,t,i,n){var h=s(r(e)),c="<"+t;return""!==i&&(c+=" "+i+'="'+o(s(n),a,""")+'"'),c+">"+h+""}},{"427762aaf6075552":"2iJ57","3a91b63413ffe383":"cHxZN","515bd1582fb5b4c0":"4x6uB"}],ftpai:[function(e,t,i){var n=e("b7fe2964c39bac");t.exports=function(e){return n(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},{b7fe2964c39bac:"cXVrS"}],"20tl2":[function(e,t,i){var n=e("c559cd7b113e236e"),r=e("5a30563bc26230a8");n({target:"String",proto:!0,forced:e("eec66acdfc1a2a7d")("big")},{big:function(){return r(this,"big","","")}})},{c559cd7b113e236e:"gJg5v","5a30563bc26230a8":"8K5FK",eec66acdfc1a2a7d:"ftpai"}],ahutJ:[function(e,t,i){var n=e("676512d3c55a414"),r=e("7e21be1f712bc51d");n({target:"String",proto:!0,forced:e("46de4ecf79c13e")("blink")},{blink:function(){return r(this,"blink","","")}})},{"676512d3c55a414":"gJg5v","7e21be1f712bc51d":"8K5FK","46de4ecf79c13e":"ftpai"}],f2UI4:[function(e,t,i){var n=e("48f4b5d0c5a6a4fb"),r=e("e17c07d10b887dd3");n({target:"String",proto:!0,forced:e("5287465832c168a5")("bold")},{bold:function(){return r(this,"b","","")}})},{"48f4b5d0c5a6a4fb":"gJg5v",e17c07d10b887dd3:"8K5FK","5287465832c168a5":"ftpai"}],"4XIfF":[function(e,t,i){var n=e("6490db7677e8f73e"),r=e("e6e19e0e56c49b86");n({target:"String",proto:!0,forced:e("bb7b77345df5335f")("fixed")},{fixed:function(){return r(this,"tt","","")}})},{"6490db7677e8f73e":"gJg5v",e6e19e0e56c49b86:"8K5FK",bb7b77345df5335f:"ftpai"}],l1rs2:[function(e,t,i){var n=e("138910cd530370a2"),r=e("d72a479e3b3815bd");n({target:"String",proto:!0,forced:e("5690c1466282cf0f")("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},{"138910cd530370a2":"gJg5v",d72a479e3b3815bd:"8K5FK","5690c1466282cf0f":"ftpai"}],adYvn:[function(e,t,i){var n=e("f502df9771a160ae"),r=e("ee2ef8461dec89b6");n({target:"String",proto:!0,forced:e("2a2e9c2933145580")("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},{f502df9771a160ae:"gJg5v",ee2ef8461dec89b6:"8K5FK","2a2e9c2933145580":"ftpai"}],gidCX:[function(e,t,i){var n=e("24cfbc86c4210c6b"),r=e("e302ce8a79ba595b");n({target:"String",proto:!0,forced:e("3ecf3c8b0c95d02f")("italics")},{italics:function(){return r(this,"i","","")}})},{"24cfbc86c4210c6b":"gJg5v",e302ce8a79ba595b:"8K5FK","3ecf3c8b0c95d02f":"ftpai"}],bv1yh:[function(e,t,i){var n=e("bab8a92d9901152a"),r=e("252613bc1bb91720");n({target:"String",proto:!0,forced:e("3fb7b9ac770c40c")("link")},{link:function(e){return r(this,"a","href",e)}})},{bab8a92d9901152a:"gJg5v","252613bc1bb91720":"8K5FK","3fb7b9ac770c40c":"ftpai"}],kO1Zg:[function(e,t,i){var n=e("d3ac4973e86c28f9"),r=e("8bd5ccba40c1dac2");n({target:"String",proto:!0,forced:e("8a5bdd05bf3f9b34")("small")},{small:function(){return r(this,"small","","")}})},{d3ac4973e86c28f9:"gJg5v","8bd5ccba40c1dac2":"8K5FK","8a5bdd05bf3f9b34":"ftpai"}],bgZU7:[function(e,t,i){var n=e("4d6202cdf03d0d61"),r=e("ec6f6be679741e37");n({target:"String",proto:!0,forced:e("1920bc41bac741db")("strike")},{strike:function(){return r(this,"strike","","")}})},{"4d6202cdf03d0d61":"gJg5v",ec6f6be679741e37:"8K5FK","1920bc41bac741db":"ftpai"}],jgQND:[function(e,t,i){var n=e("5ac641dbd7ba3f29"),r=e("ef70fadb3bd40f3e");n({target:"String",proto:!0,forced:e("2b14944b2c33ed44")("sub")},{sub:function(){return r(this,"sub","","")}})},{"5ac641dbd7ba3f29":"gJg5v",ef70fadb3bd40f3e:"8K5FK","2b14944b2c33ed44":"ftpai"}],hB11V:[function(e,t,i){var n=e("783c2c194676a06b"),r=e("bca2bfdd086dcdc1");n({target:"String",proto:!0,forced:e("36843058161d815a")("sup")},{sup:function(){return r(this,"sup","","")}})},{"783c2c194676a06b":"gJg5v",bca2bfdd086dcdc1:"8K5FK","36843058161d815a":"ftpai"}],"31EdS":[function(e,t,i){e("6371023cd6dad94a")("Float32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"6371023cd6dad94a":"8VOru"}],"8VOru":[function(e,t,i){var n=e("c9bb9be26763d5d6"),r=e("f3461bcb45a0da3b"),s=e("513171f829dcf492"),a=e("9195003f05246e2"),o=e("5c32747745583fde"),h=e("f129cadcdd085794"),c=e("14a230ba5c5e071a"),l=e("848002acbadbae2c"),u=e("c540a4ec697b43da"),d=e("8248ffc9c9f95531"),f=e("aa784a976357a5bd"),p=e("da59162d19efb47d"),g=e("30e058c823038e07"),m=e("c43d9ac9910fd1d"),v=e("ac65ec03272627eb"),y=e("9477a245724234e7"),b=e("9d37aa52098c7b96"),x=e("361c9958906a5ff0"),E=e("4f80387d0e9c94a2"),w=e("d414fa9976906f9c"),T=e("97d75eb5fba6dc4c"),S=e("c3126acc51f6b7f5"),A=e("402069064923c62e"),C=e("442bd1b967e53ad0").f,_=e("e60d2aff236b9889"),I=e("5464ebf657a71f52").forEach,O=e("e76408bbdddedcb"),P=e("a6c477e34b27b3ce"),M=e("3b65fa2a837fee2b"),R=e("2db4073983cef2bc"),L=e("76805b4ea64de991"),D=e("7ab72b6c1b29c546"),k=e("1d46546a1b5897a9"),N=D.get,F=D.set,B=D.enforce,U=M.f,V=R.f,G=r.RangeError,j=c.ArrayBuffer,W=j.prototype,Y=c.DataView,H=h.NATIVE_ARRAY_BUFFER_VIEWS,z=h.TYPED_ARRAY_TAG,X=h.TypedArray,q=h.TypedArrayPrototype,K=h.isTypedArray,J="BYTES_PER_ELEMENT",$="Wrong length",Q=function(e,t){P(e,t,{configurable:!0,get:function(){return N(this)[t]}})},Z=function(e){var t;return S(W,e)||"ArrayBuffer"===(t=x(e))||"SharedArrayBuffer"===t},ee=function(e,t){return K(e)&&!w(t)&&t in e&&f(+t)&&t>=0},et=function(e,t){return ee(e,t=y(t))?u(2,e[t]):V(e,t)},ei=function(e,t,i){return ee(e,t=y(t))&&E(i)&&b(i,"value")&&!b(i,"get")&&!b(i,"set")&&!i.configurable&&(!b(i,"writable")||i.writable)&&(!b(i,"enumerable")||i.enumerable)?(e[t]=i.value,e):U(e,t,i)};a?(H||(R.f=et,M.f=ei,Q(q,"buffer"),Q(q,"byteOffset"),Q(q,"byteLength"),Q(q,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:et,defineProperty:ei}),t.exports=function(e,t,i){var a=e.match(/\d+/)[0]/8,h=e+(i?"Clamped":"")+"Array",c="get"+e,u="set"+e,f=r[h],y=f,b=y&&y.prototype,x={},w=function(e,t){var i=N(e);return i.view[c](t*a+i.byteOffset,!0)},S=function(e,t,n){var r=N(e);r.view[u](t*a+r.byteOffset,i?v(n):n,!0)},P=function(e,t){U(e,t,{get:function(){return w(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};H?o&&(y=t(function(e,t,i,n){return l(e,b),k(E(t)?Z(t)?void 0!==n?new f(t,m(i,a),n):void 0!==i?new f(t,m(i,a)):new f(t):K(t)?L(y,t):s(_,y,t):new f(g(t)),e,y)}),A&&A(y,X),I(C(f),function(e){e in y||d(y,e,f[e])}),y.prototype=b):(y=t(function(e,t,i,n){l(e,b);var r,o,h,c=0,u=0;if(E(t)){if(Z(t)){r=t,u=m(i,a);var d=t.byteLength;if(void 0===n){if(d%a||(o=d-u)<0)throw new G($)}else if((o=p(n)*a)+u>d)throw new G($);h=o/a}else if(K(t))return L(y,t);else return s(_,y,t)}else r=new j(o=(h=g(t))*a);for(F(e,{buffer:r,byteOffset:u,byteLength:o,length:h,view:new Y(r)});c255?255:255&t}},{}],"2HI7b":[function(e,t,i){var n=e("2b6f4dcfa87227c8"),r=e("a99e72870b261c00"),s=e("6fedb000997de8c9"),a=e("5d2230babf0781b0"),o=e("224522d7906614b9"),h=e("fa7f27b53f48b0c9"),c=e("244fea79be1425e4"),l=e("c86f6f22440f76d6"),u=e("a9c73ae28faf529e"),d=e("1213d44fe73ec45d").aTypedArrayConstructor,f=e("17f40af3180f13f6");t.exports=function(e){var t,i,p,g,m,v,y,b,x=s(this),E=a(e),w=arguments.length,T=w>1?arguments[1]:void 0,S=void 0!==T,A=c(E);if(A&&!l(A))for(b=(y=h(E,A)).next,E=[];!(v=r(b,y)).done;)E.push(v.value);for(S&&w>2&&(T=n(T,arguments[2])),i=o(E),g=u(p=new(d(x))(i)),t=0;i>t;t++)m=S?T(E[t],t):E[t],p[t]=g?f(m):+m;return p}},{"2b6f4dcfa87227c8":"f1CxE",a99e72870b261c00:"bOssl","6fedb000997de8c9":"euAEP","5d2230babf0781b0":"6oQEu","224522d7906614b9":"kHSes",fa7f27b53f48b0c9:"kBMjp","244fea79be1425e4":"3624P",c86f6f22440f76d6:"88nHe",a9c73ae28faf529e:"7TPqP","1213d44fe73ec45d":"b6692","17f40af3180f13f6":"hYKQy"}],"7TPqP":[function(e,t,i){var n=e("4eaea61d57855c23");t.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},{"4eaea61d57855c23":"cRCRk"}],hYKQy:[function(e,t,i){var n=e("e84ff6c898741836"),r=TypeError;t.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},{e84ff6c898741836:"cCley"}],"5PjpG":[function(e,t,i){e("5afb75924dde7be2")("Float64",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"5afb75924dde7be2":"8VOru"}],fxnuD:[function(e,t,i){e("f65338540449e43b")("Int8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{f65338540449e43b:"8VOru"}],"6jDOT":[function(e,t,i){e("618af5c93cf1cc05")("Int16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"618af5c93cf1cc05":"8VOru"}],gG1e8:[function(e,t,i){e("c7ce36d83e80a30f")("Int32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{c7ce36d83e80a30f:"8VOru"}],"17kvf":[function(e,t,i){e("1fba800ad35b335f")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"1fba800ad35b335f":"8VOru"}],"9B0y9":[function(e,t,i){e("2cd7a1d58fa59b7d")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}},!0)},{"2cd7a1d58fa59b7d":"8VOru"}],"3kbwg":[function(e,t,i){e("ca953ee05f39cdaa")("Uint16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{ca953ee05f39cdaa:"8VOru"}],"5wzd5":[function(e,t,i){e("682a05de60a0a1e1")("Uint32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"682a05de60a0a1e1":"8VOru"}],"1dCBn":[function(e,t,i){var n=e("bad3bf9fd10c3d3e"),r=e("f3046f328b82c495"),s=e("6efc916402e96e15"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",function(e){var t=a(this),i=r(t),n=s(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]})},{bad3bf9fd10c3d3e:"b6692",f3046f328b82c495:"kHSes","6efc916402e96e15":"gAgUH"}],"2Mqsz":[function(e,t,i){var n=e("9998fdf0f56ef0da"),r=e("3136ffe0165b4705"),s=n(e("45547c073d8e02f")),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",function(e,t){return s(a(this),e,t,arguments.length>2?arguments[2]:void 0)})},{"9998fdf0f56ef0da":"2iJ57","3136ffe0165b4705":"b6692","45547c073d8e02f":"toMXb"}],eZZyP:[function(e,t,i){var n=e("cb5a1a9d977d55c8"),r=e("9bc5b51fcf1b899f").every,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{cb5a1a9d977d55c8:"b6692","9bc5b51fcf1b899f":"daQdc"}],go8ZW:[function(e,t,i){var n=e("24d20a7fba3c1708"),r=e("3a12c8f811e83e62"),s=e("bec3653efa2d8600"),a=e("ff46ad00880fddaa"),o=e("5e0ee530611ef38d"),h=e("800a47a98b497e55"),c=e("faaaddc6a409cf90"),l=n.aTypedArray,u=n.exportTypedArrayMethod,d=h("".slice);u("fill",function(e){var t=arguments.length;return l(this),o(r,this,"Big"===d(a(this),0,3)?s(e):+e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},c(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}))},{"24d20a7fba3c1708":"b6692","3a12c8f811e83e62":"9XPgi",bec3653efa2d8600:"hYKQy",ff46ad00880fddaa:"cRCRk","5e0ee530611ef38d":"bOssl","800a47a98b497e55":"2iJ57",faaaddc6a409cf90:"cXVrS"}],iCErC:[function(e,t,i){var n=e("6846524790b14a7c"),r=e("69eb0f28238e9173").filter,s=e("d404a3c06ca3bb3e"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return s(this,t)})},{"6846524790b14a7c":"b6692","69eb0f28238e9173":"daQdc",d404a3c06ca3bb3e:"1lBSP"}],"1lBSP":[function(e,t,i){var n=e("b597c909ed514557"),r=e("671cb65500632ecc").getTypedArrayConstructor;t.exports=function(e,t){return n(r(e),t)}},{b597c909ed514557:"5QV4b","671cb65500632ecc":"b6692"}],e8hfX:[function(e,t,i){var n=e("2ee42d54019723d0"),r=e("f74f952feb3fa9ac").find,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"2ee42d54019723d0":"b6692",f74f952feb3fa9ac:"daQdc"}],"2kMmr":[function(e,t,i){var n=e("8a1e1a9ff0bdb479"),r=e("faaa2d0f518f9401").findIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"8a1e1a9ff0bdb479":"b6692",faaa2d0f518f9401:"daQdc"}],"212MV":[function(e,t,i){var n=e("1d1b09a81097f4c9"),r=e("e815e97cf844ecb").findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"1d1b09a81097f4c9":"b6692",e815e97cf844ecb:"cyWXz"}],"9AC43":[function(e,t,i){var n=e("de1e827bc87ccb28"),r=e("1d3fb19f3f3cea6a").findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{de1e827bc87ccb28:"b6692","1d3fb19f3f3cea6a":"cyWXz"}],aqoug:[function(e,t,i){var n=e("905afd384f4e3de6"),r=e("d55109422f6a63d3").forEach,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",function(e){r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"905afd384f4e3de6":"b6692",d55109422f6a63d3:"daQdc"}],iuJoY:[function(e,t,i){var n=e("e24f9b87534e32a3");(0,e("9358eeabcbb18f49").exportTypedArrayStaticMethod)("from",e("49819eabcb3ccea1"),n)},{e24f9b87534e32a3:"5UnGw","9358eeabcbb18f49":"b6692","49819eabcb3ccea1":"2HI7b"}],czX8g:[function(e,t,i){var n=e("7cf07194bf630e10"),r=e("6783fff4c8e274ff").includes,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"7cf07194bf630e10":"b6692","6783fff4c8e274ff":"7HT32"}],"9XxKn":[function(e,t,i){var n=e("19c9cea2a3392f92"),r=e("728bfde1b6b9fa8c").indexOf,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"19c9cea2a3392f92":"b6692","728bfde1b6b9fa8c":"7HT32"}],"7aRDd":[function(e,t,i){var n=e("3da36adbfe4f1c5e"),r=e("87513a57210d794"),s=e("ab6b74db00db51f7"),a=e("21e9ae10aded4ff7"),o=e("fe81c4288afbe8ee"),h=e("ddb435c2e5bdfda1")("iterator"),c=n.Uint8Array,l=s(o.values),u=s(o.keys),d=s(o.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=c&&c.prototype,m=!r(function(){g[h].call([1])}),v=!!g&&g.values&&g[h]===g.values&&"values"===g.values.name,y=function(){return l(f(this))};p("entries",function(){return d(f(this))},m),p("keys",function(){return u(f(this))},m),p("values",y,m||!v,{name:"values"}),p(h,y,m||!v,{name:"values"})},{"3da36adbfe4f1c5e":"7Z171","87513a57210d794":"cXVrS",ab6b74db00db51f7:"2iJ57","21e9ae10aded4ff7":"b6692",fe81c4288afbe8ee:"3prNk",ddb435c2e5bdfda1:"5CuF7"}],k5Rlo:[function(e,t,i){var n=e("4a1cb40dad4dd1ac"),r=e("68cfb4a8ab57e7b8"),s=n.aTypedArray,a=n.exportTypedArrayMethod,o=r([].join);a("join",function(e){return o(s(this),e)})},{"4a1cb40dad4dd1ac":"b6692","68cfb4a8ab57e7b8":"2iJ57"}],f3FBF:[function(e,t,i){var n=e("83d52c5c09010d50"),r=e("a5b16a6fc92268b4"),s=e("9b20398976dd53df"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return r(s,a(this),t>1?[e,arguments[1]]:[e])})},{"83d52c5c09010d50":"b6692",a5b16a6fc92268b4:"2fjXG","9b20398976dd53df":"cfsWk"}],"4ZhIs":[function(e,t,i){var n=e("47e7bb602930e61a"),r=e("8e0cd2bb3fe997bb").map,s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(a(e))(t)})})},{"47e7bb602930e61a":"b6692","8e0cd2bb3fe997bb":"daQdc"}],"9uG4h":[function(e,t,i){var n=e("8205d0df207de27c"),r=e("ff4c68a63e37d828"),s=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",function(){for(var e=0,t=arguments.length,i=new(s(this))(t);t>e;)i[e]=arguments[e++];return i},r)},{"8205d0df207de27c":"b6692",ff4c68a63e37d828:"5UnGw"}],ccgrY:[function(e,t,i){var n=e("44c8794ad6be555f"),r=e("1163c739252ce603").left,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{"44c8794ad6be555f":"b6692","1163c739252ce603":"dEdT1"}],dESGS:[function(e,t,i){var n=e("b70766ffaffbfa51"),r=e("5f58f990e3d5d551").right,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{b70766ffaffbfa51:"b6692","5f58f990e3d5d551":"dEdT1"}],"7G7OX":[function(e,t,i){var n=e("2692a9613069388b"),r=n.aTypedArray,s=n.exportTypedArrayMethod,a=Math.floor;s("reverse",function(){for(var e,t=r(this).length,i=a(t/2),n=0;n1?arguments[1]:void 0,1),i=h(e);if(m)return r(f,this,i,t);var n=this.length,s=a(i),c=0;if(s+t>n)throw new l("Wrong length");for(;cr;)c[r]=i[r++];return c},r(function(){new Int8Array(1).slice()}))},{d8cf74b619b99d16:"b6692",cde6d683247bdb44:"cXVrS",a6442c63e141a126:"eO8Ta"}],"8qlqb":[function(e,t,i){var n=e("78c3191738d81c4d"),r=e("b1ba67becb59f503").some,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"78c3191738d81c4d":"b6692",b1ba67becb59f503:"daQdc"}],lGQwY:[function(e,t,i){var n=e("1319b11c96d7a212"),r=e("443f315e07e91c29"),s=e("8dc6cee8a97e45cb"),a=e("d6c4034c4939c7d5"),o=e("f3e3e1c809574ce3"),h=e("cab25e21cd947849"),c=e("c53adf7878431ec6"),l=e("90728397db1428a3"),u=e("c20e84b46e983c4f"),d=e("8b919df81d7fcf47"),f=h.aTypedArray,p=h.exportTypedArrayMethod,g=n.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(s(function(){m(new g(2),null)})&&s(function(){m(new g(2),{})})),y=!!m&&!s(function(){if(u)return u<74;if(c)return c<67;if(l)return!0;if(d)return d<602;var e,t,i=new g(516),n=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(m(i,function(e,t){return(e/4|0)-(t/4|0)}),e=0;e<516;e++)if(i[e]!==n[e])return!0});p("sort",function(e){return(void 0!==e&&a(e),y)?m(this,e):o(f(this),function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i})},!y||v)},{"1319b11c96d7a212":"7Z171","443f315e07e91c29":"c4z5p","8dc6cee8a97e45cb":"cXVrS",d6c4034c4939c7d5:"alrlv",f3e3e1c809574ce3:"5Mqp3",cab25e21cd947849:"b6692",c53adf7878431ec6:"inWxb","90728397db1428a3":"5I4FT",c20e84b46e983c4f:"co76c","8b919df81d7fcf47":"1CWLZ"}],"5EgJz":[function(e,t,i){var n=e("d3219a9d813dfae3"),r=e("815a66ab54718368"),s=e("576f4ad682879893"),a=n.aTypedArray,o=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",function(e,t){var i=a(this),n=i.length,h=s(e,n);return new(o(i))(i.buffer,i.byteOffset+h*i.BYTES_PER_ELEMENT,r((void 0===t?n:s(t,n))-h))})},{d3219a9d813dfae3:"b6692","815a66ab54718368":"lQsU7","576f4ad682879893":"47gaI"}],hUSBX:[function(e,t,i){var n=e("d23c9dad2cb3d012"),r=e("961a14c04c94ca8e"),s=e("aa830556bb66a52b"),a=e("1477df799d469d0c"),o=e("6bdde3bff05f534b"),h=n.Int8Array,c=s.aTypedArray,l=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!h&&a(function(){u.call(new h(1))});l("toLocaleString",function(){return r(u,d?o(c(this)):c(this),o(arguments))},a(function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()})||!a(function(){h.prototype.toLocaleString.call([1,2])}))},{d23c9dad2cb3d012:"7Z171","961a14c04c94ca8e":"2fjXG",aa830556bb66a52b:"b6692","1477df799d469d0c":"cXVrS","6bdde3bff05f534b":"eO8Ta"}],bN7du:[function(e,t,i){var n=e("aee14a288ff10704"),r=e("77f370038a7e7dac"),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",function(){return n(s(this),o(this))})},{aee14a288ff10704:"2dsKr","77f370038a7e7dac":"b6692"}],accWj:[function(e,t,i){var n=e("7a241707bf041790"),r=e("ab9301a002e94347"),s=e("e1b15c081f5438dc"),a=e("50268bbb02cbbbc4"),o=n.aTypedArray,h=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=r(n.TypedArrayPrototype.sort);c("toSorted",function(e){void 0!==e&&s(e);var t=o(this);return l(a(h(t),t),e)})},{"7a241707bf041790":"b6692",ab9301a002e94347:"2iJ57",e1b15c081f5438dc:"alrlv","50268bbb02cbbbc4":"5QV4b"}],"8zMXu":[function(e,t,i){var n=e("ba1ad98ce5955ae6").exportTypedArrayMethod,r=e("7fb7589d87925c0e"),s=e("9ae1b5b748ef0512"),a=e("9d0cad3ff385c8e1"),o=s.Uint8Array,h=o&&o.prototype||{},c=[].toString,l=a([].join);r(function(){c.call({})})&&(c=function(){return l(this)});var u=h.toString!==c;n("toString",c,u)},{ba1ad98ce5955ae6:"b6692","7fb7589d87925c0e":"cXVrS","9ae1b5b748ef0512":"7Z171","9d0cad3ff385c8e1":"2iJ57"}],bwjPE:[function(e,t,i){var n=e("5428fa832663517b"),r=e("472f91950b838d4c"),s=e("cd9beaafe2ae7a70"),a=e("b4b145cf5a7fc46d"),o=e("3cca7f61fa3b5db7"),h=r.aTypedArray,c=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("with",{with:function(e,t){var i=h(this),r=a(e),l=s(i)?o(t):+t;return n(i,c(i),r,l)}}.with,!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}())},{"5428fa832663517b":"ebcI0","472f91950b838d4c":"b6692",cd9beaafe2ae7a70:"7TPqP",b4b145cf5a7fc46d:"gAgUH","3cca7f61fa3b5db7":"hYKQy"}],"4AZtq":[function(e,t,i){var n=e("b25f2dc62f86f185"),r=e("f98894072ee354c2"),s=e("e8f3df77e99ec93e"),a=String.fromCharCode,o=r("".charAt),h=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,u=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(e){for(var t,i,n=s(e),r="",d=n.length,f=0;f>(-2*S&6)));return h}})},{f57c57075be2f036:"gJg5v","1beb501bad2a77ab":"7Z171","54160fb760cf47b6":"e5ie6",b8fdd5e59791f323:"2iJ57","2b6100c225ada6":"bOssl",fb00c1d39c9bf14c:"cXVrS","93407030a6bacce1":"4x6uB","48ccfe93995f906":"h3DcZ",bed47900de2f9889:"jseHN"}],jseHN:[function(e,t,i){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n+"+/",s=n+"-_",a=function(e){for(var t={},i=0;i<64;i++)t[e.charAt(i)]=i;return t};t.exports={i2c:r,c2i:a(r),i2cUrl:s,c2iUrl:a(s)}},{}],jwPXF:[function(e,t,i){var n=e("ff535db334027cb3"),r=e("d2af88b3a42b7d50"),s=e("a166328697ff9969"),a=e("ccb7079059953540"),o=e("5424850d1e2e873d"),h=e("61b2b23f28dc6ce7"),c=e("48ec8439e6a9901c"),l=e("96982b02e51db61c"),u=e("e084452184a62fe5").i2c,d=s("btoa"),f=a("".charAt),p=a("".charCodeAt),g=!!d&&!h(function(){return"aGk="!==d("hi")}),m=g&&!h(function(){d()}),v=g&&h(function(){return"bnVsbA=="!==d(null)}),y=g&&1!==d.length;n({global:!0,bind:!0,enumerable:!0,forced:!g||m||v||y},{btoa:function(e){if(l(arguments.length,1),g)return o(d,r,c(e));for(var t,i,n=c(e),a="",h=0,m=u;f(n,h)||(m="=",h%1);){if((i=p(n,h+=3/4))>255)throw new(s("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a+=f(m,63&(t=t<<8|i)>>8-h%1*8)}return a}})},{ff535db334027cb3:"gJg5v",d2af88b3a42b7d50:"7Z171",a166328697ff9969:"e5ie6",ccb7079059953540:"2iJ57","5424850d1e2e873d":"bOssl","61b2b23f28dc6ce7":"cXVrS","48ec8439e6a9901c":"4x6uB","96982b02e51db61c":"h3DcZ",e084452184a62fe5:"jseHN"}],khTY5:[function(e,t,i){var n=e("f2983879ab6ef4f"),r=e("74a037ab8118876"),s=e("a3359ffcd052df79"),a=e("9e6862fbf1bc54d2"),o=e("833a1c6e8a10b1ff"),h=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in r)r[c]&&h(n[c]&&n[c].prototype);h(s)},{f2983879ab6ef4f:"7Z171","74a037ab8118876":"1xZhu",a3359ffcd052df79:"fVoiV","9e6862fbf1bc54d2":"4w3Nn","833a1c6e8a10b1ff":"gKM90"}],"1xZhu":[function(e,t,i){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],fVoiV:[function(e,t,i){var n=e("a6fc44eba1875331")("span").classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r},{a6fc44eba1875331:"SppDD"}],a2DYE:[function(e,t,i){var n=e("c051336c9ece485c"),r=e("b1dd6223fec045b2"),s=e("2927608065790e8a"),a=e("107ef5eaf95c92b0"),o=e("2f02b421bbdb9eb4"),h=e("46e3db6eb678f758"),c=e("6a4d2091548e6557")("iterator"),l=a.values,u=function(e,t){if(e){if(e[c]!==l)try{o(e,c,l)}catch(t){e[c]=l}if(h(e,t,!0),r[t]){for(var i in a)if(e[i]!==a[i])try{o(e,i,a[i])}catch(t){e[i]=a[i]}}}};for(var d in r)u(n[d]&&n[d].prototype,d);u(s,"DOMTokenList")},{c051336c9ece485c:"7Z171",b1dd6223fec045b2:"1xZhu","2927608065790e8a":"fVoiV","107ef5eaf95c92b0":"3prNk","2f02b421bbdb9eb4":"gKM90","46e3db6eb678f758":"dkhk9","6a4d2091548e6557":"5CuF7"}],"6bhjG":[function(e,t,i){var n=e("3d0510e49183901c"),r=e("63b7b93fc4a7238a"),s=e("1c5b62f756d3eaff"),a=e("eb1c50ea6315321b"),o=e("4ca71918e5a2016a"),h=e("c21d001acfae7cd"),c=e("75fac16725379a32").f,l=e("b34fbc760b0520d4"),u=e("ed9170165790e778"),d=e("f6f97990397d9c00"),f=e("9b1e92218f8d993"),p=e("fdfe3ed8e9adb72c"),g=e("9c0ec21dd5e9a70b"),m=e("5a4b6c79c088bdfe"),v=e("b32d1eeacf68845c"),y=e("8ef37a97ffa6fa2e"),b=e("fc770dee153f9182"),x=e("617636ad1c3548bd"),E=e("391d43a74d1595a0"),w="DOMException",T="DATA_CLONE_ERR",S=r("Error"),A=r(w)||function(){try{new(r("MessageChannel")||s("worker_threads").MessageChannel)().port1.postMessage(new WeakMap)}catch(e){if(e.name===T&&25===e.code)return e.constructor}}(),C=A&&A.prototype,_=S.prototype,I=b.set,O=b.getterFor(w),P="stack"in new S(w),M=function(e){return d(v,e)&&v[e].m?v[e].c:0},R=function(){f(this,L);var e=arguments.length,t=m(e<1?void 0:arguments[0]),i=m(e<2?void 0:arguments[1],"Error"),n=M(i);if(I(this,{type:w,name:i,message:t,code:n}),x||(this.name=i,this.message=t,this.code=n),P){var r=new S(t);r.name=w,c(this,"stack",h(1,y(r.stack,1)))}},L=R.prototype=o(_),D=function(e){return{enumerable:!0,configurable:!0,get:e}},k=function(e){return D(function(){return O(this)[e]})};x&&(u(L,"code",k("code")),u(L,"message",k("message")),u(L,"name",k("name"))),c(L,"constructor",h(1,R));var N=a(function(){return!(new A instanceof S)}),F=N||a(function(){return _.toString!==g||"2: 1"!==String(new A(1,2))}),B=N||a(function(){return 25!==new A(1,"DataCloneError").code}),U=N||25!==A[T]||25!==C[T],V=E?F||B||U:N;n({global:!0,constructor:!0,forced:V},{DOMException:V?R:A});var G=r(w),j=G.prototype;for(var W in F&&(E||A===G)&&l(j,"toString",g),B&&x&&A===G&&u(j,"code",D(function(){return M(p(this).name)})),v)if(d(v,W)){var Y=v[W],H=Y.s,z=h(6,Y.c);d(G,H)||c(G,H,z),d(j,H)||c(j,H,z)}},{"3d0510e49183901c":"gJg5v","63b7b93fc4a7238a":"e5ie6","1c5b62f756d3eaff":"fjtLr",eb1c50ea6315321b:"cXVrS","4ca71918e5a2016a":"7isQ3",c21d001acfae7cd:"5toj2","75fac16725379a32":"hvqCQ",b34fbc760b0520d4:"4CPdc",ed9170165790e778:"3NI4M",f6f97990397d9c00:"9JWVX","9b1e92218f8d993":"95yA1",fdfe3ed8e9adb72c:"dPzbI","9c0ec21dd5e9a70b":"9hDDf","5a4b6c79c088bdfe":"dwhvK",b32d1eeacf68845c:"I3hyF","8ef37a97ffa6fa2e":"7dart",fc770dee153f9182:"ixHS2","617636ad1c3548bd":"6mXK1","391d43a74d1595a0":"jHRGA"}],I3hyF:[function(e,t,i){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},{}],fJnNi:[function(e,t,i){var n=e("5538d4aa2e26797c"),r=e("15f622cde07e3e8f"),s=e("6dca64203ef6b4d1"),a=e("30cb5b59df4e77c6"),o=e("64c91a24ef31e303").f,h=e("a56ea2d80c8496ae"),c=e("e54ce0361d637752"),l=e("5e15de01309c5057"),u=e("fccd891af3c8103d"),d=e("2db1f0a6b3bd6dfd"),f=e("176edbe2885d9f01"),p=e("3f4d27281e93627e"),g=e("95f892709744ad29"),m="DOMException",v=s("Error"),y=s(m),b=function(){c(this,x);var e=arguments.length,t=u(e<1?void 0:arguments[0]),i=u(e<2?void 0:arguments[1],"Error"),n=new y(t,i),r=new v(t);return r.name=m,o(n,"stack",a(1,f(r.stack,1))),l(n,this,b),n},x=b.prototype=y.prototype,E="stack"in new v(m),w="stack"in new y(1,2),T=y&&p&&Object.getOwnPropertyDescriptor(r,m),S=!!T&&!(T.writable&&T.configurable),A=E&&!S&&!w;n({global:!0,constructor:!0,forced:g||A},{DOMException:A?b:y});var C=s(m),_=C.prototype;if(_.constructor!==C){for(var I in g||o(_,"constructor",a(1,C)),d)if(h(d,I)){var O=d[I],P=O.s;h(C,P)||o(C,P,a(6,O.c))}}},{"5538d4aa2e26797c":"gJg5v","15f622cde07e3e8f":"7Z171","6dca64203ef6b4d1":"e5ie6","30cb5b59df4e77c6":"5toj2","64c91a24ef31e303":"hvqCQ",a56ea2d80c8496ae:"9JWVX",e54ce0361d637752:"95yA1","5e15de01309c5057":"30not",fccd891af3c8103d:"dwhvK","2db1f0a6b3bd6dfd":"I3hyF","176edbe2885d9f01":"7dart","3f4d27281e93627e":"6mXK1","95f892709744ad29":"jHRGA"}],"4teOf":[function(e,t,i){var n=e("db380432183a20e4"),r=e("9f1a1fb33df853f"),s="DOMException";r(n(s),s)},{db380432183a20e4:"e5ie6","9f1a1fb33df853f":"dkhk9"}],lCP8o:[function(e,t,i){e("52e9b3eefbbce1ed"),e("292fa64716f5b39e")},{"52e9b3eefbbce1ed":"idFPB","292fa64716f5b39e":"1nu2V"}],idFPB:[function(e,t,i){var n=e("79389288a80b279c"),r=e("e4d64249a0133d14"),s=e("84ba5ca62b8b14c9").clear;n({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==s},{clearImmediate:s})},{"79389288a80b279c":"gJg5v",e4d64249a0133d14:"7Z171","84ba5ca62b8b14c9":"iEUCI"}],"1nu2V":[function(e,t,i){var n=e("33581c362196ed1f"),r=e("503bb555249cad41"),s=e("4219ce460223bd08").set,a=e("738dc378e6a94c64"),o=r.setImmediate?a(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==o},{setImmediate:o})},{"33581c362196ed1f":"gJg5v","503bb555249cad41":"7Z171","4219ce460223bd08":"iEUCI","738dc378e6a94c64":"LAeE1"}],LAeE1:[function(e,t,i){var n,r=e("aa6765693e58a0fe"),s=e("a68ecfcbf29c46f6"),a=e("7087588d33667af2"),o=e("864edee099e8affb"),h=e("3a3a5a2cfab86f21"),c=e("cff2c830bdea4f24"),l=e("58a74f00cee1ac64"),u=r.Function,d=/MSIE .\./.test(h)||"BUN"===o&&((n=r.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(e,t){var i=t?2:1;return d?function(n,r){var o=l(arguments.length,1)>i,h=a(n)?n:u(n),d=o?c(arguments,i):[],f=o?function(){s(h,this,d)}:h;return t?e(f,r):e(f)}:e}},{aa6765693e58a0fe:"7Z171",a68ecfcbf29c46f6:"2fjXG","7087588d33667af2":"h1Wnr","864edee099e8affb":"ah0ZS","3a3a5a2cfab86f21":"5hj4U",cff2c830bdea4f24:"eO8Ta","58a74f00cee1ac64":"h3DcZ"}],"1mZsz":[function(e,t,i){var n=e("6f7278673cd963e5"),r=e("4f851b5e5b332d48"),s=e("b80db4539abf09d9"),a=e("889c274f5e23b39"),o=e("15983ab5c2fbc059"),h=e("c36112b7edfed618"),c=e("74b26aee0ae17038");n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:h(function(){return c&&1!==Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length})},{queueMicrotask:function(e){o(arguments.length,1),s(a(e))}})},{"6f7278673cd963e5":"gJg5v","4f851b5e5b332d48":"7Z171",b80db4539abf09d9:"fhIs0","889c274f5e23b39":"alrlv","15983ab5c2fbc059":"h3DcZ",c36112b7edfed618:"cXVrS","74b26aee0ae17038":"6mXK1"}],f5KUv:[function(e,t,i){var n=e("9a97a510092b7d72"),r=e("bfbbd7ba4e233a15"),s=e("dadc1a7ad6bec203"),a=e("8d7f4453ff13e12d"),o=TypeError,h=Object.defineProperty,c=r.self!==r;try{if(a){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||s(r,"self",{get:function(){return r},set:function(e){if(this!==r)throw new o("Illegal invocation");h(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:r})}catch(e){}},{"9a97a510092b7d72":"gJg5v",bfbbd7ba4e233a15:"7Z171",dadc1a7ad6bec203:"3NI4M","8d7f4453ff13e12d":"6mXK1"}],kONpx:[function(e,t,i){var n=e("46a94df747165a08"),r=e("3e04e2f4e7f87918"),s=e("6e1ac61205678af6"),a=e("c95079dcb9321b5f"),o=e("b30c4be405e55cd1"),h=e("d2759cd31961ec5f"),c=e("b28324366ed35694"),l=e("51b2af7ff9e786d2"),u=e("dbc30081dcfdeb22"),d=e("88e551d63448111"),f=e("748c1e7b84b5d0b6"),p=e("9b6dd1d113f04b93"),g=e("5236c862010bd4cc"),m=e("47c7a4ba5ff3ba9"),v=e("ea5539f8b43d1a17"),y=e("64004e8c5f5d0ef3"),b=e("9971f98ded0a259"),x=e("66bbcc11f1e948a"),E=e("a9cdcd120539bbe8"),w=e("be347fa71d60a5eb"),T=e("4868328f7e546c6"),S=e("1e6645abd1a2b421"),A=e("d0363fc9d9cfdd8c"),C=e("3275f5da850ac759"),_=e("3feae2e57ec01a12"),I=e("9575a353cf8e050f"),O=e("a675c54ae6442127"),P=s.Object,M=s.Array,R=s.Date,L=s.Error,D=s.TypeError,k=s.PerformanceMark,N=a("DOMException"),F=S.Map,B=S.has,U=S.get,V=S.set,G=A.Set,j=A.add,W=A.has,Y=a("Object","keys"),H=o([].push),z=o((!0).valueOf),X=o(1..valueOf),q=o("".valueOf),K=o(R.prototype.getTime),J=c("structuredClone"),$="DataCloneError",Q="Transferring",Z=function(e){return!h(function(){var t=new s.Set([7]),i=e(t),n=e(P(7));return i===t||!i.has(7)||!f(n)||7!=+n})&&e},ee=function(e,t){return!h(function(){var i=new t,n=e({a:i,b:i});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===i.stack)})},et=s.structuredClone,ei=n||!ee(et,L)||!ee(et,N)||!!h(function(){var e=et(new s.AggregateError([1],J,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==J||3!==e.cause}),en=!et&&Z(function(e){return new k(J,{detail:e}).detail}),er=Z(et)||en,es=function(e){throw new N("Uncloneable type: "+e,$)},ea=function(e,t){throw new N((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",$)},eo=function(e,t){return er||ea(t),er(e)},eh=function(){var e;try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null},ec=function(e,t,i){if(B(t,e))return U(t,e);if("SharedArrayBuffer"===(i||v(e)))n=er?er(e):e;else{var n,r,a,o,h,c,u=s.DataView;u||l(e.slice)||ea("ArrayBuffer");try{if(l(e.slice)&&!e.resizable)n=e.slice(0);else for(c=0,r=e.byteLength,a=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(r,a),o=new u(e),h=new u(n);c1&&!d(arguments[1])?m(arguments[1]):void 0,r=n?n.transfer:void 0;void 0!==r&&(i=ed(r,t=new F));var s=eu(e,t);return i&&ef(i),s}})},{"46a94df747165a08":"jHRGA","3e04e2f4e7f87918":"gJg5v","6e1ac61205678af6":"7Z171",c95079dcb9321b5f:"e5ie6",b30c4be405e55cd1:"2iJ57",d2759cd31961ec5f:"cXVrS",b28324366ed35694:"55cC0","51b2af7ff9e786d2":"h1Wnr",dbc30081dcfdeb22:"eytEI","88e551d63448111":"8AxCV","748c1e7b84b5d0b6":"8mxCV","9b6dd1d113f04b93":"2ZU2p","5236c862010bd4cc":"dCEHX","47c7a4ba5ff3ba9":"dPzbI",ea5539f8b43d1a17:"cRCRk","64004e8c5f5d0ef3":"9JWVX","9971f98ded0a259":"SVTZV","66bbcc11f1e948a":"gKM90",a9cdcd120539bbe8:"kHSes",be347fa71d60a5eb:"h3DcZ","4868328f7e546c6":"iG8db","1e6645abd1a2b421":"fY40v",d0363fc9d9cfdd8c:"aKtSD","3275f5da850ac759":"dSeD9","3feae2e57ec01a12":"edpRG","9575a353cf8e050f":"3Scc5",a675c54ae6442127:"2emOi"}],h5L1l:[function(e,t,i){e("9453fdd92aad151a"),e("c303d63f9a1c5be5")},{"9453fdd92aad151a":"98PJR",c303d63f9a1c5be5:"ydvxy"}],"98PJR":[function(e,t,i){var n=e("a9d1c09227b9596"),r=e("8f238f56192273e4"),s=e("87cb4ec54c39341e")(r.setInterval,!0);n({global:!0,bind:!0,forced:r.setInterval!==s},{setInterval:s})},{a9d1c09227b9596:"gJg5v","8f238f56192273e4":"7Z171","87cb4ec54c39341e":"LAeE1"}],ydvxy:[function(e,t,i){var n=e("6060be99991be48a"),r=e("f9d851aba3178e79"),s=e("ae4294be5adb39a1")(r.setTimeout,!0);n({global:!0,bind:!0,forced:r.setTimeout!==s},{setTimeout:s})},{"6060be99991be48a":"gJg5v",f9d851aba3178e79:"7Z171",ae4294be5adb39a1:"LAeE1"}],"4J9Kt":[function(e,t,i){e("99544a7edcd747a5")},{"99544a7edcd747a5":"7XU3f"}],"7XU3f":[function(e,t,i){e("19928ff2abfc3536");var n,r=e("d446e2097c7c2b23"),s=e("cd0458003d61a323"),a=e("592c96d240ad401c"),o=e("2e7550752ce99b71"),h=e("c128b8cb3e38a436"),c=e("9ee66bece60e18c5"),l=e("763c39a8b521ff54"),u=e("1c9277bbea264bc7"),d=e("f0dd676601f7cb0b"),f=e("deee7b2fe3c1e96f"),p=e("ff3437c5b86d6c26"),g=e("3c2f033d1a197fd6"),m=e("9fdfccae2d327739"),v=e("8ba5b2695179827").codeAt,y=e("23751b8f28dcd37"),b=e("5f808b1954b24403"),x=e("f969f30083a50975"),E=e("b15c5243fe0e0f6"),w=e("e8b262dfe3e4c989"),T=e("9a3ca045fbb43248"),S=T.set,A=T.getterFor("URL"),C=w.URLSearchParams,_=w.getState,I=o.URL,O=o.TypeError,P=o.parseInt,M=Math.floor,R=Math.pow,L=c("".charAt),D=c(/./.exec),k=c([].join),N=c(1..toString),F=c([].pop),B=c([].push),U=c("".replace),V=c([].shift),G=c("".split),j=c("".slice),W=c("".toLowerCase),Y=c([].unshift),H="Invalid scheme",z="Invalid host",X="Invalid port",q=/[a-z]/i,K=/[\d+-.a-z]/i,J=/\d/,$=/^0x/i,Q=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ei=/[\0\t\n\r #/:<>?@[\\\]^|]/,en=/^[\u0000-\u0020]+/,er=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,es=/[\t\n\r]/g,ea=function(e){var t,i,n,r,s,a,o,h=G(e,".");if(h.length&&""===h[h.length-1]&&h.length--,(t=h.length)>4)return e;for(n=0,i=[];n1&&"0"===L(r,0)&&(s=D($,r)?16:8,r=j(r,8===s?1:2)),""===r)a=0;else{if(!D(10===s?Z:8===s?Q:ee,r))return e;a=P(r,s)}B(i,a)}for(n=0;n=R(256,5-t))return null}else if(a>255)return null;for(n=0,o=F(i);n6))return;for(n=0;d();){if(r=null,n>0){if("."!==d()||!(n<4))return;u++}if(!D(J,d()))return;for(;D(J,d());){if(s=P(d(),10),null===r)r=s;else{if(0===r)return;r=10*r+s}if(r>255)return;u++}h[c]=256*h[c]+r,(2==++n||4===n)&&c++}if(4!==n)return;break}if(":"===d()){if(u++,!d())return}else if(d())return;h[c++]=t}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)o=h[c],h[c--]=h[l+a-1],h[l+--a]=o;else if(8!==c)return;return h},eh=function(e){for(var t=null,i=1,n=null,r=0,s=0;s<8;s++)0!==e[s]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=s),++r);return r>i?n:t},ec=function(e){var t,i,n,r;if("number"==typeof e){for(i=0,t=[];i<4;i++)Y(t,e%256),e=M(e/256);return k(t,".")}if("object"==typeof e){for(i=0,t="",n=eh(e);i<8;i++)(!r||0!==e[i])&&(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=N(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},el={},eu=p({},el,{" ":1,'"':1,"<":1,">":1,"`":1}),ed=p({},eu,{"#":1,"?":1,"{":1,"}":1}),ef=p({},ed,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ep=function(e,t){var i=v(e,0);return i>32&&i<127&&!f(t,e)?e:encodeURIComponent(e)},eg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},em=function(e,t){var i;return 2===e.length&&D(q,L(e,0))&&(":"===(i=L(e,1))||!t&&"|"===i)},ev=function(e){var t;return e.length>1&&em(j(e,0,2))&&(2===e.length||"/"===(t=L(e,2))||"\\"===t||"?"===t||"#"===t)},ey={},eb={},ex={},eE={},ew={},eT={},eS={},eA={},eC={},e_={},eI={},eO={},eP={},eM={},eR={},eL={},eD={},ek={},eN={},eF={},eB={},eU=function(e,t,i){var n,r,s,a=b(e);if(t){if(r=this.parse(a))throw new O(r);this.searchParams=null}else{if(void 0!==i&&(n=new eU(i,!0)),r=this.parse(a,null,n))throw new O(r);(s=_(new C)).bindURL(this),this.searchParams=s}};eU.prototype={type:"URL",parse:function(e,t,i){var r=t||ey,s=0,a="",o=!1,h=!1,c=!1;for(e=b(e),t||(this.scheme="",this.username="",this.password="",this.host=null,this.port=null,this.path=[],this.query=null,this.fragment=null,this.cannotBeABaseURL=!1,e=U(e,en,""),e=U(e,er,"$1")),l=g(e=U(e,es,""));s<=l.length;){switch(u=l[s],r){case ey:if(u&&D(q,u))a+=W(u),r=eb;else{if(t)return H;r=ex;continue}break;case eb:if(u&&(D(K,u)||"+"===u||"-"===u||"."===u))a+=W(u);else if(":"===u){if(t&&(this.isSpecial()!==f(eg,a)||"file"===a&&(this.includesCredentials()||null!==this.port)||"file"===this.scheme&&!this.host))return;if(this.scheme=a,t){this.isSpecial()&&eg[this.scheme]===this.port&&(this.port=null);return}a="","file"===this.scheme?r=eM:this.isSpecial()&&i&&i.scheme===this.scheme?r=eE:this.isSpecial()?r=eA:"/"===l[s+1]?(r=ew,s++):(this.cannotBeABaseURL=!0,B(this.path,""),r=eN)}else{if(t)return H;a="",r=ex,s=0;continue}break;case ex:if(!i||i.cannotBeABaseURL&&"#"!==u)return H;if(i.cannotBeABaseURL&&"#"===u){this.scheme=i.scheme,this.path=m(i.path),this.query=i.query,this.fragment="",this.cannotBeABaseURL=!0,r=eB;break}r="file"===i.scheme?eM:eT;continue;case eE:if("/"===u&&"/"===l[s+1])r=eC,s++;else{r=eT;continue}break;case ew:if("/"===u){r=e_;break}r=ek;continue;case eT:if(this.scheme=i.scheme,u===n)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query;else if("/"===u||"\\"===u&&this.isSpecial())r=eS;else if("?"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query="",r=eF;else if("#"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.path.length--,r=ek;continue}break;case eS:if(this.isSpecial()&&("/"===u||"\\"===u))r=eC;else if("/"===u)r=e_;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,r=ek;continue}break;case eA:if(r=eC,"/"!==u||"/"!==L(a,s+1))continue;s++;break;case eC:if("/"!==u&&"\\"!==u){r=e_;continue}break;case e_:if("@"===u){o&&(a="%40"+a),o=!0,d=g(a);for(var l,u,d,p,v,y,x=0;x65535)return X;this.port=this.isSpecial()&&T===eg[this.scheme]?null:T,a=""}if(t)return;r=eD;continue}break;case eM:if(this.scheme="file","/"===u||"\\"===u)r=eR;else if(i&&"file"===i.scheme)switch(u){case n:this.host=i.host,this.path=m(i.path),this.query=i.query;break;case"?":this.host=i.host,this.path=m(i.path),this.query="",r=eF;break;case"#":this.host=i.host,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;break;default:ev(k(m(l,s),""))||(this.host=i.host,this.path=m(i.path),this.shortenPath()),r=ek;continue}else{r=ek;continue}break;case eR:if("/"===u||"\\"===u){r=eL;break}i&&"file"===i.scheme&&!ev(k(m(l,s),""))&&(em(i.path[0],!0)?B(this.path,i.path[0]):this.host=i.host),r=ek;continue;case eL:if(u===n||"/"===u||"\\"===u||"?"===u||"#"===u){if(!t&&em(a))r=ek;else if(""===a){if(this.host="",t)return;r=eD}else{if(p=this.parseHost(a))return p;if("localhost"===this.host&&(this.host=""),t)return;a="",r=eD}continue}a+=u;break;case eD:if(this.isSpecial()){if(r=ek,"/"!==u&&"\\"!==u)continue}else if(t||"?"!==u){if(t||"#"!==u){if(u!==n&&(r=ek,"/"!==u))continue}else this.fragment="",r=eB}else this.query="",r=eF;break;case ek:if(u===n||"/"===u||"\\"===u&&this.isSpecial()||!t&&("?"===u||"#"===u)){if(".."===(v=W(v=a))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(this.shortenPath(),"/"===u||"\\"===u&&this.isSpecial()||B(this.path,"")):"."===(y=a)||"%2e"===W(y)?"/"===u||"\\"===u&&this.isSpecial()||B(this.path,""):("file"===this.scheme&&!this.path.length&&em(a)&&(this.host&&(this.host=""),a=L(a,0)+":"),B(this.path,a)),a="","file"===this.scheme&&(u===n||"?"===u||"#"===u))for(;this.path.length>1&&""===this.path[0];)V(this.path);"?"===u?(this.query="",r=eF):"#"===u&&(this.fragment="",r=eB)}else a+=ep(u,ed);break;case eN:"?"===u?(this.query="",r=eF):"#"===u?(this.fragment="",r=eB):u!==n&&(this.path[0]+=ep(u,el));break;case eF:t||"#"!==u?u!==n&&("'"===u&&this.isSpecial()?this.query+="%27":"#"===u?this.query+="%23":this.query+=ep(u,el)):(this.fragment="",r=eB);break;case eB:u!==n&&(this.fragment+=ep(u,eu))}s++}},parseHost:function(e){var t,i,n;if("["===L(e,0)){if("]"!==L(e,e.length-1)||!(t=eo(j(e,1,-1))))return z;this.host=t}else if(this.isSpecial()){if(D(et,e=y(e))||null===(t=ea(e)))return z;this.host=t}else{if(D(ei,e))return z;for(n=0,t="",i=g(e);n1?arguments[1]:void 0,n=S(t,new eU(e,!1,i));s||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},eG=eV.prototype,ej=function(e,t){return{get:function(){return A(this)[e]()},set:t&&function(e){return A(this)[t](e)},configurable:!0,enumerable:!0}};if(s&&(u(eG,"href",ej("serialize","setHref")),u(eG,"origin",ej("getOrigin")),u(eG,"protocol",ej("getProtocol","setProtocol")),u(eG,"username",ej("getUsername","setUsername")),u(eG,"password",ej("getPassword","setPassword")),u(eG,"host",ej("getHost","setHost")),u(eG,"hostname",ej("getHostname","setHostname")),u(eG,"port",ej("getPort","setPort")),u(eG,"pathname",ej("getPathname","setPathname")),u(eG,"search",ej("getSearch","setSearch")),u(eG,"searchParams",ej("getSearchParams")),u(eG,"hash",ej("getHash","setHash"))),l(eG,"toJSON",function(){return A(this).serialize()},{enumerable:!0}),l(eG,"toString",function(){return A(this).serialize()},{enumerable:!0}),I){var eW=I.createObjectURL,eY=I.revokeObjectURL;eW&&l(eV,"createObjectURL",h(eW,I)),eY&&l(eV,"revokeObjectURL",h(eY,I))}x(eV,"URL"),r({global:!0,constructor:!0,forced:!a,sham:!s},{URL:eV})},{"19928ff2abfc3536":"i2qFG",d446e2097c7c2b23:"gJg5v",cd0458003d61a323:"6mXK1","592c96d240ad401c":"azO8L","2e7550752ce99b71":"7Z171",c128b8cb3e38a436:"f1CxE","9ee66bece60e18c5":"2iJ57","763c39a8b521ff54":"4CPdc","1c9277bbea264bc7":"3NI4M",f0dd676601f7cb0b:"95yA1",deee7b2fe3c1e96f:"9JWVX",ff3437c5b86d6c26:"cKgWo","3c2f033d1a197fd6":"lrrJd","9fdfccae2d327739":"eO8Ta","8ba5b2695179827":"fVu0j","23751b8f28dcd37":"lUDfY","5f808b1954b24403":"4x6uB",f969f30083a50975:"dkhk9",b15c5243fe0e0f6:"h3DcZ",e8b262dfe3e4c989:"dIaqI","9a3ca045fbb43248":"ixHS2"}],azO8L:[function(e,t,i){var n=e("b638e4b55492b349"),r=e("d3a18943af316a4c"),s=e("f39eaf2672eb61e1"),a=e("f816319c57ebd10b"),o=r("iterator");t.exports=!n(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(e,i){t.delete("b"),n+=i+e}),i.delete("a",2),i.delete("b",void 0),a&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(a||!s)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},{b638e4b55492b349:"cXVrS",d3a18943af316a4c:"5CuF7",f39eaf2672eb61e1:"6mXK1",f816319c57ebd10b:"jHRGA"}],lUDfY:[function(e,t,i){var n=e("5fc1d380e4ee310c"),r=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=RangeError,h=n(s.exec),c=Math.floor,l=String.fromCharCode,u=n("".charCodeAt),d=n([].join),f=n([].push),p=n("".replace),g=n("".split),m=n("".toLowerCase),v=function(e){for(var t=[],i=0,n=e.length;i=55296&&r<=56319&&i>1,e+=c(e/t);e>455;)e=c(e/35),n+=36;return c(n+36*e/(e+38))},x=function(e){var t,i,n=[],r=(e=v(e)).length,s=128,h=0,u=72;for(t=0;t=s&&ic((2147483647-h)/x))throw new o(a);for(h+=(m-s)*x,s=m,t=0;t2147483647)throw new o(a);if(i===s){for(var E=h,w=36;;){var T=w<=u?1:w>=u+26?26:w-u;if(E0&&(e&i)!=0;i>>=1)t++;return t},eh=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ec=function(e){for(var t=(e=Q(e,er," ")).length,i="",n=0;nt){i+="%",n++;continue}var s=ea(e,n+1);if(s!=s){i+=r,n++;continue}n+=2;var a=eo(s);if(0===a)r=z(s);else{if(1===a||a>4){i+="�",n++;continue}for(var o=[s],h=1;ht)&&"%"===K(e,n);){var c=ea(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;$(o,c),n+=2,h++}if(o.length!==a){i+="�";continue}var l=eh(o);null===l?i+="�":r=X(l)}}i+=r,n++}return i},el=/[!'()~]|%20/g,eu={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ed=function(e){return eu[e]},ef=function(e){return Q(H(e),el,ed)},ep=g(function(e,t){N(this,{type:k,target:F(e).entries,index:0,kind:t})},D,function(){var e=B(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,O(void 0,!0);var n=t[i];switch(e.kind){case"keys":return O(n.key,!1);case"values":return O(n.value,!1)}return O([n.key,n.value],!1)},!0),eg=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?ei(e,1):e:S(e)))};eg.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,n,r,s,a,h,c=this.entries,l=I(e);if(l)for(i=(t=_(e,l)).next;!(n=o(i,t)).done;){if((a=o(s=(r=_(w(n.value))).next,r)).done||(h=o(s,r)).done||!o(s,r).done)throw new Y("Expected sequence with length 2");$(c,{key:S(a.value),value:S(h.value)})}else for(var u in e)b(e,u)&&$(c,{key:u,value:S(e[u])})},parseQuery:function(e){if(e)for(var t,i,n=this.entries,r=et(e,"&"),s=0;s0?arguments[0]:void 0,t=N(this,new eg(e));c||(this.size=t.entries.length)},ev=em.prototype;if(f(ev,{append:function(e,t){var i=F(this);P(arguments.length,2),$(i.entries,{key:S(e),value:S(t)}),!c&&this.length++,i.updateURL()},delete:function(e){for(var t=F(this),i=P(arguments.length,1),n=t.entries,r=S(e),s=i<2?void 0:arguments[1],a=void 0===s?s:S(s),o=0;ot.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,i=F(this).entries,n=x(e,arguments.length>1?arguments[1]:void 0),r=0;r1?ex(arguments[1]):{})}}),y(V)){var eE=function(e){return v(this,j),new V(e,arguments.length>1?ex(arguments[1]):{})};j.constructor=eE,eE.prototype=j,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:eE})}}t.exports={URLSearchParams:em,getState:F}},{"12e7a75121005a18":"3prNk",aed1dbd908154980:"dLJLG","2c283453b2df07f7":"gJg5v",f8300b17f61c07ea:"7Z171",c6afc8e42ff4d861:"aXhrH",c5226e6ac6c1a4ca:"e5ie6",c70bfc3d71513918:"bOssl",a30c0c0ecacbf883:"2iJ57","9dc980ea97e54f2d":"6mXK1","34e5e214071de9f5":"azO8L",d5c866a8dfde6bfe:"4CPdc",cfb67c7a1a4f1af9:"3NI4M",f0c2290e210049d5:"43JWW",c7a2f88a5440a541:"dkhk9",fb2d9f4ac91c2856:"1Abii","5e8fcf76ef17aca5":"ixHS2","486653683495e4a1":"95yA1","34563d35f35f9929":"h1Wnr",b866aa0bde936df4:"9JWVX",b5970b9126e1d395:"f1CxE","71cd06e9ca4a93a2":"cRCRk","7e16c364467ce62d":"dPzbI","9a0912d2261bbada":"8mxCV","9d062cdf188403bf":"4x6uB","1caa2aad22025751":"7isQ3",bf766970034bde82:"5toj2",c6d4d2a85cdef35a:"kBMjp","6668155f748c33e9":"3624P","982e5845e606dff7":"dwU83","9a407fe1b80ba6f5":"h3DcZ","778323e4214f089d":"5CuF7","83b87fb1800baf72":"5Mqp3"}],"6WXZj":[function(e,t,i){var n=e("e013012b2638fef2"),r=e("9496ef9db0f82491"),s=e("21b7d0d94de855c8"),a=e("8147b48bed1193b9"),o=e("209fab1bb25c54f1"),h=e("fc6b642936976470"),c=r("URL"),l=h&&s(function(){c.canParse()}),u=s(function(){return 1!==c.canParse.length});n({target:"URL",stat:!0,forced:!l||u},{canParse:function(e){var t=a(arguments.length,1),i=o(e),n=t<2||void 0===arguments[1]?void 0:o(arguments[1]);try{return new c(i,n),!0}catch(e){return!1}}})},{e013012b2638fef2:"gJg5v","9496ef9db0f82491":"e5ie6","21b7d0d94de855c8":"cXVrS","8147b48bed1193b9":"h3DcZ","209fab1bb25c54f1":"4x6uB",fc6b642936976470:"azO8L"}],jUFLb:[function(e,t,i){var n=e("ca194031c7296753"),r=e("349abd465922c360"),s=e("4631d0a34bc5d157"),a=e("aa32995cacd33b44"),o=e("be99ff6f8e610b1"),h=r("URL");n({target:"URL",stat:!0,forced:!o},{parse:function(e){var t=s(arguments.length,1),i=a(e),n=t<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return new h(i,n)}catch(e){return null}}})},{ca194031c7296753:"gJg5v","349abd465922c360":"e5ie6","4631d0a34bc5d157":"h3DcZ",aa32995cacd33b44:"4x6uB",be99ff6f8e610b1:"azO8L"}],fisJQ:[function(e,t,i){var n=e("bfa898e24eaaf3ba"),r=e("f2e0e6e15a74c3f4");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},{bfa898e24eaaf3ba:"gJg5v",f2e0e6e15a74c3f4:"bOssl"}],drhch:[function(e,t,i){e("d31c1e63d588cf96")},{d31c1e63d588cf96:"dIaqI"}],k5k9P:[function(e,t,i){var n=e("5e6ccc0840d93f4d"),r=e("cef48d325e9fb1df"),s=e("669131fee6eafcca"),a=e("1de5920376d9b739"),o=URLSearchParams,h=o.prototype,c=r(h.append),l=r(h.delete),u=r(h.forEach),d=r([].push),f=new o("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&n(h,"delete",function(e){var t,i=arguments.length,n=i<2?void 0:arguments[1];if(i&&void 0===n)return l(this,e);var r=[];u(this,function(e,t){d(r,{key:t,value:e})}),a(i,1);for(var o=s(e),h=s(n),f=0,p=0,g=!1,m=r.length;f=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var h=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(h&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),C(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:I(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(t.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],eDoZE:[function(e,t,i){let{GameClient:n}=e("c0142d4e41395f84"),{GameEngine:r}=e("18a1ed1c4bf17b4d"),{RoomEvents:s}=e("dceef5f4a6a9e8ba"),{ClientStartHandler:a}=e("ec0d66055e408699"),{FeaturesManager:o}=e("7e4eea7c2d38167d"),{FirebaseConnector:h}=e("96ad1970faff6b57"),{ConfigManager:c}=e("f699c89d645cbfaf"),{TranslationsMapper:l}=e("92bd008077187dc5"),u=e("5f809829afd075a"),{GameDom:d}=e("aeb0ac1bb4c645c8"),{RoomsConst:f}=e("b21bf1f3f93cb5d9"),{GameConst:p}=e("f6b922b1a92a11c2"),{ErrorManager:g,EventsManagerSingleton:m,Logger:v,sc:y}=e("33884cbf240ef975");t.exports.GameManager=class{constructor(){this.gameEngine=!1,this.activeRoomEvents=null,this.events=m,this.gameDom=d,this.config=new c;let e=this.gameDom.getWindow()?.reldensInitialConfig||{};y.deepMergeProperties(this.config,e),this.features=new o({gameManager:this,events:this.events}),this.firebase=new h(this),this.joinedRooms={},this.userData={},this.plugins={},this.services={},this.elements={},this.playerData=!1,this.gameOver=!1,this.forcedDisconnection=!1,this.isChangingScene=!1,this.canInitEngine=!0,this.appServerUrl="",this.gameServerUrl="",this.locale="",l.forConfig(this.config.client,u,p.MESSAGE.DATA_VALUES)}setupCustomClientPlugin(e,t){this.plugins[e]=new t,this.plugins[e].setup({gameManager:this,events:this.events})}clientStart(){this.events.emitSync("reldens.clientStartBefore",this),this.startHandler=new a(this),this.startHandler.clientStart()}startGame(e,t){this.events.emitSync("reldens.startGameBefore",this);let i=this.joinGame(e,t),n=this.gameDom.getElement("#"+e.formId+" "+p.SELECTORS.RESPONSE_ERROR);n.innerHTML="";let r=this.gameDom.getElement(p.SELECTORS.BODY);i.then(()=>{r.classList.add(p.CLASSES.GAME_STARTED),r.classList.remove(p.CLASSES.GAME_ERROR),this.gameDom.getElement(p.SELECTORS.FORMS_CONTAINER).remove(),this.gameDom.getElement(p.SELECTORS.GAME_CONTAINER).classList.remove(p.CLASSES.HIDDEN)}).catch(t=>{r.classList.remove(p.CLASSES.GAME_STARTED),r.classList.add(p.CLASSES.GAME_ERROR),this.submitedForm=!1,n&&(v.error(t),n.innerHTML=t.message||t),this.events.emitSync("reldens.gameRoomError",this,t),this.firebase&&"firebase-login"===e.formId&&this.firebase.app.auth().signOut()}),this.events.emitSync("reldens.startGameAfter",this)}async joinGame(e,t=!1){return(this.userData={},await this.events.emit("reldens.beforeJoinGame",{gameManager:this,formData:e,isNewUser:t}),y.hasOwn(e,"forgot")&&(this.userData.forgot=1,this.userData.email=e.email),this.initializeClient(),e.isGuest&&(this.userData.isGuest=!0,this.userData.isNewUser=!0),t&&(this.userData.isNewUser=!0,this.userData.email=e.email),this.userData.username=e.username,this.userData.password=e.password,this.gameRoom=await this.gameClient.joinOrCreate(p.ROOM_GAME,this.userData),this.gameRoom)?(await this.events.emit("reldens.beforeJoinGameRoom",this.gameRoom),this.gameRoom.onMessage("*",async e=>{if(e.error)return this.displayPlayerCreateError(e),!1;if(p.START_GAME===e.act)return this.initialGameData=e,await this.beforeStartGame();if(p.CREATE_PLAYER_RESULT!==e.act)return!1;this.initialGameData.player=e.player;let t=this.gameDom.getElement(p.SELECTORS.PLAYER_SELECTION);t&&t.classList.add("hidden"),await this.initEngine()}),this.events.on("reldens.afterSceneDynamicCreate",async()=>{this.config.get("client/ui/screen/responsive")&&(this.gameEngine.updateGameSize(this),this.gameDom.getWindow().addEventListener("resize",()=>{this.gameEngine.updateGameSize(this)}))}),this.gameRoom):(this.displayPlayerCreateError("GameRoom not available, try again later please."),!1)}displayPlayerCreateError(e){let t=this.gameDom.getElement(p.SELECTORS.PLAYER_CREATE_FORM+" "+p.SELECTORS.RESPONSE_ERROR);return!!t&&(t.innerHTML=e.message,!0)}initializeClient(){this.appServerUrl=this.getAppServerUrl(),this.gameServerUrl=this.getGameServerUrl(),this.gameClient=new n(this.gameServerUrl,this.config)}async beforeStartGame(){return await this.events.emit("reldens.beforeInitEngineAndStartGame",this.initialGameData,this),y.hasOwn(this.initialGameData,"gameConfig")||g.error("Missing game configuration."),y.deepMergeProperties(this.config,this.initialGameData?.gameConfig||{}),await this.features.loadFeatures(this.initialGameData?.features||{}),await this.events.emit("reldens.beforeCreateEngine",this.initialGameData,this),!!this.canInitEngine&&await this.initEngine()}async initEngine(){if(this.playerData=this.initialGameData?.player||!1,!this.playerData||!this.playerData.state)return this.gameDom.alertReload(this.services?.translator.t("game.errors.missingPlayerData"));this.userData.selectedPlayer=this.playerData.id;let e=this.initialGameData?.selectedScene||"";this.userData.selectedScene=e;let t=this.initialGameData?.gameConfig||{};this.gameEngine=new r({config:t.client.gameEngine,events:this.events}),this.userData.isNewUser=!1,this.userData.isGuest&&(this.initialGameData?.guestPassword&&(this.userData.password=this.initialGameData.guestPassword),this.initialGameData?.userName&&(this.userData.username=this.initialGameData.userName)),await this.joinFeaturesRooms();let i=""!==e&&e!==f.ROOM_LAST_LOCATION_KEY?e:this.playerData.state.scene;this.playerData.state.scene=i;let n=await this.gameClient.joinOrCreate(i,this.userData);return n?(this.gameDom.getElement(p.SELECTORS.BODY).classList.add(p.CLASSES.GAME_ENGINE_STARTED),delete this.initialGameData.selectedScene,delete this.userData.selectedScene,await this.emitJoinedRoom(n,i),this.activeRoomEvents=this.createRoomEventsInstance(i,this.events),await this.events.emit("reldens.createdRoomsEventsInstance",n,this),await this.activeRoomEvents.activateRoom(n),await this.emitActivatedRoom(n,i),await this.events.emit("reldens.afterInitEngineAndStartGame",this.initialGameData,n),n):this.gameDom.alertReload(this.services?.translator.t("game.errors.joiningRoom",{joinRoomName:i}))}async joinFeaturesRooms(){let e=Object.keys(this.features.featuresList);if(0===e.length)return;let t=[];for(let i of e){let e=this.features.featuresList[i];if(y.hasOwn(e,"joinRooms"))for(let i of e.joinRooms){let e=await this.gameClient.joinOrCreate(i,this.userData);if(!e)return this.gameDom.alertReload(this.services.translator.t("game.errors.joiningFeatureRoom",{joinRoomName:i}));this.joinedRooms[i]=e,await this.emitJoinedRoom(e,i),t.push(i)}}y.deepMergeProperties(this.config,{client:{rooms:{featuresRoomsNames:t}}})}async reconnectGameClient(e,t){this.isChangingScene=!0;let i=this.createRoomEventsInstance(e.player.state.scene);this.gameClient.joinOrCreate(i.roomName,this.userData).then(async n=>{t.leave(),this.activeRoomEvents=i,this.room=n,await this.emitJoinedRoom(n,e.player.state.scene),await i.activateRoom(n,e.prev),await this.emitActivatedRoom(n,e.player.state.scene)}).catch(i=>{v.error("Reconnect Game Client error.",{error:i,message:e,previousRoom:t}),this.gameDom.alertReload(this.services.translator.t("game.errors.reconnectClient"))})}async emitActivatedRoom(e,t){await this.events.emit("reldens.activatedRoom",e,this),await this.events.emit("reldens.activatedRoom_"+t,e,this)}async emitJoinedRoom(e,t){await this.events.emit("reldens.joinedRoom",e,this),await this.events.emit("reldens.joinedRoom_"+t,e,this)}createRoomEventsInstance(e){return new s(e,this)}getAppServerUrl(){return""===this.appServerUrl&&(this.appServerUrl=this.getUrlFromCurrentReferer()),this.appServerUrl}getGameServerUrl(){return""===this.gameServerUrl&&(this.gameServerUrl=this.getUrlFromCurrentReferer(!0)),this.gameServerUrl}getUrlFromCurrentReferer(e=!1){let t=this.gameDom.getWindow().location,i=t.protocol;return e&&(i=0===i.indexOf("https")?"wss:":"ws:"),i+"//"+t.hostname+(t.port?":"+t.port:"")}getActiveScene(){return this.activeRoomEvents.getActiveScene()}getActiveScenePreloader(){let e=this.getActiveScene().key;return this.gameEngine.scene.getScene("ScenePreloader"+e)}getCurrentPlayer(){let e=this.getActiveScene();return!!e&&e.player}currentPlayerName(){let e=this.getCurrentPlayer();return e?e.player_id+" - "+e.playerName:""}getCurrentPlayerAnimation(){let e=this.getCurrentPlayer();return e.players[e.playerId]}getUiElement(e,t=!0){let i=y.get(this.gameEngine,"uiScene",!1);return i?i.getUiElement(e,t):(t&&v.error("UI Scene not defined."),!1)}getFeature(e){let t=this.features.featuresList;return y.hasOwn(t,e)?t[e]:(v.error("Feature key not defined.",e),!1)}getAnimationByKey(e){return this.getActiveScene().getAnimationByKey(e)}}},{c0142d4e41395f84:"44RMi","18a1ed1c4bf17b4d":"fVZ41",dceef5f4a6a9e8ba:"7XAJ0",ec0d66055e408699:"401GU","7e4eea7c2d38167d":"3ZqP5","96ad1970faff6b57":"dkVHA",f699c89d645cbfaf:"6v2bg","92bd008077187dc5":"1fcQw","5f809829afd075a":"CtFH5",aeb0ac1bb4c645c8:"bqEy7",b21bf1f3f93cb5d9:"9vHHC",f6b922b1a92a11c2:"93TbC","33884cbf240ef975":"3lwy5"}],"44RMi":[function(e,t,i){let{Client:n}=e("7318eff88b436af1"),{RoomsConst:r}=e("25de65df7e751073"),{GameConst:s}=e("6f1338761bdf0493"),{Logger:a}=e("c4efa48e92b2f02b");t.exports.GameClient=class{constructor(e,t){this.serverUrl=e,this.config=t,this.autoConnectServerGameRoom=this.config.getWithoutLogs("client/rooms/autoConnectServerGameRoom",!0),this.autoConnectServerFeatureRooms=this.config.getWithoutLogs("client/rooms/autoConnectServerFeatureRooms",!0),this.roomsUrls={},this.roomClients={},this.gameRoomsByServer={},this.featuresByServerFlag={},this.featuresRoomsByServer={}}async joinOrCreate(e,t){try{let i=this.roomClient(e);if(!i)return a.error('Client not found for room name "'+e+'".'),!1;let n=this.roomsUrls[e];return await this.connectToGlobalGameRoom(n,i,t),await this.connectToGlobalFeaturesRooms(n,i,t),await i.joinOrCreate(e,t)}catch(i){if(r.ERRORS.CREATING_ROOM_AWAIT===i.message)return await new Promise(e=>setTimeout(e,500)),await this.joinOrCreate(e,t);a.error("Joining room error: "+i.message)}}async connectToGlobalGameRoom(e,t,i){if(this.autoConnectServerGameRoom){if(""===e||this.serverUrl===e){a.debug("Avoid connect to global game room.",this.serverUrl,e);return}this.gameRoomsByServer[e]||(a.debug("Registering GameRoom for server: "+e),this.gameRoomsByServer[e]=await t.joinOrCreate(s.ROOM_GAME,i),this.gameRoomsByServer[e].onMessage("*",()=>{}))}}async connectToGlobalFeaturesRooms(e,t,i){if(!this.autoConnectServerFeatureRooms)return;if(""===e||this.serverUrl===e){a.debug("Avoid connect to features rooms.",this.serverUrl,e);return}if(this.featuresByServerFlag[e])return;a.debug("Registering features rooms for server: "+e),this.featuresByServerFlag[e]=!0;let n=this.config.getWithoutLogs("client/rooms/featuresRoomsNames",[]);if(!(00&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}(this._view,this._offset,e);return this._offset+=e,t},T.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},T.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),i=0,n=0,r=0,s=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-((255-t+1)*1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return i=this._view.getUint8(this._offset),this._offset+=1,this._bin(i);case 197:return i=this._view.getUint16(this._offset),this._offset+=2,this._bin(i);case 198:return i=this._view.getUint32(this._offset),this._offset+=4,this._bin(i);case 199:if(i=this._view.getUint8(this._offset),n=this._view.getInt8(this._offset+1),this._offset+=2,-1===n){var a=this._view.getUint32(this._offset);return r=this._view.getInt32(this._offset+4),s=this._view.getUint32(this._offset+8),this._offset+=12,new Date((4294967296*r+s)*1e3+a/1e6)}return[n,this._bin(i)];case 200:return i=this._view.getUint16(this._offset),n=this._view.getInt8(this._offset+2),this._offset+=3,[n,this._bin(i)];case 201:return i=this._view.getUint32(this._offset),n=this._view.getInt8(this._offset+4),this._offset+=5,[n,this._bin(i)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return r=4294967296*this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 212:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n){this._offset+=1;return}return[n,this._bin(1)];case 213:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(2)];case 214:if(n=this._view.getInt8(this._offset),this._offset+=1,-1===n)return e=this._view.getUint32(this._offset),this._offset+=4,new Date(1e3*e);return[n,this._bin(4)];case 215:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n)return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(r+s);if(-1===n)return r=this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(1e3*((3&r)*4294967296+s)+(r>>>2)/1e6);return[n,this._bin(8)];case 216:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(16)];case 217:return i=this._view.getUint8(this._offset),this._offset+=1,this._str(i);case 218:return i=this._view.getUint16(this._offset),this._offset+=2,this._str(i);case 219:return i=this._view.getUint32(this._offset),this._offset+=4,this._str(i);case 220:return i=this._view.getUint16(this._offset),this._offset+=2,this._array(i);case 221:return i=this._view.getUint32(this._offset),this._offset+=4,this._array(i);case 222:return i=this._view.getUint16(this._offset),this._offset+=2,this._map(i);case 223:return i=this._view.getUint32(this._offset),this._offset+=4,this._map(i)}throw Error("Could not parse")};var S=globalThis.WebSocket||function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},A=function(){function e(e){this.events=e}return e.prototype.send=function(e){e instanceof ArrayBuffer?this.ws.send(e):Array.isArray(e)&&this.ws.send(new Uint8Array(e).buffer)},e.prototype.connect=function(e){this.ws=new S(e,this.protocols),this.ws.binaryType="arraybuffer",this.ws.onopen=this.events.onopen,this.ws.onmessage=this.events.onmessage,this.ws.onclose=this.events.onclose,this.ws.onerror=this.events.onerror},e.prototype.close=function(e,t){this.ws.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.ws.readyState===S.OPEN},enumerable:!1,configurable:!0}),e}(),C=function(){function e(){this.events={},this.transport=new A(this.events)}return e.prototype.send=function(e){this.transport.send(e)},e.prototype.connect=function(e){this.transport.connect(e)},e.prototype.close=function(e,t){this.transport.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.transport.isOpen},enumerable:!1,configurable:!0}),e}();function _(e,t){for(var i=e[t++],n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}function I(e){void 0===e&&(e="");for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i+1}e.Protocol=void 0,(r=e.Protocol||(e.Protocol={}))[r.HANDSHAKE=9]="HANDSHAKE",r[r.JOIN_ROOM=10]="JOIN_ROOM",r[r.ERROR=11]="ERROR",r[r.LEAVE_ROOM=12]="LEAVE_ROOM",r[r.ROOM_DATA=13]="ROOM_DATA",r[r.ROOM_STATE=14]="ROOM_STATE",r[r.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",r[r.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA",r[r.ROOM_DATA_BYTES=17]="ROOM_DATA_BYTES",e.ErrorCode=void 0,(s=e.ErrorCode||(e.ErrorCode={}))[s.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",s[s.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",s[s.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",s[s.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",s[s.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",s[s.AUTH_FAILED=4215]="AUTH_FAILED",s[s.APPLICATION_ERROR=4216]="APPLICATION_ERROR";var O={};function P(e){var t=O[e];if(!t)throw Error("missing serializer: "+e);return t}var M=function(){return{emit:function(e){for(var t=[],i=1;i=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,utf8Write:w,int8:T,uint8:S,int16:A,uint16:C,int32:_,uint32:I,int64:O,uint64:P,float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},writeFloat32:D,writeFloat64:k,boolean:function(e,t){return S(e,t?1:0)},string:N,number:F});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),q=new Float32Array(X.buffer),K=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),q[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),K[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,int8:U,uint8:V,int16:G,uint16:j,int32:W,uint32:Y,float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int64:H,uint64:z,readFloat32:J,readFloat64:$,boolean:function(e,t){return V(e,t)>0},string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},arrayCheck:function(e,t){return e[t.offset]<160},switchStructureCheck:ee}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){this.refCounts[e]=this.refCounts[e]-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:u;if(y===e.OPERATION.CLEAR){r.clear(a);continue}var b=p?u%(y||255):Z(i,n),x=p?r._definition.fieldsByIndex[b]:"",E=f.getType(b),w=void 0,T=void 0,S=void 0;if(p?T=r["_".concat(x)]:(T=r.getByIndex(b),(y&e.OPERATION.ADD)===e.OPERATION.ADD?(S=r instanceof m?Q(i,n):b,r.setIndex(b,S)):S=r.getIndex(b)),(y&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(y!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(b),T&&T.$changes&&o.removeRef(T.$changes.refId),w=null),void 0===x){console.warn("@colyseus/schema: definition mismatch");for(var A={offset:n.offset};n.offset (".concat(e,") ").concat(t))}),this.onLeave(function(){return i.removeAllListeners()})}return Object.defineProperty(t.prototype,"id",{get:function(){return this.roomId},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,i,n){void 0===n&&(n=this);var r=new C;n.connection=r,r.events.onmessage=t.prototype.onMessageCallback.bind(n),r.events.onclose=function(e){var t;if(!n.hasJoined){null===(t=console.warn)||void 0===t||t.call(console,"Room connection was closed unexpectedly (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason);return}e.code===h.DEVMODE_RESTART&&i?i():(n.onLeave.invoke(e.code),n.destroy())},r.events.onerror=function(e){var t;null===(t=console.warn)||void 0===t||t.call(console,"Room, onError (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason)},r.connect(e)},t.prototype.leave=function(t){var i=this;return void 0===t&&(t=!0),new Promise(function(n){i.onLeave(function(e){return n(e)}),i.connection?t?i.connection.send([e.Protocol.LEAVE_ROOM]):i.connection.close():i.onLeave.invoke(h.CONSENTED)})},t.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},t.prototype.send=function(t,i){var n,r=[e.Protocol.ROOM_DATA];if("string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),void 0!==i){var s=function(e){var t=[],i=[],n=new ArrayBuffer(function e(t,i,n){var r=typeof n,s=0,a=0,o=0,h=0,c=0,l=0;if("string"===r){if((c=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(n))<32)t.push(160|c),l=1;else if(c<256)t.push(217,c),l=2;else if(c<65536)t.push(218,c>>8,c),l=3;else if(c<4294967296)t.push(219,c>>24,c>>16,c>>8,c),l=5;else throw Error("String too long");return i.push({_str:n,_length:c,_offset:t.length}),l+c}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(t.push(n),1):n<256?(t.push(204,n),2):n<65536?(t.push(205,n>>8,n),3):n<4294967296?(t.push(206,n>>24,n>>16,n>>8,n),5):(o=n/4294967296>>0,h=n>>>0,t.push(207,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):n>=-32?(t.push(n),1):n>=-128?(t.push(208,n),2):n>=-32768?(t.push(209,n>>8,n),3):n>=-2147483648?(t.push(210,n>>24,n>>16,n>>8,n),5):(o=Math.floor(n/4294967296),h=n>>>0,t.push(211,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):(t.push(203),i.push({_float:n,_length:8,_offset:t.length}),9);if("object"===r){if(null===n)return t.push(192),1;if(Array.isArray(n)){if((c=n.length)<16)t.push(144|c),l=1;else if(c<65536)t.push(220,c>>8,c),l=3;else if(c<4294967296)t.push(221,c>>24,c>>16,c>>8,c),l=5;else throw Error("Array too large");for(s=0;s=0&&f>=0&&d<=17179869183?0===f&&d<=4294967295?(t.push(214,255,d>>24,d>>16,d>>8,d),6):(o=d/4294967296,h=4294967295&d,t.push(215,255,f>>22,f>>14,f>>6,o,h>>24,h>>16,h>>8,h),10):(o=Math.floor(d/4294967296),h=d>>>0,t.push(199,12,255,f>>24,f>>16,f>>8,f,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),15)}if(n instanceof ArrayBuffer){if((c=n.byteLength)<256)t.push(196,c),l=2;else if(c<65536)t.push(197,c>>8,c),l=3;else if(c<4294967296)t.push(198,c>>24,c>>16,c>>8,c),l=5;else throw Error("Buffer too large");return i.push({_bin:n,_length:c,_offset:t.length}),l+c}if("function"==typeof n.toJSON)return e(t,i,n.toJSON());var p=[],g="",m=Object.keys(n);for(s=0,a=m.length;s>8,c),l=3;else if(c<4294967296)t.push(223,c>>24,c>>16,c>>8,c),l=5;else throw Error("Object too large");for(s=0;s0&&(o=i[0]._offset);for(var h,c=0,l=0,u=0,d=t.length;u>6):(n<55296||n>=57344?e.setUint8(t++,224|n>>12):(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e.setUint8(t++,240|n>>18),e.setUint8(t++,128|n>>12&63)),e.setUint8(t++,128|n>>6&63)),e.setUint8(t++,128|63&n))}(r,l,h._str):void 0!==h._float&&r.setFloat64(l,h._float);s++,a+=c,i[s]&&(o=i[s]._offset)}return n}(i);(n=new Uint8Array(r.length+s.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(s),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},t.prototype.sendBytes=function(t,i){var n,r=[e.Protocol.ROOM_DATA_BYTES];"string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),(n=new Uint8Array(r.length+(i.byteLength||i.length))).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length),this.connection.send(n.buffer)},Object.defineProperty(t.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),t.prototype.removeAllListeners=function(){this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},t.prototype.onMessageCallback=function(t){var i=Array.from(new Uint8Array(t.data)),n=i[0];if(n===e.Protocol.JOIN_ROOM){var r=1,s=_(i,1);if(r+=I(s),this.serializerId=_(i,r),r+=I(this.serializerId),!this.serializer){var a=P(this.serializerId);this.serializer=new a}i.length>r&&this.serializer.handshake&&this.serializer.handshake(i,{offset:r}),this.reconnectionToken="".concat(this.roomId,":").concat(s),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([e.Protocol.JOIN_ROOM])}else if(n===e.Protocol.ERROR){var o={offset:1},h=D.decode.number(i,o),c=D.decode.string(i,o);this.onError.invoke(h,c)}else if(n===e.Protocol.LEAVE_ROOM)this.leave();else if(n===e.Protocol.ROOM_DATA_SCHEMA){var l={offset:1},u=this.serializer.getState().constructor._context.get(D.decode.number(i,l)),c=new u;c.decode(i,l),this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_STATE)i.shift(),this.setState(i);else if(n===e.Protocol.ROOM_STATE_PATCH)i.shift(),this.patch(i);else if(n===e.Protocol.ROOM_DATA){var d={offset:1},u=D.decode.stringCheck(i,d)?D.decode.string(i,d):D.decode.number(i,d),c=i.length>d.offset?function(e,t){void 0===t&&(t=0);var i=new T(e,t),n=i._parse();if(i._offset!==e.byteLength)throw Error(e.byteLength-i._offset+" trailing bytes");return n}(t.data,d.offset):void 0;this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_DATA_BYTES){var f={offset:1},u=D.decode.stringCheck(i,f)?D.decode.string(i,f):D.decode.number(i,f);this.dispatchMessage(u,new Uint8Array(i.slice(f.offset)))}},t.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.dispatchMessage=function(e,t){var i,n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):null===(i=console.warn)||void 0===i||i.call(console,"colyseus.js: onMessage() not registered for type '".concat(e,"'."))},t.prototype.destroy=function(){this.serializer&&this.serializer.teardown()},t.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$".concat(e._typeid);case"string":return e;case"number":return"i".concat(e);default:throw Error("invalid message type.")}},t}();function N(e,t){t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function F(e,t,i){var n,r,s=(i=i||{}).body;return i.method=e,i.headers=i.headers||{},s instanceof FormData||s&&"object"==typeof s&&(i.headers["content-type"]="application/json",i.body=JSON.stringify(s)),i.withCredentials&&(i.credentials="include"),i.timeout&&(r=new AbortController,i.signal=r.signal,n=setTimeout(r.abort,i.timeout)),new Promise((e,a)=>{fetch(t,i).then((t,r)=>{clearTimeout(n),N(t,t),r=t.status>=400?a:e,(s=t.headers.get("content-type"))&&~s.indexOf("application/json")?t.text().then(e=>{try{t.data=JSON.parse(e,i.reviver),r(t)}catch(e){e.headers=t.headers,N(t,e),a(e)}}):r(t)}).catch(e=>{e.timeout=r&&r.signal.aborted,a(e)})})}var B=F.bind(F,"GET"),U=F.bind(F,"POST"),V=F.bind(F,"PATCH"),G=F.bind(F,"DELETE"),j=F.bind(F,"PUT"),W={del:G,get:B,patch:V,post:U,put:j,send:F},Y=(o={__proto__:null,default:W,del:G,get:B,patch:V,post:U,put:j,send:F},[W].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in o)){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(o)),H=function(){function e(e){this.client=e}return e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("get",e,t)},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.request("post",e,t)},e.prototype.del=function(e,t){return void 0===t&&(t={}),this.request("del",e,t)},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.request("put",e,t)},e.prototype.request=function(e,t,i){return void 0===i&&(i={}),Y[e](this.client.getHttpEndpoint(t),this.getOptions(i)).catch(function(e){var t,i=e.statusCode,n=(null===(t=e.data)||void 0===t?void 0:t.error)||e.statusMessage||e.message;if(!i&&!n)throw e;throw new w(i,n)})},e.prototype.getOptions=function(e){return this.authToken&&(e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(this.authToken)),"undefined"!=typeof cc&&cc.sys&&cc.sys.isNative||(e.withCredentials=!0),e},e}();function z(){if(!c)try{c="undefined"!=typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:window.localStorage}catch(e){}return c||(c={cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),c}var X=function(){function e(e){var t,i,n,r=this;this.http=e,this.settings={path:"/auth",key:"colyseus-auth-token"},l.set(this,!1),u.set(this,void 0),d.set(this,void 0),f.set(this,M()),t=this.settings.key,i=function(e){return r.token=e},n=z().getItem(t),"undefined"!=typeof Promise&&n instanceof Promise?n.then(function(e){return i(e)}):i(n)}return Object.defineProperty(e.prototype,"token",{get:function(){return this.http.authToken},set:function(e){this.http.authToken=e},enumerable:!1,configurable:!0}),e.prototype.onChange=function(e){var t=this,i=x(this,f,"f").on("change",e);return x(this,l,"f")||E(this,u,new Promise(function(e,i){t.getUserData().then(function(e){t.emitChange(v(v({},e),{token:t.token}))}).catch(function(e){t.emitChange({user:null,token:void 0})}).finally(function(){e()})}),"f"),E(this,l,!0,"f"),i},e.prototype.getUserData=function(){return y(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(!this.token)return[3,2];return[4,this.http.get("".concat(this.settings.path,"/userdata"))];case 1:return[2,e.sent().data];case 2:throw Error("missing auth.token")}})})},e.prototype.registerWithEmailAndPassword=function(e,t,i){return y(this,void 0,void 0,function(){var n;return b(this,function(r){switch(r.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/register"),{body:{email:e,password:t,options:i}})];case 1:return n=r.sent().data,this.emitChange(n),[2,n]}})})},e.prototype.signInWithEmailAndPassword=function(e,t){return y(this,void 0,void 0,function(){var i;return b(this,function(n){switch(n.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/login"),{body:{email:e,password:t}})];case 1:return i=n.sent().data,this.emitChange(i),[2,i]}})})},e.prototype.signInAnonymously=function(e){return y(this,void 0,void 0,function(){var t;return b(this,function(i){switch(i.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/anonymous"),{body:{options:e}})];case 1:return t=i.sent().data,this.emitChange(t),[2,t]}})})},e.prototype.sendPasswordResetEmail=function(e){return y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/forgot-password"),{body:{email:e}})];case 1:return[2,t.sent().data]}})})},e.prototype.signInWithProvider=function(e,t){return void 0===t&&(t={}),y(this,void 0,void 0,function(){var i=this;return b(this,function(n){return[2,new Promise(function(n,r){var s=t.width||480,a=t.height||768,o=i.token?"?token=".concat(i.token):"",h="Login with ".concat(e[0].toUpperCase()+e.substring(1)),c=i.http.client.getHttpEndpoint("".concat(t.prefix||"".concat(i.settings.path,"/provider"),"/").concat(e).concat(o)),l=screen.width/2-s/2,u=screen.height/2-a/2;E(i,d,window.open(c,h,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+s+", height="+a+", top="+u+", left="+l),"f");var f=function(e){(void 0!==e.data.user||void 0!==e.data.token)&&(clearInterval(p),x(i,d,"f").close(),E(i,d,void 0,"f"),window.removeEventListener("message",f),void 0!==e.data.error?r(e.data.error):(n(e.data),i.emitChange(e.data)))},p=setInterval(function(){(!x(i,d,"f")||x(i,d,"f").closed)&&(E(i,d,void 0,"f"),r("cancelled"),window.removeEventListener("message",f))},200);window.addEventListener("message",f)})]})})},e.prototype.signOut=function(){return y(this,void 0,void 0,function(){return b(this,function(e){return this.emitChange({user:null,token:null}),[2]})})},e.prototype.emitChange=function(e){if(void 0!==e.token){var t,i,n;(this.token=e.token,null===e.token)?(t=this.settings.key,z().removeItem(t)):(i=this.settings.key,n=e.token,z().setItem(i,n))}x(this,f,"f").emit("change",e)},e}();function q(e){var t,i=(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hostname)||"localhost",n=e.hostname.split("."),r=e.hostname.includes("trycloudflare.com")||e.hostname.includes("discordsays.com")||!(n.length>2)?"":"/".concat(n[0]);return e.pathname.startsWith("/.proxy")?"".concat(e.protocol,"//").concat(i).concat(r).concat(e.pathname).concat(e.search):"".concat(e.protocol,"//").concat(i,"/.proxy/colyseus").concat(r).concat(e.pathname).concat(e.search)}l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap;var K=function(e){function t(i,n){var r=e.call(this,i)||this;return r.code=n,Object.setPrototypeOf(r,t.prototype),r}return m(t,e),t}(Error),J="undefined"!=typeof window&&void 0!==(null===(p=null==window?void 0:window.location)||void 0===p?void 0:p.hostname)?"".concat(window.location.protocol.replace("http","ws"),"//").concat(window.location.hostname).concat(window.location.port&&":".concat(window.location.port)):"ws://127.0.0.1:2567",$=function(){function e(e,t){if(void 0===e&&(e=J),"string"==typeof e){var i,n,r=e.startsWith("/")?new URL(e,J):new URL(e),s="https:"===r.protocol||"wss:"===r.protocol,a=Number(r.port||(s?443:80));this.settings={hostname:r.hostname,pathname:r.pathname,port:a,secure:s}}else void 0===e.port&&(e.port=e.secure?443:80),void 0===e.pathname&&(e.pathname=""),this.settings=e;this.settings.pathname.endsWith("/")&&(this.settings.pathname=this.settings.pathname.slice(0,-1)),this.http=new H(this),this.auth=new X(this.http),this.urlBuilder=t,!this.urlBuilder&&"undefined"!=typeof window&&(null===(n=null===(i=null==window?void 0:window.location)||void 0===i?void 0:i.hostname)||void 0===n?void 0:n.includes("discordsays.com"))&&(this.urlBuilder=q,console.log("Colyseus SDK: Discord Embedded SDK detected. Using custom URL builder."))}return e.prototype.joinOrCreate=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.create=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.join=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.joinById=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.reconnect=function(e,t){return y(this,void 0,void 0,function(){var i,n,r;return b(this,function(s){switch(s.label){case 0:if("string"==typeof e&&"string"==typeof t)throw Error("DEPRECATED: .reconnect() now only accepts 'reconnectionToken' as argument.\nYou can get this token from previously connected `room.reconnectionToken`");if(n=(i=e.split(":"))[0],r=i[1],!n||!r)throw Error("Invalid reconnection token format.\nThe format should be roomId:reconnectionToken");return[4,this.createMatchMakeRequest("reconnect",n,{reconnectionToken:r},t)];case 1:return[2,s.sent()]}})})},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.get("matchmake/".concat(e),{headers:{Accept:"application/json"}})];case 1:return[2,t.sent().data]}})})},e.prototype.consumeSeatReservation=function(e,t,i){return y(this,void 0,void 0,function(){var n,r,s,a=this;return b(this,function(o){return(n=this.createRoom(e.room.name,t)).roomId=e.room.roomId,n.sessionId=e.sessionId,r={sessionId:n.sessionId},e.reconnectionToken&&(r.reconnectionToken=e.reconnectionToken),s=i||n,n.connect(this.buildEndpoint(e.room,r),e.devMode&&function(){return y(a,void 0,void 0,function(){var i,r,a=this;return b(this,function(o){return console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," Re-establishing connection with room id '").concat(n.roomId,"'...")),i=0,setTimeout(r=function(){return y(a,void 0,void 0,function(){return b(this,function(a){switch(a.label){case 0:i++,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.consumeSeatReservation(e,t,s)];case 2:return a.sent(),console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(9989)," Successfully re-established connection with room '").concat(n.roomId,"'")),[3,4];case 3:return a.sent(),i<8?(console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," retrying... (").concat(i," out of ").concat(8,")")),setTimeout(r,2e3)):console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(10060)," Failed to reconnect. Is your server running? Please check server logs.")),[3,4];case 4:return[2]}})})},2e3),[2]})})},s),[2,new Promise(function(e,t){var i=function(e,i){return t(new w(e,i))};s.onError.once(i),s.onJoin.once(function(){s.onError.remove(i),e(s)})})]})})},e.prototype.createMatchMakeRequest=function(e,t,i,n,r){return void 0===i&&(i={}),y(this,void 0,void 0,function(){var s;return b(this,function(a){switch(a.label){case 0:return[4,this.http.post("matchmake/".concat(e,"/").concat(t),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})];case 1:if((s=a.sent().data).error)throw new K(s.error,s.code);return"reconnect"===e&&(s.reconnectionToken=i.reconnectionToken),[4,this.consumeSeatReservation(s,n,r)];case 2:return[2,a.sent()]}})})},e.prototype.createRoom=function(e,t){return new k(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push("".concat(n,"=").concat(t[n]));var r=this.settings.secure?"wss://":"ws://";e.publicAddress?r+="".concat(e.publicAddress):r+="".concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname);var s="".concat(r,"/").concat(e.processId,"/").concat(e.roomId,"?").concat(i.join("&"));return this.urlBuilder?this.urlBuilder(new URL(s)):s},e.prototype.getHttpEndpoint=function(e){void 0===e&&(e="");var t=e.startsWith("/")?e:"/".concat(e),i="".concat(this.settings.secure?"https":"http","://").concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname).concat(t);return this.urlBuilder?this.urlBuilder(new URL(i)):i},e.prototype.getEndpointPort=function(){return 80!==this.settings.port&&443!==this.settings.port?":".concat(this.settings.port):""},e}(),Q=function(){function e(){}return e.prototype.setState=function(e){return this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){return this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?new D.Reflection().decode(e,t):this.state=D.Reflection.decode(e,t)},e}(),Z=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();O.schema=Q,O.none=Z,e.Auth=X,e.Client=$,e.Room=k,e.SchemaSerializer=Q,e.registerSerializer=function(e,t){O[e]=t},Object.defineProperty(e,"__esModule",{value:!0})}(i)},{}],"9vHHC":[function(e,t,i){t.exports.RoomsConst={ROOM_TYPE_SCENE:"scene",ROOM_TYPE_LOGIN:"login",ROOM_TYPE_GAME:"game",TILE_INDEX:"i",NEXT_SCENE:"n",MAPS_BUCKET:"/assets/maps",ROOM_LAST_LOCATION_KEY:"@lastLocation",RETURN_POINT_KEYS:{DIRECTION:"d",X:"x",Y:"y",DEFAULT:"de",PREVIOUS:"p"},ERRORS:{CREATING_ROOM_AWAIT:"CREATING-ROOM-AWAIT"}}},{}],"93TbC":[function(e,t,i){t.exports.GameConst={START_GAME:"s",ACTION_KEY:"act",CREATE_PLAYER:"cp",CREATE_PLAYER_RESULT:"cps",CHANGING_SCENE:"cgs",CHANGED_SCENE:"cs",RECONNECT:"r",ROOM_GAME:"room_game",ROOM_NAME_MAP:"Map",SCENE_PRELOADER:"ScenePreloader",PLAYER_STATS:"ps",ICON_STATS:"player-stats",CLIENT_JOINED:"cj",UI:"ui",CLOSE_UI_ACTION:"closeUi",TYPE_PLAYER:"pj",GAME_OVER:"go",REVIVED:"rv",BUTTON_OPTION:"btn-opt",UI_BOX:"box",UI_CLOSE:"-close",UI_OPEN:"-open",UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right",STOP:"stop",POINTER:"mp",ARROW_DOWN:"ard",IMAGE_PLAYER:"player",ACTIONS:{LOGIN_UPDATE_ERROR:"luer"},STATUS:{ACTIVE:1,DISABLED:2,DEATH:3,AVOID_INTERPOLATION:4},STRUCTURE:{DEFAULT:"default",ASSETS:"assets",CSS:"css",DIST:"dist",THEME:"theme",LIB:"lib",SERVER:"server",CLIENT:"client",PLUGINS:"plugins",INDEX:"index.html",SCSS_FILE:"styles.scss",CSS_FILE:"styles.css",ADMIN:"admin",TEMPLATES:"templates",ADMIN_JS_FILE:"reldens-admin-client.js",ADMIN_SCSS_FILE:"reldens-admin-client.scss",ADMIN_CSS_FILE:"reldens-admin-client.css",INSTALLER_FOLDER:"install",INSTALL_LOCK:"install.lock"},ROUTE_PATHS:{DISCONNECT_USER:"/reldens-disconnect-user",TERMS_AND_CONDITIONS:"/terms-and-conditions",MAILER:"/reldens-mailer-enabled",FIREBASE:"/reldens-firebase"},SELECTORS:{BODY:"body",CANVAS:"CANVAS",INPUT:"input",FORMS_CONTAINER:".forms-container",REGISTER_FORM:"#register-form",GUEST_FORM:"#guest-form",LOGIN_FORM:"#login-form",FORGOT_PASSWORD_FORM:"#forgot-form",PLAYER_CREATE_FORM:".player-create-form",PLAYER_SELECTION:"#player-selection",FULL_SCREEN_BUTTON:".full-screen-btn",RESPONSE_ERROR:".response-error",LOADING_CONTAINER:".loading-container",REGISTRATION:{PASSWORD:"#reg-password",RE_PASSWORD:"#reg-re-password",EMAIL:"#reg-email",USERNAME:"#reg-username"},GUEST:{USERNAME:"#guest-username"},LOGIN:{USERNAME:"#username",PASSWORD:"#password"},FORGOT_PASSWORD:{EMAIL:"#forgot-email",CONTAINER:".forgot-password-container"},TERMS:{BOX:"#terms-and-conditions",CONTAINER:".terms-and-conditions-container",LINK_CONTAINER:".terms-and-conditions-link-container",LINK:".terms-and-conditions-link",ACCEPT:"#accept-terms-and-conditions",ACCEPT_LABEL:".accept-terms-and-conditions-label",HEADING:".terms-heading",BODY:".terms-body",CLOSE:"#terms-and-conditions-close"},GAME_CONTAINER:".game-container"},CLASSES:{HIDDEN:"hidden",GAME_STARTED:"game-started",GAME_ERROR:"game-error",GAME_ENGINE_STARTED:"game-engine-started",FULL_SCREEN_ON:"full-screen-on"},MESSAGE:{DATA_VALUES:{NAMESPACE:"game"}},LABELS:{YES:"Yes",NO:"No"},ANIMATIONS_TYPE:{SPRITESHEET:"spritesheet"},FILES:{EXTENSIONS:{PNG:".png"}},GRAPHICS:{FRAME_WIDTH:32,FRAME_HEIGHT:32},SHOW_PLAYER_TIME:{NONE:-1,ONLY_OWN_PLAYER:0,ALL_PLAYERS:2}}},{}],"3lwy5":[function(e,t,i){let n=e("a4ab2983c9d35fd8");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("1695e46110f15942"),InteractionArea:e("8fd16851c34338c4"),SchemaValidator:e("adcc322a4503ef19"),Logger:e("a5fec30b90d89350"),sc:e("859c680ee2b5bef8")}},{a4ab2983c9d35fd8:"faFOz","1695e46110f15942":"ijj7O","8fd16851c34338c4":"hLS4d",adcc322a4503ef19:"5l910",a5fec30b90d89350:"lJWkj","859c680ee2b5bef8":"2vvao"}],faFOz:[function(e,t,i){let n=e("7cdb1283b540f52c").default,r=e("53a92d7fd4d1ab5e"),s=e("fb3dac7fa90fc435");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"7cdb1283b540f52c":"46bZC","53a92d7fd4d1ab5e":"lJWkj",fb3dac7fa90fc435:"2vvao"}],"46bZC":[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);let n=e("e8bdbc586c5c4645"),r="function"==typeof Symbol?Symbol.for("--[[await-event-emitter]]--"):"--[[await-event-emitter]]--";function s(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("type is not type of string or symbol!")}function a(e){if("function"!=typeof e)throw TypeError("fn is not type of Function!")}function o(e){return{[r]:"always",fn:e}}function h(e){return{[r]:"once",fn:e}}i.default=class{constructor(){this._events={}}addListener(e,t){return this.on(e,t)}on(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(o(t)),this}prependListener(e,t){return this.prepend(e,t)}prepend(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(o(t)),this}prependOnceListener(e,t){return this.prependOnce(e,t)}prependOnce(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(h(t)),this}listeners(e){return(this._events[e]||[]).map(e=>e.fn)}once(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(h(t)),this}removeAllListeners(){this._events={}}off(e,t){return this.removeListener(e,t)}removeListener(e,t){s(e);let i=this.listeners(e);if("function"!=typeof t)return delete this._events[e];{let n=-1,r=!1;for(;(n=i.indexOf(t))>=0;)i.splice(n,1),this._events[e].splice(n,1),r=!0;return r}}emit(e,...t){var i,a,o,h;return i=this,a=void 0,o=void 0,h=function*(){s(e);let i=this.listeners(e),a=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1},new(o||(o=Promise))(function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function r(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):((i=t.value)instanceof o?i:new o(function(e){e(i)})).then(n,r)}s((h=h.apply(i,a||[])).next())})}emitSync(e,...t){s(e);let i=this.listeners(e),n=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1}}},{e8bdbc586c5c4645:"kaCjt","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],kaCjt:[function(e,t,i){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n},{}],"2SoND":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}],lJWkj:[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"2vvao":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t{this.clearTarget()}),this.eventsManager.on("reldens.beforeSceneDynamicCreate",e=>{this.setupTabTarget(e)})}parseTemplate(e,t,i,n){return this.TemplateEngine.render(e,t,i,n)}updateGameSize(e){let{newWidth:t,newHeight:i}=this.getCurrentScreenSize(e);setTimeout(()=>{for(let e of(this.eventsManager.emit("reldens.updateGameSizeBefore",this,t,i),this.scale.setGameSize(t,i),Object.keys(this.uiScene.elementsUi))){let n=this.uiScene.elementsUi[e],r=l.get(this.uiScene.userInterfaces[e],"uiPositionKey",e),{uiX:s,uiY:a}=this.uiScene.getUiConfig(r,t,i);n.x=s,n.y=a}this.eventsManager.emit("reldens.updateGameSizeAfter",this,t,i)},e.config.getWithoutLogs("client/general/gameEngine/updateGameSizeTimeOut",500))}getCurrentScreenSize(e){let t=e.gameDom.getElement(".game-container").offsetWidth,i=e.gameDom.getElement(".game-container").offsetHeight,n=t,r=i,s=e.getActiveScene();return s&&s.map&&(n=Math.min(t,s.map.width*s.map.tileWidth),r=Math.min(i,s.map.height*s.map.tileHeight)),{newWidth:n=Math.min(n,Number(e.config.get("client/ui/maximum/x"))),newHeight:r=Math.min(r,Number(e.config.get("client/ui/maximum/y")))}}showTarget(e,t,i){l.hasOwn(this.uiScene,"uiTarget")&&(this.uiScene.uiTarget.getChildByID("box-target").style.display="block",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=this.targetDisplay(e,t)),this.eventsManager.emit("reldens.gameEngineShowTarget",this,t,i,e)}targetDisplay(e,t){let i=e;return o.TYPE_PLAYER===t.type&&(i+=this.generateTargetPlayedTime(t)),i}generateTargetPlayedTime(e){let t="",i=this.uiScene.gameManager.config.getWithoutLogs("client/players/playedTime/show",o.SHOW_PLAYER_TIME.ONLY_OWN_PLAYER);if(o.SHOW_PLAYER_TIME.NONE===i)return t;let n=this.uiScene.gameManager.getCurrentPlayer();if(o.SHOW_PLAYER_TIME.ALL_PLAYERS===i||n.playerId===e.id){let i=this.obtainPlayedTime(e,n);t+=this.createPlayedTimeLabel(i)}return t}createPlayedTimeLabel(e){let t=this.uiScene.gameManager.gameDom.createElement("p");return t.innerHTML=this.uiScene.gameManager.config.get("client/players/playedTime/label").replace("%playedTimeInHs",e),t.outerHTML}obtainPlayedTime(e,t){return(t.players[e.id].playedTime/60/60).toFixed(1)}clearTarget(){let e=this.uiScene.gameManager.activeRoomEvents.getActiveScene(),t=Object.assign({},e.player.currentTarget);l.hasOwn(this.uiScene,"uiTarget")&&(e.player.currentTarget=!1,this.uiScene.uiTarget.getChildByID("box-target").style.display="none",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=""),this.eventsManager.emit("reldens.gameEngineClearTarget",this,t)}setupTabTarget(e){e.keyTab=e.input.keyboard.addKey(s.Keyboard.KeyCodes.TAB),e.input.keyboard.addCapture(s.Keyboard.KeyCodes.TAB),e.input.keyboard.on("keydown",e=>{9===e.keyCode&&this.tabTarget()})}tabTarget(){let e=this.uiScene.gameManager.getCurrentPlayer(),t=this.uiScene.gameManager.getActiveScene().objectsAnimations,i=e.players,n=!1,r="",s=!!e.currentTarget&&Object.assign({},e.currentTarget);for(let i of Object.keys(t)){if(!t[i].targetName)continue;let s=Math.hypot(t[i].x-e.state.x,t[i].y-e.state.y);e.currentTarget.id!==t[i].key&&(!n||n.dist>s)&&(n={id:t[i].key,type:h.TYPE_OBJECT,dist:s},r=t[i].targetName)}for(let t of Object.keys(i)){if(e.playerName===i[t].playerName)continue;let s=Math.hypot(i[t].x-e.state.x,i[t].y-e.state.y);e.currentTarget.id!==i[t].id&&(!n||n.dist>s)&&(n={id:t,type:o.TYPE_PLAYER,dist:s},r=i[t].playerName)}e.currentTarget=n,this.showTarget(r,n,s),this.eventsManager.emit("reldens.gameEngineTabTarget",this,n,s)}showFPS(){this.fpsCounter=new a(this.uiScene.gameManager.gameDom),this.fpsCounter.start()}}},{ba5852f7a848a882:"kOY07",de87093dc78fab7a:"8S6DV",cb52d956827ba0f7:"e7OdC",ef9f208014f49bfb:"93TbC","74f28c3d4fc67c29":"izuLV","2aadc4f845e0da5b":"3lwy5"}],kOY07:[function(e,t,i){var n;n=function(){/*! +!function(e,t,i,n,r){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],o=a.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!o[t]){if(!e[t]){var r="function"==typeof s[n]&&s[n];if(!i&&r)return r(t,!0);if(a)return a(t,!0);if(h&&"string"==typeof t)return h(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return o[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=a,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return s[n]}}),s[n]=c;for(var l=0;l{s.clientStart()}),s.events.on("reldens.afterInitEngineAndStartGame",()=>{s.gameDom.getElement("#current-version").innerHTML=s.config.client.gameEngine.version+" -"}),s.events.on("reldens.startGameAfter",()=>{s.gameDom.getElement(".row-disclaimer")?.remove()}),s.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{if("rski.Bc"!==e.act)return;let t=(e.data?.skillKey||"").toString(),i=Number(e.data?.extraData?.sd||0);if(""!==t&&0=r){e.style.setProperty("--angle","360deg"),e.classList.remove("cooldown");return}e.style.setProperty("--angle",`${(i-r)/i*360}deg`),requestAnimationFrame(t)}()}})}),window.reldens=s},{f6a573e6a894b077:"blTPb","22d25a4cea3c3bc":"7ASKi"}],blTPb:[function(e,t,i){e("684699bf663c3eb9"),e("8524ab6b767fe50d");let{GameManager:n}=e("163628b93f1bf46b");t.exports.GameManager=n},{"684699bf663c3eb9":"6H8Vf","8524ab6b767fe50d":"ikKUq","163628b93f1bf46b":"eDoZE"}],"6H8Vf":[function(e,t,i){e("1784995cff40f4ee"),e("3db84f65815009e9"),e("eaee9f5716583d73"),e("375d8cdc37856052"),e("b97ac47c987ae87a"),e("a021542673f3dca5"),e("4917cb57871d338e"),e("32b253e39e74d8bb"),e("389e51d5714f687f"),e("f5e993e561fd02cd"),e("bb2bc4d4414bdde6"),e("efe695102c445413"),e("ccd56f09b115e545"),e("fcaf4e6617f043bc"),e("653d106c82dca6c3"),e("e3cead5be66b9f0d"),e("f0a4c78fa0016f60"),e("1d68ebee0b3f96f0"),e("af40359e9eb052ec"),e("b57c55c586369faa"),e("6e929cb8fa33300f"),e("a021c9c924d06b99"),e("c3a2ae3c387d24da"),e("4b806e1bc40e42a5"),e("4e1bbb4edd22e0ae"),e("716f90fa84e1f77c"),e("a4c895062bc52ef"),e("ab8b1e642f069677"),e("1c9c9c4583180611"),e("f74bd522ba638140"),e("161807fa85856503"),e("f48a3c099ac8e2b5"),e("8cf2e5f73ade81b4"),e("a9422cf3f5275913"),e("cc95b5c4842b3cba"),e("d5f0f9adde262121"),e("c2de5cf351f42e3e"),e("9b044f9dbdd9a543"),e("2c6c7828d3cbd4f7"),e("e4df5de4d418cbbb"),e("914cd91ef0bfb6f9"),e("6f128d6969e825b2"),e("f4ead5d4eb2af5d5"),e("b35e2d13cb589276"),e("c410e1b69fdd7adf"),e("312dd5f9138d6e43"),e("38530968f16263a0"),e("14af908df009beac"),e("dcd91f07678eb4c9"),e("c69d702ec59c2500"),e("4725bcb6f24869b3"),e("3cf52eabf83551bf"),e("c9cbfc3b3c78d70d"),e("6b0227180c3df38c"),e("e0fd70d02f07a4a0"),e("31a608e674c817eb"),e("b880a9dbebb02a2e"),e("46b1ee4ddc311f0"),e("8cf2fe9261c818db"),e("52fba706500b4b2d"),e("ffbe65a8f5be01e6"),e("e1e627d3acaf8d18"),e("f4d9392585892a5b"),e("b04a1a032c30e8d5"),e("c1de8697c29b0da"),e("16d0f8a09ff973a0"),e("a48b7fc982febaf8"),e("b40fbc8703ed802d"),e("71533dcee95bced0"),e("38d8d405ad51cb0c"),e("c8503c219bf01ed1"),e("bc082cafa79546ad"),e("204a0882af55ce2b"),e("a3152d34d8dd7b45"),e("873b1b5c61bcd33"),e("16d6ef4f50e3e6e9"),e("e872f08087c6cb33"),e("657cbbcd48650779"),e("4252d65d3677af5a"),e("281c6fd1d9df7324"),e("c31154b4d54b87f"),e("610034140e218c33"),e("1bc59f7bc4d02b94"),e("1ac49ff73550904e"),e("8fd22c15c1dc3fdb"),e("722244e22d484cd4"),e("d7ec35bad14a1f3f"),e("9bb45158b3bb60e5"),e("dbfda47097dcdc05"),e("62df99a6374ea8e7"),e("30f5c44d5b0c5882"),e("fa34aad1a54cb74f"),e("6e7dfd5f426811ae"),e("f6587d23159bb2e"),e("bb688511262fa331"),e("4ba8f97c77fe72fb"),e("d400d9af20e5e158"),e("89eb5ddf4e423e14"),e("cfeb658fb1129c7d"),e("cf52518d7e23221c"),e("593d4e7884fc0918"),e("30b35f30b6dba51d"),e("24519596b23105e8"),e("69b53c2db51c07c6"),e("cd51cbb6a384e947"),e("b2bec95e117c35ff"),e("e02033538de8d8c6"),e("bb0f24f71db75179"),e("7334e4338273fd72"),e("a00519108abb0534"),e("2835a3239b6a1bc4"),e("f5faf41ae9cf1c5"),e("5e6fa649046f5df2"),e("84775698f8fef6c0"),e("8c2455e35e11d959"),e("1cee7874e0ff2b2b"),e("6d098447a1b2abdc"),e("7d7d81ff5b818a49"),e("c33461c993e8e491"),e("64a89b8cfcf7ab12"),e("300ca7e5c4ba71de"),e("5ea06ea856112f5d"),e("2f95ea182a42efc3"),e("7e00e0c0121e6a90"),e("43c70c31a61cc402"),e("7f64762e2c0d0f2e"),e("7a6c9bba2845dabe"),e("73d9d26ef5a08f08"),e("f671014547fe0e5e"),e("b36c3c3b6e78e925"),e("a7f5dbf9fb623d0a"),e("465fceaf1bde589b"),e("7766539bc795a94"),e("4faee6716fa8629d"),e("7737fbcafb7ce523"),e("e90b0a3a493c0ede"),e("26317a793dea7e9a"),e("9f5e020a3549a118"),e("9d0bfe01231db1a7"),e("b1221eae0bc5f9b"),e("c5352c47687ac7c"),e("34fe45ae8ed17da0"),e("781c619e0cad12e2"),e("7c6b58bad8dc3b81"),e("736ca46bafb50f8f"),e("4a8b2b3ca7e4d0f0"),e("3fd33a4a9e23fb29"),e("88ad2704384a1a6e"),e("1c6c6da898bf18bb"),e("d239d0cd4a8ca65b"),e("11eae3d8cd132ecd"),e("31d0c33ce951164f"),e("55fc79bd0e9015ff"),e("4c7f59100f9f15df"),e("45eab59e8e26538d"),e("46220f971d58285"),e("37e3f8df977640b7"),e("4449d13eae7996a8"),e("197d7cc5dd2340b0"),e("1ec03223143b45c0"),e("b3160300f21af751"),e("efbae5e5ed53d7a4"),e("78d707d60e5ff2ef"),e("6aa1c963ba0fa26a"),e("29093847653ffb17"),e("b0554b151edd2f4"),e("c5299b37711c29ed"),e("334e6eea450261d0"),e("12c4df9fff4b4031"),e("9121fee042bcac7e"),e("5d62685ef5ad6e57"),e("3e4b4c735ca60ab9"),e("bb7017f5a1be1e59"),e("e8e708482f11c7ff"),e("74095422c65e093c"),e("6d6ea5c3920f0ba9"),e("3447041b04906440"),e("90c4a005313bad84"),e("4769b7aec07e6de3"),e("925b64021990cd94"),e("6b93322692746037"),e("faa76facff418618"),e("c9933e8bbe42bd93"),e("8689abb82cc2e305"),e("2b087e045ed8c999"),e("5345958572918685"),e("3be5275c466b41f8"),e("8aac76b9f2cbbdb5"),e("be9c14095a58943"),e("43202def26bf6f4d"),e("2d80f533903ef8af"),e("218de58a047e4122"),e("e9c3dc5d87196314"),e("e941f90445a42817"),e("5ec6c25f739e2e3"),e("dcf33a0bfc9dbd80"),e("11e994014f9ea4ef"),e("d3d2c1ecea6b651e"),e("2942bfa075e0734"),e("d33b293dd98ee251"),e("4d67970b1d16e278"),e("ea23a5ff87e419a"),e("a4ec7d06d49f6770"),e("68de4d9a4e90a51d"),e("91a33ef14a8f152c"),e("55178304aaa34b5d"),e("100585ac292d4d0a"),e("11bb9bd5ef85c385"),e("6985fc4c13b8c019"),e("9632a736fdb17734"),e("645f58b86974fd27"),e("679ce5136028bc60"),e("16129f94bb5d1db1"),e("4a20575877b9aa9"),e("f493cf27dec8fda2"),e("9455107212c82097"),e("7abb352823d027e3"),e("23cd38aa92bb5713"),e("7fa171f672c06c5"),e("d6c3f6742b067ddd"),e("687e66ea18227d4f"),e("4be9f7f33ab31972"),e("4b97ceec572fb5ac"),e("6962fb765acff151"),e("1a45d71179cc6824"),e("546ab40a97e46161"),e("b9d67d5f8399a961"),e("4d6a7c1e95ef8439"),e("61fca23ef75aa33f"),e("1c1cdf9b06016701"),e("397bfa6741ea05a1"),e("ec6da7c8737ed287"),e("9a3b23b9904e7580"),e("42c1ca9f44d09740"),e("6c230af164d5e531"),e("a1fd07c504fbd6e2"),e("c5418e31406f900c"),e("6bd1db6cc401cbae"),e("5cc85e0e2e9dc320"),e("e50d5b519a148fce"),e("57eafc4eec0ed5ad"),e("9f4e766b833041e1"),e("51d5ec10d288761f"),e("3df881631b0076c1"),e("6446691a409777d1"),e("65a0e8ac0e64097a"),e("ad09ac1fd0978c3"),e("c80f8d7a3d38c630"),e("c0e2fa2805edb141"),e("52fea7a5cc5e8460"),e("676052465cde8b83"),e("46e3f0ef3febe378"),e("901f94f4ed6ef4d5"),e("2f2afc7fe70ef5f"),e("fa4d7e950018d69e"),e("d0d844c58571e80e"),e("570e34e061eaecd7"),e("557af6dc34fe070e"),e("5dd137372fb5b1ae"),e("812633ee0adaf5e"),e("5be5bf591a25d61c"),e("c98746bc7e199094"),e("52278c0a5be7b19f"),e("fde31c759e8e1c42"),e("5254289c25b91dcf"),e("48ca9e9993ba0327"),e("72aac35e49a6d4bd"),e("37312397abe6d28c"),e("12be35b2aeed3ca4"),e("647a7c082cca257b"),e("a0e00f30db9559ea"),e("6c3ebd0eef294356"),e("a66668b79822160a"),e("72aa7e00c8a7b68f"),e("b1d489d5f98dd626"),e("687c365e52ca4b5b"),e("eedef7a537267c12"),e("f888c4da93185eae"),e("69fc7ceed4f23a4b"),e("a70b9f7f981f56ed"),e("698834137971c6a0"),e("6cbcff253173613e"),e("2d4e83632877e8a1"),e("1f6030e01de03bb8"),e("9e73dc5e3d85a023"),e("d24e5da7655d31c6"),e("e2c547d0925efa21"),e("9cb64708d269ee4d"),e("bad110743800027a"),t.exports=e("b02006442da3179e")},{"1784995cff40f4ee":"emAqF","3db84f65815009e9":"h8vRJ",eaee9f5716583d73:"1JQKT","375d8cdc37856052":"58q3y",b97ac47c987ae87a:"5NvUG",a021542673f3dca5:"lG7CT","4917cb57871d338e":"507Fo","32b253e39e74d8bb":"8PIx1","389e51d5714f687f":"a2cUC",f5e993e561fd02cd:"1yLDd",bb2bc4d4414bdde6:"9Ujdq",efe695102c445413:"45PgI",ccd56f09b115e545:"bJ9qS",fcaf4e6617f043bc:"3tmT4","653d106c82dca6c3":"lbpGg",e3cead5be66b9f0d:"hHHDm",f0a4c78fa0016f60:"aSTrG","1d68ebee0b3f96f0":"8nyV3",af40359e9eb052ec:"j1ABh",b57c55c586369faa:"3LJSA","6e929cb8fa33300f":"jYNHr",a021c9c924d06b99:"9D9sM",c3a2ae3c387d24da:"c1k6c","4b806e1bc40e42a5":"lbPxO","4e1bbb4edd22e0ae":"jKklH","716f90fa84e1f77c":"lMNyP",a4c895062bc52ef:"hPNfA",ab8b1e642f069677:"fURyF","1c9c9c4583180611":"6XyUS",f74bd522ba638140:"d83iu","161807fa85856503":"lc4NN",f48a3c099ac8e2b5:"gjqcj","8cf2e5f73ade81b4":"j3v3L",a9422cf3f5275913:"3rrfH",cc95b5c4842b3cba:"b10MD",d5f0f9adde262121:"2JgXG",c2de5cf351f42e3e:"3prNk","9b044f9dbdd9a543":"le1uL","2c6c7828d3cbd4f7":"eli4M",e4df5de4d418cbbb:"zkrYn","914cd91ef0bfb6f9":"6cM5k","6f128d6969e825b2":"j9q44",f4ead5d4eb2af5d5:"k2yB7",b35e2d13cb589276:"YvN4R",c410e1b69fdd7adf:"eqr1I","312dd5f9138d6e43":"gW4UQ","38530968f16263a0":"joaAA","14af908df009beac":"g2wAi",dcd91f07678eb4c9:"iJYnd",c69d702ec59c2500:"dnmIv","4725bcb6f24869b3":"i9xty","3cf52eabf83551bf":"iGG3n",c9cbfc3b3c78d70d:"iJJcs","6b0227180c3df38c":"afcZD",e0fd70d02f07a4a0:"dpjAZ","31a608e674c817eb":"dI1Cn",b880a9dbebb02a2e:"4XBJJ","46b1ee4ddc311f0":"4u8Zq","8cf2fe9261c818db":"9DwR1","52fba706500b4b2d":"hihCW",ffbe65a8f5be01e6:"cl0wd",e1e627d3acaf8d18:"kDbyn",f4d9392585892a5b:"v0oet",b04a1a032c30e8d5:"ilodQ",c1de8697c29b0da:"3sjfy","16d0f8a09ff973a0":"aJQbh",a48b7fc982febaf8:"cl2UC",b40fbc8703ed802d:"l89H5","71533dcee95bced0":"cHGz3","38d8d405ad51cb0c":"6OeqH",c8503c219bf01ed1:"j16TA",bc082cafa79546ad:"ltluo","204a0882af55ce2b":"l0eoZ",a3152d34d8dd7b45:"40OpE","873b1b5c61bcd33":"bC9Ow","16d6ef4f50e3e6e9":"dHKDg",e872f08087c6cb33:"giNSP","657cbbcd48650779":"1HJ0t","4252d65d3677af5a":"gfJCq","281c6fd1d9df7324":"2vgpU",c31154b4d54b87f:"aan7W","610034140e218c33":"h9LbS","1bc59f7bc4d02b94":"ldCGF","1ac49ff73550904e":"6gXbc","8fd22c15c1dc3fdb":"7deV1","722244e22d484cd4":"inQWU",d7ec35bad14a1f3f:"2qLeT","9bb45158b3bb60e5":"c3ILr",dbfda47097dcdc05:"223lQ","62df99a6374ea8e7":"f8Q6z","30f5c44d5b0c5882":"fKGrW",fa34aad1a54cb74f:"7o3jD","6e7dfd5f426811ae":"hXIP7",f6587d23159bb2e:"1aJqY",bb688511262fa331:"DQpS3","4ba8f97c77fe72fb":"9m0ga",d400d9af20e5e158:"6OW8r","89eb5ddf4e423e14":"8Ipne",cfeb658fb1129c7d:"bbe5P",cf52518d7e23221c:"giuXg","593d4e7884fc0918":"4Dfiq","30b35f30b6dba51d":"cIxH8","24519596b23105e8":"khz6l","69b53c2db51c07c6":"flBRC",cd51cbb6a384e947:"OdIjN",b2bec95e117c35ff:"5N41O",e02033538de8d8c6:"gqwBy",bb0f24f71db75179:"cjDQT","7334e4338273fd72":"hjxfV",a00519108abb0534:"lGEJr","2835a3239b6a1bc4":"8Egu9",f5faf41ae9cf1c5:"jWST5","5e6fa649046f5df2":"hrnKP","84775698f8fef6c0":"aXsIP","8c2455e35e11d959":"lsaNY","1cee7874e0ff2b2b":"8eW4I","6d098447a1b2abdc":"h5WTU","7d7d81ff5b818a49":"glrUF",c33461c993e8e491:"91CVe","64a89b8cfcf7ab12":"5JCvB","300ca7e5c4ba71de":"1UYJO","5ea06ea856112f5d":"966g1","2f95ea182a42efc3":"2u6nF","7e00e0c0121e6a90":"3Zya8","43c70c31a61cc402":"kEs9R","7f64762e2c0d0f2e":"czjHQ","7a6c9bba2845dabe":"9DWg9","73d9d26ef5a08f08":"8uazT",f671014547fe0e5e:"dLOib",b36c3c3b6e78e925:"bVBB2",a7f5dbf9fb623d0a:"9laFo","465fceaf1bde589b":"1E3wB","7766539bc795a94":"cCotT","4faee6716fa8629d":"htZZS","7737fbcafb7ce523":"b3JIq",e90b0a3a493c0ede:"kPfIJ","26317a793dea7e9a":"9ERxS","9f5e020a3549a118":"6T09z","9d0bfe01231db1a7":"nZQfS",b1221eae0bc5f9b:"6GBQI",c5352c47687ac7c:"g4f9X","34fe45ae8ed17da0":"eNC2R","781c619e0cad12e2":"czmee","7c6b58bad8dc3b81":"96RAZ","736ca46bafb50f8f":"3SReg","4a8b2b3ca7e4d0f0":"dOXap","3fd33a4a9e23fb29":"evHBo","88ad2704384a1a6e":"liWu9","1c6c6da898bf18bb":"a2AOJ",d239d0cd4a8ca65b:"yqtQx","11eae3d8cd132ecd":"4M7RG","31d0c33ce951164f":"7ybM1","55fc79bd0e9015ff":"csFkS","4c7f59100f9f15df":"6V0HA","45eab59e8e26538d":"26fdt","46220f971d58285":"8nI8r","37e3f8df977640b7":"dPzjA","4449d13eae7996a8":"50y6Q","197d7cc5dd2340b0":"cv1IN","1ec03223143b45c0":"g4HyM",b3160300f21af751:"fDjj9",efbae5e5ed53d7a4:"dejPc","78d707d60e5ff2ef":"kL7gw","6aa1c963ba0fa26a":"lQsQz","29093847653ffb17":"jy0xe",b0554b151edd2f4:"N0A9g",c5299b37711c29ed:"bnSd3","334e6eea450261d0":"hCLFJ","12c4df9fff4b4031":"jFiZs","9121fee042bcac7e":"1BYUa","5d62685ef5ad6e57":"3gYE0","3e4b4c735ca60ab9":"8Ariw",bb7017f5a1be1e59:"fpMBl",e8e708482f11c7ff:"5tIGd","74095422c65e093c":"14MkC","6d6ea5c3920f0ba9":"2JQK3","3447041b04906440":"9radj","90c4a005313bad84":"4cips","4769b7aec07e6de3":"eNQOe","925b64021990cd94":"5K8rr","6b93322692746037":"kdtyD",faa76facff418618:"aGaAQ",c9933e8bbe42bd93:"4l0Mz","8689abb82cc2e305":"1W6O8","2b087e045ed8c999":"iIMfF","5345958572918685":"ebh58","3be5275c466b41f8":"5aq0U","8aac76b9f2cbbdb5":"8hV4V",be9c14095a58943:"aU3RB","43202def26bf6f4d":"9kNJt","2d80f533903ef8af":"if1fM","218de58a047e4122":"g0fSy",e9c3dc5d87196314:"eKkbH",e941f90445a42817:"dLJLG","5ec6c25f739e2e3":"cDQpr",dcf33a0bfc9dbd80:"kFTda","11e994014f9ea4ef":"i2qFG",d3d2c1ecea6b651e:"6dNpA","2942bfa075e0734":"5JfZw",d33b293dd98ee251:"fU7MD","4d67970b1d16e278":"iz82g",ea23a5ff87e419a:"5PH9s",a4ec7d06d49f6770:"f2AVd","68de4d9a4e90a51d":"j2dUp","91a33ef14a8f152c":"2HEOd","55178304aaa34b5d":"4kyL0","100585ac292d4d0a":"fx5cJ","11bb9bd5ef85c385":"9GM5b","6985fc4c13b8c019":"ilZVq","9632a736fdb17734":"hUcmJ","645f58b86974fd27":"l2p2s","679ce5136028bc60":"3o3Gk","16129f94bb5d1db1":"4Lt39","4a20575877b9aa9":"3qZNd",f493cf27dec8fda2:"20tl2","9455107212c82097":"ahutJ","7abb352823d027e3":"f2UI4","23cd38aa92bb5713":"4XIfF","7fa171f672c06c5":"l1rs2",d6c3f6742b067ddd:"adYvn","687e66ea18227d4f":"gidCX","4be9f7f33ab31972":"bv1yh","4b97ceec572fb5ac":"kO1Zg","6962fb765acff151":"bgZU7","1a45d71179cc6824":"jgQND","546ab40a97e46161":"hB11V",b9d67d5f8399a961:"31EdS","4d6a7c1e95ef8439":"5PjpG","61fca23ef75aa33f":"fxnuD","1c1cdf9b06016701":"6jDOT","397bfa6741ea05a1":"gG1e8",ec6da7c8737ed287:"17kvf","9a3b23b9904e7580":"9B0y9","42c1ca9f44d09740":"3kbwg","6c230af164d5e531":"5wzd5",a1fd07c504fbd6e2:"1dCBn",c5418e31406f900c:"2Mqsz","6bd1db6cc401cbae":"eZZyP","5cc85e0e2e9dc320":"go8ZW",e50d5b519a148fce:"iCErC","57eafc4eec0ed5ad":"e8hfX","9f4e766b833041e1":"2kMmr","51d5ec10d288761f":"212MV","3df881631b0076c1":"9AC43","6446691a409777d1":"aqoug","65a0e8ac0e64097a":"iuJoY",ad09ac1fd0978c3:"czX8g",c80f8d7a3d38c630:"9XxKn",c0e2fa2805edb141:"7aRDd","52fea7a5cc5e8460":"k5Rlo","676052465cde8b83":"f3FBF","46e3f0ef3febe378":"4ZhIs","901f94f4ed6ef4d5":"9uG4h","2f2afc7fe70ef5f":"ccgrY",fa4d7e950018d69e:"dESGS",d0d844c58571e80e:"7G7OX","570e34e061eaecd7":"lGF1i","557af6dc34fe070e":"6biAe","5dd137372fb5b1ae":"8qlqb","812633ee0adaf5e":"lGQwY","5be5bf591a25d61c":"5EgJz",c98746bc7e199094:"hUSBX","52278c0a5be7b19f":"bN7du",fde31c759e8e1c42:"accWj","5254289c25b91dcf":"8zMXu","48ca9e9993ba0327":"bwjPE","72aac35e49a6d4bd":"4AZtq","37312397abe6d28c":"8EnX5","12be35b2aeed3ca4":"4Puey","647a7c082cca257b":"jxrdF",a0e00f30db9559ea:"jwPXF","6c3ebd0eef294356":"khTY5",a66668b79822160a:"a2DYE","72aa7e00c8a7b68f":"6bhjG",b1d489d5f98dd626:"fJnNi","687c365e52ca4b5b":"4teOf",eedef7a537267c12:"lCP8o",f888c4da93185eae:"1mZsz","69fc7ceed4f23a4b":"f5KUv",a70b9f7f981f56ed:"kONpx","698834137971c6a0":"h5L1l","6cbcff253173613e":"4J9Kt","2d4e83632877e8a1":"6WXZj","1f6030e01de03bb8":"jUFLb","9e73dc5e3d85a023":"fisJQ",d24e5da7655d31c6:"drhch",e2c547d0925efa21:"k5k9P","9cb64708d269ee4d":"eZzIO",bad110743800027a:"RkUgQ",b02006442da3179e:"iwjHr"}],emAqF:[function(e,t,i){e("9907e25c4a0aca96"),e("6ca7b218a3c5142b"),e("733763f50161f4ff"),e("c7e8ec39e8a501c2"),e("c7f11a8d456724")},{"9907e25c4a0aca96":"jpVKZ","6ca7b218a3c5142b":"epSXE","733763f50161f4ff":"k89ua",c7e8ec39e8a501c2:"fKGrW",c7f11a8d456724:"dZVa2"}],jpVKZ:[function(e,t,i){var n=e("aa5b0a4df7071e1c"),r=e("8c408afdfdfd6dab"),s=e("ec29447784c0114a"),a=e("2ae82c68e0ae40f"),o=e("33b2452838c11281"),h=e("fe806d898b4ac536"),c=e("22d83c4d1a79086a"),l=e("4d2b1c3a38702ef3"),u=e("e759feb93fde3dec"),d=e("5787c74359c86565"),f=e("cb32a2177bbbabaa"),p=e("20c01e2a38c99bca"),g=e("db20fe52e48e74e7"),m=e("62c50d67351dd58a"),v=e("22cebb6457d12409"),y=e("31dc62cd3a5d2fda"),b=e("14509c82c4f3e2e9"),x=e("e62ee144604e88fa"),E=e("d7fe574b8ddea4e9"),w=e("fc2b88a87581c564"),T=e("7260979738a18766"),S=e("c58a10205146713c"),A=e("a86b1c2861165466"),C=e("dfca683f72250bcc"),_=e("55a26bb040d83918"),I=e("97712bd669b06ccf"),O=e("b2130786c0cb0f80"),P=e("aaac558287b5aa94"),M=e("c6ea7d7218c4c1f0"),R=e("f4a251fc6a0ec32a"),L=e("2d3c3a8ae405672f"),D=e("a99e55c559023f8b"),k=e("baa63ea979fa51ca"),N=e("ecef47c4fbdd606b"),F=e("f57a8c7fd7d84ffb"),B=e("37236ad9fe95a3e"),U=e("c50230ad6eef7275").forEach,V=P("hidden"),G="Symbol",j="prototype",W=B.set,Y=B.getterFor(G),H=Object[j],z=r.Symbol,X=z&&z[j],K=r.RangeError,q=r.TypeError,J=r.QObject,$=T.f,Q=S.f,Z=E.f,ee=C.f,et=a([].push),ei=O("symbols"),en=O("op-symbols"),er=O("wks"),es=!J||!J[j]||!J[j].findChild,ea=function(e,t,i){var n=$(H,t);n&&delete H[t],Q(e,t,i),n&&e!==H&&Q(H,t,n)},eo=h&&l(function(){return 7!==y(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?ea:Q,eh=function(e,t){var i=ei[e]=y(X);return W(i,{type:G,tag:e,description:t}),h||(i.description=t),i},ec=function(e,t,i){e===H&&ec(en,t,i),f(e);var n=g(t);return(f(i),u(ei,n))?(i.enumerable?(u(e,V)&&e[V][n]&&(e[V][n]=!1),i=y(i,{enumerable:v(0,!1)})):(u(e,V)||Q(e,V,v(1,y(null))),e[V][n]=!0),eo(e,n,i)):Q(e,n,i)},el=function(e,t){f(e);var i=p(t);return U(b(i).concat(ep(i)),function(t){(!h||s(eu,i,t))&&ec(e,t,i[t])}),e},eu=function(e){var t=g(e),i=s(ee,this,t);return(!(this===H&&u(ei,t))||!!u(en,t))&&(!(i||!u(this,t)||!u(ei,t)||u(this,V)&&this[V][t])||i)},ed=function(e,t){var i=p(e),n=g(t);if(!(i===H&&u(ei,n))||u(en,n)){var r=$(i,n);return r&&u(ei,n)&&!(u(i,V)&&i[V][n])&&(r.enumerable=!0),r}},ef=function(e){var t=Z(p(e)),i=[];return U(t,function(e){u(ei,e)||u(M,e)||et(i,e)}),i},ep=function(e){var t=e===H,i=Z(t?en:p(e)),n=[];return U(i,function(e){u(ei,e)&&(!t||u(H,e))&&et(n,ei[e])}),n};c||(_(X=(z=function(){if(d(X,this))throw new q("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=R(e),i=function(e){var n=void 0===this?r:this;n===H&&s(i,en,e),u(n,V)&&u(n[V],t)&&(n[V][t]=!1);var a=v(1,e);try{eo(n,t,a)}catch(e){if(!(e instanceof K))throw e;ea(n,t,a)}};return h&&es&&eo(H,t,{configurable:!0,set:i}),eh(t,e)})[j],"toString",function(){return Y(this).tag}),_(z,"withoutSetter",function(e){return eh(R(e),e)}),C.f=eu,S.f=ec,A.f=el,T.f=ed,x.f=E.f=ef,w.f=ep,D.f=function(e){return eh(L(e),e)},h&&(I(X,"description",{configurable:!0,get:function(){return Y(this).description}}),o||_(H,"propertyIsEnumerable",eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),U(b(er),function(e){k(e)}),n({target:G,stat:!0,forced:!c},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!h},{create:function(e,t){return void 0===t?y(e):el(y(e),t)},defineProperty:ec,defineProperties:el,getOwnPropertyDescriptor:ed}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ef}),N(),F(z,G),M[V]=!0},{aa5b0a4df7071e1c:"gJg5v","8c408afdfdfd6dab":"7Z171",ec29447784c0114a:"bOssl","2ae82c68e0ae40f":"2iJ57","33b2452838c11281":"jHRGA",fe806d898b4ac536:"6mXK1","22d83c4d1a79086a":"kkRwC","4d2b1c3a38702ef3":"cXVrS",e759feb93fde3dec:"9JWVX","5787c74359c86565":"d5bNd",cb32a2177bbbabaa:"dPzbI","20c01e2a38c99bca":"h9ut0",db20fe52e48e74e7:"gvuJs","62c50d67351dd58a":"4x6uB","22cebb6457d12409":"5toj2","31dc62cd3a5d2fda":"7isQ3","14509c82c4f3e2e9":"kQgZQ",e62ee144604e88fa:"dDV3S",d7fe574b8ddea4e9:"bBGHM",fc2b88a87581c564:"f3eHQ","7260979738a18766":"aRu9T",c58a10205146713c:"hvqCQ",a86b1c2861165466:"ePigI",dfca683f72250bcc:"7Av2Z","55a26bb040d83918":"4CPdc","97712bd669b06ccf":"3NI4M",b2130786c0cb0f80:"i30ST",aaac558287b5aa94:"k5X1l",c6ea7d7218c4c1f0:"4qgYA",f4a251fc6a0ec32a:"55cC0","2d3c3a8ae405672f":"5CuF7",a99e55c559023f8b:"cwsJo",baa63ea979fa51ca:"jiIFu",ecef47c4fbdd606b:"3ujL7",f57a8c7fd7d84ffb:"dkhk9","37236ad9fe95a3e":"ixHS2",c50230ad6eef7275:"daQdc"}],gJg5v:[function(e,t,i){var n=e("23dea28abc8414d1"),r=e("2ec751f39e500b85").f,s=e("b4567636b28a3b3a"),a=e("50460aa43dd4048a"),o=e("581238c99f8c2c30"),h=e("566a383894c688bc"),c=e("f0e2e697f04e8ad9");t.exports=function(e,t){var i,l,u,d,f,p=e.target,g=e.global,m=e.stat;if(i=g?n:m?n[p]||o(p,{}):n[p]&&n[p].prototype)for(l in t){if(d=t[l],u=e.dontCallGetSet?(f=r(i,l))&&f.value:i[l],!c(g?l:p+(m?".":"#")+l,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;h(d,u)}(e.sham||u&&u.sham)&&s(d,"sham",!0),a(i,l,d,e)}}},{"23dea28abc8414d1":"7Z171","2ec751f39e500b85":"aRu9T",b4567636b28a3b3a:"gKM90","50460aa43dd4048a":"4CPdc","581238c99f8c2c30":"huhcf","566a383894c688bc":"d9xyM",f0e2e697f04e8ad9:"gE5NQ"}],"7Z171":[function(e,t,i){var n=arguments[3],r=function(e){return e&&e.Math===Math&&e};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},{}],aRu9T:[function(e,t,i){var n=e("c04e6fb248689dba"),r=e("553ec943aa2a4554"),s=e("bbc5e69071aa2fbd"),a=e("1d2ffbfd99e01f41"),o=e("c4ea69a78a643d87"),h=e("8ab18ff766aa2ab9"),c=e("3761c5d34b7aa48f"),l=e("c4dfcc26308f1b4a"),u=Object.getOwnPropertyDescriptor;i.f=n?u:function(e,t){if(e=o(e),t=h(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!r(s.f,e,t),e[t])}},{c04e6fb248689dba:"6mXK1","553ec943aa2a4554":"bOssl",bbc5e69071aa2fbd:"7Av2Z","1d2ffbfd99e01f41":"5toj2",c4ea69a78a643d87:"h9ut0","8ab18ff766aa2ab9":"gvuJs","3761c5d34b7aa48f":"9JWVX",c4dfcc26308f1b4a:"lahqe"}],"6mXK1":[function(e,t,i){var n=e("735b783268fd06c0");t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"735b783268fd06c0":"cXVrS"}],cXVrS:[function(e,t,i){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],bOssl:[function(e,t,i){var n=e("44e025d030d66023"),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},{"44e025d030d66023":"3p5v0"}],"3p5v0":[function(e,t,i){var n=e("2642aa7619056f20");t.exports=!n(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"2642aa7619056f20":"cXVrS"}],"7Av2Z":[function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);i.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},{}],"5toj2":[function(e,t,i){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],h9ut0:[function(e,t,i){var n=e("9d8f8f50ac9468eb"),r=e("f7224aed72953ac4");t.exports=function(e){return n(r(e))}},{"9d8f8f50ac9468eb":"kuAas",f7224aed72953ac4:"cHxZN"}],kuAas:[function(e,t,i){var n=e("7ba7e65983d7b662"),r=e("df551e12a7c872dd"),s=e("1d34ea813cebff9c"),a=Object,o=n("".split);t.exports=r(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):a(e)}:a},{"7ba7e65983d7b662":"2iJ57",df551e12a7c872dd:"cXVrS","1d34ea813cebff9c":"161sQ"}],"2iJ57":[function(e,t,i){var n=e("829dd7a4e960cf9e"),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);t.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},{"829dd7a4e960cf9e":"3p5v0"}],"161sQ":[function(e,t,i){var n=e("1c71c3f6daac476c"),r=n({}.toString),s=n("".slice);t.exports=function(e){return s(r(e),8,-1)}},{"1c71c3f6daac476c":"2iJ57"}],cHxZN:[function(e,t,i){var n=e("74607922ed30019f"),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},{"74607922ed30019f":"8AxCV"}],"8AxCV":[function(e,t,i){t.exports=function(e){return null==e}},{}],gvuJs:[function(e,t,i){var n=e("53a3a67ac381c4e8"),r=e("b992ca9cdcf7937b");t.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},{"53a3a67ac381c4e8":"cCley",b992ca9cdcf7937b:"2ZU2p"}],cCley:[function(e,t,i){var n=e("70235907dc93b4b0"),r=e("46fb53dace408c8e"),s=e("677bdc4d74d2f983"),a=e("80395bcde336a28b"),o=e("49552a7324952190"),h=e("aea01c71276624bf"),c=TypeError,l=h("toPrimitive");t.exports=function(e,t){if(!r(e)||s(e))return e;var i,h=a(e,l);if(h){if(void 0===t&&(t="default"),!r(i=n(h,e,t))||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},{"70235907dc93b4b0":"bOssl","46fb53dace408c8e":"8mxCV","677bdc4d74d2f983":"2ZU2p","80395bcde336a28b":"2qR8N","49552a7324952190":"6aMZM",aea01c71276624bf:"5CuF7"}],"8mxCV":[function(e,t,i){var n=e("f87cee1cb79cbcca");t.exports=function(e){return"object"==typeof e?null!==e:n(e)}},{f87cee1cb79cbcca:"h1Wnr"}],h1Wnr:[function(e,t,i){var n="object"==typeof document&&document.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},{}],"2ZU2p":[function(e,t,i){var n=e("6b6c481cdfb7df35"),r=e("2af44fcbdbf14c83"),s=e("76e903e830c40e7c"),a=e("7e2fe930b3598e22"),o=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},{"6b6c481cdfb7df35":"e5ie6","2af44fcbdbf14c83":"h1Wnr","76e903e830c40e7c":"d5bNd","7e2fe930b3598e22":"6doR5"}],e5ie6:[function(e,t,i){var n=e("e057fc33d60763c1"),r=e("f1d62079325906cb");t.exports=function(e,t){var i;return arguments.length<2?r(i=n[e])?i:void 0:n[e]&&n[e][t]}},{e057fc33d60763c1:"7Z171",f1d62079325906cb:"h1Wnr"}],d5bNd:[function(e,t,i){var n=e("83f14842ef67e16a");t.exports=n({}.isPrototypeOf)},{"83f14842ef67e16a":"2iJ57"}],"6doR5":[function(e,t,i){var n=e("da4a972af0214ea0");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{da4a972af0214ea0:"kkRwC"}],kkRwC:[function(e,t,i){var n=e("53b951dfb9de4d22"),r=e("b37df495bcdc1d99"),s=e("e5929e9affd2affc").String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"53b951dfb9de4d22":"co76c",b37df495bcdc1d99:"cXVrS",e5929e9affd2affc:"7Z171"}],co76c:[function(e,t,i){var n,r,s=e("d049c1c2aa0eee5b"),a=e("4eb5796bbafe334d"),o=s.process,h=s.Deno,c=o&&o.versions||h&&h.version,l=c&&c.v8;l&&(r=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},{d049c1c2aa0eee5b:"7Z171","4eb5796bbafe334d":"5hj4U"}],"5hj4U":[function(e,t,i){var n=e("888bcb4c75dc4ad").navigator,r=n&&n.userAgent;t.exports=r?String(r):""},{"888bcb4c75dc4ad":"7Z171"}],"2qR8N":[function(e,t,i){var n=e("bbfed17b24e215f4"),r=e("492a86e2970f6a26");t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},{bbfed17b24e215f4:"alrlv","492a86e2970f6a26":"8AxCV"}],alrlv:[function(e,t,i){var n=e("4094667126ecac05"),r=e("fce2a7573db493fa"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},{"4094667126ecac05":"h1Wnr",fce2a7573db493fa:"3zerS"}],"3zerS":[function(e,t,i){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],"6aMZM":[function(e,t,i){var n=e("abe9ca006f56626e"),r=e("c96b3a89fec6248a"),s=e("551615fda0214f1b"),a=TypeError;t.exports=function(e,t){var i,o;if("string"===t&&r(i=e.toString)&&!s(o=n(i,e))||r(i=e.valueOf)&&!s(o=n(i,e))||"string"!==t&&r(i=e.toString)&&!s(o=n(i,e)))return o;throw new a("Can't convert object to primitive value")}},{abe9ca006f56626e:"bOssl",c96b3a89fec6248a:"h1Wnr","551615fda0214f1b":"8mxCV"}],"5CuF7":[function(e,t,i){var n=e("ad5ef4474219c101"),r=e("6a2cda01df6b4c79"),s=e("dccc28ffa5beeb54"),a=e("48d6af1225853d44"),o=e("9f762329148684"),h=e("1ce268781e409df2"),c=n.Symbol,l=r("wks"),u=h?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return s(l,e)||(l[e]=o&&s(c,e)?c[e]:u("Symbol."+e)),l[e]}},{ad5ef4474219c101:"7Z171","6a2cda01df6b4c79":"i30ST",dccc28ffa5beeb54:"9JWVX","48d6af1225853d44":"55cC0","9f762329148684":"kkRwC","1ce268781e409df2":"6doR5"}],i30ST:[function(e,t,i){var n=e("84eeed9891aafe14");t.exports=function(e,t){return n[e]||(n[e]=t||{})}},{"84eeed9891aafe14":"jKWHg"}],jKWHg:[function(e,t,i){var n=e("7b43004672b1879f"),r=e("bc8329e77dc2c1cc"),s=e("dfb72a1d809f7b02"),a="__core-js_shared__",o=t.exports=r[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"7b43004672b1879f":"jHRGA",bc8329e77dc2c1cc:"7Z171",dfb72a1d809f7b02:"huhcf"}],jHRGA:[function(e,t,i){t.exports=!1},{}],huhcf:[function(e,t,i){var n=e("2d1c29655635b9ea"),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},{"2d1c29655635b9ea":"7Z171"}],"9JWVX":[function(e,t,i){var n=e("f5dcaa60a713971f"),r=e("ab17c4f45fcf0841"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},{f5dcaa60a713971f:"2iJ57",ab17c4f45fcf0841:"6oQEu"}],"6oQEu":[function(e,t,i){var n=e("f45a7b5dcdc4a410"),r=Object;t.exports=function(e){return r(n(e))}},{f45a7b5dcdc4a410:"cHxZN"}],"55cC0":[function(e,t,i){var n=e("5da0fe4507da20a3"),r=0,s=Math.random(),a=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+s,36)}},{"5da0fe4507da20a3":"2iJ57"}],lahqe:[function(e,t,i){var n=e("9b4278b13c076bf"),r=e("8aee5d88a5f9b6b5"),s=e("1db4d60148afcf21");t.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"9b4278b13c076bf":"6mXK1","8aee5d88a5f9b6b5":"cXVrS","1db4d60148afcf21":"SppDD"}],SppDD:[function(e,t,i){var n=e("845bcece0e6d354"),r=e("824df78b2e007250"),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"845bcece0e6d354":"7Z171","824df78b2e007250":"8mxCV"}],gKM90:[function(e,t,i){var n=e("a8753383ef98ee18"),r=e("189ab650b8f71085"),s=e("1168c8162aa30435");t.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},{a8753383ef98ee18:"6mXK1","189ab650b8f71085":"hvqCQ","1168c8162aa30435":"5toj2"}],hvqCQ:[function(e,t,i){var n=e("ca50eb9163928400"),r=e("d482f9e5478795e8"),s=e("b6ad7537efb06f4b"),a=e("16365a73399e7fe7"),o=e("fab1d366c47796d9"),h=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";i.f=n?s?function(e,t,i){if(a(e),t=o(t),a(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=l(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(a(e),t=o(t),a(i),r)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},{ca50eb9163928400:"6mXK1",d482f9e5478795e8:"lahqe",b6ad7537efb06f4b:"e457x","16365a73399e7fe7":"dPzbI",fab1d366c47796d9:"gvuJs"}],e457x:[function(e,t,i){var n=e("b22a5a2de93e3ad2"),r=e("249a5b857c2dfccd");t.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{b22a5a2de93e3ad2:"6mXK1","249a5b857c2dfccd":"cXVrS"}],dPzbI:[function(e,t,i){var n=e("2b6c6258a0a6082f"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},{"2b6c6258a0a6082f":"8mxCV"}],"4CPdc":[function(e,t,i){var n=e("99ee13632b3fa68"),r=e("9ebb3e3004fccc0a"),s=e("f10cc812a3094053"),a=e("d354802d852d9c2b");t.exports=function(e,t,i,o){o||(o={});var h=o.enumerable,c=void 0!==o.name?o.name:t;if(n(i)&&s(i,c,o),o.global)h?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(h=!0):delete e[t]}catch(e){}h?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},{"99ee13632b3fa68":"h1Wnr","9ebb3e3004fccc0a":"hvqCQ",f10cc812a3094053:"1fkJp",d354802d852d9c2b:"huhcf"}],"1fkJp":[function(e,t,i){var n=e("ca84677f1ebd1804"),r=e("13360f2842eba261"),s=e("103e488c0928755a"),a=e("cbf9b0e0779cc368"),o=e("3f2eb7efeae2f72b"),h=e("548b10f284264c72").CONFIGURABLE,c=e("358f00f3103bd55b"),l=e("9b2ce14119fd2412"),u=l.enforce,d=l.get,f=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=o&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=t.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+m(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||h&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&i&&a(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return a(n,"source")||(n.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function(){return s(this)&&d(this).source||c(this)},"toString")},{ca84677f1ebd1804:"2iJ57","13360f2842eba261":"cXVrS","103e488c0928755a":"h1Wnr",cbf9b0e0779cc368:"9JWVX","3f2eb7efeae2f72b":"6mXK1","548b10f284264c72":"jmu0n","358f00f3103bd55b":"3JJEO","9b2ce14119fd2412":"ixHS2"}],jmu0n:[function(e,t,i){var n=e("8ad2bacb0e20b95c"),r=e("4eabfd8f83afc9d5"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),h=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:o&&"something"===(function(){}).name,CONFIGURABLE:h}},{"8ad2bacb0e20b95c":"6mXK1","4eabfd8f83afc9d5":"9JWVX"}],"3JJEO":[function(e,t,i){var n=e("26e26db98367212e"),r=e("40ed9a4f6ae66648"),s=e("485d48d6f4c6739e"),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),t.exports=s.inspectSource},{"26e26db98367212e":"2iJ57","40ed9a4f6ae66648":"h1Wnr","485d48d6f4c6739e":"jKWHg"}],ixHS2:[function(e,t,i){var n,r,s,a=e("d3f0c9f3327b2fd6"),o=e("28c3574d0c39fe7e"),h=e("f82e6cc0ac249fa5"),c=e("c0ae163eea4ef97"),l=e("6dea7358344877bb"),u=e("3e035a1241da2f0"),d=e("88d6ccc27e779e5a"),f=e("d40b9b3abdbb956e"),p="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||u.state){var v=u.state||(u.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(p);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(l(e,y))throw new g(p);return t.facade=e,c(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},s=function(e){return l(e,y)}}t.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!h(t)||(i=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}}}},{d3f0c9f3327b2fd6:"lIC7p","28c3574d0c39fe7e":"7Z171",f82e6cc0ac249fa5:"8mxCV",c0ae163eea4ef97:"gKM90","6dea7358344877bb":"9JWVX","3e035a1241da2f0":"jKWHg","88d6ccc27e779e5a":"k5X1l",d40b9b3abdbb956e:"4qgYA"}],lIC7p:[function(e,t,i){var n=e("8b1a8c1dbfd18eb5"),r=e("aa77fff8d5ef0565"),s=n.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},{"8b1a8c1dbfd18eb5":"7Z171",aa77fff8d5ef0565:"h1Wnr"}],k5X1l:[function(e,t,i){var n=e("dbc8182adeb8c92f"),r=e("90b4ffb58508a6e5"),s=n("keys");t.exports=function(e){return s[e]||(s[e]=r(e))}},{dbc8182adeb8c92f:"i30ST","90b4ffb58508a6e5":"55cC0"}],"4qgYA":[function(e,t,i){t.exports={}},{}],d9xyM:[function(e,t,i){var n=e("d91d786cc71453ce"),r=e("88cb809f98beddc6"),s=e("10ea642aad5f7c21"),a=e("39ff598ce822187e");t.exports=function(e,t,i){for(var o=r(t),h=a.f,c=s.f,l=0;lc;)r(n,i=t[c++])&&(~a(l,i)||h(l,i));return l}},{"363ee0e6bb4f46a7":"2iJ57","3183fe0b0bf6f6ac":"9JWVX","28192ac12e934672":"h9ut0",a5f9c5d8e993ccd6:"7HT32","57775908f1581bc6":"4qgYA"}],"7HT32":[function(e,t,i){var n=e("d5dcbcd68ac5acd0"),r=e("212b13aecfa48226"),s=e("e5a8b3e1da4c5637"),a=function(e){return function(t,i,a){var o,h=n(t),c=s(h);if(0===c)return!e&&-1;var l=r(a,c);if(e&&i!=i){for(;c>l;)if((o=h[l++])!=o)return!0}else for(;c>l;l++)if((e||l in h)&&h[l]===i)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{d5dcbcd68ac5acd0:"h9ut0","212b13aecfa48226":"47gaI",e5a8b3e1da4c5637:"kHSes"}],"47gaI":[function(e,t,i){var n=e("72fe0a53ad43912c"),r=Math.max,s=Math.min;t.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},{"72fe0a53ad43912c":"gAgUH"}],gAgUH:[function(e,t,i){var n=e("3403cba02b5f61d8");t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},{"3403cba02b5f61d8":"8w9Yn"}],"8w9Yn":[function(e,t,i){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}},{}],kHSes:[function(e,t,i){var n=e("23d9716c54a2ab90");t.exports=function(e){return n(e.length)}},{"23d9716c54a2ab90":"lQsU7"}],lQsU7:[function(e,t,i){var n=e("c48d3a8b8ac52b0b"),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},{c48d3a8b8ac52b0b:"gAgUH"}],"7POW9":[function(e,t,i){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],f3eHQ:[function(e,t,i){i.f=Object.getOwnPropertySymbols},{}],gE5NQ:[function(e,t,i){var n=e("10299561ea0c7870"),r=e("8b1ecdaf59f07210"),s=/#|\.prototype\./,a=function(e,t){var i=h[o(e)];return i===l||i!==c&&(r(t)?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},h=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},{"10299561ea0c7870":"cXVrS","8b1ecdaf59f07210":"h1Wnr"}],"4x6uB":[function(e,t,i){var n=e("3e4265f3f6994add"),r=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},{"3e4265f3f6994add":"cRCRk"}],cRCRk:[function(e,t,i){var n=e("397e535b3976d304"),r=e("eebd8012c2d2c3ae"),s=e("8da113eeaf06c4ba"),a=e("df252844008f634")("toStringTag"),o=Object,h="Arguments"===s(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};t.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=o(e),a))?i:h?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},{"397e535b3976d304":"9axlf",eebd8012c2d2c3ae:"h1Wnr","8da113eeaf06c4ba":"161sQ",df252844008f634:"5CuF7"}],"9axlf":[function(e,t,i){var n=e("6306cd4835715127")("toStringTag"),r={};r[n]="z",t.exports="[object z]"===String(r)},{"6306cd4835715127":"5CuF7"}],"7isQ3":[function(e,t,i){var n,r=e("3bbe31d8f504111f"),s=e("a9712f03fc468b49"),a=e("d9e0c389f84efa79"),o=e("8a43b6a211717cde"),h=e("78d31e3a50d79c6e"),c=e("e29f7e32a0583f3"),l=e("a6edaba97f293fc9"),u="prototype",d="script",f=l("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe");return t.style.display="none",h.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},y=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}y="undefined"!=typeof document?document.domain&&n?m(n):v():m(n);for(var e=a.length;e--;)delete y[u][a[e]];return y()};o[f]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(p[u]=r(e),i=new p,p[u]=null,i[f]=e):i=y(),void 0===t?i:s.f(i,t)}},{"3bbe31d8f504111f":"dPzbI",a9712f03fc468b49:"ePigI",d9e0c389f84efa79:"7POW9","8a43b6a211717cde":"4qgYA","78d31e3a50d79c6e":"23b1K",e29f7e32a0583f3:"SppDD",a6edaba97f293fc9:"k5X1l"}],ePigI:[function(e,t,i){var n=e("aa39c539d0a1ec3f"),r=e("2e9118dcee7eb93e"),s=e("d88f5f00164c2da2"),a=e("12ac356c5e06e57d"),o=e("3cbdc44082c2f8b8"),h=e("634da70e74fce29b");i.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=o(t),r=h(t),c=r.length,l=0;c>l;)s.f(e,i=r[l++],n[i]);return e}},{aa39c539d0a1ec3f:"6mXK1","2e9118dcee7eb93e":"e457x",d88f5f00164c2da2:"hvqCQ","12ac356c5e06e57d":"dPzbI","3cbdc44082c2f8b8":"h9ut0","634da70e74fce29b":"kQgZQ"}],kQgZQ:[function(e,t,i){var n=e("fb982c683f43ec98"),r=e("7cabc30df1982d48");t.exports=Object.keys||function(e){return n(e,r)}},{fb982c683f43ec98:"4o1p7","7cabc30df1982d48":"7POW9"}],"23b1K":[function(e,t,i){var n=e("14cb391fa4a0dda8");t.exports=n("document","documentElement")},{"14cb391fa4a0dda8":"e5ie6"}],bBGHM:[function(e,t,i){var n=e("279dbc8649868a7a"),r=e("430d7ab8977dd85e"),s=e("a5a6278a4291e239").f,a=e("a0e199be640bf61f"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(e){try{return s(e)}catch(e){return a(o)}};t.exports.f=function(e){return o&&"Window"===n(e)?h(e):s(r(e))}},{"279dbc8649868a7a":"161sQ","430d7ab8977dd85e":"h9ut0",a5a6278a4291e239:"dDV3S",a0e199be640bf61f:"eO8Ta"}],eO8Ta:[function(e,t,i){var n=e("5250b5c9324ccbe");t.exports=n([].slice)},{"5250b5c9324ccbe":"2iJ57"}],"3NI4M":[function(e,t,i){var n=e("5bd1cd8472955124"),r=e("1413185c6323bbbc");t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},{"5bd1cd8472955124":"1fkJp","1413185c6323bbbc":"hvqCQ"}],cwsJo:[function(e,t,i){var n=e("2e34ececd06658d9");i.f=n},{"2e34ececd06658d9":"5CuF7"}],jiIFu:[function(e,t,i){var n=e("8d5159b7d317832f"),r=e("42a3ea18819bfbb"),s=e("7ec639749e279eeb"),a=e("cbbe4becefd5c21c").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:s.f(e)})}},{"8d5159b7d317832f":"iwjHr","42a3ea18819bfbb":"9JWVX","7ec639749e279eeb":"cwsJo",cbbe4becefd5c21c:"hvqCQ"}],iwjHr:[function(e,t,i){var n=e("34c09090b9638032");t.exports=n},{"34c09090b9638032":"7Z171"}],"3ujL7":[function(e,t,i){var n=e("b56ca5a55bb4c0e1"),r=e("f5359b167e9be384"),s=e("e7eef3415c62682d"),a=e("8cc59229c8e85f40");t.exports=function(){var e=r("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,o=s("toPrimitive");t&&!t[o]&&a(t,o,function(e){return n(i,this)},{arity:1})}},{b56ca5a55bb4c0e1:"bOssl",f5359b167e9be384:"e5ie6",e7eef3415c62682d:"5CuF7","8cc59229c8e85f40":"4CPdc"}],dkhk9:[function(e,t,i){var n=e("93a3d85da48077c").f,r=e("2ebf7179e87d878f"),s=e("5b1eb5d1639e9eb7")("toStringTag");t.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!r(e,s)&&n(e,s,{configurable:!0,value:t})}},{"93a3d85da48077c":"hvqCQ","2ebf7179e87d878f":"9JWVX","5b1eb5d1639e9eb7":"5CuF7"}],daQdc:[function(e,t,i){var n=e("13e0747865316a42"),r=e("99224cc18a4a792e"),s=e("57aaeabd9d30911"),a=e("3acffc809f3b03fb"),o=e("1fc4c4e55871562c"),h=e("76c922b575fbf7bd"),c=r([].push),l=function(e){var t=1===e,i=2===e,r=3===e,l=4===e,u=6===e,d=7===e,f=5===e||u;return function(p,g,m,v){for(var y,b,x=a(p),E=s(x),w=o(E),T=n(g,m),S=0,A=v||h,C=t?A(p,w):i||d?A(p,0):void 0;w>S;S++)if((f||S in E)&&(b=T(y=E[S],S,x),e)){if(t)C[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}}return u?-1:r||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},{"13e0747865316a42":"f1CxE","99224cc18a4a792e":"2iJ57","57aaeabd9d30911":"kuAas","3acffc809f3b03fb":"6oQEu","1fc4c4e55871562c":"kHSes","76c922b575fbf7bd":"kfoQr"}],f1CxE:[function(e,t,i){var n=e("92f6f475baa85665"),r=e("547ee4f9dab0cc76"),s=e("5acd31cba656d393"),a=n(n.bind);t.exports=function(e,t){return r(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},{"92f6f475baa85665":"c4z5p","547ee4f9dab0cc76":"alrlv","5acd31cba656d393":"3p5v0"}],c4z5p:[function(e,t,i){var n=e("8e77093015e1e67f"),r=e("9daa4dbbca634c9e");t.exports=function(e){if("Function"===n(e))return r(e)}},{"8e77093015e1e67f":"161sQ","9daa4dbbca634c9e":"2iJ57"}],kfoQr:[function(e,t,i){var n=e("4580767bbbe40f0b");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"4580767bbbe40f0b":"3SXid"}],"3SXid":[function(e,t,i){var n=e("a9e5b9af57e551f6"),r=e("2b4d84c184e08f4f"),s=e("f4bec83e8d6008c9"),a=e("4a13cf47b259a825")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(r(t=e.constructor)&&(t===o||n(t.prototype))?t=void 0:s(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?o:t}},{a9e5b9af57e551f6:"7GYYD","2b4d84c184e08f4f":"eytEI",f4bec83e8d6008c9:"8mxCV","4a13cf47b259a825":"5CuF7"}],"7GYYD":[function(e,t,i){var n=e("ccb261b2d73a4fca");t.exports=Array.isArray||function(e){return"Array"===n(e)}},{ccb261b2d73a4fca:"161sQ"}],eytEI:[function(e,t,i){var n=e("3b3e7fa8cfe4b3ac"),r=e("84df2127d2d40501"),s=e("ae35eceee587c4bc"),a=e("7bd40df22601ee7e"),o=e("271ff92378cbc486"),h=e("74840ba4357c1c30"),c=function(){},l=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!s(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},g=function(e){if(!s(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(u,h(e))}catch(e){return!0}};g.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?g:p},{"3b3e7fa8cfe4b3ac":"2iJ57","84df2127d2d40501":"cXVrS",ae35eceee587c4bc:"h1Wnr","7bd40df22601ee7e":"cRCRk","271ff92378cbc486":"e5ie6","74840ba4357c1c30":"3JJEO"}],epSXE:[function(e,t,i){var n=e("5bb0291a1de27cc2"),r=e("8e0d0366f8700097"),s=e("1d19a51e347c2d9e"),a=e("eab6cb58642f38b1"),o=e("41937bc543544e22"),h=e("8877198f0deded1d"),c=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{for:function(e){var t=a(e);if(s(c,t))return c[t];var i=r("Symbol")(t);return c[t]=i,l[i]=t,i}})},{"5bb0291a1de27cc2":"gJg5v","8e0d0366f8700097":"e5ie6","1d19a51e347c2d9e":"9JWVX",eab6cb58642f38b1:"4x6uB","41937bc543544e22":"i30ST","8877198f0deded1d":"lqpzY"}],lqpzY:[function(e,t,i){var n=e("a735884940a2eb73");t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},{a735884940a2eb73:"kkRwC"}],k89ua:[function(e,t,i){var n=e("8dbad7485118eaf8"),r=e("9fce8a9af4b186a4"),s=e("4e16fd56c67f82fb"),a=e("59b7b3dea7d1b71d"),o=e("77b2ea800463b7d6"),h=e("ca42326fb3cb6e68"),c=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!h},{keyFor:function(e){if(!s(e))throw TypeError(a(e)+" is not a symbol");if(r(c,e))return c[e]}})},{"8dbad7485118eaf8":"gJg5v","9fce8a9af4b186a4":"9JWVX","4e16fd56c67f82fb":"2ZU2p","59b7b3dea7d1b71d":"3zerS","77b2ea800463b7d6":"i30ST",ca42326fb3cb6e68:"lqpzY"}],fKGrW:[function(e,t,i){var n=e("c758539029f56af9"),r=e("cd08b356bcae0b47"),s=e("2f13fa715711850"),a=e("4cfb95fb9a0e28fc"),o=e("50b40a77c21daf7f"),h=e("56cf5d4bc1afd666"),c=e("42bed86e3e73f3d2"),l=e("bca8b9ce5f71243b"),u=e("1bb05f05134df4c2"),d=e("1136e300bbee8f1e"),f=e("d8156a48adf3010b"),p=String,g=r("JSON","stringify"),m=o(/./.exec),v=o("".charAt),y=o("".charCodeAt),b=o("".replace),x=o(1..toString),E=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,S=!f||h(function(){var e=r("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),A=h(function(){return'"\udf06\ud834"'!==g("\uDF06\uD834")||'"\udead"'!==g("\uDEAD")}),C=function(e,t){var i=u(arguments),n=d(t);if(!(!c(n)&&(void 0===e||l(e))))return i[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},s(g,null,i)},_=function(e,t,i){var n=v(i,t-1),r=v(i,t+1);return m(w,e)&&!m(T,r)||m(T,e)&&!m(w,n)?"\\u"+x(y(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:S||A},{stringify:function(e,t,i){var n=u(arguments),r=s(S?C:g,null,n);return A&&"string"==typeof r?b(r,E,_):r}})},{c758539029f56af9:"gJg5v",cd08b356bcae0b47:"e5ie6","2f13fa715711850":"2fjXG","4cfb95fb9a0e28fc":"bOssl","50b40a77c21daf7f":"2iJ57","56cf5d4bc1afd666":"cXVrS","42bed86e3e73f3d2":"h1Wnr",bca8b9ce5f71243b:"2ZU2p","1bb05f05134df4c2":"eO8Ta","1136e300bbee8f1e":"gQett",d8156a48adf3010b:"kkRwC"}],"2fjXG":[function(e,t,i){var n=e("d07466971ded2aca"),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},{d07466971ded2aca:"3p5v0"}],gQett:[function(e,t,i){var n=e("d58a1810bb01cb9f"),r=e("fc692ad896e8fbbf"),s=e("78f870626b97cbe9"),a=e("1da5109b0acae5a0"),o=e("71deb4f6b3f33cf0"),h=n([].push);t.exports=function(e){if(s(e))return e;if(r(e)){for(var t=e.length,i=[],n=0;ny&&d(n,arguments[y]),n});if(S.prototype=w,"Error"!==x?o?o(S,T):h(S,T,{name:!0}):p&&v in E&&(c(S,E,v),c(S,E,"prepareStackTrace")),h(S,E),!g)try{w.name!==x&&s(w,"name",x),w.constructor=S}catch(e){}return S}}},{a06eacb797618572:"e5ie6","665a8da8d6942429":"9JWVX","1eafe025967456f7":"gKM90","56a7065490020014":"d5bNd","4950e85505e95dbc":"arrdQ","6c7bc1a190dc31c1":"d9xyM","84e57d08170f4fac":"7fWkz",a85bdac1120897b:"30not",efb60f912a162fda:"dwhvK","30c8c4978beb6a3c":"5QVLO",f4c1a33f96dc17e0:"1H0Ar","9afe587c962877da":"6mXK1","74e210db508a9809":"jHRGA"}],arrdQ:[function(e,t,i){var n=e("995a94425a563d6"),r=e("caa27fe2635f1f44"),s=e("a751660a0fcdf70"),a=e("6e2c833ee2a62cf6");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return s(i),a(n),r(i)&&(t?e(i,n):i.__proto__=n),i}}():void 0)},{"995a94425a563d6":"j4YhT",caa27fe2635f1f44:"8mxCV",a751660a0fcdf70:"cHxZN","6e2c833ee2a62cf6":"hEWXk"}],j4YhT:[function(e,t,i){var n=e("27a2d181325e1926"),r=e("36b26076b1e2fac1");t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},{"27a2d181325e1926":"2iJ57","36b26076b1e2fac1":"alrlv"}],hEWXk:[function(e,t,i){var n=e("fcc5bbb526d602c6"),r=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},{fcc5bbb526d602c6:"6XW5L"}],"6XW5L":[function(e,t,i){var n=e("a504c97d35bacd6c");t.exports=function(e){return n(e)||null===e}},{a504c97d35bacd6c:"8mxCV"}],"7fWkz":[function(e,t,i){var n=e("e52fa9ee07db5896").f;t.exports=function(e,t,i){i in e||n(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},{e52fa9ee07db5896:"hvqCQ"}],"30not":[function(e,t,i){var n=e("9f474ed504af79a9"),r=e("bd2a6951ff768696"),s=e("972057e738a2788f");t.exports=function(e,t,i){var a,o;return s&&n(a=t.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&s(e,o),e}},{"9f474ed504af79a9":"h1Wnr",bd2a6951ff768696:"8mxCV","972057e738a2788f":"arrdQ"}],dwhvK:[function(e,t,i){var n=e("c9fe0c0d0cc00953");t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},{c9fe0c0d0cc00953:"4x6uB"}],"5QVLO":[function(e,t,i){var n=e("b476c95c984a6a8d"),r=e("3c6bf72ab0382560");t.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},{b476c95c984a6a8d:"8mxCV","3c6bf72ab0382560":"gKM90"}],"1H0Ar":[function(e,t,i){var n=e("6a8c56dba61494ec"),r=e("a58d6d3fbc24091c"),s=e("13a68d58956ea123"),a=Error.captureStackTrace;t.exports=function(e,t,i,o){s&&(a?a(e,t):n(e,"stack",r(i,o)))}},{"6a8c56dba61494ec":"gKM90",a58d6d3fbc24091c:"7dart","13a68d58956ea123":"3Scc5"}],"7dart":[function(e,t,i){var n=e("eabcb03034bf2114"),r=Error,s=n("".replace),a=String(new r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,h=o.test(a);t.exports=function(e,t){if(h&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},{eabcb03034bf2114:"2iJ57"}],"3Scc5":[function(e,t,i){var n=e("89db331f671f42e0"),r=e("df11a3c4166c3491");t.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)})},{"89db331f671f42e0":"cXVrS",df11a3c4166c3491:"5toj2"}],aSTrG:[function(e,t,i){var n=e("f781bd5f2d18cfa7"),r=e("3eb4aef2f58a6fea"),s=Error.prototype;s.toString!==r&&n(s,"toString",r)},{f781bd5f2d18cfa7:"4CPdc","3eb4aef2f58a6fea":"9hDDf"}],"9hDDf":[function(e,t,i){var n=e("ea2a4236860a8cd8"),r=e("e3d0938fe2af7a6b"),s=e("10baca5ba543cdd8"),a=e("b4dc1328db6268c"),o=Error.prototype.toString,h=r(function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})});t.exports=h?function(){var e=s(this),t=a(e.name,"Error"),i=a(e.message);return t?i?t+": "+i:t:i}:o},{ea2a4236860a8cd8:"6mXK1",e3d0938fe2af7a6b:"cXVrS","10baca5ba543cdd8":"dPzbI",b4dc1328db6268c:"dwhvK"}],"8nyV3":[function(e,t,i){e("84cae8994b2a2f5")},{"84cae8994b2a2f5":"esMFt"}],esMFt:[function(e,t,i){var n=e("c0cc68e328095af5"),r=e("faa2bddf0ac478ea"),s=e("4413a40f7d436a10"),a=e("6bef4cb0d407baac"),o=e("16d669a6cb07e14c"),h=e("44313d9c6ae01d88"),c=e("fa987207071f401e"),l=e("e46f2df37a9caee7"),u=e("6f34595d479a3d16"),d=e("971d0ec70b5cd696"),f=e("8cb104a68ce09b9a"),p=e("57c5336285df243"),g=e("2e2daca8a25d7233")("toStringTag"),m=Error,v=[].push,y=function(e,t){var i,n=r(b,this);a?i=a(new m,n?s(this):b):c(i=n?this:h(b),g,"Error"),void 0!==t&&c(i,"message",p(t)),d(i,y,i.stack,1),arguments.length>2&&u(i,arguments[2]);var o=[];return f(e,v,{that:o}),c(i,"errors",o),i};a?a(y,m):o(y,m,{name:!0});var b=y.prototype=h(m.prototype,{constructor:l(1,y),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:y})},{c0cc68e328095af5:"gJg5v",faa2bddf0ac478ea:"d5bNd","4413a40f7d436a10":"e8mfS","6bef4cb0d407baac":"arrdQ","16d669a6cb07e14c":"d9xyM","44313d9c6ae01d88":"7isQ3",fa987207071f401e:"gKM90",e46f2df37a9caee7:"5toj2","6f34595d479a3d16":"5QVLO","971d0ec70b5cd696":"1H0Ar","8cb104a68ce09b9a":"dCEHX","57c5336285df243":"dwhvK","2e2daca8a25d7233":"5CuF7"}],e8mfS:[function(e,t,i){var n=e("da54a59ea207dd"),r=e("71ab2a7bcc8c8fc8"),s=e("7a3afd2bb40b0292"),a=e("296d7a2db8e23969"),o=e("58de29d5e883862f"),h=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=s(e);if(n(t,h))return t[h];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof c?l:null}},{da54a59ea207dd:"9JWVX","71ab2a7bcc8c8fc8":"h1Wnr","7a3afd2bb40b0292":"6oQEu","296d7a2db8e23969":"k5X1l","58de29d5e883862f":"2SHZm"}],"2SHZm":[function(e,t,i){var n=e("85ffc28af2e8afc1");t.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"85ffc28af2e8afc1":"cXVrS"}],dCEHX:[function(e,t,i){var n=e("2f267ed50e670495"),r=e("c0af58bb1ef1cc62"),s=e("7fa6542c03ca9239"),a=e("fa596d1a4c07b72a"),o=e("fd753cc641a6f10a"),h=e("2a15dee148d3db96"),c=e("417f9a13deeb58a6"),l=e("43af53be1b24dae5"),u=e("bf7ad32b21aed0b4"),d=e("5241389e1d6eeb73"),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;t.exports=function(e,t,i){var m,v,y,b,x,E,w,T=i&&i.that,S=!!(i&&i.AS_ENTRIES),A=!!(i&&i.IS_RECORD),C=!!(i&&i.IS_ITERATOR),_=!!(i&&i.INTERRUPTED),I=n(t,T),O=function(e){return m&&d(m,"normal",e),new p(!0,e)},P=function(e){return S?(s(e),_?I(e[0],e[1],O):I(e[0],e[1])):_?I(e,O):I(e)};if(A)m=e.iterator;else if(C)m=e;else{if(!(v=u(e)))throw new f(a(e)+" is not iterable");if(o(v)){for(y=0,b=h(e);b>y;y++)if((x=P(e[y]))&&c(g,x))return x;return new p(!1)}m=l(e,v)}for(E=A?e.next:m.next;!(w=r(E,m)).done;){try{x=P(w.value)}catch(e){d(m,"throw",e)}if("object"==typeof x&&x&&c(g,x))return x}return new p(!1)}},{"2f267ed50e670495":"f1CxE",c0af58bb1ef1cc62:"bOssl","7fa6542c03ca9239":"dPzbI",fa596d1a4c07b72a:"3zerS",fd753cc641a6f10a:"88nHe","2a15dee148d3db96":"kHSes","417f9a13deeb58a6":"d5bNd","43af53be1b24dae5":"kBMjp",bf7ad32b21aed0b4:"3624P","5241389e1d6eeb73":"58eij"}],"88nHe":[function(e,t,i){var n=e("85b004b6ab4bc5da"),r=e("6de391ad2976ca02"),s=n("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||a[s]===e)}},{"85b004b6ab4bc5da":"5CuF7","6de391ad2976ca02":"bABtS"}],bABtS:[function(e,t,i){t.exports={}},{}],kBMjp:[function(e,t,i){var n=e("132ebf774107ae29"),r=e("e248489b4825ceb7"),s=e("18a343d2ef625577"),a=e("7e576a1564cef99e"),o=e("4a7b0311be0471b2"),h=TypeError;t.exports=function(e,t){var i=arguments.length<2?o(e):t;if(r(i))return s(n(i,e));throw new h(a(e)+" is not iterable")}},{"132ebf774107ae29":"bOssl",e248489b4825ceb7:"alrlv","18a343d2ef625577":"dPzbI","7e576a1564cef99e":"3zerS","4a7b0311be0471b2":"3624P"}],"3624P":[function(e,t,i){var n=e("32d61dafd81dde78"),r=e("84e24a6ac7559d3a"),s=e("f0707282c0d93eeb"),a=e("1c181d5c49efd5d1"),o=e("d10d0e0ae49498c5")("iterator");t.exports=function(e){if(!s(e))return r(e,o)||r(e,"@@iterator")||a[n(e)]}},{"32d61dafd81dde78":"cRCRk","84e24a6ac7559d3a":"2qR8N",f0707282c0d93eeb:"8AxCV","1c181d5c49efd5d1":"bABtS",d10d0e0ae49498c5:"5CuF7"}],"58eij":[function(e,t,i){var n=e("a4a3a7d4a45c4219"),r=e("feb876e7da2df7bd"),s=e("2e660cdfabd9c61f");t.exports=function(e,t,i){var a,o;r(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw i;return i}a=n(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw i;if(o)throw a;return r(a),i}},{a4a3a7d4a45c4219:"bOssl",feb876e7da2df7bd:"dPzbI","2e660cdfabd9c61f":"2qR8N"}],j1ABh:[function(e,t,i){var n=e("1051ab5946792444"),r=e("901806552daaa9d1"),s=e("c2da5f9111ec0d0d"),a=e("bbf9283d8426dd54"),o=e("2df6383956d55950"),h="AggregateError",c=r(h),l=!a(function(){return 1!==c([1]).errors[0]})&&a(function(){return 7!==c([1],h,{cause:7}).cause});n({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:o(h,function(e){return function(t,i){return s(e,this,arguments)}},l,!0)})},{"1051ab5946792444":"gJg5v","901806552daaa9d1":"e5ie6",c2da5f9111ec0d0d:"2fjXG",bbf9283d8426dd54:"cXVrS","2df6383956d55950":"ja1ZQ"}],"3LJSA":[function(e,t,i){var n=e("17b6274b31efea6a"),r=e("bd1f09a15df9c54b"),s=e("aeeef420262f9436"),a=e("d3a5a5518b6afdf1"),o=e("a3c99fc0a91390b5");n({target:"Array",proto:!0},{at:function(e){var t=r(this),i=s(t),n=a(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]}}),o("at")},{"17b6274b31efea6a":"gJg5v",bd1f09a15df9c54b:"6oQEu",aeeef420262f9436:"kHSes",d3a5a5518b6afdf1:"gAgUH",a3c99fc0a91390b5:"4jzvR"}],"4jzvR":[function(e,t,i){var n=e("d4032cdcc50314e7"),r=e("3ca2a6909ac2dcef"),s=e("545ab457bf71d338").f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}},{d4032cdcc50314e7:"5CuF7","3ca2a6909ac2dcef":"7isQ3","545ab457bf71d338":"hvqCQ"}],jYNHr:[function(e,t,i){var n=e("ae9bcc3c886d2e43"),r=e("320b7f8f99977d72"),s=e("c9c4d35908c64a9b"),a=e("e40ffb4fd8cdd6ef"),o=e("600c6b55241cb08d"),h=e("c35064fc908d412e"),c=e("d3e233a6dd5508d7"),l=e("4da7fb5e70719532"),u=e("706ee6e3130d3c44"),d=e("76c3a5d37e98bd2f"),f=e("210a9ec1468bd8f4"),p=e("64448af9c74a3ff5"),g=f("isConcatSpreadable"),m=p>=51||!r(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),v=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:s(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!d("concat")},{concat:function(e){var t,i,n,r,s,a=o(this),d=u(a,0),f=0;for(t=-1,n=arguments.length;t9007199254740991)throw n("Maximum allowed index exceeded");return e}},{}],SVTZV:[function(e,t,i){var n=e("667a2d5a858194a6"),r=e("2daa2f41b7310fd4"),s=e("7bb9efd811e3f83f");t.exports=function(e,t,i){n?r.f(e,t,s(0,i)):e[t]=i}},{"667a2d5a858194a6":"6mXK1","2daa2f41b7310fd4":"hvqCQ","7bb9efd811e3f83f":"5toj2"}],ca1EV:[function(e,t,i){var n=e("bbe4de7ca7a1c6be"),r=e("6cb3e4ca309911dc"),s=e("4d1dd9e6baf7a81f"),a=r("species");t.exports=function(e){return s>=51||!n(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},{bbe4de7ca7a1c6be:"cXVrS","6cb3e4ca309911dc":"5CuF7","4d1dd9e6baf7a81f":"co76c"}],"9D9sM":[function(e,t,i){var n=e("4890937a7e7c636b"),r=e("7256897b95da01b3"),s=e("4c4cc4b0d9ea98ec");n({target:"Array",proto:!0},{copyWithin:r}),s("copyWithin")},{"4890937a7e7c636b":"gJg5v","7256897b95da01b3":"toMXb","4c4cc4b0d9ea98ec":"4jzvR"}],toMXb:[function(e,t,i){var n=e("67e19c72f7fbebd0"),r=e("5063d303bf924d87"),s=e("e3d01b6d6197aedd"),a=e("6ffaf2643c0abf62"),o=Math.min;t.exports=[].copyWithin||function(e,t){var i=n(this),h=s(i),c=r(e,h),l=r(t,h),u=arguments.length>2?arguments[2]:void 0,d=o((void 0===u?h:r(u,h))-l,h-c),f=1;for(l0;)l in i?i[c]=i[l]:a(i,c),c+=f,l+=f;return i}},{"67e19c72f7fbebd0":"6oQEu","5063d303bf924d87":"47gaI",e3d01b6d6197aedd:"kHSes","6ffaf2643c0abf62":"hb7MO"}],hb7MO:[function(e,t,i){var n=e("49f65044bb4dad7f"),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw new r("Cannot delete property "+n(t)+" of "+n(e))}},{"49f65044bb4dad7f":"3zerS"}],c1k6c:[function(e,t,i){var n=e("c1238b63d9c8719e"),r=e("f6644a21f0f5983").every;n({target:"Array",proto:!0,forced:!e("8bc22f42d8ee353c")("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{c1238b63d9c8719e:"gJg5v",f6644a21f0f5983:"daQdc","8bc22f42d8ee353c":"lz8BN"}],lz8BN:[function(e,t,i){var n=e("77f0d106558781f");t.exports=function(e,t){var i=[][e];return!!i&&n(function(){i.call(null,t||function(){return 1},1)})}},{"77f0d106558781f":"cXVrS"}],lbPxO:[function(e,t,i){var n=e("52cb142d804aabd3"),r=e("daf335b8230cfcc7"),s=e("3e31c661bed82a2d");n({target:"Array",proto:!0},{fill:r}),s("fill")},{"52cb142d804aabd3":"gJg5v",daf335b8230cfcc7:"9XPgi","3e31c661bed82a2d":"4jzvR"}],"9XPgi":[function(e,t,i){var n=e("45e35cf118865951"),r=e("ae17acf5d72570ed"),s=e("94aaef7256431b15");t.exports=function(e){for(var t=n(this),i=s(t),a=arguments.length,o=r(a>1?arguments[1]:void 0,i),h=a>2?arguments[2]:void 0,c=void 0===h?i:r(h,i);c>o;)t[o++]=e;return t}},{"45e35cf118865951":"6oQEu",ae17acf5d72570ed:"47gaI","94aaef7256431b15":"kHSes"}],jKklH:[function(e,t,i){var n=e("a465bc55e057d26f"),r=e("fa9926c68c33923f").filter;n({target:"Array",proto:!0,forced:!e("9232c94be2f9c639")("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{a465bc55e057d26f:"gJg5v",fa9926c68c33923f:"daQdc","9232c94be2f9c639":"ca1EV"}],lMNyP:[function(e,t,i){var n=e("a6cb3a492b52d21c"),r=e("ad97e1511b32e588").find,s=e("62fd950aac3d5249"),a="find",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{a6cb3a492b52d21c:"gJg5v",ad97e1511b32e588:"daQdc","62fd950aac3d5249":"4jzvR"}],hPNfA:[function(e,t,i){var n=e("dcce3e96aeb32c26"),r=e("25f2fe0b92321096").findIndex,s=e("1c93cc746ac8ffb1"),a="findIndex",o=!0;a in[]&&[,][a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s(a)},{dcce3e96aeb32c26:"gJg5v","25f2fe0b92321096":"daQdc","1c93cc746ac8ffb1":"4jzvR"}],fURyF:[function(e,t,i){var n=e("7c9570dd28371e00"),r=e("43d20d51fd072b05").findLast,s=e("8c5f13eb9efbfd84");n({target:"Array",proto:!0},{findLast:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLast")},{"7c9570dd28371e00":"gJg5v","43d20d51fd072b05":"cyWXz","8c5f13eb9efbfd84":"4jzvR"}],cyWXz:[function(e,t,i){var n=e("c1d87d2297f1acca"),r=e("e5df4a29c897e724"),s=e("42c314ae435e3665"),a=e("a64fff03b4e929f6"),o=function(e){var t=1===e;return function(i,o,h){for(var c,l=s(i),u=r(l),d=a(u),f=n(o,h);d-- >0;)if(f(c=u[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};t.exports={findLast:o(0),findLastIndex:o(1)}},{c1d87d2297f1acca:"f1CxE",e5df4a29c897e724:"kuAas","42c314ae435e3665":"6oQEu",a64fff03b4e929f6:"kHSes"}],"6XyUS":[function(e,t,i){var n=e("bba50227ea399df7"),r=e("c196d65aab15955b").findLastIndex,s=e("5f02d29251865622");n({target:"Array",proto:!0},{findLastIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findLastIndex")},{bba50227ea399df7:"gJg5v",c196d65aab15955b:"cyWXz","5f02d29251865622":"4jzvR"}],d83iu:[function(e,t,i){var n=e("eea83811f9bf5b44"),r=e("d9157408980dcae4"),s=e("1603b1d7d71c6d78"),a=e("95d7017c9e9cedeb"),o=e("9b0770c8bd20c0f9"),h=e("4c36764bcb49234f");n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=s(this),i=a(t),n=h(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:o(e)),n}})},{eea83811f9bf5b44:"gJg5v",d9157408980dcae4:"2QW86","1603b1d7d71c6d78":"6oQEu","95d7017c9e9cedeb":"kHSes","9b0770c8bd20c0f9":"gAgUH","4c36764bcb49234f":"kfoQr"}],"2QW86":[function(e,t,i){var n=e("ebb82f00ac94e25c"),r=e("d2ce61b77ec49b3f"),s=e("d3f4210cd620e3d6"),a=e("a7c8b8651480c6c9"),o=function(e,t,i,h,c,l,u,d){for(var f,p,g=c,m=0,v=!!u&&a(u,d);m0&&n(f)?(p=r(f),g=o(e,t,f,p,g,l-1)-1):(s(g+1),e[g]=f),g++),m++;return g};t.exports=o},{ebb82f00ac94e25c:"7GYYD",d2ce61b77ec49b3f:"kHSes",d3f4210cd620e3d6:"6TggQ",a7c8b8651480c6c9:"f1CxE"}],lc4NN:[function(e,t,i){var n=e("e4ee3b9d2bc1ffb2"),r=e("378c1e23131cdaae"),s=e("74e7f70118e2a778"),a=e("1a2d0561d09775b8"),o=e("f7bbb0ab5ee7446c"),h=e("51d35c0066e59cdb");n({target:"Array",proto:!0},{flatMap:function(e){var t,i=a(this),n=o(i);return s(e),(t=h(i,0)).length=r(t,i,i,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},{e4ee3b9d2bc1ffb2:"gJg5v","378c1e23131cdaae":"2QW86","74e7f70118e2a778":"alrlv","1a2d0561d09775b8":"6oQEu",f7bbb0ab5ee7446c:"kHSes","51d35c0066e59cdb":"kfoQr"}],gjqcj:[function(e,t,i){var n=e("214b5a111591d046"),r=e("658aa5ae0eee38b0");n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},{"214b5a111591d046":"gJg5v","658aa5ae0eee38b0":"4w3Nn"}],"4w3Nn":[function(e,t,i){var n=e("1a0535b754110eb5").forEach,r=e("df61bc1b7a92de0f")("forEach");t.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},{"1a0535b754110eb5":"daQdc",df61bc1b7a92de0f:"lz8BN"}],j3v3L:[function(e,t,i){var n=e("76f1b3b688a029fa"),r=e("55358907c05b685d");n({target:"Array",stat:!0,forced:!e("98fd99047e51c8be")(function(e){Array.from(e)})},{from:r})},{"76f1b3b688a029fa":"gJg5v","55358907c05b685d":"lrrJd","98fd99047e51c8be":"dR8Bu"}],lrrJd:[function(e,t,i){var n=e("c006aee3ec90867f"),r=e("bdaed06b86eeb767"),s=e("ca05db7523b31410"),a=e("47fe223c8f6c2dd5"),o=e("75eba7673a242ae6"),h=e("188dc0b37c140076"),c=e("32c4effc8b33b2c2"),l=e("a6ed280c439df9d0"),u=e("3faaa09a63a90825"),d=e("13cbec27e4dd055f"),f=Array;t.exports=function(e){var t,i,p,g,m,v,y=s(e),b=h(this),x=arguments.length,E=x>1?arguments[1]:void 0,w=void 0!==E;w&&(E=n(E,x>2?arguments[2]:void 0));var T=d(y),S=0;if(T&&!(this===f&&o(T)))for(i=b?new this:[],m=(g=u(y,T)).next;!(p=r(m,g)).done;S++)v=w?a(g,E,[p.value,S],!0):p.value,l(i,S,v);else for(t=c(y),i=b?new this(t):f(t);t>S;S++)v=w?E(y[S],S):y[S],l(i,S,v);return i.length=S,i}},{c006aee3ec90867f:"f1CxE",bdaed06b86eeb767:"bOssl",ca05db7523b31410:"6oQEu","47fe223c8f6c2dd5":"hyn7H","75eba7673a242ae6":"88nHe","188dc0b37c140076":"eytEI","32c4effc8b33b2c2":"kHSes",a6ed280c439df9d0:"SVTZV","3faaa09a63a90825":"kBMjp","13cbec27e4dd055f":"3624P"}],hyn7H:[function(e,t,i){var n=e("4afbb4be48dcf066"),r=e("d24fa1ffea48fa52");t.exports=function(e,t,i,s){try{return s?t(n(i)[0],i[1]):t(i)}catch(t){r(e,"throw",t)}}},{"4afbb4be48dcf066":"dPzbI",d24fa1ffea48fa52:"58eij"}],dR8Bu:[function(e,t,i){var n=e("a5154de5c7fcf21e")("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){try{if(!t&&!r)return!1}catch(e){return!1}var i=!1;try{var s={};s[n]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(e){}return i}},{a5154de5c7fcf21e:"5CuF7"}],"3rrfH":[function(e,t,i){var n=e("ffa5d46bdab873f9"),r=e("abe71b6f5a2c149").includes,s=e("119354898116a770"),a=e("9a828f869e1adf81");n({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{ffa5d46bdab873f9:"gJg5v",abe71b6f5a2c149:"7HT32","119354898116a770":"cXVrS","9a828f869e1adf81":"4jzvR"}],b10MD:[function(e,t,i){var n=e("9d4bf984c01e8ef7"),r=e("ff94ec157dbe45f"),s=e("84db9b100b66a9f4").indexOf,a=e("928c12f9f760e965"),o=r([].indexOf),h=!!o&&1/o([1],1,-0)<0;n({target:"Array",proto:!0,forced:h||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return h?o(this,e,t)||0:s(this,e,t)}})},{"9d4bf984c01e8ef7":"gJg5v",ff94ec157dbe45f:"c4z5p","84db9b100b66a9f4":"7HT32","928c12f9f760e965":"lz8BN"}],"2JgXG":[function(e,t,i){e("e1a67b4aafecad9a")({target:"Array",stat:!0},{isArray:e("1fa49986380c79ad")})},{e1a67b4aafecad9a:"gJg5v","1fa49986380c79ad":"7GYYD"}],"3prNk":[function(e,t,i){var n=e("c8e067881939a0cb"),r=e("275b8f0cb65b77aa"),s=e("21f4d3653c90f049"),a=e("85efa8d5848315f6"),o=e("94a17682acfdceb4").f,h=e("bb30bdef31147b17"),c=e("d8384af5151f994c"),l=e("fdcc207797f592fe"),u=e("11e42ff2bbda8d0a"),d="Array Iterator",f=a.set,p=a.getterFor(d);t.exports=h(Array,"Array",function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(i,!1);case"values":return c(t[i],!1)}return c([i,t[i]],!1)},"values");var g=s.Arguments=s.Array;if(r("keys"),r("values"),r("entries"),!l&&u&&"values"!==g.name)try{o(g,"name",{value:"values"})}catch(e){}},{c8e067881939a0cb:"h9ut0","275b8f0cb65b77aa":"4jzvR","21f4d3653c90f049":"bABtS","85efa8d5848315f6":"ixHS2","94a17682acfdceb4":"hvqCQ",bb30bdef31147b17:"klSVb",d8384af5151f994c:"dwU83",fdcc207797f592fe:"jHRGA","11e42ff2bbda8d0a":"6mXK1"}],klSVb:[function(e,t,i){var n=e("923c1bf4a39ae90c"),r=e("46a3f73465955199"),s=e("c1577e63189cf935"),a=e("dc625e1bb584faf6"),o=e("d55d91c410baca17"),h=e("3e4ae607dbb6e78b"),c=e("48ca4ae1d4998232"),l=e("1263258b63630933"),u=e("9b61caf69f87dfde"),d=e("7f30a3ab1bf5e1c1"),f=e("c027b4da648348d3"),p=e("d4ad91965213ee1"),g=e("b616a206eb405268"),m=e("4f9ec7e9f5d20965"),v=a.PROPER,y=a.CONFIGURABLE,b=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,E=p("iterator"),w="keys",T="values",S="entries",A=function(){return this};t.exports=function(e,t,i,a,p,m,C){h(i,t,a);var _,I,O,P=function(e){if(e===p&&k)return k;if(!x&&e&&e in L)return L[e];switch(e){case w:case T:case S:return function(){return new i(this,e)}}return function(){return new i(this)}},M=t+" Iterator",R=!1,L=e.prototype,D=L[E]||L["@@iterator"]||p&&L[p],k=!x&&D||P(p),N="Array"===t&&L.entries||D;if(N&&(_=c(N.call(new e)))!==Object.prototype&&_.next&&(s||c(_)===b||(l?l(_,b):o(_[E])||f(_,E,A)),u(_,M,!0,!0),s&&(g[M]=A)),v&&p===T&&D&&D.name!==T&&(!s&&y?d(L,"name",T):(R=!0,k=function(){return r(D,this)})),p){if(I={values:P(T),keys:m?k:P(w),entries:P(S)},C)for(O in I)!x&&!R&&O in L||f(L,O,I[O]);else n({target:t,proto:!0,forced:x||R},I)}return(!s||C)&&L[E]!==k&&f(L,E,k,{name:p}),g[t]=k,I}},{"923c1bf4a39ae90c":"gJg5v","46a3f73465955199":"bOssl",c1577e63189cf935:"jHRGA",dc625e1bb584faf6:"jmu0n",d55d91c410baca17:"h1Wnr","3e4ae607dbb6e78b":"1Abii","48ca4ae1d4998232":"e8mfS","1263258b63630933":"arrdQ","9b61caf69f87dfde":"dkhk9","7f30a3ab1bf5e1c1":"gKM90",c027b4da648348d3:"4CPdc",d4ad91965213ee1:"5CuF7",b616a206eb405268:"bABtS","4f9ec7e9f5d20965":"6nE00"}],"1Abii":[function(e,t,i){var n=e("6d3197d79123a33d").IteratorPrototype,r=e("f19338a88747fb05"),s=e("cc176dfbf6ea0553"),a=e("bc433e6ab6880430"),o=e("2f833e0e1738e7e0"),h=function(){return this};t.exports=function(e,t,i,c){var l=t+" Iterator";return e.prototype=r(n,{next:s(+!c,i)}),a(e,l,!1,!0),o[l]=h,e}},{"6d3197d79123a33d":"6nE00",f19338a88747fb05:"7isQ3",cc176dfbf6ea0553:"5toj2",bc433e6ab6880430:"dkhk9","2f833e0e1738e7e0":"bABtS"}],"6nE00":[function(e,t,i){var n,r,s,a=e("cdb9dcd93b52b3fc"),o=e("db955145706fc55a"),h=e("83e5df3d56e8834f"),c=e("45d6f1a3c372cdf6"),l=e("a97459767d74fdc3"),u=e("3bdf78f362001d7c"),d=e("d3901e60df7842c9"),f=e("e736fd193ddc96e5"),p=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(r=l(l(s)))!==Object.prototype&&(n=r):g=!0),!h(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:f&&(n=c(n)),o(n[p])||u(n,p,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},{cdb9dcd93b52b3fc:"cXVrS",db955145706fc55a:"h1Wnr","83e5df3d56e8834f":"8mxCV","45d6f1a3c372cdf6":"7isQ3",a97459767d74fdc3:"e8mfS","3bdf78f362001d7c":"4CPdc",d3901e60df7842c9:"5CuF7",e736fd193ddc96e5:"jHRGA"}],dwU83:[function(e,t,i){t.exports=function(e,t){return{value:e,done:t}}},{}],le1uL:[function(e,t,i){var n=e("1fd3a81d59354079"),r=e("878a42cfd07db75d"),s=e("c417af28e9abb2b"),a=e("cdcc2dbc58a28c02"),o=e("733e226e143494d1"),h=r([].join);n({target:"Array",proto:!0,forced:s!==Object||!o("join",",")},{join:function(e){return h(a(this),void 0===e?",":e)}})},{"1fd3a81d59354079":"gJg5v","878a42cfd07db75d":"2iJ57",c417af28e9abb2b:"kuAas",cdcc2dbc58a28c02:"h9ut0","733e226e143494d1":"lz8BN"}],eli4M:[function(e,t,i){var n=e("962fe7a81cad1a6"),r=e("9a92cbcc02ff28cd");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},{"962fe7a81cad1a6":"gJg5v","9a92cbcc02ff28cd":"cfsWk"}],cfsWk:[function(e,t,i){var n=e("4ca7787412cb919d"),r=e("883419ed27232d44"),s=e("ec6d0c7c9b243b67"),a=e("f185a9d11d03524a"),o=e("6d58dcee43d16a4d"),h=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf");t.exports=l||!u?function(e){if(l)return n(c,this,arguments)||0;var t=r(this),i=a(t);if(0===i)return -1;var o=i-1;for(arguments.length>1&&(o=h(o,s(arguments[1]))),o<0&&(o=i+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return -1}:c},{"4ca7787412cb919d":"2fjXG","883419ed27232d44":"h9ut0",ec6d0c7c9b243b67:"gAgUH",f185a9d11d03524a:"kHSes","6d58dcee43d16a4d":"lz8BN"}],zkrYn:[function(e,t,i){var n=e("5fce1361821ac187"),r=e("a7a3b0905c6ea58c").map;n({target:"Array",proto:!0,forced:!e("869912db050ffcc6")("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"5fce1361821ac187":"gJg5v",a7a3b0905c6ea58c:"daQdc","869912db050ffcc6":"ca1EV"}],"6cM5k":[function(e,t,i){var n=e("c49bbaeadf669473"),r=e("2b7c23018838f50"),s=e("5ca03f92538fd001"),a=e("d87cf2a2bcbb5c2c"),o=Array;n({target:"Array",stat:!0,forced:r(function(){function e(){}return!(o.of.call(e) instanceof e)})},{of:function(){for(var e=0,t=arguments.length,i=new(s(this)?this:o)(t);t>e;)a(i,e,arguments[e++]);return i.length=t,i}})},{c49bbaeadf669473:"gJg5v","2b7c23018838f50":"cXVrS","5ca03f92538fd001":"eytEI",d87cf2a2bcbb5c2c:"SVTZV"}],j9q44:[function(e,t,i){var n=e("b6ccafca6520a091"),r=e("617fddde3018a247"),s=e("59103d39edb4650b"),a=e("92e23121d8e92745"),o=e("e72c330067644bc");n({target:"Array",proto:!0,arity:1,forced:e("a33adf7f040c3b17")(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=r(this),i=s(t),n=arguments.length;o(i+n);for(var h=0;h79&&a<83||!s("reduce")},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},{aa6d80bc3b697f48:"gJg5v","1ee240c0462acdf8":"dEdT1","161424d627b72094":"lz8BN",bc7f601de74ac73e:"co76c",fbcc11805e216a7d:"hdoIk"}],dEdT1:[function(e,t,i){var n=e("93e7a99f8d3bc817"),r=e("915d05570b61a3c9"),s=e("da310552be96f5db"),a=e("f4209260f2003c23"),o=TypeError,h="Reduce of empty array with no initial value",c=function(e){return function(t,i,c,l){var u=r(t),d=s(u),f=a(u);if(n(i),0===f&&c<2)throw new o(h);var p=e?f-1:0,g=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=g;break}if(p+=g,e?p<0:f<=p)throw new o(h)}for(;e?p>=0:f>p;p+=g)p in d&&(l=i(l,d[p],p,u));return l}};t.exports={left:c(!1),right:c(!0)}},{"93e7a99f8d3bc817":"alrlv","915d05570b61a3c9":"6oQEu",da310552be96f5db:"kuAas",f4209260f2003c23:"kHSes"}],hdoIk:[function(e,t,i){var n=e("5fac34e3c4c0e043");t.exports="NODE"===n},{"5fac34e3c4c0e043":"ah0ZS"}],ah0ZS:[function(e,t,i){var n=e("7dc361f46ecde901"),r=e("9f6e24ecbba66a9e"),s=e("a008a59fdc341842"),a=function(e){return r.slice(0,e.length)===e};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},{"7dc361f46ecde901":"7Z171","9f6e24ecbba66a9e":"5hj4U",a008a59fdc341842:"161sQ"}],YvN4R:[function(e,t,i){var n=e("fce4aa67eb1fe4da"),r=e("9bb83011bb72081c").right,s=e("86ebd8f03f19e7b"),a=e("c87ecf8f0d069a25");n({target:"Array",proto:!0,forced:!e("ceeda59dcd941a57")&&a>79&&a<83||!s("reduceRight")},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},{fce4aa67eb1fe4da:"gJg5v","9bb83011bb72081c":"dEdT1","86ebd8f03f19e7b":"lz8BN",c87ecf8f0d069a25:"co76c",ceeda59dcd941a57:"hdoIk"}],eqr1I:[function(e,t,i){var n=e("96e1bf170d634a10"),r=e("ccf1d267c2b85a6"),s=e("683c722e26101e35"),a=r([].reverse),o=[1,2];n({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return s(this)&&(this.length=this.length),a(this)}})},{"96e1bf170d634a10":"gJg5v",ccf1d267c2b85a6:"2iJ57","683c722e26101e35":"7GYYD"}],gW4UQ:[function(e,t,i){var n=e("f4626508f1e86a5e"),r=e("c55f884cac32042"),s=e("c7ab28f7c42930d4"),a=e("d62f4c68d4a29c88"),o=e("598be77178793bf1"),h=e("f9b9299dc750b2dd"),c=e("ff620c60ded20435"),l=e("49168568b59df51b"),u=e("f02f140688adf449"),d=e("eb9bbc0536d1f202"),f=e("88cb1064f5f88f9e"),p=d("slice"),g=u("species"),m=Array,v=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var i,n,u,d=c(this),p=h(d),y=o(e,p),b=o(void 0===t?p:t,p);if(r(d)&&(s(i=d.constructor)&&(i===m||r(i.prototype))?i=void 0:a(i)&&null===(i=i[g])&&(i=void 0),i===m||void 0===i))return f(d,y,b);for(u=0,n=new(void 0===i?m:i)(v(b-y,0));y1?arguments[1]:void 0)}})},{"7d2f6f3fe52919ae":"gJg5v",b1828f452e0c06d:"daQdc","2a793f2ccd9f7f4e":"lz8BN"}],g2wAi:[function(e,t,i){var n=e("bcbafe2730da3578"),r=e("45fd6781824a0ecc"),s=e("227e835045b72b76"),a=e("d460a9dbedc2e639"),o=e("eb5d266a4b580e05"),h=e("ab9af39e90a45cab"),c=e("2874e3c4ed670355"),l=e("b077ecec4e3b8790"),u=e("b1c0993c5b4a0232"),d=e("fc67c1f531962716"),f=e("5463fbeb0c308d9"),p=e("44ffda3b5c0f4b25"),g=e("f9fbdc3cf34ed30"),m=e("f4067f6b9a5e38cb"),v=[],y=r(v.sort),b=r(v.push),x=l(function(){v.sort(void 0)}),E=l(function(){v.sort(null)}),w=d("sort"),T=!l(function(){if(g)return g<70;if(!f||!(f>3)){if(p)return!0;if(m)return m<603;var e,t,i,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)v.push({k:t+n,v:i})}for(v.sort(function(e,t){return t.v-e.v}),n=0;nc(i)?1:-1}),t=o(r),i=0;i0;)e[o]=e[--o];o!==h++&&(e[o]=a)}else for(var c=r(i/2),l=s(n(e,0,c),t),u=s(n(e,c),t),d=l.length,f=u.length,p=0,g=0;p=t(l[p],u[g])?l[p++]:u[g++]:px-n+i;m--)d(b,m-1)}else if(i>n)for(m=x-n;m>E;m--)v=m+n-1,y=m+i-1,v in b?b[y]=b[v]:d(b,y);for(m=0;m2?i:n(t),a=new e(s);s>r;)a[r]=t[r++];return a}},{"2dee1f257e46a7db":"kHSes"}],"6NIFY":[function(e,t,i){var n=e("63ff55de103c0dc5");t.exports=function(e,t){var i=n[e],r=i&&i.prototype;return r&&r[t]}},{"63ff55de103c0dc5":"7Z171"}],iJJcs:[function(e,t,i){var n=e("c44d9276f6e49c66"),r=e("ccd8819e12261215"),s=e("95891e25a6f53375"),a=e("71fb5de0045d079d"),o=e("150c173e099ddbe3"),h=e("bc8453913d7979ca"),c=e("a4502cc79d58ffee"),l=Array,u=Math.max,d=Math.min;n({target:"Array",proto:!0},{toSpliced:function(e,t){var i,n,r,f,p=h(this),g=a(p),m=o(e,g),v=arguments.length,y=0;for(0===v?i=n=0:1===v?(i=0,n=g-m):(i=v-2,n=d(u(c(t),0),g-m)),f=l(r=s(g+i-n));y=o||c<0)throw new s("Incorrect index");for(var l=new t(o),u=0;u>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},J=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return H(m(e),23,4)},Q=function(e){return H(e,52,8)},Z=function(e,t,i){c(e[P],t,{configurable:!0,get:function(){return i(this)[t]}})},ee=function(e,t,i,n){var r=L(e),s=g(i);if(s+t>r.byteLength)throw new j(M);var a=r.bytes,o=s+r.byteOffset,h=E(a,o,o+t);return n?h:Y(h)},et=function(e,t,i,n,r,s){var a=L(e),o=g(i),h=n(+r),c=!!s;if(o+t>a.byteLength)throw new j(M);for(var l=a.bytes,u=o+a.byteOffset,d=0;d>24)},setUint8:function(e,t){er(this,e,t<<24>>24)}},{unsafe:!0})}else F=(N=function(e){d(this,F);var t=g(e);D(this,{type:I,bytes:W(G(t),0),byteLength:t}),s||(this.byteLength=t,this.detached=!1)})[P],U=(B=function(e,t,i){d(this,U),d(e,F);var n=R(e),r=n.byteLength,a=f(t);if(a<0||a>r)throw new j("Wrong offset");if(i=void 0===i?r-a:p(i),a+i>r)throw new j("Wrong length");D(this,{type:O,buffer:e,byteLength:i,byteOffset:a,bytes:n.bytes}),s||(this.buffer=e,this.byteLength=i,this.byteOffset=a)})[P],s&&(Z(N,"byteLength",R),Z(B,"buffer",L),Z(B,"byteLength",L),Z(B,"byteOffset",L)),l(U,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return J(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){et(this,1,e,X,t)},setUint8:function(e,t){et(this,1,e,X,t)},setInt16:function(e,t){et(this,2,e,K,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){et(this,2,e,K,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){et(this,4,e,q,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){et(this,4,e,q,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){et(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){et(this,8,e,Q,t,arguments.length>2&&arguments[2])}});S(N,I),S(B,O),t.exports={ArrayBuffer:N,DataView:B}},{b2866645d252be10:"7Z171","6f1278f8f2a16115":"2iJ57","82c590a9dd8cc3ac":"6mXK1","923679fae99d4d2f":"i5ikG","9840ef06cc46dddb":"jmu0n","78ca6eb037349755":"gKM90",e693d9164e48343:"3NI4M","649a7a39c0607d74":"43JWW","57aab94a1cd1d913":"cXVrS","7333f43e52f40b38":"95yA1","1fd77d2940b4fd75":"gAgUH","8739fe5c743af579":"lQsU7",e3fc7a8bc754578a:"g2ruQ","93dd6846d2a65063":"lyxmB",d85071d33c34155a:"7M4Fp",eae7b83555f02284:"e8mfS",fd01028813b4814f:"arrdQ","8fdeb7296fb95696":"9XPgi",c0dac2bdd3636e95:"eO8Ta","3606a69f7ceacab3":"30not","5a0e685d057e2415":"d9xyM",dd3d1adef426fc5:"dkhk9",ea12fbd2f22b2f25:"ixHS2"}],i5ikG:[function(e,t,i){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],"43JWW":[function(e,t,i){var n=e("e34e683e23dcb4bb");t.exports=function(e,t,i){for(var r in t)n(e,r,t[r],i);return e}},{e34e683e23dcb4bb:"4CPdc"}],"95yA1":[function(e,t,i){var n=e("55f8840091c5bf21"),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},{"55f8840091c5bf21":"d5bNd"}],g2ruQ:[function(e,t,i){var n=e("10a259b760ce2864"),r=e("f24767d66362404d"),s=RangeError;t.exports=function(e){if(void 0===e)return 0;var t=n(e),i=r(t);if(t!==i)throw new s("Wrong length or index");return i}},{"10a259b760ce2864":"gAgUH",f24767d66362404d:"lQsU7"}],lyxmB:[function(e,t,i){var n=e("8f9dfe0502a74d7");t.exports=Math.fround||function(e){return n(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)}},{"8f9dfe0502a74d7":"b6uSw"}],b6uSw:[function(e,t,i){var n=e("9113322676fa66ef"),r=Math.abs;t.exports=function(e,t,i,s){var a=+e,o=r(a),h=n(a);if(oi||l!=l?1/0*h:h*l}},{"9113322676fa66ef":"9QHoq"}],"9QHoq":[function(e,t,i){t.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},{}],"7M4Fp":[function(e,t,i){var n=Array,r=Math.abs,s=Math.pow,a=Math.floor,o=Math.log,h=Math.LN2;t.exports={pack:function(e,t,i){var c,l,u,d=n(i),f=8*i-t-1,p=(1<>1,m=23===t?s(2,-24)-s(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(u=s(2,-(c=a(o(e)/h))),e*u<1&&(c--,u*=2),c+g>=1?e+=m/u:e+=m*s(2,1-g),e*u>=2&&(c++,u/=2),c+g>=p?(l=0,c=p):c+g>=1?(l=(e*u-1)*s(2,t),c+=g):(l=e*s(2,g-1)*s(2,t),c=0));t>=8;)d[y++]=255&l,l/=256,t-=8;for(c=c<0;)d[y++]=255&c,c/=256,f-=8;return d[y-1]|=128*v,d},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<>1,h=r-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;h>0;)u=256*u+e[c--],h-=8;for(i=u&(1<<-h)-1,u>>=-h,h+=t;h>0;)i=256*i+e[c--],h-=8;if(0===u)u=1-o;else{if(u===a)return i?NaN:l?-1/0:1/0;i+=s(2,t),u-=o}return(l?-1:1)*i*s(2,u-t)}}},{}],"9DwR1":[function(e,t,i){var n=e("46c87ab471833e50"),r=e("3efc956d746e3978");n({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},{"46c87ab471833e50":"gJg5v","3efc956d746e3978":"b6692"}],b6692:[function(e,t,i){var n,r,s,a=e("4142cc1b1f950662"),o=e("fa237bbf2050dd6d"),h=e("9603af1373955d3d"),c=e("1b44b7e19e6f660d"),l=e("af39713fe0cf7587"),u=e("dd5eec94b1519471"),d=e("b9eebb2d4c13b0d6"),f=e("36a2290066710aa0"),p=e("fdfbb82e20f81a19"),g=e("81ef6d90bc6acdce"),m=e("96421c541af03be5"),v=e("ab8263bb2af6274"),y=e("ba5da2480b30b79"),b=e("b6e4d282cbe3e34a"),x=e("3d5af0d43aa6e42b"),E=e("8007fa7370557b8e"),w=e("82848943f937d383"),T=w.enforce,S=w.get,A=h.Int8Array,C=A&&A.prototype,_=h.Uint8ClampedArray,I=_&&_.prototype,O=A&&y(A),P=C&&y(C),M=Object.prototype,R=h.TypeError,L=x("toStringTag"),D=E("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",N=a&&!!b&&"Opera"!==d(h.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},V=function(e){var t=y(e);if(l(t)){var i=S(t);return i&&u(i,k)?i[k]:V(t)}},G=function(e){if(!l(e))return!1;var t=d(e);return u(B,t)||u(U,t)};for(n in B)(s=(r=h[n])&&r.prototype)?T(s)[k]=r:N=!1;for(n in U)(s=(r=h[n])&&r.prototype)&&(T(s)[k]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw new R("Incorrect invocation")},N))for(n in B)h[n]&&b(h[n],O);if((!N||!P||P===M)&&(P=O.prototype,N))for(n in B)h[n]&&b(h[n].prototype,P);if(N&&y(I)!==P&&b(I,P),o&&!u(P,L))for(n in F=!0,m(P,L,{configurable:!0,get:function(){return l(this)?this[D]:void 0}}),B)h[n]&&p(h[n],D,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&D,aTypedArray:function(e){if(G(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||v(O,e)))return e;throw new R(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,n){if(o){if(i)for(var r in B){var s=h[r];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}(!P[e]||i)&&g(P,e,i?t:N&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(o){if(b){if(i){for(n in B)if((r=h[n])&&u(r,e))try{delete r[e]}catch(e){}}if(O[e]&&!i)return;try{return g(O,e,i?t:N&&O[e]||t)}catch(e){}}for(n in B)(r=h[n])&&(!r[e]||i)&&g(r,e,t)}},getTypedArrayConstructor:V,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||u(B,t)||u(U,t)},isTypedArray:G,TypedArray:O,TypedArrayPrototype:P}},{"4142cc1b1f950662":"i5ikG",fa237bbf2050dd6d:"6mXK1","9603af1373955d3d":"7Z171","1b44b7e19e6f660d":"h1Wnr",af39713fe0cf7587:"8mxCV",dd5eec94b1519471:"9JWVX",b9eebb2d4c13b0d6:"cRCRk","36a2290066710aa0":"3zerS",fdfbb82e20f81a19:"gKM90","81ef6d90bc6acdce":"4CPdc","96421c541af03be5":"3NI4M",ab8263bb2af6274:"d5bNd",ba5da2480b30b79:"e8mfS",b6e4d282cbe3e34a:"arrdQ","3d5af0d43aa6e42b":"5CuF7","8007fa7370557b8e":"55cC0","82848943f937d383":"ixHS2"}],hihCW:[function(e,t,i){var n=e("de35f4868f3fe074"),r=e("41f3b5783dddf1cc"),s=e("da813d2481635a75"),a=e("7ac9e92946b0cbd8"),o=e("d8dca2550bf1cdc9"),h=e("881de7865554c8ed"),c=e("9f7b0710000cb4e4"),l=a.ArrayBuffer,u=a.DataView,d=u.prototype,f=r(l.prototype.slice),p=r(d.getUint8),g=r(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:s(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(f&&void 0===t)return f(o(this),e);for(var i=o(this).byteLength,n=h(e,i),r=h(void 0===t?i:t,i),s=new l(c(r-n)),a=new u(this),d=new u(s),m=0;n=s&&(!i||g))n=v(e,0,s);else{n=new d(s,i&&!g&&b?{maxByteLength:b(e)}:void 0);for(var m=new f(e),w=new f(n),T=p(s,r),S=0;S92||"NODE"===a&&s>94||"BROWSER"===a&&s>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},{"6bcfdfa15a0af40c":"7Z171","5bfa734fa18d01bd":"cXVrS","504e63b697c2418c":"co76c","2f39a8269e626373":"ah0ZS"}],ilodQ:[function(e,t,i){var n=e("2ee97e669ed348d2"),r=e("6010ab662274272a");r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},{"2ee97e669ed348d2":"gJg5v","6010ab662274272a":"dmTWg"}],"3sjfy":[function(e,t,i){var n=e("cf63881ba58455e7"),r=e("712c5b724e238772"),s=e("9542983db09542aa")(function(){return 120!==new Date(16e11).getYear()}),a=r(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:s},{getYear:function(){return a(this)-1900}})},{cf63881ba58455e7:"gJg5v","712c5b724e238772":"2iJ57","9542983db09542aa":"cXVrS"}],aJQbh:[function(e,t,i){var n=e("1b76219dfd05b069"),r=e("9cd428d337baa08f"),s=Date,a=r(s.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new s)}})},{"1b76219dfd05b069":"gJg5v","9cd428d337baa08f":"2iJ57"}],cl2UC:[function(e,t,i){var n=e("45b3958e6ed27545"),r=e("bb0b969d98296e93"),s=e("1bfaa736b448a80b"),a=Date.prototype,o=r(a.getTime),h=r(a.setFullYear);n({target:"Date",proto:!0},{setYear:function(e){o(this);var t=s(e);return h(this,t>=0&&t<=99?t+1900:t)}})},{"45b3958e6ed27545":"gJg5v",bb0b969d98296e93:"2iJ57","1bfaa736b448a80b":"gAgUH"}],l89H5:[function(e,t,i){e("382df40000aa3419")({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},{"382df40000aa3419":"gJg5v"}],cHGz3:[function(e,t,i){var n=e("ce28eb9d99ee133e"),r=e("f6428e9a2d433b20");n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r})},{ce28eb9d99ee133e:"gJg5v",f6428e9a2d433b20:"jjIBo"}],jjIBo:[function(e,t,i){var n=e("8ef03d8aa78a1a05"),r=e("d77f9603e3197abc"),s=e("de264358de0ee0b0").start,a=RangeError,o=isFinite,h=Math.abs,c=Date.prototype,l=c.toISOString,u=n(c.getTime),d=n(c.getUTCDate),f=n(c.getUTCFullYear),p=n(c.getUTCHours),g=n(c.getUTCMilliseconds),m=n(c.getUTCMinutes),v=n(c.getUTCMonth),y=n(c.getUTCSeconds);t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-50000000000001))})||!r(function(){l.call(new Date(NaN))})?function(){if(!o(u(this)))throw new a("Invalid time value");var e=f(this),t=g(this),i=e<0?"-":e>9999?"+":"";return i+s(h(e),i?6:4,0)+"-"+s(v(this)+1,2,0)+"-"+s(d(this),2,0)+"T"+s(p(this),2,0)+":"+s(m(this),2,0)+":"+s(y(this),2,0)+"."+s(t,3,0)+"Z"}:l},{"8ef03d8aa78a1a05":"2iJ57",d77f9603e3197abc:"cXVrS",de264358de0ee0b0:"15Fl7"}],"15Fl7":[function(e,t,i){var n=e("3f3ae64f3613324a"),r=e("86f2220ab33aea88"),s=e("ce16e4ba37e115ac"),a=e("3fe5759e7801b635"),o=e("3c8ec8ea0d5bc9c"),h=n(a),c=n("".slice),l=Math.ceil,u=function(e){return function(t,i,n){var a,u,d=s(o(t)),f=r(i),p=d.length,g=void 0===n?" ":s(n);return f<=p||""===g?d:((u=h(g,l((a=f-p)/g.length))).length>a&&(u=c(u,0,a)),e?d+u:u+d)}};t.exports={start:u(!1),end:u(!0)}},{"3f3ae64f3613324a":"2iJ57","86f2220ab33aea88":"lQsU7",ce16e4ba37e115ac:"4x6uB","3fe5759e7801b635":"dsk9g","3c8ec8ea0d5bc9c":"cHxZN"}],dsk9g:[function(e,t,i){var n=e("810ed4f57c077da5"),r=e("f870ae4664ae9b8c"),s=e("b05eac101d7c2112"),a=RangeError;t.exports=function(e){var t=r(s(this)),i="",o=n(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(i+=t);return i}},{"810ed4f57c077da5":"gAgUH",f870ae4664ae9b8c:"4x6uB",b05eac101d7c2112:"cHxZN"}],"6OeqH":[function(e,t,i){var n=e("a9ca9c4e2bd47ff4"),r=e("b11d0c7c0b2675d5"),s=e("60b061d7c8f57ad8"),a=e("e362bf7168d77860");n({target:"Date",proto:!0,arity:1,forced:r(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=s(this),i=a(t,"number");return"number"!=typeof i||isFinite(i)?t.toISOString():null}})},{a9ca9c4e2bd47ff4:"gJg5v",b11d0c7c0b2675d5:"cXVrS","60b061d7c8f57ad8":"6oQEu",e362bf7168d77860:"cCley"}],j16TA:[function(e,t,i){var n=e("af14b1f4d994a127"),r=e("53d6ff102d14faf"),s=e("5ca81c5eeb540a34"),a=e("5e5f3eb0bfd879e9")("toPrimitive"),o=Date.prototype;n(o,a)||r(o,a,s)},{af14b1f4d994a127:"9JWVX","53d6ff102d14faf":"4CPdc","5ca81c5eeb540a34":"5DgYa","5e5f3eb0bfd879e9":"5CuF7"}],"5DgYa":[function(e,t,i){var n=e("38c74c72615b5acf"),r=e("474ad3f08d0bd65b"),s=TypeError;t.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new s("Incorrect hint");return r(this,e)}},{"38c74c72615b5acf":"dPzbI","474ad3f08d0bd65b":"6aMZM"}],ltluo:[function(e,t,i){var n=e("be835518f2abbc78"),r=e("7997503c8dda7ce0"),s=Date.prototype,a="Invalid Date",o="toString",h=n(s[o]),c=n(s.getTime);String(new Date(NaN))!==a&&r(s,o,function(){var e=c(this);return e==e?h(this):a})},{be835518f2abbc78:"2iJ57","7997503c8dda7ce0":"4CPdc"}],l0eoZ:[function(e,t,i){var n=e("ffabd3103ccbbe88"),r=e("3b0c6b91d4084705"),s=e("9544189b2ef4f6a8"),a=r("".charAt),o=r("".charCodeAt),h=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),u=/[\w*+\-./@]/,d=function(e,t){for(var i=c(e,16);i.length1?arguments[1]:void 0);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),s(d,i?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&r(d,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var n=t+" Iterator",r=v(t),s=v(n);l(e,t,function(e,t){m(this,{type:n,target:e,state:r(e),kind:t,last:null})},function(){for(var e=s(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"===t?u(i.key,!1):"values"===t?u(i.value,!1):u([i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),d(t)}}},{"4087699e0041f387":"7isQ3","1731ca06a03e84a3":"3NI4M",c048d7069b65e14b:"43JWW","5aecbe8fa3c5a74e":"f1CxE",d3ad95b3aaf27c8a:"95yA1",cac009f0bbf34bb8:"8AxCV",a9a2814559569c97:"dCEHX",eb2045e367047a1c:"klSVb","14b36f47f4e70181":"dwU83",dfd8ed3bea972a50:"c7jXZ",b83fb10f1c8587e6:"6mXK1","77d5ccb3a2fbc893":"3Q1Z8","79afb9c26314edc8":"ixHS2"}],"1aJqY":[function(e,t,i){var n=e("6567f4dade5d8960"),r=e("f35d7393646ad055"),s=e("c4503f7eb1018306"),a=e("d7c6ba4f404b5360"),o=e("ff883ec9010d6328"),h=e("f9f796f22480c881"),c=e("dc5cfe657d3f962b"),l=e("59f5d275c85c76"),u=h.Map,d=h.has,f=h.get,p=h.set,g=r([].push),m=c||l(function(){return 1!==u.groupBy("ab",function(e){return e}).get("a").length});n({target:"Map",stat:!0,forced:c||m},{groupBy:function(e,t){a(e),s(t);var i=new u,n=0;return o(e,function(e){var r=t(e,n++);d(i,r)?g(f(i,r),e):p(i,r,[e])}),i}})},{"6567f4dade5d8960":"gJg5v",f35d7393646ad055:"2iJ57",c4503f7eb1018306:"alrlv",d7c6ba4f404b5360:"cHxZN",ff883ec9010d6328:"dCEHX",f9f796f22480c881:"fY40v",dc5cfe657d3f962b:"jHRGA","59f5d275c85c76":"cXVrS"}],fY40v:[function(e,t,i){var n=e("89734044d2e98b8d"),r=Map.prototype;t.exports={Map:Map,set:n(r.set),get:n(r.get),has:n(r.has),remove:n(r.delete),proto:r}},{"89734044d2e98b8d":"2iJ57"}],DQpS3:[function(e,t,i){var n=e("902411673b5fb2fc"),r=e("a4cfbc2e86c91e88"),s=Math.acosh,a=Math.log,o=Math.sqrt,h=Math.LN2;n({target:"Math",stat:!0,forced:!s||710!==Math.floor(s(Number.MAX_VALUE))||s(1/0)!==1/0},{acosh:function(e){var t=+e;return t<1?NaN:t>94906265.62425156?a(t)+h:r(t-1+o(t-1)*o(t+1))}})},{"902411673b5fb2fc":"gJg5v",a4cfbc2e86c91e88:"fdW4O"}],fdW4O:[function(e,t,i){var n=Math.log;t.exports=Math.log1p||function(e){var t=+e;return t>-.00000001&&t<1e-8?t-t*t/2:n(1+t)}},{}],"9m0ga":[function(e,t,i){var n=e("7dffb6067574667e"),r=Math.asinh,s=Math.log,a=Math.sqrt;n({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function e(t){var i=+t;return isFinite(i)&&0!==i?i<0?-e(-i):s(i+a(i*i+1)):i}})},{"7dffb6067574667e":"gJg5v"}],"6OW8r":[function(e,t,i){var n=e("852dfc47c3d9c449"),r=Math.atanh,s=Math.log;n({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){var t=+e;return 0===t?t:s((1+t)/(1-t))/2}})},{"852dfc47c3d9c449":"gJg5v"}],"8Ipne":[function(e,t,i){var n=e("387aa8b70c72a94d"),r=e("dac8a302b6d1f627"),s=Math.abs,a=Math.pow;n({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return r(t)*a(s(t),1/3)}})},{"387aa8b70c72a94d":"gJg5v",dac8a302b6d1f627:"9QHoq"}],bbe5P:[function(e,t,i){var n=e("2c4d345d25b6d18c"),r=Math.floor,s=Math.log,a=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-r(s(t+.5)*a):32}})},{"2c4d345d25b6d18c":"gJg5v"}],giuXg:[function(e,t,i){var n=e("f8f6f4e4d2e4cfe0"),r=e("c0bbc641191a15a9"),s=Math.cosh,a=Math.abs,o=Math.E;n({target:"Math",stat:!0,forced:!s||s(710)===1/0},{cosh:function(e){var t=r(a(e)-1)+1;return o/2*(t+1/(t*o*o))}})},{f8f6f4e4d2e4cfe0:"gJg5v",c0bbc641191a15a9:"fQMM6"}],fQMM6:[function(e,t,i){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||22025.465794806718>n(10)||-.00000000000000002!==n(-.00000000000000002)?function(e){var t=+e;return 0===t?t:t>-.000001&&t<1e-6?t+t*t/2:r(t)-1}:n},{}],"4Dfiq":[function(e,t,i){var n=e("54b4d24b57e9de25"),r=e("5648f7662bee3fb6");n({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},{"54b4d24b57e9de25":"gJg5v","5648f7662bee3fb6":"fQMM6"}],cIxH8:[function(e,t,i){e("1c1b96b0ca7c4a89")({target:"Math",stat:!0},{fround:e("47950f9c73209332")})},{"1c1b96b0ca7c4a89":"gJg5v","47950f9c73209332":"lyxmB"}],khz6l:[function(e,t,i){var n=e("bf5ef278fe0c2a2d"),r=Math.hypot,s=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i,n,r=0,o=0,h=arguments.length,c=0;o0?r+=(n=i/c)*n:r+=i;return c===1/0?1/0:c*a(r)}})},{bf5ef278fe0c2a2d:"gJg5v"}],flBRC:[function(e,t,i){var n=e("26821e3060ae31ef"),r=e("4ae16bb469711695"),s=Math.imul;n({target:"Math",stat:!0,forced:r(function(){return -5!==s(4294967295,5)||2!==s.length})},{imul:function(e,t){var i=+e,n=+t,r=65535&i,s=65535&n;return 0|r*s+((65535&i>>>16)*s+r*(65535&n>>>16)<<16>>>0)}})},{"26821e3060ae31ef":"gJg5v","4ae16bb469711695":"cXVrS"}],OdIjN:[function(e,t,i){e("e28aca710c97445a")({target:"Math",stat:!0},{log10:e("e386fc2f96575e54")})},{e28aca710c97445a:"gJg5v",e386fc2f96575e54:"7QVwX"}],"7QVwX":[function(e,t,i){var n=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(e){return n(e)*r}},{}],"5N41O":[function(e,t,i){e("ec799bb6317cd425")({target:"Math",stat:!0},{log1p:e("a686ef564d9d2882")})},{ec799bb6317cd425:"gJg5v",a686ef564d9d2882:"fdW4O"}],gqwBy:[function(e,t,i){var n=e("266355161c4f030d"),r=Math.log,s=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return r(e)/s}})},{"266355161c4f030d":"gJg5v"}],cjDQT:[function(e,t,i){e("69e2ea3a560b4a42")({target:"Math",stat:!0},{sign:e("22dfbc4f803ce611")})},{"69e2ea3a560b4a42":"gJg5v","22dfbc4f803ce611":"9QHoq"}],hjxfV:[function(e,t,i){var n=e("ebfcc20cba7b1e4e"),r=e("e96ed0b70941abe1"),s=e("cfb0aa3c75dc889"),a=Math.abs,o=Math.exp,h=Math.E;n({target:"Math",stat:!0,forced:r(function(){return -.00000000000000002!==Math.sinh(-.00000000000000002)})},{sinh:function(e){var t=+e;return 1>a(t)?(s(t)-s(-t))/2:(o(t-1)-o(-t-1))*(h/2)}})},{ebfcc20cba7b1e4e:"gJg5v",e96ed0b70941abe1:"cXVrS",cfb0aa3c75dc889:"fQMM6"}],lGEJr:[function(e,t,i){var n=e("75ca6aa3ab3c490c"),r=e("fbda4dec68bbb02f"),s=Math.exp;n({target:"Math",stat:!0},{tanh:function(e){var t=+e,i=r(t),n=r(-t);return i===1/0?1:n===1/0?-1:(i-n)/(s(t)+s(-t))}})},{"75ca6aa3ab3c490c":"gJg5v",fbda4dec68bbb02f:"fQMM6"}],"8Egu9":[function(e,t,i){e("8c4fc1e6a65b6d2f")(Math,"Math",!0)},{"8c4fc1e6a65b6d2f":"dkhk9"}],jWST5:[function(e,t,i){e("f97de92e01c210b9")({target:"Math",stat:!0},{trunc:e("15d9fc8fa50b9dc3")})},{f97de92e01c210b9:"gJg5v","15d9fc8fa50b9dc3":"8w9Yn"}],hrnKP:[function(e,t,i){var n=e("6a137a118d1bb06a"),r=e("6befc110db857fa5"),s=e("dac0f49ddd258f02"),a=e("be627f07e88786cb"),o=e("2945e9e965681f9c"),h=e("d6ad03f4a8d178a7"),c=e("b7d12a59a0877cf0"),l=e("a63fe8ba771ddd66"),u=e("1fa70215a385f43f"),d=e("ac9a98828b299940"),f=e("a2f71c36cf1dfa06"),p=e("1398c779e833098a"),g=e("58c10e766b715db4"),m=e("eae30770a8520200").f,v=e("a3f2314ca43c8870").f,y=e("673bf972e777267f").f,b=e("dc2cfe6c86ab9553"),x=e("27f6d5a76060ef23").trim,E="Number",w=a[E],T=o[E],S=w.prototype,A=a.TypeError,C=h("".slice),_=h("".charCodeAt),I=function(e){var t=p(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,i,n,r,s,a,o,h,c=p(e,"number");if(f(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2){if(43===(t=_(c=x(c),0))||45===t){if(88===(i=_(c,2))||120===i)return NaN}else if(48===t){switch(_(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(o=0,a=(s=C(c,2)).length;or)return NaN;return parseInt(s,n)}}return+c},P=c(E,!w(" 0o1")||!w("0b1")||w("+0x1")),M=function(e){var t,i=arguments.length<1?0:w(I(e));return(t=this,d(S,t)&&g(function(){b(t)}))?u(Object(i),this,M):i};M.prototype=S,P&&!r&&(S.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:P},{Number:M});var R=function(e,t){for(var i,n=s?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;n.length>r;r++)l(t,i=n[r])&&!l(e,i)&&y(e,i,v(t,i))};r&&T&&R(o[E],T),(P||r)&&R(o[E],w)},{"6a137a118d1bb06a":"gJg5v","6befc110db857fa5":"jHRGA",dac0f49ddd258f02:"6mXK1",be627f07e88786cb:"7Z171","2945e9e965681f9c":"iwjHr",d6ad03f4a8d178a7:"2iJ57",b7d12a59a0877cf0:"gE5NQ",a63fe8ba771ddd66:"9JWVX","1fa70215a385f43f":"30not",ac9a98828b299940:"d5bNd",a2f71c36cf1dfa06:"2ZU2p","1398c779e833098a":"cCley","58c10e766b715db4":"cXVrS",eae30770a8520200:"dDV3S",a3f2314ca43c8870:"aRu9T","673bf972e777267f":"hvqCQ",dc2cfe6c86ab9553:"gPsjs","27f6d5a76060ef23":"jX5uQ"}],gPsjs:[function(e,t,i){var n=e("4875831adea9aec3");t.exports=n(1..valueOf)},{"4875831adea9aec3":"2iJ57"}],jX5uQ:[function(e,t,i){var n=e("17f5a3ff1a1c6ce6"),r=e("56083d5e0450dab9"),s=e("3c5616504c7d56e9"),a=e("eacd32ca91d3c555"),o=n("".replace),h=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var i=s(r(t));return 1&e&&(i=o(i,h,"")),2&e&&(i=o(i,c,"$1")),i}};t.exports={start:l(1),end:l(2),trim:l(3)}},{"17f5a3ff1a1c6ce6":"2iJ57","56083d5e0450dab9":"cHxZN","3c5616504c7d56e9":"4x6uB",eacd32ca91d3c555:"heeAP"}],heeAP:[function(e,t,i){t.exports=" \n\v\f\r                 \u2028\u2029\uFEFF"},{}],aXsIP:[function(e,t,i){e("6a152397506f58aa")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:2220446049250313e-31})},{"6a152397506f58aa":"gJg5v"}],lsaNY:[function(e,t,i){e("1cd8bc612ab8a9aa")({target:"Number",stat:!0},{isFinite:e("2741aaae50f5c5db")})},{"1cd8bc612ab8a9aa":"gJg5v","2741aaae50f5c5db":"jGkAe"}],jGkAe:[function(e,t,i){var n=e("7a63d25015bc275e").isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},{"7a63d25015bc275e":"7Z171"}],"8eW4I":[function(e,t,i){e("ce2c3fa51ce7a2b6")({target:"Number",stat:!0},{isInteger:e("3e3a085edc93c707")})},{ce2c3fa51ce7a2b6:"gJg5v","3e3a085edc93c707":"3kBvt"}],"3kBvt":[function(e,t,i){var n=e("de18539dea9401a"),r=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},{de18539dea9401a:"8mxCV"}],h5WTU:[function(e,t,i){e("677c53d72f4dc4b5")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"677c53d72f4dc4b5":"gJg5v"}],glrUF:[function(e,t,i){var n=e("dab33bcdb73caa98"),r=e("3e8bd2979ca91bb4"),s=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&9007199254740991>=s(e)}})},{dab33bcdb73caa98:"gJg5v","3e8bd2979ca91bb4":"3kBvt"}],"91CVe":[function(e,t,i){e("f08cf5dcc31074a6")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},{f08cf5dcc31074a6:"gJg5v"}],"5JCvB":[function(e,t,i){e("d7c9fce3c9d3d189")({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},{d7c9fce3c9d3d189:"gJg5v"}],"1UYJO":[function(e,t,i){var n=e("6edfd3b7fb98ea3e"),r=e("bae0a47a096d7522");n({target:"Number",stat:!0,forced:Number.parseFloat!==r},{parseFloat:r})},{"6edfd3b7fb98ea3e":"gJg5v",bae0a47a096d7522:"guYqF"}],guYqF:[function(e,t,i){var n=e("69bd3378e63391c8"),r=e("842d738e09e8ac6b"),s=e("1779e25eab454452"),a=e("a6c37474f58f0739"),o=e("595d7b3426fbca88").trim,h=e("3acff994bd3a41b1"),c=s("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,f=1/l(h+"-0")!=-1/0||d&&!r(function(){l(Object(d))});t.exports=f?function(e){var t=o(a(e)),i=l(t);return 0===i&&"-"===c(t,0)?-0:i}:l},{"69bd3378e63391c8":"7Z171","842d738e09e8ac6b":"cXVrS","1779e25eab454452":"2iJ57",a6c37474f58f0739:"4x6uB","595d7b3426fbca88":"jX5uQ","3acff994bd3a41b1":"heeAP"}],"966g1":[function(e,t,i){var n=e("3882f0ce9a7bc56f"),r=e("f2f29cbfccb05e47");n({target:"Number",stat:!0,forced:Number.parseInt!==r},{parseInt:r})},{"3882f0ce9a7bc56f":"gJg5v",f2f29cbfccb05e47:"9rXua"}],"9rXua":[function(e,t,i){var n=e("272fde501e24d305"),r=e("48c528ae508d02e"),s=e("7e7198f2f1540a47"),a=e("dd517d0a64474028"),o=e("b0ec8b6ceac29d85").trim,h=e("5252068313c033be"),c=n.parseInt,l=n.Symbol,u=l&&l.iterator,d=/^[+-]?0x/i,f=s(d.exec),p=8!==c(h+"08")||22!==c(h+"0x16")||u&&!r(function(){c(Object(u))});t.exports=p?function(e,t){var i=o(a(e));return c(i,t>>>0||(f(d,i)?16:10))}:c},{"272fde501e24d305":"7Z171","48c528ae508d02e":"cXVrS","7e7198f2f1540a47":"2iJ57",dd517d0a64474028:"4x6uB",b0ec8b6ceac29d85:"jX5uQ","5252068313c033be":"heeAP"}],"2u6nF":[function(e,t,i){var n=e("8acff5e43ec1ac00"),r=e("a791fae730bb52f8"),s=e("eaaedcaf85694da0"),a=e("5cfce35661f01b6f"),o=e("6c8e5def45c211a1"),h=e("876da316e0a42221"),c=e("2c3e63cad4b974da"),l=RangeError,u=String,d=isFinite,f=Math.abs,p=Math.floor,g=Math.pow,m=Math.round,v=r(1..toExponential),y=r(o),b=r("".slice),x="-6.9000e-11"===v(-.000000000069,4)&&"1.25e+0"===v(1.255,2)&&"1.235e+4"===v(12345,3)&&"3e+1"===v(25,0);n({target:"Number",proto:!0,forced:!x||!(c(function(){v(1,1/0)})&&c(function(){v(1,-1/0)}))||!!c(function(){v(1/0,1/0),v(NaN,1/0)})},{toExponential:function(e){var t,i,n,r,o=a(this);if(void 0===e)return v(o);var c=s(e);if(!d(o))return String(o);if(c<0||c>20)throw new l("Incorrect fraction digits");if(x)return v(o,c);var E="";if(o<0&&(E="-",o=-o),0===o)i=0,t=y("0",c+1);else{var w=g(10,(i=p(h(o)))-c),T=m(o/w);2*o>=(2*T+1)*w&&(T+=1),T>=g(10,c+1)&&(T/=10,i+=1),t=u(T)}return 0!==c&&(t=b(t,0,1)+"."+b(t,1)),0===i?(n="+",r="0"):(n=i>0?"+":"-",r=u(f(i))),E+(t+="e"+n+r)}})},{"8acff5e43ec1ac00":"gJg5v",a791fae730bb52f8:"2iJ57",eaaedcaf85694da0:"gAgUH","5cfce35661f01b6f":"gPsjs","6c8e5def45c211a1":"dsk9g","876da316e0a42221":"7QVwX","2c3e63cad4b974da":"cXVrS"}],"3Zya8":[function(e,t,i){var n=e("cd4f6c8df33e40b4"),r=e("46d8af161e2dc0d6"),s=e("fb6b6174bcfa90f"),a=e("a88d9905e1f83adc"),o=e("9b93ef6d7f240c15"),h=e("d57e63cfa5cbb68e"),c=RangeError,l=String,u=Math.floor,d=r(o),f=r("".slice),p=r(1..toFixed),g=function(e,t,i){return 0===t?i:t%2==1?g(e,t-1,i*e):g(e*e,t/2,i)},m=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=u(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=u(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=l(e[t]);i=""===i?n:i+d("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:h(function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)})||!h(function(){p({})})},{toFixed:function(e){var t,i,n,r,o=a(this),h=s(e),u=[0,0,0,0,0,0],p="",x="0";if(h<0||h>20)throw new c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return l(o);if(o<0&&(p="-",o=-o),o>1e-21){if(i=((t=m(o*g(2,69,1))-69)<0?o*g(2,-t,1):o/g(2,t,1))*4503599627370496,(t=52-t)>0){for(v(u,0,i),n=h;n>=7;)v(u,1e7,0),n-=7;for(v(u,g(10,n,1),0),n=t-1;n>=23;)y(u,8388608),n-=23;y(u,1<0?p+((r=x.length)<=h?"0."+d("0",h-r)+x:f(x,0,r-h)+"."+f(x,r-h)):p+x}})},{cd4f6c8df33e40b4:"gJg5v","46d8af161e2dc0d6":"2iJ57",fb6b6174bcfa90f:"gAgUH",a88d9905e1f83adc:"gPsjs","9b93ef6d7f240c15":"dsk9g",d57e63cfa5cbb68e:"cXVrS"}],kEs9R:[function(e,t,i){var n=e("a8898a73ab91d290"),r=e("ce4a637ab8de47ca"),s=e("4308932cb74d1989"),a=e("b09e8a0929dbee09"),o=r(1..toPrecision);n({target:"Number",proto:!0,forced:s(function(){return"1"!==o(1,void 0)})||!s(function(){o({})})},{toPrecision:function(e){return void 0===e?o(a(this)):o(a(this),e)}})},{a8898a73ab91d290:"gJg5v",ce4a637ab8de47ca:"2iJ57","4308932cb74d1989":"cXVrS",b09e8a0929dbee09:"gPsjs"}],czjHQ:[function(e,t,i){var n=e("9e39c36176ea9027"),r=e("eca15ea3e03a62cf");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},{"9e39c36176ea9027":"gJg5v",eca15ea3e03a62cf:"cKgWo"}],cKgWo:[function(e,t,i){var n=e("6bef1f1b71c0d15f"),r=e("d01fdbe6acf1dc69"),s=e("152344c6f1cc0727"),a=e("e500b6660dae4ed2"),o=e("a51f09aa538cbbc9"),h=e("1e00e3b82b1b3cb6"),c=e("df8aa13044dccc97"),l=e("fb90ba2f91e5c029"),u=e("33842bab271c4900"),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||a(function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach(function(e){t[e]=e}),7!==d({},e)[i]||o(d({},t)).join("")!==r})?function(e,t){for(var i=l(e),r=arguments.length,a=1,d=h.f,f=c.f;r>a;)for(var g,m=u(arguments[a++]),v=d?p(o(m),d(m)):o(m),y=v.length,b=0;y>b;)g=v[b++],(!n||s(f,m,g))&&(i[g]=m[g]);return i}:d},{"6bef1f1b71c0d15f":"6mXK1",d01fdbe6acf1dc69:"2iJ57","152344c6f1cc0727":"bOssl",e500b6660dae4ed2:"cXVrS",a51f09aa538cbbc9:"kQgZQ","1e00e3b82b1b3cb6":"f3eHQ",df8aa13044dccc97:"7Av2Z",fb90ba2f91e5c029:"6oQEu","33842bab271c4900":"kuAas"}],"9DWg9":[function(e,t,i){e("17cb8072b960d33f")({target:"Object",stat:!0,sham:!e("b7e43977f87f28a2")},{create:e("af73c0503e5e2dd8")})},{"17cb8072b960d33f":"gJg5v",b7e43977f87f28a2:"6mXK1",af73c0503e5e2dd8:"7isQ3"}],"8uazT":[function(e,t,i){var n=e("8f6b558a4e940099"),r=e("96523e310a3fe908"),s=e("67741c7cd2815bff"),a=e("60e72fdc0dc9cee8"),o=e("81722f8311309945"),h=e("e74b2be534174483");r&&n({target:"Object",proto:!0,forced:s},{__defineGetter__:function(e,t){h.f(o(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},{"8f6b558a4e940099":"gJg5v","96523e310a3fe908":"6mXK1","67741c7cd2815bff":"hh3RM","60e72fdc0dc9cee8":"alrlv","81722f8311309945":"6oQEu",e74b2be534174483:"hvqCQ"}],hh3RM:[function(e,t,i){var n=e("8edc7d10fd60cc1f"),r=e("199488e7120262f2"),s=e("67c1b3060370d6f1"),a=e("a7f7bf4b6fabffe9");t.exports=n||!s(function(){if(!a||!(a<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r[e]}})},{"8edc7d10fd60cc1f":"jHRGA","199488e7120262f2":"7Z171","67c1b3060370d6f1":"cXVrS",a7f7bf4b6fabffe9:"1CWLZ"}],dLOib:[function(e,t,i){var n=e("79249a239f48e2d4"),r=e("b64da2842e228b05"),s=e("45e48b7437d67551").f;n({target:"Object",stat:!0,forced:Object.defineProperties!==s,sham:!r},{defineProperties:s})},{"79249a239f48e2d4":"gJg5v",b64da2842e228b05:"6mXK1","45e48b7437d67551":"ePigI"}],bVBB2:[function(e,t,i){var n=e("b118adf01477032"),r=e("a3127abbf747d8e2"),s=e("dec8f826adb685fc").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!r},{defineProperty:s})},{b118adf01477032:"gJg5v",a3127abbf747d8e2:"6mXK1",dec8f826adb685fc:"hvqCQ"}],"9laFo":[function(e,t,i){var n=e("9bd3ca02d43a34c6"),r=e("14adf2205f0de0f1"),s=e("25f3087f814cb2fd"),a=e("8f5516e8b83f7c81"),o=e("1864c5e0fe7b94e4"),h=e("fbfc447cbc7c8274");r&&n({target:"Object",proto:!0,forced:s},{__defineSetter__:function(e,t){h.f(o(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},{"9bd3ca02d43a34c6":"gJg5v","14adf2205f0de0f1":"6mXK1","25f3087f814cb2fd":"hh3RM","8f5516e8b83f7c81":"alrlv","1864c5e0fe7b94e4":"6oQEu",fbfc447cbc7c8274:"hvqCQ"}],"1E3wB":[function(e,t,i){var n=e("f61a79561ef771d5"),r=e("f45db476330e9273").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},{f61a79561ef771d5:"gJg5v",f45db476330e9273:"iwcqE"}],iwcqE:[function(e,t,i){var n=e("d3708b44f56d5dbe"),r=e("41285041ee215b4b"),s=e("fae894139558d631"),a=e("d1ebe3ffdc898f92"),o=e("8ca7d570e80b9ce7"),h=e("cd0bc0f155d9ce86"),c=s(e("8a6b90d3c1a4843d").f),l=s([].push),u=n&&r(function(){var e=Object.create(null);return e[2]=2,!c(e,2)}),d=function(e){return function(t){for(var i,r=h(t),s=o(r),d=u&&null===a(r),f=s.length,p=0,g=[];f>p;)i=s[p++],(!n||(d?i in r:c(r,i)))&&l(g,e?[i,r[i]]:r[i]);return g}};t.exports={entries:d(!0),values:d(!1)}},{d3708b44f56d5dbe:"6mXK1","41285041ee215b4b":"cXVrS",fae894139558d631:"2iJ57",d1ebe3ffdc898f92:"e8mfS","8ca7d570e80b9ce7":"kQgZQ",cd0bc0f155d9ce86:"h9ut0","8a6b90d3c1a4843d":"7Av2Z"}],cCotT:[function(e,t,i){var n=e("41df7dcb1db288e9"),r=e("fff8fcdf7f021ed"),s=e("349eb9a58219946d"),a=e("aba4dbd0c2e0df38"),o=e("83d388d2147293dd").onFreeze,h=Object.freeze;n({target:"Object",stat:!0,forced:s(function(){h(1)}),sham:!r},{freeze:function(e){return h&&a(e)?h(o(e)):e}})},{"41df7dcb1db288e9":"gJg5v",fff8fcdf7f021ed:"cPqlV","349eb9a58219946d":"cXVrS",aba4dbd0c2e0df38:"8mxCV","83d388d2147293dd":"3Q1Z8"}],htZZS:[function(e,t,i){var n=e("48c4d449b4b6a74e"),r=e("ee4e4a7ea4b35347"),s=e("34466cd01816d06a");n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,function(e,i){s(t,e,i)},{AS_ENTRIES:!0}),t}})},{"48c4d449b4b6a74e":"gJg5v",ee4e4a7ea4b35347:"dCEHX","34466cd01816d06a":"SVTZV"}],b3JIq:[function(e,t,i){var n=e("5e9e720f67356476"),r=e("c8df38aee3cb5769"),s=e("10375c86bad61030"),a=e("3b00a68c12a1896c").f,o=e("76539d9475dc0bf0");n({target:"Object",stat:!0,forced:!o||r(function(){a(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return a(s(e),t)}})},{"5e9e720f67356476":"gJg5v",c8df38aee3cb5769:"cXVrS","10375c86bad61030":"h9ut0","3b00a68c12a1896c":"aRu9T","76539d9475dc0bf0":"6mXK1"}],kPfIJ:[function(e,t,i){var n=e("40e7403e4fec8fc5"),r=e("4e8e0ded689e341a"),s=e("ca8e12f795281afd"),a=e("2a0629723aea50a6"),o=e("d8f1f7a76c234914"),h=e("d34666d556a98edd");n({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,i,n=a(e),r=o.f,c=s(n),l={},u=0;c.length>u;)void 0!==(i=r(n,t=c[u++]))&&h(l,t,i);return l}})},{"40e7403e4fec8fc5":"gJg5v","4e8e0ded689e341a":"6mXK1",ca8e12f795281afd:"k5rhT","2a0629723aea50a6":"h9ut0",d8f1f7a76c234914:"aRu9T",d34666d556a98edd:"SVTZV"}],"9ERxS":[function(e,t,i){var n=e("effeafa72fa4fcc2"),r=e("9f4f815a609d62de"),s=e("4a158a7faad2d27f").f;n({target:"Object",stat:!0,forced:r(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:s})},{effeafa72fa4fcc2:"gJg5v","9f4f815a609d62de":"cXVrS","4a158a7faad2d27f":"bBGHM"}],"6T09z":[function(e,t,i){var n=e("9b00c005c1d693fb"),r=e("ffe585e19c7a1096"),s=e("a7cc68351642ae12"),a=e("46d7a597f20859a8"),o=e("765be3ffdd1dfa5d");n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!o},{getPrototypeOf:function(e){return a(s(e))}})},{"9b00c005c1d693fb":"gJg5v",ffe585e19c7a1096:"cXVrS",a7cc68351642ae12:"6oQEu","46d7a597f20859a8":"e8mfS","765be3ffdd1dfa5d":"2SHZm"}],nZQfS:[function(e,t,i){var n=e("b06b32f47a30ec7f"),r=e("6a46da92f3f73121"),s=e("af1ec4f8b421ab5c"),a=e("2ef79b8f3bb016c7"),o=e("a668398ad3de0d7d"),h=e("70005dfdb718ef94"),c=e("972dd804937bc18f"),l=e("281c63cf55e8b57b"),u=Object.groupBy,d=r("Object","create"),f=s([].push);n({target:"Object",stat:!0,forced:!u||l(function(){return 1!==u("ab",function(e){return e}).a.length})},{groupBy:function(e,t){o(e),a(t);var i=d(null),n=0;return c(e,function(e){var r=h(t(e,n++));r in i?f(i[r],e):i[r]=[e]}),i}})},{b06b32f47a30ec7f:"gJg5v","6a46da92f3f73121":"e5ie6",af1ec4f8b421ab5c:"2iJ57","2ef79b8f3bb016c7":"alrlv",a668398ad3de0d7d:"cHxZN","70005dfdb718ef94":"gvuJs","972dd804937bc18f":"dCEHX","281c63cf55e8b57b":"cXVrS"}],"6GBQI":[function(e,t,i){e("98e893e3166a4362")({target:"Object",stat:!0},{hasOwn:e("12a9e94ed897fcaf")})},{"98e893e3166a4362":"gJg5v","12a9e94ed897fcaf":"9JWVX"}],g4f9X:[function(e,t,i){e("451600d6bdd8e576")({target:"Object",stat:!0},{is:e("56b2e52d42ffd002")})},{"451600d6bdd8e576":"gJg5v","56b2e52d42ffd002":"3Lhyq"}],"3Lhyq":[function(e,t,i){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],eNC2R:[function(e,t,i){var n=e("435e06d616210775"),r=e("cdaf74e91df56e60");n({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},{"435e06d616210775":"gJg5v",cdaf74e91df56e60:"kKQ3P"}],czmee:[function(e,t,i){var n=e("d0fbaa7eb6b5ad4d"),r=e("421049f6c11462a7"),s=e("9ed59196a9b50c30"),a=e("590e67d09aaa38f"),o=e("c1ee6c6b89bec975"),h=Object.isFrozen;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isFrozen:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{d0fbaa7eb6b5ad4d:"gJg5v","421049f6c11462a7":"cXVrS","9ed59196a9b50c30":"8mxCV","590e67d09aaa38f":"161sQ",c1ee6c6b89bec975:"fKJ3g"}],"96RAZ":[function(e,t,i){var n=e("e0d9427683afd111"),r=e("8b49b6806ae62eca"),s=e("97ad0f68c00a1ff0"),a=e("7f6c54dd5bc88c64"),o=e("c8a04ae167e7ad37"),h=Object.isSealed;n({target:"Object",stat:!0,forced:o||r(function(){h(1)})},{isSealed:function(e){return!s(e)||!!o&&"ArrayBuffer"===a(e)||!!h&&h(e)}})},{e0d9427683afd111:"gJg5v","8b49b6806ae62eca":"cXVrS","97ad0f68c00a1ff0":"8mxCV","7f6c54dd5bc88c64":"161sQ",c8a04ae167e7ad37:"fKJ3g"}],"3SReg":[function(e,t,i){var n=e("928eae3c9269318e"),r=e("bffeb5a63b3d1ddc"),s=e("4e7619f3294f09c8");n({target:"Object",stat:!0,forced:e("16ceb2cf691ec6a8")(function(){s(1)})},{keys:function(e){return s(r(e))}})},{"928eae3c9269318e":"gJg5v",bffeb5a63b3d1ddc:"6oQEu","4e7619f3294f09c8":"kQgZQ","16ceb2cf691ec6a8":"cXVrS"}],dOXap:[function(e,t,i){var n=e("3213681dc3c35763"),r=e("4aa54b730f2d3e5b"),s=e("f722ba9b4a4e493a"),a=e("d9187b4f4abc84a2"),o=e("a283188d11fd1310"),h=e("81f1f2335bc409e6"),c=e("73cff62f53644df3").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupGetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.get;while(i=h(i))}})},{"3213681dc3c35763":"gJg5v","4aa54b730f2d3e5b":"6mXK1",f722ba9b4a4e493a:"hh3RM",d9187b4f4abc84a2:"6oQEu",a283188d11fd1310:"gvuJs","81f1f2335bc409e6":"e8mfS","73cff62f53644df3":"aRu9T"}],evHBo:[function(e,t,i){var n=e("cfcc7acaa30d169a"),r=e("95cf98e445e49077"),s=e("32af9c4b10e71d8a"),a=e("a3a2f8d0bb0d269a"),o=e("fc6f1b0f9f6a3207"),h=e("4f72764854999276"),c=e("940efcd169764424").f;r&&n({target:"Object",proto:!0,forced:s},{__lookupSetter__:function(e){var t,i=a(this),n=o(e);do if(t=c(i,n))return t.set;while(i=h(i))}})},{cfcc7acaa30d169a:"gJg5v","95cf98e445e49077":"6mXK1","32af9c4b10e71d8a":"hh3RM",a3a2f8d0bb0d269a:"6oQEu",fc6f1b0f9f6a3207:"gvuJs","4f72764854999276":"e8mfS","940efcd169764424":"aRu9T"}],liWu9:[function(e,t,i){var n=e("dd30e23e7eea933c"),r=e("16f89a44f17d8f35"),s=e("4ddba3dd9dcca781").onFreeze,a=e("fa786d6ffa5b300e"),o=e("3a7088156a6b24b9"),h=Object.preventExtensions;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{preventExtensions:function(e){return h&&r(e)?h(s(e)):e}})},{dd30e23e7eea933c:"gJg5v","16f89a44f17d8f35":"8mxCV","4ddba3dd9dcca781":"3Q1Z8",fa786d6ffa5b300e:"cPqlV","3a7088156a6b24b9":"cXVrS"}],a2AOJ:[function(e,t,i){var n=e("12120dafa98cd91b"),r=e("8a5ee5120083625d"),s=e("dacee5d02a7d8660"),a=e("9f80f8e0960690f0"),o=e("f3ab8c15cd26e8b0"),h=e("cf1c31853a2dbd73"),c=Object.getPrototypeOf,l=Object.setPrototypeOf,u=Object.prototype,d="__proto__";if(n&&c&&l&&!(d in u))try{r(u,d,{configurable:!0,get:function(){return c(o(this))},set:function(e){var t=h(this);a(e)&&s(t)&&l(t,e)}})}catch(e){}},{"12120dafa98cd91b":"6mXK1","8a5ee5120083625d":"3NI4M",dacee5d02a7d8660:"8mxCV","9f80f8e0960690f0":"6XW5L",f3ab8c15cd26e8b0:"6oQEu",cf1c31853a2dbd73:"cHxZN"}],yqtQx:[function(e,t,i){var n=e("7431c9c36c061192"),r=e("254eb19750975bda"),s=e("2f01f54810b729a0").onFreeze,a=e("f352701af16ccb01"),o=e("c5798f0bf47c2f71"),h=Object.seal;n({target:"Object",stat:!0,forced:o(function(){h(1)}),sham:!a},{seal:function(e){return h&&r(e)?h(s(e)):e}})},{"7431c9c36c061192":"gJg5v","254eb19750975bda":"8mxCV","2f01f54810b729a0":"3Q1Z8",f352701af16ccb01:"cPqlV",c5798f0bf47c2f71:"cXVrS"}],"4M7RG":[function(e,t,i){e("9b49024ba2cb31fd")({target:"Object",stat:!0},{setPrototypeOf:e("3492d4712278eb46")})},{"9b49024ba2cb31fd":"gJg5v","3492d4712278eb46":"arrdQ"}],"7ybM1":[function(e,t,i){var n=e("2f5378debd330ed5"),r=e("5e0718aecf12f1e8"),s=e("6b32f4accffdcba8");n||r(Object.prototype,"toString",s,{unsafe:!0})},{"2f5378debd330ed5":"9axlf","5e0718aecf12f1e8":"4CPdc","6b32f4accffdcba8":"a9Vf3"}],a9Vf3:[function(e,t,i){var n=e("312e54676af41375"),r=e("2dbce13c946fe9d0");t.exports=n?({}).toString:function(){return"[object "+r(this)+"]"}},{"312e54676af41375":"9axlf","2dbce13c946fe9d0":"cRCRk"}],csFkS:[function(e,t,i){var n=e("eb35dc894cb42ba5"),r=e("f1b9830bcb61759d").values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},{eb35dc894cb42ba5:"gJg5v",f1b9830bcb61759d:"iwcqE"}],"6V0HA":[function(e,t,i){var n=e("c1505c05c57d39cb"),r=e("fd7eb946ed597b55");n({global:!0,forced:parseFloat!==r},{parseFloat:r})},{c1505c05c57d39cb:"gJg5v",fd7eb946ed597b55:"guYqF"}],"26fdt":[function(e,t,i){var n=e("3ca2a8550b205bbe"),r=e("f57aad6998179c26");n({global:!0,forced:parseInt!==r},{parseInt:r})},{"3ca2a8550b205bbe":"gJg5v",f57aad6998179c26:"9rXua"}],"8nI8r":[function(e,t,i){e("71201fb984fca5e2"),e("944d2d67bf4aa279"),e("259dee16b78a9293"),e("bac68e84460cf44d"),e("35807fabff0322bf"),e("8713c69981abff7e")},{"71201fb984fca5e2":"dkJyI","944d2d67bf4aa279":"2zMO8","259dee16b78a9293":"bizKp",bac68e84460cf44d:"fDY5E","35807fabff0322bf":"2dUxj","8713c69981abff7e":"6tXif"}],dkJyI:[function(e,t,i){var n,r,s,a,o=e("cdd137752c5b4a8e"),h=e("27c8c7e1f0444fd2"),c=e("e9cf171cc5f9ff78"),l=e("d198a89966b49f7a"),u=e("643c25bd5b0dfc21"),d=e("76c41f8cfb7124b7"),f=e("6f7c1c1190868f98"),p=e("8b9ff6cd5f4bf470"),g=e("e2d999cd3139e29e"),m=e("37ba5f9496a9ce6f"),v=e("c754acf38f3fbf83"),y=e("f9d3438feb00503"),b=e("eea1cec1753c28d3"),x=e("2b3f8c9a01947fd4"),E=e("d7da4b96347ff949").set,w=e("5967e7e0ab765b55"),T=e("45c77ce65cdfa56e"),S=e("ed2bd3e4981b5b7f"),A=e("67a62e6e19993e50"),C=e("d047e80fbdc4abaf"),_=e("cb21f79465bb7a4f"),I=e("d92ec88829ba956d"),O=e("f518fe10c60b8bee"),P="Promise",M=I.CONSTRUCTOR,R=I.REJECTION_EVENT,L=I.SUBCLASSING,D=C.getterFor(P),k=C.set,N=_&&_.prototype,F=_,B=N,U=l.TypeError,V=l.document,G=l.process,j=O.f,W=j,Y=!!(V&&V.createEvent&&l.dispatchEvent),H="unhandledrejection",z=function(e){var t;return!!(y(e)&&v(t=e.then))&&t},X=function(e,t){var i,n,r,s=t.value,a=1===t.state,o=a?e.ok:e.fail,h=e.resolve,c=e.reject,l=e.domain;try{o?(a||(2===t.rejection&&Q(t),t.rejection=1),!0===o?i=s:(l&&l.enter(),i=o(s),l&&(l.exit(),r=!0)),i===e.promise?c(new U("Promise-chain cycle")):(n=z(i))?u(n,i,h,c):h(i)):c(s)}catch(e){l&&!r&&l.exit(),c(e)}},K=function(e,t){e.notified||(e.notified=!0,w(function(){for(var i,n=e.reactions;i=n.get();)X(i,e);e.notified=!1,t&&!e.rejection&&J(e)}))},q=function(e,t,i){var n,r;Y?((n=V.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:i},!R&&(r=l["on"+e])?r(n):e===H&&T("Unhandled promise rejection",i)},J=function(e){u(E,l,function(){var t,i=e.facade,n=e.value;if($(e)&&(t=S(function(){c?G.emit("unhandledRejection",n,i):q(H,i,n)}),e.rejection=c||$(e)?2:1,t.error))throw t.value})},$=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){u(E,l,function(){var t=e.facade;c?G.emit("rejectionHandled",t):q("rejectionhandled",t,e.value)})},Z=function(e,t,i){return function(n){e(t,n,i)}},ee=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,K(e,!0))},et=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new U("Promise can't be resolved itself");var n=z(t);n?w(function(){var i={done:!1};try{u(n,t,Z(et,i,e),Z(ee,i,e))}catch(t){ee(i,t,e)}}):(e.value=t,e.state=1,K(e,!1))}catch(t){ee({done:!1},t,e)}}};if(M&&(B=(F=function(e){b(this,B),m(e),u(n,this);var t=D(this);try{e(Z(et,t),Z(ee,t))}catch(e){ee(t,e)}}).prototype,(n=function(e){k(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:null})}).prototype=d(B,"then",function(e,t){var i=D(this),n=j(x(this,F));return i.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=c?G.domain:void 0,0===i.state?i.reactions.add(n):w(function(){X(n,i)}),n.promise}),r=function(){var e=new n,t=D(e);this.promise=e,this.resolve=Z(et,t),this.reject=Z(ee,t)},O.f=j=function(e){return e===F||e===s?new r(e):W(e)},!h&&v(_)&&N!==Object.prototype)){a=N.then,L||d(N,"then",function(e,t){var i=this;return new F(function(e,t){u(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}f&&f(N,B)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:F}),p(F,P,!1,!0),g(P)},{cdd137752c5b4a8e:"gJg5v","27c8c7e1f0444fd2":"jHRGA",e9cf171cc5f9ff78:"hdoIk",d198a89966b49f7a:"7Z171","643c25bd5b0dfc21":"bOssl","76c41f8cfb7124b7":"4CPdc","6f7c1c1190868f98":"arrdQ","8b9ff6cd5f4bf470":"dkhk9",e2d999cd3139e29e:"c7jXZ","37ba5f9496a9ce6f":"alrlv",c754acf38f3fbf83:"h1Wnr",f9d3438feb00503:"8mxCV",eea1cec1753c28d3:"95yA1","2b3f8c9a01947fd4":"CaSkn",d7da4b96347ff949:"iEUCI","5967e7e0ab765b55":"fhIs0","45c77ce65cdfa56e":"8UxN2",ed2bd3e4981b5b7f:"7qEEW","67a62e6e19993e50":"74jUI",d047e80fbdc4abaf:"ixHS2",cb21f79465bb7a4f:"BGWp5",d92ec88829ba956d:"cAqqZ",f518fe10c60b8bee:"iq5DC"}],CaSkn:[function(e,t,i){var n=e("1dd3546388607f52"),r=e("1407b26f20411731"),s=e("e59a7a10597b8e96"),a=e("16c256a8cc3c03fd")("species");t.exports=function(e,t){var i,o=n(e).constructor;return void 0===o||s(i=n(o)[a])?t:r(i)}},{"1dd3546388607f52":"dPzbI","1407b26f20411731":"euAEP",e59a7a10597b8e96:"8AxCV","16c256a8cc3c03fd":"5CuF7"}],euAEP:[function(e,t,i){var n=e("f0753b26326019c1"),r=e("8e6a26f37529644e"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a constructor")}},{f0753b26326019c1:"eytEI","8e6a26f37529644e":"3zerS"}],iEUCI:[function(e,t,i){var n,r,s,a,o=e("629a4d99f4fe5b2e"),h=e("e574be68c288c7c8"),c=e("df212787338802d3"),l=e("afdf018c2d01bbc6"),u=e("35a3e849940fd612"),d=e("b8bf5434d2248ca7"),f=e("731f9370cc21fc3b"),p=e("ec358060964e4bde"),g=e("907adb6d219da7a3"),m=e("f398561ebd49a798"),v=e("8a8e342aaad83bb"),y=e("6eef8b4e43dd6731"),b=o.setImmediate,x=o.clearImmediate,E=o.process,w=o.Dispatch,T=o.Function,S=o.MessageChannel,A=o.String,C=0,_={},I="onreadystatechange";d(function(){n=o.location});var O=function(e){if(u(_,e)){var t=_[e];delete _[e],t()}},P=function(e){return function(){O(e)}},M=function(e){O(e.data)},R=function(e){o.postMessage(A(e),n.protocol+"//"+n.host)};b&&x||(b=function(e){m(arguments.length,1);var t=l(e)?e:T(e),i=p(arguments,1);return _[++C]=function(){h(t,void 0,i)},r(C),C},x=function(e){delete _[e]},y?r=function(e){E.nextTick(P(e))}:w&&w.now?r=function(e){w.now(P(e))}:S&&!v?(a=(s=new S).port2,s.port1.onmessage=M,r=c(a.postMessage,a)):o.addEventListener&&l(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(r=R,o.addEventListener("message",M,!1)):r=I in g("script")?function(e){f.appendChild(g("script"))[I]=function(){f.removeChild(this),O(e)}}:function(e){setTimeout(P(e),0)}),t.exports={set:b,clear:x}},{"629a4d99f4fe5b2e":"7Z171",e574be68c288c7c8:"2fjXG",df212787338802d3:"f1CxE",afdf018c2d01bbc6:"h1Wnr","35a3e849940fd612":"9JWVX",b8bf5434d2248ca7:"cXVrS","731f9370cc21fc3b":"23b1K",ec358060964e4bde:"eO8Ta","907adb6d219da7a3":"SppDD",f398561ebd49a798:"h3DcZ","8a8e342aaad83bb":"bUue9","6eef8b4e43dd6731":"hdoIk"}],h3DcZ:[function(e,t,i){var n=TypeError;t.exports=function(e,t){if(e1?a(arguments,1):[],i=o.f(this),n=c(function(){return s(h(e),void 0,t)});return(n.error?i.reject:i.resolve)(n.value),i.promise}})},{e891936b921586ce:"gJg5v",be55d0d9787f386c:"7Z171","53a5a11417313428":"2fjXG",b6f9059ddb81e98b:"eO8Ta","4e74861c17e890c3":"iq5DC","7900efa3cdb7a624":"alrlv","1fb2dc6087d1e9d5":"7qEEW"}],fDjj9:[function(e,t,i){var n=e("c539d5627c4a86aa"),r=e("f3ae7f423c78fd60");n({target:"Promise",stat:!0},{withResolvers:function(){var e=r.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},{c539d5627c4a86aa:"gJg5v",f3ae7f423c78fd60:"iq5DC"}],dejPc:[function(e,t,i){var n=e("1c621266486af366"),r=e("8dc2c7c905c7079"),s=e("65b541dabe35d529"),a=e("536113b176a05b60");n({target:"Reflect",stat:!0,forced:!e("e032bfdb61e2620b")(function(){Reflect.apply(function(){})})},{apply:function(e,t,i){return r(s(e),t,a(i))}})},{"1c621266486af366":"gJg5v","8dc2c7c905c7079":"2fjXG","65b541dabe35d529":"alrlv","536113b176a05b60":"dPzbI",e032bfdb61e2620b:"cXVrS"}],kL7gw:[function(e,t,i){var n=e("df593a7c66399ae2"),r=e("aa786cd255199284"),s=e("c585a7fc86970645"),a=e("d05ce57b271ff568"),o=e("488fff441ba5bfef"),h=e("688b651555d83b8f"),c=e("c7a921b7c24a97c"),l=e("2ff4acc7df7eb046"),u=e("2ad48193afce6a95"),d=r("Reflect","construct"),f=Object.prototype,p=[].push,g=u(function(){function e(){}return!(d(function(){},[],e) instanceof e)}),m=!u(function(){d(function(){})}),v=g||m;n({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){o(e),h(t);var i=arguments.length<3?e:o(arguments[2]);if(m&&!g)return d(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return s(p,n,t),new(s(a,e,n))}var r=i.prototype,u=l(c(r)?r:f),v=s(e,u,t);return c(v)?v:u}})},{df593a7c66399ae2:"gJg5v",aa786cd255199284:"e5ie6",c585a7fc86970645:"2fjXG",d05ce57b271ff568:"7PoYT","488fff441ba5bfef":"euAEP","688b651555d83b8f":"dPzbI",c7a921b7c24a97c:"8mxCV","2ff4acc7df7eb046":"7isQ3","2ad48193afce6a95":"cXVrS"}],lQsQz:[function(e,t,i){var n=e("dc2eaf4c122f82d4"),r=e("55416992b3cdb7ec"),s=e("c2c755875e2adbfa"),a=e("578d27629d28889e"),o=e("426724837dbcc1e9");n({target:"Reflect",stat:!0,forced:e("71d0ba7a21c21fc7")(function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})}),sham:!r},{defineProperty:function(e,t,i){s(e);var n=a(t);s(i);try{return o.f(e,n,i),!0}catch(e){return!1}}})},{dc2eaf4c122f82d4:"gJg5v","55416992b3cdb7ec":"6mXK1",c2c755875e2adbfa:"dPzbI","578d27629d28889e":"gvuJs","426724837dbcc1e9":"hvqCQ","71d0ba7a21c21fc7":"cXVrS"}],jy0xe:[function(e,t,i){var n=e("6dcb929d30bdbfde"),r=e("3dedf4d14121a863"),s=e("fbd53ec455a05b95").f;n({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var i=s(r(e),t);return(!i||!!i.configurable)&&delete e[t]}})},{"6dcb929d30bdbfde":"gJg5v","3dedf4d14121a863":"dPzbI",fbd53ec455a05b95:"aRu9T"}],N0A9g:[function(e,t,i){var n=e("36af64a139a04a9f"),r=e("2b0e8e0105e0ccfb"),s=e("c12275a56fb80891"),a=e("8afae34daed2ddfd"),o=e("a0fe3971b7cb6675"),h=e("64fb71955ccea62a"),c=e("42f515e0257c869d");n({target:"Reflect",stat:!0},{get:function e(t,i){var n,l,u=arguments.length<3?t:arguments[2];return a(t)===u?t[i]:(n=h.f(t,i))?o(n)?n.value:void 0===n.get?void 0:r(n.get,u):s(l=c(t))?e(l,i,u):void 0}})},{"36af64a139a04a9f":"gJg5v","2b0e8e0105e0ccfb":"bOssl",c12275a56fb80891:"8mxCV","8afae34daed2ddfd":"dPzbI",a0fe3971b7cb6675:"gi9DO","64fb71955ccea62a":"aRu9T","42f515e0257c869d":"e8mfS"}],gi9DO:[function(e,t,i){var n=e("50fb4bd8f6d0c370");t.exports=function(e){return void 0!==e&&(n(e,"value")||n(e,"writable"))}},{"50fb4bd8f6d0c370":"9JWVX"}],bnSd3:[function(e,t,i){var n=e("d7bd54e98aaffcc7"),r=e("7232f0c071c940d0"),s=e("10cdead7a28df296"),a=e("de341026ceb57ac3");n({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(s(e),t)}})},{d7bd54e98aaffcc7:"gJg5v","7232f0c071c940d0":"6mXK1","10cdead7a28df296":"dPzbI",de341026ceb57ac3:"aRu9T"}],hCLFJ:[function(e,t,i){var n=e("e0d7bd3b2cd5e427"),r=e("28c21999f76acbe2"),s=e("5d4e809754fe7c85");n({target:"Reflect",stat:!0,sham:!e("b7b6a27574b33ffc")},{getPrototypeOf:function(e){return s(r(e))}})},{e0d7bd3b2cd5e427:"gJg5v","28c21999f76acbe2":"dPzbI","5d4e809754fe7c85":"e8mfS",b7b6a27574b33ffc:"2SHZm"}],jFiZs:[function(e,t,i){e("f5a4987d6328de60")({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},{f5a4987d6328de60:"gJg5v"}],"1BYUa":[function(e,t,i){var n=e("f1cf95331dac0a5c"),r=e("6ffd352ee2b78315"),s=e("ec1223a1980707d0");n({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),s(e)}})},{f1cf95331dac0a5c:"gJg5v","6ffd352ee2b78315":"dPzbI",ec1223a1980707d0:"kKQ3P"}],"3gYE0":[function(e,t,i){e("e6256b53ff8e7ff7")({target:"Reflect",stat:!0},{ownKeys:e("62694a198a2d39f1")})},{e6256b53ff8e7ff7:"gJg5v","62694a198a2d39f1":"k5rhT"}],"8Ariw":[function(e,t,i){var n=e("21a794712b7c3b28"),r=e("b2540e28cfeb7421"),s=e("5c89b74916f5e3f1");n({target:"Reflect",stat:!0,sham:!e("368dee480fe6c03a")},{preventExtensions:function(e){s(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(e){return!1}}})},{"21a794712b7c3b28":"gJg5v",b2540e28cfeb7421:"e5ie6","5c89b74916f5e3f1":"dPzbI","368dee480fe6c03a":"cPqlV"}],fpMBl:[function(e,t,i){var n=e("ecfb0dd8a941692d"),r=e("ff301a827b8a1848"),s=e("2c02940a559ef1bc"),a=e("7a2e80973762c50c"),o=e("21efaf46e8fea96f"),h=e("8f78be83a230ea4a"),c=e("acf3c26369354b83"),l=e("4893e43c9a11fc63"),u=e("48482fa6862b803a"),d=e("de1987fde7f85915");n({target:"Reflect",stat:!0,forced:h(function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)})},{set:function e(t,i,n){var h,f,p,g=arguments.length<4?t:arguments[3],m=l.f(s(t),i);if(!m){if(a(f=u(t)))return e(f,i,n,g);m=d(0)}if(o(m)){if(!1===m.writable||!a(g))return!1;if(h=l.f(g,i)){if(h.get||h.set||!1===h.writable)return!1;h.value=n,c.f(g,i,h)}else c.f(g,i,d(0,n))}else{if(void 0===(p=m.set))return!1;r(p,g,n)}return!0}})},{ecfb0dd8a941692d:"gJg5v",ff301a827b8a1848:"bOssl","2c02940a559ef1bc":"dPzbI","7a2e80973762c50c":"8mxCV","21efaf46e8fea96f":"gi9DO","8f78be83a230ea4a":"cXVrS",acf3c26369354b83:"hvqCQ","4893e43c9a11fc63":"aRu9T","48482fa6862b803a":"e8mfS",de1987fde7f85915:"5toj2"}],"5tIGd":[function(e,t,i){var n=e("1901fc8accbc2376"),r=e("1c4ec63b43256656"),s=e("2fee865898c5ee13"),a=e("f549073ca7dfb3d2");a&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),s(t);try{return a(e,t),!0}catch(e){return!1}}})},{"1901fc8accbc2376":"gJg5v","1c4ec63b43256656":"dPzbI","2fee865898c5ee13":"hEWXk",f549073ca7dfb3d2:"arrdQ"}],"14MkC":[function(e,t,i){var n=e("9aa7ab2c6cbf6701"),r=e("28bf5c0ba6cfd67b"),s=e("717556d45c34d721");n({global:!0},{Reflect:{}}),s(r.Reflect,"Reflect",!0)},{"9aa7ab2c6cbf6701":"gJg5v","28bf5c0ba6cfd67b":"7Z171","717556d45c34d721":"dkhk9"}],"2JQK3":[function(e,t,i){var n=e("c8639d3a74e6bb07"),r=e("31e10ac977d93a17"),s=e("7f079a60fe35f235"),a=e("66b0d772c6e443af"),o=e("11d7cdfa8687037e"),h=e("5fcf789712ec006"),c=e("488fe57e39be2d0d"),l=e("8b1d3e9ebc10b376").f,u=e("6c4ec99bc7b85243"),d=e("28b4ed60c7ffe147"),f=e("f00c99d31179ed39"),p=e("867ea555b957a0aa"),g=e("86e9756a5a6a0176"),m=e("438bf11983e20900"),v=e("818c2b1aecf93017"),y=e("5b540f0dbf00266f"),b=e("5cfbf10059a84a33"),x=e("2ff319236881379d").enforce,E=e("7f2183994b17a7e8"),w=e("7edc7513ec6ac4d0"),T=e("fbaf905791cdbfe"),S=e("28f5087d79ccd92a"),A=w("match"),C=r.RegExp,_=C.prototype,I=r.SyntaxError,O=s(_.exec),P=s("".charAt),M=s("".replace),R=s("".indexOf),L=s("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,k=/a/g,N=/a/g,F=new C(k)!==k,B=g.MISSED_STICKY,U=g.UNSUPPORTED_Y,V=n&&(!F||B||T||S||y(function(){return N[A]=!1,C(k)!==k||C(N)===N||"/a/i"!==String(C(k,"i"))})),G=function(e){for(var t,i=e.length,n=0,r="",s=!1;n<=i;n++){if("\\"===(t=P(e,n))){r+=t+P(e,++n);continue}s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),r+=t):r+="[\\s\\S]"}return r},j=function(e){for(var t,i=e.length,n=0,r="",s=[],a=c(null),o=!1,h=!1,l=0,u="";n<=i;n++){if("\\"===(t=P(e,n)))t+=P(e,++n);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(r+=t,"?:"===L(e,n+1,n+3))continue;O(D,L(e,n+1))&&(n+=2,h=!0),l++;continue;case">"===t&&h:if(""===u||b(a,u))throw new I("Invalid capture group name");a[u]=!0,s[s.length]=[u,l],h=!1,u="";continue}h?u+=t:r+=t}return[r,s]};if(a("RegExp",V)){for(var W=function(e,t){var i,n,r,s,a,c,l=u(_,this),g=d(e),m=void 0===t,v=[],y=e;if(!l&&g&&m&&e.constructor===W)return e;if((g||u(_,e))&&(e=e.source,m&&(t=p(y))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),y=e,T&&"dotAll"in k&&(n=!!t&&R(t,"s")>-1)&&(t=M(t,/s/g,"")),i=t,B&&"sticky"in k&&(r=!!t&&R(t,"y")>-1)&&U&&(t=M(t,/y/g,"")),S&&(e=(s=j(e))[0],v=s[1]),a=o(C(e,t),l?this:_,W),(n||r||v.length)&&(c=x(a),n&&(c.dotAll=!0,c.raw=W(G(e),i)),r&&(c.sticky=!0),v.length&&(c.groups=v)),e!==y)try{h(a,"source",""===y?"(?:)":y)}catch(e){}return a},Y=l(C),H=0;Y.length>H;)m(W,C,Y[H++]);_.constructor=W,W.prototype=_,v(r,"RegExp",W,{constructor:!0})}E("RegExp")},{c8639d3a74e6bb07:"6mXK1","31e10ac977d93a17":"7Z171","7f079a60fe35f235":"2iJ57","66b0d772c6e443af":"gE5NQ","11d7cdfa8687037e":"30not","5fcf789712ec006":"gKM90","488fe57e39be2d0d":"7isQ3","8b1d3e9ebc10b376":"dDV3S","6c4ec99bc7b85243":"d5bNd","28b4ed60c7ffe147":"4WTYw",f00c99d31179ed39:"4x6uB","867ea555b957a0aa":"iG8db","86e9756a5a6a0176":"arHMc","438bf11983e20900":"7fWkz","818c2b1aecf93017":"4CPdc","5b540f0dbf00266f":"cXVrS","5cfbf10059a84a33":"9JWVX","2ff319236881379d":"ixHS2","7f2183994b17a7e8":"c7jXZ","7edc7513ec6ac4d0":"5CuF7",fbaf905791cdbfe:"9jBfE","28f5087d79ccd92a":"9XBEq"}],"4WTYw":[function(e,t,i){var n=e("4ca57df9821dbfa3"),r=e("b867bee476fc5018"),s=e("42cd33b6dbd61bee")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===r(e))}},{"4ca57df9821dbfa3":"8mxCV",b867bee476fc5018:"161sQ","42cd33b6dbd61bee":"5CuF7"}],iG8db:[function(e,t,i){var n=e("fd54476372f3a204"),r=e("a12d2126c329f45"),s=e("815509f48e0b1e36"),a=e("37fba4854c4ab846"),o=RegExp.prototype;t.exports=function(e){var t=e.flags;return!(void 0===t&&!("flags"in o)&&!r(e,"flags")&&s(o,e))?t:n(a,e)}},{fd54476372f3a204:"bOssl",a12d2126c329f45:"9JWVX","815509f48e0b1e36":"d5bNd","37fba4854c4ab846":"jjoUH"}],jjoUH:[function(e,t,i){var n=e("136abace0aec2b5c");t.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},{"136abace0aec2b5c":"dPzbI"}],arHMc:[function(e,t,i){var n=e("797bef35e651cb5e"),r=e("d87f6288614c07bc").RegExp,s=n(function(){var e=r("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=s||n(function(){return!r("a","y").sticky}),o=s||n(function(){var e=r("^r","gy");return e.lastIndex=2,null!==e.exec("str")});t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},{"797bef35e651cb5e":"cXVrS",d87f6288614c07bc:"7Z171"}],"9jBfE":[function(e,t,i){var n=e("e4784e58ea762065"),r=e("ea51a856230c58ac").RegExp;t.exports=n(function(){var e=r(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},{e4784e58ea762065:"cXVrS",ea51a856230c58ac:"7Z171"}],"9XBEq":[function(e,t,i){var n=e("b9b1a0fbdd999ded"),r=e("f47a97b0c4cfeafc").RegExp;t.exports=n(function(){var e=r("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},{b9b1a0fbdd999ded:"cXVrS",f47a97b0c4cfeafc:"7Z171"}],"9radj":[function(e,t,i){var n=e("a9f8f60f2f751fb4"),r=e("f4bf414038137d54"),s=e("f6019dcdb547562c"),a=e("ca788245c2356b08"),o=e("ff536bd90d3c7c05").get,h=RegExp.prototype,c=TypeError;n&&r&&a(h,"dotAll",{configurable:!0,get:function(){if(this!==h){if("RegExp"===s(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},{a9f8f60f2f751fb4:"6mXK1",f4bf414038137d54:"9jBfE",f6019dcdb547562c:"161sQ",ca788245c2356b08:"3NI4M",ff536bd90d3c7c05:"ixHS2"}],"4cips":[function(e,t,i){var n=e("72ba4de9841213e"),r=e("d4ebaff1663cc5b9");n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},{"72ba4de9841213e":"gJg5v",d4ebaff1663cc5b9:"gpoGl"}],gpoGl:[function(e,t,i){var n,r,s=e("698f504b4733b02d"),a=e("6d0d2df39383a10b"),o=e("382af5492ddc18e6"),h=e("96e0244464229d3"),c=e("3bd1d72d4987e0ff"),l=e("12c3e6e355312395"),u=e("38d060dff8e4ab54"),d=e("aec1e11e2cd92d19").get,f=e("7d9db6b4177b833a"),p=e("b26a8ca5152d0a8d"),g=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,v=m,y=a("".charAt),b=a("".indexOf),x=a("".replace),E=a("".slice),w=(r=/b*/g,s(m,n=/a/,"a"),s(m,r,"a"),0!==n.lastIndex||0!==r.lastIndex),T=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(w||S||T||f||p)&&(v=function(e){var t,i,n,r,a,c,l,f=d(this),p=o(e),A=f.raw;if(A)return A.lastIndex=this.lastIndex,t=s(v,A,p),this.lastIndex=A.lastIndex,t;var C=f.groups,_=T&&this.sticky,I=s(h,this),O=this.source,P=0,M=p;if(_&&(-1===b(I=x(I,"y",""),"g")&&(I+="g"),M=E(p,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==y(p,this.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,P++),i=RegExp("^(?:"+O+")",I)),S&&(i=RegExp("^"+O+"$(?!\\s)",I)),w&&(n=this.lastIndex),r=s(m,_?i:this,M),_?r?(r.input=E(r.input,P),r[0]=E(r[0],P),r.index=this.lastIndex,this.lastIndex+=r[0].length):this.lastIndex=0:w&&r&&(this.lastIndex=this.global?r.index+r[0].length:n),S&&r&&r.length>1&&s(g,r[0],i,function(){for(a=1;ai.size?h(i.getIterator(),function(e){u(t,e)&&l(r,e)}):o(t,function(e){i.includes(e)&&l(r,e)}),r}},{"7bfb130f16b8292a":"1uHXp","47146aea8f1cd561":"aKtSD",d1a604e694f4d1c9:"dDfau",cd0f29a36bce3c77:"2mzII","569d3010c2a051bc":"dSeD9",f15171665078c946:"hUCXP"}],ebh58:[function(e,t,i){var n=e("a1707a0c61f5a536"),r=e("cb8bc5c7a60da2c0");n({target:"Set",proto:!0,real:!0,forced:!e("d245d89a0dca71e2")("isDisjointFrom")},{isDisjointFrom:r})},{a1707a0c61f5a536:"gJg5v",cb8bc5c7a60da2c0:"fsPLP",d245d89a0dca71e2:"cAght"}],fsPLP:[function(e,t,i){var n=e("4bcf2c126f0ee7e9"),r=e("5f2538d74cbdf8b3").has,s=e("edcd27260fbf6ef5"),a=e("9b207c4104d5301c"),o=e("bae422673873a59e"),h=e("ba88aed3f0227034"),c=e("11af6bfd4840cc69");t.exports=function(e){var t=n(this),i=a(e);if(s(t)<=i.size)return!1!==o(t,function(e){if(i.includes(e))return!1},!0);var l=i.getIterator();return!1!==h(l,function(e){if(r(t,e))return c(l,"normal",!1)})}},{"4bcf2c126f0ee7e9":"1uHXp","5f2538d74cbdf8b3":"aKtSD",edcd27260fbf6ef5:"dDfau","9b207c4104d5301c":"2mzII",bae422673873a59e:"dSeD9",ba88aed3f0227034:"hUCXP","11af6bfd4840cc69":"58eij"}],"5aq0U":[function(e,t,i){var n=e("67c95d67210a1f28"),r=e("ad07e334c2be4c40");n({target:"Set",proto:!0,real:!0,forced:!e("87c6020e8c27ff9d")("isSubsetOf")},{isSubsetOf:r})},{"67c95d67210a1f28":"gJg5v",ad07e334c2be4c40:"6M8p1","87c6020e8c27ff9d":"cAght"}],"6M8p1":[function(e,t,i){var n=e("3d5a277c60f35ee0"),r=e("8b5056cb353b9363"),s=e("5c8afb92d90a7afe"),a=e("5d0efb34cef239d0");t.exports=function(e){var t=n(this),i=a(e);return!(r(t)>i.size)&&!1!==s(t,function(e){if(!i.includes(e))return!1},!0)}},{"3d5a277c60f35ee0":"1uHXp","8b5056cb353b9363":"dDfau","5c8afb92d90a7afe":"dSeD9","5d0efb34cef239d0":"2mzII"}],"8hV4V":[function(e,t,i){var n=e("709d88585366e67"),r=e("56957227e511c32f");n({target:"Set",proto:!0,real:!0,forced:!e("96eae72d49b9b957")("isSupersetOf")},{isSupersetOf:r})},{"709d88585366e67":"gJg5v","56957227e511c32f":"eyhzP","96eae72d49b9b957":"cAght"}],eyhzP:[function(e,t,i){var n=e("93254e314b2e5736"),r=e("be41c371321728ce").has,s=e("95f22a3e4ec3e3cd"),a=e("3cd91641e66e9eeb"),o=e("9565d7b14e850c29"),h=e("9f7dd30215d71bc9");t.exports=function(e){var t=n(this),i=a(e);if(s(t)=0?n:i+n;return r<0||r>=i?void 0:c(t,r)}})},{"473defaa8915e9e4":"gJg5v",dd4afa154631abab:"2iJ57",d699b04e9a9f7a28:"cHxZN",df1114985710f2b3:"gAgUH","3b247286b7d8c4d5":"4x6uB",da5b773a057f92aa:"cXVrS"}],g0fSy:[function(e,t,i){var n=e("4793fe8f86582840"),r=e("785f7a78d0dffe20").codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},{"4793fe8f86582840":"gJg5v","785f7a78d0dffe20":"fVu0j"}],fVu0j:[function(e,t,i){var n=e("8b9beff9818f042"),r=e("d3e375e7697978fb"),s=e("545a72c28133c459"),a=e("5bafa9e5b372669c"),o=n("".charAt),h=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,i){var n,l,u=s(a(t)),d=r(i),f=u.length;return d<0||d>=f?e?"":void 0:(n=h(u,d))<55296||n>56319||d+1===f||(l=h(u,d+1))<56320||l>57343?e?o(u,d):n:e?c(u,d,d+2):(n-55296<<10)+(l-56320)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},{"8b9beff9818f042":"2iJ57",d3e375e7697978fb:"gAgUH","545a72c28133c459":"4x6uB","5bafa9e5b372669c":"cHxZN"}],eKkbH:[function(e,t,i){var n,r=e("b3cd31deb9d32a8c"),s=e("c719ddda901eac13"),a=e("e75304a6599a5e3c").f,o=e("99883df659b0f5cb"),h=e("e5d8defa036db553"),c=e("4c78f4ce8264459e"),l=e("da4ce5f132e95194"),u=e("58da9c5323c25a0f"),d=e("e85ff4c5cebafc14"),f=s("".slice),p=Math.min,g=u("endsWith");r({target:"String",proto:!0,forced:!(!d&&!g&&(n=a(String.prototype,"endsWith"))&&!n.writable)&&!g},{endsWith:function(e){var t=h(l(this));c(e);var i=arguments.length>1?arguments[1]:void 0,n=t.length,r=void 0===i?n:p(o(i),n),s=h(e);return f(t,r-s.length,r)===s}})},{b3cd31deb9d32a8c:"gJg5v",c719ddda901eac13:"c4z5p",e75304a6599a5e3c:"aRu9T","99883df659b0f5cb":"lQsU7",e5d8defa036db553:"4x6uB","4c78f4ce8264459e":"6Sz3M",da4ce5f132e95194:"cHxZN","58da9c5323c25a0f":"i38lK",e85ff4c5cebafc14:"jHRGA"}],"6Sz3M":[function(e,t,i){var n=e("7b932b7711b6ae16"),r=TypeError;t.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},{"7b932b7711b6ae16":"4WTYw"}],i38lK:[function(e,t,i){var n=e("303b9f26f388462e")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},{"303b9f26f388462e":"5CuF7"}],dLJLG:[function(e,t,i){var n=e("f7ab90f668dfed5f"),r=e("f19d1a907413c68d"),s=e("6914a342ea61c319"),a=RangeError,o=String.fromCharCode,h=String.fromCodePoint,c=r([].join);n({target:"String",stat:!0,arity:1,forced:!!h&&1!==h.length},{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,r=0;n>r;){if(t=+arguments[r++],s(t,1114111)!==t)throw new a(t+" is not a valid code point");i[r]=t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320)}return c(i,"")}})},{f7ab90f668dfed5f:"gJg5v",f19d1a907413c68d:"2iJ57","6914a342ea61c319":"47gaI"}],cDQpr:[function(e,t,i){var n=e("1cde7a4fbe24deb1"),r=e("d9ff51b37cd276ef"),s=e("b1c9b74814a0e4ee"),a=e("36f262aff4650984"),o=e("c6f2de0a65cb2a09"),h=e("30dec888dfe829e2"),c=r("".indexOf);n({target:"String",proto:!0,forced:!h("includes")},{includes:function(e){return!!~c(o(a(this)),o(s(e)),arguments.length>1?arguments[1]:void 0)}})},{"1cde7a4fbe24deb1":"gJg5v",d9ff51b37cd276ef:"2iJ57",b1c9b74814a0e4ee:"6Sz3M","36f262aff4650984":"cHxZN",c6f2de0a65cb2a09:"4x6uB","30dec888dfe829e2":"i38lK"}],kFTda:[function(e,t,i){var n=e("119056f2894f6d80"),r=e("5d2e4bc1718ad78f"),s=e("9410272c8796c548"),a=e("8f81c73916cb66a4"),o=r("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var e=a(s(this)),t=e.length,i=0;i=56320||++i>=t||(64512&o(e,i))!=56320))return!1}return!0}})},{"119056f2894f6d80":"gJg5v","5d2e4bc1718ad78f":"2iJ57","9410272c8796c548":"cHxZN","8f81c73916cb66a4":"4x6uB"}],i2qFG:[function(e,t,i){var n=e("e8b36e9e8f60deb1").charAt,r=e("99724183e9ac759e"),s=e("75c45c226da41a58"),a=e("5bce8e62b9ff7984"),o=e("cab4a14c8e102263"),h="String Iterator",c=s.set,l=s.getterFor(h);a(String,"String",function(e){c(this,{type:h,string:r(e),index:0})},function(){var e,t=l(this),i=t.string,r=t.index;return r>=i.length?o(void 0,!0):(e=n(i,r),t.index+=e.length,o(e,!1))})},{e8b36e9e8f60deb1:"fVu0j","99724183e9ac759e":"4x6uB","75c45c226da41a58":"ixHS2","5bce8e62b9ff7984":"klSVb",cab4a14c8e102263:"dwU83"}],"6dNpA":[function(e,t,i){var n=e("1a72ba86dc4099cd"),r=e("3e8300c8dcd37861"),s=e("4e367ba2e602279b"),a=e("a9817085717103ac"),o=e("3ad5c9f9719d1735"),h=e("a1912f278569b4e6"),c=e("d83ac9e10edfa0ef"),l=e("4fa13f5559b9cbba"),u=e("357167b0f8a6ba45"),d=e("3b40f00a568e6a6b");r("match",function(e,t,i){return[function(t){var i=c(this),r=a(t)?void 0:l(t,e);return r?n(r,t,i):new RegExp(t)[e](h(i))},function(e){var n,r=s(this),a=h(e),c=i(t,r,a);if(c.done)return c.value;if(!r.global)return d(r,a);var l=r.unicode;r.lastIndex=0;for(var f=[],p=0;null!==(n=d(r,a));){var g=h(n[0]);f[p]=g,""===g&&(r.lastIndex=u(a,o(r.lastIndex),l)),p++}return 0===p?null:f}]})},{"1a72ba86dc4099cd":"bOssl","3e8300c8dcd37861":"a7eSP","4e367ba2e602279b":"dPzbI",a9817085717103ac:"8AxCV","3ad5c9f9719d1735":"lQsU7",a1912f278569b4e6:"4x6uB",d83ac9e10edfa0ef:"cHxZN","4fa13f5559b9cbba":"2qR8N","357167b0f8a6ba45":"jbkzM","3b40f00a568e6a6b":"gcJzM"}],a7eSP:[function(e,t,i){e("a7057ee05361671");var n=e("771b9a32e3d08596"),r=e("5a9ef6cc43262548"),s=e("b286e3fd8e91d745"),a=e("f56adef42dd3c42"),o=e("39c5bea895574e43"),h=e("1c6881441295e4f4"),c=o("species"),l=RegExp.prototype;t.exports=function(e,t,i,u){var d=o(e),f=!a(function(){var t={};return t[d]=function(){return 7},7!==""[e](t)}),p=f&&!a(function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[c]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return t=!0,null},i[d](""),!t});if(!f||!p||i){var g=/./[d],m=t(d,""[e],function(e,t,i,r,a){var o=t.exec;return o===s||o===l.exec?f&&!a?{done:!0,value:n(g,t,i,r)}:{done:!0,value:n(e,i,t,r)}:{done:!1}});r(String.prototype,e,m[0]),r(l,d,m[1])}u&&h(l[d],"sham",!0)}},{a7057ee05361671:"4cips","771b9a32e3d08596":"bOssl","5a9ef6cc43262548":"4CPdc",b286e3fd8e91d745:"gpoGl",f56adef42dd3c42:"cXVrS","39c5bea895574e43":"5CuF7","1c6881441295e4f4":"gKM90"}],jbkzM:[function(e,t,i){var n=e("7830b1b106fe9c2f").charAt;t.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},{"7830b1b106fe9c2f":"fVu0j"}],gcJzM:[function(e,t,i){var n=e("fe012fd0e62b041c"),r=e("953f0ef3a583db2e"),s=e("7b1bebb22aa6d09f"),a=e("41458309d054e6d9"),o=e("2da13aa8500d5870"),h=TypeError;t.exports=function(e,t){var i=e.exec;if(s(i)){var c=n(i,e,t);return null!==c&&r(c),c}if("RegExp"===a(e))return n(o,e,t);throw new h("RegExp#exec called on incompatible receiver")}},{fe012fd0e62b041c:"bOssl","953f0ef3a583db2e":"dPzbI","7b1bebb22aa6d09f":"h1Wnr","41458309d054e6d9":"161sQ","2da13aa8500d5870":"gpoGl"}],"5JfZw":[function(e,t,i){var n=e("ab7506693563188f"),r=e("bc392a1870cac46c"),s=e("518f2de578425815"),a=e("5413f14f6fa8d586"),o=e("b080d5b6d2874bb9"),h=e("500412608beb0fa4"),c=e("d27dba1be9ae2ec7"),l=e("304a5dfbef2eca6a"),u=e("c369a3c8053cdec1"),d=e("c7ae38c574bac52a"),f=e("f127fd901a8322fa"),p=e("3da774f1ac5cef39"),g=e("5e13bde3b69470d3"),m=e("d67b0fe73b3441f6"),v=e("c3d9a3b5ce1a0134"),y=e("f824fce70460b786"),b=e("fe46150a38a85a5d"),x=e("c158ae31b64e4ec2"),E=e("2eeb2389fe600209"),w=e("a803aed269f0019b"),T=e("e9503db7c8f89e91"),S=e("d919927dacd61c64"),A=b("matchAll"),C="RegExp String",_=C+" Iterator",I=T.set,O=T.getterFor(_),P=RegExp.prototype,M=TypeError,R=s("".indexOf),L=s("".matchAll),D=!!L&&!y(function(){L("a",/./)}),k=a(function(e,t,i,n){I(this,{type:_,regexp:e,string:t,global:i,unicode:n,done:!1})},C,function(){var e=O(this);if(e.done)return o(void 0,!0);var t=e.regexp,i=e.string,n=w(t,i);return null===n?(e.done=!0,o(void 0,!0)):(e.global?""===l(n[0])&&(t.lastIndex=E(i,c(t.lastIndex),e.unicode)):e.done=!0,o(n,!1))}),N=function(e){var t,i,n,r=u(this),s=l(e),a=x(r,RegExp),o=l(g(r));return t=new a(a===RegExp?r.source:r,o),i=!!~R(o,"g"),n=!!~R(o,"u"),t.lastIndex=c(r.lastIndex),new k(t,s,i,n)};n({target:"String",proto:!0,forced:D},{matchAll:function(e){var t,i,n,s=h(this);if(d(e)){if(D)return L(s,e)}else{if(p(e)&&!~R(l(h(g(e))),"g"))throw new M("`.matchAll` does not allow non-global regexes");if(D)return L(s,e);if(void 0===(i=m(e,A))&&S&&"RegExp"===f(e)&&(i=N),i)return r(i,e,s)}return t=l(s),n=RegExp(e,"g"),S?r(N,n,t):n[A](t)}}),S||A in P||v(P,A,N)},{ab7506693563188f:"gJg5v",bc392a1870cac46c:"bOssl","518f2de578425815":"c4z5p","5413f14f6fa8d586":"1Abii",b080d5b6d2874bb9:"dwU83","500412608beb0fa4":"cHxZN",d27dba1be9ae2ec7:"lQsU7","304a5dfbef2eca6a":"4x6uB",c369a3c8053cdec1:"dPzbI",c7ae38c574bac52a:"8AxCV",f127fd901a8322fa:"161sQ","3da774f1ac5cef39":"4WTYw","5e13bde3b69470d3":"iG8db",d67b0fe73b3441f6:"2qR8N",c3d9a3b5ce1a0134:"4CPdc",f824fce70460b786:"cXVrS",fe46150a38a85a5d:"5CuF7",c158ae31b64e4ec2:"CaSkn","2eeb2389fe600209":"jbkzM",a803aed269f0019b:"gcJzM",e9503db7c8f89e91:"ixHS2",d919927dacd61c64:"jHRGA"}],fU7MD:[function(e,t,i){var n=e("bde41783ec0f17a4"),r=e("794108b869e92a52").end;n({target:"String",proto:!0,forced:e("271b5f05be76b6dd")},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{bde41783ec0f17a4:"gJg5v","794108b869e92a52":"15Fl7","271b5f05be76b6dd":"38Jla"}],"38Jla":[function(e,t,i){var n=e("ea42f18a4a6e86a9");t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},{ea42f18a4a6e86a9:"5hj4U"}],iz82g:[function(e,t,i){var n=e("31f9b30345fd3179"),r=e("10950b9580001d1d").start;n({target:"String",proto:!0,forced:e("c86924140d1ee1af")},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},{"31f9b30345fd3179":"gJg5v","10950b9580001d1d":"15Fl7",c86924140d1ee1af:"38Jla"}],"5PH9s":[function(e,t,i){var n=e("d77bea9ed21ff4bc"),r=e("7ed823ef2298b758"),s=e("1210aa921fc34970"),a=e("4320a1855b3e38fb"),o=e("c2348ecf591fb82d"),h=e("4b1f320aa7c99da8"),c=r([].push),l=r([].join);n({target:"String",stat:!0},{raw:function(e){var t=s(a(e).raw),i=h(t);if(!i)return"";for(var n=arguments.length,r=[],u=0;;){if(c(r,o(t[u++])),u===i)return l(r,"");u=_&&(C+=A(o,_,D)+R,_=D+L.length)}return C+A(o,_)}]},!!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})||!C||_)},{f8fd16f994f85406:"2fjXG",b5234e1018cb2916:"bOssl",c3560c75b4ad1ef2:"2iJ57",c4a2369a79c5aaa2:"a7eSP",daa534dec0372986:"cXVrS","317f495e148be81e":"dPzbI","36464dd17d2a7224":"h1Wnr",cea091f017783d94:"8AxCV","3847a5ff118f8ebb":"gAgUH",effd88adfbb6b4bc:"lQsU7","953b724c90cd8db6":"4x6uB","154963922e7c9354":"cHxZN","90f011aa61b831b4":"jbkzM",af552ab4c89e35be:"2qR8N","3726cfd8dc51c82c":"gSNtK","6de55154ce28598":"gcJzM","4b6a0c7e75a1080a":"5CuF7"}],gSNtK:[function(e,t,i){var n=e("3cf51fea5d34c201"),r=e("999f669befd62c27"),s=Math.floor,a=n("".charAt),o=n("".replace),h=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,n,u,d){var f=i+e.length,p=n.length,g=l;return void 0!==u&&(u=r(u),g=c),o(d,g,function(r,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"`":return h(t,0,i);case"'":return h(t,f);case"<":c=u[h(o,1,-1)];break;default:var l=+o;if(0===l)return r;if(l>p){var d=s(l/10);if(0===d)return r;if(d<=p)return void 0===n[d-1]?a(o,1):n[d-1]+a(o,1);return r}c=n[l-1]}return void 0===c?"":c})}},{"3cf51fea5d34c201":"2iJ57","999f669befd62c27":"6oQEu"}],"2HEOd":[function(e,t,i){var n=e("69381acad0f1f180"),r=e("be2b5a787b4341ed"),s=e("70979a707458e2bc"),a=e("ede342a754b29b08"),o=e("7b33c58d7c6a633e"),h=e("bc393499bad934a6"),c=e("1f633e1cea7bfece"),l=e("5a07dc19106ad672"),u=e("40b88ab8d2a68602"),d=e("c009564a6e08e49f"),f=e("49118a84cede6c94"),p=e("d9c85063e2fa18d1"),g=e("179cb9efb80dcae1"),m=p("replace"),v=TypeError,y=s("".indexOf),b=s("".replace),x=s("".slice),E=Math.max;n({target:"String",proto:!0},{replaceAll:function(e,t){var i,n,s,p,w,T,S,A,C,_=a(this),I=0,O="";if(!h(e)){if((i=c(e))&&!~y(l(a(d(e))),"g"))throw new v("`.replaceAll` does not allow non-global regexes");if(n=u(e,m))return r(n,e,_,t);if(g&&i)return b(l(_),e,t)}for(s=l(_),p=l(e),(w=o(t))||(t=l(t)),S=E(1,T=p.length),A=y(s,p);-1!==A;)C=w?l(t(p,A,s)):f(p,s,A,[],void 0,t),O+=x(s,I,A)+C,I=A+T,A=A+S>s.length?-1:y(s,p,A+S);return I1||"".split(/.?/).length;s("split",function(e,t,i){var r="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n(t,this,e,i)}:t;return[function(t,i){var s=h(this),a=o(t)?void 0:f(t,e);return a?n(a,t,s,i):n(r,d(s),t,i)},function(e,n){var s=a(this),o=d(e);if(!w){var h=i(r,s,o,n,r!==t);if(h.done)return h.value}var f=c(s,RegExp),g=s.unicode,m=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(v?"g":"y"),E=new f(v?"^(?:"+s.source+")":s,m),T=void 0===n?4294967295:n>>>0;if(0===T)return[];if(0===o.length)return null===p(E,o)?[o]:[];for(var S=0,A=0,C=[];A1?arguments[1]:void 0,t.length)),n=h(e);return f(t,i,i+n.length)===n}})},{dde854d8a76d436d:"gJg5v","75ef62d12e51b46c":"c4z5p",ff3b80c156be6132:"aRu9T","573cc620487e2f6b":"lQsU7","3d6be1b7c00bafd":"4x6uB","40ed833d044b85cd":"6Sz3M","7b57b8afdd10d7e4":"cHxZN","80ffa3ecff44b920":"i38lK",d76fe9fb1319d805:"jHRGA"}],ilZVq:[function(e,t,i){var n=e("e3f052c25e9ce7a0"),r=e("79d87d02e012ddb6"),s=e("d9b0f8ef34c7f588"),a=e("7684d557cb0eafb9"),o=e("a0c96765c2fd3918"),h=r("".slice),c=Math.max,l=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var i,n,r=o(s(this)),u=r.length,d=a(e);return(d===1/0&&(d=0),d<0&&(d=c(u+d,0)),(i=void 0===t?u:a(t))<=0||i===1/0)?"":(n=l(d+i,u),d>=n?"":h(r,d,n))}})},{e3f052c25e9ce7a0:"gJg5v","79d87d02e012ddb6":"2iJ57",d9b0f8ef34c7f588:"cHxZN","7684d557cb0eafb9":"gAgUH",a0c96765c2fd3918:"4x6uB"}],hUcmJ:[function(e,t,i){var n=e("abdac43301199021"),r=e("46e4a85192f95918"),s=e("63c730f9593a416e"),a=e("2fb31922ea5ff27d"),o=e("6f82048edf356822"),h=e("2f2665d060e5f6a1"),c=Array,l=s("".charAt),u=s("".charCodeAt),d=s([].join),f="".toWellFormed,p=f&&h(function(){return"1"!==r(f,1)});n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var e=o(a(this));if(p)return r(f,e);for(var t=e.length,i=c(t),n=0;n=56320||n+1>=t||(64512&u(e,n+1))!=56320?i[n]="�":(i[n]=l(e,n),i[++n]=l(e,n))}return d(i,"")}})},{abdac43301199021:"gJg5v","46e4a85192f95918":"bOssl","63c730f9593a416e":"2iJ57","2fb31922ea5ff27d":"cHxZN","6f82048edf356822":"4x6uB","2f2665d060e5f6a1":"cXVrS"}],l2p2s:[function(e,t,i){var n=e("4a60febef79e9fd2"),r=e("aa85dc53780a7a31").trim;n({target:"String",proto:!0,forced:e("d62e07fb0a0f0c26")("trim")},{trim:function(){return r(this)}})},{"4a60febef79e9fd2":"gJg5v",aa85dc53780a7a31:"jX5uQ",d62e07fb0a0f0c26:"cZ2PC"}],cZ2PC:[function(e,t,i){var n=e("9e0c4c0dbddf03dd").PROPER,r=e("92328d780355dc79"),s=e("8c0d7fed4094a2b6"),a="​…᠎";t.exports=function(e){return r(function(){return!!s[e]()||a[e]()!==a||n&&s[e].name!==e})}},{"9e0c4c0dbddf03dd":"jmu0n","92328d780355dc79":"cXVrS","8c0d7fed4094a2b6":"heeAP"}],"3o3Gk":[function(e,t,i){e("251a593a444ed436");var n=e("91f4001402f2b9ee"),r=e("c6b02e29a67a6f26");n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},{"251a593a444ed436":"94n2Q","91f4001402f2b9ee":"gJg5v",c6b02e29a67a6f26:"eV55a"}],"94n2Q":[function(e,t,i){var n=e("de7842587ae70a42"),r=e("324b25d4226efe2d");n({target:"String",proto:!0,name:"trimEnd",forced:void 0!==r},{trimRight:r})},{de7842587ae70a42:"gJg5v","324b25d4226efe2d":"eV55a"}],eV55a:[function(e,t,i){var n=e("bc94349b4fc95bb3").end,r=e("71fc76130b4f9a6");t.exports=r("trimEnd")?function(){return n(this)}:"".trimEnd},{bc94349b4fc95bb3:"jX5uQ","71fc76130b4f9a6":"cZ2PC"}],"4Lt39":[function(e,t,i){e("654c60d6d97014cd");var n=e("26b6a882a1c5bba9"),r=e("b5f2740011c04718");n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},{"654c60d6d97014cd":"7XL4A","26b6a882a1c5bba9":"gJg5v",b5f2740011c04718:"lOELU"}],"7XL4A":[function(e,t,i){var n=e("2da1b55d02d90d4a"),r=e("8b6aefe7df6c88a");n({target:"String",proto:!0,name:"trimStart",forced:void 0!==r},{trimLeft:r})},{"2da1b55d02d90d4a":"gJg5v","8b6aefe7df6c88a":"lOELU"}],lOELU:[function(e,t,i){var n=e("a3878f82301e4d4").start,r=e("ee8e5c2b54df0ba4");t.exports=r("trimStart")?function(){return n(this)}:"".trimStart},{a3878f82301e4d4:"jX5uQ",ee8e5c2b54df0ba4:"cZ2PC"}],"3qZNd":[function(e,t,i){var n=e("e7d648b06f4dd9c6"),r=e("8b0114ba5e653efc");n({target:"String",proto:!0,forced:e("1caf9e0d6204ce0a")("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},{e7d648b06f4dd9c6:"gJg5v","8b0114ba5e653efc":"8K5FK","1caf9e0d6204ce0a":"ftpai"}],"8K5FK":[function(e,t,i){var n=e("427762aaf6075552"),r=e("3a91b63413ffe383"),s=e("515bd1582fb5b4c0"),a=/"/g,o=n("".replace);t.exports=function(e,t,i,n){var h=s(r(e)),c="<"+t;return""!==i&&(c+=" "+i+'="'+o(s(n),a,""")+'"'),c+">"+h+""}},{"427762aaf6075552":"2iJ57","3a91b63413ffe383":"cHxZN","515bd1582fb5b4c0":"4x6uB"}],ftpai:[function(e,t,i){var n=e("b7fe2964c39bac");t.exports=function(e){return n(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},{b7fe2964c39bac:"cXVrS"}],"20tl2":[function(e,t,i){var n=e("c559cd7b113e236e"),r=e("5a30563bc26230a8");n({target:"String",proto:!0,forced:e("eec66acdfc1a2a7d")("big")},{big:function(){return r(this,"big","","")}})},{c559cd7b113e236e:"gJg5v","5a30563bc26230a8":"8K5FK",eec66acdfc1a2a7d:"ftpai"}],ahutJ:[function(e,t,i){var n=e("676512d3c55a414"),r=e("7e21be1f712bc51d");n({target:"String",proto:!0,forced:e("46de4ecf79c13e")("blink")},{blink:function(){return r(this,"blink","","")}})},{"676512d3c55a414":"gJg5v","7e21be1f712bc51d":"8K5FK","46de4ecf79c13e":"ftpai"}],f2UI4:[function(e,t,i){var n=e("48f4b5d0c5a6a4fb"),r=e("e17c07d10b887dd3");n({target:"String",proto:!0,forced:e("5287465832c168a5")("bold")},{bold:function(){return r(this,"b","","")}})},{"48f4b5d0c5a6a4fb":"gJg5v",e17c07d10b887dd3:"8K5FK","5287465832c168a5":"ftpai"}],"4XIfF":[function(e,t,i){var n=e("6490db7677e8f73e"),r=e("e6e19e0e56c49b86");n({target:"String",proto:!0,forced:e("bb7b77345df5335f")("fixed")},{fixed:function(){return r(this,"tt","","")}})},{"6490db7677e8f73e":"gJg5v",e6e19e0e56c49b86:"8K5FK",bb7b77345df5335f:"ftpai"}],l1rs2:[function(e,t,i){var n=e("138910cd530370a2"),r=e("d72a479e3b3815bd");n({target:"String",proto:!0,forced:e("5690c1466282cf0f")("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},{"138910cd530370a2":"gJg5v",d72a479e3b3815bd:"8K5FK","5690c1466282cf0f":"ftpai"}],adYvn:[function(e,t,i){var n=e("f502df9771a160ae"),r=e("ee2ef8461dec89b6");n({target:"String",proto:!0,forced:e("2a2e9c2933145580")("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},{f502df9771a160ae:"gJg5v",ee2ef8461dec89b6:"8K5FK","2a2e9c2933145580":"ftpai"}],gidCX:[function(e,t,i){var n=e("24cfbc86c4210c6b"),r=e("e302ce8a79ba595b");n({target:"String",proto:!0,forced:e("3ecf3c8b0c95d02f")("italics")},{italics:function(){return r(this,"i","","")}})},{"24cfbc86c4210c6b":"gJg5v",e302ce8a79ba595b:"8K5FK","3ecf3c8b0c95d02f":"ftpai"}],bv1yh:[function(e,t,i){var n=e("bab8a92d9901152a"),r=e("252613bc1bb91720");n({target:"String",proto:!0,forced:e("3fb7b9ac770c40c")("link")},{link:function(e){return r(this,"a","href",e)}})},{bab8a92d9901152a:"gJg5v","252613bc1bb91720":"8K5FK","3fb7b9ac770c40c":"ftpai"}],kO1Zg:[function(e,t,i){var n=e("d3ac4973e86c28f9"),r=e("8bd5ccba40c1dac2");n({target:"String",proto:!0,forced:e("8a5bdd05bf3f9b34")("small")},{small:function(){return r(this,"small","","")}})},{d3ac4973e86c28f9:"gJg5v","8bd5ccba40c1dac2":"8K5FK","8a5bdd05bf3f9b34":"ftpai"}],bgZU7:[function(e,t,i){var n=e("4d6202cdf03d0d61"),r=e("ec6f6be679741e37");n({target:"String",proto:!0,forced:e("1920bc41bac741db")("strike")},{strike:function(){return r(this,"strike","","")}})},{"4d6202cdf03d0d61":"gJg5v",ec6f6be679741e37:"8K5FK","1920bc41bac741db":"ftpai"}],jgQND:[function(e,t,i){var n=e("5ac641dbd7ba3f29"),r=e("ef70fadb3bd40f3e");n({target:"String",proto:!0,forced:e("2b14944b2c33ed44")("sub")},{sub:function(){return r(this,"sub","","")}})},{"5ac641dbd7ba3f29":"gJg5v",ef70fadb3bd40f3e:"8K5FK","2b14944b2c33ed44":"ftpai"}],hB11V:[function(e,t,i){var n=e("783c2c194676a06b"),r=e("bca2bfdd086dcdc1");n({target:"String",proto:!0,forced:e("36843058161d815a")("sup")},{sup:function(){return r(this,"sup","","")}})},{"783c2c194676a06b":"gJg5v",bca2bfdd086dcdc1:"8K5FK","36843058161d815a":"ftpai"}],"31EdS":[function(e,t,i){e("6371023cd6dad94a")("Float32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"6371023cd6dad94a":"8VOru"}],"8VOru":[function(e,t,i){var n=e("c9bb9be26763d5d6"),r=e("f3461bcb45a0da3b"),s=e("513171f829dcf492"),a=e("9195003f05246e2"),o=e("5c32747745583fde"),h=e("f129cadcdd085794"),c=e("14a230ba5c5e071a"),l=e("848002acbadbae2c"),u=e("c540a4ec697b43da"),d=e("8248ffc9c9f95531"),f=e("aa784a976357a5bd"),p=e("da59162d19efb47d"),g=e("30e058c823038e07"),m=e("c43d9ac9910fd1d"),v=e("ac65ec03272627eb"),y=e("9477a245724234e7"),b=e("9d37aa52098c7b96"),x=e("361c9958906a5ff0"),E=e("4f80387d0e9c94a2"),w=e("d414fa9976906f9c"),T=e("97d75eb5fba6dc4c"),S=e("c3126acc51f6b7f5"),A=e("402069064923c62e"),C=e("442bd1b967e53ad0").f,_=e("e60d2aff236b9889"),I=e("5464ebf657a71f52").forEach,O=e("e76408bbdddedcb"),P=e("a6c477e34b27b3ce"),M=e("3b65fa2a837fee2b"),R=e("2db4073983cef2bc"),L=e("76805b4ea64de991"),D=e("7ab72b6c1b29c546"),k=e("1d46546a1b5897a9"),N=D.get,F=D.set,B=D.enforce,U=M.f,V=R.f,G=r.RangeError,j=c.ArrayBuffer,W=j.prototype,Y=c.DataView,H=h.NATIVE_ARRAY_BUFFER_VIEWS,z=h.TYPED_ARRAY_TAG,X=h.TypedArray,K=h.TypedArrayPrototype,q=h.isTypedArray,J="BYTES_PER_ELEMENT",$="Wrong length",Q=function(e,t){P(e,t,{configurable:!0,get:function(){return N(this)[t]}})},Z=function(e){var t;return S(W,e)||"ArrayBuffer"===(t=x(e))||"SharedArrayBuffer"===t},ee=function(e,t){return q(e)&&!w(t)&&t in e&&f(+t)&&t>=0},et=function(e,t){return ee(e,t=y(t))?u(2,e[t]):V(e,t)},ei=function(e,t,i){return ee(e,t=y(t))&&E(i)&&b(i,"value")&&!b(i,"get")&&!b(i,"set")&&!i.configurable&&(!b(i,"writable")||i.writable)&&(!b(i,"enumerable")||i.enumerable)?(e[t]=i.value,e):U(e,t,i)};a?(H||(R.f=et,M.f=ei,Q(K,"buffer"),Q(K,"byteOffset"),Q(K,"byteLength"),Q(K,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:et,defineProperty:ei}),t.exports=function(e,t,i){var a=e.match(/\d+/)[0]/8,h=e+(i?"Clamped":"")+"Array",c="get"+e,u="set"+e,f=r[h],y=f,b=y&&y.prototype,x={},w=function(e,t){var i=N(e);return i.view[c](t*a+i.byteOffset,!0)},S=function(e,t,n){var r=N(e);r.view[u](t*a+r.byteOffset,i?v(n):n,!0)},P=function(e,t){U(e,t,{get:function(){return w(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};H?o&&(y=t(function(e,t,i,n){return l(e,b),k(E(t)?Z(t)?void 0!==n?new f(t,m(i,a),n):void 0!==i?new f(t,m(i,a)):new f(t):q(t)?L(y,t):s(_,y,t):new f(g(t)),e,y)}),A&&A(y,X),I(C(f),function(e){e in y||d(y,e,f[e])}),y.prototype=b):(y=t(function(e,t,i,n){l(e,b);var r,o,h,c=0,u=0;if(E(t)){if(Z(t)){r=t,u=m(i,a);var d=t.byteLength;if(void 0===n){if(d%a||(o=d-u)<0)throw new G($)}else if((o=p(n)*a)+u>d)throw new G($);h=o/a}else if(q(t))return L(y,t);else return s(_,y,t)}else r=new j(o=(h=g(t))*a);for(F(e,{buffer:r,byteOffset:u,byteLength:o,length:h,view:new Y(r)});c255?255:255&t}},{}],"2HI7b":[function(e,t,i){var n=e("2b6f4dcfa87227c8"),r=e("a99e72870b261c00"),s=e("6fedb000997de8c9"),a=e("5d2230babf0781b0"),o=e("224522d7906614b9"),h=e("fa7f27b53f48b0c9"),c=e("244fea79be1425e4"),l=e("c86f6f22440f76d6"),u=e("a9c73ae28faf529e"),d=e("1213d44fe73ec45d").aTypedArrayConstructor,f=e("17f40af3180f13f6");t.exports=function(e){var t,i,p,g,m,v,y,b,x=s(this),E=a(e),w=arguments.length,T=w>1?arguments[1]:void 0,S=void 0!==T,A=c(E);if(A&&!l(A))for(b=(y=h(E,A)).next,E=[];!(v=r(b,y)).done;)E.push(v.value);for(S&&w>2&&(T=n(T,arguments[2])),i=o(E),g=u(p=new(d(x))(i)),t=0;i>t;t++)m=S?T(E[t],t):E[t],p[t]=g?f(m):+m;return p}},{"2b6f4dcfa87227c8":"f1CxE",a99e72870b261c00:"bOssl","6fedb000997de8c9":"euAEP","5d2230babf0781b0":"6oQEu","224522d7906614b9":"kHSes",fa7f27b53f48b0c9:"kBMjp","244fea79be1425e4":"3624P",c86f6f22440f76d6:"88nHe",a9c73ae28faf529e:"7TPqP","1213d44fe73ec45d":"b6692","17f40af3180f13f6":"hYKQy"}],"7TPqP":[function(e,t,i){var n=e("4eaea61d57855c23");t.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},{"4eaea61d57855c23":"cRCRk"}],hYKQy:[function(e,t,i){var n=e("e84ff6c898741836"),r=TypeError;t.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},{e84ff6c898741836:"cCley"}],"5PjpG":[function(e,t,i){e("5afb75924dde7be2")("Float64",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"5afb75924dde7be2":"8VOru"}],fxnuD:[function(e,t,i){e("f65338540449e43b")("Int8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{f65338540449e43b:"8VOru"}],"6jDOT":[function(e,t,i){e("618af5c93cf1cc05")("Int16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"618af5c93cf1cc05":"8VOru"}],gG1e8:[function(e,t,i){e("c7ce36d83e80a30f")("Int32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{c7ce36d83e80a30f:"8VOru"}],"17kvf":[function(e,t,i){e("1fba800ad35b335f")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"1fba800ad35b335f":"8VOru"}],"9B0y9":[function(e,t,i){e("2cd7a1d58fa59b7d")("Uint8",function(e){return function(t,i,n){return e(this,t,i,n)}},!0)},{"2cd7a1d58fa59b7d":"8VOru"}],"3kbwg":[function(e,t,i){e("ca953ee05f39cdaa")("Uint16",function(e){return function(t,i,n){return e(this,t,i,n)}})},{ca953ee05f39cdaa:"8VOru"}],"5wzd5":[function(e,t,i){e("682a05de60a0a1e1")("Uint32",function(e){return function(t,i,n){return e(this,t,i,n)}})},{"682a05de60a0a1e1":"8VOru"}],"1dCBn":[function(e,t,i){var n=e("bad3bf9fd10c3d3e"),r=e("f3046f328b82c495"),s=e("6efc916402e96e15"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",function(e){var t=a(this),i=r(t),n=s(e),o=n>=0?n:i+n;return o<0||o>=i?void 0:t[o]})},{bad3bf9fd10c3d3e:"b6692",f3046f328b82c495:"kHSes","6efc916402e96e15":"gAgUH"}],"2Mqsz":[function(e,t,i){var n=e("9998fdf0f56ef0da"),r=e("3136ffe0165b4705"),s=n(e("45547c073d8e02f")),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",function(e,t){return s(a(this),e,t,arguments.length>2?arguments[2]:void 0)})},{"9998fdf0f56ef0da":"2iJ57","3136ffe0165b4705":"b6692","45547c073d8e02f":"toMXb"}],eZZyP:[function(e,t,i){var n=e("cb5a1a9d977d55c8"),r=e("9bc5b51fcf1b899f").every,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{cb5a1a9d977d55c8:"b6692","9bc5b51fcf1b899f":"daQdc"}],go8ZW:[function(e,t,i){var n=e("24d20a7fba3c1708"),r=e("3a12c8f811e83e62"),s=e("bec3653efa2d8600"),a=e("ff46ad00880fddaa"),o=e("5e0ee530611ef38d"),h=e("800a47a98b497e55"),c=e("faaaddc6a409cf90"),l=n.aTypedArray,u=n.exportTypedArrayMethod,d=h("".slice);u("fill",function(e){var t=arguments.length;return l(this),o(r,this,"Big"===d(a(this),0,3)?s(e):+e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},c(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}))},{"24d20a7fba3c1708":"b6692","3a12c8f811e83e62":"9XPgi",bec3653efa2d8600:"hYKQy",ff46ad00880fddaa:"cRCRk","5e0ee530611ef38d":"bOssl","800a47a98b497e55":"2iJ57",faaaddc6a409cf90:"cXVrS"}],iCErC:[function(e,t,i){var n=e("6846524790b14a7c"),r=e("69eb0f28238e9173").filter,s=e("d404a3c06ca3bb3e"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return s(this,t)})},{"6846524790b14a7c":"b6692","69eb0f28238e9173":"daQdc",d404a3c06ca3bb3e:"1lBSP"}],"1lBSP":[function(e,t,i){var n=e("b597c909ed514557"),r=e("671cb65500632ecc").getTypedArrayConstructor;t.exports=function(e,t){return n(r(e),t)}},{b597c909ed514557:"5QV4b","671cb65500632ecc":"b6692"}],e8hfX:[function(e,t,i){var n=e("2ee42d54019723d0"),r=e("f74f952feb3fa9ac").find,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"2ee42d54019723d0":"b6692",f74f952feb3fa9ac:"daQdc"}],"2kMmr":[function(e,t,i){var n=e("8a1e1a9ff0bdb479"),r=e("faaa2d0f518f9401").findIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"8a1e1a9ff0bdb479":"b6692",faaa2d0f518f9401:"daQdc"}],"212MV":[function(e,t,i){var n=e("1d1b09a81097f4c9"),r=e("e815e97cf844ecb").findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"1d1b09a81097f4c9":"b6692",e815e97cf844ecb:"cyWXz"}],"9AC43":[function(e,t,i){var n=e("de1e827bc87ccb28"),r=e("1d3fb19f3f3cea6a").findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{de1e827bc87ccb28:"b6692","1d3fb19f3f3cea6a":"cyWXz"}],aqoug:[function(e,t,i){var n=e("905afd384f4e3de6"),r=e("d55109422f6a63d3").forEach,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",function(e){r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"905afd384f4e3de6":"b6692",d55109422f6a63d3:"daQdc"}],iuJoY:[function(e,t,i){var n=e("e24f9b87534e32a3");(0,e("9358eeabcbb18f49").exportTypedArrayStaticMethod)("from",e("49819eabcb3ccea1"),n)},{e24f9b87534e32a3:"5UnGw","9358eeabcbb18f49":"b6692","49819eabcb3ccea1":"2HI7b"}],czX8g:[function(e,t,i){var n=e("7cf07194bf630e10"),r=e("6783fff4c8e274ff").includes,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"7cf07194bf630e10":"b6692","6783fff4c8e274ff":"7HT32"}],"9XxKn":[function(e,t,i){var n=e("19c9cea2a3392f92"),r=e("728bfde1b6b9fa8c").indexOf,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"19c9cea2a3392f92":"b6692","728bfde1b6b9fa8c":"7HT32"}],"7aRDd":[function(e,t,i){var n=e("3da36adbfe4f1c5e"),r=e("87513a57210d794"),s=e("ab6b74db00db51f7"),a=e("21e9ae10aded4ff7"),o=e("fe81c4288afbe8ee"),h=e("ddb435c2e5bdfda1")("iterator"),c=n.Uint8Array,l=s(o.values),u=s(o.keys),d=s(o.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=c&&c.prototype,m=!r(function(){g[h].call([1])}),v=!!g&&g.values&&g[h]===g.values&&"values"===g.values.name,y=function(){return l(f(this))};p("entries",function(){return d(f(this))},m),p("keys",function(){return u(f(this))},m),p("values",y,m||!v,{name:"values"}),p(h,y,m||!v,{name:"values"})},{"3da36adbfe4f1c5e":"7Z171","87513a57210d794":"cXVrS",ab6b74db00db51f7:"2iJ57","21e9ae10aded4ff7":"b6692",fe81c4288afbe8ee:"3prNk",ddb435c2e5bdfda1:"5CuF7"}],k5Rlo:[function(e,t,i){var n=e("4a1cb40dad4dd1ac"),r=e("68cfb4a8ab57e7b8"),s=n.aTypedArray,a=n.exportTypedArrayMethod,o=r([].join);a("join",function(e){return o(s(this),e)})},{"4a1cb40dad4dd1ac":"b6692","68cfb4a8ab57e7b8":"2iJ57"}],f3FBF:[function(e,t,i){var n=e("83d52c5c09010d50"),r=e("a5b16a6fc92268b4"),s=e("9b20398976dd53df"),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return r(s,a(this),t>1?[e,arguments[1]]:[e])})},{"83d52c5c09010d50":"b6692",a5b16a6fc92268b4:"2fjXG","9b20398976dd53df":"cfsWk"}],"4ZhIs":[function(e,t,i){var n=e("47e7bb602930e61a"),r=e("8e0cd2bb3fe997bb").map,s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(a(e))(t)})})},{"47e7bb602930e61a":"b6692","8e0cd2bb3fe997bb":"daQdc"}],"9uG4h":[function(e,t,i){var n=e("8205d0df207de27c"),r=e("ff4c68a63e37d828"),s=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",function(){for(var e=0,t=arguments.length,i=new(s(this))(t);t>e;)i[e]=arguments[e++];return i},r)},{"8205d0df207de27c":"b6692",ff4c68a63e37d828:"5UnGw"}],ccgrY:[function(e,t,i){var n=e("44c8794ad6be555f"),r=e("1163c739252ce603").left,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{"44c8794ad6be555f":"b6692","1163c739252ce603":"dEdT1"}],dESGS:[function(e,t,i){var n=e("b70766ffaffbfa51"),r=e("5f58f990e3d5d551").right,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return r(s(this),e,t,t>1?arguments[1]:void 0)})},{b70766ffaffbfa51:"b6692","5f58f990e3d5d551":"dEdT1"}],"7G7OX":[function(e,t,i){var n=e("2692a9613069388b"),r=n.aTypedArray,s=n.exportTypedArrayMethod,a=Math.floor;s("reverse",function(){for(var e,t=r(this).length,i=a(t/2),n=0;n1?arguments[1]:void 0,1),i=h(e);if(m)return r(f,this,i,t);var n=this.length,s=a(i),c=0;if(s+t>n)throw new l("Wrong length");for(;cr;)c[r]=i[r++];return c},r(function(){new Int8Array(1).slice()}))},{d8cf74b619b99d16:"b6692",cde6d683247bdb44:"cXVrS",a6442c63e141a126:"eO8Ta"}],"8qlqb":[function(e,t,i){var n=e("78c3191738d81c4d"),r=e("b1ba67becb59f503").some,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",function(e){return r(s(this),e,arguments.length>1?arguments[1]:void 0)})},{"78c3191738d81c4d":"b6692",b1ba67becb59f503:"daQdc"}],lGQwY:[function(e,t,i){var n=e("1319b11c96d7a212"),r=e("443f315e07e91c29"),s=e("8dc6cee8a97e45cb"),a=e("d6c4034c4939c7d5"),o=e("f3e3e1c809574ce3"),h=e("cab25e21cd947849"),c=e("c53adf7878431ec6"),l=e("90728397db1428a3"),u=e("c20e84b46e983c4f"),d=e("8b919df81d7fcf47"),f=h.aTypedArray,p=h.exportTypedArrayMethod,g=n.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(s(function(){m(new g(2),null)})&&s(function(){m(new g(2),{})})),y=!!m&&!s(function(){if(u)return u<74;if(c)return c<67;if(l)return!0;if(d)return d<602;var e,t,i=new g(516),n=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(m(i,function(e,t){return(e/4|0)-(t/4|0)}),e=0;e<516;e++)if(i[e]!==n[e])return!0});p("sort",function(e){return(void 0!==e&&a(e),y)?m(this,e):o(f(this),function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i})},!y||v)},{"1319b11c96d7a212":"7Z171","443f315e07e91c29":"c4z5p","8dc6cee8a97e45cb":"cXVrS",d6c4034c4939c7d5:"alrlv",f3e3e1c809574ce3:"5Mqp3",cab25e21cd947849:"b6692",c53adf7878431ec6:"inWxb","90728397db1428a3":"5I4FT",c20e84b46e983c4f:"co76c","8b919df81d7fcf47":"1CWLZ"}],"5EgJz":[function(e,t,i){var n=e("d3219a9d813dfae3"),r=e("815a66ab54718368"),s=e("576f4ad682879893"),a=n.aTypedArray,o=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",function(e,t){var i=a(this),n=i.length,h=s(e,n);return new(o(i))(i.buffer,i.byteOffset+h*i.BYTES_PER_ELEMENT,r((void 0===t?n:s(t,n))-h))})},{d3219a9d813dfae3:"b6692","815a66ab54718368":"lQsU7","576f4ad682879893":"47gaI"}],hUSBX:[function(e,t,i){var n=e("d23c9dad2cb3d012"),r=e("961a14c04c94ca8e"),s=e("aa830556bb66a52b"),a=e("1477df799d469d0c"),o=e("6bdde3bff05f534b"),h=n.Int8Array,c=s.aTypedArray,l=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!h&&a(function(){u.call(new h(1))});l("toLocaleString",function(){return r(u,d?o(c(this)):c(this),o(arguments))},a(function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()})||!a(function(){h.prototype.toLocaleString.call([1,2])}))},{d23c9dad2cb3d012:"7Z171","961a14c04c94ca8e":"2fjXG",aa830556bb66a52b:"b6692","1477df799d469d0c":"cXVrS","6bdde3bff05f534b":"eO8Ta"}],bN7du:[function(e,t,i){var n=e("aee14a288ff10704"),r=e("77f370038a7e7dac"),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",function(){return n(s(this),o(this))})},{aee14a288ff10704:"2dsKr","77f370038a7e7dac":"b6692"}],accWj:[function(e,t,i){var n=e("7a241707bf041790"),r=e("ab9301a002e94347"),s=e("e1b15c081f5438dc"),a=e("50268bbb02cbbbc4"),o=n.aTypedArray,h=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=r(n.TypedArrayPrototype.sort);c("toSorted",function(e){void 0!==e&&s(e);var t=o(this);return l(a(h(t),t),e)})},{"7a241707bf041790":"b6692",ab9301a002e94347:"2iJ57",e1b15c081f5438dc:"alrlv","50268bbb02cbbbc4":"5QV4b"}],"8zMXu":[function(e,t,i){var n=e("ba1ad98ce5955ae6").exportTypedArrayMethod,r=e("7fb7589d87925c0e"),s=e("9ae1b5b748ef0512"),a=e("9d0cad3ff385c8e1"),o=s.Uint8Array,h=o&&o.prototype||{},c=[].toString,l=a([].join);r(function(){c.call({})})&&(c=function(){return l(this)});var u=h.toString!==c;n("toString",c,u)},{ba1ad98ce5955ae6:"b6692","7fb7589d87925c0e":"cXVrS","9ae1b5b748ef0512":"7Z171","9d0cad3ff385c8e1":"2iJ57"}],bwjPE:[function(e,t,i){var n=e("5428fa832663517b"),r=e("472f91950b838d4c"),s=e("cd9beaafe2ae7a70"),a=e("b4b145cf5a7fc46d"),o=e("3cca7f61fa3b5db7"),h=r.aTypedArray,c=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("with",{with:function(e,t){var i=h(this),r=a(e),l=s(i)?o(t):+t;return n(i,c(i),r,l)}}.with,!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}())},{"5428fa832663517b":"ebcI0","472f91950b838d4c":"b6692",cd9beaafe2ae7a70:"7TPqP",b4b145cf5a7fc46d:"gAgUH","3cca7f61fa3b5db7":"hYKQy"}],"4AZtq":[function(e,t,i){var n=e("b25f2dc62f86f185"),r=e("f98894072ee354c2"),s=e("e8f3df77e99ec93e"),a=String.fromCharCode,o=r("".charAt),h=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,u=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(e){for(var t,i,n=s(e),r="",d=n.length,f=0;f>(-2*S&6)));return h}})},{f57c57075be2f036:"gJg5v","1beb501bad2a77ab":"7Z171","54160fb760cf47b6":"e5ie6",b8fdd5e59791f323:"2iJ57","2b6100c225ada6":"bOssl",fb00c1d39c9bf14c:"cXVrS","93407030a6bacce1":"4x6uB","48ccfe93995f906":"h3DcZ",bed47900de2f9889:"jseHN"}],jseHN:[function(e,t,i){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n+"+/",s=n+"-_",a=function(e){for(var t={},i=0;i<64;i++)t[e.charAt(i)]=i;return t};t.exports={i2c:r,c2i:a(r),i2cUrl:s,c2iUrl:a(s)}},{}],jwPXF:[function(e,t,i){var n=e("ff535db334027cb3"),r=e("d2af88b3a42b7d50"),s=e("a166328697ff9969"),a=e("ccb7079059953540"),o=e("5424850d1e2e873d"),h=e("61b2b23f28dc6ce7"),c=e("48ec8439e6a9901c"),l=e("96982b02e51db61c"),u=e("e084452184a62fe5").i2c,d=s("btoa"),f=a("".charAt),p=a("".charCodeAt),g=!!d&&!h(function(){return"aGk="!==d("hi")}),m=g&&!h(function(){d()}),v=g&&h(function(){return"bnVsbA=="!==d(null)}),y=g&&1!==d.length;n({global:!0,bind:!0,enumerable:!0,forced:!g||m||v||y},{btoa:function(e){if(l(arguments.length,1),g)return o(d,r,c(e));for(var t,i,n=c(e),a="",h=0,m=u;f(n,h)||(m="=",h%1);){if((i=p(n,h+=3/4))>255)throw new(s("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a+=f(m,63&(t=t<<8|i)>>8-h%1*8)}return a}})},{ff535db334027cb3:"gJg5v",d2af88b3a42b7d50:"7Z171",a166328697ff9969:"e5ie6",ccb7079059953540:"2iJ57","5424850d1e2e873d":"bOssl","61b2b23f28dc6ce7":"cXVrS","48ec8439e6a9901c":"4x6uB","96982b02e51db61c":"h3DcZ",e084452184a62fe5:"jseHN"}],khTY5:[function(e,t,i){var n=e("f2983879ab6ef4f"),r=e("74a037ab8118876"),s=e("a3359ffcd052df79"),a=e("9e6862fbf1bc54d2"),o=e("833a1c6e8a10b1ff"),h=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in r)r[c]&&h(n[c]&&n[c].prototype);h(s)},{f2983879ab6ef4f:"7Z171","74a037ab8118876":"1xZhu",a3359ffcd052df79:"fVoiV","9e6862fbf1bc54d2":"4w3Nn","833a1c6e8a10b1ff":"gKM90"}],"1xZhu":[function(e,t,i){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],fVoiV:[function(e,t,i){var n=e("a6fc44eba1875331")("span").classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r},{a6fc44eba1875331:"SppDD"}],a2DYE:[function(e,t,i){var n=e("c051336c9ece485c"),r=e("b1dd6223fec045b2"),s=e("2927608065790e8a"),a=e("107ef5eaf95c92b0"),o=e("2f02b421bbdb9eb4"),h=e("46e3db6eb678f758"),c=e("6a4d2091548e6557")("iterator"),l=a.values,u=function(e,t){if(e){if(e[c]!==l)try{o(e,c,l)}catch(t){e[c]=l}if(h(e,t,!0),r[t]){for(var i in a)if(e[i]!==a[i])try{o(e,i,a[i])}catch(t){e[i]=a[i]}}}};for(var d in r)u(n[d]&&n[d].prototype,d);u(s,"DOMTokenList")},{c051336c9ece485c:"7Z171",b1dd6223fec045b2:"1xZhu","2927608065790e8a":"fVoiV","107ef5eaf95c92b0":"3prNk","2f02b421bbdb9eb4":"gKM90","46e3db6eb678f758":"dkhk9","6a4d2091548e6557":"5CuF7"}],"6bhjG":[function(e,t,i){var n=e("3d0510e49183901c"),r=e("63b7b93fc4a7238a"),s=e("1c5b62f756d3eaff"),a=e("eb1c50ea6315321b"),o=e("4ca71918e5a2016a"),h=e("c21d001acfae7cd"),c=e("75fac16725379a32").f,l=e("b34fbc760b0520d4"),u=e("ed9170165790e778"),d=e("f6f97990397d9c00"),f=e("9b1e92218f8d993"),p=e("fdfe3ed8e9adb72c"),g=e("9c0ec21dd5e9a70b"),m=e("5a4b6c79c088bdfe"),v=e("b32d1eeacf68845c"),y=e("8ef37a97ffa6fa2e"),b=e("fc770dee153f9182"),x=e("617636ad1c3548bd"),E=e("391d43a74d1595a0"),w="DOMException",T="DATA_CLONE_ERR",S=r("Error"),A=r(w)||function(){try{new(r("MessageChannel")||s("worker_threads").MessageChannel)().port1.postMessage(new WeakMap)}catch(e){if(e.name===T&&25===e.code)return e.constructor}}(),C=A&&A.prototype,_=S.prototype,I=b.set,O=b.getterFor(w),P="stack"in new S(w),M=function(e){return d(v,e)&&v[e].m?v[e].c:0},R=function(){f(this,L);var e=arguments.length,t=m(e<1?void 0:arguments[0]),i=m(e<2?void 0:arguments[1],"Error"),n=M(i);if(I(this,{type:w,name:i,message:t,code:n}),x||(this.name=i,this.message=t,this.code=n),P){var r=new S(t);r.name=w,c(this,"stack",h(1,y(r.stack,1)))}},L=R.prototype=o(_),D=function(e){return{enumerable:!0,configurable:!0,get:e}},k=function(e){return D(function(){return O(this)[e]})};x&&(u(L,"code",k("code")),u(L,"message",k("message")),u(L,"name",k("name"))),c(L,"constructor",h(1,R));var N=a(function(){return!(new A instanceof S)}),F=N||a(function(){return _.toString!==g||"2: 1"!==String(new A(1,2))}),B=N||a(function(){return 25!==new A(1,"DataCloneError").code}),U=N||25!==A[T]||25!==C[T],V=E?F||B||U:N;n({global:!0,constructor:!0,forced:V},{DOMException:V?R:A});var G=r(w),j=G.prototype;for(var W in F&&(E||A===G)&&l(j,"toString",g),B&&x&&A===G&&u(j,"code",D(function(){return M(p(this).name)})),v)if(d(v,W)){var Y=v[W],H=Y.s,z=h(6,Y.c);d(G,H)||c(G,H,z),d(j,H)||c(j,H,z)}},{"3d0510e49183901c":"gJg5v","63b7b93fc4a7238a":"e5ie6","1c5b62f756d3eaff":"fjtLr",eb1c50ea6315321b:"cXVrS","4ca71918e5a2016a":"7isQ3",c21d001acfae7cd:"5toj2","75fac16725379a32":"hvqCQ",b34fbc760b0520d4:"4CPdc",ed9170165790e778:"3NI4M",f6f97990397d9c00:"9JWVX","9b1e92218f8d993":"95yA1",fdfe3ed8e9adb72c:"dPzbI","9c0ec21dd5e9a70b":"9hDDf","5a4b6c79c088bdfe":"dwhvK",b32d1eeacf68845c:"I3hyF","8ef37a97ffa6fa2e":"7dart",fc770dee153f9182:"ixHS2","617636ad1c3548bd":"6mXK1","391d43a74d1595a0":"jHRGA"}],I3hyF:[function(e,t,i){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},{}],fJnNi:[function(e,t,i){var n=e("5538d4aa2e26797c"),r=e("15f622cde07e3e8f"),s=e("6dca64203ef6b4d1"),a=e("30cb5b59df4e77c6"),o=e("64c91a24ef31e303").f,h=e("a56ea2d80c8496ae"),c=e("e54ce0361d637752"),l=e("5e15de01309c5057"),u=e("fccd891af3c8103d"),d=e("2db1f0a6b3bd6dfd"),f=e("176edbe2885d9f01"),p=e("3f4d27281e93627e"),g=e("95f892709744ad29"),m="DOMException",v=s("Error"),y=s(m),b=function(){c(this,x);var e=arguments.length,t=u(e<1?void 0:arguments[0]),i=u(e<2?void 0:arguments[1],"Error"),n=new y(t,i),r=new v(t);return r.name=m,o(n,"stack",a(1,f(r.stack,1))),l(n,this,b),n},x=b.prototype=y.prototype,E="stack"in new v(m),w="stack"in new y(1,2),T=y&&p&&Object.getOwnPropertyDescriptor(r,m),S=!!T&&!(T.writable&&T.configurable),A=E&&!S&&!w;n({global:!0,constructor:!0,forced:g||A},{DOMException:A?b:y});var C=s(m),_=C.prototype;if(_.constructor!==C){for(var I in g||o(_,"constructor",a(1,C)),d)if(h(d,I)){var O=d[I],P=O.s;h(C,P)||o(C,P,a(6,O.c))}}},{"5538d4aa2e26797c":"gJg5v","15f622cde07e3e8f":"7Z171","6dca64203ef6b4d1":"e5ie6","30cb5b59df4e77c6":"5toj2","64c91a24ef31e303":"hvqCQ",a56ea2d80c8496ae:"9JWVX",e54ce0361d637752:"95yA1","5e15de01309c5057":"30not",fccd891af3c8103d:"dwhvK","2db1f0a6b3bd6dfd":"I3hyF","176edbe2885d9f01":"7dart","3f4d27281e93627e":"6mXK1","95f892709744ad29":"jHRGA"}],"4teOf":[function(e,t,i){var n=e("db380432183a20e4"),r=e("9f1a1fb33df853f"),s="DOMException";r(n(s),s)},{db380432183a20e4:"e5ie6","9f1a1fb33df853f":"dkhk9"}],lCP8o:[function(e,t,i){e("52e9b3eefbbce1ed"),e("292fa64716f5b39e")},{"52e9b3eefbbce1ed":"idFPB","292fa64716f5b39e":"1nu2V"}],idFPB:[function(e,t,i){var n=e("79389288a80b279c"),r=e("e4d64249a0133d14"),s=e("84ba5ca62b8b14c9").clear;n({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==s},{clearImmediate:s})},{"79389288a80b279c":"gJg5v",e4d64249a0133d14:"7Z171","84ba5ca62b8b14c9":"iEUCI"}],"1nu2V":[function(e,t,i){var n=e("33581c362196ed1f"),r=e("503bb555249cad41"),s=e("4219ce460223bd08").set,a=e("738dc378e6a94c64"),o=r.setImmediate?a(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==o},{setImmediate:o})},{"33581c362196ed1f":"gJg5v","503bb555249cad41":"7Z171","4219ce460223bd08":"iEUCI","738dc378e6a94c64":"LAeE1"}],LAeE1:[function(e,t,i){var n,r=e("aa6765693e58a0fe"),s=e("a68ecfcbf29c46f6"),a=e("7087588d33667af2"),o=e("864edee099e8affb"),h=e("3a3a5a2cfab86f21"),c=e("cff2c830bdea4f24"),l=e("58a74f00cee1ac64"),u=r.Function,d=/MSIE .\./.test(h)||"BUN"===o&&((n=r.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(e,t){var i=t?2:1;return d?function(n,r){var o=l(arguments.length,1)>i,h=a(n)?n:u(n),d=o?c(arguments,i):[],f=o?function(){s(h,this,d)}:h;return t?e(f,r):e(f)}:e}},{aa6765693e58a0fe:"7Z171",a68ecfcbf29c46f6:"2fjXG","7087588d33667af2":"h1Wnr","864edee099e8affb":"ah0ZS","3a3a5a2cfab86f21":"5hj4U",cff2c830bdea4f24:"eO8Ta","58a74f00cee1ac64":"h3DcZ"}],"1mZsz":[function(e,t,i){var n=e("6f7278673cd963e5"),r=e("4f851b5e5b332d48"),s=e("b80db4539abf09d9"),a=e("889c274f5e23b39"),o=e("15983ab5c2fbc059"),h=e("c36112b7edfed618"),c=e("74b26aee0ae17038");n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:h(function(){return c&&1!==Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length})},{queueMicrotask:function(e){o(arguments.length,1),s(a(e))}})},{"6f7278673cd963e5":"gJg5v","4f851b5e5b332d48":"7Z171",b80db4539abf09d9:"fhIs0","889c274f5e23b39":"alrlv","15983ab5c2fbc059":"h3DcZ",c36112b7edfed618:"cXVrS","74b26aee0ae17038":"6mXK1"}],f5KUv:[function(e,t,i){var n=e("9a97a510092b7d72"),r=e("bfbbd7ba4e233a15"),s=e("dadc1a7ad6bec203"),a=e("8d7f4453ff13e12d"),o=TypeError,h=Object.defineProperty,c=r.self!==r;try{if(a){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||s(r,"self",{get:function(){return r},set:function(e){if(this!==r)throw new o("Illegal invocation");h(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:r})}catch(e){}},{"9a97a510092b7d72":"gJg5v",bfbbd7ba4e233a15:"7Z171",dadc1a7ad6bec203:"3NI4M","8d7f4453ff13e12d":"6mXK1"}],kONpx:[function(e,t,i){var n=e("46a94df747165a08"),r=e("3e04e2f4e7f87918"),s=e("6e1ac61205678af6"),a=e("c95079dcb9321b5f"),o=e("b30c4be405e55cd1"),h=e("d2759cd31961ec5f"),c=e("b28324366ed35694"),l=e("51b2af7ff9e786d2"),u=e("dbc30081dcfdeb22"),d=e("88e551d63448111"),f=e("748c1e7b84b5d0b6"),p=e("9b6dd1d113f04b93"),g=e("5236c862010bd4cc"),m=e("47c7a4ba5ff3ba9"),v=e("ea5539f8b43d1a17"),y=e("64004e8c5f5d0ef3"),b=e("9971f98ded0a259"),x=e("66bbcc11f1e948a"),E=e("a9cdcd120539bbe8"),w=e("be347fa71d60a5eb"),T=e("4868328f7e546c6"),S=e("1e6645abd1a2b421"),A=e("d0363fc9d9cfdd8c"),C=e("3275f5da850ac759"),_=e("3feae2e57ec01a12"),I=e("9575a353cf8e050f"),O=e("a675c54ae6442127"),P=s.Object,M=s.Array,R=s.Date,L=s.Error,D=s.TypeError,k=s.PerformanceMark,N=a("DOMException"),F=S.Map,B=S.has,U=S.get,V=S.set,G=A.Set,j=A.add,W=A.has,Y=a("Object","keys"),H=o([].push),z=o((!0).valueOf),X=o(1..valueOf),K=o("".valueOf),q=o(R.prototype.getTime),J=c("structuredClone"),$="DataCloneError",Q="Transferring",Z=function(e){return!h(function(){var t=new s.Set([7]),i=e(t),n=e(P(7));return i===t||!i.has(7)||!f(n)||7!=+n})&&e},ee=function(e,t){return!h(function(){var i=new t,n=e({a:i,b:i});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===i.stack)})},et=s.structuredClone,ei=n||!ee(et,L)||!ee(et,N)||!!h(function(){var e=et(new s.AggregateError([1],J,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==J||3!==e.cause}),en=!et&&Z(function(e){return new k(J,{detail:e}).detail}),er=Z(et)||en,es=function(e){throw new N("Uncloneable type: "+e,$)},ea=function(e,t){throw new N((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",$)},eo=function(e,t){return er||ea(t),er(e)},eh=function(){var e;try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null},ec=function(e,t,i){if(B(t,e))return U(t,e);if("SharedArrayBuffer"===(i||v(e)))n=er?er(e):e;else{var n,r,a,o,h,c,u=s.DataView;u||l(e.slice)||ea("ArrayBuffer");try{if(l(e.slice)&&!e.resizable)n=e.slice(0);else for(c=0,r=e.byteLength,a=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(r,a),o=new u(e),h=new u(n);c1&&!d(arguments[1])?m(arguments[1]):void 0,r=n?n.transfer:void 0;void 0!==r&&(i=ed(r,t=new F));var s=eu(e,t);return i&&ef(i),s}})},{"46a94df747165a08":"jHRGA","3e04e2f4e7f87918":"gJg5v","6e1ac61205678af6":"7Z171",c95079dcb9321b5f:"e5ie6",b30c4be405e55cd1:"2iJ57",d2759cd31961ec5f:"cXVrS",b28324366ed35694:"55cC0","51b2af7ff9e786d2":"h1Wnr",dbc30081dcfdeb22:"eytEI","88e551d63448111":"8AxCV","748c1e7b84b5d0b6":"8mxCV","9b6dd1d113f04b93":"2ZU2p","5236c862010bd4cc":"dCEHX","47c7a4ba5ff3ba9":"dPzbI",ea5539f8b43d1a17:"cRCRk","64004e8c5f5d0ef3":"9JWVX","9971f98ded0a259":"SVTZV","66bbcc11f1e948a":"gKM90",a9cdcd120539bbe8:"kHSes",be347fa71d60a5eb:"h3DcZ","4868328f7e546c6":"iG8db","1e6645abd1a2b421":"fY40v",d0363fc9d9cfdd8c:"aKtSD","3275f5da850ac759":"dSeD9","3feae2e57ec01a12":"edpRG","9575a353cf8e050f":"3Scc5",a675c54ae6442127:"2emOi"}],h5L1l:[function(e,t,i){e("9453fdd92aad151a"),e("c303d63f9a1c5be5")},{"9453fdd92aad151a":"98PJR",c303d63f9a1c5be5:"ydvxy"}],"98PJR":[function(e,t,i){var n=e("a9d1c09227b9596"),r=e("8f238f56192273e4"),s=e("87cb4ec54c39341e")(r.setInterval,!0);n({global:!0,bind:!0,forced:r.setInterval!==s},{setInterval:s})},{a9d1c09227b9596:"gJg5v","8f238f56192273e4":"7Z171","87cb4ec54c39341e":"LAeE1"}],ydvxy:[function(e,t,i){var n=e("6060be99991be48a"),r=e("f9d851aba3178e79"),s=e("ae4294be5adb39a1")(r.setTimeout,!0);n({global:!0,bind:!0,forced:r.setTimeout!==s},{setTimeout:s})},{"6060be99991be48a":"gJg5v",f9d851aba3178e79:"7Z171",ae4294be5adb39a1:"LAeE1"}],"4J9Kt":[function(e,t,i){e("99544a7edcd747a5")},{"99544a7edcd747a5":"7XU3f"}],"7XU3f":[function(e,t,i){e("19928ff2abfc3536");var n,r=e("d446e2097c7c2b23"),s=e("cd0458003d61a323"),a=e("592c96d240ad401c"),o=e("2e7550752ce99b71"),h=e("c128b8cb3e38a436"),c=e("9ee66bece60e18c5"),l=e("763c39a8b521ff54"),u=e("1c9277bbea264bc7"),d=e("f0dd676601f7cb0b"),f=e("deee7b2fe3c1e96f"),p=e("ff3437c5b86d6c26"),g=e("3c2f033d1a197fd6"),m=e("9fdfccae2d327739"),v=e("8ba5b2695179827").codeAt,y=e("23751b8f28dcd37"),b=e("5f808b1954b24403"),x=e("f969f30083a50975"),E=e("b15c5243fe0e0f6"),w=e("e8b262dfe3e4c989"),T=e("9a3ca045fbb43248"),S=T.set,A=T.getterFor("URL"),C=w.URLSearchParams,_=w.getState,I=o.URL,O=o.TypeError,P=o.parseInt,M=Math.floor,R=Math.pow,L=c("".charAt),D=c(/./.exec),k=c([].join),N=c(1..toString),F=c([].pop),B=c([].push),U=c("".replace),V=c([].shift),G=c("".split),j=c("".slice),W=c("".toLowerCase),Y=c([].unshift),H="Invalid scheme",z="Invalid host",X="Invalid port",K=/[a-z]/i,q=/[\d+-.a-z]/i,J=/\d/,$=/^0x/i,Q=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ei=/[\0\t\n\r #/:<>?@[\\\]^|]/,en=/^[\u0000-\u0020]+/,er=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,es=/[\t\n\r]/g,ea=function(e){var t,i,n,r,s,a,o,h=G(e,".");if(h.length&&""===h[h.length-1]&&h.length--,(t=h.length)>4)return e;for(n=0,i=[];n1&&"0"===L(r,0)&&(s=D($,r)?16:8,r=j(r,8===s?1:2)),""===r)a=0;else{if(!D(10===s?Z:8===s?Q:ee,r))return e;a=P(r,s)}B(i,a)}for(n=0;n=R(256,5-t))return null}else if(a>255)return null;for(n=0,o=F(i);n6))return;for(n=0;d();){if(r=null,n>0){if("."!==d()||!(n<4))return;u++}if(!D(J,d()))return;for(;D(J,d());){if(s=P(d(),10),null===r)r=s;else{if(0===r)return;r=10*r+s}if(r>255)return;u++}h[c]=256*h[c]+r,(2==++n||4===n)&&c++}if(4!==n)return;break}if(":"===d()){if(u++,!d())return}else if(d())return;h[c++]=t}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)o=h[c],h[c--]=h[l+a-1],h[l+--a]=o;else if(8!==c)return;return h},eh=function(e){for(var t=null,i=1,n=null,r=0,s=0;s<8;s++)0!==e[s]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=s),++r);return r>i?n:t},ec=function(e){var t,i,n,r;if("number"==typeof e){for(i=0,t=[];i<4;i++)Y(t,e%256),e=M(e/256);return k(t,".")}if("object"==typeof e){for(i=0,t="",n=eh(e);i<8;i++)(!r||0!==e[i])&&(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=N(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},el={},eu=p({},el,{" ":1,'"':1,"<":1,">":1,"`":1}),ed=p({},eu,{"#":1,"?":1,"{":1,"}":1}),ef=p({},ed,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ep=function(e,t){var i=v(e,0);return i>32&&i<127&&!f(t,e)?e:encodeURIComponent(e)},eg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},em=function(e,t){var i;return 2===e.length&&D(K,L(e,0))&&(":"===(i=L(e,1))||!t&&"|"===i)},ev=function(e){var t;return e.length>1&&em(j(e,0,2))&&(2===e.length||"/"===(t=L(e,2))||"\\"===t||"?"===t||"#"===t)},ey={},eb={},ex={},eE={},ew={},eT={},eS={},eA={},eC={},e_={},eI={},eO={},eP={},eM={},eR={},eL={},eD={},ek={},eN={},eF={},eB={},eU=function(e,t,i){var n,r,s,a=b(e);if(t){if(r=this.parse(a))throw new O(r);this.searchParams=null}else{if(void 0!==i&&(n=new eU(i,!0)),r=this.parse(a,null,n))throw new O(r);(s=_(new C)).bindURL(this),this.searchParams=s}};eU.prototype={type:"URL",parse:function(e,t,i){var r=t||ey,s=0,a="",o=!1,h=!1,c=!1;for(e=b(e),t||(this.scheme="",this.username="",this.password="",this.host=null,this.port=null,this.path=[],this.query=null,this.fragment=null,this.cannotBeABaseURL=!1,e=U(e,en,""),e=U(e,er,"$1")),l=g(e=U(e,es,""));s<=l.length;){switch(u=l[s],r){case ey:if(u&&D(K,u))a+=W(u),r=eb;else{if(t)return H;r=ex;continue}break;case eb:if(u&&(D(q,u)||"+"===u||"-"===u||"."===u))a+=W(u);else if(":"===u){if(t&&(this.isSpecial()!==f(eg,a)||"file"===a&&(this.includesCredentials()||null!==this.port)||"file"===this.scheme&&!this.host))return;if(this.scheme=a,t){this.isSpecial()&&eg[this.scheme]===this.port&&(this.port=null);return}a="","file"===this.scheme?r=eM:this.isSpecial()&&i&&i.scheme===this.scheme?r=eE:this.isSpecial()?r=eA:"/"===l[s+1]?(r=ew,s++):(this.cannotBeABaseURL=!0,B(this.path,""),r=eN)}else{if(t)return H;a="",r=ex,s=0;continue}break;case ex:if(!i||i.cannotBeABaseURL&&"#"!==u)return H;if(i.cannotBeABaseURL&&"#"===u){this.scheme=i.scheme,this.path=m(i.path),this.query=i.query,this.fragment="",this.cannotBeABaseURL=!0,r=eB;break}r="file"===i.scheme?eM:eT;continue;case eE:if("/"===u&&"/"===l[s+1])r=eC,s++;else{r=eT;continue}break;case ew:if("/"===u){r=e_;break}r=ek;continue;case eT:if(this.scheme=i.scheme,u===n)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query;else if("/"===u||"\\"===u&&this.isSpecial())r=eS;else if("?"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query="",r=eF;else if("#"===u)this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,this.path=m(i.path),this.path.length--,r=ek;continue}break;case eS:if(this.isSpecial()&&("/"===u||"\\"===u))r=eC;else if("/"===u)r=e_;else{this.username=i.username,this.password=i.password,this.host=i.host,this.port=i.port,r=ek;continue}break;case eA:if(r=eC,"/"!==u||"/"!==L(a,s+1))continue;s++;break;case eC:if("/"!==u&&"\\"!==u){r=e_;continue}break;case e_:if("@"===u){o&&(a="%40"+a),o=!0,d=g(a);for(var l,u,d,p,v,y,x=0;x65535)return X;this.port=this.isSpecial()&&T===eg[this.scheme]?null:T,a=""}if(t)return;r=eD;continue}break;case eM:if(this.scheme="file","/"===u||"\\"===u)r=eR;else if(i&&"file"===i.scheme)switch(u){case n:this.host=i.host,this.path=m(i.path),this.query=i.query;break;case"?":this.host=i.host,this.path=m(i.path),this.query="",r=eF;break;case"#":this.host=i.host,this.path=m(i.path),this.query=i.query,this.fragment="",r=eB;break;default:ev(k(m(l,s),""))||(this.host=i.host,this.path=m(i.path),this.shortenPath()),r=ek;continue}else{r=ek;continue}break;case eR:if("/"===u||"\\"===u){r=eL;break}i&&"file"===i.scheme&&!ev(k(m(l,s),""))&&(em(i.path[0],!0)?B(this.path,i.path[0]):this.host=i.host),r=ek;continue;case eL:if(u===n||"/"===u||"\\"===u||"?"===u||"#"===u){if(!t&&em(a))r=ek;else if(""===a){if(this.host="",t)return;r=eD}else{if(p=this.parseHost(a))return p;if("localhost"===this.host&&(this.host=""),t)return;a="",r=eD}continue}a+=u;break;case eD:if(this.isSpecial()){if(r=ek,"/"!==u&&"\\"!==u)continue}else if(t||"?"!==u){if(t||"#"!==u){if(u!==n&&(r=ek,"/"!==u))continue}else this.fragment="",r=eB}else this.query="",r=eF;break;case ek:if(u===n||"/"===u||"\\"===u&&this.isSpecial()||!t&&("?"===u||"#"===u)){if(".."===(v=W(v=a))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(this.shortenPath(),"/"===u||"\\"===u&&this.isSpecial()||B(this.path,"")):"."===(y=a)||"%2e"===W(y)?"/"===u||"\\"===u&&this.isSpecial()||B(this.path,""):("file"===this.scheme&&!this.path.length&&em(a)&&(this.host&&(this.host=""),a=L(a,0)+":"),B(this.path,a)),a="","file"===this.scheme&&(u===n||"?"===u||"#"===u))for(;this.path.length>1&&""===this.path[0];)V(this.path);"?"===u?(this.query="",r=eF):"#"===u&&(this.fragment="",r=eB)}else a+=ep(u,ed);break;case eN:"?"===u?(this.query="",r=eF):"#"===u?(this.fragment="",r=eB):u!==n&&(this.path[0]+=ep(u,el));break;case eF:t||"#"!==u?u!==n&&("'"===u&&this.isSpecial()?this.query+="%27":"#"===u?this.query+="%23":this.query+=ep(u,el)):(this.fragment="",r=eB);break;case eB:u!==n&&(this.fragment+=ep(u,eu))}s++}},parseHost:function(e){var t,i,n;if("["===L(e,0)){if("]"!==L(e,e.length-1)||!(t=eo(j(e,1,-1))))return z;this.host=t}else if(this.isSpecial()){if(D(et,e=y(e))||null===(t=ea(e)))return z;this.host=t}else{if(D(ei,e))return z;for(n=0,t="",i=g(e);n1?arguments[1]:void 0,n=S(t,new eU(e,!1,i));s||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},eG=eV.prototype,ej=function(e,t){return{get:function(){return A(this)[e]()},set:t&&function(e){return A(this)[t](e)},configurable:!0,enumerable:!0}};if(s&&(u(eG,"href",ej("serialize","setHref")),u(eG,"origin",ej("getOrigin")),u(eG,"protocol",ej("getProtocol","setProtocol")),u(eG,"username",ej("getUsername","setUsername")),u(eG,"password",ej("getPassword","setPassword")),u(eG,"host",ej("getHost","setHost")),u(eG,"hostname",ej("getHostname","setHostname")),u(eG,"port",ej("getPort","setPort")),u(eG,"pathname",ej("getPathname","setPathname")),u(eG,"search",ej("getSearch","setSearch")),u(eG,"searchParams",ej("getSearchParams")),u(eG,"hash",ej("getHash","setHash"))),l(eG,"toJSON",function(){return A(this).serialize()},{enumerable:!0}),l(eG,"toString",function(){return A(this).serialize()},{enumerable:!0}),I){var eW=I.createObjectURL,eY=I.revokeObjectURL;eW&&l(eV,"createObjectURL",h(eW,I)),eY&&l(eV,"revokeObjectURL",h(eY,I))}x(eV,"URL"),r({global:!0,constructor:!0,forced:!a,sham:!s},{URL:eV})},{"19928ff2abfc3536":"i2qFG",d446e2097c7c2b23:"gJg5v",cd0458003d61a323:"6mXK1","592c96d240ad401c":"azO8L","2e7550752ce99b71":"7Z171",c128b8cb3e38a436:"f1CxE","9ee66bece60e18c5":"2iJ57","763c39a8b521ff54":"4CPdc","1c9277bbea264bc7":"3NI4M",f0dd676601f7cb0b:"95yA1",deee7b2fe3c1e96f:"9JWVX",ff3437c5b86d6c26:"cKgWo","3c2f033d1a197fd6":"lrrJd","9fdfccae2d327739":"eO8Ta","8ba5b2695179827":"fVu0j","23751b8f28dcd37":"lUDfY","5f808b1954b24403":"4x6uB",f969f30083a50975:"dkhk9",b15c5243fe0e0f6:"h3DcZ",e8b262dfe3e4c989:"dIaqI","9a3ca045fbb43248":"ixHS2"}],azO8L:[function(e,t,i){var n=e("b638e4b55492b349"),r=e("d3a18943af316a4c"),s=e("f39eaf2672eb61e1"),a=e("f816319c57ebd10b"),o=r("iterator");t.exports=!n(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(e,i){t.delete("b"),n+=i+e}),i.delete("a",2),i.delete("b",void 0),a&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(a||!s)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},{b638e4b55492b349:"cXVrS",d3a18943af316a4c:"5CuF7",f39eaf2672eb61e1:"6mXK1",f816319c57ebd10b:"jHRGA"}],lUDfY:[function(e,t,i){var n=e("5fc1d380e4ee310c"),r=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=RangeError,h=n(s.exec),c=Math.floor,l=String.fromCharCode,u=n("".charCodeAt),d=n([].join),f=n([].push),p=n("".replace),g=n("".split),m=n("".toLowerCase),v=function(e){for(var t=[],i=0,n=e.length;i=55296&&r<=56319&&i>1,e+=c(e/t);e>455;)e=c(e/35),n+=36;return c(n+36*e/(e+38))},x=function(e){var t,i,n=[],r=(e=v(e)).length,s=128,h=0,u=72;for(t=0;t=s&&ic((2147483647-h)/x))throw new o(a);for(h+=(m-s)*x,s=m,t=0;t2147483647)throw new o(a);if(i===s){for(var E=h,w=36;;){var T=w<=u?1:w>=u+26?26:w-u;if(E0&&(e&i)!=0;i>>=1)t++;return t},eh=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ec=function(e){for(var t=(e=Q(e,er," ")).length,i="",n=0;nt){i+="%",n++;continue}var s=ea(e,n+1);if(s!=s){i+=r,n++;continue}n+=2;var a=eo(s);if(0===a)r=z(s);else{if(1===a||a>4){i+="�",n++;continue}for(var o=[s],h=1;ht)&&"%"===q(e,n);){var c=ea(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;$(o,c),n+=2,h++}if(o.length!==a){i+="�";continue}var l=eh(o);null===l?i+="�":r=X(l)}}i+=r,n++}return i},el=/[!'()~]|%20/g,eu={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ed=function(e){return eu[e]},ef=function(e){return Q(H(e),el,ed)},ep=g(function(e,t){N(this,{type:k,target:F(e).entries,index:0,kind:t})},D,function(){var e=B(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,O(void 0,!0);var n=t[i];switch(e.kind){case"keys":return O(n.key,!1);case"values":return O(n.value,!1)}return O([n.key,n.value],!1)},!0),eg=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===q(e,0)?ei(e,1):e:S(e)))};eg.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,n,r,s,a,h,c=this.entries,l=I(e);if(l)for(i=(t=_(e,l)).next;!(n=o(i,t)).done;){if((a=o(s=(r=_(w(n.value))).next,r)).done||(h=o(s,r)).done||!o(s,r).done)throw new Y("Expected sequence with length 2");$(c,{key:S(a.value),value:S(h.value)})}else for(var u in e)b(e,u)&&$(c,{key:u,value:S(e[u])})},parseQuery:function(e){if(e)for(var t,i,n=this.entries,r=et(e,"&"),s=0;s0?arguments[0]:void 0,t=N(this,new eg(e));c||(this.size=t.entries.length)},ev=em.prototype;if(f(ev,{append:function(e,t){var i=F(this);P(arguments.length,2),$(i.entries,{key:S(e),value:S(t)}),!c&&this.length++,i.updateURL()},delete:function(e){for(var t=F(this),i=P(arguments.length,1),n=t.entries,r=S(e),s=i<2?void 0:arguments[1],a=void 0===s?s:S(s),o=0;ot.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,i=F(this).entries,n=x(e,arguments.length>1?arguments[1]:void 0),r=0;r1?ex(arguments[1]):{})}}),y(V)){var eE=function(e){return v(this,j),new V(e,arguments.length>1?ex(arguments[1]):{})};j.constructor=eE,eE.prototype=j,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:eE})}}t.exports={URLSearchParams:em,getState:F}},{"12e7a75121005a18":"3prNk",aed1dbd908154980:"dLJLG","2c283453b2df07f7":"gJg5v",f8300b17f61c07ea:"7Z171",c6afc8e42ff4d861:"aXhrH",c5226e6ac6c1a4ca:"e5ie6",c70bfc3d71513918:"bOssl",a30c0c0ecacbf883:"2iJ57","9dc980ea97e54f2d":"6mXK1","34e5e214071de9f5":"azO8L",d5c866a8dfde6bfe:"4CPdc",cfb67c7a1a4f1af9:"3NI4M",f0c2290e210049d5:"43JWW",c7a2f88a5440a541:"dkhk9",fb2d9f4ac91c2856:"1Abii","5e8fcf76ef17aca5":"ixHS2","486653683495e4a1":"95yA1","34563d35f35f9929":"h1Wnr",b866aa0bde936df4:"9JWVX",b5970b9126e1d395:"f1CxE","71cd06e9ca4a93a2":"cRCRk","7e16c364467ce62d":"dPzbI","9a0912d2261bbada":"8mxCV","9d062cdf188403bf":"4x6uB","1caa2aad22025751":"7isQ3",bf766970034bde82:"5toj2",c6d4d2a85cdef35a:"kBMjp","6668155f748c33e9":"3624P","982e5845e606dff7":"dwU83","9a407fe1b80ba6f5":"h3DcZ","778323e4214f089d":"5CuF7","83b87fb1800baf72":"5Mqp3"}],"6WXZj":[function(e,t,i){var n=e("e013012b2638fef2"),r=e("9496ef9db0f82491"),s=e("21b7d0d94de855c8"),a=e("8147b48bed1193b9"),o=e("209fab1bb25c54f1"),h=e("fc6b642936976470"),c=r("URL"),l=h&&s(function(){c.canParse()}),u=s(function(){return 1!==c.canParse.length});n({target:"URL",stat:!0,forced:!l||u},{canParse:function(e){var t=a(arguments.length,1),i=o(e),n=t<2||void 0===arguments[1]?void 0:o(arguments[1]);try{return new c(i,n),!0}catch(e){return!1}}})},{e013012b2638fef2:"gJg5v","9496ef9db0f82491":"e5ie6","21b7d0d94de855c8":"cXVrS","8147b48bed1193b9":"h3DcZ","209fab1bb25c54f1":"4x6uB",fc6b642936976470:"azO8L"}],jUFLb:[function(e,t,i){var n=e("ca194031c7296753"),r=e("349abd465922c360"),s=e("4631d0a34bc5d157"),a=e("aa32995cacd33b44"),o=e("be99ff6f8e610b1"),h=r("URL");n({target:"URL",stat:!0,forced:!o},{parse:function(e){var t=s(arguments.length,1),i=a(e),n=t<2||void 0===arguments[1]?void 0:a(arguments[1]);try{return new h(i,n)}catch(e){return null}}})},{ca194031c7296753:"gJg5v","349abd465922c360":"e5ie6","4631d0a34bc5d157":"h3DcZ",aa32995cacd33b44:"4x6uB",be99ff6f8e610b1:"azO8L"}],fisJQ:[function(e,t,i){var n=e("bfa898e24eaaf3ba"),r=e("f2e0e6e15a74c3f4");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},{bfa898e24eaaf3ba:"gJg5v",f2e0e6e15a74c3f4:"bOssl"}],drhch:[function(e,t,i){e("d31c1e63d588cf96")},{d31c1e63d588cf96:"dIaqI"}],k5k9P:[function(e,t,i){var n=e("5e6ccc0840d93f4d"),r=e("cef48d325e9fb1df"),s=e("669131fee6eafcca"),a=e("1de5920376d9b739"),o=URLSearchParams,h=o.prototype,c=r(h.append),l=r(h.delete),u=r(h.forEach),d=r([].push),f=new o("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&n(h,"delete",function(e){var t,i=arguments.length,n=i<2?void 0:arguments[1];if(i&&void 0===n)return l(this,e);var r=[];u(this,function(e,t){d(r,{key:t,value:e})}),a(i,1);for(var o=s(e),h=s(n),f=0,p=0,g=!1,m=r.length;f=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var h=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(h&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),C(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:I(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(t.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],eDoZE:[function(e,t,i){let{GameClient:n}=e("c0142d4e41395f84"),{GameEngine:r}=e("18a1ed1c4bf17b4d"),{RoomEvents:s}=e("dceef5f4a6a9e8ba"),{ClientStartHandler:a}=e("ec0d66055e408699"),{FeaturesManager:o}=e("7e4eea7c2d38167d"),{FirebaseConnector:h}=e("96ad1970faff6b57"),{ConfigManager:c}=e("f699c89d645cbfaf"),{TranslationsMapper:l}=e("92bd008077187dc5"),u=e("5f809829afd075a"),{GameDom:d}=e("aeb0ac1bb4c645c8"),{RoomsConst:f}=e("b21bf1f3f93cb5d9"),{GameConst:p}=e("f6b922b1a92a11c2"),{ErrorManager:g,EventsManagerSingleton:m,Logger:v,sc:y}=e("33884cbf240ef975");t.exports.GameManager=class{constructor(){this.gameEngine=!1,this.activeRoomEvents=null,this.events=m,this.gameDom=d,this.config=new c;let e=this.gameDom.getWindow()?.reldensInitialConfig||{};y.deepMergeProperties(this.config,e),this.features=new o({gameManager:this,events:this.events}),this.firebase=new h(this),this.joinedRooms={},this.userData={},this.plugins={},this.services={},this.elements={},this.playerData=!1,this.gameOver=!1,this.forcedDisconnection=!1,this.isChangingScene=!1,this.canInitEngine=!0,this.appServerUrl="",this.gameServerUrl="",this.locale="",l.forConfig(this.config.client,u,p.MESSAGE.DATA_VALUES)}setupCustomClientPlugin(e,t){this.plugins[e]=new t,this.plugins[e].setup({gameManager:this,events:this.events})}clientStart(){this.events.emitSync("reldens.clientStartBefore",this),this.startHandler=new a(this),this.startHandler.clientStart()}async startGame(e,t){return(this.events.emitSync("reldens.startGameBefore",this),await this.joinGame(e,t))?(this.handleLoginSuccess(),!0):(this.handleLoginError(e),!1)}handleLoginSuccess(){let e=this.gameDom.getElement(p.SELECTORS.BODY);e.classList.add(p.CLASSES.GAME_STARTED),e.classList.remove(p.CLASSES.GAME_ERROR),this.gameDom.getElement(p.SELECTORS.FORMS_CONTAINER).remove(),this.gameDom.getElement(p.SELECTORS.GAME_CONTAINER).classList.remove(p.CLASSES.HIDDEN),this.events.emitSync("reldens.startGameAfter",this)}handleLoginError(e){let t=this.gameDom.getElement(p.SELECTORS.BODY);t.classList.remove(p.CLASSES.GAME_STARTED),t.classList.add(p.CLASSES.GAME_ERROR),this.submitedForm=!1,this.events.emitSync("reldens.gameRoomError",this),this.firebase&&"firebase-login"===e.formId&&this.firebase.app.auth().signOut()}async joinGame(e,t=!1){return(this.userData={},await this.events.emit("reldens.beforeJoinGame",{gameManager:this,formData:e,isNewUser:t}),this.mapFormDataToUserData(e,t),this.gameRoom=await this.gameClient.joinOrCreate(p.ROOM_GAME,this.userData),this.gameRoom)?(await this.events.emit("reldens.beforeJoinGameRoom",this.gameRoom),this.handleGameRoomMessages(),this.activateResponsiveBehavior(),this.gameRoom):(this.displayFormError("#"+e.formId,this.gameClient.lastErrorMessage),!1)}mapFormDataToUserData(e,t){y.hasOwn(e,"forgot")&&(this.userData.forgot=1,this.userData.email=e.email),this.initializeClient(),e.isGuest&&(this.userData.isGuest=!0,this.userData.isNewUser=!0),t&&(this.userData.isNewUser=!0,this.userData.email=e.email),this.userData.username=e.username,this.userData.password=e.password}handleGameRoomMessages(){this.gameRoom.onMessage("*",async e=>{if(e.error)return v.error("Game Room message error.",e.error),this.displayFormError(p.SELECTORS.PLAYER_CREATE_FORM,e.error),!1;if(p.START_GAME===e.act)return this.initialGameData=e,await this.beforeStartGame();if(p.CREATE_PLAYER_RESULT!==e.act)return!1;this.initialGameData.player=e.player;let t=this.gameDom.getElement(p.SELECTORS.PLAYER_SELECTION);t&&t.classList.add("hidden"),await this.initEngine()})}activateResponsiveBehavior(){this.events.on("reldens.afterSceneDynamicCreate",async()=>{this.config.getWithoutLogs("client/ui/screen/responsive",!0)&&(this.gameEngine.updateGameSize(this),this.gameDom.getWindow().addEventListener("resize",()=>{this.gameEngine.updateGameSize(this)}))})}displayFormError(e,t){let i=this.gameDom.getElement(e+" "+p.SELECTORS.RESPONSE_ERROR);return!!i&&(i.innerHTML=t,!0)}initializeClient(){this.appServerUrl=this.getAppServerUrl(),this.gameServerUrl=this.getGameServerUrl(),this.gameClient=new n(this.gameServerUrl,this.config)}async beforeStartGame(){return await this.events.emit("reldens.beforeInitEngineAndStartGame",this.initialGameData,this),y.hasOwn(this.initialGameData,"gameConfig")||g.error("Missing game configuration."),y.deepMergeProperties(this.config,this.initialGameData?.gameConfig||{}),await this.features.loadFeatures(this.initialGameData?.features||{}),await this.events.emit("reldens.beforeCreateEngine",this.initialGameData,this),!!this.canInitEngine&&await this.initEngine()}async initEngine(){if(this.playerData=this.initialGameData?.player||!1,!this.playerData||!this.playerData.state)return this.gameDom.alertReload(this.services?.translator.t("game.errors.missingPlayerData"));this.userData.selectedPlayer=this.playerData.id;let e=this.initialGameData?.selectedScene||"";this.userData.selectedScene=e;let t=this.initialGameData?.gameConfig||{};this.gameEngine=new r({config:t.client.gameEngine,events:this.events}),this.userData.isNewUser=!1,this.userData.isGuest&&(this.initialGameData?.guestPassword&&(this.userData.password=this.initialGameData.guestPassword),this.initialGameData?.userName&&(this.userData.username=this.initialGameData.userName)),await this.joinFeaturesRooms();let i=""!==e&&e!==f.ROOM_LAST_LOCATION_KEY?e:this.playerData.state.scene;this.playerData.state.scene=i;let n=await this.gameClient.joinOrCreate(i,this.userData);return n?(this.gameDom.getElement(p.SELECTORS.BODY).classList.add(p.CLASSES.GAME_ENGINE_STARTED),delete this.initialGameData.selectedScene,delete this.userData.selectedScene,await this.emitJoinedRoom(n,i),this.activeRoomEvents=this.createRoomEventsInstance(i,this.events),await this.events.emit("reldens.createdRoomsEventsInstance",n,this),await this.activeRoomEvents.activateRoom(n),await this.emitActivatedRoom(n,i),await this.events.emit("reldens.afterInitEngineAndStartGame",this.initialGameData,n),n):this.gameDom.alertReload(this.services?.translator.t("game.errors.joiningRoom",{joinRoomName:i}))}async joinFeaturesRooms(){let e=Object.keys(this.features.featuresList);if(0===e.length)return;let t=[];for(let i of e){let e=this.features.featuresList[i];if(y.hasOwn(e,"joinRooms"))for(let i of e.joinRooms){let e=await this.gameClient.joinOrCreate(i,this.userData);if(!e)return this.gameDom.alertReload(this.services.translator.t("game.errors.joiningFeatureRoom",{joinRoomName:i}));this.joinedRooms[i]=e,await this.emitJoinedRoom(e,i),t.push(i)}}y.deepMergeProperties(this.config,{client:{rooms:{featuresRoomsNames:t}}})}async reconnectGameClient(e,t){this.isChangingScene=!0;let i=this.createRoomEventsInstance(e.player.state.scene);this.gameClient.joinOrCreate(i.roomName,this.userData).then(async n=>{t.leave(),this.activeRoomEvents=i,this.room=n,await this.emitJoinedRoom(n,e.player.state.scene),await i.activateRoom(n,e.prev),await this.emitActivatedRoom(n,e.player.state.scene)}).catch(i=>{v.error("Reconnect Game Client error.",{error:i,message:e,previousRoom:t}),this.gameDom.alertReload(this.services.translator.t("game.errors.reconnectClient"))})}async emitActivatedRoom(e,t){await this.events.emit("reldens.activatedRoom",e,this),await this.events.emit("reldens.activatedRoom_"+t,e,this)}async emitJoinedRoom(e,t){await this.events.emit("reldens.joinedRoom",e,this),await this.events.emit("reldens.joinedRoom_"+t,e,this)}createRoomEventsInstance(e){return new s(e,this)}getAppServerUrl(){return""===this.appServerUrl&&(this.appServerUrl=this.getUrlFromCurrentReferer()),this.appServerUrl}getGameServerUrl(){return""===this.gameServerUrl&&(this.gameServerUrl=this.getUrlFromCurrentReferer(!0)),this.gameServerUrl}getUrlFromCurrentReferer(e=!1){let t=this.gameDom.getWindow().location,i=t.protocol;return e&&(i=0===i.indexOf("https")?"wss:":"ws:"),i+"//"+t.hostname+(t.port?":"+t.port:"")}getActiveScene(){return this.activeRoomEvents.getActiveScene()}getActiveScenePreloader(){let e=this.getActiveScene().key;return this.gameEngine.scene.getScene("ScenePreloader"+e)}getCurrentPlayer(){let e=this.getActiveScene();return!!e&&e.player}currentPlayerName(){let e=this.getCurrentPlayer();return e?e.player_id+" - "+e.playerName:""}getCurrentPlayerAnimation(){let e=this.getCurrentPlayer();return e.players[e.playerId]}getUiElement(e,t=!0){let i=y.get(this.gameEngine,"uiScene",!1);return i?i.getUiElement(e,t):(t&&v.error("UI Scene not defined."),!1)}getFeature(e){let t=this.features.featuresList;return y.hasOwn(t,e)?t[e]:(v.error("Feature key not defined.",e),!1)}getAnimationByKey(e){return this.getActiveScene().getAnimationByKey(e)}}},{c0142d4e41395f84:"44RMi","18a1ed1c4bf17b4d":"fVZ41",dceef5f4a6a9e8ba:"7XAJ0",ec0d66055e408699:"401GU","7e4eea7c2d38167d":"3ZqP5","96ad1970faff6b57":"dkVHA",f699c89d645cbfaf:"6v2bg","92bd008077187dc5":"1fcQw","5f809829afd075a":"CtFH5",aeb0ac1bb4c645c8:"bqEy7",b21bf1f3f93cb5d9:"9vHHC",f6b922b1a92a11c2:"93TbC","33884cbf240ef975":"3lwy5"}],"44RMi":[function(e,t,i){let{Client:n}=e("7318eff88b436af1"),{RoomsConst:r}=e("25de65df7e751073"),{GameConst:s}=e("6f1338761bdf0493"),{Logger:a}=e("c4efa48e92b2f02b");t.exports.GameClient=class{constructor(e,t){this.serverUrl=e,this.config=t,this.autoConnectServerGameRoom=this.config.getWithoutLogs("client/rooms/autoConnectServerGameRoom",!0),this.autoConnectServerFeatureRooms=this.config.getWithoutLogs("client/rooms/autoConnectServerFeatureRooms",!0),this.roomsUrls={},this.roomClients={},this.gameRoomsByServer={},this.featuresByServerFlag={},this.featuresRoomsByServer={},this.lastErrorMessage=""}async joinOrCreate(e,t){this.lastErrorMessage="";try{let i=this.roomClient(e);if(!i)return a.error('Client not found for room name "'+e+'".'),!1;let n=this.roomsUrls[e];return await this.connectToGlobalGameRoom(n,i,t),await this.connectToGlobalFeaturesRooms(n,i,t),await i.joinOrCreate(e,t)}catch(i){if(r.ERRORS.CREATING_ROOM_AWAIT===i.message)return await new Promise(e=>setTimeout(e,500)),await this.joinOrCreate(e,t);this.lastErrorMessage=i.message,a.error("Joining room error: "+i.message)}return!1}async connectToGlobalGameRoom(e,t,i){if(this.autoConnectServerGameRoom){if(""===e||this.serverUrl===e){a.debug("Avoid connect to global game room.",this.serverUrl,e);return}this.gameRoomsByServer[e]||(a.debug("Registering GameRoom for server: "+e),this.gameRoomsByServer[e]=await t.joinOrCreate(s.ROOM_GAME,i),this.gameRoomsByServer[e].onMessage("*",()=>{}))}}async connectToGlobalFeaturesRooms(e,t,i){if(!this.autoConnectServerFeatureRooms)return;if(""===e||this.serverUrl===e){a.debug("Avoid connect to features rooms.",this.serverUrl,e);return}if(this.featuresByServerFlag[e])return;a.debug("Registering features rooms for server: "+e),this.featuresByServerFlag[e]=!0;let n=this.config.getWithoutLogs("client/rooms/featuresRoomsNames",[]);if(!(00&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}(this._view,this._offset,e);return this._offset+=e,t},T.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},T.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),i=0,n=0,r=0,s=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-((255-t+1)*1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return i=this._view.getUint8(this._offset),this._offset+=1,this._bin(i);case 197:return i=this._view.getUint16(this._offset),this._offset+=2,this._bin(i);case 198:return i=this._view.getUint32(this._offset),this._offset+=4,this._bin(i);case 199:if(i=this._view.getUint8(this._offset),n=this._view.getInt8(this._offset+1),this._offset+=2,-1===n){var a=this._view.getUint32(this._offset);return r=this._view.getInt32(this._offset+4),s=this._view.getUint32(this._offset+8),this._offset+=12,new Date((4294967296*r+s)*1e3+a/1e6)}return[n,this._bin(i)];case 200:return i=this._view.getUint16(this._offset),n=this._view.getInt8(this._offset+2),this._offset+=3,[n,this._bin(i)];case 201:return i=this._view.getUint32(this._offset),n=this._view.getInt8(this._offset+4),this._offset+=5,[n,this._bin(i)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return r=4294967296*this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,r+s;case 212:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n){this._offset+=1;return}return[n,this._bin(1)];case 213:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(2)];case 214:if(n=this._view.getInt8(this._offset),this._offset+=1,-1===n)return e=this._view.getUint32(this._offset),this._offset+=4,new Date(1e3*e);return[n,this._bin(4)];case 215:if(n=this._view.getInt8(this._offset),this._offset+=1,0===n)return r=4294967296*this._view.getInt32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(r+s);if(-1===n)return r=this._view.getUint32(this._offset),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(1e3*((3&r)*4294967296+s)+(r>>>2)/1e6);return[n,this._bin(8)];case 216:return n=this._view.getInt8(this._offset),this._offset+=1,[n,this._bin(16)];case 217:return i=this._view.getUint8(this._offset),this._offset+=1,this._str(i);case 218:return i=this._view.getUint16(this._offset),this._offset+=2,this._str(i);case 219:return i=this._view.getUint32(this._offset),this._offset+=4,this._str(i);case 220:return i=this._view.getUint16(this._offset),this._offset+=2,this._array(i);case 221:return i=this._view.getUint32(this._offset),this._offset+=4,this._array(i);case 222:return i=this._view.getUint16(this._offset),this._offset+=2,this._map(i);case 223:return i=this._view.getUint32(this._offset),this._offset+=4,this._map(i)}throw Error("Could not parse")};var S=globalThis.WebSocket||function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},A=function(){function e(e){this.events=e}return e.prototype.send=function(e){e instanceof ArrayBuffer?this.ws.send(e):Array.isArray(e)&&this.ws.send(new Uint8Array(e).buffer)},e.prototype.connect=function(e){this.ws=new S(e,this.protocols),this.ws.binaryType="arraybuffer",this.ws.onopen=this.events.onopen,this.ws.onmessage=this.events.onmessage,this.ws.onclose=this.events.onclose,this.ws.onerror=this.events.onerror},e.prototype.close=function(e,t){this.ws.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.ws.readyState===S.OPEN},enumerable:!1,configurable:!0}),e}(),C=function(){function e(){this.events={},this.transport=new A(this.events)}return e.prototype.send=function(e){this.transport.send(e)},e.prototype.connect=function(e){this.transport.connect(e)},e.prototype.close=function(e,t){this.transport.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.transport.isOpen},enumerable:!1,configurable:!0}),e}();function _(e,t){for(var i=e[t++],n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}throw Error("Invalid byte "+o.toString(16))}return n}function I(e){void 0===e&&(e="");for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i+1}e.Protocol=void 0,(r=e.Protocol||(e.Protocol={}))[r.HANDSHAKE=9]="HANDSHAKE",r[r.JOIN_ROOM=10]="JOIN_ROOM",r[r.ERROR=11]="ERROR",r[r.LEAVE_ROOM=12]="LEAVE_ROOM",r[r.ROOM_DATA=13]="ROOM_DATA",r[r.ROOM_STATE=14]="ROOM_STATE",r[r.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",r[r.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA",r[r.ROOM_DATA_BYTES=17]="ROOM_DATA_BYTES",e.ErrorCode=void 0,(s=e.ErrorCode||(e.ErrorCode={}))[s.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",s[s.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",s[s.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",s[s.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",s[s.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",s[s.AUTH_FAILED=4215]="AUTH_FAILED",s[s.APPLICATION_ERROR=4216]="APPLICATION_ERROR";var O={};function P(e){var t=O[e];if(!t)throw Error("missing serializer: "+e);return t}var M=function(){return{emit:function(e){for(var t=[],i=1;i=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,utf8Write:w,int8:T,uint8:S,int16:A,uint16:C,int32:_,uint32:I,int64:O,uint64:P,float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},writeFloat32:D,writeFloat64:k,boolean:function(e,t){return S(e,t?1:0)},string:N,number:F});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),K=new Float32Array(X.buffer),q=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),K[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),q[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,int8:U,uint8:V,int16:G,uint16:j,int32:W,uint32:Y,float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int64:H,uint64:z,readFloat32:J,readFloat64:$,boolean:function(e,t){return V(e,t)>0},string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},arrayCheck:function(e,t){return e[t.offset]<160},switchStructureCheck:ee}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){this.refCounts[e]=this.refCounts[e]-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:u;if(y===e.OPERATION.CLEAR){r.clear(a);continue}var b=p?u%(y||255):Z(i,n),x=p?r._definition.fieldsByIndex[b]:"",E=f.getType(b),w=void 0,T=void 0,S=void 0;if(p?T=r["_".concat(x)]:(T=r.getByIndex(b),(y&e.OPERATION.ADD)===e.OPERATION.ADD?(S=r instanceof m?Q(i,n):b,r.setIndex(b,S)):S=r.getIndex(b)),(y&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(y!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(b),T&&T.$changes&&o.removeRef(T.$changes.refId),w=null),void 0===x){console.warn("@colyseus/schema: definition mismatch");for(var A={offset:n.offset};n.offset (".concat(e,") ").concat(t))}),this.onLeave(function(){return i.removeAllListeners()})}return Object.defineProperty(t.prototype,"id",{get:function(){return this.roomId},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,i,n){void 0===n&&(n=this);var r=new C;n.connection=r,r.events.onmessage=t.prototype.onMessageCallback.bind(n),r.events.onclose=function(e){var t;if(!n.hasJoined){null===(t=console.warn)||void 0===t||t.call(console,"Room connection was closed unexpectedly (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason);return}e.code===h.DEVMODE_RESTART&&i?i():(n.onLeave.invoke(e.code),n.destroy())},r.events.onerror=function(e){var t;null===(t=console.warn)||void 0===t||t.call(console,"Room, onError (".concat(e.code,"): ").concat(e.reason)),n.onError.invoke(e.code,e.reason)},r.connect(e)},t.prototype.leave=function(t){var i=this;return void 0===t&&(t=!0),new Promise(function(n){i.onLeave(function(e){return n(e)}),i.connection?t?i.connection.send([e.Protocol.LEAVE_ROOM]):i.connection.close():i.onLeave.invoke(h.CONSENTED)})},t.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},t.prototype.send=function(t,i){var n,r=[e.Protocol.ROOM_DATA];if("string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),void 0!==i){var s=function(e){var t=[],i=[],n=new ArrayBuffer(function e(t,i,n){var r=typeof n,s=0,a=0,o=0,h=0,c=0,l=0;if("string"===r){if((c=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(n))<32)t.push(160|c),l=1;else if(c<256)t.push(217,c),l=2;else if(c<65536)t.push(218,c>>8,c),l=3;else if(c<4294967296)t.push(219,c>>24,c>>16,c>>8,c),l=5;else throw Error("String too long");return i.push({_str:n,_length:c,_offset:t.length}),l+c}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(t.push(n),1):n<256?(t.push(204,n),2):n<65536?(t.push(205,n>>8,n),3):n<4294967296?(t.push(206,n>>24,n>>16,n>>8,n),5):(o=n/4294967296>>0,h=n>>>0,t.push(207,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):n>=-32?(t.push(n),1):n>=-128?(t.push(208,n),2):n>=-32768?(t.push(209,n>>8,n),3):n>=-2147483648?(t.push(210,n>>24,n>>16,n>>8,n),5):(o=Math.floor(n/4294967296),h=n>>>0,t.push(211,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):(t.push(203),i.push({_float:n,_length:8,_offset:t.length}),9);if("object"===r){if(null===n)return t.push(192),1;if(Array.isArray(n)){if((c=n.length)<16)t.push(144|c),l=1;else if(c<65536)t.push(220,c>>8,c),l=3;else if(c<4294967296)t.push(221,c>>24,c>>16,c>>8,c),l=5;else throw Error("Array too large");for(s=0;s=0&&f>=0&&d<=17179869183?0===f&&d<=4294967295?(t.push(214,255,d>>24,d>>16,d>>8,d),6):(o=d/4294967296,h=4294967295&d,t.push(215,255,f>>22,f>>14,f>>6,o,h>>24,h>>16,h>>8,h),10):(o=Math.floor(d/4294967296),h=d>>>0,t.push(199,12,255,f>>24,f>>16,f>>8,f,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),15)}if(n instanceof ArrayBuffer){if((c=n.byteLength)<256)t.push(196,c),l=2;else if(c<65536)t.push(197,c>>8,c),l=3;else if(c<4294967296)t.push(198,c>>24,c>>16,c>>8,c),l=5;else throw Error("Buffer too large");return i.push({_bin:n,_length:c,_offset:t.length}),l+c}if("function"==typeof n.toJSON)return e(t,i,n.toJSON());var p=[],g="",m=Object.keys(n);for(s=0,a=m.length;s>8,c),l=3;else if(c<4294967296)t.push(223,c>>24,c>>16,c>>8,c),l=5;else throw Error("Object too large");for(s=0;s0&&(o=i[0]._offset);for(var h,c=0,l=0,u=0,d=t.length;u>6):(n<55296||n>=57344?e.setUint8(t++,224|n>>12):(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e.setUint8(t++,240|n>>18),e.setUint8(t++,128|n>>12&63)),e.setUint8(t++,128|n>>6&63)),e.setUint8(t++,128|63&n))}(r,l,h._str):void 0!==h._float&&r.setFloat64(l,h._float);s++,a+=c,i[s]&&(o=i[s]._offset)}return n}(i);(n=new Uint8Array(r.length+s.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(s),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},t.prototype.sendBytes=function(t,i){var n,r=[e.Protocol.ROOM_DATA_BYTES];"string"==typeof t?D.encode.string(r,t):D.encode.number(r,t),(n=new Uint8Array(r.length+(i.byteLength||i.length))).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length),this.connection.send(n.buffer)},Object.defineProperty(t.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),t.prototype.removeAllListeners=function(){this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},t.prototype.onMessageCallback=function(t){var i=Array.from(new Uint8Array(t.data)),n=i[0];if(n===e.Protocol.JOIN_ROOM){var r=1,s=_(i,1);if(r+=I(s),this.serializerId=_(i,r),r+=I(this.serializerId),!this.serializer){var a=P(this.serializerId);this.serializer=new a}i.length>r&&this.serializer.handshake&&this.serializer.handshake(i,{offset:r}),this.reconnectionToken="".concat(this.roomId,":").concat(s),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([e.Protocol.JOIN_ROOM])}else if(n===e.Protocol.ERROR){var o={offset:1},h=D.decode.number(i,o),c=D.decode.string(i,o);this.onError.invoke(h,c)}else if(n===e.Protocol.LEAVE_ROOM)this.leave();else if(n===e.Protocol.ROOM_DATA_SCHEMA){var l={offset:1},u=this.serializer.getState().constructor._context.get(D.decode.number(i,l)),c=new u;c.decode(i,l),this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_STATE)i.shift(),this.setState(i);else if(n===e.Protocol.ROOM_STATE_PATCH)i.shift(),this.patch(i);else if(n===e.Protocol.ROOM_DATA){var d={offset:1},u=D.decode.stringCheck(i,d)?D.decode.string(i,d):D.decode.number(i,d),c=i.length>d.offset?function(e,t){void 0===t&&(t=0);var i=new T(e,t),n=i._parse();if(i._offset!==e.byteLength)throw Error(e.byteLength-i._offset+" trailing bytes");return n}(t.data,d.offset):void 0;this.dispatchMessage(u,c)}else if(n===e.Protocol.ROOM_DATA_BYTES){var f={offset:1},u=D.decode.stringCheck(i,f)?D.decode.string(i,f):D.decode.number(i,f);this.dispatchMessage(u,new Uint8Array(i.slice(f.offset)))}},t.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.dispatchMessage=function(e,t){var i,n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):null===(i=console.warn)||void 0===i||i.call(console,"colyseus.js: onMessage() not registered for type '".concat(e,"'."))},t.prototype.destroy=function(){this.serializer&&this.serializer.teardown()},t.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$".concat(e._typeid);case"string":return e;case"number":return"i".concat(e);default:throw Error("invalid message type.")}},t}();function N(e,t){t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function F(e,t,i){var n,r,s=(i=i||{}).body;return i.method=e,i.headers=i.headers||{},s instanceof FormData||s&&"object"==typeof s&&(i.headers["content-type"]="application/json",i.body=JSON.stringify(s)),i.withCredentials&&(i.credentials="include"),i.timeout&&(r=new AbortController,i.signal=r.signal,n=setTimeout(r.abort,i.timeout)),new Promise((e,a)=>{fetch(t,i).then((t,r)=>{clearTimeout(n),N(t,t),r=t.status>=400?a:e,(s=t.headers.get("content-type"))&&~s.indexOf("application/json")?t.text().then(e=>{try{t.data=JSON.parse(e,i.reviver),r(t)}catch(e){e.headers=t.headers,N(t,e),a(e)}}):r(t)}).catch(e=>{e.timeout=r&&r.signal.aborted,a(e)})})}var B=F.bind(F,"GET"),U=F.bind(F,"POST"),V=F.bind(F,"PATCH"),G=F.bind(F,"DELETE"),j=F.bind(F,"PUT"),W={del:G,get:B,patch:V,post:U,put:j,send:F},Y=(o={__proto__:null,default:W,del:G,get:B,patch:V,post:U,put:j,send:F},[W].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in o)){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(o)),H=function(){function e(e){this.client=e}return e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("get",e,t)},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.request("post",e,t)},e.prototype.del=function(e,t){return void 0===t&&(t={}),this.request("del",e,t)},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.request("put",e,t)},e.prototype.request=function(e,t,i){return void 0===i&&(i={}),Y[e](this.client.getHttpEndpoint(t),this.getOptions(i)).catch(function(e){var t,i=e.statusCode,n=(null===(t=e.data)||void 0===t?void 0:t.error)||e.statusMessage||e.message;if(!i&&!n)throw e;throw new w(i,n)})},e.prototype.getOptions=function(e){return this.authToken&&(e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(this.authToken)),"undefined"!=typeof cc&&cc.sys&&cc.sys.isNative||(e.withCredentials=!0),e},e}();function z(){if(!c)try{c="undefined"!=typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:window.localStorage}catch(e){}return c||(c={cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),c}var X=function(){function e(e){var t,i,n,r=this;this.http=e,this.settings={path:"/auth",key:"colyseus-auth-token"},l.set(this,!1),u.set(this,void 0),d.set(this,void 0),f.set(this,M()),t=this.settings.key,i=function(e){return r.token=e},n=z().getItem(t),"undefined"!=typeof Promise&&n instanceof Promise?n.then(function(e){return i(e)}):i(n)}return Object.defineProperty(e.prototype,"token",{get:function(){return this.http.authToken},set:function(e){this.http.authToken=e},enumerable:!1,configurable:!0}),e.prototype.onChange=function(e){var t=this,i=x(this,f,"f").on("change",e);return x(this,l,"f")||E(this,u,new Promise(function(e,i){t.getUserData().then(function(e){t.emitChange(v(v({},e),{token:t.token}))}).catch(function(e){t.emitChange({user:null,token:void 0})}).finally(function(){e()})}),"f"),E(this,l,!0,"f"),i},e.prototype.getUserData=function(){return y(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(!this.token)return[3,2];return[4,this.http.get("".concat(this.settings.path,"/userdata"))];case 1:return[2,e.sent().data];case 2:throw Error("missing auth.token")}})})},e.prototype.registerWithEmailAndPassword=function(e,t,i){return y(this,void 0,void 0,function(){var n;return b(this,function(r){switch(r.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/register"),{body:{email:e,password:t,options:i}})];case 1:return n=r.sent().data,this.emitChange(n),[2,n]}})})},e.prototype.signInWithEmailAndPassword=function(e,t){return y(this,void 0,void 0,function(){var i;return b(this,function(n){switch(n.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/login"),{body:{email:e,password:t}})];case 1:return i=n.sent().data,this.emitChange(i),[2,i]}})})},e.prototype.signInAnonymously=function(e){return y(this,void 0,void 0,function(){var t;return b(this,function(i){switch(i.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/anonymous"),{body:{options:e}})];case 1:return t=i.sent().data,this.emitChange(t),[2,t]}})})},e.prototype.sendPasswordResetEmail=function(e){return y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.post("".concat(this.settings.path,"/forgot-password"),{body:{email:e}})];case 1:return[2,t.sent().data]}})})},e.prototype.signInWithProvider=function(e,t){return void 0===t&&(t={}),y(this,void 0,void 0,function(){var i=this;return b(this,function(n){return[2,new Promise(function(n,r){var s=t.width||480,a=t.height||768,o=i.token?"?token=".concat(i.token):"",h="Login with ".concat(e[0].toUpperCase()+e.substring(1)),c=i.http.client.getHttpEndpoint("".concat(t.prefix||"".concat(i.settings.path,"/provider"),"/").concat(e).concat(o)),l=screen.width/2-s/2,u=screen.height/2-a/2;E(i,d,window.open(c,h,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+s+", height="+a+", top="+u+", left="+l),"f");var f=function(e){(void 0!==e.data.user||void 0!==e.data.token)&&(clearInterval(p),x(i,d,"f").close(),E(i,d,void 0,"f"),window.removeEventListener("message",f),void 0!==e.data.error?r(e.data.error):(n(e.data),i.emitChange(e.data)))},p=setInterval(function(){(!x(i,d,"f")||x(i,d,"f").closed)&&(E(i,d,void 0,"f"),r("cancelled"),window.removeEventListener("message",f))},200);window.addEventListener("message",f)})]})})},e.prototype.signOut=function(){return y(this,void 0,void 0,function(){return b(this,function(e){return this.emitChange({user:null,token:null}),[2]})})},e.prototype.emitChange=function(e){if(void 0!==e.token){var t,i,n;(this.token=e.token,null===e.token)?(t=this.settings.key,z().removeItem(t)):(i=this.settings.key,n=e.token,z().setItem(i,n))}x(this,f,"f").emit("change",e)},e}();function K(e){var t,i=(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hostname)||"localhost",n=e.hostname.split("."),r=e.hostname.includes("trycloudflare.com")||e.hostname.includes("discordsays.com")||!(n.length>2)?"":"/".concat(n[0]);return e.pathname.startsWith("/.proxy")?"".concat(e.protocol,"//").concat(i).concat(r).concat(e.pathname).concat(e.search):"".concat(e.protocol,"//").concat(i,"/.proxy/colyseus").concat(r).concat(e.pathname).concat(e.search)}l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap;var q=function(e){function t(i,n){var r=e.call(this,i)||this;return r.code=n,Object.setPrototypeOf(r,t.prototype),r}return m(t,e),t}(Error),J="undefined"!=typeof window&&void 0!==(null===(p=null==window?void 0:window.location)||void 0===p?void 0:p.hostname)?"".concat(window.location.protocol.replace("http","ws"),"//").concat(window.location.hostname).concat(window.location.port&&":".concat(window.location.port)):"ws://127.0.0.1:2567",$=function(){function e(e,t){if(void 0===e&&(e=J),"string"==typeof e){var i,n,r=e.startsWith("/")?new URL(e,J):new URL(e),s="https:"===r.protocol||"wss:"===r.protocol,a=Number(r.port||(s?443:80));this.settings={hostname:r.hostname,pathname:r.pathname,port:a,secure:s}}else void 0===e.port&&(e.port=e.secure?443:80),void 0===e.pathname&&(e.pathname=""),this.settings=e;this.settings.pathname.endsWith("/")&&(this.settings.pathname=this.settings.pathname.slice(0,-1)),this.http=new H(this),this.auth=new X(this.http),this.urlBuilder=t,!this.urlBuilder&&"undefined"!=typeof window&&(null===(n=null===(i=null==window?void 0:window.location)||void 0===i?void 0:i.hostname)||void 0===n?void 0:n.includes("discordsays.com"))&&(this.urlBuilder=K,console.log("Colyseus SDK: Discord Embedded SDK detected. Using custom URL builder."))}return e.prototype.joinOrCreate=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.create=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.join=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.joinById=function(e,t,i){return void 0===t&&(t={}),y(this,void 0,void 0,function(){return b(this,function(n){switch(n.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,i)];case 1:return[2,n.sent()]}})})},e.prototype.reconnect=function(e,t){return y(this,void 0,void 0,function(){var i,n,r;return b(this,function(s){switch(s.label){case 0:if("string"==typeof e&&"string"==typeof t)throw Error("DEPRECATED: .reconnect() now only accepts 'reconnectionToken' as argument.\nYou can get this token from previously connected `room.reconnectionToken`");if(n=(i=e.split(":"))[0],r=i[1],!n||!r)throw Error("Invalid reconnection token format.\nThe format should be roomId:reconnectionToken");return[4,this.createMatchMakeRequest("reconnect",n,{reconnectionToken:r},t)];case 1:return[2,s.sent()]}})})},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),y(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.http.get("matchmake/".concat(e),{headers:{Accept:"application/json"}})];case 1:return[2,t.sent().data]}})})},e.prototype.consumeSeatReservation=function(e,t,i){return y(this,void 0,void 0,function(){var n,r,s,a=this;return b(this,function(o){return(n=this.createRoom(e.room.name,t)).roomId=e.room.roomId,n.sessionId=e.sessionId,r={sessionId:n.sessionId},e.reconnectionToken&&(r.reconnectionToken=e.reconnectionToken),s=i||n,n.connect(this.buildEndpoint(e.room,r),e.devMode&&function(){return y(a,void 0,void 0,function(){var i,r,a=this;return b(this,function(o){return console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," Re-establishing connection with room id '").concat(n.roomId,"'...")),i=0,setTimeout(r=function(){return y(a,void 0,void 0,function(){return b(this,function(a){switch(a.label){case 0:i++,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.consumeSeatReservation(e,t,s)];case 2:return a.sent(),console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(9989)," Successfully re-established connection with room '").concat(n.roomId,"'")),[3,4];case 3:return a.sent(),i<8?(console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," retrying... (").concat(i," out of ").concat(8,")")),setTimeout(r,2e3)):console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(10060)," Failed to reconnect. Is your server running? Please check server logs.")),[3,4];case 4:return[2]}})})},2e3),[2]})})},s),[2,new Promise(function(e,t){var i=function(e,i){return t(new w(e,i))};s.onError.once(i),s.onJoin.once(function(){s.onError.remove(i),e(s)})})]})})},e.prototype.createMatchMakeRequest=function(e,t,i,n,r){return void 0===i&&(i={}),y(this,void 0,void 0,function(){var s;return b(this,function(a){switch(a.label){case 0:return[4,this.http.post("matchmake/".concat(e,"/").concat(t),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})];case 1:if((s=a.sent().data).error)throw new q(s.error,s.code);return"reconnect"===e&&(s.reconnectionToken=i.reconnectionToken),[4,this.consumeSeatReservation(s,n,r)];case 2:return[2,a.sent()]}})})},e.prototype.createRoom=function(e,t){return new k(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push("".concat(n,"=").concat(t[n]));var r=this.settings.secure?"wss://":"ws://";e.publicAddress?r+="".concat(e.publicAddress):r+="".concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname);var s="".concat(r,"/").concat(e.processId,"/").concat(e.roomId,"?").concat(i.join("&"));return this.urlBuilder?this.urlBuilder(new URL(s)):s},e.prototype.getHttpEndpoint=function(e){void 0===e&&(e="");var t=e.startsWith("/")?e:"/".concat(e),i="".concat(this.settings.secure?"https":"http","://").concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname).concat(t);return this.urlBuilder?this.urlBuilder(new URL(i)):i},e.prototype.getEndpointPort=function(){return 80!==this.settings.port&&443!==this.settings.port?":".concat(this.settings.port):""},e}(),Q=function(){function e(){}return e.prototype.setState=function(e){return this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){return this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?new D.Reflection().decode(e,t):this.state=D.Reflection.decode(e,t)},e}(),Z=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();O.schema=Q,O.none=Z,e.Auth=X,e.Client=$,e.Room=k,e.SchemaSerializer=Q,e.registerSerializer=function(e,t){O[e]=t},Object.defineProperty(e,"__esModule",{value:!0})}(i)},{}],"9vHHC":[function(e,t,i){t.exports.RoomsConst={ROOM_TYPE_SCENE:"scene",ROOM_TYPE_LOGIN:"login",ROOM_TYPE_GAME:"game",TILE_INDEX:"i",NEXT_SCENE:"n",MAPS_BUCKET:"/assets/maps",ROOM_LAST_LOCATION_KEY:"@lastLocation",RETURN_POINT_KEYS:{DIRECTION:"d",X:"x",Y:"y",DEFAULT:"de",PREVIOUS:"p"},ERRORS:{CREATING_ROOM_AWAIT:"CREATING-ROOM-AWAIT"}}},{}],"93TbC":[function(e,t,i){t.exports.GameConst={START_GAME:"s",ACTION_KEY:"act",CREATE_PLAYER:"cp",CREATE_PLAYER_RESULT:"cps",CHANGING_SCENE:"cgs",CHANGED_SCENE:"cs",RECONNECT:"r",ROOM_GAME:"room_game",ROOM_NAME_MAP:"Map",SCENE_PRELOADER:"ScenePreloader",PLAYER_STATS:"ps",ICON_STATS:"player-stats",CLIENT_JOINED:"cj",UI:"ui",CLOSE_UI_ACTION:"closeUi",TYPE_PLAYER:"pj",GAME_OVER:"go",REVIVED:"rv",BUTTON_OPTION:"btn-opt",UI_BOX:"box",UI_CLOSE:"-close",UI_OPEN:"-open",UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right",STOP:"stop",POINTER:"mp",ARROW_DOWN:"ard",IMAGE_PLAYER:"player",ACTIONS:{LOGIN_UPDATE_ERROR:"luer"},STATUS:{ACTIVE:1,DISABLED:2,DEATH:3,AVOID_INTERPOLATION:4},STRUCTURE:{DEFAULT:"default",ASSETS:"assets",CSS:"css",DIST:"dist",THEME:"theme",LIB:"lib",SERVER:"server",CLIENT:"client",PLUGINS:"plugins",INDEX:"index.html",SCSS_FILE:"styles.scss",CSS_FILE:"styles.css",ADMIN:"admin",TEMPLATES:"templates",ADMIN_JS_FILE:"reldens-admin-client.js",ADMIN_SCSS_FILE:"reldens-admin-client.scss",ADMIN_CSS_FILE:"reldens-admin-client.css",INSTALLER_FOLDER:"install",INSTALL_LOCK:"install.lock"},ROUTE_PATHS:{DISCONNECT_USER:"/reldens-disconnect-user",TERMS_AND_CONDITIONS:"/terms-and-conditions",MAILER:"/reldens-mailer-enabled",FIREBASE:"/reldens-firebase"},SELECTORS:{BODY:"body",CANVAS:"CANVAS",INPUT:"input",FORMS_CONTAINER:".forms-container",REGISTER_FORM:"#register-form",GUEST_FORM:"#guest-form",LOGIN_FORM:"#login-form",FORGOT_PASSWORD_FORM:"#forgot-form",PLAYER_CREATE_FORM:".player-create-form",PLAYER_SELECTION:"#player-selection",FULL_SCREEN_BUTTON:".full-screen-btn",RESPONSE_ERROR:".response-error",LOADING_CONTAINER:".loading-container",REGISTRATION:{PASSWORD:"#reg-password",RE_PASSWORD:"#reg-re-password",EMAIL:"#reg-email",USERNAME:"#reg-username"},GUEST:{USERNAME:"#guest-username"},LOGIN:{USERNAME:"#username",PASSWORD:"#password"},FORGOT_PASSWORD:{EMAIL:"#forgot-email",CONTAINER:".forgot-password-container"},TERMS:{BOX:"#terms-and-conditions",CONTAINER:".terms-and-conditions-container",LINK_CONTAINER:".terms-and-conditions-link-container",LINK:".terms-and-conditions-link",ACCEPT:"#accept-terms-and-conditions",ACCEPT_LABEL:".accept-terms-and-conditions-label",HEADING:".terms-heading",BODY:".terms-body",CLOSE:"#terms-and-conditions-close"},GAME_CONTAINER:".game-container"},CLASSES:{HIDDEN:"hidden",GAME_STARTED:"game-started",GAME_ERROR:"game-error",GAME_ENGINE_STARTED:"game-engine-started",FULL_SCREEN_ON:"full-screen-on"},MESSAGE:{DATA_VALUES:{NAMESPACE:"game"}},LABELS:{YES:"Yes",NO:"No"},ANIMATIONS_TYPE:{SPRITESHEET:"spritesheet"},FILES:{EXTENSIONS:{PNG:".png"}},GRAPHICS:{FRAME_WIDTH:32,FRAME_HEIGHT:32},SHOW_PLAYER_TIME:{NONE:-1,ONLY_OWN_PLAYER:0,ALL_PLAYERS:2}}},{}],"3lwy5":[function(e,t,i){let n=e("a4ab2983c9d35fd8");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("1695e46110f15942"),InteractionArea:e("8fd16851c34338c4"),SchemaValidator:e("adcc322a4503ef19"),Logger:e("a5fec30b90d89350"),sc:e("859c680ee2b5bef8")}},{a4ab2983c9d35fd8:"faFOz","1695e46110f15942":"ijj7O","8fd16851c34338c4":"hLS4d",adcc322a4503ef19:"5l910",a5fec30b90d89350:"lJWkj","859c680ee2b5bef8":"2vvao"}],faFOz:[function(e,t,i){let n=e("7cdb1283b540f52c").default,r=e("53a92d7fd4d1ab5e"),s=e("fb3dac7fa90fc435");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"7cdb1283b540f52c":"46bZC","53a92d7fd4d1ab5e":"lJWkj",fb3dac7fa90fc435:"2vvao"}],"46bZC":[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);let n=e("e8bdbc586c5c4645"),r="function"==typeof Symbol?Symbol.for("--[[await-event-emitter]]--"):"--[[await-event-emitter]]--";function s(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("type is not type of string or symbol!")}function a(e){if("function"!=typeof e)throw TypeError("fn is not type of Function!")}function o(e){return{[r]:"always",fn:e}}function h(e){return{[r]:"once",fn:e}}i.default=class{constructor(){this._events={}}addListener(e,t){return this.on(e,t)}on(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(o(t)),this}prependListener(e,t){return this.prepend(e,t)}prepend(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(o(t)),this}prependOnceListener(e,t){return this.prependOnce(e,t)}prependOnce(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].unshift(h(t)),this}listeners(e){return(this._events[e]||[]).map(e=>e.fn)}once(e,t){return s(e),a(t),this._events[e]=this._events[e]||[],this._events[e].push(h(t)),this}removeAllListeners(){this._events={}}off(e,t){return this.removeListener(e,t)}removeListener(e,t){s(e);let i=this.listeners(e);if("function"!=typeof t)return delete this._events[e];{let n=-1,r=!1;for(;(n=i.indexOf(t))>=0;)i.splice(n,1),this._events[e].splice(n,1),r=!0;return r}}emit(e,...t){var i,a,o,h;return i=this,a=void 0,o=void 0,h=function*(){s(e);let i=this.listeners(e),a=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1},new(o||(o=Promise))(function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function r(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):((i=t.value)instanceof o?i:new o(function(e){e(i)})).then(n,r)}s((h=h.apply(i,a||[])).next())})}emitSync(e,...t){s(e);let i=this.listeners(e),n=[];if(i&&i.length){for(let s=0;sthis.removeListener(e,t)),!0}return!1}}},{e8bdbc586c5c4645:"kaCjt","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],kaCjt:[function(e,t,i){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n},{}],"2SoND":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}],lJWkj:[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"2vvao":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return[];let n=Object.keys(e);if(0===n.length)return[];let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t{this.clearTarget()}),this.eventsManager.on("reldens.beforeSceneDynamicCreate",e=>{this.setupTabTarget(e)})}parseTemplate(e,t,i,n){return this.TemplateEngine.render(e,t,i,n)}updateGameSize(e){let{newWidth:t,newHeight:i}=this.getCurrentScreenSize(e);setTimeout(()=>{for(let e of(this.eventsManager.emit("reldens.updateGameSizeBefore",this,t,i),this.scale.setGameSize(t,i),Object.keys(this.uiScene.elementsUi))){let n=this.uiScene.elementsUi[e],r=l.get(this.uiScene.userInterfaces[e],"uiPositionKey",e),{uiX:s,uiY:a}=this.uiScene.getUiConfig(r,t,i);n.x=s,n.y=a}this.eventsManager.emit("reldens.updateGameSizeAfter",this,t,i)},e.config.getWithoutLogs("client/general/gameEngine/updateGameSizeTimeOut",500))}getCurrentScreenSize(e){let t=e.gameDom.getElement(".game-container").offsetWidth,i=e.gameDom.getElement(".game-container").offsetHeight,n=t,r=i,s=e.getActiveScene();return s&&s.map&&(n=Math.min(t,s.map.width*s.map.tileWidth),r=Math.min(i,s.map.height*s.map.tileHeight)),{newWidth:n=Math.min(n,Number(e.config.get("client/ui/maximum/x"))),newHeight:r=Math.min(r,Number(e.config.get("client/ui/maximum/y")))}}showTarget(e,t,i){l.hasOwn(this.uiScene,"uiTarget")&&(this.uiScene.uiTarget.getChildByID("box-target").style.display="block",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=this.targetDisplay(e,t)),this.eventsManager.emit("reldens.gameEngineShowTarget",this,t,i,e)}targetDisplay(e,t){let i=e;return o.TYPE_PLAYER===t.type&&(i+=this.generateTargetPlayedTime(t)),i}generateTargetPlayedTime(e){let t="",i=this.uiScene.gameManager.config.getWithoutLogs("client/players/playedTime/show",o.SHOW_PLAYER_TIME.ONLY_OWN_PLAYER);if(o.SHOW_PLAYER_TIME.NONE===i)return t;let n=this.uiScene.gameManager.getCurrentPlayer();if(o.SHOW_PLAYER_TIME.ALL_PLAYERS===i||n.playerId===e.id){let i=this.obtainPlayedTime(e,n);t+=this.createPlayedTimeLabel(i)}return t}createPlayedTimeLabel(e){let t=this.uiScene.gameManager.gameDom.createElement("p");return t.innerHTML=this.uiScene.gameManager.config.get("client/players/playedTime/label").replace("%playedTimeInHs",e),t.outerHTML}obtainPlayedTime(e,t){return(t.players[e.id].playedTime/60/60).toFixed(1)}clearTarget(){let e=this.uiScene.gameManager.activeRoomEvents.getActiveScene(),t=Object.assign({},e.player.currentTarget);l.hasOwn(this.uiScene,"uiTarget")&&(e.player.currentTarget=!1,this.uiScene.uiTarget.getChildByID("box-target").style.display="none",this.uiScene.uiTarget.getChildByID("target-container").innerHTML=""),this.eventsManager.emit("reldens.gameEngineClearTarget",this,t)}setupTabTarget(e){e.keyTab=e.input.keyboard.addKey(s.Keyboard.KeyCodes.TAB),e.input.keyboard.addCapture(s.Keyboard.KeyCodes.TAB),e.input.keyboard.on("keydown",e=>{9===e.keyCode&&this.tabTarget()})}tabTarget(){let e=this.uiScene.gameManager.getCurrentPlayer(),t=this.uiScene.gameManager.getActiveScene().objectsAnimations,i=e.players,n=!1,r="",s=!!e.currentTarget&&Object.assign({},e.currentTarget);for(let i of Object.keys(t)){if(!t[i].targetName)continue;let s=Math.hypot(t[i].x-e.state.x,t[i].y-e.state.y);e.currentTarget.id!==t[i].key&&(!n||n.dist>s)&&(n={id:t[i].key,type:h.TYPE_OBJECT,dist:s},r=t[i].targetName)}for(let t of Object.keys(i)){if(e.playerName===i[t].playerName)continue;let s=Math.hypot(i[t].x-e.state.x,i[t].y-e.state.y);e.currentTarget.id!==i[t].id&&(!n||n.dist>s)&&(n={id:t,type:o.TYPE_PLAYER,dist:s},r=i[t].playerName)}e.currentTarget=n,this.showTarget(r,n,s),this.eventsManager.emit("reldens.gameEngineTabTarget",this,n,s)}showFPS(){this.fpsCounter=new a(this.uiScene.gameManager.gameDom),this.fpsCounter.start()}}},{ba5852f7a848a882:"kOY07",de87093dc78fab7a:"8S6DV",cb52d956827ba0f7:"e7OdC",ef9f208014f49bfb:"93TbC","74f28c3d4fc67c29":"izuLV","2aadc4f845e0da5b":"3lwy5"}],kOY07:[function(e,t,i){var n;n=function(){/*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function i(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test,a=/\S/,o={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},h=/\s*/,c=/\s+/,l=/\s*=/,u=/\s*\}/,d=/#|\^|\/|>|\{|&|=|!/;function f(e){this.string=e,this.tail=e,this.pos=0}function p(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function g(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}f.prototype.eos=function(){return""===this.tail},f.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var i=t[0];return this.tail=this.tail.substring(i.length),this.pos+=i.length,i},f.prototype.scanUntil=function(e){var t,i=this.tail.search(e);switch(i){case -1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,i),this.tail=this.tail.substring(i)}return this.pos+=t.length,t},p.prototype.push=function(e){return new p(e,this)},p.prototype.lookup=function(e){var t=this.cache;if(t.hasOwnProperty(e))a=t[e];else{for(var n,s,a,o,h,c,l=this,u=!1;l;){if(e.indexOf(".")>0)for(o=l.view,h=e.split("."),c=0;null!=o&&c0?r[r.length-1][4]:i;break;default:n.push(t)}return i}(function(e){for(var t,i,n=[],r=0,s=e.length;r"===a?o=this.renderPartial(s,t,i,r):"&"===a?o=this.unescapedValue(s,t):"name"===a?o=this.escapedValue(s,t,r):"text"===a&&(o=this.rawValue(s)),void 0!==o&&(h+=o);return h},g.prototype.renderSection=function(e,n,r,s,a){var o=this,h="",c=n.lookup(e[1]);if(c){if(t(c))for(var l=0,u=c.length;l0||!i)&&(r[s]=n+r[s]);return r.join("\n")},g.prototype.renderPartial=function(e,t,n,r){if(n){var s=this.getConfigTags(r),a=i(n)?n(e[1]):n[e[1]];if(null!=a){var o=e[6],h=e[5],c=e[4],l=a;0==h&&c&&(l=this.indentPartial(a,c,o));var u=this.parse(l,s);return this.renderTokens(u,t,n,l,r)}}},g.prototype.unescapedValue=function(e,t){var i=t.lookup(e[1]);if(null!=i)return i},g.prototype.escapedValue=function(e,t,i){var n=this.getConfigEscape(i)||m.escape,r=t.lookup(e[1]);if(null!=r)return"number"==typeof r&&n===m.escape?String(r):n(r)},g.prototype.rawValue=function(e){return e[1]},g.prototype.getConfigTags=function(e){return t(e)?e:e&&"object"==typeof e?e.tags:void 0},g.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!t(e)?e.escape:void 0};var m={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(cache){v.templateCache=cache},get templateCache(){return v.templateCache}},v=new g;return m.clearCache=function(){return v.clearCache()},m.parse=function(e,t){return v.parse(e,t)},m.render=function(e,i,n,r){if("string"!=typeof e)throw TypeError('Invalid template! Template should be a "string" but "'+(t(e)?"array":typeof e)+'" was given as the first argument for mustache#render(template, view, partials)');return v.render(e,i,n,r)},m.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return o[e]})},m.Scanner=f,m.Context=p,m.Writer=g,m},t.exports=n()},{}],"8S6DV":[function(e,t,i){var n,r=e("57a99fe9b8471a10");n=()=>(()=>{var e={50792:e=>{var t=Object.prototype.hasOwnProperty,i="~";function n(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,n,s,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new r(n,s||e,a),h=i?i+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],o]:e._events[h].push(o):(e._events[h]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1)),o.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},o.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=Array(s);r{/** @@ -958,7 +958,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83419),r=i(25774),s=i(37277),a=i(44594),o=new n({Extends:r,initialize:function(e){r.call(this),this.checkQueue=!0,this.scene=e,this.systems=e.sys,e.sys.events.once(a.BOOT,this.boot,this),e.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(a.PRE_UPDATE,this.update,this),e.on(a.UPDATE,this.sceneUpdate,this),e.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,t){for(var i=this._active,n=i.length,r=0;r{e.exports=function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p){var g=i.x-t.displayOriginX+r,m=i.y-t.displayOriginY+s,v=g+i.w,y=m+i.h,b=a.a,x=a.b,E=a.c,w=a.d,T=a.e,S=a.f,A=g*b+m*E+T,C=g*x+m*w+S,_=g*b+y*E+T,I=g*x+y*w+S,O=v*b+y*E+T,P=v*x+y*w+S,M=v*b+m*E+T,R=v*x+m*w+S;o&&(A=Math.round(A),C=Math.round(C),_=Math.round(_),I=Math.round(I),O=Math.round(O),P=Math.round(P),M=Math.round(M),R=Math.round(R)),e.batchQuad(t,A,C,_,I,O,P,M,R,n.u0,n.v0,n.u1,n.v1,h,c,l,u,d,f,p)}},53048:e=>{e.exports=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,a,o=e.text,h=o.length,c=e.maxWidth,l=e.wordWrapCharCode,u=Number.MAX_VALUE,d=Number.MAX_VALUE,f=0,p=0,g=e.fontData.chars,m=e.fontData.lineHeight,v=e.letterSpacing,y=e.lineSpacing,b=0,x=0,E=0,w=null,T=e._align,S=0,A=0,C=e.fontSize/e.fontData.size,_=C*e.scaleX,I=C*e.scaleY,O=null,P=0,M=[],R=Number.MAX_VALUE,L=0,D=0,k=0,N=[],F=[],B=null;if(c>0){a=o.split("\n");var U=[];for(r=0;rL&&(L=k),kS&&(u=S),d>A&&(d=A);var X=S+w.xAdvance,q=A+m;fL&&(L=k),k0)for(var J=0;J{/** + */var n=i(83419),r=i(25774),s=i(37277),a=i(44594),o=new n({Extends:r,initialize:function(e){r.call(this),this.checkQueue=!0,this.scene=e,this.systems=e.sys,e.sys.events.once(a.BOOT,this.boot,this),e.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(a.PRE_UPDATE,this.update,this),e.on(a.UPDATE,this.sceneUpdate,this),e.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,t){for(var i=this._active,n=i.length,r=0;r{e.exports=function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p){var g=i.x-t.displayOriginX+r,m=i.y-t.displayOriginY+s,v=g+i.w,y=m+i.h,b=a.a,x=a.b,E=a.c,w=a.d,T=a.e,S=a.f,A=g*b+m*E+T,C=g*x+m*w+S,_=g*b+y*E+T,I=g*x+y*w+S,O=v*b+y*E+T,P=v*x+y*w+S,M=v*b+m*E+T,R=v*x+m*w+S;o&&(A=Math.round(A),C=Math.round(C),_=Math.round(_),I=Math.round(I),O=Math.round(O),P=Math.round(P),M=Math.round(M),R=Math.round(R)),e.batchQuad(t,A,C,_,I,O,P,M,R,n.u0,n.v0,n.u1,n.v1,h,c,l,u,d,f,p)}},53048:e=>{e.exports=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,a,o=e.text,h=o.length,c=e.maxWidth,l=e.wordWrapCharCode,u=Number.MAX_VALUE,d=Number.MAX_VALUE,f=0,p=0,g=e.fontData.chars,m=e.fontData.lineHeight,v=e.letterSpacing,y=e.lineSpacing,b=0,x=0,E=0,w=null,T=e._align,S=0,A=0,C=e.fontSize/e.fontData.size,_=C*e.scaleX,I=C*e.scaleY,O=null,P=0,M=[],R=Number.MAX_VALUE,L=0,D=0,k=0,N=[],F=[],B=null;if(c>0){a=o.split("\n");var U=[];for(r=0;rL&&(L=k),kS&&(u=S),d>A&&(d=A);var X=S+w.xAdvance,K=A+m;fL&&(L=k),k0)for(var J=0;J{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -998,7 +998,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(91296),r=i(61340),s=i(70554),a=new r;e.exports=function(e,t,i,r){var o,h,c=t.text,l=c.length;if(0!==l){i.addToRenderList(t);var u=e.pipelines.set(t.pipeline,t),d=n(t,i,r);e.pipelines.preBatch(t);var f=d.sprite,p=d.calc,g=t.cropWidth>0||t.cropHeight>0;g&&(u.flush(),e.pushScissor(p.tx,p.ty,t.cropWidth*p.scaleX,t.cropHeight*p.scaleY));var m=t.frame.glTexture,v=t.tintFill,y=s.getTintAppendFloatAlpha(t.tintTopLeft,i.alpha*t._alphaTL),b=s.getTintAppendFloatAlpha(t.tintTopRight,i.alpha*t._alphaTR),x=s.getTintAppendFloatAlpha(t.tintBottomLeft,i.alpha*t._alphaBL),E=s.getTintAppendFloatAlpha(t.tintBottomRight,i.alpha*t._alphaBR),w=u.setGameObject(t),T=0,S=0,A=0,C=0,_=t.letterSpacing,I=0,O=0,P=t.scrollX,M=t.scrollY,R=t.fontData,L=R.chars,D=R.lineHeight,k=t.fontSize/R.size,N=0,F=t._align,B=0,U=0,V=t.getTextBounds(!1);t.maxWidth>0&&(l=(c=V.wrappedText).length);var G=t._bounds.lines;1===F?U=(G.longest-G.lengths[0])/2:2===F&&(U=G.longest-G.lengths[0]);for(var j=i.roundPixels,W=t.displayCallback,Y=t.callbackData,H=0;H{/** + */var n=i(91296),r=i(61340),s=i(70554),a=new r;e.exports=function(e,t,i,r){var o,h,c=t.text,l=c.length;if(0!==l){i.addToRenderList(t);var u=e.pipelines.set(t.pipeline,t),d=n(t,i,r);e.pipelines.preBatch(t);var f=d.sprite,p=d.calc,g=t.cropWidth>0||t.cropHeight>0;g&&(u.flush(),e.pushScissor(p.tx,p.ty,t.cropWidth*p.scaleX,t.cropHeight*p.scaleY));var m=t.frame.glTexture,v=t.tintFill,y=s.getTintAppendFloatAlpha(t.tintTopLeft,i.alpha*t._alphaTL),b=s.getTintAppendFloatAlpha(t.tintTopRight,i.alpha*t._alphaTR),x=s.getTintAppendFloatAlpha(t.tintBottomLeft,i.alpha*t._alphaBL),E=s.getTintAppendFloatAlpha(t.tintBottomRight,i.alpha*t._alphaBR),w=u.setGameObject(t),T=0,S=0,A=0,C=0,_=t.letterSpacing,I=0,O=0,P=t.scrollX,M=t.scrollY,R=t.fontData,L=R.chars,D=R.lineHeight,k=t.fontSize/R.size,N=0,F=t._align,B=0,U=0,V=t.getTextBounds(!1);t.maxWidth>0&&(l=(c=V.wrappedText).length);var G=t._bounds.lines;1===F?U=(G.longest-G.lengths[0])/2:2===F&&(U=G.longest-G.lengths[0]);for(var j=i.roundPixels,W=t.displayCallback,Y=t.callbackData,H=0;H{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2120,7 +2120,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83997),r=i(95540),s=i(37867),a=i(25836),o=i(39318),h=new a,c=new a,l=new s;e.exports=function(e){var t,i,s,a=r(e,"mesh"),u=r(e,"texture",null),d=r(e,"frame"),f=r(e,"width",1),p=r(e,"height",f),g=r(e,"widthSegments",1),m=r(e,"heightSegments",g),v=r(e,"x",0),y=r(e,"y",0),b=r(e,"z",0),x=r(e,"rotateX",0),E=r(e,"rotateY",0),w=r(e,"rotateZ",0),T=r(e,"zIsUp",!0),S=r(e,"isOrtho",!!a&&a.dirtyCache[11]),A=r(e,"colors",[16777215]),C=r(e,"alphas",[1]),_=r(e,"tile",!1),I=r(e,"flipY",!1),O=r(e,"width",null),P={faces:[],verts:[]};if(h.set(v,y,b),c.set(x,E,w),l.fromRotationXYTranslation(c,h,T),!u&&a)u=a.texture,d||(t=a.frame);else if(a&&"string"==typeof u)u=a.scene.sys.textures.get(u);else if(!u)return P;t||(t=u.get(d)),!O&&S&&u&&a&&(f=t.width/a.height,p=t.height/a.height);var M=f/2,R=p/2,L=Math.floor(g),D=Math.floor(m),k=L+1,N=D+1,F=f/L,B=p/D,U=[],V=[],G=0,j=1,W=0,Y=1;t&&(G=t.u0,j=t.u1,I?(W=t.v1,Y=t.v0):(W=t.v0,Y=t.v1));var H=j-G,z=Y-W;for(s=0;s{/** + */var n=i(83997),r=i(95540),s=i(37867),a=i(25836),o=i(39318),h=new a,c=new a,l=new s;e.exports=function(e){var t,i,s,a=r(e,"mesh"),u=r(e,"texture",null),d=r(e,"frame"),f=r(e,"width",1),p=r(e,"height",f),g=r(e,"widthSegments",1),m=r(e,"heightSegments",g),v=r(e,"x",0),y=r(e,"y",0),b=r(e,"z",0),x=r(e,"rotateX",0),E=r(e,"rotateY",0),w=r(e,"rotateZ",0),T=r(e,"zIsUp",!0),S=r(e,"isOrtho",!!a&&a.dirtyCache[11]),A=r(e,"colors",[16777215]),C=r(e,"alphas",[1]),_=r(e,"tile",!1),I=r(e,"flipY",!1),O=r(e,"width",null),P={faces:[],verts:[]};if(h.set(v,y,b),c.set(x,E,w),l.fromRotationXYTranslation(c,h,T),!u&&a)u=a.texture,d||(t=a.frame);else if(a&&"string"==typeof u)u=a.scene.sys.textures.get(u);else if(!u)return P;t||(t=u.get(d)),!O&&S&&u&&a&&(f=t.width/a.height,p=t.height/a.height);var M=f/2,R=p/2,L=Math.floor(g),D=Math.floor(m),k=L+1,N=D+1,F=f/L,B=p/D,U=[],V=[],G=0,j=1,W=0,Y=1;t&&(G=t.u0,j=t.u1,I?(W=t.v1,Y=t.v0):(W=t.v0,Y=t.v1));var H=j-G,z=Y-W;for(s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3385,7 +3385,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */e.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(e,t,i)=>{var n,r={};e.exports=r;var s=i(41598),a=i(31725),o=i(53614),h=i(53402),c=i(15647),l=i(66615);r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=1e3/60,r.create=function(e){var t={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:e.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(t.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var i=h.extend(t,e);return n(i,e),i.setOnCollideWith=function(e,t){return t?this.onCollideWith[e.id]=t:delete this.onCollideWith[e.id],this},i},r.nextGroup=function(e){return e?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory},n=function(e,t){if(t=t||{},r.set(e,{bounds:e.bounds||c.create(e.vertices),positionPrev:e.positionPrev||a.clone(e.position),anglePrev:e.anglePrev||e.angle,vertices:e.vertices,parts:e.parts||[e],isStatic:e.isStatic,isSleeping:e.isSleeping,parent:e.parent||e}),s.rotate(e.vertices,e.angle,e.position),l.rotate(e.axes,e.angle),c.update(e.bounds,e.vertices,e.velocity),r.set(e,{axes:t.axes||e.axes,area:t.area||e.area,mass:t.mass||e.mass,inertia:t.inertia||e.inertia}),1===e.parts.length){var i=e.bounds,n=e.centerOfMass,o=e.centerOffset,h=i.max.x-i.min.x,u=i.max.y-i.min.y;n.x=-(i.min.x-e.position.x)/h,n.y=-(i.min.y-e.position.y)/u,o.x=h*n.x,o.y=u*n.y}},r.set=function(e,t,i){var n;for(n in"string"==typeof t&&(n=t,(t={})[n]=i),t)if(Object.prototype.hasOwnProperty.call(t,n))switch(i=t[n],n){case"isStatic":r.setStatic(e,i);break;case"isSleeping":o.set(e,i);break;case"mass":r.setMass(e,i);break;case"density":r.setDensity(e,i);break;case"inertia":r.setInertia(e,i);break;case"vertices":r.setVertices(e,i);break;case"position":r.setPosition(e,i);break;case"angle":r.setAngle(e,i);break;case"velocity":r.setVelocity(e,i);break;case"angularVelocity":r.setAngularVelocity(e,i);break;case"speed":r.setSpeed(e,i);break;case"angularSpeed":r.setAngularSpeed(e,i);break;case"parts":r.setParts(e,i);break;case"centre":r.setCentre(e,i);break;default:e[n]=i}},r.setStatic=function(e,t){for(var i=0;i0&&a.rotateAbout(o.position,n,e.position,o.position)}},r.setVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.positionPrev.x=e.position.x-t.x*i,e.positionPrev.y=e.position.y-t.y*i,e.velocity.x=(e.position.x-e.positionPrev.x)/i,e.velocity.y=(e.position.y-e.positionPrev.y)/i,e.speed=a.magnitude(e.velocity)},r.getVelocity=function(e){var t=r._baseDelta/e.deltaTime;return{x:(e.position.x-e.positionPrev.x)*t,y:(e.position.y-e.positionPrev.y)*t}},r.getSpeed=function(e){return a.magnitude(r.getVelocity(e))},r.setSpeed=function(e,t){r.setVelocity(e,a.mult(a.normalise(r.getVelocity(e)),t))},r.setAngularVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.anglePrev=e.angle-t*i,e.angularVelocity=(e.angle-e.anglePrev)/i,e.angularSpeed=Math.abs(e.angularVelocity)},r.getAngularVelocity=function(e){return(e.angle-e.anglePrev)*r._baseDelta/e.deltaTime},r.getAngularSpeed=function(e){return Math.abs(r.getAngularVelocity(e))},r.setAngularSpeed=function(e,t){r.setAngularVelocity(e,h.sign(r.getAngularVelocity(e))*t)},r.translate=function(e,t,i){r.setPosition(e,a.add(e.position,t),i)},r.rotate=function(e,t,i,n){if(i){var s=Math.cos(t),a=Math.sin(t),o=e.position.x-i.x,h=e.position.y-i.y;r.setPosition(e,{x:i.x+(o*s-h*a),y:i.y+(o*a+h*s)},n),r.setAngle(e,e.angle+t,n)}else r.setAngle(e,e.angle+t,n)},r.scale=function(e,t,i,n){var a=0,o=0;n=n||e.position;for(var h=e.inertia===1/0,u=0;u0&&(a+=d.area,o+=d.inertia),d.position.x=n.x+(d.position.x-n.x)*t,d.position.y=n.y+(d.position.y-n.y)*i,c.update(d.bounds,d.vertices,e.velocity)}e.parts.length>1&&(e.area=a,e.isStatic||(r.setMass(e,e.density*a),r.setInertia(e,o))),e.circleRadius&&(t===i?e.circleRadius*=t:e.circleRadius=null),h&&r.setInertia(e,1/0)},r.update=function(e,t){var i=(t=(void 0!==t?t:1e3/60)*e.timeScale)*t,n=r._timeCorrection?t/(e.deltaTime||t):1,o=1-e.frictionAir*(t/h._baseDelta),u=(e.position.x-e.positionPrev.x)*n,d=(e.position.y-e.positionPrev.y)*n;e.velocity.x=u*o+e.force.x/e.mass*i,e.velocity.y=d*o+e.force.y/e.mass*i,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.deltaTime=t,e.angularVelocity=(e.angle-e.anglePrev)*o*n+e.torque/e.inertia*i,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=a.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var f=0;f0&&(p.position.x+=e.velocity.x,p.position.y+=e.velocity.y),0!==e.angularVelocity&&(s.rotate(p.vertices,e.angularVelocity,e.position),l.rotate(p.axes,e.angularVelocity),f>0&&a.rotateAbout(p.position,e.angularVelocity,e.position,p.position)),c.update(p.bounds,p.vertices,e.velocity)}},r.updateVelocities=function(e){var t=r._baseDelta/e.deltaTime,i=e.velocity;i.x=(e.position.x-e.positionPrev.x)*t,i.y=(e.position.y-e.positionPrev.y)*t,e.speed=Math.sqrt(i.x*i.x+i.y*i.y),e.angularVelocity=(e.angle-e.anglePrev)*t,e.angularSpeed=Math.abs(e.angularVelocity)},r.applyForce=function(e,t,i){var n={x:t.x-e.position.x,y:t.y-e.position.y};e.force.x+=i.x,e.force.y+=i.y,e.torque+=n.x*i.y-n.y*i.x},r._totalProperties=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===e.parts.length?0:1;i{var n={};e.exports=n;var r=i(35810),s=i(53402),a=i(15647),o=i(22562);n.create=function(e){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},n.setModified=function(e,t,i,s){if(r.trigger(e,"compositeModified",e),e.isModified=t,t&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),i&&e.parent&&n.setModified(e.parent,t,i,s),s)for(var a=0;a{var n={};e.exports=n;var r=i(69351);n.create=r.create,n.add=r.add,n.remove=r.remove,n.clear=r.clear,n.addComposite=r.addComposite,n.addBody=r.addBody,n.addConstraint=r.addConstraint},52284:(e,t,i)=>{var n,r,s,a={};e.exports=a;var o=i(41598),h=i(4506);n=[],r={overlap:0,axis:null},s={overlap:0,axis:null},a.create=function(e,t){return{pair:null,collided:!1,bodyA:e,bodyB:t,parentA:e.parent,parentB:t.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},a.collides=function(e,t,i){if(a._overlapAxes(r,e.vertices,t.vertices,e.axes),r.overlap<=0||(a._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0))return null;var n,c,l=i&&i.table[h.id(e,t)];l?c=l.collision:((c=a.create(e,t)).collided=!0,c.bodyA=e.id=0&&(v=-v,y=-y),u.x=v,u.y=y,d.x=-y,d.y=v,f.x=v*g,f.y=y*g,c.depth=g;var b=a._findSupports(e,t,u,1),x=0;if(o.contains(e.vertices,b[0])&&(p[x++]=b[0]),o.contains(e.vertices,b[1])&&(p[x++]=b[1]),x<2){var E=a._findSupports(t,e,u,-1);o.contains(t.vertices,E[0])&&(p[x++]=E[0]),x<2&&o.contains(t.vertices,E[1])&&(p[x++]=E[1])}return 0===x&&(p[x++]=b[0]),c.supportCount=x,c},a._overlapAxes=function(e,t,i,n){var r,s,a,o,h,c,l=t.length,u=i.length,d=t[0].x,f=t[0].y,p=i[0].x,g=i[0].y,m=n.length,v=Number.MAX_VALUE,y=0;for(h=0;hS?S=o:oA?A=o:o{var t={};e.exports=t,t.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}},81388:(e,t,i)=>{var n={};e.exports=n;var r=i(53402),s=i(52284);n.create=function(e){return r.extend({bodies:[],collisions:[],pairs:null},e)},n.setBodies=function(e,t){e.bodies=t.slice(0)},n.clear=function(e){e.bodies=[],e.collisions=[]},n.collisions=function(e){var t,i,r=e.pairs,a=e.bodies,o=a.length,h=n.canCollide,c=s.collides,l=e.collisions,u=0;for(a.sort(n._compareBoundsX),t=0;tp)break;if(!(gE.max.y)&&(!v||!x.isStatic&&!x.isSleeping)&&h(d.collisionFilter,x.collisionFilter)){var w=x.parts.length;if(b&&1===w){var T=c(d,x,r);T&&(l[u++]=T)}else for(var S=y>1?1:0,A=w>1?1:0,C=S;CE.max.x)&&!(f.max.xE.max.y)){var T=c(_,O,r);T&&(l[u++]=T)}}}}}return l.length!==u&&(l.length=u),l},n.canCollide=function(e,t){return e.group===t.group&&0!==e.group?e.group>0:(e.mask&t.category)!=0&&(t.mask&e.category)!=0},n._compareBoundsX=function(e,t){return e.bounds.min.x-t.bounds.min.x}},4506:(e,t,i)=>{var n={};e.exports=n;var r=i(43424);n.create=function(e,t){var i=e.bodyA,s=e.bodyB,a={id:n.id(i,s),bodyA:i,bodyB:s,collision:e,contacts:[r.create(),r.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:t,timeUpdated:t,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(a,e,t),a},n.update=function(e,t,i){var n=t.supports,r=t.supportCount,s=e.contacts,a=t.parentA,o=t.parentB;e.isActive=!0,e.timeUpdated=i,e.collision=t,e.separation=t.depth,e.inverseMass=a.inverseMass+o.inverseMass,e.friction=a.frictiono.frictionStatic?a.frictionStatic:o.frictionStatic,e.restitution=a.restitution>o.restitution?a.restitution:o.restitution,e.slop=a.slop>o.slop?a.slop:o.slop,e.contactCount=r,t.pair=e;var h=n[0],c=s[0],l=n[1],u=s[1];(u.vertex===h||c.vertex===l)&&(s[1]=c,s[0]=c=u,u=s[1]),c.vertex=h,u.vertex=l},n.setActive=function(e,t,i){t?(e.isActive=!0,e.timeUpdated=i):(e.isActive=!1,e.contactCount=0)},n.id=function(e,t){return e.id{var n={};e.exports=n;var r=i(4506),s=i(53402);n.create=function(e){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},n.update=function(e,t,i){var n,s,a,o=r.update,h=r.create,c=r.setActive,l=e.table,u=e.list,d=u.length,f=d,p=e.collisionStart,g=e.collisionEnd,m=e.collisionActive,v=t.length,y=0,b=0,x=0;for(a=0;a=i?u[f++]=s:(c(s,!1,i),s.collision.bodyA.sleepCounter>0&&s.collision.bodyB.sleepCounter>0?u[f++]=s:(g[b++]=s,delete l[s.id]));u.length!==f&&(u.length=f),p.length!==y&&(p.length=y),g.length!==b&&(g.length=b),m.length!==x&&(m.length=x)},n.clear=function(e){return e.table={},e.list.length=0,e.collisionStart.length=0,e.collisionActive.length=0,e.collisionEnd.length=0,e}},73296:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(52284),a=i(15647),o=i(66280),h=i(41598);n.collides=function(e,t){for(var i=[],n=t.length,r=e.bounds,o=s.collides,h=a.overlaps,c=0;c{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(e){var t,i,n,r=e.length;for(t=0;tz?(r=W>0?W:-W,(i=g.friction*(W>0?1:-1)*c)<-r?i=-r:i>r&&(i=r)):(i=W,r=f);var X=N*x-F*b,q=B*x-U*b,K=_/(T+v.inverseInertia*X*X+y.inverseInertia*q*q),J=(1+g.restitution)*j*K;if(i*=K,j0&&(D.normalImpulse=0),J=D.normalImpulse-$}if(W<-u||W>u)D.tangentImpulse=0;else{var Q=D.tangentImpulse;D.tangentImpulse+=i,D.tangentImpulse<-r&&(D.tangentImpulse=-r),D.tangentImpulse>r&&(D.tangentImpulse=r),i=D.tangentImpulse-Q}var Z=b*J+E*i,ee=x*J+w*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=Z*v.inverseMass,v.positionPrev.y+=ee*v.inverseMass,v.anglePrev+=(N*ee-F*Z)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=Z*y.inverseMass,y.positionPrev.y-=ee*y.inverseMass,y.anglePrev-=(B*ee-U*Z)*y.inverseInertia)}}}}},48140:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(31725),a=i(53614),o=i(15647),h=i(66615),c=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(e){e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var t=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,i=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,n=s.magnitude(s.sub(t,i));e.length=void 0!==e.length?e.length:n,e.id=e.id||c.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var r={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(r.type="pin",r.anchors=!1):e.stiffness<.9&&(r.type="spring"),e.render=c.extend(r,e.render),e},n.preSolveAll=function(e){for(var t=0;t=1||0===e.length?e.stiffness*t:e.stiffness*t*t,b=e.damping*t,x=s.mult(l,v*y),E=(i?i.inverseMass:0)+(r?r.inverseMass:0),w=E+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(b>0){var T=s.create();p=s.div(l,u),m=s.sub(r&&s.sub(r.position,r.positionPrev)||T,i&&s.sub(i.position,i.positionPrev)||T),g=s.dot(p,m)}i&&!i.isStatic&&(f=i.inverseMass/E,i.constraintImpulse.x-=x.x*f,i.constraintImpulse.y-=x.y*f,i.position.x-=x.x*f,i.position.y-=x.y*f,b>0&&(i.positionPrev.x-=b*p.x*g*f,i.positionPrev.y-=b*p.y*g*f),d=s.cross(a,x)/w*n._torqueDampen*i.inverseInertia*(1-e.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),r&&!r.isStatic&&(f=r.inverseMass/E,r.constraintImpulse.x+=x.x*f,r.constraintImpulse.y+=x.y*f,r.position.x+=x.x*f,r.position.y+=x.y*f,b>0&&(r.positionPrev.x+=b*p.x*g*f,r.positionPrev.y+=b*p.y*g*f),d=s.cross(o,x)/w*n._torqueDampen*r.inverseInertia*(1-e.angularStiffness),r.constraintImpulse.angle+=d,r.angle+=d)}}},n.postSolveAll=function(e){for(var t=0;t0&&(u.position.x+=c.x,u.position.y+=c.y),0!==c.angle&&(r.rotate(u.vertices,c.angle,i.position),h.rotate(u.axes,c.angle),l>0&&s.rotateAbout(u.position,c.angle,i.position,u.position)),o.update(u.bounds,u.vertices,i.velocity)}c.angle*=n._warming,c.x*=n._warming,c.y*=n._warming}}},n.pointAWorld=function(e){return{x:(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),y:(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0)}},n.pointBWorld=function(e){return{x:(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),y:(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0)}},n.currentLength=function(e){var t=(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),i=(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0),n=(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),r=(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0),s=t-n,a=i-r;return Math.sqrt(s*s+a*a)}},53402:(e,t,i)=>{var n,r={};e.exports=r,r._baseDelta=1e3/60,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(e,t){var i,n;"boolean"==typeof t?(i=2,n=t):(i=1,n=!0);for(var s=i;s0;t--){var i=Math.floor(r.random()*(t+1)),n=e[t];e[t]=e[i],e[i]=n}return e},r.choose=function(e){return e[Math.floor(r.random()*e.length)]},r.isElement=function(e){return"undefined"!=typeof HTMLElement?e instanceof HTMLElement:!!(e&&e.nodeType&&e.nodeName)},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isFunction=function(e){return"function"==typeof e},r.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},r.isString=function(e){return"[object String]"===toString.call(e)},r.clamp=function(e,t,i){return ei?i:e},r.sign=function(e){return e<0?-1:1},r.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-r._nowStartTime},r.random=function(e,t){return t=void 0!==t?t:1,(e=void 0!==e?e:0)+n()*(t-e)},n=function(){return r._seed=(9301*r._seed+49297)%233280,r._seed/233280},r.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var e=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[e]||(r.warn(e),r._warnedOnce[e]=!0)},r.deprecated=function(e,t,i){e[t]=r.chain(function(){r.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",i)},e[t])},r.nextId=function(){return r._nextId++},r.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0;i{var n={};e.exports=n;var r=i(53614),s=i(66272),a=i(81388),o=i(99561),h=i(35810),c=i(69351),l=i(48140),u=i(53402),d=i(22562);n._deltaMax=1e3/60,n.create=function(e){e=e||{};var t=u.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},e);return t.world=e.world||c.create({label:"World"}),t.pairs=e.pairs||o.create(),t.detector=e.detector||a.create(),t.detector.pairs=t.pairs,t.grid={buckets:[]},t.world.gravity=t.gravity,t.broadphase=t.grid,t.metrics={},t},n.update=function(e,t){var i,d=u.now(),f=e.world,p=e.detector,g=e.pairs,m=e.timing,v=m.timestamp;t>n._deltaMax&&u.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",n._deltaMax.toFixed(3),"ms."),t=(void 0!==t?t:u._baseDelta)*m.timeScale,m.timestamp+=t,m.lastDelta=t;var y={timestamp:m.timestamp,delta:t};h.trigger(e,"beforeUpdate",y);var b=c.allBodies(f),x=c.allConstraints(f),E=c.allComposites(f);for(f.isModified&&(a.setBodies(p,b),c.setModified(f,!1,!1,!0)),e.enableSleeping&&r.update(b,t),n._bodiesApplyGravity(b,e.gravity),n.wrap(b,E),n.attractors(b),t>0&&n._bodiesUpdate(b,t),h.trigger(e,"beforeSolve",y),l.preSolveAll(b),i=0;i0&&h.trigger(e,"collisionStart",{pairs:g.collisionStart,timestamp:m.timestamp,delta:t});var T=u.clamp(20/e.positionIterations,0,1);for(s.preSolvePosition(g.list),i=0;i0&&h.trigger(e,"collisionActive",{pairs:g.collisionActive,timestamp:m.timestamp,delta:t}),g.collisionEnd.length>0&&h.trigger(e,"collisionEnd",{pairs:g.collisionEnd,timestamp:m.timestamp,delta:t}),n._bodiesClearForces(b),h.trigger(e,"afterUpdate",y),e.timing.lastElapsed=u.now()-d,e},n.merge=function(e,t){if(u.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var i=c.allBodies(e.world),s=0;s0)for(var r=0;r{var n={};e.exports=n;var r=i(53402);n.on=function(e,t,i){for(var n,r=t.split(" "),s=0;s0){i||(i={}),n=t.split(" ");for(var c=0;c{var n={};e.exports=n;var r=i(73832),s=i(53402);n.name="matter-js",n.version="0.20.0",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathAfter(n,e,t)}},73832:(e,t,i)=>{var n={};e.exports=n;var r=i(53402);n._registry={},n.register=function(e){if(n.isPlugin(e)||r.warn("Plugin.register:",n.toString(e),"does not implement all required fields."),e.name in n._registry){var t=n._registry[e.name],i=n.versionParse(e.version).number,s=n.versionParse(t.version).number;i>s?(r.warn("Plugin.register:",n.toString(t),"was upgraded to",n.toString(e)),n._registry[e.name]=e):i-1},n.isFor=function(e,t){var i=e.for&&n.dependencyParse(e.for);return!e.for||t.name===i.name&&n.versionSatisfies(t.version,i.range)},n.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0===e.uses.length){r.warn("Plugin.use:",n.toString(e),"does not specify any dependencies to install.");return}for(var i=n.dependencies(e),s=r.topologicalSort(i),a=[],o=0;o0&&!h.silent&&r.info(a.join(" "))},n.dependencies=function(e,t){var i=n.dependencyParse(e),s=i.name;if(!(s in(t=t||{}))){e=n.resolve(e)||e,t[s]=r.map(e.uses||[],function(t){n.isPlugin(t)&&n.register(t);var s=n.dependencyParse(t),a=n.resolve(t);return a&&!n.versionSatisfies(a.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(a),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),a._warned=!0,e._warned=!0):a||(r.warn("Plugin.dependencies:",n.toString(t),"used by",n.toString(i),"could not be resolved."),e._warned=!0),s.name});for(var a=0;a=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;t.test(e)||r.warn("Plugin.versionParse:",e,"is not a valid version or range.");var i=t.exec(e),n=Number(i[4]),s=Number(i[5]),a=Number(i[6]);return{isRange:!!(i[1]||i[2]),version:i[3],range:e,operator:i[1]||i[2]||"",major:n,minor:s,patch:a,parts:[n,s,a],prerelease:i[7],number:1e8*n+1e4*s+a}},n.versionSatisfies=function(e,t){t=t||"*";var i=n.versionParse(t),r=n.versionParse(e);if(i.isRange){if("*"===i.operator||"*"===e)return!0;if(">"===i.operator)return r.number>i.number;if(">="===i.operator)return r.number>=i.number;if("~"===i.operator)return r.major===i.major&&r.minor===i.minor&&r.patch>=i.patch;if("^"===i.operator)return i.major>0?r.major===i.major&&r.number>=i.number:i.minor>0?r.minor===i.minor&&r.patch>=i.patch:r.patch===i.patch}return e===t||"*"===e}},13037:(e,t,i)=>{var n,r={};e.exports=r;var s=i(35810),a=i(48413),o=i(53402);r._maxFrameDelta=1e3/15,r._frameDeltaFallback=1e3/60,r._timeBufferMargin=1.5,r._elapsedNextEstimate=1,r._smoothingLowerBound=.1,r._smoothingUpperBound=.9,r.create=function(e){var t=o.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},e);return t.fps=0,t},r.run=function(e,t){return e.timeBuffer=r._frameDeltaFallback,function i(n){e.frameRequestId=r._onNextFrame(e,i),n&&e.enabled&&r.tick(e,t,n)}(),e},r.tick=function(e,t,i){var h=o.now(),c=e.delta,l=0,u=i-e.timeLastTick;if((!u||!e.timeLastTick||u>Math.max(r._maxFrameDelta,e.maxFrameTime))&&(u=e.frameDelta||r._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(u),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var d=e.frameDeltaHistory.slice(0).sort();u=n(e.frameDeltaHistory.slice(d.length*r._smoothingLowerBound,d.length*r._smoothingUpperBound))||u}e.frameDeltaSnapping&&(u=1e3/Math.round(1e3/u)),e.frameDelta=u,e.timeLastTick=i,e.timeBuffer+=e.frameDelta,e.timeBuffer=o.clamp(e.timeBuffer,0,e.frameDelta+c*r._timeBufferMargin),e.lastUpdatesDeferred=0;var f=e.maxUpdates||Math.ceil(e.maxFrameTime/c),p={timestamp:t.timing.timestamp};s.trigger(e,"beforeTick",p),s.trigger(e,"tick",p);for(var g=o.now();c>0&&e.timeBuffer>=c*r._timeBufferMargin;){s.trigger(e,"beforeUpdate",p),a.update(t,c),s.trigger(e,"afterUpdate",p),e.timeBuffer-=c,l+=1;var m=o.now()-h,v=o.now()-g,y=m+r._elapsedNextEstimate*v/l;if(l>=f||y>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/c-r._timeBufferMargin));break}}t.timing.lastUpdatesPerFrame=l,s.trigger(e,"afterTick",p),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/c)>f?o.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&o.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==e.isFixed&&o.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&o.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==e.fps&&o.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},r.stop=function(e){r._cancelNextFrame(e)},r._onNextFrame=function(e,t){if("undefined"!=typeof window&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(t);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},r._cancelNextFrame=function(e){if("undefined"!=typeof window&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")},n=function(e){for(var t=0,i=e.length,n=0;n{var n={};e.exports=n;var r=i(22562),s=i(35810),a=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(e,t){for(var i=t/a._baseDelta,s=n._motionSleepThreshold,o=0;o0&&h.motion=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},n.afterCollisions=function(e){for(var t=n._motionSleepThreshold,i=0;it&&n.set(h,!1)}}}},n.set=function(e,t){var i=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,i||s.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,i&&s.trigger(e,"sleepEnd"))}},66280:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(22562),o=i(15647),h=i(31725);n.rectangle=function(e,t,i,n,o){o=o||{};var h={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(o.chamfer){var c=o.chamfer;h.vertices=r.chamfer(h.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete o.chamfer}return a.create(s.extend({},h,o))},n.trapezoid=function(e,t,i,n,o,h){h=h||{},o>=1&&s.warn("Bodies.trapezoid: slope parameter must be < 1.");var c,l=(1-2*(o*=.5))*i,u=i*o,d=u+l,f=d+u;c=o<.5?"L 0 0 L "+u+" "+-n+" L "+d+" "+-n+" L "+f+" 0":"L 0 0 L "+d+" "+-n+" L "+f+" 0";var p={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(h.chamfer){var g=h.chamfer;p.vertices=r.chamfer(p.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete h.chamfer}return a.create(s.extend({},p,h))},n.circle=function(e,t,i,r,a){r=r||{};var o=Math.ceil(Math.max(10,Math.min(a=a||25,i)));return o%2==1&&(o+=1),n.polygon(e,t,o,i,s.extend({},{label:"Circle Body",circleRadius:i},r))},n.polygon=function(e,t,i,o,h){if(h=h||{},i<3)return n.circle(e,t,o,h);for(var c=2*Math.PI/i,l="",u=.5*c,d=0;d0&&r.area(C)1?(p=a.create(s.extend({parts:g.slice(0)},n)),a.setPosition(p,{x:e,y:t}),p):g[0]},n.flagCoincidentParts=function(e,t){void 0===t&&(t=5);for(var i=0;i{var n={};e.exports=n;var r=i(69351),s=i(48140),a=i(53402),o=i(22562),h=i(66280);n.stack=function(e,t,i,n,s,a,h){for(var c,l=r.create({label:"Stack"}),u=e,d=t,f=0,p=0;pg&&(g=y),o.translate(v,{x:.5*b,y:.5*y}),u=v.bounds.max.x+s,r.addBody(l,v),c=v,f+=1}else u+=s}d+=g+a,u=e}return l},n.chain=function(e,t,i,n,o,h){for(var c=e.bodies,l=1;l0)for(c=0;c0&&(d=f[c-1+(h-1)*t],r.addConstraint(e,s.create(a.extend({bodyA:d,bodyB:u},o)))),n&&cd)){var p=c=d-c,g=i-1-c;if(!(ag))return 1===u&&o.translate(l,{x:(a+(i%2==1?1:-1))*f,y:0}),h(e+(l?a*f:0)+a*s,n,a,c,l,u)}})},n.newtonsCradle=function(e,t,i,n,a){for(var o=r.create({label:"Newtons Cradle"}),c=0;c{var n={};e.exports=n;var r=i(31725),s=i(53402);n.fromVertices=function(e){for(var t={},i=0;i{var t={};e.exports=t,t.create=function(e){var i={min:{x:0,y:0},max:{x:0,y:0}};return e&&t.update(i,e),i},t.update=function(e,t,i){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var n=0;ne.max.x&&(e.max.x=r.x),r.xe.max.y&&(e.max.y=r.y),r.y0?e.max.x+=i.x:e.min.x+=i.x,i.y>0?e.max.y+=i.y:e.min.y+=i.y)},t.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},t.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},t.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},t.shift=function(e,t){var i=e.max.x-e.min.x,n=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+i,e.min.y=t.y,e.max.y=t.y+n},t.wrap=function(e,t,i){var n=null,r=null;if(void 0!==t.min.x&&void 0!==t.max.x&&(e.min.x>t.max.x?n=t.min.x-e.max.x:e.max.xt.max.y?r=t.min.y-e.max.y:e.max.y{var n={};e.exports=n,i(15647);var r=i(53402);n.pathToVertices=function(e,t){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,a,o,h,c,l,u,d,f,p,g=[],m=0,v=0,y=0;t=t||15;var b=function(e,t,i){var n=i%2==1&&i>1;if(!d||e!=d.x||t!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var r={x:f+e,y:p+t};(n||!d)&&(d=r),g.push(r),v=f+e,y=p+t}},x=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=e.x,y=e.y;break;case"H":v=e.x;break;case"V":y=e.y}b(v,y,e.pathSegType)}};for(n._svgPathToAbsolute(e),a=e.getTotalLength(),c=[],i=0;i{var t={};e.exports=t,t.create=function(e,t){return{x:e||0,y:t||0}},t.clone=function(e){return{x:e.x,y:e.y}},t.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},t.rotate=function(e,t,i){var n=Math.cos(t),r=Math.sin(t);i||(i={});var s=e.x*n-e.y*r;return i.y=e.x*r+e.y*n,i.x=s,i},t.rotateAbout=function(e,t,i,n){var r=Math.cos(t),s=Math.sin(t);n||(n={});var a=i.x+((e.x-i.x)*r-(e.y-i.y)*s);return n.y=i.y+((e.x-i.x)*s+(e.y-i.y)*r),n.x=a,n},t.normalise=function(e){var i=t.magnitude(e);return 0===i?{x:0,y:0}:{x:e.x/i,y:e.y/i}},t.dot=function(e,t){return e.x*t.x+e.y*t.y},t.cross=function(e,t){return e.x*t.y-e.y*t.x},t.cross3=function(e,t,i){return(t.x-e.x)*(i.y-e.y)-(t.y-e.y)*(i.x-e.x)},t.add=function(e,t,i){return i||(i={}),i.x=e.x+t.x,i.y=e.y+t.y,i},t.sub=function(e,t,i){return i||(i={}),i.x=e.x-t.x,i.y=e.y-t.y,i},t.mult=function(e,t){return{x:e.x*t,y:e.y*t}},t.div=function(e,t){return{x:e.x/t,y:e.y/t}},t.perp=function(e,t){return{x:-((t=!0===t?-1:1)*e.y),y:t*e.x}},t.neg=function(e){return{x:-e.x,y:-e.y}},t.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]},41598:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(53402);n.create=function(e,t){for(var i=[],n=0;n0)return!1;a=i}return!0},n.scale=function(e,t,i,s){if(1===t&&1===i)return e;s=s||n.centre(e);for(var a,o,h=0;h=0?h-1:e.length-1],l=e[h],u=e[(h+1)%e.length],d=t[h0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(e){var t,i,n=[],s=[];for((e=e.slice(0)).sort(function(e,t){var i=e.x-t.x;return 0!==i?i:e.y-t.y}),i=0;i=2&&0>=r.cross3(s[s.length-2],s[s.length-1],t);)s.pop();s.push(t)}for(i=e.length-1;i>=0;i-=1){for(t=e[i];n.length>=2&&0>=r.cross3(n[n.length-2],n[n.length-1],t);)n.pop();n.push(t)}return n.pop(),s.pop(),n.concat(s)}},55973:e=>{function t(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}function i(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])}function n(e,t,n){return 0>=i(e,t,n)}/** + */e.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(e,t,i)=>{var n,r={};e.exports=r;var s=i(41598),a=i(31725),o=i(53614),h=i(53402),c=i(15647),l=i(66615);r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=1e3/60,r.create=function(e){var t={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:e.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(t.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var i=h.extend(t,e);return n(i,e),i.setOnCollideWith=function(e,t){return t?this.onCollideWith[e.id]=t:delete this.onCollideWith[e.id],this},i},r.nextGroup=function(e){return e?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory},n=function(e,t){if(t=t||{},r.set(e,{bounds:e.bounds||c.create(e.vertices),positionPrev:e.positionPrev||a.clone(e.position),anglePrev:e.anglePrev||e.angle,vertices:e.vertices,parts:e.parts||[e],isStatic:e.isStatic,isSleeping:e.isSleeping,parent:e.parent||e}),s.rotate(e.vertices,e.angle,e.position),l.rotate(e.axes,e.angle),c.update(e.bounds,e.vertices,e.velocity),r.set(e,{axes:t.axes||e.axes,area:t.area||e.area,mass:t.mass||e.mass,inertia:t.inertia||e.inertia}),1===e.parts.length){var i=e.bounds,n=e.centerOfMass,o=e.centerOffset,h=i.max.x-i.min.x,u=i.max.y-i.min.y;n.x=-(i.min.x-e.position.x)/h,n.y=-(i.min.y-e.position.y)/u,o.x=h*n.x,o.y=u*n.y}},r.set=function(e,t,i){var n;for(n in"string"==typeof t&&(n=t,(t={})[n]=i),t)if(Object.prototype.hasOwnProperty.call(t,n))switch(i=t[n],n){case"isStatic":r.setStatic(e,i);break;case"isSleeping":o.set(e,i);break;case"mass":r.setMass(e,i);break;case"density":r.setDensity(e,i);break;case"inertia":r.setInertia(e,i);break;case"vertices":r.setVertices(e,i);break;case"position":r.setPosition(e,i);break;case"angle":r.setAngle(e,i);break;case"velocity":r.setVelocity(e,i);break;case"angularVelocity":r.setAngularVelocity(e,i);break;case"speed":r.setSpeed(e,i);break;case"angularSpeed":r.setAngularSpeed(e,i);break;case"parts":r.setParts(e,i);break;case"centre":r.setCentre(e,i);break;default:e[n]=i}},r.setStatic=function(e,t){for(var i=0;i0&&a.rotateAbout(o.position,n,e.position,o.position)}},r.setVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.positionPrev.x=e.position.x-t.x*i,e.positionPrev.y=e.position.y-t.y*i,e.velocity.x=(e.position.x-e.positionPrev.x)/i,e.velocity.y=(e.position.y-e.positionPrev.y)/i,e.speed=a.magnitude(e.velocity)},r.getVelocity=function(e){var t=r._baseDelta/e.deltaTime;return{x:(e.position.x-e.positionPrev.x)*t,y:(e.position.y-e.positionPrev.y)*t}},r.getSpeed=function(e){return a.magnitude(r.getVelocity(e))},r.setSpeed=function(e,t){r.setVelocity(e,a.mult(a.normalise(r.getVelocity(e)),t))},r.setAngularVelocity=function(e,t){var i=e.deltaTime/r._baseDelta;e.anglePrev=e.angle-t*i,e.angularVelocity=(e.angle-e.anglePrev)/i,e.angularSpeed=Math.abs(e.angularVelocity)},r.getAngularVelocity=function(e){return(e.angle-e.anglePrev)*r._baseDelta/e.deltaTime},r.getAngularSpeed=function(e){return Math.abs(r.getAngularVelocity(e))},r.setAngularSpeed=function(e,t){r.setAngularVelocity(e,h.sign(r.getAngularVelocity(e))*t)},r.translate=function(e,t,i){r.setPosition(e,a.add(e.position,t),i)},r.rotate=function(e,t,i,n){if(i){var s=Math.cos(t),a=Math.sin(t),o=e.position.x-i.x,h=e.position.y-i.y;r.setPosition(e,{x:i.x+(o*s-h*a),y:i.y+(o*a+h*s)},n),r.setAngle(e,e.angle+t,n)}else r.setAngle(e,e.angle+t,n)},r.scale=function(e,t,i,n){var a=0,o=0;n=n||e.position;for(var h=e.inertia===1/0,u=0;u0&&(a+=d.area,o+=d.inertia),d.position.x=n.x+(d.position.x-n.x)*t,d.position.y=n.y+(d.position.y-n.y)*i,c.update(d.bounds,d.vertices,e.velocity)}e.parts.length>1&&(e.area=a,e.isStatic||(r.setMass(e,e.density*a),r.setInertia(e,o))),e.circleRadius&&(t===i?e.circleRadius*=t:e.circleRadius=null),h&&r.setInertia(e,1/0)},r.update=function(e,t){var i=(t=(void 0!==t?t:1e3/60)*e.timeScale)*t,n=r._timeCorrection?t/(e.deltaTime||t):1,o=1-e.frictionAir*(t/h._baseDelta),u=(e.position.x-e.positionPrev.x)*n,d=(e.position.y-e.positionPrev.y)*n;e.velocity.x=u*o+e.force.x/e.mass*i,e.velocity.y=d*o+e.force.y/e.mass*i,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.deltaTime=t,e.angularVelocity=(e.angle-e.anglePrev)*o*n+e.torque/e.inertia*i,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=a.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var f=0;f0&&(p.position.x+=e.velocity.x,p.position.y+=e.velocity.y),0!==e.angularVelocity&&(s.rotate(p.vertices,e.angularVelocity,e.position),l.rotate(p.axes,e.angularVelocity),f>0&&a.rotateAbout(p.position,e.angularVelocity,e.position,p.position)),c.update(p.bounds,p.vertices,e.velocity)}},r.updateVelocities=function(e){var t=r._baseDelta/e.deltaTime,i=e.velocity;i.x=(e.position.x-e.positionPrev.x)*t,i.y=(e.position.y-e.positionPrev.y)*t,e.speed=Math.sqrt(i.x*i.x+i.y*i.y),e.angularVelocity=(e.angle-e.anglePrev)*t,e.angularSpeed=Math.abs(e.angularVelocity)},r.applyForce=function(e,t,i){var n={x:t.x-e.position.x,y:t.y-e.position.y};e.force.x+=i.x,e.force.y+=i.y,e.torque+=n.x*i.y-n.y*i.x},r._totalProperties=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===e.parts.length?0:1;i{var n={};e.exports=n;var r=i(35810),s=i(53402),a=i(15647),o=i(22562);n.create=function(e){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},n.setModified=function(e,t,i,s){if(r.trigger(e,"compositeModified",e),e.isModified=t,t&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),i&&e.parent&&n.setModified(e.parent,t,i,s),s)for(var a=0;a{var n={};e.exports=n;var r=i(69351);n.create=r.create,n.add=r.add,n.remove=r.remove,n.clear=r.clear,n.addComposite=r.addComposite,n.addBody=r.addBody,n.addConstraint=r.addConstraint},52284:(e,t,i)=>{var n,r,s,a={};e.exports=a;var o=i(41598),h=i(4506);n=[],r={overlap:0,axis:null},s={overlap:0,axis:null},a.create=function(e,t){return{pair:null,collided:!1,bodyA:e,bodyB:t,parentA:e.parent,parentB:t.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},a.collides=function(e,t,i){if(a._overlapAxes(r,e.vertices,t.vertices,e.axes),r.overlap<=0||(a._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0))return null;var n,c,l=i&&i.table[h.id(e,t)];l?c=l.collision:((c=a.create(e,t)).collided=!0,c.bodyA=e.id=0&&(v=-v,y=-y),u.x=v,u.y=y,d.x=-y,d.y=v,f.x=v*g,f.y=y*g,c.depth=g;var b=a._findSupports(e,t,u,1),x=0;if(o.contains(e.vertices,b[0])&&(p[x++]=b[0]),o.contains(e.vertices,b[1])&&(p[x++]=b[1]),x<2){var E=a._findSupports(t,e,u,-1);o.contains(t.vertices,E[0])&&(p[x++]=E[0]),x<2&&o.contains(t.vertices,E[1])&&(p[x++]=E[1])}return 0===x&&(p[x++]=b[0]),c.supportCount=x,c},a._overlapAxes=function(e,t,i,n){var r,s,a,o,h,c,l=t.length,u=i.length,d=t[0].x,f=t[0].y,p=i[0].x,g=i[0].y,m=n.length,v=Number.MAX_VALUE,y=0;for(h=0;hS?S=o:oA?A=o:o{var t={};e.exports=t,t.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}},81388:(e,t,i)=>{var n={};e.exports=n;var r=i(53402),s=i(52284);n.create=function(e){return r.extend({bodies:[],collisions:[],pairs:null},e)},n.setBodies=function(e,t){e.bodies=t.slice(0)},n.clear=function(e){e.bodies=[],e.collisions=[]},n.collisions=function(e){var t,i,r=e.pairs,a=e.bodies,o=a.length,h=n.canCollide,c=s.collides,l=e.collisions,u=0;for(a.sort(n._compareBoundsX),t=0;tp)break;if(!(gE.max.y)&&(!v||!x.isStatic&&!x.isSleeping)&&h(d.collisionFilter,x.collisionFilter)){var w=x.parts.length;if(b&&1===w){var T=c(d,x,r);T&&(l[u++]=T)}else for(var S=y>1?1:0,A=w>1?1:0,C=S;CE.max.x)&&!(f.max.xE.max.y)){var T=c(_,O,r);T&&(l[u++]=T)}}}}}return l.length!==u&&(l.length=u),l},n.canCollide=function(e,t){return e.group===t.group&&0!==e.group?e.group>0:(e.mask&t.category)!=0&&(t.mask&e.category)!=0},n._compareBoundsX=function(e,t){return e.bounds.min.x-t.bounds.min.x}},4506:(e,t,i)=>{var n={};e.exports=n;var r=i(43424);n.create=function(e,t){var i=e.bodyA,s=e.bodyB,a={id:n.id(i,s),bodyA:i,bodyB:s,collision:e,contacts:[r.create(),r.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:t,timeUpdated:t,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(a,e,t),a},n.update=function(e,t,i){var n=t.supports,r=t.supportCount,s=e.contacts,a=t.parentA,o=t.parentB;e.isActive=!0,e.timeUpdated=i,e.collision=t,e.separation=t.depth,e.inverseMass=a.inverseMass+o.inverseMass,e.friction=a.frictiono.frictionStatic?a.frictionStatic:o.frictionStatic,e.restitution=a.restitution>o.restitution?a.restitution:o.restitution,e.slop=a.slop>o.slop?a.slop:o.slop,e.contactCount=r,t.pair=e;var h=n[0],c=s[0],l=n[1],u=s[1];(u.vertex===h||c.vertex===l)&&(s[1]=c,s[0]=c=u,u=s[1]),c.vertex=h,u.vertex=l},n.setActive=function(e,t,i){t?(e.isActive=!0,e.timeUpdated=i):(e.isActive=!1,e.contactCount=0)},n.id=function(e,t){return e.id{var n={};e.exports=n;var r=i(4506),s=i(53402);n.create=function(e){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},n.update=function(e,t,i){var n,s,a,o=r.update,h=r.create,c=r.setActive,l=e.table,u=e.list,d=u.length,f=d,p=e.collisionStart,g=e.collisionEnd,m=e.collisionActive,v=t.length,y=0,b=0,x=0;for(a=0;a=i?u[f++]=s:(c(s,!1,i),s.collision.bodyA.sleepCounter>0&&s.collision.bodyB.sleepCounter>0?u[f++]=s:(g[b++]=s,delete l[s.id]));u.length!==f&&(u.length=f),p.length!==y&&(p.length=y),g.length!==b&&(g.length=b),m.length!==x&&(m.length=x)},n.clear=function(e){return e.table={},e.list.length=0,e.collisionStart.length=0,e.collisionActive.length=0,e.collisionEnd.length=0,e}},73296:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(52284),a=i(15647),o=i(66280),h=i(41598);n.collides=function(e,t){for(var i=[],n=t.length,r=e.bounds,o=s.collides,h=a.overlaps,c=0;c{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(e){var t,i,n,r=e.length;for(t=0;tz?(r=W>0?W:-W,(i=g.friction*(W>0?1:-1)*c)<-r?i=-r:i>r&&(i=r)):(i=W,r=f);var X=N*x-F*b,K=B*x-U*b,q=_/(T+v.inverseInertia*X*X+y.inverseInertia*K*K),J=(1+g.restitution)*j*q;if(i*=q,j0&&(D.normalImpulse=0),J=D.normalImpulse-$}if(W<-u||W>u)D.tangentImpulse=0;else{var Q=D.tangentImpulse;D.tangentImpulse+=i,D.tangentImpulse<-r&&(D.tangentImpulse=-r),D.tangentImpulse>r&&(D.tangentImpulse=r),i=D.tangentImpulse-Q}var Z=b*J+E*i,ee=x*J+w*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=Z*v.inverseMass,v.positionPrev.y+=ee*v.inverseMass,v.anglePrev+=(N*ee-F*Z)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=Z*y.inverseMass,y.positionPrev.y-=ee*y.inverseMass,y.anglePrev-=(B*ee-U*Z)*y.inverseInertia)}}}}},48140:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(31725),a=i(53614),o=i(15647),h=i(66615),c=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(e){e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var t=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,i=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,n=s.magnitude(s.sub(t,i));e.length=void 0!==e.length?e.length:n,e.id=e.id||c.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var r={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(r.type="pin",r.anchors=!1):e.stiffness<.9&&(r.type="spring"),e.render=c.extend(r,e.render),e},n.preSolveAll=function(e){for(var t=0;t=1||0===e.length?e.stiffness*t:e.stiffness*t*t,b=e.damping*t,x=s.mult(l,v*y),E=(i?i.inverseMass:0)+(r?r.inverseMass:0),w=E+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(b>0){var T=s.create();p=s.div(l,u),m=s.sub(r&&s.sub(r.position,r.positionPrev)||T,i&&s.sub(i.position,i.positionPrev)||T),g=s.dot(p,m)}i&&!i.isStatic&&(f=i.inverseMass/E,i.constraintImpulse.x-=x.x*f,i.constraintImpulse.y-=x.y*f,i.position.x-=x.x*f,i.position.y-=x.y*f,b>0&&(i.positionPrev.x-=b*p.x*g*f,i.positionPrev.y-=b*p.y*g*f),d=s.cross(a,x)/w*n._torqueDampen*i.inverseInertia*(1-e.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),r&&!r.isStatic&&(f=r.inverseMass/E,r.constraintImpulse.x+=x.x*f,r.constraintImpulse.y+=x.y*f,r.position.x+=x.x*f,r.position.y+=x.y*f,b>0&&(r.positionPrev.x+=b*p.x*g*f,r.positionPrev.y+=b*p.y*g*f),d=s.cross(o,x)/w*n._torqueDampen*r.inverseInertia*(1-e.angularStiffness),r.constraintImpulse.angle+=d,r.angle+=d)}}},n.postSolveAll=function(e){for(var t=0;t0&&(u.position.x+=c.x,u.position.y+=c.y),0!==c.angle&&(r.rotate(u.vertices,c.angle,i.position),h.rotate(u.axes,c.angle),l>0&&s.rotateAbout(u.position,c.angle,i.position,u.position)),o.update(u.bounds,u.vertices,i.velocity)}c.angle*=n._warming,c.x*=n._warming,c.y*=n._warming}}},n.pointAWorld=function(e){return{x:(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),y:(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0)}},n.pointBWorld=function(e){return{x:(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),y:(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0)}},n.currentLength=function(e){var t=(e.bodyA?e.bodyA.position.x:0)+(e.pointA?e.pointA.x:0),i=(e.bodyA?e.bodyA.position.y:0)+(e.pointA?e.pointA.y:0),n=(e.bodyB?e.bodyB.position.x:0)+(e.pointB?e.pointB.x:0),r=(e.bodyB?e.bodyB.position.y:0)+(e.pointB?e.pointB.y:0),s=t-n,a=i-r;return Math.sqrt(s*s+a*a)}},53402:(e,t,i)=>{var n,r={};e.exports=r,r._baseDelta=1e3/60,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(e,t){var i,n;"boolean"==typeof t?(i=2,n=t):(i=1,n=!0);for(var s=i;s0;t--){var i=Math.floor(r.random()*(t+1)),n=e[t];e[t]=e[i],e[i]=n}return e},r.choose=function(e){return e[Math.floor(r.random()*e.length)]},r.isElement=function(e){return"undefined"!=typeof HTMLElement?e instanceof HTMLElement:!!(e&&e.nodeType&&e.nodeName)},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isFunction=function(e){return"function"==typeof e},r.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},r.isString=function(e){return"[object String]"===toString.call(e)},r.clamp=function(e,t,i){return ei?i:e},r.sign=function(e){return e<0?-1:1},r.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-r._nowStartTime},r.random=function(e,t){return t=void 0!==t?t:1,(e=void 0!==e?e:0)+n()*(t-e)},n=function(){return r._seed=(9301*r._seed+49297)%233280,r._seed/233280},r.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var e=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[e]||(r.warn(e),r._warnedOnce[e]=!0)},r.deprecated=function(e,t,i){e[t]=r.chain(function(){r.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",i)},e[t])},r.nextId=function(){return r._nextId++},r.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0;i{var n={};e.exports=n;var r=i(53614),s=i(66272),a=i(81388),o=i(99561),h=i(35810),c=i(69351),l=i(48140),u=i(53402),d=i(22562);n._deltaMax=1e3/60,n.create=function(e){e=e||{};var t=u.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},e);return t.world=e.world||c.create({label:"World"}),t.pairs=e.pairs||o.create(),t.detector=e.detector||a.create(),t.detector.pairs=t.pairs,t.grid={buckets:[]},t.world.gravity=t.gravity,t.broadphase=t.grid,t.metrics={},t},n.update=function(e,t){var i,d=u.now(),f=e.world,p=e.detector,g=e.pairs,m=e.timing,v=m.timestamp;t>n._deltaMax&&u.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",n._deltaMax.toFixed(3),"ms."),t=(void 0!==t?t:u._baseDelta)*m.timeScale,m.timestamp+=t,m.lastDelta=t;var y={timestamp:m.timestamp,delta:t};h.trigger(e,"beforeUpdate",y);var b=c.allBodies(f),x=c.allConstraints(f),E=c.allComposites(f);for(f.isModified&&(a.setBodies(p,b),c.setModified(f,!1,!1,!0)),e.enableSleeping&&r.update(b,t),n._bodiesApplyGravity(b,e.gravity),n.wrap(b,E),n.attractors(b),t>0&&n._bodiesUpdate(b,t),h.trigger(e,"beforeSolve",y),l.preSolveAll(b),i=0;i0&&h.trigger(e,"collisionStart",{pairs:g.collisionStart,timestamp:m.timestamp,delta:t});var T=u.clamp(20/e.positionIterations,0,1);for(s.preSolvePosition(g.list),i=0;i0&&h.trigger(e,"collisionActive",{pairs:g.collisionActive,timestamp:m.timestamp,delta:t}),g.collisionEnd.length>0&&h.trigger(e,"collisionEnd",{pairs:g.collisionEnd,timestamp:m.timestamp,delta:t}),n._bodiesClearForces(b),h.trigger(e,"afterUpdate",y),e.timing.lastElapsed=u.now()-d,e},n.merge=function(e,t){if(u.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var i=c.allBodies(e.world),s=0;s0)for(var r=0;r{var n={};e.exports=n;var r=i(53402);n.on=function(e,t,i){for(var n,r=t.split(" "),s=0;s0){i||(i={}),n=t.split(" ");for(var c=0;c{var n={};e.exports=n;var r=i(73832),s=i(53402);n.name="matter-js",n.version="0.20.0",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),s.chainPathAfter(n,e,t)}},73832:(e,t,i)=>{var n={};e.exports=n;var r=i(53402);n._registry={},n.register=function(e){if(n.isPlugin(e)||r.warn("Plugin.register:",n.toString(e),"does not implement all required fields."),e.name in n._registry){var t=n._registry[e.name],i=n.versionParse(e.version).number,s=n.versionParse(t.version).number;i>s?(r.warn("Plugin.register:",n.toString(t),"was upgraded to",n.toString(e)),n._registry[e.name]=e):i-1},n.isFor=function(e,t){var i=e.for&&n.dependencyParse(e.for);return!e.for||t.name===i.name&&n.versionSatisfies(t.version,i.range)},n.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0===e.uses.length){r.warn("Plugin.use:",n.toString(e),"does not specify any dependencies to install.");return}for(var i=n.dependencies(e),s=r.topologicalSort(i),a=[],o=0;o0&&!h.silent&&r.info(a.join(" "))},n.dependencies=function(e,t){var i=n.dependencyParse(e),s=i.name;if(!(s in(t=t||{}))){e=n.resolve(e)||e,t[s]=r.map(e.uses||[],function(t){n.isPlugin(t)&&n.register(t);var s=n.dependencyParse(t),a=n.resolve(t);return a&&!n.versionSatisfies(a.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(a),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),a._warned=!0,e._warned=!0):a||(r.warn("Plugin.dependencies:",n.toString(t),"used by",n.toString(i),"could not be resolved."),e._warned=!0),s.name});for(var a=0;a=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;t.test(e)||r.warn("Plugin.versionParse:",e,"is not a valid version or range.");var i=t.exec(e),n=Number(i[4]),s=Number(i[5]),a=Number(i[6]);return{isRange:!!(i[1]||i[2]),version:i[3],range:e,operator:i[1]||i[2]||"",major:n,minor:s,patch:a,parts:[n,s,a],prerelease:i[7],number:1e8*n+1e4*s+a}},n.versionSatisfies=function(e,t){t=t||"*";var i=n.versionParse(t),r=n.versionParse(e);if(i.isRange){if("*"===i.operator||"*"===e)return!0;if(">"===i.operator)return r.number>i.number;if(">="===i.operator)return r.number>=i.number;if("~"===i.operator)return r.major===i.major&&r.minor===i.minor&&r.patch>=i.patch;if("^"===i.operator)return i.major>0?r.major===i.major&&r.number>=i.number:i.minor>0?r.minor===i.minor&&r.patch>=i.patch:r.patch===i.patch}return e===t||"*"===e}},13037:(e,t,i)=>{var n,r={};e.exports=r;var s=i(35810),a=i(48413),o=i(53402);r._maxFrameDelta=1e3/15,r._frameDeltaFallback=1e3/60,r._timeBufferMargin=1.5,r._elapsedNextEstimate=1,r._smoothingLowerBound=.1,r._smoothingUpperBound=.9,r.create=function(e){var t=o.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},e);return t.fps=0,t},r.run=function(e,t){return e.timeBuffer=r._frameDeltaFallback,function i(n){e.frameRequestId=r._onNextFrame(e,i),n&&e.enabled&&r.tick(e,t,n)}(),e},r.tick=function(e,t,i){var h=o.now(),c=e.delta,l=0,u=i-e.timeLastTick;if((!u||!e.timeLastTick||u>Math.max(r._maxFrameDelta,e.maxFrameTime))&&(u=e.frameDelta||r._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(u),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var d=e.frameDeltaHistory.slice(0).sort();u=n(e.frameDeltaHistory.slice(d.length*r._smoothingLowerBound,d.length*r._smoothingUpperBound))||u}e.frameDeltaSnapping&&(u=1e3/Math.round(1e3/u)),e.frameDelta=u,e.timeLastTick=i,e.timeBuffer+=e.frameDelta,e.timeBuffer=o.clamp(e.timeBuffer,0,e.frameDelta+c*r._timeBufferMargin),e.lastUpdatesDeferred=0;var f=e.maxUpdates||Math.ceil(e.maxFrameTime/c),p={timestamp:t.timing.timestamp};s.trigger(e,"beforeTick",p),s.trigger(e,"tick",p);for(var g=o.now();c>0&&e.timeBuffer>=c*r._timeBufferMargin;){s.trigger(e,"beforeUpdate",p),a.update(t,c),s.trigger(e,"afterUpdate",p),e.timeBuffer-=c,l+=1;var m=o.now()-h,v=o.now()-g,y=m+r._elapsedNextEstimate*v/l;if(l>=f||y>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/c-r._timeBufferMargin));break}}t.timing.lastUpdatesPerFrame=l,s.trigger(e,"afterTick",p),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/c)>f?o.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&o.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==e.isFixed&&o.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&o.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==e.fps&&o.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},r.stop=function(e){r._cancelNextFrame(e)},r._onNextFrame=function(e,t){if("undefined"!=typeof window&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(t);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},r._cancelNextFrame=function(e){if("undefined"!=typeof window&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")},n=function(e){for(var t=0,i=e.length,n=0;n{var n={};e.exports=n;var r=i(22562),s=i(35810),a=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(e,t){for(var i=t/a._baseDelta,s=n._motionSleepThreshold,o=0;o0&&h.motion=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},n.afterCollisions=function(e){for(var t=n._motionSleepThreshold,i=0;it&&n.set(h,!1)}}}},n.set=function(e,t){var i=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,i||s.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,i&&s.trigger(e,"sleepEnd"))}},66280:(e,t,i)=>{var n={};e.exports=n;var r=i(41598),s=i(53402),a=i(22562),o=i(15647),h=i(31725);n.rectangle=function(e,t,i,n,o){o=o||{};var h={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(o.chamfer){var c=o.chamfer;h.vertices=r.chamfer(h.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete o.chamfer}return a.create(s.extend({},h,o))},n.trapezoid=function(e,t,i,n,o,h){h=h||{},o>=1&&s.warn("Bodies.trapezoid: slope parameter must be < 1.");var c,l=(1-2*(o*=.5))*i,u=i*o,d=u+l,f=d+u;c=o<.5?"L 0 0 L "+u+" "+-n+" L "+d+" "+-n+" L "+f+" 0":"L 0 0 L "+d+" "+-n+" L "+f+" 0";var p={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(h.chamfer){var g=h.chamfer;p.vertices=r.chamfer(p.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete h.chamfer}return a.create(s.extend({},p,h))},n.circle=function(e,t,i,r,a){r=r||{};var o=Math.ceil(Math.max(10,Math.min(a=a||25,i)));return o%2==1&&(o+=1),n.polygon(e,t,o,i,s.extend({},{label:"Circle Body",circleRadius:i},r))},n.polygon=function(e,t,i,o,h){if(h=h||{},i<3)return n.circle(e,t,o,h);for(var c=2*Math.PI/i,l="",u=.5*c,d=0;d0&&r.area(C)1?(p=a.create(s.extend({parts:g.slice(0)},n)),a.setPosition(p,{x:e,y:t}),p):g[0]},n.flagCoincidentParts=function(e,t){void 0===t&&(t=5);for(var i=0;i{var n={};e.exports=n;var r=i(69351),s=i(48140),a=i(53402),o=i(22562),h=i(66280);n.stack=function(e,t,i,n,s,a,h){for(var c,l=r.create({label:"Stack"}),u=e,d=t,f=0,p=0;pg&&(g=y),o.translate(v,{x:.5*b,y:.5*y}),u=v.bounds.max.x+s,r.addBody(l,v),c=v,f+=1}else u+=s}d+=g+a,u=e}return l},n.chain=function(e,t,i,n,o,h){for(var c=e.bodies,l=1;l0)for(c=0;c0&&(d=f[c-1+(h-1)*t],r.addConstraint(e,s.create(a.extend({bodyA:d,bodyB:u},o)))),n&&cd)){var p=c=d-c,g=i-1-c;if(!(ag))return 1===u&&o.translate(l,{x:(a+(i%2==1?1:-1))*f,y:0}),h(e+(l?a*f:0)+a*s,n,a,c,l,u)}})},n.newtonsCradle=function(e,t,i,n,a){for(var o=r.create({label:"Newtons Cradle"}),c=0;c{var n={};e.exports=n;var r=i(31725),s=i(53402);n.fromVertices=function(e){for(var t={},i=0;i{var t={};e.exports=t,t.create=function(e){var i={min:{x:0,y:0},max:{x:0,y:0}};return e&&t.update(i,e),i},t.update=function(e,t,i){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var n=0;ne.max.x&&(e.max.x=r.x),r.xe.max.y&&(e.max.y=r.y),r.y0?e.max.x+=i.x:e.min.x+=i.x,i.y>0?e.max.y+=i.y:e.min.y+=i.y)},t.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},t.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},t.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},t.shift=function(e,t){var i=e.max.x-e.min.x,n=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+i,e.min.y=t.y,e.max.y=t.y+n},t.wrap=function(e,t,i){var n=null,r=null;if(void 0!==t.min.x&&void 0!==t.max.x&&(e.min.x>t.max.x?n=t.min.x-e.max.x:e.max.xt.max.y?r=t.min.y-e.max.y:e.max.y{var n={};e.exports=n,i(15647);var r=i(53402);n.pathToVertices=function(e,t){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,a,o,h,c,l,u,d,f,p,g=[],m=0,v=0,y=0;t=t||15;var b=function(e,t,i){var n=i%2==1&&i>1;if(!d||e!=d.x||t!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var r={x:f+e,y:p+t};(n||!d)&&(d=r),g.push(r),v=f+e,y=p+t}},x=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=e.x,y=e.y;break;case"H":v=e.x;break;case"V":y=e.y}b(v,y,e.pathSegType)}};for(n._svgPathToAbsolute(e),a=e.getTotalLength(),c=[],i=0;i{var t={};e.exports=t,t.create=function(e,t){return{x:e||0,y:t||0}},t.clone=function(e){return{x:e.x,y:e.y}},t.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},t.rotate=function(e,t,i){var n=Math.cos(t),r=Math.sin(t);i||(i={});var s=e.x*n-e.y*r;return i.y=e.x*r+e.y*n,i.x=s,i},t.rotateAbout=function(e,t,i,n){var r=Math.cos(t),s=Math.sin(t);n||(n={});var a=i.x+((e.x-i.x)*r-(e.y-i.y)*s);return n.y=i.y+((e.x-i.x)*s+(e.y-i.y)*r),n.x=a,n},t.normalise=function(e){var i=t.magnitude(e);return 0===i?{x:0,y:0}:{x:e.x/i,y:e.y/i}},t.dot=function(e,t){return e.x*t.x+e.y*t.y},t.cross=function(e,t){return e.x*t.y-e.y*t.x},t.cross3=function(e,t,i){return(t.x-e.x)*(i.y-e.y)-(t.y-e.y)*(i.x-e.x)},t.add=function(e,t,i){return i||(i={}),i.x=e.x+t.x,i.y=e.y+t.y,i},t.sub=function(e,t,i){return i||(i={}),i.x=e.x-t.x,i.y=e.y-t.y,i},t.mult=function(e,t){return{x:e.x*t,y:e.y*t}},t.div=function(e,t){return{x:e.x/t,y:e.y/t}},t.perp=function(e,t){return{x:-((t=!0===t?-1:1)*e.y),y:t*e.x}},t.neg=function(e){return{x:-e.x,y:-e.y}},t.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]},41598:(e,t,i)=>{var n={};e.exports=n;var r=i(31725),s=i(53402);n.create=function(e,t){for(var i=[],n=0;n0)return!1;a=i}return!0},n.scale=function(e,t,i,s){if(1===t&&1===i)return e;s=s||n.centre(e);for(var a,o,h=0;h=0?h-1:e.length-1],l=e[h],u=e[(h+1)%e.length],d=t[h0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(e){var t,i,n=[],s=[];for((e=e.slice(0)).sort(function(e,t){var i=e.x-t.x;return 0!==i?i:e.y-t.y}),i=0;i=2&&0>=r.cross3(s[s.length-2],s[s.length-1],t);)s.pop();s.push(t)}for(i=e.length-1;i>=0;i-=1){for(t=e[i];n.length>=2&&0>=r.cross3(n[n.length-2],n[n.length-1],t);)n.pop();n.push(t)}return n.pop(),s.pop(),n.concat(s)}},55973:e=>{function t(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}function i(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])}function n(e,t,n){return 0>=i(e,t,n)}/** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} */e.exports={decomp:function(e){var t=function e(t){for(var r=[],s=[],h=[],f=[],g=Number.MAX_VALUE,m=0;m=0&&n(o(e,t-1),o(e,t),o(e,r)))return!1;h=a(o(e,t),o(e,r));for(var s,h,c=0;c!==e.length;++c)if((c+1)%e.length!==t&&c!==t&&i(o(e,t),o(e,r),o(e,c+1))>=0&&n(o(e,t),o(e,r),o(e,c))&&(l[0]=o(e,t),l[1]=o(e,r),u[0]=o(e,c),u[1]=o(e,c+1),s=function(e,t,i){i=i||0;var n,r,s,a,o,h,c,l=[0,0];return n=e[1][1]-e[0][1],r=e[0][0]-e[1][0],s=n*e[0][0]+r*e[0][1],a=t[1][1]-t[0][1],o=t[0][0]-t[1][0],h=a*t[0][0]+o*t[0][1],p(c=n*o-a*r,0,i)||(l[0]=(o*s-r*h)/c,l[1]=(n*h-a*s)/c),l}(l,u),a(o(e,t),s)0?function e(t,i){if(0===i.length)return[t];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[t],r=0;rp)return console.warn("quickDecomp: max level ("+p+") reached."),s;for(var I=0;I0&&n(o(r,I-1),o(r,I),o(r,O-1))&&(y=f(o(r,I-1),o(r,I),o(r,O),o(r,O-1)),0>i(o(r,I+1),o(r,I),y)&&(E=a(r[I],y))0&&n(o(r,I+1),o(r,I),o(r,O))&&(y=f(o(r,I+1),o(r,I),o(r,O),o(r,O+1)),i(o(r,I-1),o(r,I),y)>0&&(E=a(r[I],y))T&&(T+=r.length),w=Number.MAX_VALUE,T=0&&n(o(r,I+1),o(r,I),o(r,O))&&(E=a(o(r,I),o(r,O)))3&&l>=0;--l)n=o(e,l-1),a=o(e,l),h=o(e,l+1),(t?(r[0]=a[0]-n[0],r[1]=a[1]-n[1],s[0]=h[0]-a[0],s[1]=h[1]-a[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))=1;--n)for(var r=e[n],s=n-1;s>=0;--s)if(i=e[s],p(r[0],i[0],t)&&p(r[1],i[1],t)){e.splice(n,1);continue}},makeCCW:function(e){for(var t=0,n=1;ne[t][0])&&(t=n);return!(i(o(e,t-1),o(e,t),o(e,t+1))>0)&&(function(e){for(var t=[],i=e.length,n=0;n!==i;n++)t.push(e.pop());for(var n=0;n!==i;n++)e[n]=t[n]}(e),!0)}};var r=[],s=[];function a(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function o(e,t){var i=e.length;return e[t<0?t%i+i:t%i]}function h(e,t,i,n){for(var r=i;ri(o(e,t-1),o(e,t),o(e,t+1))}var l=[],u=[];function d(e,t,i,n){var r=n||[];if(r.length=0,t{var n=new(i(83419))({initialize:function(e){this.pluginManager=e,this.game=e.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});e.exports=n},42363:e=>{e.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:e=>{/** @@ -3523,7 +3523,7 @@ * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var n=i(83419),r=i(94811),s=i(95540),a=i(98840),o=i(44667),h=i(61340),c=i(70554),l=i(14500),u=i(29100),d=new n({Extends:u,initialize:function(e){var t=e.game.renderer,i=s(e,"fragShader",a);e.fragShader=c.parseFragmentShaderMaxTextures(i,t.maxTextures),e.vertShader=s(e,"vertShader",o),e.attributes=s(e,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),e.resizeUniform="uResolution",u.call(this,e),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this);var e=this.renderer;this.set1iv("uMainSampler",e.textureIndexes),this.set2f("uResolution",e.width,e.height)},batchSprite:function(e,t,i){this.manager.set(this,e);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,a=e.frame,o=a.glTexture,h=a.u0,l=a.v0,u=a.u1,d=a.v1,f=a.x,p=a.y,g=a.cutWidth,m=a.cutHeight,v=a.customPivot,y=e.displayOriginX,b=e.displayOriginY,x=-y+f,E=-b+p;if(e.isCropped){var w=e._crop;(w.flipX!==e.flipX||w.flipY!==e.flipY)&&a.updateCropUVs(w,e.flipX,e.flipY),h=w.u0,l=w.v0,u=w.u1,d=w.v1,g=w.width,m=w.height,f=w.x,p=w.y,x=-y+f,E=-b+p}var T=1,S=1;e.flipX&&(v||(x+=-a.realWidth+2*y),T=-1),e.flipY&&(v||(E+=-a.realHeight+2*b),S=-1);var A=e.x,C=e.y;t.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),r.applyITRS(A,C,e.rotation,e.scaleX*T,e.scaleY*S),n.copyFrom(t.matrix),i?(n.multiplyWithOffset(i,-t.scrollX*e.scrollFactorX,-t.scrollY*e.scrollFactorY),r.e=A,r.f=C):(r.e-=t.scrollX*e.scrollFactorX,r.f-=t.scrollY*e.scrollFactorY),n.multiply(r,s);var _=s.setQuad(x,E,x+g,E+m,t.renderRoundPixels),I=c.getTintAppendFloatAlpha,O=t.alpha,P=I(e.tintTopLeft,O*e._alphaTL),M=I(e.tintTopRight,O*e._alphaTR),R=I(e.tintBottomLeft,O*e._alphaBL),L=I(e.tintBottomRight,O*e._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(e,a);this.manager.preBatch(e),this.batchQuad(e,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,l,u,d,P,M,R,L,e.tintFill,o,D),this.manager.postBatch(e)},batchTexture:function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p,g,m,v,y,b,x,E,w,T,S,A,C,_,I,O,P,M,R){void 0===R&&(R=!1),this.manager.set(this,e);var L=this._tempMatrix1,D=this._tempMatrix2,k=this._tempMatrix3,N=v/i+C,F=y/n+_,B=(v+b)/i+C,U=(y+x)/n+_,V=a,G=o,j=-g,W=-m;if(e.isCropped){var Y=e._crop,H=Y.width,z=Y.height;V=H,G=z,a=H,o=z,v=Y.x,y=Y.y;var X=v,q=y;u&&(X=b-Y.x-H),d&&(q=x-Y.y-z),N=X/i+C,F=q/n+_,B=(X+H)/i+C,U=(q+z)/n+_,j=-g+v,W=-m+y}d^=!P&&t.isRenderTexture?1:0,u&&(V*=-1,j+=a),d&&(G*=-1,W+=o),I.roundPixels&&(r=Math.floor(r),s=Math.floor(s)),D.applyITRS(r,s,l,h,c),L.copyFrom(I.matrix),O?(L.multiplyWithOffset(O,-I.scrollX*f,-I.scrollY*p),D.e=r,D.f=s):(D.e-=I.scrollX*f,D.f-=I.scrollY*p),L.multiply(D,k);var K=k.setQuad(j,W,j+V,W+G,I.renderRoundPixels);null==M&&(M=this.setTexture2D(t)),e&&!R&&this.manager.preBatch(e),this.batchQuad(e,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],N,F,B,U,E,w,T,S,A,t,M),e&&!R&&this.manager.postBatch(e)},batchTextureFrame:function(e,t,i,n,r,s,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(s),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var l=h.setQuad(t,i,t+e.width,i+e.height),u=this.setTexture2D(e.source.glTexture);n=c.getTintAppendFloatAlpha(n,r),this.batchQuad(null,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e.u0,e.v0,e.u1,e.v1,n,n,n,n,0,e.glTexture,u)},batchFillRect:function(e,t,i,n,r,s){this.renderer.pipelines.set(this);var a=this.calcMatrix;s&&s.multiply(r,a);var o=a.setQuad(e,t,e+i,t+n),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(e,t,i,n,r,s,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var c=h.getX(e,t),l=h.getY(e,t),u=h.getX(i,n),d=h.getY(i,n),f=h.getX(r,s),p=h.getY(r,s),g=this.fillTint;this.batchTri(null,c,l,u,d,f,p,0,0,1,1,g.TL,g.TR,g.BL,2)},batchStrokeTriangle:function(e,t,i,n,r,s,a,o,h){var c=this.tempTriangle;c[0].x=e,c[0].y=t,c[0].width=a,c[1].x=i,c[1].y=n,c[1].width=a,c[2].x=r,c[2].y=s,c[2].width=a,c[3].x=e,c[3].y=t,c[3].width=a,this.batchStrokePath(c,a,!1,o,h)},batchFillPath:function(e,t,i){this.renderer.pipelines.set(this);var n,s,a=this.calcMatrix;i&&i.multiply(t,a);for(var o=e.length,h=this.polygonCache,c=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,d=0;d0&&V[4]?this.batchQuad(null,L,D,O,P,V[0],V[1],V[2],V[3],0,0,1,1,N,F,B,U,2):(G[0]=L,G[1]=D,G[2]=O,G[3]=P,G[4]=1),h&&G[4]?this.batchQuad(null,_,I,M,R,G[0],G[1],G[2],G[3],0,0,1,1,N,F,B,U,2):(V[0]=_,V[1]=I,V[2]=M,V[3]=R,V[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});e.exports=d},43439:(e,t,i)=>{/** + */var n=i(83419),r=i(94811),s=i(95540),a=i(98840),o=i(44667),h=i(61340),c=i(70554),l=i(14500),u=i(29100),d=new n({Extends:u,initialize:function(e){var t=e.game.renderer,i=s(e,"fragShader",a);e.fragShader=c.parseFragmentShaderMaxTextures(i,t.maxTextures),e.vertShader=s(e,"vertShader",o),e.attributes=s(e,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),e.resizeUniform="uResolution",u.call(this,e),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this);var e=this.renderer;this.set1iv("uMainSampler",e.textureIndexes),this.set2f("uResolution",e.width,e.height)},batchSprite:function(e,t,i){this.manager.set(this,e);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,a=e.frame,o=a.glTexture,h=a.u0,l=a.v0,u=a.u1,d=a.v1,f=a.x,p=a.y,g=a.cutWidth,m=a.cutHeight,v=a.customPivot,y=e.displayOriginX,b=e.displayOriginY,x=-y+f,E=-b+p;if(e.isCropped){var w=e._crop;(w.flipX!==e.flipX||w.flipY!==e.flipY)&&a.updateCropUVs(w,e.flipX,e.flipY),h=w.u0,l=w.v0,u=w.u1,d=w.v1,g=w.width,m=w.height,f=w.x,p=w.y,x=-y+f,E=-b+p}var T=1,S=1;e.flipX&&(v||(x+=-a.realWidth+2*y),T=-1),e.flipY&&(v||(E+=-a.realHeight+2*b),S=-1);var A=e.x,C=e.y;t.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),r.applyITRS(A,C,e.rotation,e.scaleX*T,e.scaleY*S),n.copyFrom(t.matrix),i?(n.multiplyWithOffset(i,-t.scrollX*e.scrollFactorX,-t.scrollY*e.scrollFactorY),r.e=A,r.f=C):(r.e-=t.scrollX*e.scrollFactorX,r.f-=t.scrollY*e.scrollFactorY),n.multiply(r,s);var _=s.setQuad(x,E,x+g,E+m,t.renderRoundPixels),I=c.getTintAppendFloatAlpha,O=t.alpha,P=I(e.tintTopLeft,O*e._alphaTL),M=I(e.tintTopRight,O*e._alphaTR),R=I(e.tintBottomLeft,O*e._alphaBL),L=I(e.tintBottomRight,O*e._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(e,a);this.manager.preBatch(e),this.batchQuad(e,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,l,u,d,P,M,R,L,e.tintFill,o,D),this.manager.postBatch(e)},batchTexture:function(e,t,i,n,r,s,a,o,h,c,l,u,d,f,p,g,m,v,y,b,x,E,w,T,S,A,C,_,I,O,P,M,R){void 0===R&&(R=!1),this.manager.set(this,e);var L=this._tempMatrix1,D=this._tempMatrix2,k=this._tempMatrix3,N=v/i+C,F=y/n+_,B=(v+b)/i+C,U=(y+x)/n+_,V=a,G=o,j=-g,W=-m;if(e.isCropped){var Y=e._crop,H=Y.width,z=Y.height;V=H,G=z,a=H,o=z,v=Y.x,y=Y.y;var X=v,K=y;u&&(X=b-Y.x-H),d&&(K=x-Y.y-z),N=X/i+C,F=K/n+_,B=(X+H)/i+C,U=(K+z)/n+_,j=-g+v,W=-m+y}d^=!P&&t.isRenderTexture?1:0,u&&(V*=-1,j+=a),d&&(G*=-1,W+=o),I.roundPixels&&(r=Math.floor(r),s=Math.floor(s)),D.applyITRS(r,s,l,h,c),L.copyFrom(I.matrix),O?(L.multiplyWithOffset(O,-I.scrollX*f,-I.scrollY*p),D.e=r,D.f=s):(D.e-=I.scrollX*f,D.f-=I.scrollY*p),L.multiply(D,k);var q=k.setQuad(j,W,j+V,W+G,I.renderRoundPixels);null==M&&(M=this.setTexture2D(t)),e&&!R&&this.manager.preBatch(e),this.batchQuad(e,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],N,F,B,U,E,w,T,S,A,t,M),e&&!R&&this.manager.postBatch(e)},batchTextureFrame:function(e,t,i,n,r,s,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(s),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var l=h.setQuad(t,i,t+e.width,i+e.height),u=this.setTexture2D(e.source.glTexture);n=c.getTintAppendFloatAlpha(n,r),this.batchQuad(null,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e.u0,e.v0,e.u1,e.v1,n,n,n,n,0,e.glTexture,u)},batchFillRect:function(e,t,i,n,r,s){this.renderer.pipelines.set(this);var a=this.calcMatrix;s&&s.multiply(r,a);var o=a.setQuad(e,t,e+i,t+n),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(e,t,i,n,r,s,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var c=h.getX(e,t),l=h.getY(e,t),u=h.getX(i,n),d=h.getY(i,n),f=h.getX(r,s),p=h.getY(r,s),g=this.fillTint;this.batchTri(null,c,l,u,d,f,p,0,0,1,1,g.TL,g.TR,g.BL,2)},batchStrokeTriangle:function(e,t,i,n,r,s,a,o,h){var c=this.tempTriangle;c[0].x=e,c[0].y=t,c[0].width=a,c[1].x=i,c[1].y=n,c[1].width=a,c[2].x=r,c[2].y=s,c[2].width=a,c[3].x=e,c[3].y=t,c[3].width=a,this.batchStrokePath(c,a,!1,o,h)},batchFillPath:function(e,t,i){this.renderer.pipelines.set(this);var n,s,a=this.calcMatrix;i&&i.multiply(t,a);for(var o=e.length,h=this.polygonCache,c=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,d=0;d0&&V[4]?this.batchQuad(null,L,D,O,P,V[0],V[1],V[2],V[3],0,0,1,1,N,F,B,U,2):(G[0]=L,G[1]=D,G[2]=O,G[3]=P,G[4]=1),h&&G[4]?this.batchQuad(null,_,I,M,R,G[0],G[1],G[2],G[3],0,0,1,1,N,F,B,U,2):(V[0]=_,V[1]=I,V[2]=M,V[3]=R,V[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});e.exports=d},43439:(e,t,i)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4780,7 +4780,7 @@ * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */e.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i(85454)})(),t.exports=n()},{"57a99fe9b8471a10":"4VGCc"}],"4VGCc":[function(e,t,i){},{}],e7OdC:[function(e,t,i){t.exports.FPSCounter=class{constructor(e){this.lastFrameTime=performance.now(),this.frameCount=0,this.fpsDisplay=e.createElementWithStyles("div","fps-counter",{padding:"0 20px",background:"#000",color:"#00ff00"}),e.getElement(".header").appendChild(this.fpsDisplay)}updateFPS(){let e=performance.now(),t=e-this.lastFrameTime;this.lastFrameTime=e;let i=Math.round(1e3/t);this.frameCount++,0==this.frameCount%60&&(this.fpsDisplay.textContent="FPS: "+i),requestAnimationFrame(this.updateFPS.bind(this))}start(){this.updateFPS()}}},{}],izuLV:[function(e,t,i){let n="objects.";t.exports.ObjectsConst={OBJECT_ANIMATION:"oa",OBJECT_INTERACTION:"oi",TYPE_OBJECT:"obj",TYPE_ANIMATION:"anim",TYPE_NPC:"npc",TYPE_ENEMY:"enemy",TYPE_TRADER:"trader",TYPE_DROP:"drop",DYNAMIC_ANIMATION:"dyn",MESSAGE:{DATA_VALUES:{NAMESPACE:"objects"}},EVENT_PREFIX:{BASE:"bo",ANIMATION:"ao",DROP:"dep",ENEMY:"eo",NPC:"npc",TRADER:"tnpc"},SNIPPETS:{PREFIX:n,NPC_INVALID:n+"npcInvalid",TRADER:{CONTENT:n+"trader.content",OPTIONS:{BUY:n+"trader.options.buy",SELL:n+"trader.options.sell"},BUY_CONFIRMED:n+"trader.buyConfirmed",SELL_CONFIRMED:n+"trader.sellConfirmed"}},DEFAULTS:{BASE_OBJECT:{CONTENT:"",OPTIONS:{}},TRADER_OBJECT:{INVENTORY_MAP:{buy:"A",sell:"B"},OPTIONS:{BUY:"buy",SELL:"sell"}},TARGETS:{OBJECT:0,PLAYER:1}},TRADE_ACTIONS_FUNCTION_NAME:{ADD:"add",REMOVE:"remove",CONFIRM:"confirm",DISCONFIRM:"disconfirm",CANCEL:"cancel"},TRADE_ACTIONS:{SUB_ACTION:"sub",ADD:"ta",REMOVE:"tr",CONFIRM:"tc",DISCONFIRM:"td"},DROPS:{KEY:"drp",REMOVE:"drmv",PARAMS:"drpp",ASSET_KEY:"dk",PICK_UP_ACT:"rpu",ASSETS_PATH:"/assets/custom/sprites/",FILE:"df",TYPE:"dt"}}},{}],"7XAJ0":[function(e,t,i){let{PlayerEngine:n}=e("ad34e884dd74ab75"),{SceneDynamic:r}=e("8c3cc377813bccbe"),{ScenePreloader:s}=e("eb7c0f886bf8e7c7"),{GameConst:a}=e("dd0538535f6f136a"),{ErrorManager:o,Logger:h,sc:c}=e("2b2fa27d8710e574");t.exports.RoomEvents=class{constructor(e,t){this.room=!1,this.sceneData=!1,this.scenePreloader=!1,this.playersOnAddCallback=!1,this.playersOnRemoveCallback=!1,this.playersQueue={},this.gameManager=t,this.gameEngine=t.gameEngine,this.roomName=e,this.events=t.events,this.objectsUi={},this.tradeUi={},this.gameOverRetries=0,this.gameOverMaxRetries=0,this.gameOverRetryTime=200,this.automaticallyCloseAllDialogsOnSceneChange=t.config.getWithoutLogs("client/rooms/automaticallyCloseAllDialogsOnSceneChange",!0)}async activateRoom(e,t=!1){await this.events.emit("reldens.activateRoom",e,this.gameManager),this.room=e,this.playersOnAddCallback=this.room.state.players.onAdd((e,i)=>{this.checkAndCreateScene(),this.playersOnAdd(e,i,t),this.listenPlayerAndStateChanges(e,i)}),this.playersOnRemoveCallback=this.room.state.players.onRemove((e,t)=>{this.playersOnRemove(e,t)}),this.room.onMessage("*",async e=>{await this.roomOnMessage(e)}),this.room.onLeave(e=>{this.roomOnLeave(e)})}listenPlayerAndStateChanges(e,t){let i=this.gameManager.getCurrentPlayer().player_id,n=Object.keys(e),r=Object.keys(e.state);for(let i of n)e.listen(i,i=>{this.playersOnChange(e,t,"playerChange")});for(let n of r)e.state.listen(n,r=>{if(e.state[n]=r,this.playersOnChange(e,t,"playerChange"),"inState"===n&&e.player_id===i){if(a.STATUS.DEATH===r)return this.showGameOverBox();this.hideGameOverBox()}})}checkAndCreateScene(){if(!this.room.state||this.room.state.sceneData===this.sceneData||(this.sceneData=c.toJson(this.room.state.sceneData),this.gameEngine.scene.getScene(this.roomName)))return;let e=this.createSceneInstance(this.roomName,this.sceneData,this.gameManager);this.gameEngine.scene.add(this.roomName,e,!1)}async playersOnAdd(e,t,i){await this.events.emit("reldens.playersOnAdd",e,t,i,this);let n={x:e.state.x,y:e.state.y,dir:e.state.dir,playerName:e.playerName,avatarKey:e.avatarKey,playedTime:e.playedTime,player_id:e.player_id};if(this.isCurrentPlayer(t))return await this.createCurrentPlayer(e,i,t);this.addOtherPlayers(e,t,n)}isCurrentPlayer(e){return e===this.room.sessionId}addOtherPlayers(e,t,i){if(!this.engineStarted)return this.playersQueue[t]=i,!1;let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;n.player.addPlayer(t,i)}async createCurrentPlayer(e,t,i){this.engineStarted=!0,await this.startEngineScene(e,this.room,t);let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;for(let r of(await this.events.emit("reldens.playersQueueBefore",e,i,t,this),Object.keys(this.playersQueue)))n.player.addPlayer(r,this.playersQueue[r]);let r={player:e,key:i,previousScene:t,roomEvents:this};return await this.events.emit("reldens.createCurrentPlayer",r),r}isValidScene(e,t){return e.key===t.state.scene&&e.player&&e.player.players}playersOnChange(e,t,i){if(e.state.scene!==this.roomName){e.player_id!==this.gameManager.getCurrentPlayer().player_id||this.gameManager.isChangingScene||h.info("Player scene miss match.",{currentScene:this.roomName,playerSceneOnState:e?.state.scene,player:e?.sessionId,currentPlayer:this.gameManager.getCurrentPlayer()?.playerId,isChangingScene:this.gameManager.isChangingScene});return}let n=this.getActiveScene();this.playerExists(n,t)&&n.player.updatePlayer(t,e)}playersOnRemove(e,t){return(this.events.emitSync("reldens.playersOnRemove",e,t,this),t===this.room.sessionId)?this.gameOverReload():this.removePlayerByKey(t)}removePlayerByKey(e){let t=this.getActiveScene();this.playerExists(t,e)&&(t.player.removePlayer(e),t.player.currentTarget?.id===e&&this.gameEngine.clearTarget())}gameOverReload(){let e={confirmed:!0};this.events.emitSync("reldens.gameOverReload",this,e),!this.gameManager.gameOver&&e.confirmed&&this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.sessionEnded"))}playerExists(e,t){return e.player&&c.hasOwn(e.player.players,t)}async roomOnMessage(e){await this.runGameOver(e),await this.runRevived(e),await this.runChangeScene(e),await this.runReconnect(e),await this.runUpdateStats(e),await this.runInitUi(e),await this.closeBox(e),await this.runCustomMessageListener(e)}async runInitUi(e){if(e.act!==a.UI||!e.id)return!1;await this.events.emit("reldens.initUiBefore",e,this),this.initUi(e),await this.events.emit("reldens.initUiAfter",e,this)}async closeBox(e){if(a.CLOSE_UI_ACTION!==e.act||!e.id)return!1;let t=this.gameManager.gameDom.getElement("#box-"+e.id+" .box-close");return t?(t.click(),!0):(h.error('Box could not be closed ID "'+e.id+'".'),!1)}async runCustomMessageListener(e){let t=c.get(e,"listener","");if(""===t)return!1;let i=this.gameManager.config.get("client/message/listeners",{}),n=this.gameManager.config.get("client/customClasses/message/listeners",{}),r=c.get(n,t,!1);return(r||(r=c.get(i,t,!1)),r)?c.isFunction(r.executeClientMessageActions)?void r.executeClientMessageActions({message:e,roomEvents:this}):(h.error('Listener is missing "executeClientMessageActions" method.',r),!1):(h.error('Listener "'+t+'" is missing.'),!1)}async runUpdateStats(e){return e.act===a.PLAYER_STATS&&(await this.events.emit("reldens.playerStatsUpdateBefore",e,this),await this.updatePlayerStats(e))}async runReconnect(e){if(e.act!==a.RECONNECT)return!1;await this.events.emit("reldens.beforeReconnectGameClient",e,this),await this.gameManager.reconnectGameClient(e,this.room)}async runChangeScene(e){if(e.act===a.CHANGING_SCENE&&this.room.sessionId===e.id&&(this.gameManager.isChangingScene=!0,this.closeAllActiveDialogs(),this.gameManager.getActiveScene().scene.setVisible(!1)),e.act!==a.CHANGED_SCENE||e.scene!==this.room.name||this.room.sessionId===e.id)return!1;await this.events.emit("reldens.startChangedScene",{message:e,roomEvents:this});let t=this.getActiveScene(),{id:i,x:n,y:r,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}=e,u=this.gameManager.config.get("client/players/size/topOffset"),d=this.gameManager.config.get("client/players/size/leftOffset");t.player.addPlayer(i,{x:n-d,y:r-u,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}),this.gameManager.isChangingScene=!1,await this.events.emit("reldens.endChangedScene",{message:e,roomEvents:this})}closeAllActiveDialogs(){if(!this.automaticallyCloseAllDialogsOnSceneChange)return;let e=this.gameManager.gameDom.getElements(".box-close");if(0!==e.length)for(let t of e)t.click()}async runRevived(e){if(e.act!==a.REVIVED)return!1;this.gameManager.gameDom.getElement("#game-over").classList.add("hidden");let t=this.gameManager.getCurrentPlayer(),i=c.get(t.players,e.t,!1);if(!i)return!1;i.visible=!0,c.hasOwn(i,"nameSprite")&&i.nameSprite&&(i.nameSprite.visible=!0),this.getActiveScene().stopOnDeathOrDisabledSent=!1}async runGameOver(e){if(e.act!==a.GAME_OVER)return!1;try{await this.events.emit("reldens.runGameOver",{message:e,defaultBehavior:!0,roomEvents:this}),await this.events.emit("reldens.gameOver",e,this),this.gameManager.gameOver=!0;let t=this.gameManager.getCurrentPlayer();if(!t)return this.gameOverRetriesthis.runGameOver(e),this.gameOverRetryTime),this.gameOverRetries++),!1;t.players[t.playerId].visible=!1,this.showGameOverBox()}catch(t){return setTimeout(()=>this.runGameOver(e),200),this.gameOverRetries++,!1}}showGameOverBox(){return this.displayGameOverBox(!0)}hideGameOverBox(){return this.displayGameOverBox(!1)}displayGameOverBox(e){h.debug("Display game over box: "+(e?"yes":"no")+".");let t=this.gameManager.gameDom.getElement("#game-over");return t?e?(t.classList.remove("hidden"),!0):(t.classList.add("hidden"),!1):(h.debug("GameOver box element not found."),!1)}async roomOnLeave(e){!this.isAbnormalShutdown(e)||this.gameManager.gameOver||this.gameManager.forcedDisconnection||(h.error("There was a connection error.",{code:e,isGameOver:this.gameManager.gameOver,isForcedDisconnection:this.gameManager.forcedDisconnection}),this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.serverDown"))),await this.events.emit("reldens.playerLeftScene",{code:e,roomEvents:this})}isAbnormalShutdown(e){return 1001<=e&&1015>=e}async updatePlayerStats(e){if(!c.hasOwn(e,"stats")||!e.stats)return!1;let t=this.getActiveScene();if(!t.player||!c.hasOwn(t.player.players,this.room.sessionId))return h.error("Player not available.",this.room,t),!1;t.player.players[this.room.sessionId].stats=e.stats,this.gameManager.playerData.stats=e.stats,this.gameManager.playerData.statsBase=e.statsBase;let i=this.gameManager.getUiElement("playerStats");if(!i)return!1;let n=i.getChildByProperty("id","player-stats-container");if(!n)return!1;let r=this.gameEngine.uiScene.cache.html.get("playerStat");for(let t of(n.innerHTML="",Object.keys(e.stats))){let i=c.get(this.gameManager.config.client.players.initialStats[t],"data",!1),s=i&&c.get(i,"showBase",!1)?" / "+e.statsBase[t]:"",a=this.gameManager.gameEngine.parseTemplate(r,{statLabel:t,statValue:e.stats[t]+s});n.innerHTML=n.innerHTML+a}await this.events.emit("reldens.playerStatsUpdateAfter",e,this)}initUi(e){let t=this.gameEngine.uiScene;if(!t||!c.hasOwn(t.elementsUi,e.id))return h.error("User interface not found on UI Scene: "+e.id),!1;let i=t.elementsUi[e.id];this.uiSetTitle(i,e),this.uiSetContent(i,e,t);let n=i.getChildByID("box-"+e.id),r=e.keepCurrentDisplay&&"none"===n.style.display;n.style.display=r?"none":"block",i.setDepth(2),this.gameManager.config.get("client/ui/uiTarget/hideOnDialog")&&this.gameEngine.clearTarget()}uiSetTitleAndContent(e,t,i){this.uiSetTitle(e,t),this.uiSetContent(e,t,i)}uiSetTitle(e,t){let i=c.get(t,"title",!1);if(!1===i)return!1;let n=e.getChildByProperty("className","box-title");if(!n)return!1;n.innerHTML=i}uiSetContent(e,t,i){let n=c.get(t,"content",!1);if(!1===n)return!1;let r=e.getChildByProperty("className","box-content");if(!r)return!1;r.innerHTML=n,this.uiSetContentOptions(i,t,r)}uiSetContentOptions(e,t,i){if(!t.options)return!1;let n=e.cache.html.get("uiOptionsContainer"),r=this.gameManager.gameEngine.parseTemplate(n,{id:"ui-"+t.id});i.innerHTML+=r;let s=Object.keys(t.options);if(0===s.length)return!1;for(let i of s){let{label:n,value:r,icon:s}=t.options[i],o=s?"Icon":"Button",h=e.cache.html.get("uiOption"+o),l={id:i,object_id:t.id,label:n,value:r,icon:"/assets/custom/items/"+s+a.FILES.EXTENSIONS.PNG},u=this.gameManager.gameEngine.parseTemplate(h,l);this.gameManager.gameDom.appendToElement("#ui-"+t.id,u);let d="#opt-"+i+"-"+t.id;this.gameManager.gameDom.getElement(d)?.addEventListener("click",e=>{let i={id:t.id,act:a.BUTTON_OPTION,value:e.target.getAttribute("data-option-value")};Object.assign(i,c.get(t,"overrideSendOptions",{})),this.send(i)})}}async startEngineScene(e,t,i=!1){await this.events.emit("reldens.startEngineScene",this,e,t,i);let n=!1;this.gameEngine.uiScene||(n=!0);let r=a.SCENE_PRELOADER+this.sceneData.roomName;this.gameEngine.scene.getScene(r)?await this.createEngineOnScene(r,e,t,i):await this.createPreloaderAndScene(r,n,e,t,i)}async createEngineOnScene(e,t,i,n){this.getActiveScene().objectsAnimationsData=this.sceneData.objectsAnimationsData,this.scenePreloader=this.gameEngine.scene.getScene(e),await this.events.emit("reldens.createdPreloaderRecurring",this,this.scenePreloader),await this.createEngineScene(t,i,n)}async createPreloaderAndScene(e,t,i,n,r){this.scenePreloader=this.createPreloaderInstance({name:e,map:this.sceneData.roomMap,images:this.sceneData.sceneImages,uiScene:t,gameManager:this.gameManager,preloadAssets:this.sceneData.preloadAssets,objectsAnimationsData:this.sceneData.objectsAnimationsData}),this.gameEngine.scene.add(e,this.scenePreloader,!0),await this.events.emit("reldens.createdPreloaderInstance",this,this.scenePreloader);let s=this.gameEngine.scene.getScene(e);s.load.on("complete",async()=>{this.gameEngine.uiScene||(this.gameEngine.uiScene=s,this.showPlayerName(this.gameManager.playerData.id+" - "+this.gameManager.playerData.name)),await this.createEngineScene(i,n,r)})}showPlayerName(e){let t=this.gameManager.getUiElement("playerBox");if(!t)return!1;let i=t.getChildByProperty("className","player-name");if(!i)return!1;i.innerHTML=e}async createEngineScene(e,t,i){let n=this.gameEngine.scene.getScene(i);n&&n.scene.setVisible(!1),await this.events.emit("reldens.createEngineScene",e,t,i,this),this.gameManager.room?await this.destroyPreviousScene(i,e):this.gameEngine.scene.start(e.state.scene),this.gameManager.room=t;let r=this.gameEngine.scene.getScene(e.state.scene);r.player=this.createPlayerEngineInstance(r,e,this.gameManager,t),r.player.create(),this.addExistentPlayers(t,r),this.updateSceneLabel(this.sceneData.roomTitle),this.send({act:a.PLAYER_STATS}),this.send({act:a.CLIENT_JOINED});let s={player:r.player,previousScene:i,roomEvents:this};await this.events.emit("reldens.playersOnAddReady",s);let o={currentScene:r,previousScene:i,roomEvents:this};return await this.events.emit("reldens.createEngineSceneDone",o),o}addExistentPlayers(e,t){if(0===this.playersCountFromState(e))return!1;for(let i of this.playersKeysFromState(e)){let n=this.playerBySessionIdFromState(e,i);if(!n.sessionId||n.sessionId===e.sessionId)continue;let r={x:n.state.x,y:n.state.y,dir:n.state.dir,playerName:n.playerName,playedTime:n.playedTime,avatarKey:n.avatarKey,player_id:n.player_id};t.player.addPlayer(n.sessionId,r)}}playerBySessionIdFromState(e,t){return e.state.players.get(t)}playersCountFromState(e){return e.state.players.size}playersKeysFromState(e){return Array.from(e.state.players.keys())}async destroyPreviousScene(e,t){if(!e)return h.warning("Missing previous scene data.",e),!1;let i=this.gameEngine.scene.getScene(e);if(!i)return h.warning("Missing previous scene instance.",i),!1;await i.changeScene(),this.gameEngine.scene.stop(e),this.gameEngine.scene.start(t.state.scene)}updateSceneLabel(e){let t=this.gameManager.getUiElement("sceneLabel");if(!t)return!1;let i=t.getChildByProperty("className","scene-label");if(!i)return!1;i.innerHTML=e}getActiveScene(){return this.gameEngine.scene.getScene(this.roomName)}createSceneInstance(e,t,i){return new r(e,t,i)}createPlayerEngineInstance(e,t,i,r){return new n({scene:e,playerData:t,gameManager:i,room:r,roomEvents:this})}createPreloaderInstance(e){return new s(e)}send(e,t){try{return(this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSED||this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSING)&&o.error("Connection lost."),t||(t="*"),this.room.send(t,e),!0}catch(t){h.critical(t.message,e)}this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.connectionLost"))}}},{ad34e884dd74ab75:"3GkIQ","8c3cc377813bccbe":"6Vn5m",eb7c0f886bf8e7c7:"45YPY",dd0538535f6f136a:"93TbC","2b2fa27d8710e574":"3lwy5"}],"3GkIQ":[function(e,t,i){let{SpriteTextFactory:n}=e("94c0b713770985e9"),{GameConst:r}=e("c99c71c42a9e0f59"),{ActionsConst:s}=e("51d102aa478bf778"),{Logger:a,sc:o}=e("369ffb9744f96759");t.exports.PlayerEngine=class{constructor(e){let{scene:t,playerData:i,gameManager:n,room:r,roomEvents:s}=e;this.scene=t,this.config=n.config,this.gameManager=n,this.events=n.events,this.playerName=i.playerName,this.avatarKey=i.avatarKey,this.roomName=i.state.scene,this.state=i.state,this.room=r,this.roomEvents=s,this.playerId=r.sessionId,this.player_id=i.player_id,this.players={},this.playedTime=i.playedTime,this.mov=!1,this.dir=!1,this.currentTarget=!1,this.pointsValidator=!1,this.animationBasedOnPress=this.config.get("client/players/animations/basedOnPress"),this.topOff=this.config.get("client/players/size/topOffset"),this.leftOff=this.config.get("client/players/size/leftOffset"),this.collideWorldBounds=this.config.get("client/players/animations/collideWorldBounds"),this.fadeDuration=Number(this.config.get("client/players/animations/fadeDuration")),this.cameraRoundPixels=!!this.config.getWithoutLogs("client/general/engine/cameraRoundPixels",!0),this.cameraInterpolationX=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationX",.02)),this.cameraInterpolationY=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationY",.02)),this.globalConfigNameText=this.config.get("client/ui/players/nameText"),this.globalConfigShowNames=!!this.config.get("client/ui/players/showNames"),this.globalConfigShowNamesLimit=this.config.getWithoutLogs("client/ui/players/showNamesLimit",10),this.defaultActionKeyConfig=this.config.get("client/ui/controls/defaultActionKey"),this.highlightOnOver=!!this.config.getWithoutLogs("client/ui/players/highlightOnOver",!0),this.highlightColor=this.config.getWithoutLogs("client/ui/players/highlightColor","0x00ff00"),this.lastKeyState={}}create(){let e={x:this.state.x,y:this.state.y,dir:this.state.dir,playerName:this.playerName,avatarKey:this.avatarKey,playedTime:this.playedTime,player_id:this.player_id};this.addPlayer(this.playerId,e),this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.scene.setVisible(!0,this.roomName),this.scene.cameras.main.fadeFrom(this.fadeDuration),this.scene.physics.world.fixedStep=!1,this.scene.physics.world.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setIsSceneCamera(!0),this.scene.cameras.main.on("camerafadeincomplete",()=>{this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.cameras.main.setLerp(this.cameraInterpolationX,this.cameraInterpolationY),this.scene.cameras.main.setRoundPixels(this.cameraRoundPixels)})}addPlayer(e,t){if(o.hasOwn(this.players,e))return this.players[e];let{x:i,y:n,dir:r,playerName:s,avatarKey:a,playedTime:h,player_id:c}=t,l=this.gameManager.mappedAvatars[a];return this.players[e]=this.scene.physics.add.sprite(i,n-this.topOff,l),this.players[e].playerName=s,this.players[e].playedTime=h,this.players[e].avatarKey=a,this.players[e].playerId=e,this.players[e].player_id=c,this.players[e].anims.play(l+"_"+r),this.players[e].anims.stop(),this.showPlayerName(e),this.makePlayerInteractive(e),this.players[e].moveSprites={},this.players[e].setDepth(this.players[e].y+this.players[e].body.height),this.players[e].setCollideWorldBounds(this.collideWorldBounds),this.events.emitSync("reldens.playerEngineAddPlayer",this,e,t),this.players[e]}makePlayerInteractive(e){this.players[e].setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(r.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;this.setTargetPlayerById(e)}),this.highlightOnOver&&(this.players[e].on("pointerover",()=>{this.players[e].setTint(this.highlightColor)}),this.players[e].on("pointerout",()=>{this.players[e].clearTint()}))}setTargetPlayerById(e){if(!o.get(this.players,e,!1))return a.info('Target player ID "'+e+'" was not found.'),this.gameManager.gameEngine.clearTarget(),!1;let t=Object.assign({},this.currentTarget);this.currentTarget={id:e,type:r.TYPE_PLAYER,player_id:this.players[e].player_id},this.gameManager.gameEngine.showTarget(this.players[e].playerName,this.currentTarget,t)}showPlayerName(e){if(!this.globalConfigShowNames)return!1;if(!this.players[e])return a.critical('Player ID "'+e+'" not found.',this.players),!1;let t=this.players[e].playerName;if(!t)return a.critical('Player name not found on player ID "'+e+'".',this.players[e]),!1;n.attachTextToSprite(this.players[e],this.applyNameLengthLimit(t),this.globalConfigNameText,this.topOff,"nameSprite",this.scene)}applyNameLengthLimit(e){return 0this.globalConfigShowNamesLimit&&(e=e.slice(0,this.globalConfigShowNamesLimit)+"..."),e}updatePlayer(e,t){let i=this.players[e];if(!i){a.error("PlayerSprite not defined.",this.players,e);return}if(a.debug('Updating player ID "'+e+'". - Current player ID "'+this.player_id+'".'),this.scene.clientInterpolation){this.scene.interpolatePlayersPosition[e]=t.state;return}this.processPlayerPositionAnimationUpdate(i,t.state,e,t.state.x-this.leftOff,t.state.y-this.topOff)}processPlayerPositionAnimationUpdate(e,t,i,n=0,s=0){if(a.debug("Process player position animation update.",{playerSprite:e,playerState:t,playerId:i,newX:n,newY:s}),!e){a.error("Missing player sprite to process animation update.",e,t,i);return}if(!t){a.error("Missing player state to process animation update.",e,t,i);return}if(!i){a.error("Missing player ID to process animation update.",e,t,i);return}if(0!==Object.keys(this.scene.interpolatePlayersPosition).length){if(r.STATUS.DEATH===t.inState||r.STATUS.DISABLED===t.inState){delete this.scene.interpolatePlayersPosition[i];return}this.playPlayerAnimation(e,t,i),this.stopPlayerAnimation(e,t),this.updateSpritePosition(e,n,s),this.updatePlayerState(e,t,i)}}updatePlayerState(e,t,i){let n=e.y+e.body.height;e.depth!==n&&e.setDepth(n),this.events.emitSync("reldens.runPlayerAnimation",this,i,t,e),this.updateNamePosition(e),this.moveAttachedSprites(e,n)}updateSpritePosition(e,t,i){e.x!==t&&(e.x=t),e.y!==i&&(e.y=i)}updateNamePosition(e){if(!this.globalConfigShowNames||!e.nameSprite)return!1;let t=n.getTextPosition(e,this.applyNameLengthLimit(e.playerName),this.globalConfigNameText,this.topOff);e.nameSprite.x=t.x,e.nameSprite.y=t.y}moveAttachedSprites(e,t){let i=Object.keys(e.moveSprites);if(0===i.length)return!1;for(let n of i){let i=e.moveSprites[n];if(i.x===e.x&&i.y===e.y)continue;i.x=e.x,i.y=e.y;let r=t+("above"===o.get(i,"depthByPlayer","")?1:-.1);a.debug('Sprite "'+n+'" new depth: '+r+".",i),i.setDepth(r)}}playPlayerAnimation(e,t,i){if(this.isDeath(t)||this.isDisabled(t))return a.debug('Player with ID "'+i+'" is disabled to play the animation.',t),!1;a.debug("Play player animation.",e.avatarKey,t);let n=this.gameManager.mappedAvatars[e.avatarKey];if(this.animationBasedOnPress){let i=n+"_"+t.dir;return t.x===e.x&&t.y===e.y?(a.debug('Player has not changed, skipped animation "'+i+'".'),!1):(a.debug("Animation played based on press active.",n,{x:t.x+" / "+e.x,y:t.y+" / "+e.y}),void e.anims.play(i,!0))}if(t.x!==e.x){let i=t.x{this.transition=!1,this.gameManager.gameDom.activeElement().blur(),this.minimap.createMap(this,this.gameManager.getCurrentPlayerAnimation()),this.gameManager.isChangingScene=!1}),this.eventsManager.emitSync("reldens.afterSceneDynamicCreate",this)}update(e,t){this.interpolatePositions(),this.movePlayerByPressedButtons()}disableContextMenu(){if(!this.gameManager.config.get("client/ui/controls/disableContextMenu"))return!1;this.gameManager.gameDom.getDocument().addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()})}setupKeyboardAndPointerEvents(){this.input.keyboard.on("keydown",e=>this.executeKeyDownBehavior(e)),this.input.keyboard.on("keyup",e=>{this.executeKeyUpBehavior(e)}),this.input.on("pointerdown",(e,t)=>this.executePointerDownAction(e,t))}async createSceneMap(){for(let e of(this.map=this.make.tilemap({key:this.params.roomName}),this.params.sceneImages)){let t=this.map.addTilesetImage(this.params.roomName,e);t||c.critical("Tileset creation error. Check if the tileset name equals the imageKey without the extension.",{roomName:this.params.roomName,imageKeys:this.params.sceneImages,createdTileset:t}),this.tilesets.push(t)}this.registerLayers(),this.registerTilesetAnimation()}registerTilesetAnimation(){for(let e of this.tilesets)if(this.hasTilesetAnimations(e))for(let t of(this.useTsAnimation=!0,Object.keys(this.layers))){let i=this.layers[t],n=new s;n.register(i,e),n.start(),this.tilesetAnimations.push(n)}}hasTilesetAnimations(e){let t=e?.tileData||{},i=Object.keys(t);if(0===i.length)return!1;for(let e of i)if(t[e].animation)return!0;return!1}executeKeyDownBehavior(e){if(this.gameManager.gameDom.insideInput())return!1;if(r.Keyboard.KeyCodes.SPACE===e.keyCode&&!this.gameManager.gameDom.insideInput()){if(!this.player)return;this.player.runActions()}r.Keyboard.KeyCodes.ESC===e.keyCode&&this.gameManager.gameEngine.clearTarget(),r.Keyboard.KeyCodes.F5===e.keyCode&&(this.gameManager.forcedDisconnection=!0)}executeKeyUpBehavior(e){this.player&&-1!==this.availableControllersKeyCodes().indexOf(e.keyCode)&&this.player.stop()}createControllerKeys(){this.keyLeft=this.input.keyboard.addKey(r.Keyboard.KeyCodes.LEFT),this.keyA=this.input.keyboard.addKey(r.Keyboard.KeyCodes.A),this.keyRight=this.input.keyboard.addKey(r.Keyboard.KeyCodes.RIGHT),this.keyD=this.input.keyboard.addKey(r.Keyboard.KeyCodes.D),this.keyUp=this.input.keyboard.addKey(r.Keyboard.KeyCodes.UP),this.keyW=this.input.keyboard.addKey(r.Keyboard.KeyCodes.W),this.keyDown=this.input.keyboard.addKey(r.Keyboard.KeyCodes.DOWN),this.keyS=this.input.keyboard.addKey(r.Keyboard.KeyCodes.S);let e=this.availableControllersKeyCodes();for(let t of this.gameManager.gameDom.getElements("input"))this.addAndRemoveCapture(e,t)}addAndRemoveCapture(e,t){this.loopKeysAddListenerToElement(e,t,"focusin","removeCapture"),this.loopKeysAddListenerToElement(e,t,"click","removeCapture"),this.loopKeysAddListenerToElement(e,t,"focusout","addCapture"),this.loopKeysAddListenerToElement(e,t,"blur","addCapture")}availableControllersKeyCodes(){return[r.Keyboard.KeyCodes.LEFT,r.Keyboard.KeyCodes.A,r.Keyboard.KeyCodes.RIGHT,r.Keyboard.KeyCodes.D,r.Keyboard.KeyCodes.UP,r.Keyboard.KeyCodes.W,r.Keyboard.KeyCodes.DOWN,r.Keyboard.KeyCodes.S]}executePointerDownAction(e,t){if(0{u.destroy()}})}updatePointerObject(e){if(!this.configManager.get("client/ui/pointer/show"))return;this.arrowSprite&&this.arrowSprite.destroy();let t=this.configManager.get("client/ui/pointer/topOffSet",16);this.arrowSprite=this.physics.add.sprite(e.worldX,e.worldY-t,o.ARROW_DOWN),this.arrowSprite.setDepth(5e5),this.arrowSprite.anims.play(o.ARROW_DOWN,!0).on("animationcomplete",()=>{this.arrowSprite.destroy()})}getAnimationByKey(e){return this.anims&&this.anims?.anims&&this.anims?.anims?.entries?l.get(this.anims.anims.entries,e,!1):(c.error("Animations not loaded.",this.anims),!1)}getObjectFromExtraData(e,t,i){let n=!1,r=e+"K",s=t[e+"T"]===h.DATA_TYPE_VALUE_PLAYER;return!s&&l.hasOwn(this.objectsAnimations,t[r])&&(n=this.objectsAnimations[t[r]]),s&&l.hasOwn(i.players,t[r])&&(n=i.players[t[r]]),n}loopKeysAddListenerToElement(e,t,i,n){t.addEventListener(i,()=>{for(let t of e)this.input.keyboard[n](t)})}}},{c5f254ffb1f1868:"8S6DV","648aa76284c65b04":"4prPd","3e4f1f0221386850":"1LEsD","43a627027f5eb0e5":"93TbC",f368cde667056257:"59VA7","1c07ccf976c90508":"3lwy5"}],"4prPd":[function(e,t,i){t.exports.TileSetAnimation=class{constructor(e){this.timer=e?.timer}register(e,t){for(let i of(this.animations=[],this.registered={},this.layer=e,this.tileset=t,Object.keys(t.tileData))){let e=t.tileData[i];if(!e.animation)continue;e.id=i;let n=0;for(let t of e.animation){if(Number(i)===Number(t?.tileid||0)){e.initIndex=n;break}n++}this.animations.push(e)}}start(){for(let e of this.animations){let t=e.animation.length,i=Number(e.initIndex||0),n=Number((i+1)%t);this.repeat(e,i,n)}}repeat(e,t,i){let n=e.id;this.registered[n]&&(this.registered[n]=null);let r=e.animation,s=r.length,a=Number(this.tileset.firstgid),o=Number(e.animation[t].tileid)+a,h=Number(e.animation[i].tileid)+a;this.layer.replaceByIndex(o,h);let c=r[i].duration,l=Number((i+1)%s);this.registered[n]=this.setTimeout(this.repeat.bind(this,e,Number(i),l),c)}destroy(){for(let e of Object.keys(this.registered))this.registered[e]&&this.clearTimeout(this.registered[e])}setTimeout(e,t){return this.timer?this.timer.setTimeout(e,t):setTimeout(e,t)}clearTimeout(e){if(this.timer)return this.timer.clearTimeout(e);clearTimeout(e)}}},{}],"1LEsD":[function(e,t,i){let{sc:n}=e("786a4b1c3c76b965");t.exports.Minimap=class{constructor(e){this.config=e.config,this.events=e.events}createMap(e,t){this.minimapCamera=!1,this.circle=!1,this.scope=!1,this.awaitOnCamera=n.get(this.config,"awaitOnCamera",400),this.autoWidth=e.map.widthInPixels/n.get(this.config,"mapWidthDivisor",1),this.camWidth=n.get(this.config,"fixedWidth",this.autoWidth),this.autoHeight=e.map.heightInPixels/n.get(this.config,"mapHeightDivisor",1),this.camHeight=n.get(this.config,"fixedHeight",this.autoHeight),this.camX=n.get(this.config,"camX",0),this.camY=n.get(this.config,"camY",0),this.camBackgroundColor=n.get(this.config,"camBackgroundColor","rgba(0,0,0,0.6)"),this.camZoom=n.get(this.config,"camZoom",.15),this.roundMap=n.get(this.config,"roundMap",!1),this.addCircle=n.get(this.config,"addCircle",!1),this.createMinimapCamera(e,t),this.createRoundMap(e),this.events.emitSync("reldens.createdMinimap",this)}createMinimapCamera(e,t){this.minimapCamera=e.cameras.add(this.camX,this.camY,this.camWidth,this.camHeight).setName("minimap").setBackgroundColor(this.camBackgroundColor).setZoom(this.camZoom).startFollow(t,n.get(this.config,"mapCameraRoundPixels",!0),n.get(this.config,"mapCameraLerpX",1),n.get(this.config,"mapCameraLerpY",1)).setRoundPixels(!0).setVisible(!1).setOrigin(n.get(this.config,"mapCameraOriginX",.18),n.get(this.config,"mapCameraOriginY",.18))}createRoundMap(e){if(!this.roundMap)return!1;this.addCircle&&this.addMinimapCircle(e),this.createRoundCamera(e)}addMinimapCircle(e){let t=e.gameManager.getActiveScenePreloader();this.circle=t.add.circle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35),n.get(this.config,"circleColor","rgb(0,0,0)"),n.get(this.config,"circleAlpha",1)),this.circle.setStrokeStyle(n.get(this.config,"circleStrokeLineWidth",6),n.get(this.config,"circleStrokeColor",0),n.get(this.config,"circleStrokeAlpha",.6)),this.circle.setFillStyle(n.get(this.config,"circleFillColor",1),n.get(this.config,"circleFillAlpha",0)),this.circle.setVisible(!1)}createRoundCamera(e){this.scope=e.add.graphics(),this.scope.fillStyle(0,0).fillCircle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35)),this.minimapCamera.setMask(this.scope.createGeometryMask())}destroyMap(){delete this.minimapCamera,delete this.circle,delete this.scope}}},{"786a4b1c3c76b965":"3lwy5"}],"45YPY":[function(e,t,i){let{Scene:n,Geom:r}=e("df67ed4c812038a9"),{MinimapUi:s}=e("a689b035cfc5756"),{InstructionsUi:a}=e("55a2dd84a2e283e3"),{SettingsUi:o}=e("29c970db688707f2"),{Joystick:h}=e("c747f1452190e301"),{GameConst:c}=e("475d783a521115cd"),{ActionsConst:l}=e("b9b9df6bd8016f7d"),{Logger:u,sc:d}=e("6e32bad98d4c2ac");t.exports.ScenePreloader=class extends n{constructor(e){super({key:e.name}),this.progressBar=null,this.progressCompleteRect=null,this.progressRect=null,this.userInterfaces={},this.preloadMapKey=e.map,this.preloadImages=e.images,this.uiScene=e.uiScene,this.elementsUi={},this.gameManager=e.gameManager,this.eventsManager=e.gameManager.events,this.preloadAssets=e.preloadAssets||{},this.directionalAnimations={},this.objectsAnimations={},this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.gameManager.activeRoomEvents.getActiveScene().objectsAnimationsData=e.objectsAnimationsData,this.playerSpriteSize={frameWidth:this.gameManager.config.get("client/players/size/width",52),frameHeight:this.gameManager.config.get("client/players/size/height",71)},this.useJoystick=this.gameManager.config.getWithoutLogs("client/ui/controls/useJoystick",!1),this.joystick=new h({scenePreloader:this})}preload(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.beforePreload",this,e),this.preloadUiScene(),this.preloadMapJson(),this.preloadMapImages(),this.preloadValidAssets(),this.preloadPlayerDefaultSprite(),this.preloadArrowPointer(),this.load.image(c.ICON_STATS,this.gameManager.config.get("client/general/assets/statsIconPath","/assets/icons/book.png")),this.load.on("fileprogress",this.onFileProgress,this),this.load.on("progress",this.onLoadProgress,this),this.load.on("complete",this.onLoadComplete,this),this.configuredFrameRate=this.gameManager.config.get("client/general/animations/frameRate",10),this.createProgressBar()}preloadMapJson(){this.preloadMapKey&&this.load.tilemapTiledJSON(this.preloadMapKey,"/assets/maps/"+this.preloadMapKey+".json")}preloadArrowPointer(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={frameWidth:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameWidth",32),frameHeight:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameHeight",32)};this.load.spritesheet(c.ARROW_DOWN,this.gameManager.config.get("client/general/assets/arrowDownPath","/assets/sprites/arrow-down.png"),e)}preloadUiScene(){this.uiScene&&(this.eventsManager.emitSync("reldens.beforePreloadUiScene",this),this.gameManager.config.get("client/ui/playerBox/enabled")&&this.load.html("playerBox","/assets/html/ui-player-box.html"),this.gameManager.config.get("client/ui/controls/enabled")&&this.load.html("controls","/assets/html/ui-controls.html"),this.useJoystick&&this.load.html("joystick","/assets/html/ui-joystick.html"),this.gameManager.config.get("client/ui/sceneLabel/enabled")&&this.load.html("sceneLabel","/assets/html/ui-scene-label.html"),this.gameManager.config.get("client/ui/instructions/enabled")&&this.load.html("instructions","/assets/html/ui-instructions.html"),this.gameManager.config.get("client/ui/minimap/enabled")&&this.load.html("minimap","/assets/html/ui-minimap.html"),this.gameManager.config.get("client/ui/settings/enabled")&&(this.load.html("settings","/assets/html/ui-settings.html"),this.load.html("settings-content","/assets/html/ui-settings-content.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadTarget/enabled",!0)&&this.load.html("uiTarget","/assets/html/ui-target.html"),this.gameManager.config.getWithoutLogs("client/ui/preloadOptionsTemplates/enabled",!0)&&(this.load.html("uiOptionButton","/assets/html/ui-option-button.html"),this.load.html("uiOptionIcon","/assets/html/ui-option-icon.html"),this.load.html("uiOptionsContainer","/assets/html/ui-options-container.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadLoading/enabled",!0)&&this.load.html("uiLoading","/assets/html/ui-loading.html"),this.eventsManager.emitSync("reldens.preloadUiScene",this))}preloadMapImages(){if(this.preloadImages)for(let e of this.preloadImages)this.load.image(e,`/assets/maps/${e}`)}preloadValidAssets(){if(!d.isObject(this.preloadAssets)){u.info("None assets available for preload.");return}for(let e of Object.keys(this.preloadAssets)){let t=this.preloadAssets[e];if("spritesheet"!==t.asset_type)continue;let i=d.toJson(t.extra_params);if(!i){u.error("Missing spritesheet params.",t);continue}this.load.spritesheet(t.asset_key,`/assets/custom/sprites/${t.asset_file}`,i)}}create(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.createPreload",this,e),this.uiScene&&this.createUiScene(),this.createPlayerAnimations(d.get(this.gameManager.playerData,"avatarKey",c.IMAGE_PLAYER)),this.createArrowAnimation()}createUiScene(){this.eventsManager.emitSync("reldens.beforeCreateUiScene",this),this.createPlayerBox(),this.createTargetUi(),this.createSceneLabelBox(),this.createControlsBox(),this.createInstructionsBox(),this.createMiniMap(),this.createSettingsUi(),this.eventsManager.emitSync("reldens.createUiScene",this)}createSettingsUi(){let e=this.getUiConfig("settings");e.enabled&&(this.settingsUi=new o,this.settingsUi.createSettings(e,this))}createMiniMap(){let e=this.getUiConfig("minimap");e.enabled&&(this.minimapUi=new s,this.minimapUi.createMinimap(e,this))}createInstructionsBox(){let e=this.getUiConfig("instructions");e.enabled&&(this.instructionsUi=new a,this.instructionsUi.createInstructions(e,this))}createControlsBox(){let e=this.getUiConfig("controls");if(e.enabled)return this.useJoystick?(this.elementsUi.controls=this.createUi("joystick",e),this.joystick.registerJoystickController()):(this.elementsUi.controls=this.createUi("controls",e),this.registerControllers(this.elementsUi.controls))}createUi(e,t){return this.createContent(e,t.uiX,t.uiY)}createContent(e,t,i){return this.add.dom(t,i).createFromCache(e)}createSceneLabelBox(){let e=this.getUiConfig("sceneLabel");e.enabled&&(this.elementsUi.sceneLabel=this.createUi("sceneLabel",e))}createTargetUi(){let e=this.getUiConfig("uiTarget");e.enabled&&(this.uiTarget=this.createUi("uiTarget",e),this.uiTarget.getChildByProperty("className","close-target").addEventListener("click",()=>{this.gameManager.gameEngine.clearTarget()}))}createPlayerBox(){let e=this.getUiConfig("playerBox");if(!e.enabled)return;this.elementsUi.playerBox=this.createUi("playerBox",e);let t=this.elementsUi.playerBox.getChildByProperty("id","logout");t?.addEventListener("click",()=>{this.gameManager.forcedDisconnection=!0,this.gameManager.firebase.isActive&&this.gameManager.firebase.app.auth().signOut(),this.gameManager.gameDom.getWindow().location.reload()})}getUiConfig(e,t,i){let{uiX:n,uiY:r}=this.getUiPosition(e,t,i);return{enabled:this.gameManager.config.getWithoutLogs("client/ui/"+e+"/enabled"),uiX:n,uiY:r}}getUiPosition(e,t,i){""===e&&(e="default");let n=this.gameManager.config.getWithoutLogs("client/ui/"+e,{}),r=d.get(n,"x",0),s=d.get(n,"y",0);if(this.gameManager.config.get("client/ui/screen/responsive")){let e=d.get(n,"responsiveX",!1),a=d.get(n,"responsiveY",!1),o=this.gameManager.gameDom.getElement(".game-container");t||(t=o.offsetWidth),i||(i=o.offsetHeight),r=!1!==e?e*t/100:0,s=!1!==a?a*i/100:0}return{uiX:r,uiY:s}}preloadPlayerDefaultSprite(){let e=this.gameManager.config.get("client/players/animations/fallbackImage","player-base.png");this.load.spritesheet(c.IMAGE_PLAYER,"/assets/custom/sprites/"+e,this.playerSpriteSize)}createPlayerAnimations(e){let t=this.gameManager.config.getWithoutLogs("client/players/animations/"+e+"Frames",this.gameManager.config.get("client/players/animations/defaultFrames"));for(let i of[{k:e+"_"+c.LEFT,img:e,start:t.left.start||3,end:t.left.end||5,repeat:-1,hide:!1},{k:e+"_"+c.RIGHT,img:e,start:t.right.start||6,end:t.right.end||8,repeat:-1,hide:!1},{k:e+"_"+c.UP,img:e,start:t.up.start||9,end:t.up.end||11,repeat:-1,hide:!1},{k:e+"_"+c.DOWN,img:e,start:t.down.start||0,end:t.down.end||2,repeat:-1,hide:!1}])this.createAnimationWith(i);this.eventsManager.emitSync("reldens.createPlayerAnimations",this,e)}createArrowAnimation(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={k:c.ARROW_DOWN,img:c.ARROW_DOWN,start:0,end:2,repeat:3,rate:6};this.createAnimationWith(e)}createAnimationWith(e){if(this.gameManager.createdAnimations[e.k])return;let t={key:e.k,frames:this.anims.generateFrameNumbers(e.img,{start:e.start,end:e.end}),frameRate:d.get(e,"frameRate",this.configuredFrameRate),repeat:e.repeat,hideOnComplete:d.get(e,"hide",!0)};return this.gameManager.createdAnimations[e.k]=this.anims.create(t),this.gameManager.createdAnimations[e.k]}registerControllers(e){this.setupDirButtonInBox(c.UP,e),this.setupDirButtonInBox(c.DOWN,e),this.setupDirButtonInBox(c.LEFT,e),this.setupDirButtonInBox(c.RIGHT,e),this.setupDefaultActionKey(e)}setupDefaultActionKey(e){let t=this.gameManager.config.get("client/ui/controls/defaultActionKey");if(!t)return;let i=this.createActionBox(t);this.gameManager.gameDom.appendToElement(".action-buttons",i),this.setupActionButtonInBox(t,e)}createActionBox(e){let t=this.cache.html.get("actionBox");return this.gameManager.gameEngine.parseTemplate(t,{key:e,actionName:e})}setupDirButtonInBox(e,t){let i=t.getChildByProperty("id",e);i&&this.hold(i,{dir:e})}setupActionButtonInBox(e,t){let i=t.getChildByProperty("id",e);if(i){if(this.gameManager.config.get("client/general/controls/action_button_hold")){this.hold(i,e);return}i?.addEventListener("click",()=>{let t=this.gameManager.activeRoomEvents.getActiveScene(),i={act:l.ACTION,target:t.player.currentTarget,type:e};this.gameManager.activeRoomEvents.send(i)})}}hold(e,t){e.addEventListener("mousedown",i=>{this.startHold(i,e,t)}),e.addEventListener("mouseup",t=>{this.endHold(t,e)}),e.addEventListener("mouseout",t=>{this.endHold(t,e)}),e.addEventListener("touchstart",i=>{this.startHold(i,e,t)}),e.addEventListener("touchend",t=>{this.endHold(t,e)})}startHold(e,t,i){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.add("button-opacity-off");let n=this.gameManager.activeRoomEvents.getActiveScene(),r=i;d.hasOwn(i,"dir")||(r={act:l.ACTION,target:n.player.currentTarget,type:i.type}),this.gameManager.activeRoomEvents.send(r)}endHold(e,t){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.remove("button-opacity-off"),this.gameManager.activeRoomEvents.send({act:c.STOP})}createProgressBar(){if(!this.gameManager.config.getWithoutLogs("client/ui/loading/show",!0))return;let e=r.Rectangle,t=e.Clone(this.cameras.main);this.progressRect=new e(0,0,t.width/2,50),e.CenterOn(this.progressRect,t.centerX,t.centerY),this.progressCompleteRect=r.Rectangle.Clone(this.progressRect),this.progressBar=this.createGraphics();let i=this.cameras.main.width,n=this.cameras.main.height,s=this.gameManager.config.get("client/ui/loading/font"),a=this.gameManager.config.get("client/ui/loading/fontSize"),o=this.gameManager.config.get("client/ui/loading/assetsSize");this.loadingText=this.createText(i/2,n/2-50,"Loading...",{fontFamily:s,fontSize:a}),this.loadingText.setOrigin(.5,.5),this.loadingText.setFill(this.gameManager.config.get("client/ui/loading/loadingColor")),this.percentText=this.createText(i/2,n/2-5,"0%",{fontFamily:s,fontSize:o}),this.percentText.setOrigin(.5,.5),this.percentText.setFill(this.gameManager.config.get("client/ui/loading/percentColor")),this.assetText=this.createText(i/2,n/2+50,"",{fontFamily:s,fontSize:o}),this.assetText.setFill(this.gameManager.config.get("client/ui/loading/assetsColor")),this.assetText.setOrigin(.5,.5)}createText(e,t,i,n){return this.add.text(e,t,i,n)}createGraphics(){return this.add.graphics()}onLoadComplete(){for(let e of this.children.list)e.destroy();this.loadingText.destroy(),this.assetText.destroy(),this.percentText.destroy(),this.scene.shutdown()}onFileProgress(e){this.gameManager.config.get("client/ui/loading/showAssets")&&this.assetText.setText("Loading "+e.key)}onLoadProgress(e){let t=parseInt(100*e)+"%";this.percentText.setText(t),this.progressRect.width=e*this.progressCompleteRect.width,this.progressBar.clear().fillStyle(2236962).fillRectShape(this.progressCompleteRect).fillStyle(16777215).fillRectShape(this.progressRect)}getUiElement(e,t=!0){return d.hasOwn(this.elementsUi,e)?this.elementsUi[e]:(t&&u.error("UI not found.",{uiName:e}),!1)}}},{df67ed4c812038a9:"8S6DV",a689b035cfc5756:"c3rUy","55a2dd84a2e283e3":"d5Xkk","29c970db688707f2":"3lOFf",c747f1452190e301:"qaPo7","475d783a521115cd":"93TbC",b9b9df6bd8016f7d:"59VA7","6e32bad98d4c2ac":"3lwy5"}],c3rUy:[function(e,t,i){let{sc:n}=e("3099c8189d097700");t.exports.MinimapUi=class{createMinimap(e,t){t.elementsUi.minimap=t.add.dom(e.uiX,e.uiY).createFromCache("minimap");let i=t.elementsUi.minimap.getChildByProperty("id","minimap-open"),n=t.elementsUi.minimap.getChildByProperty("id","minimap-close");i?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.remove("hidden"),i.classList.add("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.showMap(r,t,i,n,e)}),n?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.add("hidden"),i&&i.classList.remove("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.hideMap(r,t,n,e)})}showMap(e,t,i,n,r){if(this.awaitForCamera(e)){setTimeout(()=>{this.showMap(e,t,i,n,r)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!0),e.circle&&e.circle.setVisible(!0),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:i,minimap:e,box:r})}hideMap(e,t,i,n){if(this.awaitForCamera(e)){setTimeout(()=>{this.hideMap(e,t,i,n)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!1),e.circle&&e.circle.setVisible(!1),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:i,minimap:e,box:n})}awaitForCamera(e){return 0{r.style.display="block",t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})});let a=t.gameManager.gameDom.getElement("#instructions-close");a?.addEventListener("click",()=>{r.style.display="none",t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})}),t.elementsUi.instructions=i}}},{"5a1cf36c8d3b7e72":"3lwy5"}],"3lOFf":[function(e,t,i){let{Logger:n}=e("203fa7507cacc04f");t.exports.SettingsUi=class{createSettings(e,t){let i=t.add.dom(e.uiX,e.uiY).createFromCache("settings");if(!i)return n.info("Settings dialog box could not be created."),!1;let r=t.cache.html.get("settings-content");if(!r)return n.info("Settings template not found."),!1;t.gameManager.gameDom.appendToElement(".content",r);let s=t.gameManager.gameDom.getElement("#settings-ui");if(!s)return n.info("Settings container not found."),!1;let a=t.gameManager.gameDom.getElement("#settings-close"),o=i.getChildByProperty("id","settings-open");o?.addEventListener("click",()=>{s.style.display="block",o&&(o.style.display="none"),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),a?.addEventListener("click",()=>{s.style.display="none",o&&(o.style.display="block"),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),t.elementsUi.settings=i}}},{"203fa7507cacc04f":"3lwy5"}],qaPo7:[function(e,t,i){let{GameConst:n}=e("88178d0bc5e02e97"),{Logger:r}=e("f4cd4df7f42f9061");t.exports.Joystick=class{constructor(e){this.gameManager=e?.scenePreloader?.gameManager,this.scenePreloader=e?.scenePreloader,this.gameDom=this.gameManager?.gameDom,this.isDragging=!1,this.centerX=!1,this.centerY=!1,this.threshold=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickThreshold",20),this.joystickLeft=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickLeft",25),this.joystickTop=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickTop",25),this.positionSufix="px"}registerJoystickController(){if(!this.gameManager)return r.error("GameManager undefined on Joystick."),!1;this.joystick=this.gameDom.getElement("#joystick"),this.joystickThumb=this.gameDom.getElement("#joystick-thumb"),this.joystickThumb.addEventListener("mousedown",e=>{this.applyMovement(e.clientX,e.clientY)}),this.joystickThumb.addEventListener("touchstart",e=>{e.preventDefault();let t=e.touches?.shift();this.applyMovement(t.clientX,t.clientY)}),this.gameDom.getDocument().addEventListener("mousemove",this.handleMouseMove.bind(this)),this.gameDom.getDocument().addEventListener("mouseup",this.handleStop.bind(this)),this.gameDom.getDocument().addEventListener("touchmove",this.handleTouchMove.bind(this)),this.gameDom.getDocument().addEventListener("touchend",this.handleStop.bind(this))}position(e){return e+this.positionSufix}applyMovement(e,t){this.isDragging=!0;let i=this.joystick.getBoundingClientRect();this.centerX=i.width/2,this.centerY=i.height/2,this.updateThumbPosition(e-i.left,t-i.top)}handleStop(){this.isDragging=!1,this.joystickThumb.style.left=this.position(this.joystickLeft),this.joystickThumb.style.top=this.position(this.joystickTop),this.gameManager.getCurrentPlayer().stop()}updateDirection(e,t){let i=e-this.centerX,r=t-this.centerY,s=n.STOP;if(Math.abs(i)>Math.abs(r)&&Math.abs(i)>this.threshold){for(let e of(s=i>0?Math.abs(r)>this.threshold?r>0?"right-down":"right-up":"right":Math.abs(r)>this.threshold?r>0?"left-down":"left-up":"left").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}if(Math.abs(r)>this.threshold){for(let e of(s=r>0?Math.abs(i)>this.threshold?i>0?"down-right":"down-left":"down":Math.abs(i)>this.threshold?i>0?"up-right":"up-left":"up").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}return this.gameManager.getCurrentPlayer().stop(),s}updateThumbPosition(e,t){let i=e-this.centerX,n=t-this.centerY,r=Math.sqrt(i*i+n*n),s=Math.min(this.centerX,this.centerY);if(r>s){let e=Math.atan2(n,i),t=Math.cos(e)*s+this.centerX-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(t);let r=Math.sin(e)*s+this.centerY-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(r);return}let a=e-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(a);let o=t-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(o)}handleMouseMove(e){if(!this.isDragging)return;let t=this.joystick.getBoundingClientRect(),i=e.clientX-t.left,n=e.clientY-t.top;this.updateThumbPosition(i,n),this.updateDirection(i,n)}handleTouchMove(e){if(!this.isDragging)return;let t=e.touches?.shift(),i=this.joystick.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this.updateThumbPosition(n,r),this.updateDirection(n,r)}}},{"88178d0bc5e02e97":"93TbC",f4cd4df7f42f9061:"3lwy5"}],"401GU":[function(e,t,i){let{RegistrationFormHandler:n}=e("61e9430bb51b7408"),{TermsAndConditionsHandler:r}=e("6e331d321b006ecf"),{LoginFormHandler:s}=e("6146b6a5adb0380b"),{ForgotPasswordFormHandler:a}=e("48bdd5abf515687b"),{GuestFormHandler:o}=e("5b4b95bc89fe7076"),{FullScreenHandler:h}=e("9e3ced5ae6b38dd");t.exports.ClientStartHandler=class{constructor(e){this.gameManager=e}clientStart(){let e=new n(this.gameManager);e.activateRegistration(),new o(this.gameManager).activateGuest();let t=new r(this.gameManager);t.activateTermsAndConditions();let i=new s(this.gameManager);i.activateLogin();let c=new a(this.gameManager);c.activateForgotPassword(),c.displayForgotPassword();let l=new h(this.gameManager);l.activateFullScreen(),this.gameManager.firebase&&this.gameManager.firebase.startFirebase(),Object.assign(this.gameManager.elements,{registrationForm:e,termsAndConditions:t,loginForm:i,forgotPasswordForm:c,fullScreen:l}),this.gameManager.events.emitSync("reldens.clientStartAfter",this)}}},{"61e9430bb51b7408":"gYHC4","6e331d321b006ecf":"ilJrk","6146b6a5adb0380b":"hG35y","48bdd5abf515687b":"jNMHr","5b4b95bc89fe7076":"4jT2q","9e3ced5ae6b38dd":"5GTLr"}],gYHC4:[function(e,t,i){let{ErrorsBlockHandler:n}=e("e090c4bcd3707d9f"),{GameConst:r}=e("e6f38101bdd301e7");t.exports.RegistrationFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.REGISTER_FORM)}activateRegistration(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowRegistration"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS,t=this.gameDom.getElement(e.TERMS.ACCEPT),i=this.gameDom.getElement(e.TERMS.BOX);this.form.addEventListener("submit",n=>{if(n.preventDefault(),!this.form.checkValidity())return!1;let s=this.gameDom.getElement(e.REGISTRATION.PASSWORD).value,a=this.gameDom.getElement(e.REGISTRATION.RE_PASSWORD).value,o=this.form.querySelector(e.RESPONSE_ERROR);if(s!==a&&o)return o.innerHTML="Password and confirmation does not match.",!1;if(!t.checked&&o)return o.innerHTML="Please read and accept the terms and conditions and continue.",!1;i?.classList.add(r.CLASSES.HIDDEN),this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let h={formId:this.form.id,email:this.gameDom.getElement(e.REGISTRATION.EMAIL).value,username:this.gameDom.getElement(e.REGISTRATION.USERNAME).value,password:s,rePassword:a};this.gameManager.startGame(h,!0)})}}},{e090c4bcd3707d9f:"kzsmo",e6f38101bdd301e7:"93TbC"}],kzsmo:[function(e,t,i){let{GameConst:n}=e("32e4ac52cb34a235");t.exports.ErrorsBlockHandler=class{static reset(e){let t=e.querySelector(n.SELECTORS.RESPONSE_ERROR);e.querySelector(n.SELECTORS.INPUT).addEventListener("focus",()=>{t.innerHTML=""})}}},{"32e4ac52cb34a235":"93TbC"}],ilJrk:[function(e,t,i){let{GameConst:n}=e("5e95024018707600"),{Logger:r}=e("b4c60b227487fe12");t.exports.TermsAndConditionsHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.linkContainer=this.gameManager.gameDom.getElement(n.SELECTORS.TERMS.LINK_CONTAINER)}activateTermsAndConditions(){if(!this.linkContainer)return!1;let e=this.gameManager.appServerUrl+n.ROUTE_PATHS.TERMS_AND_CONDITIONS,t=new URL(this.gameDom.getDocument().location).searchParams.get("lang","");""!==t&&(e+="?lang="+t),this.gameDom.getJSON(e,(e,t)=>{if(!t.body||!t.heading||!t.checkboxLabel||!t.link)return!1;if(e)return r.info("Registration error.",e),!1;let i=n.SELECTORS.TERMS;this.gameDom.updateContent(i.HEADING,t.heading),this.gameDom.updateContent(i.BODY,t.body),this.gameDom.updateContent(i.ACCEPT_LABEL,t.checkboxLabel),this.gameDom.updateContent(i.LINK,t.link);let s=this.gameDom.getElement(i.LINK),a=this.gameDom.getElement(i.BOX);s?.addEventListener("click",e=>{e.preventDefault(),a?.classList.remove(n.CLASSES.HIDDEN)}),this.gameDom.getElement(i.CLOSE)?.addEventListener("click",()=>{a?.classList.add(n.CLASSES.HIDDEN)});let o=this.gameDom.getElement(n.SELECTORS.REGISTER_FORM);if(o){let e=this.gameDom.getElement(n.SELECTORS.RESPONSE_ERROR,o),t=this.gameDom.getElement(i.ACCEPT);t.addEventListener("click",()=>{t.checked&&(e.innerHTML="")}),this.gameDom.getElement(i.ACCEPT_LABEL).addEventListener("click",()=>{t.checked&&(e.innerHTML="")})}this.linkContainer?.classList.remove(n.CLASSES.HIDDEN)})}}},{"5e95024018707600":"93TbC",b4c60b227487fe12:"3lwy5"}],hG35y:[function(e,t,i){let{ErrorsBlockHandler:n}=e("d2e27800ca9e6097"),{GameConst:r}=e("9e1bb13aa99be738");t.exports.LoginFormHandler=class{constructor(e){this.gameManager=e,this.form=e.gameDom.getElement(r.SELECTORS.LOGIN_FORM)}activateLogin(){if(!this.form)return!1;n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity()||this.gameManager.submitedForm)return!1;this.gameManager.submitedForm=!0,this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,username:this.form.querySelector(r.SELECTORS.LOGIN.USERNAME).value,password:this.form.querySelector(r.SELECTORS.LOGIN.PASSWORD).value};this.gameManager.startGame(t,!1)})}}},{d2e27800ca9e6097:"kzsmo","9e1bb13aa99be738":"93TbC"}],jNMHr:[function(e,t,i){let{ErrorsBlockHandler:n}=e("2f903207606daf1a"),{GameConst:r}=e("f41810322298058d");t.exports.ForgotPasswordFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=this.gameManager.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD_FORM)}activateForgotPassword(){return!!this.form&&(this.gameManager.config.get("client/general/users/allowRegistration")?void(n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity())return!1;this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,forgot:!0,email:this.form.querySelector(r.SELECTORS.FORGOT_PASSWORD.EMAIL).value};this.gameManager.startGame(t,!1)})):(this.form.classList.add("hidden"),!0))}displayForgotPassword(){this.gameDom.getJSON(this.gameManager.appServerUrl+r.ROUTE_PATHS.MAILER,(e,t)=>{t.enabled&&this.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD.CONTAINER).classList.remove(r.CLASSES.HIDDEN)})}}},{"2f903207606daf1a":"kzsmo",f41810322298058d:"93TbC"}],"4jT2q":[function(e,t,i){let{ErrorsBlockHandler:n}=e("ed3946e6f3fa9c11"),{GameConst:r}=e("b422c8c562d99fb2"),{sc:s}=e("f241b93688d82620");t.exports.GuestFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.GUEST_FORM)}activateGuest(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowGuest"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS;this.form.addEventListener("submit",t=>{if(t.preventDefault(),!this.form.checkValidity())return!1;this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let i="guest-"+s.randomChars(12),n=this.gameManager.config.getWithoutLogs("client/general/users/allowGuestUserName",!1)?this.gameDom.getElement(e.GUEST.USERNAME).value:i,a={formId:this.form.id,username:n,password:n,rePassword:n,isGuest:!0};this.gameManager.startGame(a,!0)})}}},{ed3946e6f3fa9c11:"kzsmo",b422c8c562d99fb2:"93TbC",f241b93688d82620:"3lwy5"}],"5GTLr":[function(e,t,i){let{GameConst:n}=e("9cf3053a062e3fe1");t.exports.FullScreenHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.body=this.gameDom.getElement(n.SELECTORS.BODY)}activateFullScreen(){this.gameDom.getElement(n.SELECTORS.FULL_SCREEN_BUTTON)?.addEventListener("click",e=>{if(e.preventDefault(),!this.gameDom.getDocument().fullscreenEnabled)return!1;this.body.requestFullscreen(),this.goFullScreen()}),this.gameDom.getWindow().matchMedia("(display-mode: fullscreen)").addEventListener("change",({matches:e})=>{if(e){this.goFullScreen();return}this.exitFullScreen()})}goFullScreen(){this.body.classList.add(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}exitFullScreen(){this.body.classList.remove(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}}},{"9cf3053a062e3fe1":"93TbC"}],"3ZqP5":[function(e,t,i){let{ClientCoreFeatures:n}=e("8ee8ee6c25b82d8c"),{Logger:r,sc:s}=e("5806e45b7c7c3fa8");t.exports.FeaturesManager=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.events=s.get(e,"events",!1)}async loadFeatures(e){if(!this.gameManager)return r.error("Game Manager undefined in FeaturesManager."),!1;if(!this.events)return r.error("EventsManager undefined in FeaturesManager."),!1;this.featuresList={},await this.events.emit("reldens.loadFeatures",this,e);let t=Object.keys(e);if(0===t.length)return this.featuresList;for(let i of t){let t=e[i];s.hasOwn(n,t)&&(this.featuresList[t]=new n[t],"function"==typeof this.featuresList[t].setup&&await this.featuresList[t].setup({gameManager:this.gameManager,events:this.events}),await this.events.emit("reldens.loadFeature_"+t,this.featuresList[t],this))}return this.featuresList}}},{"8ee8ee6c25b82d8c":"2BcLh","5806e45b7c7c3fa8":"3lwy5"}],"2BcLh":[function(e,t,i){let{ChatPlugin:n}=e("949b1921d3bf5140"),{ObjectsPlugin:r}=e("aa8995112e7d6bdb"),{InventoryPlugin:s}=e("d9ef351011c1851b"),{ActionsPlugin:a}=e("408c84b7d592f2b6"),{UsersPlugin:o}=e("12e36b841f0da63e"),{AudioPlugin:h}=e("3fd885750ac6ac6b"),{RoomsPlugin:c}=e("f2563b87854d4a6e"),{PredictionPlugin:l}=e("282babf537556f44"),{TeamsPlugin:u}=e("d0d5a23fa0219ef6"),{SnippetsPlugin:d}=e("ffba7e1c5e50a8a7"),{AdsPlugin:f}=e("d50aaab7df227399"),{WorldPlugin:p}=e("c63ee71351943ae1"),{ScoresPlugin:g}=e("e1d7ab421b11cea0"),{RewardsPlugin:m}=e("bd8f677aa060e20b");t.exports.ClientCoreFeatures={chat:n,objects:r,inventory:s,actions:a,users:o,audio:h,rooms:c,prediction:l,teams:u,snippets:d,ads:f,world:p,scores:g,rewards:m}},{"949b1921d3bf5140":"1pwR6",aa8995112e7d6bdb:"88wg5",d9ef351011c1851b:"83Jlt","408c84b7d592f2b6":"enPaX","12e36b841f0da63e":"1nDQd","3fd885750ac6ac6b":"jRcE9",f2563b87854d4a6e:"3yQhR","282babf537556f44":"80hlx",d0d5a23fa0219ef6:"8MUNa",ffba7e1c5e50a8a7:"tkJox",d50aaab7df227399:"aNIyr",c63ee71351943ae1:"79nNs",e1d7ab421b11cea0:"jv1vT",bd8f677aa060e20b:"4p1ha"}],"1pwR6":[function(e,t,i){let{ChatUi:n}=e("994be9db4994f9a3"),{MessagesListener:r}=e("b6a36cbfb0da5dfe"),{TemplatesHandler:s}=e("deb4c2146b2d1712"),a=e("267812d6128a4b8e"),{TranslationsMapper:o}=e("5e30eadde21dcf94"),{PluginInterface:h}=e("8d1c7a15abb408a"),{ChatConst:c}=e("fe17ff5717202a3b"),{Logger:l,sc:u}=e("ef3698ca9cea9d5");t.exports.ChatPlugin=class extends h{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in ActionsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in ChatPlugin."),this.messagesQueu=[],this.uiManager=!1,this.joinRooms=[c.CHAT_GLOBAL],this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.joinedRoom",async e=>{await r.listenMessages(e,this)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e,this.gameManager.config.get("client/ui/chat/showTabs"))}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi(),this.uiManager.createTabs(),this.uiManager.processMessagesQueue(this.messagesQueu)})}}},{"994be9db4994f9a3":"eLO7b",b6a36cbfb0da5dfe:"lJUIi",deb4c2146b2d1712:"fgdaI","267812d6128a4b8e":"daHmu","5e30eadde21dcf94":"1fcQw","8d1c7a15abb408a":"fC3To",fe17ff5717202a3b:"dUuh0",ef3698ca9cea9d5:"3lwy5"}],eLO7b:[function(e,t,i){let{Input:n}=e("97d93bd9735e7bfb"),{SpriteTextFactory:r}=e("19814f11619c8dd"),{ChatTabs:s}=e("2429a93c399ce990"),{ChatConst:a}=e("644250816f608ee2"),{Logger:o,sc:h}=e("1eb163b9249e21a9");t.exports.ChatUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene?.gameManager,this.gameDom=this.uiScene?.gameManager?.gameDom,this.setChatTypes(),this.setChatConfiguration(),this.uiChat={},this.messagesQueu=[],this.chatInput=!1,this.chatSendButton=!1,this.chatCloseButton=!1,this.chatOpenButton=!1}setChatConfiguration(){if(!this.gameManager||!this.gameManager.config)return!1;this.uiConfig=this.gameManager.config.get("client/ui/chat"),this.overheadChat=h.get(this.uiConfig,"overheadChat",{}),this.overHeadChatEnabled=h.get(this.overheadChat,"enabled",!1),this.overheadText=h.get(this.uiConfig,"overheadText",{}),this.isDefaultOpen=h.get(this.uiConfig,"defaultOpen",!1),this.isTyping=h.get(this.overheadChat,"isTyping",!1),this.showTabs=h.get(this.uiConfig,"showTabs",!1),this.closeChatBoxAfterSend=h.get(this.closeChatBoxAfterSend,"isTyping",!1),this.messagesConfig=this.gameManager.config.get("client/chat/messages"),this.characterLimit=h.get(this.messagesConfig,"characterLimit",0),this.characterLimitOverhead=h.get(this.messagesConfig,"characterLimitOverhead",0),this.appendErrorTypeOnActiveTab=h.get(this.messagesConfig,"appendErrorTypeOnActiveTab",!0)}setChatTypes(){if(!this.gameManager)return o.warning("Missing GameManager on ChatUI."),!1;if(!this.gameDom)return o.warning("Missing GameDom on ChatUI."),!1;if(!this.gameManager.initialGameData)return o.warning('Missing "initialGameData" on ChatUI.'),!1;if(this.chatTypes=h.get(this.gameManager.initialGameData,"chatTypes",[]),0===this.chatTypes.length)return!1;for(let e of(this.chatTypesById={},this.chatTypes))this.chatTypesById[e.id]=e}createUi(){if(!this.uiScene)return o.warning("Missing UI Scene on ChatUI."),!1;let{uiX:e,uiY:t}=this.uiScene.getUiConfig("chat");if(this.uiChat=this.uiScene.add.dom(e,t).createFromCache("chat"),this.uiScene.elementsUi.chat=this.uiChat,this.chatInput=this.uiChat.getChildByProperty("id",a.CHAT_INPUT),!this.chatInput)return o.info("Missing chat input on ChatUI."),!1;this.setupKeyPressBehaviors(),this.chatInput.addEventListener("onfocusout",()=>{this.hideIsTyping()}),this.setupSendButton(),this.setupOpenCloseButtons(),this.overHeadChatEnabled&&this.setupOverheadChatEvents(),this.isDefaultOpen&&this.showChatBox()}createTabs(){return!!this.showTabs&&(this.tabs=new s(this.gameManager,this.uiScene),!0)}setupOverheadChatEvents(){this.gameManager.events.on("reldens.runPlayerAnimation",(e,t,i,n)=>{this.updateOverheadTextPosition(n)})}setupOpenCloseButtons(){this.chatOpenButton=this.uiChat.getChildByProperty("id",a.CHAT_OPEN_BUTTON),this.chatOpenButton?.addEventListener("click",()=>{this.showChatBox(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})}),this.chatCloseButton=this.uiChat.getChildByProperty("id",a.CHAT_CLOSE_BUTTON),this.chatCloseButton?.addEventListener("click",()=>{this.hideChatBox(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:this.chatCloseButton,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})})}setupSendButton(){this.chatSendButton=this.uiChat.getChildByProperty("id",a.CHAT_SEND_BUTTON),this.chatSendButton?.addEventListener("click",e=>{e.preventDefault(),this.sendChatMessage(this.chatInput,this.gameManager.activeRoomEvents),this.chatInput.focus()})}setupKeyPressBehaviors(){this.uiScene.input.keyboard.on("keyup-ENTER",()=>{this.isFocussedOnChatInput()||(this.showChatBox(),this.chatInput.focus())}),this.chatInput.addEventListener("keyup",e=>{if(e.keyCode===n.Keyboard.KeyCodes.ENTER){e.preventDefault(),this.sendChatMessage();return}this.showIsTyping()})}showOverheadChat(e,t){if(!this.overHeadChatEnabled)return!1;e.overheadTextSprite&&this.destroyTextSprite(e),t=this.applyTextLimit(t,this.characterLimitOverhead),e.overheadTextSprite=r.attachTextToSprite(e,t,this.overheadText,h.get(this.overheadText,"topOff",0),"overheadTextSprite",this.gameManager.getActiveScene());let i=h.get(this.overheadText,"timeOut",!1);i&&setTimeout(()=>{this.destroyTextSprite(e)},i)}updateOverheadTextPosition(e){if(!e.overheadTextSprite)return!1;let t=r.getTextPosition(e,e.playerName,this.overheadText,h.get(this.overheadText,"topOff",0));e.overheadTextSprite.x=t.x,e.overheadTextSprite.y=t.y}destroyTextSprite(e){if(!e.overheadTextSprite)return!1;e.overheadTextSprite.destroy(),delete e.overheadTextSprite}showIsTyping(){if(!this.overHeadChatEnabled||!this.isTyping||!this.isFocussedOnChatInput())return!1;this.showOverheadChat(this.gameManager.getCurrentPlayerAnimation(),this.gameManager.config.getWithoutLogs("client/ui/chat/waitingContent",this.t(a.SNIPPETS.WAITING)))}hideIsTyping(){if(!this.isTyping)return!1;this.destroyTextSprite(this.gameManager.getCurrentPlayerAnimation())}isFocussedOnChatInput(){return this.gameManager.gameDom.activeElement()===this.chatInput}showChatBox(){this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.remove("hidden"),this.uiChat.setDepth(4),this.chatOpenButton?.classList.add("hidden");let e=this.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);e&&(e.parentNode.scrollTop=e.scrollHeight),this.hideNotificationsBalloon()}hideChatBox(){let e=this.uiChat.getChildByProperty("id",a.CHAT_UI);if(!e)return o.info("Chat UI box not found."),!1;e.classList.add("hidden"),this.uiChat.setDepth(1),this.chatOpenButton?.classList.remove("hidden")}showNotificationBalloon(){this.getActiveBalloon()?.classList.remove("hidden")}hideNotificationsBalloon(){this.getActiveBalloon()?.classList.add("hidden")}getActiveBalloon(){if(!h.get(this.uiConfig,"notificationBalloon"))return!1;let e=this.uiChat.getChildByProperty("id",a.CHAT_BALLOON);return!!e&&e}processMessagesQueue(e){if(0===e.length)return!1;for(let t of e)this.attachNewMessage(t)}attachNewMessage(e){if(!this.gameManager.gameEngine.uiScene.cache)return;let t=this.gameManager.gameEngine.uiScene.cache.html.get("chatMessage"),i=this.translateMessage(e),n=this.gameManager.gameEngine.parseTemplate(t,{from:this.translateFrom(e),color:a.TYPE_COLOR[e[a.TYPES.KEY]],message:i}),r=this.showTabs?a.TYPES.MESSAGE:"",s=h.get(e,a.TYPES.KEY,r),c=h.get(this.chatTypesById,s,!1),l=!!(""!==s&&c?.show_tab)&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+s);l&&this.appendWithScroll(l,n);let u=!!c.also_show_in_type&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+c.also_show_in_type);u&&u!==l&&this.appendWithScroll(u,n);let d=""===s&&this.gameManager.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);if(d&&this.appendWithScroll(d,n),this.appendErrorTypeOnActiveTab&&a.TYPES.ERROR===s){let e=this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_ACTIVE);e&&e!==l&&e!==u&&this.appendWithScroll(e,n)}if(!l&&!u&&!d){null===l&&o.warning("Element not found for selector: .tab-content-"+s),null===u&&o.warning("Element not found for selector: .tab-content-"+c.also_show_in_type),o.warning("Chat message not attached to any tab or main panel.",{message:e,defaultType:r,messageType:s,chatType:c,appendToMain:d,appendToTab:l});return}if(e[a.MESSAGE.FROM]&&this.isValidMessageType(e[a.TYPES.KEY])){let t=this.fetchPlayerByName(e[a.MESSAGE.FROM]);t&&this.showOverheadChat(t,i)}this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.contains("hidden")&&this.showNotificationBalloon()}appendWithScroll(e,t){e.innerHTML+=t,e.parentNode.scrollTop=e.scrollHeight}translateFrom(e){let t=e[a.TYPES.KEY],i=e[a.MESSAGE.FROM]||a.TYPES.SYSTEM;return this.isValidSnippetFromType(t)?this.t(a.SNIPPETS.PREFIX+a.TYPES.KEY+t):i}translateMessage(e){let t=e[a.TYPES.KEY];if(!this.isValidSnippetType(t))return e[a.MESSAGE.KEY];let i=e[a.MESSAGE.DATA.KEY];if(!i)return this.t(e[a.MESSAGE.KEY]);if(i[a.MESSAGE.DATA.MODIFIERS]){let t="",n=i[a.MESSAGE.DATA.TARGET_LABEL];for(let r of Object.keys(i[a.MESSAGE.DATA.MODIFIERS])){let s=this.t(r),o=i[a.MESSAGE.DATA.MODIFIERS][r];t+=this.t(e[a.MESSAGE.KEY],{propertyValue:o,propertyLabel:s,targetLabel:n})}return t}return this.t(e[a.MESSAGE.KEY],i)}t(e,t={},i=!1){return this.gameManager.services.translator.t(e,t,i)}isValidMessageType(e){return -1===this.validMessageTypes().indexOf(e)}validMessageTypes(){return[Object.values(a.TYPES)]}isValidSnippetType(e){let t=this.snippetsMessageTypes();for(let i of Object.keys(t))if(t[i]===e)return!0;return!1}snippetsMessageTypes(){let e=Object.assign({},a.TYPES);return delete e[a.TYPES.MESSAGE],delete e[a.TYPES.PRIVATE],delete e[a.TYPES.GLOBAL],delete e[a.TYPES.TEAMS],e}isValidSnippetFromType(e){return -1!==[a.TYPES.SYSTEM,a.TYPES.ERROR].indexOf(e)}fetchPlayerByName(e){let t=this.gameManager.getCurrentPlayer().players,i=Object.keys(t);if(1>=i.length)return!1;for(let n of i){let i=t[n];if(i.playerName===e)return i}}sendChatMessage(){if(!this.isValidMessage())return!1;let e=this.applyTextLimit(this.chatInput.value,this.characterLimit),t={act:a.CHAT_ACTION,m:e};this.gameManager.events.emitSync("reldens.chatMessageObjectCreated",this,t),this.useGlobalRoom()?this.useGlobalRoomForMessage(t):this.gameManager.activeRoomEvents.send(t),this.chatInput.value="",this.closeChatBoxAfterSend&&this.hideChatBox()}applyTextLimit(e,t){return 0{let t=this.gameManager.gameDom.getElement(".tab-label.active");t?.classList.remove("active"),e.target.classList.add("active");let i=this.gameManager.gameDom.getElement(".tab-content.active");i?.classList.remove("active");let n=this.gameManager.gameDom.getElement(".tab-content-"+e.target.dataset.tabId);if(!n)return r.warning("Tab content was not found.",e),!1;n.classList.add("active"),n.parentNode.scrollTop=n.scrollHeight})}}},{a22c3a2311bae153:"dUuh0","6e140e18d42fb249":"3lwy5"}],dUuh0:[function(e,t,i){let n="chat.",r="player.",s={KEY:"ctk",MESSAGE:1,JOINED:2,SYSTEM:3,PRIVATE:4,DAMAGE:5,REWARD:6,SKILL:7,TEAMS:8,GLOBAL:9,ERROR:10};t.exports.ChatConst={ROOM_TYPE_CHAT:"chat",CHAT_ACTION:"c",TYPES:s,CHAT_FROM:"f",CHAT_TO:"t",CHAT_UI:"chat-ui",CHAT_FORM:"chat-form",CHAT_INPUT:"chat-input",CHAT_SEND_BUTTON:"chat-send",CHAT_CLOSE_BUTTON:"chat-close",CHAT_OPEN_BUTTON:"chat-open",CHAT_BALLOON:"notification-balloon",CHAT_GLOBAL:"chat",MESSAGE:{KEY:"m",FROM:"f",TO:"t",DATA:{KEY:"md",SNIPPET:"sp",PLAYER_NAME:"pn",ROOM_NAME:"rn",DAMAGE:"d",TARGET_LABEL:"tL",SKILL_LABEL:"sk",MODIFIERS:"mfs"},DATA_VALUES:{NAMESPACE:"chat",pn:"playerName",rn:"roomName",d:"damage",tL:"targetLabel",sk:"skillLabel",mfs:"modifiers"}},SNIPPETS:{PREFIX:n,PLAYER_PREFIX:r,TAB_PREFIX:"tabs.",NPC_DAMAGE:n+"npcDamage",NPC_DODGED_SKILL:n+"dodgedSkill",MODIFIERS_APPLY:n+"modifiersApply",JOINED_ROOM:n+"joinedRoom",LEFT_ROOM:n+"leftRoom",PRIVATE_MESSAGE_PLAYER_NOT_FOUND:n+"playerNotFound",GLOBAL_MESSAGE_NOT_ALLOWED:n+"globalMessageNotAllowed",GLOBAL_MESSAGE_PERMISSION_DENIED:n+"globalMessagePermissionDenied",PLAYER:{DAMAGE:n+r+"damage",DODGED_SKILL:n+r+"dodgedSkill"},GUEST_INVALID_CHANGE_POINT:n+"guestInvalidChangePoint",WAITING:"..."},SELECTORS:{CONTENTS:"#chat-contents",CHAT_MESSAGES:"#chat-messages",TAB_CONTENT_PREFIX:".tab-content-",TAB_CONTENT_ACTIVE:".tab-content.active"},TYPE_COLOR:{[s.MESSAGE]:"#ffffff",[s.PRIVATE]:"#f39c12",[s.PRIVATE+".to"]:"#00afff",[s.GLOBAL]:"#ffff00",[s.SYSTEM]:"#2ecc71",[s.ERROR]:"#ff0000",[s.DAMAGE]:"#ff0000",[s.SYSTEM+".modifiers"]:"#0feeff",[s.REWARD]:"#2ecc71",[s.TEAMS]:"#2ecc71"}}},{}],lJUIi:[function(e,t,i){let{ChatConst:n}=e("7520fddeb5373b09");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.CHAT_ACTION===e.act){if(!t.uiManager){t.messagesQueu.push(e);return}t.uiManager.attachNewMessage(e)}})}}},{"7520fddeb5373b09":"dUuh0"}],fgdaI:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e,t){let i="/assets/features/chat/templates/";e.load.html("chat",i+"ui-chat.html"),e.load.html("chatMessage",i+"message.html"),t&&(e.load.html("chatTabsContainer",i+"tabs-container.html"),e.load.html("chatTabLabel",i+"tab-label.html"),e.load.html("chatTabContent",i+"tab-content.html"))}}},{}],daHmu:[function(e,t,i){t.exports={chat:{ctk3:"System",ctk10:"System",npcDamage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill",modifiersApply:"%propertyValue %propertyLabel on %targetLabel",joinedRoom:"%playerName has joined %roomName",leftRoom:"%playerName has left",playerNotFound:'Player "%playerName" not found',globalMessagesNotAllowed:"Global messages not allowed",globalMessagePermissionDenied:"Global message permission denied",guestInvalidChangePoint:"The room is not available for guest users.",player:{damage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill"},tabs:{message:"General",joined:"Joined",system:"System",private:"Private",damage:"Damage",reward:"Rewards",skill:"Skills",teams:"Teams",global:"Global",error:"Error"}}}},{}],"1fcQw":[function(e,t,i){let{SnippetsConst:n}=e("f5fe63265b673629"),{sc:r}=e("70ef676150c60a42");t.exports.TranslationsMapper=class{static forConfig(e,t,i=!1,s=n.DEFAULT_LOCALE){e.snippets||(e.snippets={}),e.snippets[s]||(e.snippets[s]={});let a=this.fromObject(t);if(e.snippets[s]=r.deepMergeProperties(a,e.snippets[s]),!i)return;e.snippetsDataValues||(e.snippetsDataValues={});let o=i.NAMESPACE||n.DATA_VALUES_DEFAULT_NAMESPACE;r.deepMergeProperties(e.snippetsDataValues,{[o]:i})}static fromObject(e){let t=Object.keys(e);if(0===t.length)return{};let i={};for(let n of t)this.recursiveMap(n,e[n],i);return i}static recursiveMap(e,t,i){if(!r.isObject(t)){i[e]=t;return}let s=Object.keys(t);if(0!==s.length)for(let r of s)this.recursiveMap(e+n.CONCAT_CHARACTER+r,t[r],i)}}},{f5fe63265b673629:"biSFs","70ef676150c60a42":"3lwy5"}],biSFs:[function(e,t,i){t.exports.SnippetsConst={KEY:"snippets",DEFAULT_LOCALE:"en_US",CONCAT_CHARACTER:".",DATA_VALUES_DEFAULT_NAMESPACE:"default",ACTIONS:{UPDATE:"sn.Up"}}},{}],fC3To:[function(e,t,i){let{Logger:n}=e("956b760a8a542b20");t.exports.PluginInterface=class{async setup(e){n.error("Setup plugin not implemented.",e)}}},{"956b760a8a542b20":"3lwy5"}],"88wg5":[function(e,t,i){let{AnimationEngine:n}=e("2d0db67a357a1df6"),{ObjectsMessageListener:r}=e("79a86c288b721c2b"),{DropsMessageListener:s}=e("deab023d199335c9"),a=e("8cedb0a2567e4f93"),{TranslationsMapper:o}=e("52449bab2a32580c"),{UserInterface:h}=e("52476153d5a162e6"),{ObjectsConst:c}=e("f64071d16effca52"),{ActionsConst:l}=e("bef8aa2a761e6924"),{PluginInterface:u}=e("6bb02e09282ac53"),{GameConst:d}=e("cb715b6f39878bc"),{Logger:f,sc:p}=e("c0cb3eea0cda2e5e");t.exports.ObjectsPlugin=class extends u{setup(e){this.gameManager=p.get(e,"gameManager",!1),this.gameManager||f.error("Game Manager undefined in InventoryPlugin."),this.events=p.get(e,"events",!1),this.events||f.error("EventsManager undefined in InventoryPlugin."),this.bodyOnAddCallBack=!1,this.bodyOnRemoveCallBack=!1,this.bullets={},this.changeBodyVisibilityOnInactiveState=this.gameManager.config.getWithoutLogs("client/objects/animations/changeBodyVisibilityOnInactiveState",!0),this.missingSpritesTimeOut=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesTimeOut",200),this.missingSpritesMaxRetries=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesMaxRetries",5),this.missingSpriteRetry=0,this.listenEvents(),this.setTranslations(),this.setListener()}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.traderObject=new r}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async e=>{await this.prepareObjectsUi(e.gameManager,e.sceneData.objectsAnimationsData,e)}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{await this.createDynamicAnimations(e)}),this.events.on("reldens.joinedRoom",(e,t)=>{this.listenMessages(e,t),s.listenMessages(e,t)})}listenMessages(e,t){if(e.onMessage("*",e=>{this.startObjectAnimation(e,t),this.objectBattleEndAnimation(e,t)}),!e.state||!e.state.bodies)return!1;this.setAddBodyCallback(e,t),this.setRemoveBodyCallback(e)}setAddBodyCallback(e,t){this.bodyOnAddCallBack=e.state.bodies.onAdd((i,n)=>{this.setOnChangeBodyCallback(i,n,e,t),this.createBulletSprite(n,t,i)})}createBulletSprite(e,t,i){if(-1===e.indexOf("bullet"))return!1;let n=t.activeRoomEvents.getActiveScene(),r="default_bullet",s=(i.key?i.key+"_":"")+"bullet";p.hasOwn(t.gameEngine.uiScene.directionalAnimations,s)&&(s=s+"_"+i.dir),p.hasOwn(n.anims.anims.entries,s)&&(r=s);let a=n?.physics?.add?.sprite(i.x,i.y,r);if(!a)return f.warning("Could not create bullet sprite.",n),!1;a.setDepth(11e3),this.bullets[e]=a}setOnChangeBodyCallback(e,t,i,n){let r=Object.keys(e),s=Object.keys(e.state??{});for(let i of r)e.listen(i,async r=>{await this.events.emit("reldens.objectBodyChange",{body:e,key:t,changes:{[i]:r}}),this.updateBodyProperties(i,s,e,r);let a=n.activeRoomEvents.getActiveScene();if(!a)return;let o=-1!==t.indexOf("bullet"),h=o?this.bullets[t]:a?.objectsAnimations[t];this.setVisibility(h,d.STATUS.ACTIVE===e.inState),this.logObjectBodyUpdate(t,i,r,h);let c=d.STATUS.AVOID_INTERPOLATION!==e.inState;if(a?.clientInterpolation&&c){a.interpolateObjectsPositions[t]=e;return}return o?this.updateBulletBodyPosition(t,e):this.updateObjectsAnimations(t,e,a)})}logObjectBodyUpdate(e,t,i,n){let r={key:e,propertyKey:t,newValue:i};("x"===t||"y"===t)&&n&&n[t]&&(r.currentValue=n[t]),f.debug(r)}setVisibility(e,t){e&&e.sceneSprite&&e.sceneSprite.setVisible(t)}updateBodyProperties(e,t,i,n){if("state"===e){for(let e of t)i.state[e]=n[e];return}i[e]=n}updateBulletBodyPosition(e,t){this.bullets[e]&&(this.bullets[e].x=t.x,this.bullets[e].y=t.y,this.events.emit("reldens.objectBodyChanged",{body:t,key:e}))}updateObjectsAnimations(e,t,i){let n=p.get(i.objectsAnimations,e);if(!n)return!1;n.updateObjectAndSpritePositions(t.x,t.y),this.events.emit("reldens.objectBodyChanged",{body:t,key:e});let r=n.updateObjectDepth();n.inState=t.inState;let s=this.fetchAvailableAnimationKey(i,n,t);return""!==s&&n.sceneSprite.anims.play(s,!0),this.moveSpritesObjects(n,t.x,t.y,r),!t.mov&&(n.sceneSprite.anims.stop(),n.sceneSprite.mov=t.mov,!!n.autoStart&&(n.sceneSprite.anims.play(this.determineAutoStartAnimation(n,s)),!0))}determineAutoStartAnimation(e,t){return!0===e.autoStart?e.key:e.autoStart===c.DYNAMIC_ANIMATION?t:e.autoStart}fetchAvailableAnimationKey(e,t,i){return p.getByPriority(e.anims.anims.entries,[t.key+"_"+i.dir,t.layerName+"_"+t.id+"_"+i.dir,t.key])||""}setRemoveBodyCallback(e){this.bodyOnRemoveCallBack=e.state.bodies.onRemove((e,t)=>{if(-1===t.indexOf("bullet")||!p.hasOwn(this.bullets,t))return!1;this.bullets[t].destroy(),delete this.bullets[t]})}objectBattleEndAnimation(e,t){if(e.act!==l.BATTLE_ENDED)return!1;let i=p.get(t.config.client.skills.animations,e.k+"_death","default_death"),n=t.activeRoomEvents.getActiveScene();try{this.playDeathAnimation(i,n,e)}catch(e){f.warning('Error on sprite "'+i+'" not available.',e.message)}if(!p.hasOwn(e,l.DATA_OBJECT_KEY_TARGET))return!1;e[l.DATA_OBJECT_KEY_TARGET]===n.player.currentTarget?.id&&t.gameEngine.clearTarget();let r=p.get(n.player.players,e[l.DATA_OBJECT_KEY_TARGET],!1);if(!r)return!1;r.visible=!1,p.hasOwn(r,"nameSprite")&&r.nameSprite&&(r.nameSprite.visible=!1)}playDeathAnimation(e,t,i){if(!t.getAnimationByKey(e))return this.missingSpritesMaxRetries===this.missingSpriteRetry?f.debug('Sprite "'+e+'" not available.',e):(this.missingSpriteRetry++,setTimeout(()=>this.playDeathAnimation(e,t,i),this.missingSpritesTimeOut)),!1;let n=t.physics.add.sprite(i.x,i.y,e);return n.setDepth(10500),n.anims.play(e,!0).on("animationcomplete",()=>{n.destroy()}),!0}startObjectAnimation(e,t){if(e.act!==c.OBJECT_ANIMATION&&e.act!==c.TYPE_ANIMATION)return!1;let i=t.activeRoomEvents.getActiveScene();if(!p.hasOwn(i.objectsAnimations,e.key))return!1;i.objectsAnimations[e.key].runAnimation()}moveSpritesObjects(e,t,i,n){if(!e.moveSprites)return;let r=Object.keys(e.moveSprites);if(0!==r.length)for(let s of r){let r=e.moveSprites[s];r.x=t,r.y=i;let a=n+("above"===p.get(e.animationData,"depthByPlayer","")?1:-.1);r.setDepth(a)}}async prepareObjectsUi(e,t,i){if(!t){f.info(["None objects animations data.",i]);return}for(let n of Object.keys(t)){let r=t[n];if(!p.hasOwn(r,"ui"))continue;if(!r.id){f.error(["Object ID not specified. Skipping registry:",r]);continue}let s=p.get(r,"template","/assets/html/dialog-box.html");i.objectsUi[r.id]=new h(e,r,s,"npcDialog"),await e.events.emit("reldens.createdUserInterface",{gameManager:e,id:r.id,userInterface:i.objectsUi[r.id],ObjectsPlugin:this})}}async createDynamicAnimations(e){let t=e.gameManager.activeRoomEvents.getActiveScene();if(!t.objectsAnimationsData){f.info("None animations defined on this scene: "+t.key);return}for(let i of(await this.events.emit("reldens.createDynamicAnimationsBefore",this,e),Object.keys(t.objectsAnimationsData))){let n=t.objectsAnimationsData[i];await this.createAnimationFromAnimData(n,e)}}async createAnimationFromAnimData(e,t){if(!e.key)return f.error("Animation key not specified. Skipping registry.",e),!1;e.frameRate=t.configuredFrameRate,await this.events.emit("reldens.createDynamicAnimation_"+e.key,this,e);let i=new(t.gameManager.config.getWithoutLogs("client/customClasses/objects/"+e.key,n))(t.gameManager,e,t);return i.createAnimation(),i}}},{"2d0db67a357a1df6":"55aYT","79a86c288b721c2b":"9u1ZW",deab023d199335c9:"8cYlw","8cedb0a2567e4f93":"hznMs","52449bab2a32580c":"1fcQw","52476153d5a162e6":"bzImH",f64071d16effca52:"izuLV",bef8aa2a761e6924:"59VA7","6bb02e09282ac53":"fC3To",cb715b6f39878bc:"93TbC",c0cb3eea0cda2e5e:"3lwy5"}],"55aYT":[function(e,t,i){let{Logger:n,sc:r}=e("69cb276730e319a6"),{ObjectsConst:s}=e("4aa72c897fe49299"),{GameConst:a}=e("e5f3f59c83d28a8d");t.exports.AnimationEngine=class{constructor(e,t,i){this.currentPreloader=i,this.currentAnimation=!1,this.gameManager=e,this.enabled=t.enabled||!1,this.key=t.key,this.id=t.id,this.asset_key=t.asset_key||t.key,this.assetPath=t.assetPath||"/assets/custom/sprites/",this.type=t.type||!1,this.ui=t.ui||!1,this.targetName=t.targetName,this.frameRate=t.frameRate||!1,this.frameStart=t.frameStart||0,this.frameEnd=t.frameEnd||0,this.x=t.x||0,this.y=t.y||0,this.repeat=isNaN(t.repeat)?-1:t.repeat,this.hideOnComplete=t.hideOnComplete||!1,this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.destroyOnComplete=t.destroyOnComplete||!1,this.autoStart=t.autoStart||!1,this.layerName=t.layerName||!1,this.positionFix=t.positionFix||!1,this.zeroPad=t.zeroPad||!1,this.prefix=t.prefix||!1,this.isInteractive=t.isInteractive||!1,this.highlightOnOver=!!r.get(t,"highlightOnOver",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightOnOver",!0)),this.highlightColor=r.get(t,"highlightColor",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightColor","0x00ff00")),this.restartTime=r.get(t,"restartTime",!1),this.calculateAnimPosition(),r.hasOwn(t,"animations")&&this.createObjectAnimations(t.animations)}updateObjectAndSpritePositions(e,t){this.sceneSprite.x=e,this.sceneSprite.y=t,this.x=e,this.y=t,this.calculateAnimPosition()}calculateAnimPosition(){this.animPos={x:this.x,y:this.y},this.positionFix&&(r.hasOwn(this.positionFix,"x")&&(this.animPos.x=this.x+this.positionFix.x),r.hasOwn(this.positionFix,"y")&&(this.animPos.y=this.y+this.positionFix.y))}updateObjectDepth(){let e=this.y+this.sceneSprite.height;return this.sceneSprite.setDepth(e),e}createAnimation(){if(!this.enabled){n.error("Animation disabled: "+this.key);return}let e=this.gameManager.activeRoomEvents.getActiveScene();if(!e){n.error("Active scene not found.");return}let t={start:this.frameStart,end:this.frameEnd};if(!1!==this.prefix&&(t.prefix=this.prefix),!1!==this.zeroPad&&(t.zeroPad=this.zeroPad),!this.currentPreloader.anims.textureManager.list[this.asset_key]){n.warning("Asset not found in preloader.",this.asset_key,t),this.currentPreloader.load.spritesheet(this.asset_key,this.assetPath+this.asset_key,t),this.currentPreloader.load.once("complete",async()=>{this.createAnimation()});return}let i=this.currentPreloader.anims.generateFrameNumbers(this.asset_key,t),r={key:this.key,frames:i,frameRate:this.frameRate,repeat:this.repeat,hideOnComplete:this.hideOnComplete};this.currentAnimation=this.gameManager.createdAnimations[this.key],this.currentAnimation||(n.debug("Creating animation: "+this.key),this.currentAnimation=this.currentPreloader.anims.create(r)),this.currentPreloader.objectsAnimations[this.key]=this.currentAnimation,this.gameManager.createdAnimations[this.key]=this.currentAnimation;let s=this.positionFix?this.animPos.x:this.x,a=this.positionFix?this.animPos.y:this.y;return this.sceneSprite=e.physics.add.sprite(s,a,this.asset_key),this.autoStart&&this.sceneSprite.anims.play(this.key,!0),this.enableInteraction(e),this.enableAutoRestart(),this.automaticDestroyOnComplete(),this.sceneSprite.setDepth(this.y+this.sceneSprite.body.height),e.objectsAnimations[this.key]=this,this.gameManager.events.emitSync("reldens.createAnimationAfter",{animationEngine:this}),this.sceneSprite}automaticDestroyOnComplete(){this.destroyOnComplete&&this.sceneSprite.on("animationcomplete",()=>{this.currentAnimation?.destroy(),this.sceneSprite.destroy()},this)}enableAutoRestart(){this.restartTime&&this.sceneSprite.on("animationcomplete",()=>{setTimeout(()=>{this.sceneSprite.anims&&(this.sceneSprite.anims.restart(),this.sceneSprite.anims.pause())},this.restartTime)},this)}enableInteraction(e){this.isInteractive&&(this.sceneSprite.setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(a.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;let i=this.key===this.asset_key?this.id:this.key,n={act:s.OBJECT_INTERACTION,id:i,type:this.type};if(this.gameManager.activeRoomEvents.send(n),!this.targetName)return!1;let r=Object.assign({},e.player.currentTarget),o={id:i,type:s.TYPE_OBJECT};e.player.currentTarget=o,this.gameManager.gameEngine.showTarget(this.targetName,o,r)}),this.highlightOnOver&&(this.sceneSprite.on("pointerover",()=>{this.sceneSprite.setTint(this.highlightColor)}),this.sceneSprite.on("pointerout",()=>{this.sceneSprite.clearTint()})))}runAnimation(){if(!this.sceneSprite){n.error("Current animation not found: "+this.key);return}this.sceneSprite.anims.play(this.key,!0)}getPosition(){return{x:this.x,y:this.y}}createObjectAnimations(e){if(!e)return;let t=Object.keys(e);if(0!==t.length)for(let i of t){if(this.gameManager.createdAnimations[i]){this.currentPreloader.objectsAnimations[i]=this.gameManager.createdAnimations[i];continue}if(r.hasOwn(this.currentPreloader.objectsAnimations,i))continue;let t=e[i],n={key:i,frames:this.currentPreloader.anims.generateFrameNumbers(t.asset_key||this.asset_key,{start:t.start||this.frameStart,end:t.end||this.frameEnd}),frameRate:t.frameRate||this.frameRate,repeat:t.repeat||this.repeat,hideOnComplete:t.hideOnComplete||this.hideOnComplete,asset_key:t.asset_key||this.asset_key};this.currentPreloader.objectsAnimations[i]=this.currentPreloader.anims.create(n),this.gameManager.createdAnimations[i]=this.currentPreloader.objectsAnimations[i]}}}},{"69cb276730e319a6":"3lwy5","4aa72c897fe49299":"izuLV",e5f3f59c83d28a8d:"93TbC"}],"9u1ZW":[function(e,t,i){let{TraderObjectUi:n}=e("58811b04f3d9bb80"),{Logger:r,sc:s}=e("f04fad6c99485124");t.exports.ObjectsMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on ObjectsMessageListener.",e),!1;if(!s.get(t,"result",!1))return r.error("Missing result data on ObjectsMessageListener.",e),!1;if(!s.get(t,"id",!1))return r.error("Missing Object ID on ObjectsMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on ObjectsMessageListener.",e),!1;let a=new n({roomEvents:i,message:t});if(!a.validate())return!1;a.updateContents()}}},{"58811b04f3d9bb80":"h56Er",f04fad6c99485124:"3lwy5"}],h56Er:[function(e,t,i){let{ItemsConst:n}=e("6f47f46589411c74"),{ObjectsConst:r}=e("5d863b6194329ea"),{Logger:s,sc:a}=e("4eb12b9fd296bfd9");t.exports.TraderObjectUi=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.objectUi=this.roomEvents?.objectsUi[this.message?.id],this.setConfirmMessages()}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene?this.itemsManager?!!this.objectUi||(s.error("Missing objectUi on TraderObjectUi."),!1):(s.error("Missing ItemsManager on TraderObjectUi."),!1):(s.error("Missing UiScene on TraderObjectUi."),!1):(s.error("Missing GameManager on TraderObjectUi."),!1):(s.error("Missing message on TraderObjectUi."),!1):(s.error("Missing RoomEvents on TraderObjectUi."),!1)}setConfirmMessages(){if(!this.gameManager)return!1;this.confirmMessages={buy:this.gameManager.services.translator.t("objects.trader.buyConfirmed"),sell:this.gameManager.services.translator.t("objects.trader.sellConfirmed")}}updateContents(){let e=this.gameManager.gameDom.getElement("#box-"+this.objectUi.id+" .box-content");if(!e)return s.error('Missing container: "#box-'+this.objectUi.id+' .box-content".'),!1;let t=this.message.result.action;if(r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM===this.message.result.subAction)return e.innerHTML=this.confirmMessages[t],!0;let i=a.get(this.message.result,"items",!1),n=this.mapInventoryKeyFromAction(t),o=a.get(this.message.result,"exchangeData",!1),h=a.get(o,n,!1),c=this.message.result.exchangeRequirementsA||[],l=this.message.result.exchangeRewardsB||[];this.updateItemsList(i,t,c,l,e,h),this.updateExchangeData(h,t,c,l,i)}updateItemsList(e,t,i,n,r,s){if(!e)return;let o="",h={};for(let r of Object.keys(e)){let c=e[r],l=Object.assign({manager:this.itemsManager},c,{uid:r}),u=a.get(this.itemsManager.itemClasses,l.key,this.itemsManager.types.classByTypeId(l.type));h[r]=new u(l),h[r].quantityDisplay=1,h[r].quantityMaxDisplay=Math.max(h[r].qty_limit,c.qty),h[r].tradeAction=t,h[r].exchangeRequirements=this.fetchItemRequirements(l.key,i),h[r].exchangeRewards=this.fetchItemRewards(l.key,n),o+=this.createTradeItemBox(h[r],a.get(s,h[r].uid,!1))}r.innerHTML=this.createTradeContainer(t,o),this.activateItemsBoxActions(h),this.activateConfirmButtonAction(t)}activateConfirmButtonAction(e){let t=this.gameManager.gameDom.getElement(".confirm-"+e),i={act:r.OBJECT_INTERACTION,id:this.message.id,value:e,sub:r.TRADE_ACTIONS.CONFIRM};t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send(i)})}updateExchangeData(e,t,i,n,r){if(!1===e)return!1;let a=this.createConfirmItemsBox(e,r,t),o=null;return("buy"===t&&(o=this.gameDom.getElement(".trade-container-buy .trade-col.trade-col-2")),"sell"===t&&(o=this.gameDom.getElement(".trade-container-sell .trade-col.trade-col-1")),null===o)?(s.error('Missing "'+t+'" items container.',{message:this.message}),!1):(o.innerHTML=a,this.assignRemoveActions(e,r,t),!0)}createConfirmItemsBox(e,t,i){let r=Object.keys(e);if(0===r.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on confirmation trader-object-ui.",{message:this.message}),"";let a="",o=this.uiScene.cache.html.get("inventoryTradeItem");if(!o)return s.error('Missing template "inventoryTradeItem".'),"";for(let s of r){let r=e[s],h=t[s],c=n.TRADE_ACTIONS.BUY===i,l=n.TRADE_ACTIONS.SELL===i;a+=this.gameManager.gameEngine.parseTemplate(o,{key:h.key,label:h.label,description:h.description,id:s,qty:h.qty,hiddenClass:"",tradeRequirements:c?this.createTradeRequirementsContent(h):"",tradeRewards:l?this.createTradeRewardsContent(h):"",tradeAction:this.createTradeActionRemove(h),tradeActionKey:i,tradeQuantityContent:r})}return a}assignRemoveActions(e,t,i){let n=Object.keys(e);if(0===n.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on remove trader-object-ui.",{message:this.message}),!1;for(let e of n){let n=".trade-item-to-be-"+i+".trade-item-"+e,a=this.gameDom.getElement(n);if(!a){s.error('Assign trade item "'+e+'" container not found.',{message:this.message});continue}let o=this.gameDom.getElement(".trade-item-"+i+".trade-item-"+e+" .trade-action-remove");if(!o){s.error('Assign trade item "'+e+'" remove button not found.',{message:this.message});continue}let h=t[e];o.addEventListener("click",()=>{a.classList.remove("hidden");let t={act:r.OBJECT_INTERACTION,id:this.message.id,value:i,itemId:e,itemKey:h.key};t[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e,t){let i=this.uiScene.cache.html.get("inventoryTradeContainer");if(!i)return s.error('Missing template "inventoryTradeContainer".'),"";let a=this.message.result.lastErrorData;a?.itemUid&&(a.item=this.fetchItemLabelByUid(a.itemUid)),a?.requiredItemKey&&(a.requiredItem=this.fetchItemLabelByUid(a.requiredItemKey));let o=this.gameManager.services.translator.t(this.message.result.lastErrorMessage,a),h=n.TRADE_ACTIONS.BUY===e?t:"",c=n.TRADE_ACTIONS.SELL===e?t:"";return this.gameManager.gameEngine.parseTemplate(i,{tradeActionKey:e,confirmRequirements:"",lastErrorMessage:o,tradeActionLabel:r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM,tradeItemsBuy:h,tradeItemsSell:c})}fetchItemLabelByUid(e){return this.gameManager?.inventory?.manager?.items[e]?.label||this.message?.result?.items[e]?.label||""}fetchItemRequirements(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}fetchItemRewards(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return s.error('Missing template "inventoryTradeItem".'),"";let r=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!r)return s.error('Missing template "inventoryTradeItemQuantity".'),"";let a=n.TRADE_ACTIONS.BUY===e.tradeAction,o=n.TRADE_ACTIONS.SELL===e.tradeAction,h=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:r.OBJECT_INTERACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}mapInventoryKeyFromAction(e){return a.get({buy:"A",sell:"B"},e,!1)}}},{"6f47f46589411c74":"g4GOK","5d863b6194329ea":"izuLV","4eb12b9fd296bfd9":"3lwy5"}],g4GOK:[function(e,t,i){t.exports={ItemsServer:e("58ccb446d62c749b"),ItemsManager:e("99fbf686cf9954ad"),Inventory:e("d0e0bc002aa0626b"),ItemGroup:e("f76a9d92dd31d5bc"),ItemBase:e("8e9d5aa6534a13ad"),ItemEquipment:e("8451b91f0c937da4"),ItemUsable:e("106627cf30823e76"),ItemSingle:e("a73a08604f94da54"),ItemSingleEquipment:e("72395d9fa7948595"),ItemSingleUsable:e("6d04ae470a68a6bf"),ItemsFactory:e("f5eb7eeb5f537334"),ModelEntity:e("d4ce696862dbcd35"),ItemsConst:e("a5ef4f750b88ecba"),ItemsEvents:e("a180e01e5de133e0"),Receiver:e("33a340330572bf29"),ItemsDataGenerator:e("bf0687569e27057a"),GroupsDataGenerator:e("27ccd3cf572478fc"),ExchangePlatform:e("90218b41bb50ec4b"),ExchangeRequirement:e("c2601b545e947f39"),RequirementsCollection:e("72f6373fd251e1e3"),RequirementsProcessor:e("79f809e040670ce3"),ExchangeReward:e("3e52122617c11229"),RewardsCollection:e("6edee09b19b2994c"),RewardsProcessor:e("441790981610210a"),ItemsError:e("c48f961fa528324f")}},{"58ccb446d62c749b":"fCIqi","99fbf686cf9954ad":"5wpm2",d0e0bc002aa0626b:"8qkfQ",f76a9d92dd31d5bc:"3auVp","8e9d5aa6534a13ad":"gInMY","8451b91f0c937da4":"53uuI","106627cf30823e76":"d0orT",a73a08604f94da54:"lLwiJ","72395d9fa7948595":"a3dXh","6d04ae470a68a6bf":"9iH9y",f5eb7eeb5f537334:"lrNSa",d4ce696862dbcd35:"3ncwO",a5ef4f750b88ecba:"idEfG",a180e01e5de133e0:"fWlRm","33a340330572bf29":"2R9Cx",bf0687569e27057a:"nHDSk","27ccd3cf572478fc":"btt2J","90218b41bb50ec4b":"gRIlz",c2601b545e947f39:"4hpnF","72f6373fd251e1e3":"1wLI1","79f809e040670ce3":"kxCH2","3e52122617c11229":"iuvBV","6edee09b19b2994c":"hU2Lr","441790981610210a":"1sOiW",c48f961fa528324f:"eODT6"}],fCIqi:[function(e,t,i){let n=e("584cf2f2bf66f26b"),{StorageObserver:r}=e("3442076d73bd51e9"),s=e("906b84f8406328ec"),{Logger:a,ErrorManager:o,sc:h}=e("5ac154b5c4320dd9");t.exports=class{constructor(e){h.hasOwn(e,"owner")||o.error("Undefined owner."),this.manager=new n(e),this.createStorageObserver(e),this.createClient(e)}createClient(e){if(!h.hasOwn(e,"client"))return!1;this.client=new s({manager:this.manager,client:e.client})}createStorageObserver(e){if(!h.hasOwn(e,"persistence")||!e.persistence)return!1;let t=!1;if(h.hasOwn(e,"modelsManager")&&(t=e.modelsManager),!h.hasOwn(e.owner,"persistData")||"function"!=typeof e.owner.persistData)return a.error('Required method "persistData" not found in ItemServer props.owner.'),!1;this.dataServer=new r(this.manager,t),this.dataServer.listenEvents()}}},{"584cf2f2bf66f26b":"5wpm2","3442076d73bd51e9":"j7WCD","906b84f8406328ec":"3NxkK","5ac154b5c4320dd9":"3lwy5"}],"5wpm2":[function(e,t,i){let n=e("4fe5cf381ee58ab2"),r=e("419f5262e5a6365c"),s=e("bf63d9f42b20facf"),{ErrorManager:a,sc:o}=e("21ccb6baff6c486e");t.exports=class extends n{constructor(e){o.hasOwn(e,"owner")||a.error("Undefined owner."),super(e),this.itemClasses=o.get(e,"itemClasses",!1),this.groupClasses=o.get(e,"groupClasses",!1),this.itemsModelData=o.get(e,"itemsModelData",!1),this.ownerIdProperty=o.get(e,"ownerIdProperty","id"),this.owner=e.owner,this.groups={},this.eventsPrefix=this.getOwnerEventKey()+o.get(e,"eventsPrefix",""),this.types=new s}getOwnerId(){return this.owner[this.ownerIdProperty]}getOwnerEventKey(){return o.get(this.owner,"eventsPrefix","items.ownerId."+this.getOwnerId())}getOwnerUniqueEventKey(e){return(o.isFunction(this.owner.eventUniqueKey)?this.owner.eventUniqueKey():"items.ownerId."+this.getOwnerId()+".uKey."+o.getTime())+(e?"."+e:"")}async setup(e){await this.fireEvent(r.MANAGER_INIT,{props:e,manager:this}),o.hasOwn(e,"items")&&await this.setItems(e.items),o.hasOwn(e,"groups")&&await this.setGroups(e.groups)}createItemInstance(e,t){let i=o.get(this.itemsModelData,e,!1);if(!1===i)return!1;if(i.data.modifiers)for(let e of Object.keys(i.data.modifiers))i.data.modifiers[e].target=this.owner;let n=i.class.isSingleInstance(),r=void 0!==t&&n?t:1,s=Object.assign({},i.data,{manager:this,item_id:i.data.id,qty:r});if(delete s.uid,!0===n||1===r)return new i.class(s);let a=[];s.qty=1;for(let e=0;ethis.limitPerItem&&0<=this.limitPerItem?(this.setError("Cannot add item, item qty limit exceeded.",s.ERROR_CODES.ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM,{itemUid:t,qty:e.qty}),!1):(o.hasOwn(this.items,t)&&e.singleInstance?await this.increaseItemQty(t,e.qty):(await this.fireEvent(r.ADD_ITEM_BEFORE,this,e),this.items[t]=e,await this.fireEvent(r.ADD_ITEM,this,e)),this.items[t])}async addItems(e){for(let t of e)if(!await this.addItem(t))return this.setError('Cannot add item "'+t.getInventoryId()+'".',s.ERROR_CODES.ADD_ITEMS_ERROR,{itemUid:t.getInventoryId()}),!1;return!0}async setItem(e){if(this.locked)return this.setError("Inventory locked, cannot set item: "+e.getInventoryId(),s.ERROR_CODES.LOCKED_FOR_SET_ITEM,{itemUid:e.getInventoryId()}),!1;this.items[e.getInventoryId()]=e}async removeItem(e){return this.locked?(this.setError("Inventory locked, cannot remove item: "+e,s.ERROR_CODES.LOCKED_FOR_REMOVE_ITEM,{itemUid:e}),!1):o.hasOwn(this.items,e)?(await this.fireEvent(r.REMOVE_ITEM,this,e),delete this.items[e],!0):(this.setError("Cannot remove item, key not found: "+e,s.ERROR_CODES.KEY_NOT_FOUND,{itemUid:e}),!1)}async setItemQty(e,t){return this.modifyItemQty(s.SET,e,t)}async increaseItemQty(e,t){return this.modifyItemQty(s.INCREASE,e,t)}async decreaseItemQty(e,t){return this.modifyItemQty(s.DECREASE,e,t)}async modifyItemQty(e,t,i){if(this.locked)return this.setError("Inventory locked, cannot modify item qty: "+t,s.ERROR_CODES.LOCKED_FOR_MODIFY_ITEM_QTY,{itemUid:t}),!1;if(!o.hasOwn(this.items,t))return this.setError("Cannot "+e+" item qty, undefined item key: "+t,s.ERROR_CODES.UNDEFINED_ITEM_KEY_FOR_OPERATION,{itemUid:t,operation:e}),!1;if(isNaN(i))return this.setError("Cannot "+e+" item qty, qty is not a number: "+i,s.ERROR_CODES.QTY_NOT_A_NUMBER,{itemUid:t,operation:e,qty:i}),!1;if(this.limitPerItem>0&&i>this.limitPerItem&&(e===s.SET||e===s.INCREASE))return this.setError("Cannot "+e+" item qty, item qty limit exceeded: "+i+" > "+this.limitPerItem,s.ERROR_CODES.ITEM_QTY_LIMIT_EXCEEDED,{itemUid:t,operation:e,limitPerItem:this.limitPerItem}),!1;if(e===s.SET&&(this.items[t].qty=i),e===s.INCREASE&&(this.items[t].qty+=i),e===s.DECREASE){let e=this.items[t].qty-i;0>e&&(e=0),this.items[t].qty=e}return 0===this.items[t].qty&&this.items[t].autoRemoveItemOnZeroQty?(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),await this.removeItem(this.items[t].getInventoryId())):(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),!0)}async setItems(e){return this.locked?(this.setError("Inventory locked, cannot set items.",s.ERROR_CODES.LOCKED_FOR_SET_ITEMS),!1):(this.items=e,this.fireEvent(r.SET_ITEMS,{items:e,manager:this}))}async setGroups(e){return this.groups=e,this.fireEvent(r.SET_GROUPS,{groups:e,manager:this})}fireEvent(e,...t){return this.events.emit(this.eventFullName(e),...t)}listenEvent(e,t,i,n){return this.events.onWithKey(this.eventFullName(e),t,i,n)}eventFullName(e){return this.eventsPrefix+"."+e}setError(e="",t="",i={},r=!1){this.lastError=new n(e,t,i,r)}}},{adccac45c69ab6e8:"eODT6","2fd42dbc83a1dbf2":"fWlRm",bb9f4880ce8c412b:"idEfG","4bf1621a8608b780":"3lwy5"}],eODT6:[function(e,t,i){t.exports=class{constructor(e="",t="",i={},n=!1){this.message=e,this.code=t,this.data=i,this.withError=n}}},{}],fWlRm:[function(e,t,i){let n="reldens.items.";t.exports={PREF:n,MANAGER_INIT:n+"setup",EXCHANGE:{INITIALIZED:n+"initialized",CANCELED:n+"canceled",INVALID_PUSH:n+"invalidPush",ITEM_PUSHED:n+"itemPushed",ITEM_REMOVE:n+"itemRemove",CONFIRM:n+"confirm",DISCONFIRM:n+"disconfirm",BEFORE_FINALIZE:n+"beforeFinalize",FINALIZED:n+"finalized"},LOADED_OWNER_ITEMS:n+"loadedOwnerItems",SET_ITEMS:n+"setItems",SET_GROUPS:n+"setGroups",EQUIP_ITEM:n+"equipItem",UNEQUIP_ITEM:n+"unequipItem",ADD_ITEM:n+"addItem",ADD_ITEM_BEFORE:n+"addItemBefore",REMOVE_ITEM:n+"removeItem",MODIFY_ITEM_QTY:n+"modifyItemQty",EQUIP_BEFORE:n+"equipBefore",EQUIP:n+"equip",EXECUTING_ITEM:n+"executingItem",EXECUTED_ITEM:n+"executedItem",VALIDATE:n+"validate"}},{}],idEfG:[function(e,t,i){let n="rinv",r="items.",s="exchange.",a="requirements.",o="reward.",h="equipment.";t.exports={SET:"set",INCREASE:"increase",DECREASE:"decrease",ACTIONS_PREF:n,ACTION_ADD:n+"A",ACTION_REMOVE:n+"R",ACTION_MODIFY_QTY:n+"M",ACTION_EQUIP:n+"E",ACTION_UNEQUIP:n+"U",ACTION_MOD_APPLIED:n+"Ma",ACTION_MOD_REVERTED:n+"Mr",ACTION_EXECUTING:n+"Ex",ACTION_EXECUTED:n+"AExd",ACTION_MANAGER_INIT:n+"Mi",ACTION_SET_ITEMS:n+"Si",ACTION_SET_GROUPS:n+"Sg",BEHAVIOR_SEND:"send",BEHAVIOR_BROADCAST:"broadcast",BEHAVIOR_BOTH:"both",TYPES:{ITEM_BASE:10,EQUIPMENT:1,USABLE:2,SINGLE:3,SINGLE_EQUIPMENT:4,SINGLE_USABLE:5},TRADE_ACTIONS:{BUY:"buy",SELL:"sell",TRADE:"trade"},ERROR_CODES:{PREFIX:r,UNDEFINED_ITEM:r+"undefinedItem",UNDEFINED_METHOD_INVENTORY_ID:r+"undefinedMethodInventoryId",UNDEFINED_ITEM_KEY:r+"undefinedItemKey",INVALID_ITEM_INSTANCE:r+"invalidItemInstance",LOCKED_FOR_ADD_ITEM:r+"lockedForAddItem",MAX_TOTAL_REACHED_FOR_ADD_ITEM:r+"maxTotalReachedForAddItem",ITEM_EXISTS_FOR_ADD_ITEM:r+"itemExistsForAddItem",ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM:r+"itemLimitExceededForAddItem",ADD_ITEMS_ERROR:r+"addItemsError",LOCKED_FOR_SET_ITEM:r+"lockedForSetItem",LOCKED_FOR_REMOVE_ITEM:r+"lockedForRemoveItem",KEY_NOT_FOUND:r+"keyNotFound",LOCKED_FOR_MODIFY_ITEM_QTY:r+"lockedForModifyItemQty",UNDEFINED_ITEM_KEY_FOR_OPERATION:r+"undefinedItemKeyForOperation",QTY_NOT_A_NUMBER:r+"qtyNotANumber",ITEM_QTY_LIMIT_EXCEEDED:r+"itemQtyLimitExceeded",LOCKED_FOR_SET_ITEMS:r+"lockedForSetItems",EXCHANGE:{MISSING_CONFIRMATION:r+s+"missingConfirmation",INVALID_PUSHED_QUANTITY:r+s+"invalidPushedQuantity",INVALID_QUANTITY:r+s+"invalidQuantity",INVALID_EXCHANGE:r+s+"invalidExchange",DECREASE_QUANTITY:r+s+"decreaseQuantity",ITEM_ADD:r+s+"itemAdd"},REQUIREMENTS:{ITEM_NOT_PRESENT:r+a+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+a+"quantityNotAvailable",ITEM_NOT_PUSHED:r+a+"itemNotPushed",ITEM_QUANTITY_NOT_PUSHED:r+a+"itemQuantityNotPushed",ITEM_DOES_NOT_EXISTS:r+a+"itemDoesNotExists",ITEM_ADD:r+a+"itemAdd"},REWARD:{DOES_NOT_EXISTS:r+o+"doesNotExists",MISSING_ITEM:r+o+"missingItem",ITEM_NOT_PRESENT:r+o+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+o+"quantityNotAvailable",MISSING_PUSHED:r+o+"missingPushed",GET_ITEM_DOES_NOT_EXISTS:r+o+"getItemDoesNotExists",PROCESS_ITEM:r+o+"processItem",PROCESS_INVENTORY:r+o+"processInventory",ADD_ITEMS:r+o+"addItems",QUANTITY_OVERLOAD:r+o+"quantityOverload"},EQUIPMENT:{MODIFIERS_APPLY:r+h+"modifiersApply",MODIFIERS_REVERT:r+h+"modifiersRevert"}}}},{}],"8gXhx":[function(e,t,i){let n=e("ac10c481864dff83"),r=e("b75564ba303c5356"),s=e("957d5b5e4a423dca"),a=e("a3590f99276506ca"),o=e("dff4c8e33829a997"),h=e("5b2a69acfbc9bd6d"),c=e("ce977eaa6d463c01"),{sc:l}=e("5794f948bd319a4f");t.exports=class{constructor(){this.types={},this.types[n.TYPES.ITEM_BASE]=r,this.types[n.TYPES.EQUIPMENT]=s,this.types[n.TYPES.USABLE]=a,this.types[n.TYPES.SINGLE]=o,this.types[n.TYPES.SINGLE_EQUIPMENT]=h,this.types[n.TYPES.SINGLE_USABLE]=c}list(){return this.types}classByTypeId(e){return l.get(this.types,e.toString(),r)}}},{ac10c481864dff83:"idEfG",b75564ba303c5356:"gInMY","957d5b5e4a423dca":"53uuI",a3590f99276506ca:"d0orT",dff4c8e33829a997:"lLwiJ","5b2a69acfbc9bd6d":"a3dXh",ce977eaa6d463c01:"9iH9y","5794f948bd319a4f":"3lwy5"}],gInMY:[function(e,t,i){let n=e("c12e6ac2d5a93063"),r=e("c6965a9a447f564a"),{ErrorManager:s,sc:a}=e("e634cd5ec6f60b00");t.exports=class{constructor(e){a.hasOwn(e,"key")||s.error("Undefined item key."),a.hasOwn(e,"manager")||s.error("Undefined item manager."),this.key=e.key,this.uid=e.uid?e.uid:this.key+(e.id?"":e.id)+a.randomChars(8),this.id=a.get(e,"id",null),this.item_id=a.get(e,"item_id",null),this.label=a.get(e,"label",""),this.description=a.get(e,"description",""),this.manager=e.manager,this.type=a.get(e,"type",n.TYPES.ITEM_BASE),this.qty=a.get(e,"qty",0),this.remaining_uses=e.remaining_uses||0,this.is_active=a.get(e,"is_active",!1),this.group_id=a.get(e,"group_id",!1),this.qty_limit=a.get(e,"qty_limit",!1),this.uses_limit=a.get(e,"uses_limit",!1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0),this.useTimeOut=a.get(e,"useTimeOut",!1),this.execTimeOut=a.get(e,"execTimeOut",!1),this.modifiers=a.get(e,"modifiers",{}),this.target=!1,this.singleInstance=!1,this.rawCustomData=a.get(e,"customData",{});let t="string"==typeof this.rawCustomData?a.toJson(this.rawCustomData,{}):this.rawCustomData;null!==t&&"object"==typeof t&&0=t.length)return;let i=e?"revert":"apply";for(let e of t)this.modifiers[e][i](this.target);return this.manager.fireEvent(r.EQUIP+(e?"Reverted":"Applied")+"Modifiers",this)}isType(e){return this.type===e}async fireEvent(e,...t){return this.manager.fireEvent(e,...t)}listenEvent(e,t,i,n){return this.manager.listenEvent(e,t,i,n)}}},{c12e6ac2d5a93063:"idEfG",c6965a9a447f564a:"fWlRm",e634cd5ec6f60b00:"3lwy5"}],"53uuI":[function(e,t,i){let n=e("33cdc889b48aacb0"),r=e("c5fbc38955884411"),s=e("8ae98c100e6c951f"),{sc:a}=e("bcc3d9fdf3135034");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.EQUIPMENT,this.equipped=a.get(e,"equipped",!1)}async equip(e){if(this.equipped=!0,await this.manager.fireEvent(s.EQUIP_ITEM,this),!1===e||!1===this.manager.applyModifiersAuto)return!1;await this.applyModifiers()}async unequip(e){if(this.equipped=!1,await this.manager.fireEvent(s.UNEQUIP_ITEM,this),!1===e||!1===this.manager.revertModifiersAuto)return!1;await this.revertModifiers()}async applyModifiers(){return this.equipped?await super.applyModifiers():(this.manager.setError("Cannot apply modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_APPLY,{itemUid:this.getInventoryId()}),!1)}async revertModifiers(){return this.equipped?(this.manager.setError("Cannot revert modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_REVERT,{itemUid:this.getInventoryId()}),!1):await super.revertModifiers()}}},{"33cdc889b48aacb0":"gInMY",c5fbc38955884411:"idEfG","8ae98c100e6c951f":"fWlRm",bcc3d9fdf3135034:"3lwy5"}],d0orT:[function(e,t,i){let n=e("73e1b5628e255757"),r=e("da3e74df899b07c1"),s=e("31d1c1f3f78c977b"),{sc:a}=e("ba8c76a702e812f2");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.USABLE,this.uses=a.get(e,"uses",1),this.currentUses=this.uses,this.usesLimit=a.get(e,"usesLimit",!1),this.canUse=!0,this.removeAfterUse=!0,this.useTimeOut=!1,this.useTimer=!1,this.execTimeOut=!1,this.execTimer=!1,this.removeQtyAfterUse=a.get(e,"removeQtyAfterUse",1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0)}async use(e=!1){if(!this.canUse||0>=this.currentUses)return!1;if(e&&(this.target=e),this.useTimeOut&&(this.canUse=!1,this.useTimer=setTimeout(async()=>{this.canUse=!0},this.useTimeOut)),await this.manager.fireEvent(s.EXECUTING_ITEM,this),!1===this.execTimeOut){await this.executeItem();return}this.execTimer=setTimeout(async()=>{await this.executeItem()},this.execTimeOut)}async executeItem(){return await this.applyModifiers(),this.currentUses--,!this.removeAfterUse||0t}le(e,t){return e<=t}ge(e,t){return e>=t}}},{"7f32cc4f678fee29":"3lwy5","3ddfbc21a5968711":"7bVCu",ccbf83a7cf179d24:"4bERK"}],"7bVCu":[function(e,t,i){let{ErrorManager:n,sc:r}=e("6ef89030f5a59b76");t.exports=class{getPropertyValue(e,t){return this.manageOwnerProperty(e,t)}setOwnerProperty(e,t,i){return this.manageOwnerProperty(e,t,i)}manageOwnerProperty(e,t,i){let n=t.split("/"),r=this.extractDeepProperty(e,n),s=n.pop();return void 0!==i&&(r[s]=i),r[s]}extractDeepProperty(e,t){let i=[...t],s=i.shift();return(r.hasOwn(e,s)||n.error('Property "'+s+'" from path parts: "'+t.join("/")+'"] owner invalid value: '+e[s]+"."),1this.maxValue&&(e=this.maxValue),this.minProperty){let t=this.getPropertyValue(this.minProperty);t&&et&&(e=t)}return e}getPropertyValue(e){return this.propertyManager.getPropertyValue(this.target,e)}setOwnerProperty(e,t){return this.propertyManager.setOwnerProperty(this.target,e,t)}}},{"466f1d6a713f27d":"15YIL","3a9190386e2c269":"jefAk",a7b06831aaf035e5:"7bVCu","3a11d9dd77bf6747":"4bERK","994144a57bf406a1":"3lwy5"}],"3NxkK":[function(e,t,i){let n=e("b644d789ee2b40af"),r=e("45ba412a65c2e357"),{PropertyManager:s}=e("994236dc9aef1f79"),{Logger:a,sc:o}=e("8b1efebe48a67288");t.exports=class{constructor(e){this.client=o.get(e,"client",!1),this.manager=o.get(e,"manager",!1),this.sendProperties=o.get(e,"sendProperties",{}),!1===o.hasOwn(e,"sendProperties")&&this.defineBehaviorForProperties(),this.sendTargetProps=o.hasOwn(e,"sendTargetProps")?e.sendTargetProps:{broadcast:[],send:[]},this.propertyManager=new s,this.listenEvents()}validateManager(){return!!this.manager||(a.critical("Undefined manager for Sender."),!1)}validateClient(){return this.client?o.isObjectFunction(this.client,"send")?!!o.isObjectFunction(this.client,"broadcast")||(a.critical('Required method "broadcast" not found in client.',this.client),!1):(a.critical('Required method "send" not found in client.',this.client,typeof this.client.send),!1):(a.critical("Undefined client for Sender."),!1)}defineBehaviorForProperties(e){e||(e={});let t=n.BEHAVIOR_SEND,i=n.BEHAVIOR_BROADCAST;this.setPropertyBehavior(n.ACTION_ADD,e,{behavior:t,send:["id","key","type","qty","label","description","group_id","qty_limit","uses_limit","useTimeOut","execTimeOut","remaining_uses","is_active"]}),this.setPropertyBehavior(n.ACTION_REMOVE,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MODIFY_QTY,e,{behavior:t,send:["id","key","qty"]}),this.setPropertyBehavior(n.ACTION_MOD_APPLIED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MOD_REVERTED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_UNEQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EXECUTING,e,{behavior:i,broadcast:["id","key","animationData"]}),this.setPropertyBehavior(n.ACTION_EXECUTED,e,{behavior:t,send:["id","key"]})}setPropertyBehavior(e,t,i){o.hasOwn(t,e)&&(this.sendProperties[e]=t[e]),this.sendProperties[e]=i}getItemProperties(e,t,i){if(!o.hasOwn(this.sendProperties,t))return a.critical("Undefined action while getting item properties.",{action:t,sendProperties:this.sendProperties}),!1;if(!o.hasOwn(this.sendProperties[t],i))return a.critical("Undefined behavior while getting item properties.",{behavior:i,action:t,sendProperties:this.sendProperties}),!1;let n={idx:e.getInventoryId()};for(let r of this.sendProperties[t][i]){if(!o.hasOwn(e,r)){a.info("Undefined property: "+r,e);continue}n[r]=e[r]}return n}listenEvents(){if(!this.validateManager())return!1;let e=this.manager.getOwnerEventKey();this.manager.listenEvent(r.ADD_ITEM,this.sendAddItemData.bind(this),this.manager.getOwnerUniqueEventKey("addItemSend"),e),this.manager.listenEvent(r.REMOVE_ITEM,this.sendRemoveItemData.bind(this),this.manager.getOwnerUniqueEventKey("removeItemSend"),e),this.manager.listenEvent(r.MODIFY_ITEM_QTY,this.sendModifyItemQuantityData.bind(this),this.manager.getOwnerUniqueEventKey("modifyItemQtySend"),e),this.manager.listenEvent(r.EQUIP_ITEM,this.sendEquipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemSend"),e),this.manager.listenEvent(r.UNEQUIP_ITEM,this.sendUnequipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("unequipItemSend"),e),this.manager.listenEvent(r.EQUIP+"AppliedModifiers",this.sendEquipItemAppliedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemAppliedModifiersSend"),e),this.manager.listenEvent(r.EQUIP+"RevertedModifiers",this.sendEquipItemRevertedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemRevertedModifiersSend"),e),this.manager.listenEvent(r.EXECUTING_ITEM,this.sendExecutingItemData.bind(this),this.manager.getOwnerUniqueEventKey("executingItemSend"),e),this.manager.listenEvent(r.EXECUTED_ITEM,this.sendExecutedItemData.bind(this),this.manager.getOwnerUniqueEventKey("executedItemSend"),e),this.manager.listenEvent(r.SET_ITEMS,this.sendSetItemsData.bind(this),this.manager.getOwnerUniqueEventKey("setItemsSend"),e),this.manager.listenEvent(r.SET_GROUPS,this.sendSetGroupsData.bind(this),this.manager.getOwnerUniqueEventKey("setGroupsSend"),e)}async sendSetGroupsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i={};for(let t of Object.keys(e.groups)){let{id:n,key:r,label:s,description:a,sort:o}=e.groups[t];i[r]={id:n,key:r,label:s,description:a,sort:o}}return await this.client.send({act:n.ACTION_SET_GROUPS,owner:t,groups:i})}async sendSetItemsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i=this.extractItemsDataForSend(e.items);return await this.client.send({act:n.ACTION_SET_ITEMS,owner:t,items:i})}async sendExecutedItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTED)}async sendExecutingItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTING)}async sendEquipItemRevertedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_REVERTED)}async sendEquipItemAppliedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_APPLIED)}async sendUnequipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_UNEQUIP)}async sendEquipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EQUIP)}async sendModifyItemQuantityData(e,t,i,r,s){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MODIFY_QTY)}async sendRemoveItemData(e,t){let i=e.items[t];return i?await this.runBehaviors(i,i.manager.getOwnerId(),n.ACTION_REMOVE):(a.debug('Item with key "'+t+'" not found.'),!1)}async sendAddItemData(e,t){return await this.runBehaviors(t,t.manager.getOwnerId(),n.ACTION_ADD)}extractItemsDataForSend(e){let t={};for(let i of Object.keys(e)){let r=e[i],s=this.getItemProperties(r,n.ACTION_ADD,n.BEHAVIOR_SEND);s.singleInstance=r.singleInstance,t[r.getInventoryId()]=s}return t}async runBehaviors(e,t,i){if(!e)return a.warning('Invalid "item" parameter.'),!1;if(!this.validateManager()||!this.validateClient())return!1;if(this.manager.getOwnerId()!==t)return a.warning("Item owner ID miss match.",this.manager.getOwnerId(),t),!1;let r=this.sendProperties[i],s=this.getTargetProps(e,r.behavior),o=r.behavior===n.BEHAVIOR_BOTH;if(r.behavior===n.BEHAVIOR_BROADCAST||o){let r=this.getItemProperties(e,i,n.BEHAVIOR_BROADCAST);await this.client.broadcast({act:i,owner:t,item:r,target:s});return}let h=r.behavior===n.BEHAVIOR_SEND,c=r[n.BEHAVIOR_SEND]!==r[n.BEHAVIOR_BROADCAST];if(h||o&&c){let r=this.getItemProperties(e,i,n.BEHAVIOR_SEND);await this.client.send({act:i,owner:t,item:r,targetProps:s})}}getTargetProps(e,t){let i=t===n.BEHAVIOR_BOTH?n.BEHAVIOR_BROADCAST:n.BEHAVIOR_SEND;if(!1===o.hasOwn(this.sendTargetProps,i)||0===this.sendTargetProps[i].length)return{};let r={};for(let t of this.sendTargetProps[i]){let i="id"===t?this.manager.ownerIdProperty:t;r[i]=this.propertyManager.getPropertyValue(e.target,i)}return r}}},{b644d789ee2b40af:"idEfG","45ba412a65c2e357":"fWlRm","994236dc9aef1f79":"iJUHo","8b1efebe48a67288":"3lwy5"}],"3auVp":[function(e,t,i){let n=e("fddf8c3cc708201b"),{ErrorManager:r,sc:s}=e("c1c82d06c77e78b8");t.exports=class extends n{constructor(e){s.hasOwn(e,"id")||r.error("Undefined ItemGroup id."),s.hasOwn(e,"key")||r.error("Undefined ItemGroup key."),e.eventsPref="g"+e.key+"."+s.get(e,"eventsPrefix",""),super(e),this.id=e.id,this.key=e.key,this.label=s.get(e,"label",!1),this.description=s.get(e,"description",!1),this.files_name=s.get(e,"files_name",!1),this.sort=s.get(e,"sort",!1),this.items_limit=s.get(e,"items_limit",!1),this.limit_per_item=s.get(e,"limit_per_item",!1)}}},{fddf8c3cc708201b:"8qkfQ",c1c82d06c77e78b8:"3lwy5"}],"3ncwO":[function(e,t,i){t.exports=class{constructor(e){this.id=e.id,this.key=e.key,this.type=e.type}}},{}],"2R9Cx":[function(e,t,i){let n=e("312a2d95cff483b5"),r=e("f647b9be5cb5de72"),s=e("2edbed84bfb41fb4"),{ErrorManager:a,Logger:o,sc:h}=e("a231b7a801915a72");t.exports=class{constructor(e){h.hasOwn(e,"owner")||a.error("Undefined owner."),this.manager=h.hasOwn(e,"manager")?e.manager:new n(e),this.actions=h.hasOwn(e,"actions")?e.actions:{},!1===h.get(e,"avoidDefaults",!1)&&this.setDefaultActions(),this.recieveErrorsLog=[]}setDefaultActions(){this.actions[r.ACTION_SET_ITEMS]="onSetItems",this.actions[r.ACTION_SET_GROUPS]="onSetGroups",this.actions[r.ACTION_ADD]="onAddItem",this.actions[r.ACTION_REMOVE]="onRemoveItem",this.actions[r.ACTION_MODIFY_QTY]="onSetQty",this.actions[r.ACTION_EQUIP]="onEquipItem",this.actions[r.ACTION_UNEQUIP]="onUnequipItem",this.actions[r.ACTION_MOD_APPLIED]="onModifiersApplied",this.actions[r.ACTION_MOD_REVERTED]="onModifiersReverted",this.actions[r.ACTION_EXECUTING]="onExecuting",this.actions[r.ACTION_EXECUTED]="onExecuted"}processMessage(e){let t=h.get(e,"act","");return 0===t.indexOf(r.ACTIONS_PREF)&&(h.hasOwn(this.actions,t)?"function"!=typeof this[this.actions[t]]?(o.info("Items action is not a function.",e.act),!1):void this[this.actions[t]](e):(o.error("Items action not found",t,e),!1))}onSetItems(e){let t={};for(let i of Object.keys(e.items)){let n=e.items[i],s=Object.assign({manager:this.manager},n,{uid:i}),a=this.getItemClass(s.key,s.type);t[i]=new a(s),t[i].isType(r.TYPES.EQUIPMENT)&&h.hasOwn(s,"is_active")&&(t[i].equipped=1===s.is_active)}return this.manager.setItems(t)}onSetGroups(e){let t={};for(let i of Object.keys(e.groups)){let n=this.getGroupClass(e.groups[i].key);t[e.groups[i].key]=new n(e.groups[i])}return this.manager.setGroups(t)}onAddItem(e){let t=Object.assign({manager:this.manager},e.item,{uid:e.item.idx}),i=new(this.getItemClass(t.key,t.type))(t);this.manager.addItem(i).catch(e=>{this.recieveErrorsLog.push({"Error receiver onAddItem.":e})})}onRemoveItem(e){this.manager.removeItem(e.item.idx).catch(e=>{this.recieveErrorsLog.push({"Error receiver onRemoveItem.":e})})}onSetQty(e){this.manager.setItemQty(e.item.idx,e.item.qty).catch(e=>{this.recieveErrorsLog.push({"Error receiver onSetQty.":e})})}onEquipItem(e){this.manager.items[e.item.idx].equip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onEquipItem.":e})})}onUnequipItem(e){this.manager.items[e.item.idx].unequip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onUnequipItem.":e})})}onModifiersApplied(e){}onModifiersReverted(e){}onExecuting(e){}onExecuted(e){}getItemClass(e,t){return h.get(this.manager.itemClasses,e,this.manager.types.classByTypeId(t))}getGroupClass(e){let t=s;return h.hasOwn(this.manager.groupClasses,e)&&(t=this.manager.groupClasses[e]),t}}},{"312a2d95cff483b5":"5wpm2",f647b9be5cb5de72:"idEfG","2edbed84bfb41fb4":"3auVp",a231b7a801915a72:"3lwy5"}],nHDSk:[function(e,t,i){let n=e("3dd92880a486247f"),{ModifierConst:r,Modifier:s}=e("293ce1d1ff60486a"),{sc:a}=e("45aa0d32b8aa311b");t.exports=class{static itemsListMappedData(e={},t){if(0===t.length)return{};let i={},r=new n;for(let n of t)n.items_modifiers&&(n.modifiers=this.generateItemModifiers(n)),i[n.key]={class:a.get(e,n.key,r.classByTypeId(n.type)),data:n};return i}static generateItemModifiers(e){let t={};for(let i of e.items_modifiers)i.operation!==r.OPS.SET&&(i.value=Number(i.value)),t[i.id]=new s(i);return t}}},{"3dd92880a486247f":"8gXhx","293ce1d1ff60486a":"iJUHo","45aa0d32b8aa311b":"3lwy5"}],btt2J:[function(e,t,i){let{ItemGroup:n}=e("185572600d1291f"),{sc:r}=e("99c50def0f4abb2");t.exports=class{static groupsListMappedData(e,t){if(0===t.length)return{};let i={groupList:{},groupBaseData:{}};for(let n of(i.groupModels=t,t))this.addGroup(n,i,e);return i}static appendGroup(e,t,i){return!!e&&!!t&&!!i&&(r.isArray(t.groupModelsList)||(t.groupModelsList=[]),t.groupModelsList.push(e),this.addGroup(i,e,t),t)}static addGroup(e,t,i){let s=r.get(i,e.key,n),{id:a,key:o,label:h,description:c,sort:l,files_name:u}=e;t.groupList[e.key]={class:s,data:e},t.groupBaseData[o]={id:a,key:o,label:h,description:c,sort:l,files_name:u}}}},{"185572600d1291f":"3auVp","99c50def0f4abb2":"3lwy5"}],gRIlz:[function(e,t,i){let n=e("9ec9f370c69b97e4"),r=e("5bd56f616649a07e"),s=e("f6c0b56ddc826cd5"),a=e("e433549ba9a6abfc"),o=e("24c35dc83734e5b2"),h=e("330f7364569544ad"),c=e("332ac9b4e9ced220"),{EventsManagerSingleton:l,ErrorManager:u,Logger:d,sc:f}=e("71720c1a95ddc1ce");t.exports=class{constructor(e){this.events=f.get(e,"eventsManager",l),this.requirementsProcessor=new s,this.rewardsProcessor=new a,this.exchangeInitializerId=f.get(e,"exchangeInitializerId",!1),this.initializeProperties()}initializeExchangeBetween(e){let t=f.get(e,"inventoryA",null),i=f.get(e,"inventoryB",null);(null===t||null===i)&&u.error("Missing inventories from properties.",e),this.inventories={A:t,B:i},this.lockInventories(),this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:f.get(e,"exchangeRequirementsA",new n),B:f.get(e,"exchangeRequirementsB",new n)},this.exchangeRewards={A:f.get(e,"exchangeRewardsA",new r),B:f.get(e,"exchangeRewardsB",new r)},this.dropExchange={A:f.get(e,"dropExchangeA",!1),B:f.get(e,"dropExchangeB",!1)},this.avoidExchangeDecrease={A:f.get(e,"avoidExchangeDecreaseA",!1),B:f.get(e,"avoidExchangeDecreaseB",!1)},this.setError(),this.events.emit(h.EXCHANGE.INITIALIZED,{exchangePlatform:this,props:e,inventoryA:t,inventoryB:i})}setError(e="",t="",i={},n=!1){this.lastError=new o(e,t,i,n)}cancelExchange(){this.unlockInventories(),this.initializeProperties(),this.events.emit(h.EXCHANGE.CANCELED,{exchangePlatform:this})}initializeProperties(){this.inventories={A:null,B:null},this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:[],B:[]},this.exchangeRewards={A:[],B:[]},this.setError()}async pushForExchange(e,t,i){return this.confirmations.A||this.confirmations.B?(d.info('Push for exchange "'+e+'" was blocked. Exchange for "'+i+'" and owner "'+this.inventories[i].owner_id+'" was already confirmed.'),!1):this.canBePushed(e,t,i)?(this.exchangeBetween[i][e]=t,this.validateRequirements("A")&&this.validateRewards("A")&&this.validateRequirements("B")&&this.validateRewards("B"))?(this.events.emit(h.EXCHANGE.ITEM_PUSHED,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!0):(delete this.exchangeBetween[i][e],!1):(this.events.emit(h.EXCHANGE.INVALID_PUSH,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!1)}async removeFromExchange(e,t){return this.confirmations.A||this.confirmations.B?(d.info('Remove from exchange "'+e+'" was blocked. Exchange for "'+t+'" and owner "'+this.inventories[t].owner_id+'" was already confirmed.'),!1):(this.events.emit(h.EXCHANGE.ITEM_REMOVE,{exchangePlatform:this,itemUid:e,inventoryKey:t}),!!f.hasOwn(this.exchangeBetween[t],e)&&(delete this.exchangeBetween[t][e],!0))}async confirmExchange(e){this.events.emit(h.EXCHANGE.CONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!0}async disconfirmExchange(e){this.events.emit(h.EXCHANGE.DISCONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!1}async finalizeExchange(){return(this.events.emit(h.EXCHANGE.BEFORE_FINALIZE,{exchangePlatform:this}),this.confirmations.A&&this.confirmations.B)?!!(this.validateRequirements("A")&&this.validateRequirements("B")&&this.validateRewards("A")&&this.validateRewards("B"))&&(this.unlockInventories(),!1!==await this.executeExchangeFromTo("A","B")&&!1!==await this.executeExchangeFromTo("B","A")&&(this.events.emit(h.EXCHANGE.FINALIZED,{exchangePlatform:this}),this.setError(),!0)):(this.setError("Missing confirmation.",c.ERROR_CODES.EXCHANGE.MISSING_CONFIRMATION,{confirmations:this.confirmations}),!1)}validateRequirements(e){return this.requirementsProcessor.validateRequirements(e,this)}validateRewards(e){return this.rewardsProcessor.validateRewards(e,this)}lockInventories(){this.setLocks(!0)}unlockInventories(){this.setLocks(!1)}setLocks(e){this.setInventoryLock("A",e),this.setInventoryLock("B",e)}setInventoryLock(e,t){let i=f.get(this.inventories,e,!1);return null!==i&&(!1===i?(d.error('Inventory not found "'+e+'".',this.inventories),!1):(i.locked=t,!0))}canBePushed(e,t,i){if(!f.hasOwn(this.inventories[i].items,e))return d.critical("Item Key does not exists on the inventory",e,this.inventories[i].items),!1;let n=this.inventories[i].items[e],r=t<=n.qty||-1===n.qty;return r||this.setError("Invalid item pushed quantity ("+t+"), available: "+n.qty,c.ERROR_CODES.EXCHANGE.INVALID_PUSHED_QUANTITY,{itemUid:e,qty:t,pushedItemQty:n.qty}),r}async executeExchangeFromTo(e,t){if(e===t)return this.setError('Inventories "FROM" and "TO" are the same, exchange cancelled.',c.ERROR_CODES.EXCHANGE.INVALID_EXCHANGE),this.cancelExchange(),this.inventories;let i=this.inventories[e],n=this.inventories[t];for(let r of Object.keys(this.exchangeBetween[e])){let s=this.exchangeBetween[e][r];if(0===s)return this.setError("Invalid item quantity 0.",c.ERROR_CODES.EXCHANGE.INVALID_QUANTITY,{itemUid:r}),!1;let a=!1===this.dropExchange[t]&&n.createItemInstance(i.items[r].key,s);if(!1===await this.rewardsProcessor.processRewards(e,t,r,i,n,this)||!1===await this.requirementsProcessor.processRequirements(e,t,r,s,i,n,this))return!1;let o=!0;if(!1===this.avoidExchangeDecrease[e]&&(i.frozenItems[r]=Object.assign({},i.items[r]),o=await i.decreaseItemQty(r,s)),!1===o)return this.setError("Exchange inventory decrease error.",c.ERROR_CODES.EXCHANGE.DECREASE_QUANTITY,{itemUid:r},i.lastError),!1;if(!1===this.dropExchange[t]){let e=f.isArray(a)?a:[a];if(!1===await n.addItems(e))return this.setError("Exchange add inventory result error.",c.ERROR_CODES.EXCHANGE.ITEM_ADD,{itemUid:r},n.lastError),!1}}return this.exchangeBetween[e]={},this.inventories}oppositeKey(e){return"A"===e?"B":"A"}}},{"9ec9f370c69b97e4":"1wLI1","5bd56f616649a07e":"hU2Lr",f6c0b56ddc826cd5:"kxCH2",e433549ba9a6abfc:"1sOiW","24c35dc83734e5b2":"eODT6","330f7364569544ad":"fWlRm","332ac9b4e9ced220":"idEfG","71720c1a95ddc1ce":"3lwy5"}],"1wLI1":[function(e,t,i){let n=e("dda1e92f871afe97"),{sc:r}=e("ce7f52b0d100b8f7");t.exports=class{constructor(e){this.requirements=r.get(e,"requirements",[])}count(){return this.requirements.length}add(e,t,i,r,s){this.requirements.push(new n({itemUid:e,itemKey:t,requiredItemKey:i,requiredQuantity:r,autoRemoveRequirement:s}))}remove(e){let t=!1,i=0;for(let n of this.requirements){if(n.itemUid===e){t=!0;break}i++}t&&delete this.requirements[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.requirements,e,t)}}},{dda1e92f871afe97:"4hpnF",ce7f52b0d100b8f7:"3lwy5"}],"4hpnF":[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.requiredItemKey=e.requiredItemKey,this.requiredQuantity=Number(e.requiredQuantity),this.autoRemoveRequirement=!!e.autoRemoveRequirement}}},{}],hU2Lr:[function(e,t,i){let n=e("c75245438c2a820e"),{sc:r}=e("74cd247a8747612e");t.exports=class{constructor(e){this.rewards=r.get(e,"rewards",[])}count(){return this.rewards.length}add(e,t,i,r,s){this.rewards.push(new n({itemUid:e,itemKey:t,rewardItemKey:i,rewardQuantity:r,rewardItemIsRequired:s}))}remove(e){let t=!1,i=0;for(let n of this.rewards){if(n.itemUid===e){t=!0;break}i++}t&&delete this.rewards[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.rewards,e,t)}}},{c75245438c2a820e:"iuvBV","74cd247a8747612e":"3lwy5"}],iuvBV:[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.rewardItemKey=e.rewardItemKey,this.rewardQuantity=Number(e.rewardQuantity),this.rewardItemIsRequired=!!e.rewardItemIsRequired}}},{}],kxCH2:[function(e,t,i){let n=e("b11112aa3d4db9e4"),{Logger:r,sc:s}=e("5342d6a91ce0343f");t.exports=class{constructor(e){this.requirementsByItemUid=s.get(e,"requirementsByItemUid",!0),this.requirementsByItemKey=s.get(e,"requirementsByItemKey",!0),this.requirementsTotals={}}validateRequirements(e,t){let i=t.exchangeRequirements[e];if(0===i.count())return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;this.requirementsTotals={};let o=t.oppositeKey(e);for(let h of a){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.DOES_NOT_EXISTS,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRequirements(i,l);if(0!==u.length&&(this.plusRequirementsQuantity(u,a),!this.validateItemRequirements(u,r[h],o,t)))return!1}return!0}fetchItemRequirements(e,t){let i=[];return this.requirementsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.requirementsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRequirementsQuantity(e,t){for(let i of e)s.hasOwn(this.requirementsTotals,i.requiredItemKey)||(this.requirementsTotals[i.requiredItemKey]=0),this.requirementsTotals[i.requiredItemKey]+=i.requiredQuantity*t}validateItemRequirements(e,t,i,r){if(0===e.length)return!0;for(let a of e){let e=r.inventories[i].findItemByKey(a.requiredItemKey);if(!1===e)return r.setError('Required item "'+a.requiredItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PRESENT,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;let o=a.requiredQuantity*t;if(o>e.qty)return r.setError('Required item "'+a.requiredItemKey+'" required quantity ('+o+') is not available on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.QUANTITY_NOT_AVAILABLE,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1;if(!0===a.autoRemoveRequirement)continue;let h=s.get(r.exchangeBetween[i],e.uid,!1);if(!1===h&&!1===a.autoRemoveRequirement)return r.setError('Required item "'+a.requiredItemKey+'" was not pushed for exchange "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;if(o>h)return r.setError("Required item "+a.requiredItemKey+" required quantity ("+o+") was not pushed for exchange.",n.ERROR_CODES.REQUIREMENTS.ITEM_QUANTITY_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1}return!0}async processRequirements(e,t,i,a,o,h,c){let l=s.get(o.items,i,s.get(o.frozenItems,i,!1));if(!1===l)return c.setError('Requirement error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REQUIREMENTS.ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let u=c.exchangeRequirements[e];if(!u||0===u.count())return!0;let d=this.fetchItemRequirements(u,l);if(0===d.length)return!0;for(let e of d){if(!1===s.get(c.exchangeBetween[t],e.requiredItemKey,!1)&&!1===e.autoRemoveRequirement)return!1;let l=h.findItemByKey(e.requiredItemKey);if(!1===l)return r.error("The required item not longer exists.",i,e.requiredItemKey),!1;let u=e.requiredQuantity*a,d=!1===h.dropExchange&&o.createItemInstance(e.requiredItemKey,u);if(h.frozenItems[l.uid]=Object.assign({},l),!1===await h.decreaseItemQty(l.uid,u))return r.error("There was an error while decreasing the required item quantity.",e,l),!1;if(!1!==d){let e=s.isArray(d)?d:[d];if(!1===await h.addItems(e))return c.setError("Requirement add item error.",n.ERROR_CODES.REQUIREMENTS.ITEM_ADD,{},h.lastError),!1}}return!0}}},{b11112aa3d4db9e4:"idEfG","5342d6a91ce0343f":"3lwy5"}],"1sOiW":[function(e,t,i){let n=e("bddde17fed05deaa"),{Logger:r,sc:s}=e("918bdf09bd16e1b2");t.exports=class{constructor(e){this.rewardsByItemUid=s.get(e,"rewardsByItemUid",!0),this.rewardsByItemKey=s.get(e,"rewardsByItemKey",!0),this.rewardsTotals={}}validateRewards(e,t){let i=t.exchangeRewards[e];if(0===i.length)return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;let o=t.oppositeKey(e);for(let h of(this.rewardsTotals={},a)){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.MISSING_ITEM,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRewards(i,l);if(!1!==u&&0!==u.length&&(this.plusRewardsQuantity(u,a),!this.validateItemRewards(u,a,o,t)))return!1}return!0}fetchItemRewards(e,t){if(!t)return r.error("Item does not exits on inventory.",t),!1;let i=[];return this.rewardsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.rewardsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRewardsQuantity(e,t){for(let i of e)s.hasOwn(this.rewardsTotals,i.rewardItemKey)||(this.rewardsTotals[i.rewardItemKey]=0),this.rewardsTotals[i.rewardItemKey]+=i.rewardQuantity*t}validateItemRewards(e,t,i,r){if(0===e.length)return!0;for(let t of e){if(!1===t.rewardItemIsRequired)continue;let e=r.inventories[i].findItemByKey(t.rewardItemKey);if(!1===e)return r.setError('Reward item "'+t.rewardItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:t.rewardItemKey,inventoryKeyTo:i}),!1;if(this.rewardsTotals[t.rewardItemKey]>e.qty)return r.setError("Reward item "+t.rewardItemKey+" reward quantity ("+t.rewardQuantity+') is not available on inventory "'+i+'".',n.ERROR_CODES.REWARD.QUANTITY_NOT_AVAILABLE,{rewardItemKey:t.rewardItemKey,rewardQuantity:t.rewardQuantity,inventoryKeyTo:i}),!1}return!0}async processRewards(e,t,i,r,a,o){let h=o.exchangeRewards[e];if(0===h.length)return!0;let c=o.oppositeKey(e),l=o.exchangeBetween[e][i];if(!l)return o.setError('Missing pushed for exchange item "'+i+'".',n.ERROR_CODES.REWARD.MISSING_PUSHED,{itemUid:i}),!1;let u=s.get(r.items,i,s.get(r.frozenItems,i,!1));if(!1===u)return o.setError('Reward error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REWARD.GET_ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let d=this.fetchItemRewards(h,u);return!1===d||0===d.length||!!await this.processItemRewards(d,r,a,c,l,i,o)||(o.setError('Process item reward error, item "'+i+'".',n.ERROR_CODES.REWARD.PROCESS_ITEM,{itemUid:i}),!1)}async processItemRewards(e,t,i,a,o,h,c){if(0===e.length)return!0;for(let l of e){let e=l.rewardQuantity*o;if(!1===l.rewardItemIsRequired){let i=t.createItemInstance(l.rewardItemKey,e),r=s.isArray(i)?i:[i];if(!1===await t.addItems(r)){if(""!==t.lastError.message)return c.setError("Rewards process inventory error.",n.ERROR_CODES.REWARD.PROCESS_ITEM,{},t.lastError),!1;let e=Object.keys(r).join(",");return c.setError("Rewards error on add items: "+e+".",n.ERROR_CODES.REWARD.ADD_ITEMS,{itemsKeys:e}),!1}continue}let u=c.inventories[a].findItemByKey(l.rewardItemKey);if(!1===u)return c.setError('Reward item "'+l.rewardItemKey+'" is not present on inventory "'+a+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:l.rewardItemKey,inventoryKeyTo:a}),!1;if(e>u.qty)return c.setError("Reward quantity ("+e+") is bigger than the available in the inventory ("+u.qty+").",n.ERROR_CODES.REWARD.QUANTITY_OVERLOAD,{rewardQuantityTotal:e,rewardInventoryItemQty:u.qty}),!1;let d=i.findItemByKey(l.rewardItemKey);if(!1===d)return r.error("The reward item not longer exists.",h,l.rewardItemKey),!1;let f=t.createItemInstance(l.rewardItemKey,e);if(i.frozenItems[d.uid]=Object.assign({},d),!1===await i.decreaseItemQty(d.uid,l.requiredQuantity))return r.error("There was an error while decreasing the reward item quantity.",l,d),!1;await t.addItem(f)}return!0}}},{bddde17fed05deaa:"idEfG","918bdf09bd16e1b2":"3lwy5"}],"8cYlw":[function(e,t,i){let{ObjectsConst:n}=e("df12497da2e014ac"),{Logger:r,sc:s}=e("bc3fcd89e3b4517e");t.exports.DropsMessageListener=class{static listenMessages(e,t){e.onMessage("*",e=>{let i=s.get(e,n.DROPS.KEY,!1);i&&this.loadObjects(i,t),n.DROPS.REMOVE===e.act&&this.removeDropById(e.id,t)})}static loadObjects(e,t){let i=t.getActiveScene(),n=t.config,r=t.getFeature("objects"),s=i.load;if(!this.validateParams({currentScene:i,gameConfig:n,objectPlugin:r,loader:s}))return!1;for(let[t,a]of Object.entries(e))this.loadSpritesheet(a,s,n),s.once("complete",async e=>{await this.createDropAnimation(r,a,t,i)});return s.start(),!0}static async createDropAnimation(e,t,i,r){let s={type:n.DROPS.PICK_UP_ACT,enabled:!0,ui:!0,frameStart:t[n.DROPS.PARAMS].start,frameEnd:t[n.DROPS.PARAMS].end,repeat:t[n.DROPS.PARAMS].repeat,autoStart:!0,key:i,id:i,targetName:"",layerName:i,isInteractive:!0,asset_key:t[n.DROPS.ASSET_KEY],x:t.x,y:t.y,yoyo:t[n.DROPS.PARAMS].yoyo};return await e.createAnimationFromAnimData(s,r)}static loadSpritesheet(e,t,i){t.spritesheet(e[n.DROPS.ASSET_KEY],this.getSpritesheetPath(e),this.getRewardFrameConfig(e[n.DROPS.PARAMS],i))}static getRewardFrameConfig(e,t){return{frameWidth:s.get(e,"frameWidth",t.getWithoutLogs("client/map/dropsTile/width",t.get("client/map/tileData/width"))),frameHeight:s.get(e,"frameHeight",t.getWithoutLogs("client/map/dropsTile/height",t.get("client/map/tileData/height")))}}static getSpritesheetPath(e){return n.DROPS.ASSETS_PATH+e[n.DROPS.FILE]}static removeDropById(e,t){if(!e)return!1;let i=t.activeRoomEvents.getActiveScene(),n=s.get(i.objectsAnimations,e,!1);if(!n)return!1;n.sceneSprite.destroy(),delete i.objectsAnimations[e]}static validateParams(e){let t=!0;return s.get(e,"currentScene",!1)||(r.error("Scene is undefined in Rewards Message Listener."),t=!1),s.get(e,"gameConfig",!1)||(r.error("Game Config is undefined in Rewards Message Listener."),t=!1),s.get(e,"objectPlugin",!1)||(r.error("Object Plugin is undefined in Rewards Message Listener."),t=!1),s.get(e,"loader",!1)||(r.error("Loader is undefined in Rewards Message Listener."),t=!1),t}}},{df12497da2e014ac:"izuLV",bc3fcd89e3b4517e:"3lwy5"}],hznMs:[function(e,t,i){t.exports={objects:{npcInvalid:"I do not understand.",trader:{content:"Hi there! What would you like to do?",options:{buy:"Buy",sell:"Sell"},buyConfirmed:"Thanks for buying!",sellConfirmed:"Thanks for your products!"}}}},{}],bzImH:[function(e,t,i){let{GameConst:n}=e("d90cf3ac18adcc93"),{Logger:r,sc:s}=e("981fc13f3ba6a83c");t.exports.UserInterface=class{constructor(e,t,i="/assets/html/dialog-box.html",n){this.events=e.events,this.gameDom=e.gameDom,this.initialTitle="",this.initialContent="",this.id=t.id,this.animProps=t,this.template=i,this.uiPositionKey=n||"default",this.openButton=null,this.closeButton=null,this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforePreload",e=>{this.preloadUiElement(e)}),this.events.on("reldens.createPreload",(e,t)=>{this.createUiElement(t)})}preloadUiElement(e){this.template&&e.load.html(this.id,this.template)}createUiElement(e,t=""){""===t&&(t=this.id);let i="box-"+this.id;if(s.get(e.elementsUi,this.id))return this;let n=this.createDialogBox(e,t);this.createBoxContent(e,t,n);let a=this.gameDom.getElement(".ui-box.ui-dialog-box",n.node);return a?(a.id=i,a.classList.add("type-"+(this.animProps?.type||"dialog-box")),this.activateOpenButton(n,a,e),this.activateCloseButton(n,a,e),e.userInterfaces[this.id]=this,e.elementsUi[this.id]=n,this):(r.critical('Missing dialog container for template key: "'+t+'".',{dialogBox:n,dialogContainer:a,objectElementId:i}),!1)}createDialogBox(e,t){let{newWidth:i,newHeight:n}=e.gameManager.gameEngine.getCurrentScreenSize(e.gameManager),{uiX:r,uiY:s}=e.getUiPosition(this.uiPositionKey,i,n);return e.add.dom(r,s).createFromCache(t)}createBoxContent(e,t,i){let n=e.cache.html.get(t);i.innerHTML=e.gameManager.gameEngine.parseTemplate(n,{title:this.initialTitle,content:this.initialContent})}activateOpenButton(e,t,i){return this.openButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_OPEN,e.node),!!this.openButton&&(this.openButton.id=n.UI_BOX+n.UI_OPEN+"-"+this.id,this.openButton.addEventListener("click",()=>{s.get(this.animProps,"defaultOpen",!0)&&(t.style.display="block",this.openButton.style.display="none",!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(this.animProps.depth)),s.isFunction(this.animProps.openCallBack)&&this.animProps.openCallBack(),this.events.emit("reldens.openUI",{ui:this,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})}),this.openButton)}activateCloseButton(e,t,i){if(this.closeButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_CLOSE,e.node),!this.closeButton)return!1;this.closeButton.id=n.UI_BOX+n.UI_CLOSE+"-"+this.id,this.closeButton.addEventListener("click",()=>{s.hasOwn(this.animProps,"sendCloseMessage")&&!1!==this.animProps.sendCloseMessage||i.gameManager.activeRoomEvents.send({act:n.CLOSE_UI_ACTION,id:this.id}),s.get(this.animProps,"defaultClose",!0)&&(t.style.display="none",this.openButton&&(this.openButton.style.display="block"),!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(1)),s.isFunction(this.animProps.closeCallback)&&this.animProps.closeCallback(),this.events.emit("reldens.closeUI",{ui:this,closeButton:this.closeButton,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})})}}},{d90cf3ac18adcc93:"93TbC","981fc13f3ba6a83c":"3lwy5"}],"83Jlt":[function(e,t,i){let{InventoryUi:n}=e("3dbcaecc16a8d7f6"),{InventoryReceiver:r}=e("1b246d1f86d4b52c"),{TradeTargetAction:s}=e("e34196023b491a43"),{TradeMessageListener:a}=e("4891eeec00749c11"),{UserInterface:o}=e("c8568ca446361435"),{PluginInterface:h}=e("f9e95a5e7b3e4385"),{TemplatesHandler:c}=e("9a0084a090b55a0d"),{TranslationsMapper:l}=e("3a8304cb1916a776"),u=e("26049dfb393d7854"),{InventoryConst:d}=e("5532f77de2576b30"),{ItemsEvents:f,ItemsConst:p}=e("75f9030ce424b588"),{GameConst:g}=e("28a98a79420c2754"),{Logger:m,sc:v}=e("ddf286423098af38");t.exports.InventoryPlugin=class extends h{setup(e){this.gameManager=v.get(e,"gameManager",!1),this.gameManager||m.error("Game Manager undefined in InventoryPlugin."),this.events=v.get(e,"events",!1),this.events||m.error("EventsManager undefined in InventoryPlugin."),this.tradeTargetAction=new s,this.setTradeUi(),this.listenEvents(),this.setListener(),this.setTranslations()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,u,d.MESSAGE.DATA_VALUES)}setTradeUi(){if(!this.gameManager)return!1;this.tradeUi=new o(this.gameManager,{id:"trade",type:"trade"})}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.trade=new a}listenEvents(){if(!this.events)return!1;this.events.on("reldens.playersOnAdd",(e,t,i,n)=>{this.onPlayerAdd(t,n,e)}),this.events.on("reldens.preloadUiScene",e=>{c.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>this.onPreloadUiScene(e)),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{this.tradeTargetAction.showTargetExchangeAction(this.gameManager,t,i,n)})}onPreloadUiScene(e){this.uiManager=new n(e),this.uiManager.createUi();let t=e.getUiElement("inventory").getChildByProperty("id",d.INVENTORY_ITEMS);if(!t)return m.error("Inventory UI not found.",t),!1;let i=e.getUiElement("equipment").getChildByProperty("id",d.EQUIPMENT_ITEMS);if(!i)return m.error("Equipment UI not found.",i),!1;let r=e.gameManager.inventory.manager,s=v.get(r,"groups",{});if(Object.keys(s).length)for(let t of(e.gameManager.gameDom.getElement("#"+d.EQUIPMENT_ITEMS).innerHTML="",this.sortGroups(s))){let i=this.createGroupBox(s[t],e.gameManager,e);e.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}let a=v.get(r,"items",{}),o=Object.keys(a);if(0{t.gameManager.inventory.processMessage(e)})}createInventoryInstance(e,t){let i={owner:e,ownerIdProperty:"sessionId",gameManager:t.gameManager},n=t.gameManager.config.getWithoutLogs("client/customClasses/inventory/items",{});n&&0{let s=this.createItemBox(r,"inventoryItem",n,e);n.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(t,r.getInventoryId(),r,e)},n.inventory.manager.getOwnerUniqueEventKey("addItemPack"),r),n.inventory.manager.listenEvent(f.SET_ITEMS,n=>{for(let r of(t.innerHTML="",Object.keys(n.items))){let s=n.items[r];this.displayItem(s,e,i,t,r)}},n.inventory.manager.getOwnerUniqueEventKey("setItemsPack"),r),n.inventory.manager.listenEvent(f.MODIFY_ITEM_QTY,t=>{e.getUiElement("inventory").getChildByID("item-qty-"+t.getInventoryId()).innerHTML=t.qty},n.inventory.manager.getOwnerUniqueEventKey("modifyItemQtyPack"),r),n.inventory.manager.listenEvent(f.REMOVE_ITEM,(t,i)=>{e.getUiElement("inventory").getChildByID("item-"+i).remove()},n.inventory.manager.getOwnerUniqueEventKey("removeItemPack"),r),n.inventory.manager.listenEvent(f.SET_GROUPS,r=>{let s=!1,a=n.gameDom.getElement("#"+d.EQUIPMENT_ITEMS);for(let t of(""!==a.innerHTML&&(s=!0),a.innerHTML="",this.sortGroups(r.groups))){let i=this.createGroupBox(r.groups[t],n,e);n.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}s&&this.resetEquippedItemsDisplay(n,e,i,t)},n.inventory.manager.getOwnerUniqueEventKey("setGroupsPack"),r),n.inventory.manager.listenEvent(f.EQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("equipItemPack"),r),n.inventory.manager.listenEvent(f.UNEQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("unequipItemPack"),r)}resetEquippedItemsDisplay(e,t,i,n){let r=Object.keys(e.inventory.manager.items);if(0===r.length)return!1;for(let s of r){let r=e.inventory.manager.items[s];this.isEquipped(r)&&this.displayItem(r,t,i,n,r.getInventoryId())}}displayItem(e,t,i,n,r){let s=this.createItemBox(e,"inventoryItem",t.gameManager,t),a=t.gameManager.gameDom.getElement("#item-"+e.getInventoryId());if(a&&a.remove(),this.isEquipped(e)){let n=this.getGroupById(e.group_id,t.gameManager.inventory.manager.groups);n&&t.gameManager.gameDom.getElement("#group-item-"+n.key+" .equipped-item")?t.gameManager.gameDom.updateContent("#group-item-"+n.key+" .equipped-item",s):t.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,s),this.setupButtonsActions(i,r,e,t)}else t.gameManager.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(n,r,e,t)}updateEquipmentStatus(e,t){let i=t.gameDom.getElement("#item-equip-"+e.idx),n=e.equipped?"equipped":"unequipped";i.src="/assets/features/inventory/assets/"+n+g.FILES.EXTENSIONS.PNG}createItemBox(e,t,i,n){let r=n.cache.html.get(t);return i.gameEngine.parseTemplate(r,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,usable:this.isUsable(e)?this.getUsableContent(e,i,n):"",equipment:this.isEquipment(e)?this.getEquipContent(e,i,n):""})}isEquipment(e){return e.isType(p.TYPES.EQUIPMENT)||e.isType(p.TYPES.SINGLE_EQUIPMENT)}isEquipped(e){return this.isEquipment(e)&&!0===e.equipped}isUsable(e){return e.isType(p.TYPES.USABLE)||e.isType(p.TYPES.SINGLE_USABLE)}sortGroups(e){return Object.keys(e).sort((t,i)=>e[t].sort>e[i].sort?1:-1)}createGroupBox(e,t,i){let n=i.cache.html.get("inventoryGroup");return t.gameEngine.parseTemplate(n,{key:e.key,label:e.label,description:e.description,fileName:e.files_name})}setupButtonsActions(e,t,i,n){let r=n.gameManager.gameDom,s=e.querySelector("#item-"+t+" .image-container img");if(!s)return m.error(["Missing image element.","#item-"+t]),!1;s.addEventListener("click",()=>{let i=e.querySelector("#item-"+t+" .item-data-container"),n=!1;"block"!==i.style.display&&(n=!0),e.querySelectorAll(".item-box .image-container img").forEach(function(e){e.style.border="none"}),e.querySelectorAll(".item-data-container").forEach(function(e){e.style.display="none"}),n&&(s.style.border="1px solid #fff",i.style.display="block")});let a=e.querySelector("#item-trash-"+t+" img");if(!a)return m.error(["Missing button.",a]),!1;a.addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="block"}),e.querySelector("#trash-cancel-"+t).addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="none"}),e.querySelector("#trash-confirmed-"+t).addEventListener("click",()=>{let e={idx:t,act:d.ACTIONS.REMOVE};n.gameManager.activeRoomEvents.send(e)}),this.isUsable(i)&&r.getElement("#item-use-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.USE,n)),this.isEquipment(i)&&r.getElement("#item-equip-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.EQUIP,n))}clickedBox(e,t,i){i.gameManager.activeRoomEvents.send({act:t,idx:e})}getUsableContent(e,t,i){let n=i.cache.html.get("inventoryItemUse");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId()})}getEquipContent(e,t,i){let n=i.cache.html.get("inventoryItemEquip");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId(),equipStatus:e.equipped?"equipped":"unequipped"})}getGroupById(e,t){let i=Object.keys(t);if(0===i.length)return!1;for(let n of i)if(t[n].id===e)return t[n]}}},{"3dbcaecc16a8d7f6":"i4XYr","1b246d1f86d4b52c":"ecHHP",e34196023b491a43:"2sgZT","4891eeec00749c11":"7M3Uu",c8568ca446361435:"bzImH",f9e95a5e7b3e4385:"fC3To","9a0084a090b55a0d":"hZf8u","3a8304cb1916a776":"1fcQw","26049dfb393d7854":"1SpFi","5532f77de2576b30":"19bl6","75f9030ce424b588":"g4GOK","28a98a79420c2754":"93TbC",ddf286423098af38:"3lwy5"}],i4XYr:[function(e,t,i){let{UiFactory:n}=e("77ab18c1eefc2684"),{InventoryConst:r}=e("55720af454786e61");t.exports.InventoryUi=class extends n{createUi(){this.create("inventory",5,!0,!0,null,()=>{this.inventoryVisibility("inventory")}),this.create("equipment",4,!0,!0,null,()=>{this.inventoryVisibility("inventory")})}inventoryVisibility(e){let t="#"+r[e+"_ITEMS"];for(let e of this.gameManager.gameDom.getElements(t+" .item-box .image-container img"))e.style.border="none";for(let e of this.gameManager.gameDom.getElements(t+" .item-data-container"))e.style.border="none"}}},{"77ab18c1eefc2684":"k6PNR","55720af454786e61":"19bl6"}],k6PNR:[function(e,t,i){let{GameConst:n}=e("33c9292d731c7911");t.exports.UiFactory=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager}create(e,t,i,r,s,a){let{uiX:o,uiY:h}=this.uiScene.getUiConfig(e),c=this.uiScene.add.dom(o,h).createFromCache(e),l=c.getChildByProperty("id",e+n.UI_OPEN),u=c.getChildByProperty("id",e+n.UI_CLOSE);l?.addEventListener("click",()=>{let n=c.getChildByProperty("id",e+"-ui");i&&(n&&(n.style.display="block"),l.style.display="none",c.setDepth(t)),s&&"function"==typeof s&&s(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:l,dialogBox:c,dialogContainer:n,uiScene:this.uiScene})}),u?.addEventListener("click",()=>{let t=c.getChildByProperty("id",e+"-ui");r&&(t&&(t.style.display="none"),c.setDepth(1),l&&(l.style.display="block")),a&&"function"==typeof a&&a(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:u,openButton:l,dialogBox:c,dialogContainer:t,uiScene:this.uiScene})}),this.uiScene.elementsUi[e]=c}}},{"33c9292d731c7911":"93TbC"}],"19bl6":[function(e,t,i){t.exports.InventoryConst={INVENTORY_ITEMS:"inventory-items",INVENTORY_OPEN:"inventory-open",INVENTORY_CLOSE:"inventory-close",EQUIPMENT_ITEMS:"equipment-items",EQUIPMENT_CLOSE:"equipment-close",EQUIPMENT_OPEN:"equipment-open",ANIMATION_KEY_PREFIX:"aK_",GROUP_BUCKET:"/assets/custom/groups",ACTIONS:{PREFIX:"ivp",REMOVE:"ivpRm",USE:"ivpUse",EQUIP:"ivpEqi",TRADE_START:"ivptStart",TRADE_ACCEPTED:"ivptAccepted",TRADE_SHOW:"ivptShow",TRADE_ACTION:"ivptAction"},MESSAGE:{DATA_VALUES:{NAMESPACE:"items"}}}},{}],ecHHP:[function(e,t,i){let{InventoryConst:n}=e("8882a4643448fce8"),{GameConst:r}=e("2bfdc54146457a66"),{Receiver:s}=e("c0cd661b4f31ab90"),{ErrorManager:a,Logger:o,sc:h}=e("86cd80d57b7740fd");t.exports.InventoryReceiver=class extends s{constructor(e){h.hasOwn(e,"gameManager")||a.error("InventoryReceiver gameManager not specified."),super(e),this.gameManager=e.gameManager,this.itemSprites={},this.itemsAnimations={}}onExecuting(e){let t=e.item;if(!h.hasOwn(t,"animationData"))return o.warning("Item does not contain animation data.",e),!1;let i=n.ANIMATION_KEY_PREFIX+t.key,s=this.gameManager.getActiveScene();if(this.itemSprites[i]&&this.itemSprites[i].anims&&s.anims.get(i))return o.debug("Animation already exists, playing: "+i),this.playSpriteAnimation(i,t),!1;s.load.spritesheet(i,"/assets/custom/sprites/"+t.key+r.FILES.EXTENSIONS.PNG,{frameWidth:t.animationData.frameWidth||64,frameHeight:t.animationData.frameHeight||64}).on("loaderror",e=>{o.error("Sprite load error: "+i,e)}),s.load.on("complete",()=>{o.debug("Scene load complete, playing: "+i),this.createItemSprites(i,t,e,s)}),s.load.start()}createItemSprites(e,t,i,n){let r=this.extractTargetId(t,i,n);if(!r)return o.error("Target ID not found."),!1;let s=h.get(n.player.players,r,!1);if(!s)return o.error("Player sprite not found by target ID."),!1;let a=n.anims.get(e);a||(o.debug("Creating new animation on scene: "+e),a=n.anims.create({key:e,frames:n.anims.generateFrameNumbers(e,{start:t.animationData.start||0,end:t.animationData.end||1}),frameRate:h.get(t.animationData,"frameRate",n.configuredFrameRate),repeat:t.animationData.repeat||3,hideOnComplete:h.get(t.animationData,"hide",!0),showOnStart:h.get(t.animationData,"showOnStart",!0)})),this.itemsAnimations[e]=a;let c=h.get(t.animationData,"fixedX",t.animationData.usePlayerPosition?s.x:0),l=h.get(t.animationData,"fixedY",t.animationData.usePlayerPosition?s.y:0);this.itemSprites[e]=n.physics.add.sprite(c,l,e),this.itemSprites[e]=this.itemSprites[e].setDepth(9e4),this.itemSprites[e].depthByPlayer="above",t.animationData.followPlayer&&(s.moveSprites[e]=this.itemSprites[e]),o.debug("Playing sprite: "+e),this.playSpriteAnimation(e,t).on("animationcomplete",()=>{t.animationData.destroyOnComplete&&this.destroyAnimation(t,e,s)})}playSpriteAnimation(e,t){h.get(t.animationData,"closeInventoryOnUse",!1)&&this.gameManager.gameDom.getElement("#inventory-close")?.click();let i=this.itemSprites[e].anims;return i?(i.visible=!0,i.play(e,h.get(t.animationData,"ignoreIfPlaying",!0))):(o.error("Sprite animation not found: "+e),!1)}destroyAnimation(e,t,i){this.itemSprites[t].destroy(),delete this.itemSprites[t],delete this.itemsAnimations[t],e.animationData.followPlayer&&delete i.moveSprites[t],o.debug("Animation and sprite destroyed: "+t)}extractTargetId(e,t,i){return e.animationData.startsOnTarget&&t.target?.playerId?t.target.playerId:i.player?.playerId||!1}}},{"8882a4643448fce8":"19bl6","2bfdc54146457a66":"93TbC",c0cd661b4f31ab90:"g4GOK","86cd80d57b7740fd":"3lwy5"}],"2sgZT":[function(e,t,i){let{InventoryConst:n}=e("6fd8a45050899827"),{GameConst:r}=e("27ccb472a3005f7d"),{Logger:s,sc:a}=e("b754ab6e7b18af41");t.exports.TradeTargetAction=class{showTargetExchangeAction(e,t,i,o){if(r.TYPE_PLAYER!==t.type||e.getCurrentPlayer().playerId===t.id)return!1;let h=e.gameEngine.uiScene;if(!1===a.get(h,"uiTarget",!1))return!1;let c=h.cache.html.get("inventoryTradeStart");if(!c)return s.critical('Template "inventoryTradeStart" not found.'),!1;e.gameDom.appendToElement("#target-container",e.gameEngine.parseTemplate(c,{playerName:o,playerId:t.id}));let l=e.gameDom.getElement(".start-trade-"+t.id+" button");if(!l)return s.critical('Trade start button not found for selector: ".start-trade-'+t.id+' button"'),!1;l.addEventListener("click",()=>{let i={act:n.ACTIONS.TRADE_START,id:t.id};e.activeRoomEvents.send(i)})}}},{"6fd8a45050899827":"19bl6","27ccb472a3005f7d":"93TbC",b754ab6e7b18af41:"3lwy5"}],"7M3Uu":[function(e,t,i){let{TradeMessageHandler:n}=e("f964b12ccb83d2b4"),{Logger:r,sc:s}=e("8a7eb9c3e6d9d186");t.exports.TradeMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on TradeMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on TradeMessageListener.",e),!1;new n({roomEvents:i,message:t}).updateContents()}}},{f964b12ccb83d2b4:"kzLY7","8a7eb9c3e6d9d186":"3lwy5"}],kzLY7:[function(e,t,i){let{ErrorManager:n,Logger:r,sc:s}=e("779d25f0124f02f2"),{InventoryConst:a}=e("58803c0e08c63617"),{ObjectsConst:o}=e("3ddb9dce645de8c3"),{UserInterface:h}=e("c49942f179cbbc0a");t.exports.TradeMessageHandler=class{constructor(e){this.roomEvents=s.get(e,"roomEvents",!1),this.message=s.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.validate()}validate(){this.roomEvents||n.error("Missing RoomEvents."),this.message||n.error("Missing message."),this.gameManager||n.error("Missing GameManager."),this.uiScene||n.error("Missing UiScene."),this.itemsManager||n.error("Missing ItemsManager.")}updateContents(){return a.ACTIONS.TRADE_START===this.message.act?this.showTradeRequest():a.ACTIONS.TRADE_SHOW===this.message.act?this.showTradeBox():void 0}showTradeRequest(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.config.getWithoutLogs("client/trade/titles/tradeRequestFromLabel","Trade request from:"),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:a.ACTIONS.TRADE_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-"+e)?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+e)?.click()})}showTradeBox(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.services.translator.t("items.tradeWith",{playerName:this.message.with}),content:"",options:{}});let t=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!t)return r.error('Missing container: "#box-'+e+' .box-content".'),!1;if(!0===this.message.isTradeEnd)return this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click(),!0;let i=s.get(this.message,"items",!1),n=s.get(this.message,"traderItemsData",{}),a=s.get(this.message,"exchangeData",{}),o=s.get(this.message,"playerToExchangeKey",{}),h="A"===o?"B":"A";this.updateItemsList(i,t,a[h]),this.updateMyExchangeData(a[h]||{},i,h),this.updateTraderExchangeData(a[o]||{},n,o)}createTradeUi(e){let t=s.get(this.roomEvents.tradeUi,e);return t||(this.roomEvents.tradeUi[e]=new h(this.gameManager,{id:e,type:"trade"},"/assets/html/dialog-box.html","trade"),this.roomEvents.tradeUi[e].createUiElement(this.uiScene,"trade")),t}updateItemsList(e,t,i){if(!e)return;let n="",r={};for(let t of Object.keys(e)){let a=e[t],o=Object.assign({manager:this.itemsManager},a,{uid:t}),h=s.get(this.itemsManager.itemClasses,o.key,this.itemsManager.types.classByTypeId(o.type));r[t]=new h(o),r[t].quantityDisplay=1,r[t].quantityMaxDisplay=Math.max(r[t].qty_limit,a.qty),r[t].tradeAction="trade",n+=this.createTradeItemBox(r[t],s.get(i,r[t].uid,!1))}t.innerHTML=this.createTradeContainer(n),this.activateItemsBoxActions(r),this.activateConfirmButtonAction()}activateConfirmButtonAction(){let e=this.gameManager.gameDom.getElement(".confirm-"+this.message.id);e?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.CONFIRM})});let t=this.gameManager.gameDom.getElement(".disconfirm-"+this.message.id);t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.DISCONFIRM})});let i=this.gameManager.gameDom.getElement(".cancel-"+this.message.id);i?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click()})}updateMyExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createConfirmItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-2");return s?(s.innerHTML=n,this.assignRemoveActions(e,t),!0):(r.error('Missing "'+i+'" items container.'),!1)}updateTraderExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createReceivingItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-3");return s?(s.innerHTML=n,!0):(r.error('Missing "'+i+'" items container.'),!1)}createConfirmItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on confirmation trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:this.createTradeActionRemove(a),tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}createReceivingItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on receive trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:"",tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}assignRemoveActions(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on remove trade-message-handler.",{message:this.message}),!1;for(let e of i){let i=".pushed-to-trade .trade-item-"+e,n=this.gameDom.getElement(i);if(!n){r.error('Assign trade item "'+e+'" container not found.');continue}let s=this.gameDom.getElement(".pushed-to-trade .trade-item-"+e+" .trade-action-remove");if(!s){r.error('Assign trade item "'+e+'" remove button not found.');continue}let h=t[e];s.addEventListener("click",()=>{n.classList.remove("hidden");let t={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:"remove",itemId:e,itemKey:h.key};t[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e){let t=this.uiScene.cache.html.get("inventoryTradePlayerContainer");if(!t)return r.error('Missing template "inventoryTradeContainer".'),"";let i=o.TRADE_ACTIONS_FUNCTION_NAME,n={tradeActionKey:this.message.id,confirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/confirmLabel",i.CONFIRM),disconfirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/disconfirmLabel",i.DISCONFIRM),cancelLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/cancelLabel",i.CANCEL),myItems:e,myItemsTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/myItems","My Items:"),pushedToTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/pushedToTradeTitle","Sending:"),gotFromTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/gotFromTradeTitle","Receiving:"),playerConfirmedLabel:this.playerConfirmedLabel()};return this.gameManager.gameEngine.parseTemplate(t,n)}playerConfirmedLabel(){return this.message.playerConfirmed?this.gameManager.config.getWithoutLogs("client/trade/titles/playerConfirmedLabel","%playerName CONFIRMED").replace("%playerName",this.message.with):""}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return r.error('Missing template "inventoryTradeItem".'),"";let n=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!n)return r.error('Missing template "inventoryTradeItemQuantity".'),"";let s=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}}},{"779d25f0124f02f2":"3lwy5","58803c0e08c63617":"19bl6","3ddb9dce645de8c3":"izuLV",c49942f179cbbc0a:"bzImH"}],hZf8u:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/inventory/templates/";e.load.html("inventory",t+"ui-inventory.html"),e.load.html("equipment",t+"ui-equipment.html"),e.load.html("inventoryItem",t+"item.html"),e.load.html("inventoryItemUse",t+"usable.html"),e.load.html("inventoryItemEquip",t+"equip.html"),e.load.html("inventoryGroup",t+"group.html"),e.load.html("inventoryTradeContainer",t+"trade-container.html"),e.load.html("inventoryTradePlayerContainer",t+"trade-player-container.html"),e.load.html("inventoryTradeRequirements",t+"trade-requirements.html"),e.load.html("inventoryTradeRewards",t+"trade-rewards.html"),e.load.html("inventoryTradeAction",t+"trade-action.html"),e.load.html("inventoryTradeActionRemove",t+"trade-action-remove.html"),e.load.html("inventoryTradeItem",t+"trade-item.html"),e.load.html("inventoryTradeItemQuantity",t+"trade-item-quantity.html"),e.load.html("inventoryTradeStart",t+"trade-start.html"),e.load.html("inventoryTradeAccept",t+"trade-accept.html")}}},{}],"1SpFi":[function(e,t,i){t.exports={items:{undefinedItem:"Add item error, undefined item.",undefinedMethodInventoryId:"Add item error, undefined getInventoryId.",undefinedItemKey:"Add item error, undefined item key.",invalidItemInstance:"Invalid item instance.",lockedForAddItem:"Inventory locked, cannot add item: %itemUid",maxTotalReachedForAddItem:"Cannot add item, max total reached.",itemExistsForAddItem:"Cannot add item, item already exists: %itemUid",itemLimitExceededForAddItem:"Cannot add item, item qty limit exceeded.",addItemsError:'Cannot add item "%itemUid".',lockedForSetItem:"Inventory locked, cannot set item: %itemUid.",lockedForRemoveItem:"Inventory locked, cannot remove item: %itemUid.",keyNotFound:"Cannot remove item, key not found: %itemUid.",lockedForModifyItemQty:"Inventory locked, cannot modify item qty: %itemUid.",undefinedItemKeyForOperation:'Cannot "%operation" item qty, undefined item key: %itemUid.',qtyNotANumber:'Cannot "%operation" item qty, quantity is not a number: %qty.',itemQtyLimitExceeded:'Cannot "%operation" item qty, item qty limit exceeded: %qty > %limitPerItem.',lockedForSetItems:"Inventory locked, cannot set items.",tradeWith:"Trading with %playerName",exchange:{missingConfirmation:"Missing confirmation.",invalidPushedQuantity:"Invalid item pushed quantity (%qty), available: %pushedItemQty.",invalidQuantity:"Invalid item quantity 0.",invalidExchange:'Inventories "FROM" and "TO" are the same, exchange cancelled.',decreaseQuantity:"Exchange inventory decrease error.",itemAdd:"Exchange add inventory result error."},requirements:{itemNotPresent:'Required item "%requiredItemKey" is not present.',quantityNotAvailable:'Required item "%requiredItemKey" quantity %totalRequiredQuantity is not available.',itemNotPushed:'Required item "%requiredItemKey" was not pushed for exchange.',itemQuantityNotPushed:'Required item "%requiredItemKey" quantity %totalRequiredQuantity was not pushed for exchange.',itemDoesNotExists:'Requirement error, item "%itemUid" does not exits on inventory.',itemAdd:"Requirement add item error."},reward:{doesNotExists:'Reward error, item "%itemUid" does not exits.',missingItem:'Reward error, item "%itemUid" does not exits.',itemNotPresent:'Reward item "%rewardItemKey" is not present on inventory.',quantityNotAvailable:"Reward item %rewardItemKey reward quantity (%rewardQuantity) is not available.",missingPushed:'Missing pushed for exchange item "%itemUid".',getItemDoesNotExists:'Reward error, item "%itemUid" does not exits on inventory.',processItem:'Process item reward error, item "%itemUid".',processInventory:"Rewards process inventory error.",addItems:"Rewards error on add items: %itemsKeys.",quantityOverload:"Reward quantity (%rewardQuantityTotal) is bigger than the available in the inventory (%rewardInventoryItemQty)."},equipment:{modifiersApply:"Cannot apply modifiers the item is not equipped: %itemUid",modifiersRevert:"Cannot revert modifiers the item is not equipped: %itemUid"}}}},{}],enPaX:[function(e,t,i){let{SkillsUi:n}=e("6b2d3727d1d70b78"),{PluginInterface:r}=e("c34bb8f0c81f8738"),{PlayerSelector:s}=e("566ebfe7409d2a3a"),{PreloaderHandler:a}=e("7af81ec0e9446267"),{MessagesHandler:o}=e("699da6696693061c"),{GameManagerEnricher:h}=e("c162e687344f571d"),c=e("37b783bb3d5ca68"),{TranslationsMapper:l}=e("f892bc1afce6c5ea"),{ActionsConst:u}=e("dbdea295dce66b04"),{Logger:d,sc:f}=e("1ad70aa0a704e98c");t.exports.ActionsPlugin=class extends r{setup(e){this.gameManager=f.get(e,"gameManager",!1),this.gameManager||d.error("Game Manager undefined in ActionsPlugin."),this.events=f.get(e,"events",!1),this.events||d.error("EventsManager undefined in ActionsPlugin."),this.playerSelector=new s(e),this.preloaderHandler=new a(e),this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,c,u.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager)return!1;this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createPreload",e=>{this.preloaderHandler.createAnimations(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi()}),this.events.on("reldens.beforeCreateEngine",e=>{this.playerSelector.populateClassesSelector(f.get(e,"classesData",{}),e.gameConfig.client.players,e.player)}),this.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{o.processOrQueueMessage(e,this.gameManager)})}),this.events.on("reldens.playersOnAddReady",e=>{h.withReceiver(e.player,e.roomEvents,this.gameManager)})}}},{"6b2d3727d1d70b78":"fKq6g",c34bb8f0c81f8738:"fC3To","566ebfe7409d2a3a":"6tkLj","7af81ec0e9446267":"asAAa","699da6696693061c":"gldsT",c162e687344f571d:"4okuX","37b783bb3d5ca68":"8JSjE",f892bc1afce6c5ea:"1fcQw",dbdea295dce66b04:"59VA7","1ad70aa0a704e98c":"3lwy5"}],fKq6g:[function(e,t,i){let{ActionsConst:n}=e("fcb0bd426e0a1381");t.exports.SkillsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.defaultAction=this.gameManager.config.get("client/ui/controls/defaultActionKey")}createUi(){let e=n.SELECTORS.UI_PLAYER_EXTRAS;this.appendToUiContainer(e,"skillsClassPath"),this.appendToUiContainer(e,"skillsLevel"),this.appendToUiContainer(e,"skillsExperience",{experienceLabel:this.gameManager.services.translator.t(n.SNIPPETS.EXPERIENCE_LABEL)}),this.createUiBox("skills",7)}appendSkills(e){let t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t!==this.defaultAction&&this.createSkillBox(t)}}appendToUiContainer(e,t,i={}){let n=this.uiScene.cache.html.get(t);0{let t=e.options[e.selectedIndex].dataset.key;n.style.backgroundImage=`url('/assets/custom/sprites/${t}${r.FILES.EXTENSIONS.PNG}')`}),t.append(n)}}},{b243e92bb3fe291b:"59VA7","99fe71ca25218501":"93TbC","350db309ac69e57e":"3lwy5"}],asAAa:[function(e,t,i){let{Logger:n,sc:r}=e("282e615b5cb3f89e"),{GameConst:s}=e("1d3a9c826831f334");t.exports.PreloaderHandler=class{constructor(e){this.gameManager=r.get(e,"gameManager",!1),this.gameManager||n.error("Game Manager undefined in ActionsPlugin PreloaderHandler."),this.events=r.get(e,"events",!1),this.events||n.error("EventsManager undefined in ActionsPlugin PreloaderHandler."),this.setProperties(e)}setProperties(e){if(!this.gameManager)return!1;this.gameDom=this.gameManager.gameDom,this.initialGameData=this.gameManager.initialGameData,this.levelsAnimConfig=this.gameManager.config.get("client/levels/animations"),this.skillsAnimConfig=this.gameManager.config.get("client/skills/animations"),this.assetsCustomActionsSpritesPath=r.get(e,"assetsCustomActionsSpritesPath","assets/custom/actions/sprites/"),this.gameManager.loadedAssets||(this.gameManager.loadedAssets={}),this.gameManager.createdAnimations||(this.gameManager.createdAnimations={})}loadContents(e){e.load.html("skillsClassPath","/assets/features/skills/templates/ui-class-path.html"),e.load.html("skillsLevel","/assets/features/skills/templates/ui-level.html"),e.load.html("skillsExperience","/assets/features/skills/templates/ui-experience.html"),e.load.html("skills","/assets/features/skills/templates/ui-skills.html"),e.load.html("skillBox","/assets/features/skills/templates/ui-skill-box.html"),e.load.html("actionBox","/assets/html/ui-action-box.html"),this.preloadClassPaths(e),this.loopAnimationsAnd(this.levelsAnimConfig,"preload",e),this.loopAnimationsAnd(this.skillsAnimConfig,"preload",e)}preloadClassPaths(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return!1;for(let i of Object.keys(t)){let n=t[i].key;e.load.spritesheet(n,"/assets/custom/sprites/"+n+s.FILES.EXTENSIONS.PNG,e.playerSpriteSize).on("filecomplete",async e=>{this.gameManager.loadedAssets[e]=e})}}createAnimations(e){let t=this.levelsAnimConfig;this.loopAnimationsAnd(t,"create",e);let i=this.skillsAnimConfig;this.loopAnimationsAnd(i,"create",e),this.createAvatarsAnimations(e)}createAvatarsAnimations(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return n.debug("Classes data not found. Fallback to player avatar."),!1;for(let i of(this.gameManager.mappedAvatars||(this.gameManager.mappedAvatars={}),n.debug({availableClassesData:t}),Object.keys(t))){let r=t[i].key;this.gameManager.loadedAssets[r]||(r=s.IMAGE_PLAYER,n.info('Avatar for class path "'+r+'" not found in assets. Fallback to player avatar.')),this.gameManager.mappedAvatars[r]=r,e.createPlayerAnimations(r)}return this.gameManager.mappedAvatars}loopAnimationsAnd(e,t,i){if(!e)return n.warning("Animations not found.",e),!1;for(let r of Object.keys(e)){let s=e[r];if(!s.animationData.enabled){n.debug('Animation "'+r+'" not enabled, skipping.',s);continue}n.debug({[t+"Animation"]:s}),this[t+"Animation"](s,i)}}preloadAnimation(e,t){r.hasOwn(e.animationData,["type","img"])&&s.ANIMATIONS_TYPE.SPRITESHEET===e.animationData.type&&this.preloadAnimationsInDirections(e,t),e.classKey&&r.isFunction(e.classKey.prepareAnimation)&&e.classKey.prepareAnimation({data:e,uiScene:t,pack:this})}preloadAnimationsInDirections(e,t){let i=r.get(e.animationData,"dir",0);if(0===i){t.load.spritesheet(this.getAnimationKey(e),this.assetsCustomActionsSpritesPath+e.animationData.img+s.FILES.EXTENSIONS.PNG,e.animationData);return}(1===i||2===i)&&(this.preloadSpriteInDirection(t,e,s.UP),this.preloadSpriteInDirection(t,e,s.DOWN)),(1===i||3===i)&&(this.preloadSpriteInDirection(t,e,s.LEFT),this.preloadSpriteInDirection(t,e,s.RIGHT))}preloadSpriteInDirection(e,t,i){e.load.spritesheet(this.getAnimationKey(t,i),this.assetsCustomActionsSpritesPath+t.animationData.img+"_"+i+s.FILES.EXTENSIONS.PNG,t.animationData)}createAnimation(e,t){if(r.hasOwn(e.animationData,["type","img"])&&e.animationData.type===s.ANIMATIONS_TYPE.SPRITESHEET){let i=r.get(e.animationData,"dir",0);0r&&t[r],a=!1;h.hasOwn(e,s)&&(a=e[s]),h.hasOwn(a,"key")&&a.key-n.key>0&&await this.createAndAutofillLevelsInstances(n,a)}}async createAndAutofillLevelsInstances(e,t){for(let i=e.key+1;ie[i][t]>e[n][t]?1:-1)}async levelUp(){let e=Object.keys(this.levels).pop();if(this.currentLevel>=this.levels[e].key)return!1;this.currentLevel++,await this.applyLevelModifiers(),await this.fireEvent(n.LEVEL_UP,this)}async levelDown(){if(1>=this.currentLevel)return!1;await this.applyLevelModifiers(!0),this.currentLevel--,await this.fireEvent(n.LEVEL_DOWN,this)}async applyLevelModifiers(e){let t=this.getLevelInstance(this.currentLevel);if(!t)return o.error(["Current level instance not found.","Current Level Key:",this.currentLevel]),!1;if(await this.fireEvent(n.LEVEL_APPLY_MODIFIERS,this,t),!t.modifiers)return!1;for(let i of t.modifiers)e?i.revert(this.owner):i.apply(this.owner)}getLevelInstance(e){return h.get(this.levels,e,!1)}async addExperience(e){let t=this.currentExp+e,i=this.levelsByExperience.indexOf(this.currentLevel.toString()),r=i+1,s=this.levelsByExperience[r],a=this.levels[s],o=0,c=!1;if(h.hasOwn(this.levels,this.currentLevel)&&a&&t>=a.requiredExperience){for(let e of this.levelsByExperience.slice(r))if(t>=this.levels[e].requiredExperience&&(c=!0,await this.levelUp()),t=e.modifiers.length)&&r.warning("Level modifiers were not specified.","Level ID:",e.id," - Key:",e.key),this.key=parseInt(e.key),this.modifiers=e.modifiers,this.label=s.get(e,"label",e.key),this.requiredExperience=s.get(e,"requiredExperience",s.get(e,"required_experience",0))}}},{faf9f4d0a81cecea:"3lwy5"}],cBYkx:[function(e,t,i){let n=e("1a8b79feac2da9b0"),r=e("867678cea9a9cfca"),{PropertyManager:s,Condition:a,Calculator:o}=e("2b878b9cf457d0fc"),{InteractionArea:h,EventsManagerSingleton:c,ErrorManager:l,Logger:u,sc:d}=e("cfa6f665a4da61d4");t.exports=class{constructor(e){d.hasOwn(e,"key")||l.error("Missing skill key."),d.hasOwn(e,"owner")||l.error("Missing skill owner."),"function"!=typeof e.owner.getPosition&&l.error("Undefined owner position method."),this.key=e.key,this.owner=e.owner,this.ownerIdProperty=d.get(e,"ownerIdProperty","id"),this.type=n.SKILL.TYPE.BASE,this.customData=d.get(e,"customData",!1),this.autoValidation=d.get(e,"autoValidation",!1),this.skillDelay=d.get(e,"skillDelay",0),this.castTime=d.get(e,"castTime",0),this.owner.isCasting=!1,this.owner.castingTimer=!1,this.isValid=!0,this.usesLimit=d.get(e,"usesLimit",0),this.uses=0,this.canActivate=d.get(e,"canActivate",!0),this.range=d.get(e,"range",0),this.skillActivationTimer=!1,this.lastState="",this.groups=d.get(e,"groups",[]),this.lastAppliedModifiers={},this.rangeAutomaticValidation=d.get(e,"rangeAutomaticValidation",!1),this.rangePropertyX=d.get(e,"rangePropertyX",!1),this.rangePropertyY=d.get(e,"rangePropertyY",!1),this.rangeTargetPropertyX=d.get(e,"rangeTargetPropertyX",!1),this.rangeTargetPropertyY=d.get(e,"rangeTargetPropertyY",!1),this.allowSelfTarget=d.get(e,"allowSelfTarget",!1),this.target=d.get(e,"target",!1),this.events=d.get(e,"events",c),this.ownerConditions=d.get(e,"ownerConditions",[]),this.ownerEffects=d.get(e,"ownerEffects",[]),this.criticalChance=d.get(e,"criticalChance",0),this.criticalMultiplier=d.get(e,"criticalMultiplier",1),this.criticalFixedValue=d.get(e,"criticalFixedValue",0),this.propertyManager=new s,this.calculator=new o}validate(){return(this.isValid=!0,this.fireEvent(r.VALIDATE_BEFORE,this).catch(e=>{u.error(e)}),!this.canActivate||this.owner.isCasting)?(this.lastState=n.SKILL_STATES.CAN_NOT_ACTIVATE,!1):!!this.validateConditions()&&(!(0=this.usesLimit))&&(0{this.canActivate=!0},this.skillDelay)):this.canActivate=!0,this.fireEvent(r.VALIDATE_SUCCESS,this).catch(e=>{u.error(e)}),this.isValid)}validateConditions(){for(let e of this.ownerConditions)if(e instanceof a||l.error(["Wrong Condition instance.",typeof e,"was specified."]),!e.isValidOn(this.owner))return this.fireEvent(r.VALIDATE_FAIL,this,e).catch(e=>{u.error(e)}),!1;return!0}validateRange(e){this.rangePropertyX&&this.rangePropertyY||l.error("Missing range properties for validation.");let t={x:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyX),y:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyY)},i={x:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyX||this.rangePropertyX),y:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyY||this.rangePropertyY)};return this.isInRange(t,i)}isInRange(e,t){if(this.fireEvent(r.SKILL_BEFORE_IN_RANGE,this).catch(e=>{u.error(e)}),0===this.range)return!0;let i=new h;i.setupInteractionArea(this.range,t.x,t.y);let n=i.isValidInteraction(e.x,e.y);return this.fireEvent(r.SKILL_AFTER_IN_RANGE,this,n).catch(e=>{u.error(e)}),n}async execute(e){if(await this.fireEvent(r.SKILL_BEFORE_EXECUTE,this,e),e&&(this.target=e),this.target||l.error("Target undefined."),!this.onExecuteConditions()||await this.isValidRange(e)||this.autoValidation&&!this.validate())return!1;let t=!1;return this.ownerEffects&&(this.applyModifiers(this.ownerEffects,this.owner,!0),await this.fireEvent(r.SKILL_APPLY_OWNER_EFFECTS,this,e)),0{t=this.finishExecution(e),this.owner.isCasting=!1,this.fireEvent(r.SKILL_AFTER_CAST,this,e,t)},this.castTime)):t=await this.finishExecution(e),this.uses++,await this.onExecuteRewards(),await this.fireEvent(r.SKILL_AFTER_EXECUTE,this,e),t}async isValidRange(e){return this.rangeAutomaticValidation&&this.rangePropertyX&&this.rangePropertyY&&!await this.validateRange(e)}async finishExecution(e){await this.fireEvent(r.SKILL_BEFORE_RUN_LOGIC,this,e);let t=await this.runSkillLogic();return await this.fireEvent(r.SKILL_AFTER_RUN_LOGIC,this,e),t}onExecuteConditions(){return!0}async runSkillLogic(){return!0}async onExecuteRewards(){}applyCriticalValue(e){return this.isCritical()&&(this.criticalMultiplier&&(e*=this.criticalMultiplier),this.criticalFixedValue&&(e+=this.criticalFixedValue)),e}getCriticalDiff(e){return this.applyCriticalValue(e)-e}isCritical(){return!(this.criticalChance<=0)&&this.criticalChancet*this.dodgeOverAimSuccess)return this.lastState=s.SKILL_STATES.DODGED,!1;let n=this.getAffectedPropertyValue(e);if(!this.allowEffectBelowZero&&0>=n)return!1;let a=this.getDiffProportion(t,i),o=this.applyDirectDamage?this.hitDamage:this.calculateProportionDamage(e,this.hitDamage,i,t,a);o+=this.calculateCriticalDamage(o,i,t,a);let c=!this.allowEffectBelowZero&&ni?r:(this.lastState=s.SKILL_STATES.APPLIED_CRITICAL_DAMAGE,r-Math.floor(r*n/100))}calculateProportionDamage(e,t,i,n,r){let s=this.getPropertiesTotal(this.owner,this.attackProperties),a=this.getPropertiesTotal(e,this.defenseProperties),o=s-a;if(o>0){let e=o99?99:e)*t/100);t+=i}if(o<0){let e=-o99?99:e)*t/100);t-=i}if(this.damageAffected&&i>n){let e=Math.floor(t*r/100);t-=e}return t}getPropertiesTotal(e,t){if(!e)return h.warning("Missing object to get properties total."),!1;if(0===t.length)return 0;try{let i=0;for(let n of t){let t=this.propertyManager.getPropertyValue(e,n);i=o.hasOwn(this.propertiesTotalOperators,n)?this.calculator.calculateNewValue(i,this.propertiesTotalOperators[n],t):i+t}return i}catch(e){return h.debug(e.message),!1}}getDiffProportion(e,t){return 100*(t-e)/e}getAffectedPropertyValue(e){return this.propertyManager.getPropertyValue(e,this.affectedProperty)}setAffectedPropertyValue(e,t){return this.propertyManager.setOwnerProperty(e,this.affectedProperty,t)}}},{"9dba7a1ed3b87f64":"cBYkx",d7a74c1b6b680357:"9PsTy",db39812edc044706:"6b010",fbb03c16891d35a5:"3lwy5"}],j4v88:[function(e,t,i){let n=e("e44f791774823c1"),r=e("2db6f1da8a2a090f"),s=e("7b8b51bc133daece"),{ErrorManager:a,sc:o}=e("fba4e87138a39fd8");t.exports=class extends n{constructor(e){super(e),this.type=s.SKILL.TYPE.EFFECT,o.hasOwn(e,"targetEffects")||a.error("Missing targetEffects for skill."),this.targetEffects=e.targetEffects}async runSkillLogic(){if(this.lastState=null,!this.validateRange(this.target))return this.lastState=s.SKILL_STATES.OUT_OF_RANGE,!1;this.lastState=s.SKILL_STATES.APPLYING_EFFECTS,this.applyModifiers(this.targetEffects,this.target),this.lastState=s.SKILL_STATES.APPLIED_EFFECTS,await this.fireEvent(r.SKILL_EFFECT_TARGET_MODIFIERS,this)}}},{e44f791774823c1:"cBYkx","2db6f1da8a2a090f":"9PsTy","7b8b51bc133daece":"6b010",fba4e87138a39fd8:"3lwy5"}],"8uI2I":[function(e,t,i){let n=e("e0c5b517af7e95eb"),{PhysicalPropertiesValidator:r}=e("53bee4a4b8ffb847"),{PhysicalSkillRunner:s}=e("2eeab888db9bf32c"),a=e("816db325f0372799"),o=e("da275099098bc955"),{sc:h}=e("c2948bad11643034");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_ATTACK,this.parentType=a.SKILL.TYPE.ATTACK,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_ATTACK_HIT,e=>{super.runSkillLogic(e)})}}},{e0c5b517af7e95eb:"3f9O5","53bee4a4b8ffb847":"1WOg9","2eeab888db9bf32c":"15hwT","816db325f0372799":"6b010",da275099098bc955:"9PsTy",c2948bad11643034:"3lwy5"}],"1WOg9":[function(e,t,i){let{ErrorManager:n,sc:r}=e("35abe0003c2a362d");t.exports.PhysicalPropertiesValidator=class{static validate(e){"function"!=typeof e.owner.executePhysicalSkill&&n.error("Missing executePhysicalSkill required method."),r.hasOwn(e,"magnitude")||n.error("Missing magnitude property."),r.hasOwn(e,"objectWidth")||n.error("Missing objectWidth property."),r.hasOwn(e,"objectHeight")||n.error("Missing objectHeight property.")}}},{"35abe0003c2a362d":"3lwy5"}],"15hwT":[function(e,t,i){let n=e("633d3b21cd84c369");t.exports.PhysicalSkillRunner=class{static async runSkillLogic(e){return(this.lastState=null,e.validateRange(e.target))?(this.lastState=n.SKILL_STATES.EXECUTE_PHYSICAL_ATTACK,await e.owner.executePhysicalSkill(e.target,e)):this.lastState=n.SKILL_STATES.OUT_OF_RANGE,!1}static async executeOnHit(e,t,i,r){return(await t.fireEvent(i,t,e),t.validateTargetOnHit&&e!==t.target)?(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_INVALID_TARGET,!1):"function"==typeof r&&(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_RUN_LOGIC,await r(e))}}},{"633d3b21cd84c369":"6b010"}],eaAf1:[function(e,t,i){let n=e("d5317b62b21ebf53"),{PhysicalPropertiesValidator:r}=e("161757e13fa22e4c"),{PhysicalSkillRunner:s}=e("63a7f8ae8a1c8d9b"),a=e("1ec320fdf9897900"),o=e("366775bdaf1fe082"),{sc:h}=e("456bc4241930a2a9");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_EFFECT,this.parentType=a.SKILL.TYPE.EFFECT,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_EFFECT_HIT,e=>{super.runSkillLogic(e)})}}},{d5317b62b21ebf53:"j4v88","161757e13fa22e4c":"1WOg9","63a7f8ae8a1c8d9b":"15hwT","1ec320fdf9897900":"6b010","366775bdaf1fe082":"9PsTy","456bc4241930a2a9":"3lwy5"}],"4okuX":[function(e,t,i){let{ReceiverWrapper:n}=e("7b4e6450c890fa8e"),{Logger:r}=e("d1031ffaeea43394");t.exports.GameManagerEnricher=class{static withReceiver(e,t,i){if(!e||!t||!i)return r.error("Invalid input parameters for GameManagerEnricher.withReceiver method."),!1;if(e?.playerId!==t?.room.sessionId||(i.skills||(i.skills=new n({owner:e,roomEvents:t,events:i.events})),!i.skillsQueue?.length))return!1;for(let e of i.skillsQueue)i.skills.processMessage(e);i.skillsQueue=[]}}},{"7b4e6450c890fa8e":"30jum",d1031ffaeea43394:"3lwy5"}],"30jum":[function(e,t,i){let{Receiver:n}=e("c695b3c1a62eb9d1"),{Logger:r,sc:s}=e("84b4ce5800839523"),{GameConst:a}=e("280612dc61e2a50e"),{ActionsConst:o}=e("6868c5c216c81bc5");t.exports.ReceiverWrapper=class extends n{constructor(e){super(e),this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in ReceiverWrapper."),this.gameManager=s.get(e.roomEvents,"gameManager",!1),this.gameManager||r.error("Game Manager undefined in ReceiverWrapper."),this.room=s.get(e.roomEvents,"room",!1),this.room||r.error("Room undefined in ReceiverWrapper."),this.translator=this.gameManager?.services?.translator}processMessage(e){if(!this.gameManager)return!1;let t=this.gameManager.getActiveScene();if(!t||!t.player)return!1;super.processMessage(e),this.playAttackOrEffectAnimation(e,t),this.playHitAnimation(e,t)}playHitAnimation(e,t){-1!==e.act.indexOf("_hit")&&this.runHitAnimation(e.x,e.y,t,e.act)}playAttackOrEffectAnimation(e,t){let i=-1!==e.act.indexOf("_eff");if(!(-1!==e.act.indexOf("_atk"))&&!i)return;this.events.emitSync("reldens.playerAttack",e,this.room);let n=i?"_eff":"_atk",r=e.act.substring(0,e.act.indexOf(n)),{ownerSprite:a,targetSprite:o,targetType:h}=this.extractOwnerTargetAndType(t,e),c=s.get(this.gameManager.config.client.skills.animations,r,"default"+n);if(a&&t.getAnimationByKey(c)){let e=t.physics.add.sprite(a.x,a.y,c);e.setDepth(2e5);let i="";s.hasOwn(this.gameManager.gameEngine.uiScene.directionalAnimations,c)&&(i=3===this.gameManager.gameEngine.uiScene.directionalAnimations[c]?a.x{e.destroy()})}o&&this.runHitAnimation(o.x,o.y,t,r+"_hit",e.target,h)}extractOwnerTargetAndType(e,t){if(!e)return r.critical("Current scene not found.",e,t),!1;let i=!1,n=!1,a=o.DATA_TYPE_VALUE_PLAYER,h=e.player.players,c=e.objectsAnimations;return s.hasOwn(h,t.owner)&&s.hasOwn(h,t.target)?{ownerSprite:i=h[t.owner],targetSprite:n=h[t.target],targetType:a}:(s.hasOwn(c,t.owner)&&(i=c[t.owner].sceneSprite,n=h[t.target]),s.hasOwn(c,t.target)&&(n=c[t.target].sceneSprite,i=h[t.owner],a=o.DATA_TYPE_VALUE_OBJECT),{ownerSprite:i,targetSprite:n,targetType:a})}runHitAnimation(e,t,i,n,r,a){let h=this.gameManager.config.client.skills.animations,c=s.hasOwn(h,n)?n:o.DEFAULT_HIT_ANIMATION_KEY;if(!i.getAnimationByKey(c)||!s.hasOwn(h,c))return!1;let l=!1,u=!1;a===o.DATA_TYPE_VALUE_PLAYER&&(u=(l=this.gameManager.getCurrentPlayer().players[r]).playerId),a===o.DATA_TYPE_VALUE_OBJECT&&(l=i.objectsAnimations[r],u=r);let d=i.physics.add.sprite(e,t,c);(d=this.setTargetSpriteDepth(l,c,u,d,h)).anims.play(c,!0).on("animationcomplete",()=>{d.destroy(),l&&s.hasOwn(l,"moveSprites")&&delete l.moveSprites[c+"_"+u]})}setTargetSpriteDepth(e,t,i,n,r){if(!e)return n.setDepth(3e5),n;s.hasOwn(e,"targetSprite")&&(e.moveSprites[t+"_"+i]=n);let a=r[t],o=e.depth+("above"===s.get(a.animationData,"depthByPlayer","")?100:-.1);return n.depthByPlayer=a.animationData.depthByPlayer,n.setDepth(o),n}updateLevelAndExperience(e){this.gameManager.gameDom.updateContent(o.SELECTORS.LEVEL_LABEL,this.translator.t(o.SNIPPETS.LEVEL,{currentLevel:e.data[o.MESSAGE.DATA.LEVEL]})),this.onLevelExperienceAdded(e);let t=e.data[o.MESSAGE.DATA.CLASS_PATH_LABEL];t&&this.gameManager.gameDom.updateContent(o.SELECTORS.CLASS_PATH_LABEL,this.translator.t(o.SNIPPETS.CLASS_PATH_LABEL,{classPathLabel:t}));let i=e.data[o.MESSAGE.DATA.NEXT_LEVEL_EXPERIENCE];i&&this.gameManager.gameDom.updateContent(o.SELECTORS.NEXT_LEVEL_EXPERIENCE,this.translator.t(o.SNIPPETS.NEXT_LEVEL_EXPERIENCE,{nextLevelExperience:i}))}onInitClassPathEnd(e){if(this.gameManager.skills&&this.gameManager.skills.uiCreated)return!1;this.gameManager.skills.uiCreated=!0,this.updateLevelAndExperience(e),this.gameManager.skills.skills=e.data[o.MESSAGE.DATA.SKILL_LEVEL],this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl)}onLevelUp(e){this.updateLevelAndExperience(e),s.hasOwn(e.data,"skl")&&(Object.assign(this.gameManager.skills.skills,e.data.skl),this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl));let t=this.getLevelUpAnimationKey(e.data.skl);t&&this.playSkillPlayerAnimation(this.gameManager.getCurrentPlayer().playerId,t)}getLevelUpAnimationKey(e){let t=this.gameManager.config.client.levels.animations,i="level_"+this.gameManager.playerData.avatarKey+"_"+e;if(s.hasOwn(t,i))return i;let n="level_"+this.gameManager.playerData.avatarKey;if(s.hasOwn(t,n))return n;let r="level_"+e;return s.hasOwn(t,r)?r:!!s.hasOwn(t,"level_default")&&"level_default"}onLevelExperienceAdded(e){this.gameManager.gameDom.updateContent(o.SELECTORS.CURRENT_EXPERIENCE,this.translator.t(o.SNIPPETS.EXPERIENCE,{experience:e.data[o.MESSAGE.DATA.EXPERIENCE]}))}onSkillBeforeCast(e){this.playSkillPlayerAnimation(e.data.extraData[o.DATA_OWNER_KEY],this.determineCastKey(e))}determineCastKey(e){let t=e.data.skillKey+"_cast";return s.hasOwn(this.gameManager.config.client.skills.animations,t)?t:"default_cast"}playSkillPlayerAnimation(e,t){let i=this.gameManager.getActiveScene(),n=i.getAnimationByKey(t);if(!n)return -1===t.indexOf("default")&&r.error('Animation sprite not found for "'+t+'".',this.gameManager.config.client.skills.animations),!1;let a=this.gameManager.getCurrentPlayer().players[e],o=a.x,h=a.y,c=i.physics.add.sprite(o,h,t),l=s.hasOwn(n,"depthByPlayer")&&"above"===n.depthByPlayer?a.depth+1:a.depth-.1;c.depthByPlayer=n.depthByPlayer,c.setDepth(l),s.get(n,"blockMovement",!1)||(a.moveSprites[t+"_"+a.playerId]=c),c.anims.play(t,!0);let u=s.get(n,"destroyTime",!1);u&&setTimeout(()=>{c.destroy(),delete a.moveSprites[t+"_"+a.playerId]},u)}onSkillAfterCast(e){let t=this.gameManager.getCurrentPlayer();if(!s.hasOwn(e.data.extraData,o.DATA_OWNER_TYPE)||!s.hasOwn(e.data.extraData,o.DATA_OWNER_KEY)||e.data.extraData[o.DATA_OWNER_TYPE]!==o.DATA_TYPE_VALUE_PLAYER||!s.hasOwn(t.players,e.data.extraData[o.DATA_OWNER_KEY]))return!1;let i=this.gameManager.getActiveScene(),n=this.gameManager.getCurrentPlayer().players[e.data.extraData[o.DATA_OWNER_KEY]],r=this.getPlayDirection(e.data.extraData,n,t,i);r&&(n.anims.play(n.avatarKey+"_"+r,!0),n.anims.stop())}onSkillAttackApplyDamage(e){let t=this.gameManager.config.get("client/actions/damage");if(!t.enabled)return!1;let i=this.gameManager.getCurrentPlayer();if(!t.showAll&&e.data.extraData[o.DATA_OWNER_KEY]!==i.playerId)return!1;let n=this.gameManager.getActiveScene(),r=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e.data.extraData,i);if(!r)return!1;n.createFloatingText(r.x,r.y,e.data.d,t.color,t.font,t.fontSize,t.duration,t.top,t.stroke,t.strokeThickness,t.shadowColor)}getPlayDirection(e,t,i,n){let r=!1,s=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e,i);if(!s)return!1;let h=s.x-t.x,c=s.y-t.y;return r=h>=0?a.RIGHT:a.LEFT,Math.abs(h)=0?a.DOWN:a.UP),r}}},{c695b3c1a62eb9d1:"aF25l","84b4ce5800839523":"3lwy5","280612dc61e2a50e":"93TbC","6868c5c216c81bc5":"59VA7"}],"8JSjE":[function(e,t,i){t.exports={actions:{selectClassPath:"Select Your Class-Path",currentLevel:"Level %currentLevel",experience:"%experience",experienceLabel:"XP",classPathLabel:"%classPathLabel",nextLevelExperience:"%nextLevelExperience"}}},{}],"1nDQd":[function(e,t,i){let{LifebarUi:n}=e("8c20660587da4fd1"),{PlayerStatsUi:r}=e("ce28c84d7547fb13"),{ActionsConst:s}=e("f776fabb66dbfa58"),{GameConst:a}=e("182ad229d5814453"),o=e("654cdd1a7a80a011"),{TranslationsMapper:h}=e("63862da16582548e"),{UsersConst:c}=e("356170d1146549c3"),{PluginInterface:l}=e("514d97ef4c40e16"),{Logger:u,sc:d}=e("29f51e27cfc36016");t.exports.UsersPlugin=class extends l{setup(e){this.gameManager=d.get(e,"gameManager",!1),this.events=d.get(e,"events",!1),this.initialGameData={},this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.setupPlayerStatsUi())}validateProperties(){return this.gameManager?!!this.events||(u.error("EventsManager undefined in UsersPlugin."),!1):(u.error("Game Manager undefined in UsersPlugin."),!1)}setupPlayerStatsUi(){this.playerStatsUi=new r({events:this.events}),this.playerStatsUi.createPlayerStatsUi()}listenEvents(){this.events.on("reldens.beforeCreateEngine",(e,t)=>{this.initialGameData=e,this.onBeforeCreateEngine(e,t),this.lifeBarUi||(this.lifeBarUi=new n({events:this.events}),this.lifeBarUi.createLifeBarUi(t))})}setTranslations(){if(!this.events||!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,c.MESSAGE.DATA_VALUES)}onBeforeCreateEngine(e,t){let i=t.config.get("client/players/multiplePlayers/enabled",!1),n=t.config.get("client/rooms/selection/allowOnLogin",!1),r=t.gameDom.getElement("#player-selection"),s=d.isTrue(e,"players")?Object.keys(e.players).length:0;if(0(t.preventDefault(),e.classList.add("hidden"),this.submitSelectedPlayer(i,n,a,r),!1)),this.showAvatarContainer(i,t,a),n.classList.remove("hidden")}submitSelectedPlayer(e,t,i,n){e.events.emitSync("reldens.onPrepareSinglePlayerSelectorFormSubmit",{usersPlugin:this,form:t,selectElement:i,player:n,gameManager:e}),e.initEngine().catch(e=>{u.error(e)})}showAvatarContainer(e,t,i){let n=e.gameDom.getElement(".player-selection-additional-info");if(!n||!this.gameManager.config.getWithoutLogs("client/players/multiplePlayers/showAvatar",!0))return;let r=e.gameDom.createElement("div");r.className="avatar-container";let s=e.gameDom.createElement("div"),o=t.player.avatarKey;s.classList.add("class-path-select-avatar"),s.style.backgroundImage=`url('/assets/custom/sprites/${o}${a.FILES.EXTENSIONS.PNG}')`;let h=this.gameManager.config.getWithoutLogs("client/players/size/width","0")+"px";s.style.backgroundPositionX="-"+h,s.style.width=h,s.style.height=this.gameManager.config.getWithoutLogs("client/players/size/height","0")+"px",r.append(s),n.append(r)}preparePlayerSelector(e,t,i){let n=i.gameDom.getElement("#player-selector-form"),r=i.gameDom.getElement("#player-select-element");if(!n||!r)return!1;for(let s of(n.addEventListener("submit",s=>{s.preventDefault();let a=r.options[r.selectedIndex].value,o=this.getPlayerById(t.players,Number(a));return o&&(e.classList.add("hidden"),i.initialGameData.player=o,i.events.emitSync("reldens.onPreparePlayerSelectorFormSubmit",{usersPlugin:this,form:n,select:r,selectedPlayer:o,gameManager:i}),i.initEngine().catch(e=>{u.error(e)})),!1}),Object.keys(t.players))){let e=t.players[s],i=new Option(this.gameManager.services.translator.t(c.SNIPPETS.OPTION_LABEL,{playerName:e.name,currentLevel:e.currentLevel,classPathLabel:e.currentClassPathLabel}),e.id);i.dataset.key=e.avatarKey,r.append(i)}this.showAvatarContainer(i,t,r),n.classList.remove("hidden")}preparePlayerCreator(e,t,i){let n=i.gameDom.getElement(s.SELECTORS.PLAYER_CREATE_FORM);n&&n.addEventListener("submit",e=>{e.preventDefault(),i.gameDom.getElement("#player-create-form .response-error").innerHTML="";let t=new FormData(n),r=d.serializeFormData(t);if(3>r["new-player-name"].toString().length)return!1;i.submitedForm=!0,i.events.emitSync("reldens.onPreparePlayerCreationFormSubmit",{usersPlugin:this,form:n,gameManager:i});try{i.gameRoom.send("*",{act:a.CREATE_PLAYER,formData:r})}catch(e){u.critical("Create player error.",e),i.gameDom.alertReload(i.services.translator.t("game.errors.connectionLost"))}return!1})}getPlayerById(e,t){if(0===e.length)return!1;for(let i of e)if(i.id===t)return i;return!1}}},{"8c20660587da4fd1":"k9uwf",ce28c84d7547fb13:"bNgpB",f776fabb66dbfa58:"59VA7","182ad229d5814453":"93TbC","654cdd1a7a80a011":"ddEMb","63862da16582548e":"1fcQw","356170d1146549c3":"8dKJt","514d97ef4c40e16":"fC3To","29f51e27cfc36016":"3lwy5"}],k9uwf:[function(e,t,i){let{UsersConst:n}=e("aad623d6d02417c4"),{ActionsConst:r}=e("479d0bf7c66730cb"),{GameConst:s}=e("d5d1589d2f5e4492"),{ObjectsConst:a}=e("50eec9aa11029ed5"),{ObjectsHandler:o}=e("d6180c46f85f20ae"),{sc:h}=e("1d465cbfd4bfebd9");t.exports.LifebarUi=class{constructor(e){this.events=e.events}createLifeBarUi(e){return this.barConfig=e.config.get("client/ui/lifeBar"),!!this.barConfig.enabled&&(this.gameManager=e,this.fixedPositionX=!1,this.fixedPositionY=!1,this.barProperty=this.gameManager.config.get("client/actions/skills/affectedProperty"),this.playerSize=this.gameManager.config.get("client/players/size"),this.lifeBars={},this.lifeDataByKey={},this.listenEvents(),this)}listenEvents(){this.events.on("reldens.playerStatsUpdateAfter",(e,t)=>{this.updatePlayerLifeBar(e,t)}),this.events.on("reldens.joinedRoom",e=>{this.listenMessages(e)}),this.events.on("reldens.runPlayerAnimation",(e,t)=>{this.drawPlayerLifeBar(t)}),this.events.on("reldens.updateGameSizeBefore",(e,t,i)=>{this.drawOnGameResize(t,i)}),this.events.on("reldens.playersOnRemove",(e,t)=>{this.removePlayerLifeBar(t)}),this.events.on("reldens.playerEngineAddPlayer",()=>{this.processLifeBarQueue()}),this.events.on("reldens.createAnimationAfter",()=>{o.drawObjectsLifeBar(this)}),this.events.on("reldens.objectBodyChanged",e=>{o.generateObjectLifeBar(e.key,this)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i)=>{this.showTargetLifeBar(t,i)}),this.events.on("reldens.gameEngineClearTarget",(e,t)=>{this.clearPreviousBar(t)})}drawOnGameResize(e,t){if(!this.barConfig.fixedPosition)return!1;this.setPlayerLifeBarFixedPosition(e,t),this.drawPlayerLifeBar(this.gameManager.getCurrentPlayer().playerId)}clearPreviousBar(e){e&&h.hasOwn(this.lifeBars,e.id)&&this.gameManager.getCurrentPlayer().playerId!==e.id&&this.lifeBars[e.id].destroy()}showTargetLifeBar(e,t){if(!this.barConfig.showOnClick)return!1;this.clearPreviousBar(t),e.type===a.TYPE_OBJECT&&o.generateObjectLifeBar(e.id,this),e.type===s.TYPE_PLAYER&&this.drawPlayerLifeBar(e.id)}barPropertyValue(){return this.barProperty+"Value"}barPropertyTotal(){return this.barProperty+"Total"}setPlayerLifeBarFixedPosition(e,t){if(!e||!t){let i=this.gameManager.gameEngine.getCurrentScreenSize(this.gameManager);e=i.newWidth,t=i.newHeight}let{uiX:i,uiY:n}=this.gameManager.gameEngine.uiScene.getUiConfig("lifeBar",e,t);this.fixedPositionX=i,this.fixedPositionY=n}updatePlayerLifeBar(e,t){let i=t.gameManager.getCurrentPlayer();this.updatePlayerBarData(i.playerId,e.statsBase[this.barProperty],e.stats[this.barProperty]),this.drawPlayerLifeBar(i.playerId)}listenMessages(e){e.onMessage("*",e=>{this.listenBattleEnd(e),this.listenLifeBarUpdates(e)})}listenBattleEnd(e){if(e.act!==r.BATTLE_ENDED||!h.hasOwn(this.lifeBars,e.t))return!1;this.lifeBars[e.t].destroy()}listenLifeBarUpdates(e){if(e.act!==n.ACTION_LIFEBAR_UPDATE)return!1;o.processObjectLifeBarMessage(e,!0,this),this.processPlayerLifeBarMessage(e,!0)}canShowPlayerLifeBar(e){let t=this.gameManager.getCurrentPlayer();if(!h.isFunction(t?.isDeath))return!1;let i=e===t?.playerId;return i&&t&&(t.isDeath()||t.isDisabled())?(this.lifeBars[e]?.setVisible(!1),!1):!!i||!!this.barConfig.showAllPlayers||this.barConfig.showOnClick&&e===this.getCurrentTargetId()}queueLifeBarMessage(e){h.hasOwn(this.gameManager,"lifeBarQueue")||(this.gameManager.lifeBarQueue=[]),this.gameManager.lifeBarQueue.push(e)}processPlayerLifeBarMessage(e,t=!1){if(r.DATA_TYPE_VALUE_PLAYER!==e[r.DATA_OWNER_TYPE])return!1;let i=this.gameManager.getCurrentPlayer(),n=e[r.DATA_OWNER_KEY];return i&&i.players&&i.players[n]?(this.updatePlayerBarData(n,e.totalValue,e.newValue),this.canShowPlayerLifeBar(n)&&this.drawPlayerLifeBar(n),!0):(t&&this.queueLifeBarMessage(e),!1)}updatePlayerBarData(e,t,i){let n=this.gameManager.getCurrentPlayer();n.players[e][this.barPropertyTotal()]=t,n.players[e][this.barPropertyValue()]=i}processLifeBarQueue(){if(0===this.gameManager.lifeBarQueue.length)return!1;let e=[];for(let t of this.gameManager.lifeBarQueue)o.processObjectLifeBarMessage(t,!1,this)&&e.push(t),this.processPlayerLifeBarMessage(t,!1)&&e.push(t);0!e.includes(t)))}drawPlayerLifeBar(e){if(this.destroyByKey(e),!this.canShowPlayerLifeBar(e))return this.lifeBars[e]?.setVisible(!1),!1;let t=this.prepareBarData(e),i=this.barConfig.height,n=this.barConfig.top,r=this.barConfig.width,s=t.player.x-r/2,a=t.player.y-i-n+t.ownerTop/2;return e===this.gameManager.getCurrentPlayer().playerId&&this.barConfig.fixedPosition?(this.lifeBars[e]=this.gameManager.getActiveScenePreloader().add.graphics(),(!1===this.fixedPositionX||!1===this.fixedPositionY)&&this.setPlayerLifeBarFixedPosition(),s=this.fixedPositionX,a=this.fixedPositionY):this.lifeBars[e]=this.gameManager.getActiveScene().add.graphics(),this.drawBar(this.lifeBars[e],t.fullValue,t.filledValue,s,a),this}destroyByKey(e){h.hasOwn(this.lifeBars,e)&&this.lifeBars[e].destroy()}prepareBarData(e){let t=this.gameManager.getCurrentPlayer().players[e],i=t[this.barPropertyTotal()],n=t[this.barPropertyValue()],r=h.get(t,"topOff",0)-this.playerSize.height;return{player:t,fullValue:i,filledValue:n,ownerTop:r}}removePlayerLifeBar(e){if(!h.hasOwn(this.lifeBars,e))return!1;this.lifeBars[e].destroy(),delete this.lifeBars[e]}drawBar(e,t,i,n,r){let s=this.barConfig.height,a=this.barConfig.width;e.clear(),e.fillStyle(parseInt(this.barConfig.fillStyle),1),e.fillRect(n,r,i*a/t,s),e.lineStyle(1,parseInt(this.barConfig.lineStyle)),e.strokeRect(n,r,a,s),e.alpha=.6,e.setDepth(3e5)}getCurrentTargetId(){return h.get(this.gameManager.getCurrentPlayer()?.currentTarget,"id",!1)}getObjectByKey(e){return h.get(this.gameManager.getActiveScene()?.objectsAnimations,e,!1)}}},{aad623d6d02417c4:"8dKJt","479d0bf7c66730cb":"59VA7",d5d1589d2f5e4492:"93TbC","50eec9aa11029ed5":"izuLV",d6180c46f85f20ae:"evhzg","1d465cbfd4bfebd9":"3lwy5"}],"8dKJt":[function(e,t,i){let n="users.";t.exports.UsersConst={ACTION_LIFEBAR_UPDATE:"alu",SNIPPETS:{PREFIX:n,OPTION_LABEL:n+"optionLabel"},MESSAGE:{DATA_VALUES:{NAMESPACE:"users"}}}},{}],evhzg:[function(e,t,i){let{ActionsConst:n}=e("66c72f936244bf4c"),{GameConst:r}=e("4fbfbb1e3b1b87b5");t.exports.ObjectsHandler=class{static processObjectLifeBarMessage(e,t=!1,i){if(!this.isValidMessage(e,i))return!1;let r=e[n.DATA_OWNER_KEY],s={};s[i.barPropertyTotal()]=e.totalValue,s[i.barPropertyValue()]=e.newValue,i.lifeDataByKey[r]=s;let a=i.getObjectByKey(r);return a?(this.drawObjectLifeBar(a,e[n.DATA_OWNER_KEY],e.totalValue,e.newValue,i),!0):(t&&i.queueLifeBarMessage(e),!1)}static isValidMessage(e,t){return n.DATA_TYPE_VALUE_OBJECT===e[n.DATA_OWNER_TYPE]&&t.barConfig.showEnemies}static drawObjectsLifeBar(e){for(let t of Object.keys(e.lifeDataByKey)){let i=e.getObjectByKey(t);this.drawObjectLifeBar(i,t,e.lifeDataByKey[t][e.barPropertyTotal()],e.lifeDataByKey[t][e.barPropertyValue()],e)}}static isValidToDraw(e,t,i){return!!e&&r.STATUS.DEATH!==e.inState&&r.STATUS.DISABLED!==e.inState&&!(i.barConfig.showOnClick&&t!==i.getCurrentTargetId())}static generateObjectLifeBar(e,t){let i=t.lifeDataByKey[e];if(!i)return!1;let n=t.getObjectByKey(e);this.drawObjectLifeBar(n,e,i[t.barPropertyTotal()],i[t.barPropertyValue()],t)}static drawObjectLifeBar(e,t,i,n,r){if(r.destroyByKey(t),!this.isValidToDraw(e,t,r))return!1;this.drawLifeBarInPosition(r,t,e,i,n)}static drawLifeBarInPosition(e,t,i,n,r){e.lifeBars[t]=e.gameManager.getActiveScene().add.graphics();let{x:s,y:a}=this.calculateObjectLifeBarPosition(i,e);e.drawBar(e.lifeBars[t],n,r,s,a)}static calculateObjectLifeBarPosition(e,t){return{x:e.x-e.sceneSprite.width/2,y:e.y-e.sceneSprite.height/2-t.barConfig.height-t.barConfig.top}}}},{"66c72f936244bf4c":"59VA7","4fbfbb1e3b1b87b5":"93TbC"}],bNgpB:[function(e,t,i){t.exports.PlayerStatsUi=class{constructor(e){this.events=e.events}createPlayerStatsUi(){this.events.on("reldens.beforePreloadUiScene",e=>{if(!e.gameManager.config.get("client/ui/playerStats/enabled"))return!1;e.load.html("playerStats","/assets/html/ui-player-stats.html"),e.load.html("playerStat","/assets/html/player-stat.html")}),this.events.on("reldens.beforeCreateUiScene",e=>{let t=e.getUiConfig("playerStats");if(!t.enabled)return!1;let i=e.add.dom(t.uiX,t.uiY).createFromCache("playerStats"),n=i.getChildByProperty("id","player-stats-close"),r=i.getChildByProperty("id","player-stats-open");r?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="block",r.style.display="none",i.setDepth(4),this.events.emit("reldens.openUI",{ui:this,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),n?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="none",r&&(r.style.display="block"),i.setDepth(1),this.events.emit("reldens.closeUI",{ui:this,closeButton:n,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),e.elementsUi.playerStats=i})}}},{}],ddEMb:[function(e,t,i){t.exports={users:{optionLabel:"%playerName - LvL %currentLevel - %classPathLabel"}}},{}],jRcE9:[function(e,t,i){let{AudioManager:n}=e("541d832742a00ab5"),{SceneAudioPlayer:r}=e("fb79730c9351b42b"),{MessagesListener:s}=e("1d50534b7413d902"),{AudioUi:a}=e("c9088bc3e4085a8a"),{TranslationsMapper:o}=e("6f071ff9a7a2b90e"),h=e("818427dea57ab21c"),{PluginInterface:c}=e("21904e239c915c7f"),{AudioConst:l}=e("587f9c67cc5dcf55"),{Logger:u,sc:d}=e("d13dcc30aa283061");t.exports.AudioPlugin=class extends c{setup(e){this.events=d.get(e,"events",!1),this.events||u.error("EventsManager undefined in AudioPlugin."),this.gameManager=d.get(e,"gameManager",!1),this.gameManager||u.error("Game Manager undefined in AudioPlugin."),this.setTranslations(),this.messagesListener=new s,this.sceneAudioPlayer=r,this.initialAudiosData={},this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,h,l.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.audioManager||(t.audioManager=new n({events:this.events,currentPlayerData:e.player}),this.initialAudiosData=d.get(e,"audio",{}))}),this.events.on("reldens.joinedRoom",(e,t)=>{t.audioManager.updateDefaultConfig(t.config.getWithoutLogs("client/general/audio/defaultAudioConfig")),this.messagesListener.listenMessages(e,t)}),this.events.on("reldens.preloadUiScene",async e=>{e.load.html("audio","/assets/html/ui-audio.html"),e.load.html("audio-category","/assets/html/ui-audio-category-row.html")}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new a(e),this.uiManager.createUi()}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{let t=e.gameManager.audioManager;if(!t)return!1;let i=d.get(this.initialAudiosData,"globalAudios",{});await t.loadGlobalAudios(i,e),await this.messagesListener.processQueue(),this.sceneAudioPlayer.associateSceneAnimationsAudios(t,e),e.cameras.main.on("camerafadeincomplete",()=>{this.sceneAudioPlayer.playSceneAudio(t,e)})}),this.events.on("reldens.changeSceneDestroyPrevious",e=>{e.gameManager.audioManager.destroySceneAudios()}),this.events.on("reldens.allAudiosLoaded",(e,t,i)=>{this.sceneAudioPlayer.playSceneAudio(e,i,!0)})}}},{"541d832742a00ab5":"6hRLM",fb79730c9351b42b:"4ld6d","1d50534b7413d902":"khKLI",c9088bc3e4085a8a:"a2LOL","6f071ff9a7a2b90e":"1fcQw","818427dea57ab21c":"i11rh","21904e239c915c7f":"fC3To","587f9c67cc5dcf55":"6GwZf",d13dcc30aa283061:"3lwy5"}],"6hRLM":[function(e,t,i){let{AudioConst:n}=e("326aa6ee5d80738b"),{Logger:r,sc:s}=e("bddd20eeb20a74c3");t.exports.AudioManager=class{constructor(e){this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in AudioManager."),this.globalAudios=s.get(e,"globalAudios",{}),this.roomsAudios=s.get(e,"roomsAudios",{}),this.categories=s.get(e,"categories",{}),this.playerConfig=s.get(e,"playerConfig",{}),this.currentPlayerData=s.get(e,"currentPlayerData",{}),this.playing={},this.currentMuteState=!1,this.changedMutedState={},this.lockedMuteState=!1,this.defaultAudioConfig={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!0,delay:0}}async setAudio(e,t){if(this.lockedMuteState)return r.info("Locked mute state to set audio."),!1;await this.events.emit("reldens.setAudio",{audioManager:this,categoryKey:e,enabled:t});let i=this.categories[e];if(this.playerConfig[i.id]=t?1:0,!s.hasOwn(this.playing,e))return!0;let n=t?"play":"stop",a=this.playing[e];return i.single_audio&&s.isObjectFunction(a,n)?this.setAudioForSingleEntity(a,n,e,t):this.setAudioForElementChildren(a,i,t)}setAudioForSingleEntity(e,t,i,n){if(!e)return r.error("Missing playingElement.",{audioKey:i,playingElement:e}),!1;if(!e.currentConfig)return!1;if(!s.isObjectFunction(e,t))return r.error("Missing playOrStop method in playingElement.",{audioKey:i,playOrStop:t,playingElement:e}),!1;try{e[t](),e.mute=!n}catch(n){r.error("PlayingElement error.",{audioKey:i,playOrStop:t,playingElement:e,error:n})}return!0}setAudioForElementChildren(e,t,i){if(t.single_audio)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let t of n)this.setAudioForSingleEntity(e[t],"stop",t,i);return!0}generateAudio(e,t){let i=Object.assign({},this.defaultAudioConfig,t.config||{});if(!s.hasOwn(e.cache.audio.entries.entries,t.audio_key))return r.error("Audio file does not exists. Audio key: "+t.audio_key,e.cache.audio.entries.entries),!1;let n=e.sound.add(t.audio_key,i);if(t.markers&&0{if(a!==e.audio_key)return!1;let o=this.generateAudio(i,e);if(!1===o)return r.error("AudioLoader can not generate the audio.",{"Audio key:":e.audio_key,"Storage key:":n}),!1;"roomsAudios"===n?this.roomsAudios[i.key][e.audio_key]=o:this.globalAudios[e.audio_key]=o,s++,await this.fireAudioEvents(t,i,e,s)}),h.start()}}async existsFileByXMLHttpRequest(e){try{let t=await fetch(e,{method:"HEAD"});return 404!==t.status}catch(e){return r.error("Error fetching:",e),!1}}async prepareFiles(e){let t=e.files_name.split(","),i=[];for(let e of t){let t=n.AUDIO_BUCKET+"/"+e;!1!==await this.existsFileByXMLHttpRequest(t)&&i.push(t)}return i}async fireAudioEvents(e,t,i,n){await t.gameManager.events.emit("reldens.audioLoaded",this,e,t,i),n===e.length&&await t.gameManager.events.emit("reldens.allAudiosLoaded",this,e,t,i)}removeAudiosFromScene(e,t){if(0===e.length||!t)return!1;for(let i of e)this.removeSceneAudioByAudioKey(t,i.audio_key);return!0}removeSceneAudioByAudioKey(e,t){e.sound.removeByKey(t),s.hasOwn(e.cache.audio.entries.entries,t)&&delete e.cache.audio.entries.entries[t],s.hasOwn(this.roomsAudios[e.key],t)&&delete this.roomsAudios[e.key][t],s.hasOwn(this.globalAudios,t)&&delete this.globalAudios[t]}updateDefaultConfig(e){s.isObject(e)&&Object.assign(this.defaultAudioConfig,e)}async processUpdateData(e,t,i){e.playerConfig&&(this.playerConfig=e.playerConfig),e.categories&&(this.addCategories(e.categories),await this.events.emit("reldens.audioManagerUpdateCategoriesLoaded",this,t,i,e));let n=s.get(e,"audios",{});if(0{if(t.children.list.length<=0)return!1;for(let i of t.children.list)"Sprite"===i.type&&(i.on("animationstart",r=>{let s=n.AUDIO_ANIMATION_KEY_START+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationupdate",r=>{let s=n.AUDIO_ANIMATION_KEY_UPDATE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationcomplete",r=>{let s=n.AUDIO_ANIMATION_KEY_COMPLETE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationrepeat",r=>{let s=n.AUDIO_ANIMATION_KEY_REPEAT+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationstop",r=>{let s=n.AUDIO_ANIMATION_KEY_STOP+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}))})}attachAudioToSprite(e,t,i,n){return s.hasOwn(e.associatedAudio,t)||(s.hasOwn(e,"associatedAudio")||(e.associatedAudio={}),s.hasOwn(e.associatedAudio,t)||(e.associatedAudio[t]=i.findAudio(t,n.key))),e.associatedAudio[t]}playSpriteAudio(e,t,i,n){let a=Number(n.currentPlayerData.id),o=Number(s.get(i,"player_id")),h=this.isCurrentPlayerSprite(o,a);if(e.audio.data.config?.onlyCurrentPlayer&&!h)return!1;let c=t.player;if(h&&c&&(c.isDisabled()||c.isDeath()))return!1;if(!e||!e.audio||!e.audio.data)return r.error("Missing associated audio data.",e),!1;let l=e.audio.data.category.category_key,u=s.get(n.categories,l,!1),d=s.get(n.playerConfig,u.id,u.enabled);if(!u||!d)return!1;let f=e.audio.audioInstance;if(u.single_audio&&s.isObjectFunction(n.playing[u.category_key],"stop")&&n.playing[u.category_key].stop(),u.single_audio)return n.playing[u.category_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(!u.single_audio){if(!e.marker)return n.playing[u.category_key][e.audio.data.audio_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(e.marker)return n.playing[u.category_key][e.marker]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(e.marker),!0)}}isCurrentPlayerSprite(e,t){return e&&e===t}isMutedState(e,t,i){return!1!==e.currentMuteState&&(r.info("AudioManager in muted state to play audio.",{mutedKey:t,audioInstance:i}),e.changedMutedState[t]=e.currentMuteState,!0)}}},{"30220416ce7546a9":"6GwZf",f35c0a4a20893403:"3lwy5"}],khKLI:[function(e,t,i){let{AudioConst:n}=e("f38271dbda4592b9");t.exports.MessagesListener=class{constructor(){this.queueMessages=[],this.sceneReady=!1}listenMessages(e,t){e.onMessage("*",async i=>{await this.processMessage(i,e,t)})}async processQueue(){if(this.sceneReady=!0,0===this.queueMessages.length)return!1;for(let e of this.queueMessages){let{message:t,room:i,gameManager:n}=e;await this.processMessage(t,i,n)}return!0}async processMessage(e,t,i){!1===this.sceneReady&&this.queueMessages.push({message:e,room:t,gameManager:i}),e.act===n.AUDIO_UPDATE&&await i.audioManager.processUpdateData(e,t,i),e.act===n.AUDIO_DELETE&&await i.audioManager.processDeleteData(e,t,i)}}},{f38271dbda4592b9:"6GwZf"}],a2LOL:[function(e,t,i){let{SceneAudioPlayer:n}=e("d9b7615cb55a6656"),{AudioUpdate:r}=e("9bae50dfe6fad086"),{sc:s}=e("fc209b9537d685a9");t.exports.AudioUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.audioManager=this.gameManager.audioManager,this.sceneAudioPlayer=n}createUi(){if(!this.audioManager.categories)return;let e=this.uiScene.cache.html.get("audio"),t=this.uiScene.cache.html.get("audio-category"),i=this.prepareAudioSettingsContent(t,e);this.gameManager.gameDom.appendToElement("#settings-dynamic",i);let n=this.gameManager.gameDom.getElements(".audio-setting");if(0===n.length)return!1;for(let e of n)e.addEventListener("click",async t=>{await this.audioManager.setAudio(t.target.dataset.categoryKey,e.checked),this.gameManager.activeRoomEvents.send(new r(e.value,e.checked)),this.sceneAudioPlayer.playSceneAudio(this.audioManager,this.gameManager.getActiveScene())})}prepareAudioSettingsContent(e,t){let i=this.prepareCategoriesRows(e);return this.gameManager.gameEngine.parseTemplate(t,{audioCategories:i,settingsTitle:this.gameManager.services.translator.t("audio.settingsTitle")})}prepareCategoriesRows(e){let t="";for(let i of Object.keys(this.audioManager.categories)){let n=this.audioManager.categories[i],r=s.get(this.audioManager.playerConfig,n.id,n.enabled);t+=this.gameManager.gameEngine.parseTemplate(e,{categoryId:n.id,categoryLabel:n.category_label,categoryKey:n.category_key,categoryChecked:r?' checked="checked"':""})}return t}}},{d9b7615cb55a6656:"4ld6d","9bae50dfe6fad086":"ibm3l",fc209b9537d685a9:"3lwy5"}],ibm3l:[function(e,t,i){let{AudioConst:n}=e("206716204b95df4c"),{GameConst:r}=e("c7ddf895e347bc66");t.exports.AudioUpdate=class{constructor(e,t){this[r.ACTION_KEY]=n.AUDIO_UPDATE,this[n.MESSAGE.DATA.UPDATE_TYPE]=e,this[n.MESSAGE.DATA.UPDATE_VALUE]=t}}},{"206716204b95df4c":"6GwZf",c7ddf895e347bc66:"93TbC"}],i11rh:[function(e,t,i){t.exports={audio:{settingsTitle:"Audio Settings"}}},{}],"3yQhR":[function(e,t,i){let{ActionsConst:n}=e("1e41f2c4a061523b"),{RoomsConst:r}=e("c28085823a93fbc9"),{PluginInterface:s}=e("6710f6d3bb0219bd"),{Logger:a,sc:o}=e("4de0a3d14a3e7a84");t.exports.RoomsPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.gameManager||a.error("Game Manager undefined in RoomsPlugin."),this.events=o.get(e,"events",!1),this.events||a.error("EventsManager undefined in RoomsPlugin."),this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.config.get("client/rooms/selection/allowOnLogin",!1)&&e.roomSelection&&this.populateSceneSelector(e.roomSelection,t)}),this.events.on("reldens.onPrepareSinglePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerCreationFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)})}populateSceneSelector(e,t){let i=t.gameDom.getElement(n.SELECTORS.PLAYER_CREATION_ADDITIONAL_INFO),r=t.gameDom.getElement(n.SELECTORS.PLAYER_SELECTION_ADDITIONAL_INFO);if(!i&&!r)return a.warning("Missing element.",{playerCreationAdditional:i,playerSelectionAdditional:r}),!1;if(i){let n=this.filterCreationRooms(e),r=this.createSelectorElements(t,n,"creation");i.append(r)}if(r){let i=this.createSelectorElements(t,e,"selection");r.append(i)}}filterCreationRooms(e){let t=[];for(let i of e)i.name!==r.ROOM_LAST_LOCATION_KEY&&t.push(i);return t}appendSelectedScene(e,t){let i=e.gameDom.getElement(".scene-select",t);if(!i)return;let n=i.options[i.selectedIndex].value;n&&(e.initialGameData.selectedScene=n)}createSelectorElements(e,t,i){let n=e.gameDom.createElement("div");n.classList.add("input-box");let r=e.gameDom.createElement("label");r.htmlFor=i+"SelectedScene",r.innerText=this.gameManager.services.translator.t("game.pleaseSelectScene");let s=e.gameDom.createElement("select");for(let e of(s.name=i+"SelectedScene",s.id=i+"SelectedScene",s.classList.add("select-element"),s.classList.add("scene-select"),t)){let t=new Option(e.title,e.name);s.append(t)}return n.append(r),n.append(s),n}}},{"1e41f2c4a061523b":"59VA7",c28085823a93fbc9:"9vHHC","6710f6d3bb0219bd":"fC3To","4de0a3d14a3e7a84":"3lwy5"}],"80hlx":[function(e,t,i){let{PredictionWorldCreator:n}=e("1f99afae6127aa6e"),{RoomEventsOverride:r}=e("fd23b82a5f097c7a"),{PluginInterface:s}=e("eb3ab2d7c28717c2"),{Logger:a,sc:o}=e("fc917919e6e14072");t.exports.PredictionPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.events=o.get(e,"events",!1),this.predictionWorldCreator=new n,this.roomEventsOverride=new r,this.validateProperties()&&this.listenEvents()}validateProperties(){return this.gameManager?!!this.events||(a.error("EventsManager undefined in PredictionPlugin."),!1):(a.error("Game Manager undefined in PredictionPlugin."),!1)}listenEvents(){this.events.on("reldens.createEngineSceneDone",async e=>{await this.predictionWorldCreator.createSceneWorld(e.currentScene)}),this.events.on("reldens.createdRoomsEventsInstance",(e,t)=>{this.roomEventsOverride.createCurrentPlayerOverride(t.activeRoomEvents),this.roomEventsOverride.playerOnChangeOverride(t.activeRoomEvents),this.roomEventsOverride.createPlayerEngineInstanceOverride(t.activeRoomEvents),this.roomEventsOverride.createSceneInstanceOverride(t.activeRoomEvents)})}}},{"1f99afae6127aa6e":"4rqFy",fd23b82a5f097c7a:"4xzUf",eb3ab2d7c28717c2:"fC3To",fc917919e6e14072:"3lwy5"}],"4rqFy":[function(e,t,i){let{CollisionsManager:n}=e("804590972ed05c20"),{P2world:r}=e("398044c66c46a0d1"),{WorldPointsValidator:s}=e("1ceec76f8d305544"),{WorldTimer:a}=e("6582f8b293532f90"),{Logger:o,sc:h}=e("8c1495bc004bacd5");t.exports.PredictionWorldCreator=class{async createSceneWorld(e){if(!e.experimentalClientPrediction)return;let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomMap,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.worldPrediction=this.createWorldInstance(r),e.worldPrediction.createLimits(),await e.worldPrediction.createWorldContent({});let h=e.gameManager.getCurrentPlayer();if(!h){o.error("Current player not present for prediction.");return}let c={id:h.playerId,width:e.configManager.get("client/players/physicalBody/width"),height:e.configManager.get("client/players/physicalBody/height"),bodyState:h.state},l=e.worldPrediction.createPlayerBody(c);l.updateBodyState=this.updateBodyStateOverride(l,h),h.predictionBody=l,e.worldPredictionTimer=new a({callbacks:[()=>{if(!e.worldPrediction){o.error("Scene World not longer exists.",e.roomWorld);return}e.worldPrediction.removeBodiesFromWorld()}]}),e.worldPredictionTimer.startWorldSteps(e.worldPrediction),e.collisionsManager=new n({roomWorld:e.worldPrediction}),h.pointsValidator=new s(i.width,i.height)}cloneMapJson(e,t){return Object.assign({},e.cache?.tilemap?.entries?.entries[e.tileset.name]?.data||{},{layers:t})}findValidLayers(e){let t=[];for(let i of e.cache.tilemap.entries.entries[e.tileset.name].data.layers)-1!==i.name.indexOf("collision")&&t.push(i);return t}updateBodyStateOverride(e,t){return()=>{if(!h.hasOwn(e.bodyState,"x")||!h.hasOwn(e.bodyState,"y")||!e.position[0]||!e.position[1])return;if(e.isNotMoving()){e.bodyState.mov=!1;return}e.bodyState.x!==e.position[0]&&(e.bodyState.x=e.position[0]),e.bodyState.y!==e.position[1]&&(e.bodyState.y=e.position[1]);let i=0!==Number(Number(e.velocity[0]).toFixed(2))||0!==Number(e.velocity[1].toFixed(2));e.bodyState.mov!==i&&(e.bodyState.mov=i);let n={x:e.position[0],y:e.position[1],dir:e.bodyState.dir};t.updatePlayer(t.playerId,{state:n})}}createWorldInstance(e){return new r(e)}}},{"804590972ed05c20":"dlIjw","398044c66c46a0d1":"hvh2r","1ceec76f8d305544":"e44so","6582f8b293532f90":"5zAcU","8c1495bc004bacd5":"3lwy5"}],dlIjw:[function(e,t,i){let{PhysicalBody:n}=e("8b976b60c28092e0"),{ErrorManager:r,Logger:s,sc:a}=e("92f5971959d19587");t.exports.CollisionsManager=class{constructor(e){this.activateCollisions(e)}activateCollisions(e){e&&(this.room=e,a.hasOwn(this.room,"roomWorld")||r.error("Room world not found."),this.guestEmailDomain=this.room.config.getWithoutLogs("server/players/guestsUser/emailDomain"),this.room.roomWorld.on("postBroadphase",this.onWorldStepStart.bind(this)),this.room.roomWorld.on("preSolve",this.beforeResolveCollision.bind(this)),this.room.roomWorld.on("beginContact",this.onCollisionsBegin.bind(this)),this.room.roomWorld.on("endContact",this.onCollisionsEnd.bind(this)))}onWorldStepStart(e){let{pairs:t}=e;if(1>=t.length)return;let i=!1,n=!1,r=!1,s=!1;for(let e of t)e.playerId&&e.pStop&&e.stopFull(),e.roomObject&&e.pStop&&e.stopFull(),e.playerId&&(r=e),e.isBullet&&(i&&!n&&(n=e),i||(i=e),e.removeInvalidStateBulletBody()),e.isRoomObject&&!e.isBullet&&(s=e);this.room.roomWorld.bulletsStopOnPlayer&&r&&i&&r.stopFull(),this.room.roomWorld.bulletsStopOnObject&&s&&i&&s.stopFull(),this.removeIdleBullets()}removeIdleBullets(){if(0!==this.room.roomWorld.removeBulletsStateIds.length)for(let e of this.room.roomWorld.removeBulletsStateIds)this.room.state.removeBody(e),this.room.roomWorld.removeBulletsStateIds.splice(this.room.roomWorld.removeBulletsStateIds.indexOf(e),1)}beforeResolveCollision(e){if(this.room.roomWorld.allowPassWallsFromBelow)for(let t of e.contactEquations){let e=this.getPlayerBody(t),i=this.getWallBody(t);if(!e||!i||i.isWorldWall)return;e.position[1]>i.position[1]&&(t.enabled=!1)}}onCollisionsBegin(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return t.playerId&&i.playerId?this.playerHitPlayerBegin(t,i):(t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectBegin(n,r):n&&r.changeScenePoint?this.playerHitChangePointBegin(n,r):n&&r.isWall?this.playerHitWallBegin(n,r):t.isRoomObject&&i.isRoomObject?this.objectHitObjectBegin(t,i):void(t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall&&this.objectHitWallBegin(s,r))}onCollisionsEnd(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return(e.bodyA.playerId&&e.bodyB.playerId&&this.playerHitPlayerEnd(e.bodyA,e.bodyB),t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectEnd(n,r):n&&r.isWall?this.playerHitWallEnd(n,r):(t.isRoomObject&&i.isRoomObject&&this.objectHitObjectEnd(t,i),t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall)?this.objectHitWallEnd(s,r):void 0}playerHitPlayerBegin(e,t){this.room.events.emit("reldens.playerHitPlayer",{bodyA:e,bodyB:t})}playerHitPlayerEnd(e,t){e.stopFull(),t.stopFull(),this.room.events.emit("reldens.playerHitPlayerEnd",{bodyA:e,bodyB:t})}playerHitObjectBegin(e,t){this.room.events.emit("reldens.startPlayerHitObjectBegin",{playerBody:e,otherBody:t}),this.findAlternativePath(e),t.roomObject&&a.isFunction(t.roomObject.onHit)&&t.roomObject.onHit({bodyA:e,bodyB:t,room:this.room}),this.room.events.emit("reldens.endPlayerHitObjectBegin",{playerBody:e,otherBody:t})}playerHitObjectEnd(e,t){let i={stopFull:!0,continue:!0};if(this.room.events.emit("reldens.playerHitObjectEnd",{playerBody:e,result:i}),!i.continue)return!1;e.stopFull(i.stopFull)}playerHitWallBegin(e,t){this.room.events.emit("reldens.playerHitWallBegin",{playerBody:e,wallBody:t})}playerHitWallEnd(e,t){if(this.room.events.emit("reldens.startPlayerHitWallEnd",{playerBody:e,wallBody:t}),e.autoMoving&&1{s.error("There was an error while setting the next scene initial position.",e)}),this.room.events.emit("reldens.endPlayerHitChangePoint",{collisionsManager:this,playerSchema:i,playerBody:e,changePoint:t,changeData:h})}objectHitObjectBegin(e,t){this.room.events.emit("reldens.startObjectHitObject",{bodyA:e,bodyB:t});let i=a.hasOwn(e,"hitPriority"),n=a.hasOwn(t,"hitPriority"),r={bodyA:e,bodyB:t,room:this.room},s=(i||n)&&(!i||n&&!(i>n))?t:e;s.roomObject&&a.isFunction(s.roomObject?.onHit)&&s.roomObject.onHit(r),e.isBullet&&e.roomObject.removeBullet(e),t.isBullet&&t.roomObject.removeBullet(t),this.findAlternativePath(e),this.findAlternativePath(t),this.room.events.emit("reldens.endObjectHitObject",{bodyA:e,bodyB:t,priorityObject:s})}objectHitObjectEnd(e,t){this.bodyFullStop(e),this.bodyFullStop(t),this.room.events.emit("reldens.objectHitObjectEnd",{bodyA:e,bodyB:t})}objectHitWallBegin(e,t){let i={objectBody:e,wall:t,continue:!0};return this.room.events.emit("reldens.objectHitWallBegin",i),i.continue&&e.isBullet&&e.roomObject.removeBullet(e),i}objectHitWallEnd(e){this.room.events.emit("reldens.startObjectHitWall",{objectBody:e}),this.resetObjectAutoMove(e),this.room.events.emit("reldens.endObjectHitWall",{objectBody:e})}bodyFullStop(e){if(!e)return!1;!(e.autoMoving&&0Math.abs(this.velocity[0])?0:o.roundToPrecision(this.velocity[0],4),this.velocity[1]=1e-4>Math.abs(this.velocity[1])?0:o.roundToPrecision(this.velocity[1],4),.001>Math.abs(this.velocity[0])&&this.stopX(),.001>Math.abs(this.velocity[1])&&this.stopY(),this.updateBodyState()}speedToNext(){if(!this.autoMoving||0===this.autoMoving.length){this.setShapesCollisionGroup(this.originalCollisionGroup);return}if(!this.autoMoving[0]){a.error("Missing autoMoving first index."),this.setShapesCollisionGroup(this.originalCollisionGroup);return}let e=this.autoMoving[0][0],t=this.autoMoving[0][1];if(0!==this.speedToNextRetryCounter.col&&this.speedToNextRetryCounter.col===e&&0!==this.speedToNextRetryCounter.row&&this.speedToNextRetryCounter.row===t&&0!==this.velocity[0]&&0!==this.velocity[1]&&this.speedToNextRetryCounter.retries++,this.speedToNextMaxRetries===this.speedToNextRetryCounter.retries){this.speedToNextRetryCounter.col=0,this.speedToNextRetryCounter.row=0;let e=this.autoMoving.shift(),t=this.autoMoving.pop();this.stopFull(!0),this.alignToTile(),this.autoMoving=this.getPathFinder().findPath(e,t),this.speedToNextRetryCounter.retries=0;return}if(this.speedToNextRetryCounter.col=e,this.speedToNextRetryCounter.row=t,this.currentCol===e&&this.currentRow===t){this.autoMoving.shift(),0===this.autoMoving.length&&this.stopAutoMoving();return}this.currentCol===e&&0!==this.velocity[0]&&(this.stopX(),this.alignToTile()),this.currentCol>e&&this.initMove(s.LEFT,!0),this.currentColt&&this.initMove(s.UP,!0),this.currentRow=Math.abs(i)&&.01>=Math.abs(n)&&(this.position[0]=e,this.position[1]=t)}updateBodyState(){if(!o.hasOwn(this.bodyState,"x")||!o.hasOwn(this.bodyState,"y"))return;if(this.isNotMoving()){this.bodyState.mov=!1;return}let e=o.roundToPrecision(this.position[0],0),t=o.roundToPrecision(this.position[1],0);if(!e||!t)return;this.bodyState.x!==e&&(this.bodyState.x=o.roundToPrecision(e,this.worldPositionPrecision)),this.bodyState.y!==t&&(this.bodyState.y=o.roundToPrecision(t,this.worldPositionPrecision));let i=o.roundToPrecision(this.velocity[0],this.worldSpeedPrecision),n=o.roundToPrecision(this.velocity[1],this.worldSpeedPrecision);this.bodyState.mov=0!==i||0!==n,this.removeInvalidStateBulletBody()}bodyLogKey(){return this.playerId?"PJ-"+this.playerId:this.bodyState?.key}removeInvalidStateBulletBody(){this.isBullet&&(this.isOutOfWorldBounds()||this.hasInvalidSpeed())&&(this.world.removeBodies.push(this),this.bodyStateId&&this.world.removeBulletsStateIds.push(this.bodyStateId))}hasInvalidSpeed(){if(!this.applySpeedThresholdOnBullets&&this.isBullet)return!1;let e=this.isBullet?this.originalSpeed.x:this.movementSpeed,t=this.isBullet?this.originalSpeed.x:this.movementSpeed,i=e*this.speedThreshold,n=t*this.speedThreshold;return Math.abs(this.velocity[0])this.position[0]||this.position[0]>this.worldWidth*this.worldTileWidth||0>this.position[1]||this.position[1]>this.worldHeight*this.worldTileHeight}isNotMoving(){let e=this.movementSpeed*this.speedThreshold,t=o.roundToPrecision(this.velocity[0]),i=o.roundToPrecision(this.velocity[1]);if(0!==this.velocity[0]&&Math.abs(t)this.velocity[0]?-1:1,n=0===this.velocity[1]?0:0>this.velocity[1]?-1:1;e===s.RIGHT&&(i=1),e===s.LEFT&&(i=-1),e===s.UP&&(n=-1),e===s.DOWN&&(n=1);let r=this.normalizeSpeed(i,n);this.velocity[0]=t*i*r,this.velocity[1]=t*n*r,(e===s.RIGHT||e===s.LEFT)&&this.validateAndSetDirection(e,this.diagonalHorizontal,this.velocity[1]),(e===s.UP||e===s.DOWN)&&this.validateAndSetDirection(e,!this.diagonalHorizontal,this.velocity[0])}moveUp(e){if(!this.world.applyGravity){this.velocity[1]=-e;return}this.canJump()&&(this.velocity[1]=-this.jumpSpeed,setTimeout(()=>{this.stopY()},this.jumpTimeMs))}calculateMagnitude(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}checkNonZeroComponents(e,t){return Math.abs(e)>0||Math.abs(t)>0}normalizeSpeed(e,t){return this.checkNonZeroComponents(e,t)?1/this.calculateMagnitude(e,t):0}validateAndSetDirection(e,t,i){(this.animationBasedOnPress||this.bodyState.autoDirection)&&(t||0===i)&&(this.bodyState.dir=e)}stopMove(){this.world&&this.world.applyGravity?this.stopX():this.stopFull()}stopFull(e=!1){this.velocity[0]=0,this.world?.applyGravity||(this.velocity[1]=0),this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopX(e=!1){this.velocity[0]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopY(e=!1){this.velocity[1]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}moveToPoint(e){this.resetAuto(),this.updateCurrentPoints();let t=[this.currentCol,this.currentRow],i=[e.column,e.row],n=this.getPathFinder();return n?(this.autoMoving=n.findPath(t,i),this.autoMoving||(this.setShapesCollisionGroup(this.originalCollisionGroup),this.stopMove()),this.autoMoving):(this.setShapesCollisionGroup(this.originalCollisionGroup),!1)}updateCurrentPoints(){if(!this.world)return;let{currentCol:e,currentRow:t}=this.positionToTiles(this.position[0],this.position[1]);return this.originalCol||(this.originalCol=e),this.originalRow||(this.originalRow=t),this.currentCol=e,this.currentRow=t,this}moveToOriginalPoint(){if(this.originalCol&&this.originalRow||this.updateCurrentPoints(),this.disableObjectsCollisionsOnReturn&&this.setShapesCollisionGroup(0),this.stopFull(),0===this.moveToOriginalPointWithDelay){this.moveToPoint({column:this.originalCol,row:this.originalRow});return}this.moveToOriginalPointTimer=setTimeout(()=>{this.moveToPoint({column:this.originalCol,row:this.originalRow})},this.moveToOriginalPointWithDelay)}setShapesCollisionGroup(e){if(this.lastSetCollisionGroup!==e)for(let t of(this.lastSetCollisionGroup=e,this.shapes))t.collisionGroup=e}canJump(){for(let e of this.world.narrowphase.contactEquations){let t=e.bodyA===this?e.bodyA:e.bodyB,i=e.bodyA.isWall?e.bodyA:e.bodyB;if(t.playerId&&0<=Number(Number(t.velocity[1]).toFixed(2))&&i.isWall&&!i.isWorldWall&&t.position[1]=0?i>this.worldWidth?this.worldWidth:i:0;let n=Math.round((t-this.worldTileHeight/2)/this.worldTileHeight);return{currentCol:i,currentRow:n=n>=0?n>this.worldHeight?this.worldHeight:n:0}}getPathFinder(){return this.pathFinder?this.pathFinder:this.world?.pathFinder}get worldTileWidth(){return this.world?.mapJson?.tilewidth}get worldTileHeight(){return this.world?.mapJson?.tileheight}get worldWidth(){return this.world?.mapJson?.width}get worldHeight(){return this.world?.mapJson?.height}}},{"3304f256e9e76c94":"6bkiu","37df9b723b227260":"93TbC","924061961623cd99":"3lwy5"}],"6bkiu":[function(e,t,i){Object.defineProperty(t.exports={AABB:e("684b4c2f51a7982f"),AngleLockEquation:e("bdffc69900b9d197"),Body:e("3f75664c0e64d6f0"),Broadphase:e("6a91eca7403fbf23"),Capsule:e("856d4f0d9932be15"),Circle:e("2ed19d42da3c562d"),Constraint:e("aa927dde400e3497"),ContactEquation:e("2d074b8afa958c13"),ContactEquationPool:e("c3b18056b7840eb7"),ContactMaterial:e("95c5dc13a3c7c260"),Convex:e("ac59578c032edc9f"),DistanceConstraint:e("5c90feeb31df3d5e"),Equation:e("f8f4511fa21776ff"),EventEmitter:e("c3d3b3771d6558ce"),FrictionEquation:e("cab660c3bd983ee4"),FrictionEquationPool:e("87607de358c9c21"),GearConstraint:e("90a946d116b90b53"),GSSolver:e("6894c0e11a66902e"),Heightfield:e("4b3b7392ecef1240"),Line:e("1e20d14367f50060"),LockConstraint:e("fdc7a4304d635ff8"),Material:e("2ead159ba8c055f3"),Narrowphase:e("9e6fca932dff920d"),NaiveBroadphase:e("b1c0219aba2108d9"),Particle:e("9633119b46909ded"),Plane:e("4f144cae12074657"),Pool:e("a996dbee78852c0f"),RevoluteConstraint:e("34cc4dd48e1d0bad"),PrismaticConstraint:e("53d36735aa65530e"),Ray:e("1d4b6783af535b58"),RaycastResult:e("f9b0bdbeada25bdf"),Box:e("1eaca10f1a6fb0c1"),RotationalVelocityEquation:e("316198d4ce4102e3"),SAPBroadphase:e("60bfc18e7e665b71"),Shape:e("1eb899949248649e"),Solver:e("3c21f4f3806b3be"),Spring:e("e3ff62163c08949b"),TopDownVehicle:e("e782a409308bbff6"),LinearSpring:e("78e7b803f9bca9ee"),RotationalSpring:e("fe49496c221554ba"),Utils:e("36b147cdc3f4bb72"),World:e("551a53932a4cfdc8"),vec2:e("19262ec940ce734e"),version:e("df51020e342624b").version},"Rectangle",{get:function(){return console.warn("The Rectangle class has been renamed to Box."),this.Box}})},{"684b4c2f51a7982f":"7Fman",bdffc69900b9d197:"jaQW1","3f75664c0e64d6f0":"1vLHz","6a91eca7403fbf23":"5ZGdm","856d4f0d9932be15":"iCu6l","2ed19d42da3c562d":"71oh9",aa927dde400e3497:"fl4d5","2d074b8afa958c13":"2hWGL",c3b18056b7840eb7:"c7vmA","95c5dc13a3c7c260":"7VedP",ac59578c032edc9f:"jXoGk","5c90feeb31df3d5e":"eMph3",f8f4511fa21776ff:"kSmDE",c3d3b3771d6558ce:"3wc90",cab660c3bd983ee4:"6o1RQ","87607de358c9c21":"dT2Zx","90a946d116b90b53":"c2nuE","6894c0e11a66902e":"Kc35t","4b3b7392ecef1240":"g5PHm","1e20d14367f50060":"3e8Uk",fdc7a4304d635ff8:"3C7H6","2ead159ba8c055f3":"kKj3c","9e6fca932dff920d":"bsKDm",b1c0219aba2108d9:"liK4P","9633119b46909ded":"hsc7O","4f144cae12074657":"kpexr",a996dbee78852c0f:"5lrfq","34cc4dd48e1d0bad":"aOW07","53d36735aa65530e":"iK7mQ","1d4b6783af535b58":"3aaBs",f9b0bdbeada25bdf:"bK4Qs","1eaca10f1a6fb0c1":"1uf32","316198d4ce4102e3":"dpMuH","60bfc18e7e665b71":"cJxaR","1eb899949248649e":"fyiLV","3c21f4f3806b3be":"cslpB",e3ff62163c08949b:"cXKmN",e782a409308bbff6:"cQjmW","78e7b803f9bca9ee":"4chxn",fe49496c221554ba:"j6tWA","36b147cdc3f4bb72":"7sQcP","551a53932a4cfdc8":"5xqPb","19262ec940ce734e":"geg3A",df51020e342624b:"aPywz"}],"7Fman":[function(e,t,i){var n=e("b3f1d8665c8114ff");function r(e){this.lowerBound=n.create(),e&&e.lowerBound&&n.copy(this.lowerBound,e.lowerBound),this.upperBound=n.create(),e&&e.upperBound&&n.copy(this.upperBound,e.upperBound)}e("def10f340a350e0e"),t.exports=r;var s=n.create();r.prototype.setFromPoints=function(e,t,i,r){var a=this.lowerBound,o=this.upperBound;"number"!=typeof i&&(i=0),0!==i?n.rotate(a,e[0],i):n.copy(a,e[0]),n.copy(o,a);for(var h=Math.cos(i),c=Math.sin(i),l=1;lo[p]&&(o[p]=u[p]),u[p]i&&(this.lowerBound[t]=i);var n=e.upperBound[t];this.upperBound[t]h?-1:o}},{b3f1d8665c8114ff:"geg3A",def10f340a350e0e:"7sQcP"}],geg3A:[function(e,t,i){var n=t.exports={},r=e("d83d88b709f376af");n.crossLength=function(e,t){return e[0]*t[1]-e[1]*t[0]},n.crossVZ=function(e,t,i){return n.rotate(e,t,-Math.PI/2),n.scale(e,e,i),e},n.crossZV=function(e,t,i){return n.rotate(e,i,Math.PI/2),n.scale(e,e,t),e},n.rotate=function(e,t,i){if(0!==i){var n=Math.cos(i),r=Math.sin(i),s=t[0],a=t[1];e[0]=n*s-r*a,e[1]=r*s+n*a}else e[0]=t[0],e[1]=t[1]},n.rotate90cw=function(e,t){var i=t[0],n=t[1];e[0]=n,e[1]=-i},n.toLocalFrame=function(e,t,i,r){n.copy(e,t),n.sub(e,e,i),n.rotate(e,e,-r)},n.toGlobalFrame=function(e,t,i,r){n.copy(e,t),n.rotate(e,e,r),n.add(e,e,i)},n.vectorToLocalFrame=function(e,t,i){n.rotate(e,t,-i)},n.vectorToGlobalFrame=function(e,t,i){n.rotate(e,t,i)},n.centroid=function(e,t,i,r){return n.add(e,t,i),n.add(e,e,r),n.scale(e,e,1/3),e},n.create=function(){var e=new r.ARRAY_TYPE(2);return e[0]=0,e[1]=0,e},n.clone=function(e){var t=new r.ARRAY_TYPE(2);return t[0]=e[0],t[1]=e[1],t},n.fromValues=function(e,t){var i=new r.ARRAY_TYPE(2);return i[0]=e,i[1]=t,i},n.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},n.set=function(e,t,i){return e[0]=t,e[1]=i,e},n.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},n.subtract=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},n.sub=n.subtract,n.multiply=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},n.mul=n.multiply,n.divide=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},n.div=n.divide,n.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},n.distance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},n.dist=n.distance,n.squaredDistance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n},n.sqrDist=n.squaredDistance,n.length=function(e){var t=e[0],i=e[1];return Math.sqrt(t*t+i*i)},n.len=n.length,n.squaredLength=function(e){var t=e[0],i=e[1];return t*t+i*i},n.sqrLen=n.squaredLength,n.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},n.normalize=function(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),e[0]=t[0]*r,e[1]=t[1]*r),e},n.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},n.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},n.lerp=function(e,t,i,n){var r=t[0],s=t[1];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e},n.reflect=function(e,t,i){var n=t[0]*i[0]+t[1]*i[1];e[0]=t[0]-2*i[0]*n,e[1]=t[1]-2*i[1]*n},n.getLineSegmentsIntersection=function(e,t,i,r,s){var a=n.getLineSegmentsIntersectionFraction(t,i,r,s);return!(a<0)&&(e[0]=t[0]+a*(i[0]-t[0]),e[1]=t[1]+a*(i[1]-t[1]),!0)},n.getLineSegmentsIntersectionFraction=function(e,t,i,n){var r,s,a=t[0]-e[0],o=t[1]-e[1],h=n[0]-i[0],c=n[1]-i[1];return(r=(-o*(e[0]-i[0])+a*(e[1]-i[1]))/(-h*o+a*c),s=(h*(e[1]-i[1])-c*(e[0]-i[0]))/(-h*o+a*c),r>=0&&r<=1&&s>=0&&s<=1)?s:-1}},{d83d88b709f376af:"7sQcP"}],"7sQcP":[function(e,t,i){function n(){}t.exports=n,n.appendArray=function(e,t){if(t.length<15e4)e.push.apply(e,t);else for(var i=0,n=t.length;i!==n;++i)e.push(t[i])},n.splice=function(e,t,i){i=i||1;for(var n=t,r=e.length-i;ni&&(i=a+o)}this.boundingRadius=i},l.prototype.addShape=function(e,t,i){if(e.body)throw Error("A shape can only be added to one body.");e.body=this,t?n.copy(e.position,t):n.set(e.position,0,0),e.angle=i||0,this.shapes.push(e),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},l.prototype.removeShape=function(e){var t=this.shapes.indexOf(e);return -1!==t&&(this.shapes.splice(t,1),this.aabbNeedsUpdate=!0,e.body=null,!0)},l.prototype.updateMassProperties=function(){if(this.type===l.STATIC||this.type===l.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var e=this.shapes,t=e.length,i=this.mass/t,r=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var s=0;s0?1/r:0}this.invMass=1/this.mass,n.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}},n.create(),l.prototype.applyForce=function(e,t){if(n.add(this.force,this.force,e),t){var i=n.crossLength(t,e);this.angularForce+=i}};var f=n.create(),p=n.create(),g=n.create();l.prototype.applyForceLocal=function(e,t){t=t||g,this.vectorToWorldFrame(f,e),this.vectorToWorldFrame(p,t),this.applyForce(f,p)};var m=n.create();l.prototype.applyImpulse=function(e,t){if(this.type===l.DYNAMIC&&(n.scale(m,e,this.invMass),n.multiply(m,this.massMultiplier,m),n.add(this.velocity,m,this.velocity),t)){var i=n.crossLength(t,e);i*=this.invInertia,this.angularVelocity+=i}};var v=n.create(),y=n.create(),b=n.create();l.prototype.applyImpulseLocal=function(e,t){t=t||b,this.vectorToWorldFrame(v,e),this.vectorToWorldFrame(y,t),this.applyImpulse(v,y)},l.prototype.toLocalFrame=function(e,t){n.toLocalFrame(e,t,this.position,this.angle)},l.prototype.toWorldFrame=function(e,t){n.toGlobalFrame(e,t,this.position,this.angle)},l.prototype.vectorToLocalFrame=function(e,t){n.vectorToLocalFrame(e,t,this.angle)},l.prototype.vectorToWorldFrame=function(e,t){n.vectorToGlobalFrame(e,t,this.angle)},l.prototype.fromPolygon=function(e,t){t=t||{};for(var i,a=this.shapes.length;a>=0;--a)this.removeShape(this.shapes[a]);var o=new r.Polygon;if(o.vertices=e,o.makeCCW(),"number"==typeof t.removeCollinearPoints&&o.removeCollinearPoints(t.removeCollinearPoints),void 0===t.skipSimpleCheck&&!o.isSimple())return!1;this.concavePath=o.vertices.slice(0);for(var a=0;a=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=l.AWAKE):(this.idleTime+=i,this.sleepState=l.SLEEPY),this.idleTime>this.sleepTimeLimit&&(t?this.wantsToSleep=!0:this.sleep()))},l.prototype.overlaps=function(e){return this.world.overlapKeeper.bodiesAreOverlapping(this,e)};var T=n.create(),S=n.create();l.prototype.integrate=function(e){var t=this.invMass,i=this.force,r=this.position,s=this.velocity;n.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*e),n.scale(T,i,e*t),n.multiply(T,this.massMultiplier,T),n.add(s,T,s),this.integrateToTimeOfImpact(e)||(n.scale(S,s,e),n.add(r,r,S),this.fixedRotation||(this.angle+=this.angularVelocity*e)),this.aabbNeedsUpdate=!0};var A=new a,C=new o({mode:o.ALL}),_=n.create(),I=n.create(),O=n.create(),P=n.create();l.prototype.integrateToTimeOfImpact=function(e){if(this.ccdSpeedThreshold<0||n.squaredLength(this.velocity)=c&&he.vertices.length)throw Error("lol2");if(t<0)throw Error("lol3");for(var n=t;nt[e][0])&&(e=i);r.left(this.at(e-1),this.at(e),this.at(e+1))||this.reverse()},a.prototype.reverse=function(){for(var e=[],t=0,i=this.vertices.length;t!==i;t++)e.push(this.vertices.pop());this.vertices=e},a.prototype.isReflex=function(e){return r.right(this.at(e-1),this.at(e),this.at(e+1))};var o=[],h=[];function c(e,t,i,n,r){r=r||0;var a=t[1]-e[1],o=e[0]-t[0],h=a*e[0]+o*e[1],c=n[1]-i[1],l=i[0]-n[0],u=c*i[0]+l*i[1],d=a*l-c*o;return s.eq(d,0,r)?[0,0]:[(l*h-o*u)/d,(a*u-c*h)/d]}a.prototype.canSee=function(e,t){var i,s;if(r.leftOn(this.at(e+1),this.at(e),this.at(t))&&r.rightOn(this.at(e-1),this.at(e),this.at(t)))return!1;s=r.sqdist(this.at(e),this.at(t));for(var a=0;a!==this.vertices.length;++a)if((a+1)%this.vertices.length!==e&&a!==e&&r.leftOn(this.at(e),this.at(t),this.at(a+1))&&r.rightOn(this.at(e),this.at(t),this.at(a))&&(o[0]=this.at(e),o[1]=this.at(t),h[0]=this.at(a),h[1]=this.at(a+1),i=n.lineInt(o,h),r.sqdist(this.at(e),i)0?this.slice(e):[this]},a.prototype.slice=function(e){if(0==e.length)return[this];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2==e[0].length&&e[0][0]instanceof Array){for(var t=[this],i=0;is)return console.warn("quickDecomp: max level ("+s+") reached."),e;for(var w=0;wm&&(m+=this.vertices.length),g=Number.MAX_VALUE,m3&&i>=0;--i)r.collinear(this.at(i-1),this.at(i),this.at(i+1),e)&&(this.vertices.splice(i%this.vertices.length,1),i--,t++);return t}},{d8008e40e643f58e:"4K6SZ","27760a6f627f557e":"jyNL6",edd1be50e7a94605:"7TFSV"}],"4K6SZ":[function(e,t,i){var n=e("fea8e7ecc9e8fe4");function r(){}t.exports=r,r.lineInt=function(e,t,i){i=i||0;var r,s,a,o,h,c,l,u=[0,0];return r=e[1][1]-e[0][1],s=e[0][0]-e[1][0],a=r*e[0][0]+s*e[0][1],o=t[1][1]-t[0][1],h=t[0][0]-t[1][0],c=o*t[0][0]+h*t[0][1],l=r*h-o*s,n.eq(l,0,i)||(u[0]=(h*a-s*c)/l,u[1]=(r*c-o*a)/l),u},r.segmentsIntersect=function(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}},{fea8e7ecc9e8fe4:"7TFSV"}],"7TFSV":[function(e,t,i){function n(){}t.exports=n,n.eq=function(e,t,i){return Math.abs(e-t)<(i=i||0)}},{}],jyNL6:[function(e,t,i){function n(){}t.exports=n,n.area=function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])},n.left=function(e,t,i){return n.area(e,t,i)>0},n.leftOn=function(e,t,i){return n.area(e,t,i)>=0},n.right=function(e,t,i){return 0>n.area(e,t,i)},n.rightOn=function(e,t,i){return 0>=n.area(e,t,i)};var r=[],s=[];n.collinear=function(e,t,i,a){return a?(r[0]=t[0]-e[0],r[1]=t[1]-e[1],s[0]=i[0]-t[0],s[1]=i[1]-t[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))s)&&(s=n),(null===a||ns){var c=a;a=s,s=c}r.set(t,a,s)},a.prototype.projectOntoWorldAxis=function(e,t,i,n){var s=h;this.projectOntoLocalAxis(e,n),0!==i?r.rotate(s,e,i):s=e;var a=r.dot(t,s);r.set(n,n[0]+a,n[1]+a)},a.prototype.updateTriangles=function(){this.triangles.length=0;for(var e=[],t=0;tt&&(t=n)}this.boundingRadius=Math.sqrt(t)},a.triangleArea=function(e,t,i){return((t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1]))*.5},a.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var e=this.triangles,t=this.vertices,i=0;i!==e.length;i++){var n=e[i],r=t[n[0]],s=t[n[1]],o=t[n[2]],h=a.triangleArea(r,s,o);this.area+=h}},a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)};var p=r.create(),g=r.create(),m=r.create();a.prototype.raycast=function(e,t,i,n){var s=this.vertices;r.toLocalFrame(p,t.from,i,n),r.toLocalFrame(g,t.to,i,n);for(var a=s.length,o=0;o=0&&(r.sub(m,c,h),r.rotate(m,m,-Math.PI/2+n),r.normalize(m,m),t.reportIntersection(e,l,m,o))}}},{"841fd986776e9f0c":"fyiLV",dcb74eb19e59e896:"geg3A","84be6d54e4a9572e":"5fcbo",a884cbe4162e15c3:"5arAY"}],fyiLV:[function(e,t,i){t.exports=r;var n=e("7f0647825fa1536d");function r(e){e=e||{},this.body=null,this.position=n.fromValues(0,0),e.position&&n.copy(this.position,e.position),this.angle=e.angle||0,this.type=e.type||0,this.id=r.idCounter++,this.boundingRadius=0,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:1,this.collisionResponse=void 0===e.collisionResponse||e.collisionResponse,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:1,this.material=e.material||null,this.area=0,this.sensor=void 0!==e.sensor&&e.sensor,this.type&&this.updateBoundingRadius(),this.updateArea()}r.idCounter=0,r.CIRCLE=1,r.PARTICLE=2,r.PLANE=4,r.CONVEX=8,r.LINE=16,r.BOX=32,Object.defineProperty(r,"RECTANGLE",{get:function(){return console.warn("Shape.RECTANGLE is deprecated, use Shape.BOX instead."),r.BOX}}),r.CAPSULE=64,r.HEIGHTFIELD=128,r.prototype.computeMomentOfInertia=function(e){},r.prototype.updateBoundingRadius=function(){},r.prototype.updateArea=function(){},r.prototype.computeAABB=function(e,t,i){},r.prototype.raycast=function(e,t,i,n){}},{"7f0647825fa1536d":"geg3A"}],"5fcbo":[function(e,t,i){var n={};n.GetArea=function(e){if(e.length<6)return 0;for(var t=e.length-2,i=0,n=0;n>1;if(t<3)return[];for(var i=[],r=[],s=0;s3;){var o=r[(s+0)%a],h=r[(s+1)%a],c=r[(s+2)%a],l=e[2*o],u=e[2*o+1],d=e[2*h],f=e[2*h+1],p=e[2*c],g=e[2*c+1],m=!1;if(n._convex(l,u,d,f,p,g)){m=!0;for(var v=0;v3*a)break}return i.push(r[0],r[1],r[2]),i},n._PointInTriangle=function(e,t,i,n,r,s,a,o){var h=a-i,c=o-n,l=r-i,u=s-n,d=e-i,f=t-n,p=h*h+c*c,g=h*l+c*u,m=h*d+c*f,v=l*l+u*u,y=l*d+u*f,b=1/(p*v-g*g),x=(v*m-g*y)*b,E=(p*y-g*m)*b;return x>=0&&E>=0&&x+E<1},n._convex=function(e,t,i,n,r,s){return(t-n)*(r-i)+(i-e)*(s-n)>=0},t.exports=n},{}],bK4Qs:[function(e,t,i){var n=e("ffed16535981586e"),r=e("b8c131fd689cab6d");function s(){this.normal=n.create(),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1}t.exports=s,s.prototype.reset=function(){n.set(this.normal,0,0),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1},s.prototype.getHitDistance=function(e){return n.distance(e.from,e.to)*this.fraction},s.prototype.hasHit=function(){return -1!==this.fraction},s.prototype.getHitPoint=function(e,t){n.lerp(e,t.from,t.to,this.fraction)},s.prototype.stop=function(){this.isStopped=!0},s.prototype.shouldStop=function(e){return this.isStopped||-1!==this.fraction&&e.mode===r.ANY},s.prototype.set=function(e,t,i,r,s){n.copy(this.normal,e),this.shape=t,this.body=i,this.fraction=r,this.faceIndex=s}},{ffed16535981586e:"geg3A",b8c131fd689cab6d:"3aaBs"}],"3aaBs":[function(e,t,i){t.exports=r;var n=e("33edfb61f004dada");function r(e){e=e||{},this.from=e.from?n.fromValues(e.from[0],e.from[1]):n.create(),this.to=e.to?n.fromValues(e.to[0],e.to[1]):n.create(),this.checkCollisionResponse=void 0===e.checkCollisionResponse||e.checkCollisionResponse,this.skipBackfaces=!!e.skipBackfaces,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:-1,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:-1,this.mode=void 0!==e.mode?e.mode:r.ANY,this.callback=e.callback||function(e){},this.direction=n.create(),this.length=1,this.update()}e("9e89c41e6357f79c"),e("197f77279886c828"),e("bb1f87d75f3ca6c0"),r.prototype.constructor=r,r.CLOSEST=1,r.ANY=2,r.ALL=4,r.prototype.update=function(){var e=this.direction;n.sub(e,this.to,this.from),this.length=n.length(e),n.normalize(e,e)},r.prototype.intersectBodies=function(e,t){for(var i=0,n=t.length;!e.shouldStop(this)&&i=0||s.containsPoint(this.from))&&this.intersectBody(e,r)}};var s=n.create();r.prototype.intersectBody=function(e,t){var i=this.checkCollisionResponse;if(!i||t.collisionResponse)for(var r=0,a=t.shapes.length;rt.boundingRadius*t.boundingRadius||(this._currentBody=s,this._currentShape=t,t.raycast(e,this,r,i),this._currentBody=this._currentShape=null)},r.prototype.getAABB=function(e){var t=this.to,i=this.from;n.set(e.lowerBound,Math.min(t[0],i[0]),Math.min(t[1],i[1])),n.set(e.upperBound,Math.max(t[0],i[0]),Math.max(t[1],i[1]))},n.create(),r.prototype.reportIntersection=function(e,t,i,s){this.from,this.to;var a=this._currentShape,o=this._currentBody;if(!(this.skipBackfaces&&n.dot(i,this.direction)>0))switch(this.mode){case r.ALL:e.set(i,a,o,t,s),this.callback(e);break;case r.CLOSEST:(t=0&&(r.rotate(h,u,n),r.scale(h,h,2*f-1),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}for(var m=Math.pow(this.radius,2)+Math.pow(d,2),f=0;f<2;f++){r.set(c,d*(2*f-1),0),r.toGlobalFrame(c,c,i,n);var v=Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2),y=2*((a[0]-s[0])*(s[0]-c[0])+(a[1]-s[1])*(s[1]-c[1])),g=Math.pow(y,2)-4*v*(Math.pow(s[0]-c[0],2)+Math.pow(s[1]-c[1],2)-Math.pow(this.radius,2));if(!(g<0)){if(0===g){if(r.lerp(o,s,a,g),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}else{var b=Math.sqrt(g),x=1/(2*v),E=(-y-b)*x,w=(-y+b)*x;if(E>=0&&E<=1&&(r.lerp(o,s,a,E),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,E,h,-1),e.shouldStop(t)))||w>=0&&w<=1&&(r.lerp(o,s,a,w),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,w,h,-1),e.shouldStop(t))))return}}}}},{"9e9977082ca4fe14":"fyiLV","18975187aa31e1cf":"geg3A"}],"71oh9":[function(e,t,i){var n=e("7b96c457d59a0d0"),r=e("b89d644e39bbe061");function s(e){"number"==typeof arguments[0]&&(e={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),e=e||{},this.radius=e.radius||1,e.type=n.CIRCLE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){var t=this.radius;return e*t*t/2},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},s.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},s.prototype.computeAABB=function(e,t,i){var n=this.radius;r.set(e.upperBound,n,n),r.set(e.lowerBound,-n,-n),t&&(r.add(e.lowerBound,e.lowerBound,t),r.add(e.upperBound,e.upperBound,t))};var a=r.create(),o=r.create();s.prototype.raycast=function(e,t,i,n){var s=t.from,h=t.to,c=this.radius,l=Math.pow(h[0]-s[0],2)+Math.pow(h[1]-s[1],2),u=2*((h[0]-s[0])*(s[0]-i[0])+(h[1]-s[1])*(s[1]-i[1])),d=Math.pow(u,2)-4*l*(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)-Math.pow(c,2));if(!(d<0)){if(0===d)r.lerp(a,s,h,d),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,d,o,-1);else{var f=Math.sqrt(d),p=1/(2*l),g=(-u-f)*p,m=(-u+f)*p;if(g>=0&&g<=1&&(r.lerp(a,s,h,g),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,g,o,-1),e.shouldStop(t)))return;m>=0&&m<=1&&(r.lerp(a,s,h,m),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,m,o,-1))}}}},{"7b96c457d59a0d0":"fyiLV",b89d644e39bbe061:"geg3A"}],fl4d5:[function(e,t,i){t.exports=r;var n=e("72b9dd33e1ac0322");function r(e,t,i,r){this.type=i,r=n.defaults(r,{collideConnected:!0,wakeUpBodies:!0}),this.equations=[],this.bodyA=e,this.bodyB=t,this.collideConnected=r.collideConnected,r.wakeUpBodies&&(e&&e.wakeUp(),t&&t.wakeUp())}r.prototype.update=function(){throw Error("method update() not implmemented in this Constraint subclass!")},r.DISTANCE=1,r.GEAR=2,r.LOCK=3,r.PRISMATIC=4,r.REVOLUTE=5,r.prototype.setStiffness=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.stiffness=e,n.needsUpdate=!0}},r.prototype.setRelaxation=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.relaxation=e,n.needsUpdate=!0}}},{"72b9dd33e1ac0322":"7sQcP"}],"2hWGL":[function(e,t,i){var n=e("d1ef8939b96b621"),r=e("b8f27de80732e752");function s(e,t){n.call(this,e,t,0,Number.MAX_VALUE),this.contactPointA=r.create(),this.penetrationVec=r.create(),this.contactPointB=r.create(),this.normalA=r.create(),this.restitution=0,this.firstImpact=!1,this.shapeA=null,this.shapeB=null}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeB=function(e,t,i){var n,s,a=this.bodyA,o=this.bodyB,h=this.contactPointA,c=this.contactPointB,l=a.position,u=o.position,d=this.penetrationVec,f=this.normalA,p=this.G,g=r.crossLength(h,f),m=r.crossLength(c,f);return p[0]=-f[0],p[1]=-f[1],p[2]=-g,p[3]=f[0],p[4]=f[1],p[5]=m,r.add(d,u,c),r.sub(d,d,l),r.sub(d,d,h),this.firstImpact&&0!==this.restitution?(s=0,n=1/t*(1+this.restitution)*this.computeGW()):(s=r.dot(f,d)+this.offset,n=this.computeGW()),-s*e-n*t-i*this.computeGiMf()};var a=r.create(),o=r.create(),h=r.create();s.prototype.getVelocityAlongNormal=function(){return this.bodyA.getVelocityAtPoint(a,this.contactPointA),this.bodyB.getVelocityAtPoint(o,this.contactPointB),r.subtract(h,a,o),r.dot(this.normalA,h)}},{d1ef8939b96b621:"kSmDE",b8f27de80732e752:"geg3A"}],c7vmA:[function(e,t,i){var n=e("c9592f5c11436c3c"),r=e("16e85c8eda8f563e");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=null,this}},{c9592f5c11436c3c:"2hWGL","16e85c8eda8f563e":"5lrfq"}],"5lrfq":[function(e,t,i){function n(e){e=e||{},this.objects=[],void 0!==e.size&&this.resize(e.size)}t.exports=n,n.prototype.resize=function(e){for(var t=this.objects;t.length>e;)t.pop();for(;t.lengththis.upperLimit&&(a.maxForce=0,a.minForce=-this.maxForce,this.distance=this.upperLimit,u=!0),this.lowerLimitEnabled&&this.positionf*o&&(g=f*o-u),s[e]+=g,t.addToWlambda(g),g}},{"5da883f1a169a767":"geg3A","806c911d364412af":"cslpB","860c6aa487698116":"7sQcP","407b0a2d87bc3b6e":"6o1RQ"}],cslpB:[function(e,t,i){e("ead7d6ca55bdfe1c");var n=e("d16ea32444765393");function r(e,t){e=e||{},n.call(this),this.type=t,this.equations=[],this.equationSortFunction=e.equationSortFunction||!1}t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.solve=function(e,t){throw Error("Solver.solve should be implemented by subclasses!")};var s={bodies:[]};r.prototype.solveIsland=function(e,t){this.removeAllEquations(),t.equations.length&&(this.addEquations(t.equations),s.bodies.length=0,t.getBodies(s.bodies),s.bodies.length&&this.solve(e,s))},r.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},r.prototype.addEquation=function(e){e.enabled&&this.equations.push(e)},r.prototype.addEquations=function(e){for(var t=0,i=e.length;t!==i;t++){var n=e[t];n.enabled&&this.equations.push(n)}},r.prototype.removeEquation=function(e){var t=this.equations.indexOf(e);-1!==t&&this.equations.splice(t,1)},r.prototype.removeAllEquations=function(){this.equations.length=0},r.GS=1,r.ISLAND=2},{ead7d6ca55bdfe1c:"7sQcP",d16ea32444765393:"3wc90"}],g5PHm:[function(e,t,i){var n=e("8b74883bebf2335f"),r=e("2a849db0ba73e95d");function s(e){if(Array.isArray(arguments[0])){if(e={heights:arguments[0]},"object"==typeof arguments[1])for(var t in arguments[1])e[t]=arguments[1][t];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}e=e||{},this.heights=e.heights?e.heights.slice(0):[],this.maxValue=e.maxValue||null,this.minValue=e.minValue||null,this.elementWidth=e.elementWidth||.1,(void 0===e.maxValue||void 0===e.minValue)&&this.updateMaxMinValues(),e.type=n.HEIGHTFIELD,n.call(this,e)}e("2dc7f9a400756551"),t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.updateMaxMinValues=function(){for(var e=this.heights,t=e[0],i=e[0],n=0;n!==e.length;n++){var r=e[n];r>t&&(t=r),rf){var p=d;d=f,f=p}for(var g=0;g=0&&(r.sub(o,c,h),r.rotate(o,o,n+Math.PI/2),r.normalize(o,o),t.reportIntersection(e,m,o,-1),e.shouldStop(t)))return}}},{"8b74883bebf2335f":"fyiLV","2a849db0ba73e95d":"geg3A","2dc7f9a400756551":"7sQcP"}],"3e8Uk":[function(e,t,i){var n=e("e0cff235fc0213eb"),r=e("f3353cee691d66a4");function s(e){"number"==typeof arguments[0]&&(e={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),e=e||{},this.length=e.length||1,e.type=n.LINE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){return e*Math.pow(this.length,2)/12},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var a=[r.create(),r.create()];s.prototype.computeAABB=function(e,t,i){var n=this.length/2;r.set(a[0],-n,0),r.set(a[1],n,0),e.setFromPoints(a,t,i,0)},r.create();var o=r.create(),h=r.create(),c=r.create(),l=r.fromValues(0,1);s.prototype.raycast=function(e,t,i,n){var s=t.from,a=t.to,u=this.length/2;r.set(h,-u,0),r.set(c,u,0),r.toGlobalFrame(h,h,i,n),r.toGlobalFrame(c,c,i,n);var d=r.getLineSegmentsIntersectionFraction(h,c,s,a);d>=0&&(r.rotate(o,l,n),t.reportIntersection(e,d,o,-1))}},{e0cff235fc0213eb:"fyiLV",f3353cee691d66a4:"geg3A"}],"3C7H6":[function(e,t,i){var n=e("97b5dc61d97fd4de"),r=e("48200108ddae2806"),s=e("6dd72d87868993d0");function a(e,t,i){i=i||{},n.call(this,e,t,n.LOCK,i);var a=void 0===i.maxForce?Number.MAX_VALUE:i.maxForce;i.localAngleB;var o=new s(e,t,-a,a),h=new s(e,t,-a,a),c=new s(e,t,-a,a),l=r.create(),u=r.create(),d=this;o.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[0]},h.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[1]};var f=r.create(),p=r.create();c.computeGq=function(){return r.rotate(f,d.localOffsetB,t.angle-d.localAngleB),r.scale(f,f,-1),r.sub(u,e.position,t.position),r.add(u,u,f),r.rotate(p,f,-Math.PI/2),r.normalize(p,p),r.dot(u,p)},this.localOffsetB=r.create(),i.localOffsetB?r.copy(this.localOffsetB,i.localOffsetB):(r.sub(this.localOffsetB,t.position,e.position),r.rotate(this.localOffsetB,this.localOffsetB,-e.angle)),this.localAngleB=0,"number"==typeof i.localAngleB?this.localAngleB=i.localAngleB:this.localAngleB=t.angle-e.angle,this.equations.push(o,h,c),this.setMaxForce(a)}t.exports=a,a.prototype=new n,a.prototype.constructor=a,a.prototype.setMaxForce=function(e){for(var t=this.equations,i=0;iR&&M0)for(var E=0;EMath.pow(p,2))return 0;if(u)return!0;var g=this.createContactEquation(e,o,t,h);return r(g.normalA,c,i),n.normalize(g.normalA,g.normalA),n.scale(g.contactPointA,g.normalA,d),n.scale(g.contactPointB,g.normalA,-f),s(g.contactPointA,g.contactPointA,i),r(g.contactPointA,g.contactPointA,e.position),s(g.contactPointB,g.contactPointB,c),r(g.contactPointB,g.contactPointB,o.position),this.contactEquations.push(g),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(g)),1},k.prototype[f.PLANE|f.CONVEX]=k.prototype[f.PLANE|f.BOX]=k.prototype.planeConvex=function(e,t,i,o,h,c,l,u,d){var f=0;n.rotate(v,g,o);for(var p=0;p!==c.vertices.length;p++){var b=c.vertices[p];if(n.rotate(m,b,u),s(m,m,l),r(y,m,i),0>=a(y,v)){if(d)return!0;f++;var x=this.createContactEquation(e,h,t,c);r(y,m,i),n.copy(x.normalA,v);var E=a(y,x.normalA);n.scale(y,x.normalA,E),r(x.contactPointB,m,h.position),r(x.contactPointA,m,y),r(x.contactPointA,x.contactPointA,e.position),this.contactEquations.push(x),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&f&&this.frictionEquations.push(this.createFrictionFromAverage(f)),f},k.prototype[f.PARTICLE|f.PLANE]=k.prototype.particlePlane=function(e,t,i,s,o,h,c,l,u){l=l||0,r(m,i,c),n.rotate(v,g,l);var d=a(m,v);if(d>0)return 0;if(u)return!0;var f=this.createContactEquation(o,e,h,t);return n.copy(f.normalA,v),n.scale(m,f.normalA,d),r(f.contactPointA,i,m),r(f.contactPointA,f.contactPointA,o.position),r(f.contactPointB,i,e.position),this.contactEquations.push(f),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(f)),1},k.prototype[f.CIRCLE|f.PARTICLE]=k.prototype.circleParticle=function(e,t,i,a,o,h,c,l,u){if(r(m,c,i),n.squaredLength(m)>Math.pow(t.radius,2))return 0;if(u)return!0;var d=this.createContactEquation(e,o,t,h);return n.copy(d.normalA,m),n.normalize(d.normalA,d.normalA),n.scale(d.contactPointA,d.normalA,t.radius),s(d.contactPointA,d.contactPointA,i),r(d.contactPointA,d.contactPointA,e.position),r(d.contactPointB,c,o.position),this.contactEquations.push(d),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(d)),1};var K=new u({radius:1}),J=n.create(),$=n.create();n.create(),k.prototype[f.PLANE|f.CAPSULE]=k.prototype.planeCapsule=function(e,t,i,r,a,o,h,c,l){n.set(J,-o.length/2,0),n.rotate(J,J,c),s(J,J,h),n.set($,o.length/2,0),n.rotate($,$,c),s($,$,h),K.radius=o.radius,this.enableFrictionReduction&&(u=this.enableFriction,this.enableFriction=!1);var u,d=this.circlePlane(a,K,J,0,e,t,i,r,l),f=this.circlePlane(a,K,$,0,e,t,i,r,l);if(this.enableFrictionReduction&&(this.enableFriction=u),l)return d||f;var p=d+f;return this.enableFrictionReduction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p},k.prototype[f.CIRCLE|f.PLANE]=k.prototype.circlePlane=function(e,t,i,o,h,c,l,u,d){var f=u;f=f||0,r(m,i,l),n.rotate(v,g,f);var p=a(v,m);if(p>t.radius)return 0;if(d)return!0;var b=this.createContactEquation(h,e,c,t);return n.copy(b.normalA,v),n.scale(b.contactPointB,b.normalA,-t.radius),s(b.contactPointB,b.contactPointB,i),r(b.contactPointB,b.contactPointB,e.position),n.scale(y,b.normalA,p),r(b.contactPointA,m,y),s(b.contactPointA,b.contactPointA,l),r(b.contactPointA,b.contactPointA,h.position),this.contactEquations.push(b),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(b)),1},k.prototype[f.CONVEX]=k.prototype[f.CONVEX|f.BOX]=k.prototype[f.BOX]=k.prototype.convexConvex=function(e,t,i,o,h,c,l,u,d,f){var p=0,f="number"==typeof f?f:0;if(!k.findSeparatingAxis(t,i,o,c,l,u,m))return 0;r(T,l,i),a(m,T)>0&&n.scale(m,m,-1);var g=k.getClosestEdge(t,o,m,!0),E=k.getClosestEdge(c,u,m);if(-1===g||-1===E)return 0;for(var A=0;A<2;A++){var C,_=g,I=E,O=t,P=c,M=i,R=l,L=o,D=u,N=e,F=h;0===A&&(C=_,_=I,I=C,C=O,O=P,P=C,C=M,M=R,R=C,C=L,L=D,D=C,C=N,N=F,F=C);for(var B=I;B=3){if(d)return!0;var H=this.createContactEquation(N,F,O,P);p++;var j=O.vertices[_%O.vertices.length],W=O.vertices[(_+1)%O.vertices.length];n.rotate(y,j,L),n.rotate(b,W,L),s(y,y,M),s(b,b,M),r(x,b,y),n.rotate90cw(H.normalA,x),n.normalize(H.normalA,H.normalA),r(T,v,y);var Y=a(H.normalA,T);n.scale(w,H.normalA,Y),r(H.contactPointA,v,M),r(H.contactPointA,H.contactPointA,w),s(H.contactPointA,H.contactPointA,M),r(H.contactPointA,H.contactPointA,N.position),r(H.contactPointB,v,R),s(H.contactPointB,H.contactPointB,R),r(H.contactPointB,H.contactPointB,F.position),this.contactEquations.push(H),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(H))}}}return this.enableFrictionReduction&&this.enableFriction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p};var Q=n.fromValues(0,0);k.projectConvexOntoAxis=function(e,t,i,r,s){var o,h=null,c=null;n.rotate(Q,r,-i);for(var l=0;lh)&&(h=o),(null===c||oh){var u=c;c=h,h=u}var d=a(t,r);n.set(s,c+d,h+d)};var Z=n.fromValues(0,0),ee=n.fromValues(0,0),et=n.fromValues(0,0),ei=n.fromValues(0,0),en=n.fromValues(0,0),er=n.fromValues(0,0);k.findSeparatingAxis=function(e,t,i,s,a,o,h){var c=null,l=!1,u=!1;if(e instanceof p&&s instanceof p)for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;2!==m;m++){0===m?n.set(ei,0,1):1===m&&n.set(ei,1,0),0!==g&&n.rotate(ei,ei,g),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}else for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;m!==f.vertices.length;m++){n.rotate(ee,f.vertices[m],g),n.rotate(et,f.vertices[(m+1)%f.vertices.length],g),r(Z,et,ee),n.rotate90cw(ei,Z),n.normalize(ei,ei),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}return u};var es=n.fromValues(0,0),ea=n.fromValues(0,0),eo=n.fromValues(0,0);k.getClosestEdge=function(e,t,i,s){n.rotate(es,i,-t),s&&n.scale(es,es,-1);for(var o=-1,h=e.vertices.length,c=-1,l=0;l!==h;l++){r(ea,e.vertices[(l+1)%h],e.vertices[l%h]),n.rotate90cw(eo,ea),n.normalize(eo,eo);var u=a(eo,es);(-1===o||u>c)&&(o=l%h,c=u)}return o};var eh=n.create(),ec=n.create(),el=n.create(),eu=n.create(),ed=n.create(),ef=n.create(),ep=n.create();k.prototype[f.CIRCLE|f.HEIGHTFIELD]=k.prototype.circleHeightfield=function(e,t,i,a,o,h,c,l,u,d){var f=h.heights,d=d||t.radius,p=h.elementWidth,g=Math.floor((i[0]-d-c[0])/p),m=Math.ceil((i[0]+d-c[0])/p);g<0&&(g=0),m>=f.length&&(m=f.length-1);for(var v=f[g],y=f[m],b=g;bv&&(v=f[b]);if(i[1]-d>v)return!u&&0;for(var x=!1,b=g;b=el[0]&&eh[0]0){for(var b=g;b<=m;b++)if(n.set(el,b*p,f[b]),n.add(el,el,c),n.sub(ec,i,el),n.squaredLength(ec)=l.length&&(f=l.length-1);for(var p=l[d],g=l[f],m=d;mp&&(p=l[m]);if(e.aabb.lowerBound[1]>p)return!c&&0;for(var v=0,m=d;m(0|t)?e<<16|65535&t:t<<16|65535&e)|0},r.prototype.getByKey=function(e){return e|=0,this.data[e]},r.prototype.get=function(e,t){return this.data[this.getKey(e,t)]},r.prototype.set=function(e,t,i){if(!i)throw Error("No data!");var n=this.getKey(e,t);return this.data[n]||this.keys.push(n),this.data[n]=i,n},r.prototype.reset=function(){for(var e=this.data,t=this.keys,i=t.length;i--;)delete e[t[i]];t.length=0},r.prototype.copy=function(e){this.reset(),n.appendArray(this.keys,e.keys);for(var t=e.keys.length;t--;){var i=e.keys[t];this.data[i]=e.data[i]}}},{"8f6c901d02437d27":"7sQcP"}],"1uf32":[function(e,t,i){var n=e("57927c61fbcf992f"),r=e("1e621ded3903d68e"),s=e("a8501ada722b06e1");function a(e){"number"==typeof arguments[0]&&"number"==typeof arguments[1]&&(e={width:arguments[0],height:arguments[1]},console.warn("The Rectangle has been renamed to Box and its constructor signature has changed. Please use the following format: new Box({ width: 1, height: 1, ... })")),e=e||{};var t=this.width=e.width||1,i=this.height=e.height||1,a=[n.fromValues(-t/2,-i/2),n.fromValues(t/2,-i/2),n.fromValues(t/2,i/2),n.fromValues(-t/2,i/2)],o=[n.fromValues(1,0),n.fromValues(0,1)];e.vertices=a,e.axes=o,e.type=r.BOX,s.call(this,e)}t.exports=a,a.prototype=new s,a.prototype.constructor=a,a.prototype.computeMomentOfInertia=function(e){var t=this.width,i=this.height;return e*(i*i+t*t)/12},a.prototype.updateBoundingRadius=function(){var e=this.width,t=this.height;this.boundingRadius=Math.sqrt(e*e+t*t)/2},n.create(),n.create(),n.create(),n.create(),a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)},a.prototype.updateArea=function(){this.area=this.width*this.height}},{"57927c61fbcf992f":"geg3A","1e621ded3903d68e":"fyiLV",a8501ada722b06e1:"jXoGk"}],liK4P:[function(e,t,i){e("852348000d7d6d69"),e("b1906358d63dd535"),e("2589eb1c960dc6a0"),e("41d1d194c5bc6ec2");var n=e("c59906df004f11c2");function r(){n.call(this,n.NAIVE)}e("3a4bfb1510f2f292"),t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.getCollisionPairs=function(e){var t=e.bodies,i=this.result;i.length=0;for(var r=0,s=t.length;r!==s;r++)for(var a=t[r],o=0;o0)&&!(r.squaredDistance(s,c)d)p.angle=d,-1===r.indexOf(p)&&r.push(p);else{var v=r.indexOf(p);-1!==v&&r.splice(v,1)}if(this.lowerLimitEnabled&&mi)a.scale(r.normalA,c,-1),a.sub(r.contactPointA,l,o.position),a.sub(r.contactPointB,u,h.position),a.scale(p,c,i),a.add(r.contactPointA,r.contactPointA,p),-1===e.indexOf(r)&&e.push(r);else{var x=e.indexOf(r);-1!==x&&e.splice(x,1)}if(this.lowerLimitEnabled&&y=0&&!(e[s].aabb.lowerBound[t]<=r.aabb.lowerBound[t]);s--)e[s+1]=e[s];e[s+1]=r}return e},s.prototype.sortList=function(){var e=this.axisList,t=this.axisIndex;s.sortAxisList(e,t)},s.prototype.getCollisionPairs=function(e){var t=this.axisList,i=this.result,n=this.axisIndex;i.length=0;for(var s=t.length;s--;){var a=t[s];a.aabbNeedsUpdate&&a.updateAABB()}this.sortList();for(var o=0,h=0|t.length;o!==h;o++)for(var c=t[o],l=o+1;l=e&&n=0;g-=2)for(var T=b.length-2;T>=0;T-=2)(w[g]===b[T]&&w[g+1]===b[T+1]||w[g+1]===b[T]&&w[g]===b[T+1])&&b.splice(T,2);var A=l.length;for(g=0;g!==A;g++){var C=l[g];if(!C.collideConnected)for(var T=b.length-2;T>=0;T-=2)(C.bodyA===b[T]&&C.bodyB===b[T+1]||C.bodyB===b[T]&&C.bodyA===b[T+1])&&b.splice(T,2)}this.postBroadphaseEvent.pairs=b,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,c.reset(this);for(var g=0,_=b.length;g!==_;g+=2)for(var I=b[g],O=b[g+1],P=0,M=I.shapes.length;P!==M;P++)for(var R=I.shapes[P],L=R.position,D=R.angle,k=0,N=O.shapes.length;k!==N;k++){var F=O.shapes[k],B=F.position,U=F.angle,V=this.defaultContactMaterial;if(R.material&&F.material){var G=this.getContactMaterial(R.material,F.material);G&&(V=G)}this.runNarrowphase(c,I,R,L,D,O,F,B,U,V,this.frictionGravity)}for(var g=0;g!==o;g++){var j=n[g];j._wakeUpAfterNarrowphase&&(j.wakeUp(),j._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(S);for(var W=this.endContactEvent,k=S.length;k--;){var Y=S[k];W.shapeA=Y.shapeA,W.shapeB=Y.shapeB,W.bodyA=Y.bodyA,W.bodyB=Y.bodyB,this.emit(W)}S.length=0}var H=this.preSolveEvent;H.contactEquations=c.contactEquations,H.frictionEquations=c.frictionEquations,this.emit(H),H.contactEquations=H.frictionEquations=null;var A=l.length;for(g=0;g!==A;g++)l[g].update();if(c.contactEquations.length||c.frictionEquations.length||A){if(this.islandSplit){for(f.equations.length=0,v.appendArray(f.equations,c.contactEquations),v.appendArray(f.equations,c.frictionEquations),g=0;g!==A;g++)v.appendArray(f.equations,l[g].equations);f.split(this);for(var g=0;g!==f.islands.length;g++){var z=f.islands[g];z.equations.length&&a.solveIsland(e,z)}}else{for(a.addEquations(c.contactEquations),a.addEquations(c.frictionEquations),g=0;g!==A;g++)a.addEquations(l[g].equations);this.solveConstraints&&a.solve(e,this),a.removeAllEquations()}}for(var g=0;g!==o;g++){var j=n[g];j.integrate(e)}for(var g=0;g!==o;g++)n[g].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,g=0;g!==c.contactEquations.length;g++){var q=c.contactEquations[g];q.firstImpact&&(X.bodyA=q.bodyA,X.bodyB=q.bodyB,X.shapeA=q.shapeA,X.shapeB=q.shapeB,X.contactEquation=q,this.emit(X))}if(this.sleepMode===x.BODY_SLEEPING)for(g=0;g!==o;g++)n[g].sleepTick(this.time,!1,e);else if(this.sleepMode===x.ISLAND_SLEEPING&&this.islandSplit){for(g=0;g!==o;g++)n[g].sleepTick(this.time,!0,e);for(var g=0;g0,e.frictionCoefficient=l.friction,f=t.type===u.STATIC||t.type===u.KINEMATIC?a.mass:a.type===u.STATIC||a.type===u.KINEMATIC?t.mass:t.mass*a.mass/(t.mass+a.mass),e.slipForce=l.friction*d*f,e.restitution=l.restitution,e.surfaceVelocity=l.surfaceVelocity,e.frictionStiffness=l.frictionStiffness,e.frictionRelaxation=l.frictionRelaxation,e.stiffness=l.stiffness,e.relaxation=l.relaxation,e.contactSkinSize=l.contactSkinSize,e.enabledEquations=t.collisionResponse&&a.collisionResponse&&i.collisionResponse&&o.collisionResponse;var m=e[i.type|o.type],v=0;if(m){var y=i.sensor||o.sensor,b=e.frictionEquations.length;v=i.type=2*Math.pow(a.sleepSpeedLimit,2)&&(t._wakeUpAfterNarrowphase=!0),a.allowSleep&&a.type===u.DYNAMIC&&a.sleepState===u.SLEEPING&&t.sleepState===u.AWAKE&&t.type!==u.STATIC&&r.squaredLength(t.velocity)+Math.pow(t.angularVelocity,2)>=2*Math.pow(t.sleepSpeedLimit,2)&&(a._wakeUpAfterNarrowphase=!0),this.overlapKeeper.setOverlapping(t,i,a,o),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(i,o)){var E=this.beginContactEvent;if(E.shapeA=i,E.shapeB=o,E.bodyA=t,E.bodyB=a,E.contactEquations.length=0,"number"==typeof v)for(var S=e.contactEquations.length-v;S1)for(var S=e.frictionEquations.length-x;S=0;t--)this.removeConstraint(e[t]);for(var i=this.bodies,t=i.length-1;t>=0;t--)this.removeBody(i[t]);for(var n=this.springs,t=n.length-1;t>=0;t--)this.removeSpring(n[t]);for(var r=this.contactMaterials,t=r.length-1;t>=0;t--)this.removeContactMaterial(r[t]);x.apply(this)};var A=r.create(),C=(r.fromValues(0,0),r.fromValues(0,0));x.prototype.hitTest=function(e,t,i){i=i||0;var n=new u({position:e}),l=new c;n.addShape(l);for(var d=this.narrowphase,f=[],p=0,g=t.length;p!==g;p++)for(var m=t[p],v=0,y=m.shapes.length;v!==y;v++){var b=m.shapes[v];r.rotate(A,b.position,m.angle),r.add(A,A,m.position);var x=b.angle+m.angle;(b instanceof s&&d.circleParticle(m,b,A,x,n,l,e,0,!0)||b instanceof a&&d.particleConvex(n,l,e,0,m,b,A,x,!0)||b instanceof o&&d.particlePlane(n,l,e,0,m,b,A,x,!0)||b instanceof h&&d.particleCapsule(n,l,e,0,m,b,A,x,!0)||b instanceof c&&r.squaredLength(r.sub(C,A,e)) (http://steffe.se)","keywords":["p2.js","p2","physics","engine","2d"],"main":"./src/p2.js","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/schteppe/p2.js.git"},"bugs":{"url":"https://github.com/schteppe/p2.js/issues"},"licenses":[{"type":"MIT"}],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},"dependencies":{"poly-decomp":"0.1.1"}}')},{}],kYZwj:[function(e,t,i){var n=e("d1c511ff43075908");e("6ad6aae9d3178c1c");var r=e("ae69163b5e95d902");function s(){this.overlappingShapesLastState=new n,this.overlappingShapesCurrentState=new n,this.recordPool=new r({size:16}),this.tmpDict=new n,this.tmpArray1=[]}e("ca81eee98f7bd467"),t.exports=s,s.prototype.tick=function(){for(var e=this.overlappingShapesLastState,t=this.overlappingShapesCurrentState,i=e.keys.length;i--;){var n=e.keys[i],r=e.getByKey(n);t.getByKey(n),r&&this.recordPool.release(r)}e.reset(),e.copy(t),t.reset()},s.prototype.setOverlapping=function(e,t,i,n){this.overlappingShapesLastState;var r=this.overlappingShapesCurrentState;if(!r.get(t.id,n.id)){var s=this.recordPool.get();s.set(e,t,i,n),r.set(t.id,n.id,s)}},s.prototype.getNewOverlaps=function(e){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,e)},s.prototype.getEndOverlaps=function(e){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,e)},s.prototype.bodiesAreOverlapping=function(e,t){for(var i=this.overlappingShapesCurrentState,n=i.keys.length;n--;){var r=i.keys[n],s=i.data[r];if(s.bodyA===e&&s.bodyB===t||s.bodyA===t&&s.bodyB===e)return!0}return!1},s.prototype.getDiff=function(e,t,i){var i=i||[];i.length=0;for(var n=t.keys.length;n--;){var r=t.keys[n],s=t.data[r];if(!s)throw Error("Key "+r+" had no data!");e.data[r]||i.push(s)}return i},s.prototype.isNewOverlap=function(e,t){var i=0|e.id,n=0|t.id,r=this.overlappingShapesLastState,s=this.overlappingShapesCurrentState;return!r.get(i,n)&&!!s.get(i,n)},s.prototype.getNewBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getEndBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getBodyDiff=function(e,t){t=t||[];for(var i=this.tmpDict,n=e.length;n--;){var r=e[n];i.set(0|r.bodyA.id,0|r.bodyB.id,r)}for(n=i.keys.length;n--;){var r=i.getByKey(i.keys[n]);r&&t.push(r.bodyA,r.bodyB)}return i.reset(),t}},{d1c511ff43075908:"gyzPH","6ad6aae9d3178c1c":"cwAfS",ae69163b5e95d902:"fO0xd",ca81eee98f7bd467:"7sQcP"}],cwAfS:[function(e,t,i){function n(e,t,i,n){this.shapeA=t,this.shapeB=n,this.bodyA=e,this.bodyB=i}t.exports=n,n.prototype.set=function(e,t,i,r){n.call(this,e,t,i,r)}},{}],fO0xd:[function(e,t,i){var n=e("ef39e4c8e830c20e"),r=e("6e41b1482492ad2f");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=e.shapeA=e.shapeB=null,this}},{ef39e4c8e830c20e:"cwAfS","6e41b1482492ad2f":"5lrfq"}],bVaR4:[function(e,t,i){e("f7108e810eaecffd"),e("50bfc1b1a312ac2f"),e("2f6d951f62024392");var n=e("9526c01719846e44"),r=e("82ea80983f48bd5f"),s=e("29efc1b1b871dc45");function a(e){this.nodePool=new n({size:16}),this.islandPool=new r({size:8}),this.equations=[],this.islands=[],this.nodes=[],this.queue=[]}t.exports=a,a.getUnvisitedNode=function(e){for(var t=e.length,i=0;i!==t;i++){var n=e[i];if(!n.visited&&n.body.type===s.DYNAMIC)return n}return!1},a.prototype.visit=function(e,t,i){t.push(e.body);for(var n=e.equations.length,r=0;r!==n;r++){var s=e.equations[r];-1===i.indexOf(s)&&i.push(s)}},a.prototype.bfs=function(e,t,i){var n=this.queue;for(n.length=0,n.push(e),e.visited=!0,this.visit(e,t,i);n.length;)for(var r,o=n.pop();r=a.getUnvisitedNode(o.neighbors);)r.visited=!0,this.visit(r,t,i),r.body.type===s.DYNAMIC&&n.push(r)},a.prototype.split=function(e){for(var t,i=e.bodies,n=this.nodes,r=this.equations;n.length;)this.nodePool.release(n.pop());for(var s=0;s!==i.length;s++){var o=this.nodePool.get();o.body=i[s],n.push(o)}for(var h=0;h!==r.length;h++){var c=r[h],s=i.indexOf(c.bodyA),l=i.indexOf(c.bodyB),u=n[s],d=n[l];u.neighbors.push(d),d.neighbors.push(u),u.equations.push(c),d.equations.push(c)}for(var f=this.islands,s=0;s{this.worldDateTime=new Date},1e3)}enablePathFinder(){this.usePathFinder&&(this.pathFinder=new h,this.pathFinder.world=this,this.pathFinder.createGridFromMap())}validateRequiredProperties(e){this.events||f.error("EventsManager undefined in P2world."),this.roomId&&this.sceneName&&this.sceneTiledMapFile||(p.critical("World creation missing data in options.",{roomId:this.roomId,sceneName:this.sceneName,sceneTiledMapFile:this.sceneTiledMapFile}),f.error("World creation missing data in options.")),this.config||f.error("Missing Config Manager.")}async createWorldContent(e){if(!this.validateMapData(this.mapJson)){p.error("Missing map data.",this.mapJson);return}this.shouldGroupBodies()||p.warning("Group bodies fully disabled, this can impact performance."),this.changePoints=this.getSceneChangePoints(e);let t=this.mapJson.layers,i=[];for(let e of t){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayerBefore",t),i.push(...await this.createLayerContents(t.layer)),await this.events.emit("reldens.parsingMapLayerAfter",t)}for(let e of i){let{layer:t,tileIndex:i,tileW:n,tileH:r,posX:s,posY:a}=e;await this.createRoomObjectBody(t,i,n,r,s,a)}for(let e of(this.processBodiesQueue(),t)){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayersAfterBodiesQueue",t)}p.info("Total wall bodies found: "+this.totalBodiesCount,"Total wall bodies created: "+this.totalBodiesCreated)}processBodiesQueue(){for(let e of(this.queueBodies.sort((e,t)=>e.tileIndexes[0]-t.tileIndexes[0]),this.queueBodies))this.addBody(e);this.queueBodies=[]}async createLayerContents(e){let t=this.mapJson.tilewidth,i=this.mapJson.tileheight,n=t/2,r=i/2,s=-1!==e.name.indexOf("change-points"),a=-1!==e.name.indexOf("collisions"),o=[];for(let h=0;he.y?s:-s),h=e.x+(t.x>e.x?a:-a),c=Math.atan2(t.y-o,t.x-h),l=180*c/Math.PI,u=i.key?i.key:"",f=i.magnitude*Math.cos(c),g=i.magnitude*Math.sin(c),m=this.calculateDirection(i,e,t);p.debug('Shooting bullet "'+u+'":',{objectWidth:n,objectHeight:r,bulletY:o,bulletX:h,fromPosition:e,toPosition:t,bulletAngle:l,speedX:f,speedY:g});let v="BULLET_"+this.determineFromType(i),y=this.createCollisionBody(n,r,h,o,this.bulletsBodyType,d.COLLISIONS[v],1,!0,!0,u,m);y.updateMassProperties(),y.roomObject=i,y.hitPriority=i.hitPriority?i.hitPriority:2,y.isRoomObject=!0,y.isBullet=!0,y.key=""===u?"bullet-"+y.id:u,this.addBody(y);let b=u+"_bullet_"+y.id;return y.bodyStateId=b,i.room.state.addBodyToState(y.bodyState,b),y.angle=l,y.originalSpeed={x:f,y:g},y.velocity[0]=f,y.velocity[1]=g,y}determineFromType(e){return this.typeDeterminer.isPlayer(e.owner)?d.FROM_TYPES.PLAYER:this.typeDeterminer.isObject(e.owner)?d.FROM_TYPES.OBJECT:d.FROM_TYPES.OTHER}calculateDirection(e,t,i){return 3===g.get(e,"animDir",!1)?t.x=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t=this.length)){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)}},t.prototype.setAt=function(t,i){if(null==i){console.error("ArraySchema items cannot be null nor undefined; Use `deleteAt(index)` instead.");return}if(this.$items.get(t)!==i){void 0!==i.$changes&&i.$changes.setParent(this,this.$changes.root,t);var n,r,s=null!==(r=null===(n=this.$changes.indexes[t])||void 0===n?void 0:n.op)&&void 0!==r?r:e.OPERATION.ADD;this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,i),this.$changes.change(t,s)}},t.prototype.deleteAt=function(e){var t=Array.from(this.$items.keys())[e];return void 0!==t&&this.$deleteAt(t)},t.prototype.$deleteAt=function(e){return this.$changes.delete(e),this.$indexes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.concat=function(){for(var e,i=[],n=0;n>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,boolean:function(e,t){return S(e,t?1:0)},float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},int16:A,int32:_,int64:O,int8:T,number:F,string:N,uint16:C,uint32:I,uint64:P,uint8:S,utf8Write:w,writeFloat32:D,writeFloat64:k});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),q=new Float32Array(X.buffer),K=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),q[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),K[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,arrayCheck:function(e,t){return e[t.offset]<160},boolean:function(e,t){return V(e,t)>0},float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int16:G,int32:W,int64:H,int8:U,number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},readFloat32:J,readFloat64:$,string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},switchStructureCheck:ee,uint16:j,uint32:Y,uint64:z,uint8:V}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){var t=this.refCounts[e];if(void 0===t){console.warn("trying to remove reference ".concat(e," that doesn't exist"));return}if(0===t){console.warn("trying to remove reference ".concat(e," with 0 refCount"));return}this.refCounts[e]=t-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:l;if(p===e.OPERATION.CLEAR){r.clear(s);continue}var y=f?l%(p||255):Z(i,n),b=f?r._definition.fieldsByIndex[y]:"",x=d.getType(y),E=void 0,w=void 0,T=void 0;if(f?w=r["_".concat(b)]:(w=r.getByIndex(y),(p&e.OPERATION.ADD)===e.OPERATION.ADD?(T=r instanceof m?Q(i,n):y,r.setIndex(y,T)):T=r.getIndex(y)),(p&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(p!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(y),w&&w.$changes&&a.removeRef(w.$changes.refId),E=null),void 0===b){console.warn("@colyseus/schema: definition mismatch");for(var S={offset:n.offset};n.offsets?t[0]+n[0]:s,h=t[1]+n[1]>a?t[1]+n[1]:a,c=t[0]-n[0]<0?t[0]-n[0]:0,l=t[1]-n[1]<0?t[1]-n[1]:0,u=this.grid.getNodeAt(o,t[1]);u&&!u.walkable&&(u=this.grid.getNodeAt(t[0],h))&&!u.walkable&&(u=this.grid.getNodeAt(o,h))&&!u.walkable&&(u=this.grid.getNodeAt(c,t[1]))&&!u.walkable&&(u=this.grid.getNodeAt(t[0],l))&&!u.walkable&&(u=this.grid.getNodeAt(c,l))&&!u.walkable&&(u=this.grid.getNodeAt(c,h))&&!u.walkable&&(u=this.grid.getNodeAt(o,l)),u&&u.walkable&&(i=this.grid.clone(),r=this.finder.findPath(e[0],e[1],u.x,u.y,i))}return r}}},{d026eb33ec4f8a6d:"3lwy5","8e5cc24e68f2d485":"jSlJ0"}],jSlJ0:[function(e,t,i){t.exports=e("c08c5d893d481d77")},{c08c5d893d481d77:"110ct"}],"110ct":[function(e,t,i){t.exports={Heap:e("a11c2d2f6228b64d"),Node:e("5d6357416bae419"),Grid:e("eb2500554bbf40a2"),Util:e("b8fdf53e7c2bda86"),DiagonalMovement:e("ea6942fe46b7874a"),Heuristic:e("cc79ac15c71b85de"),AStarFinder:e("92550c19cc8290da"),BestFirstFinder:e("8fe7b6287e43173"),BreadthFirstFinder:e("49f4cbf7cb03de5a"),DijkstraFinder:e("f055f2df42298a76"),BiAStarFinder:e("ae88c656fdc0b402"),BiBestFirstFinder:e("6dfdccafa1ea046a"),BiBreadthFirstFinder:e("4f4a8a58aa00c271"),BiDijkstraFinder:e("f9f2731f8e4ac9f4"),IDAStarFinder:e("548d4f7f580680d4"),JumpPointFinder:e("c94d58273ef6271a")}},{a11c2d2f6228b64d:"j1Rgs","5d6357416bae419":"eTBTH",eb2500554bbf40a2:"4U8Sg",b8fdf53e7c2bda86:"eXbk6",ea6942fe46b7874a:"44ekP",cc79ac15c71b85de:"7ivQz","92550c19cc8290da":"b9jsj","8fe7b6287e43173":"j0U38","49f4cbf7cb03de5a":"c3dtf",f055f2df42298a76:"aTw5v",ae88c656fdc0b402:"gqRU9","6dfdccafa1ea046a":"OQep8","4f4a8a58aa00c271":"5kxE6",f9f2731f8e4ac9f4:"b2sHM","548d4f7f580680d4":"9146d",c94d58273ef6271a:"8thbF"}],j1Rgs:[function(e,t,i){t.exports=e("30b1093da33c692b")},{"30b1093da33c692b":"jKwEm"}],jKwEm:[function(e,t,i){(function(){var e,i,n,r,s,a,o,h,c,l,u,d,f,p,g;n=Math.floor,l=Math.min,i=function(e,t){return et?1:0},c=function(e,t,r,s,a){var o;if(null==r&&(r=0),null==a&&(a=i),r<0)throw Error("lo must be non-negative");for(null==s&&(s=e.length);ra(t,e[o=n((r+s)/2)])?s=o:r=o+1;return[].splice.apply(e,[r,r-r].concat(t)),t},a=function(e,t,n){return null==n&&(n=i),e.push(t),p(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,g(e,0,t)):r=n,r},h=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,g(e,0,n),r},o=function(e,t,n){var r;return null==n&&(n=i),e.length&&0>n(e[0],t)&&(t=(r=[e[0],t])[0],e[0]=r[1],g(e,0,n)),t},r=function(e,t){var r,s,a,o,h,c;for(null==t&&(t=i),o=(function(){c=[];for(var t=0,i=n(e.length/2);0<=i?ti;0<=i?t++:t--)c.push(t);return c}).apply(this).reverse(),h=[],s=0,a=o.length;sn(a=p[u],o)&&(c(h,a,0,null,n),h.pop(),o=h[h.length-1]);return h}for(r(e,n),m=[],d=0,g=l(t,e.length);0<=g?dg;0<=g?++d:--d)m.push(s(e,n));return m},p=function(e,t,n,r){var s,a,o;for(null==r&&(r=i),s=e[n];n>t;){if(0>r(s,a=e[o=n-1>>1])){e[n]=a,n=o;continue}break}return e[n]=s},g=function(e,t,n){var r,s,a,o,h;for(null==n&&(n=i),s=e.length,h=t,a=e[t],r=2*t+1;rn(e[r],e[o]))&&(r=o),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,p(e,h,t,n)},e=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=a,e.pop=s,e.replace=h,e.pushpop=o,e.heapify=r,e.updateItem=f,e.nlargest=u,e.nsmallest=d,e.prototype.push=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return -1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return h(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return o(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return r(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return f(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(null!==t?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)},{}],eTBTH:[function(e,t,i){t.exports=function(e,t,i){this.x=e,this.y=t,this.walkable=void 0===i||i}},{}],"4U8Sg":[function(e,t,i){var n=e("3debe8dfc5f4b19"),r=e("1630f01fef4aa0f7");function s(e,t,i){var n;"object"!=typeof e?n=e:(t=e.length,n=e[0].length,i=e),this.width=n,this.height=t,this.nodes=this._buildNodes(n,t,i)}s.prototype._buildNodes=function(e,t,i){var r,s,a=Array(t);for(r=0;r=0&&e=0&&t-o&&(h-=o,e+=r),c0&&new Date().getTime()-l>1e3*this.timeLimit)return 1/0;var o,h,f,g,m,v=t+u(e,p)*this.weight;if(v>i)return v;if(e==p)return n[a]=[e.x,e.y],e;var y=s.getNeighbors(e,this.diagonalMovement);for(g=0,h=1/0;m=y[g];++g){if(this.trackRecursion&&(m.retainCount=m.retainCount+1||1,!0!==m.tested&&(m.tested=!0)),(f=d(m,t+(o=m,e.x===o.x||e.y===o.y?1:Math.SQRT2),i,n,a+1))instanceof r)return n[a]=[e.x,e.y],f;this.trackRecursion&&0==--m.retainCount&&(m.tested=!1),fthis.worldWidth?this.worldWidth:e.column,e.row=e.row<0?0:e.row,e.row=e.row>this.worldHeight?this.worldHeight:e.row,e}}},{}],"5zAcU":[function(e,t,i){let{Logger:n,sc:r}=e("9b59b4ef27f548b6");t.exports.WorldTimer=class{constructor(e){this.clockInstance=r.get(e,"clockInstance",!1),this.callbacks=r.get(e,"callbacks",[]),this.worldTimer={},this.paused=!1,this.lastCallTime=0,this.stepTime=0,this.startedTime=new Date().getTime(),this.currentTime=this.startedTime}startWorldSteps(e){if(!e){n.error("World instance invalid.",{world:e});return}if(this.stepTime=1e3*e.timeStep,this.clockInstance){this.worldTimer=this.clockInstance.setInterval(()=>{this.setIntervalCallback(e)},this.stepTime);return}this.worldTimer=setInterval(()=>{this.setIntervalCallback(e)},this.stepTime)}setIntervalCallback(e){this.paused||(this.currentTime+=this.stepTime,this.stepWorld(e),this.executeCallbacks())}stepWorld(e){if(e.useFixedWorldStep){e.step(e.timeStep);return}this.stepWorldWithSubSteps(e)}executeCallbacks(){if(0!==this.callbacks.length)for(let e of this.callbacks)e()}stepWorldWithSubSteps(e){let t=Date.now()/1e3-this.lastCallTime;e.step(e.timeStep,t,e.maxSubSteps)}}},{"9b59b4ef27f548b6":"3lwy5"}],"4xzUf":[function(e,t,i){let{PlayerEnginePrediction:n}=e("35dabd79ba23aa99"),{SceneDynamic:r}=e("caa2ee44a66bdd90");t.exports.RoomEventsOverride=class{createCurrentPlayerOverride(e){e.createCurrentPlayer=async(t,i,n)=>{e.engineStarted=!0,await e.startEngineScene(t,e.room,i);let r=e.getActiveScene();if(!e.isValidScene(r,t))return!1;for(let s of(await e.events.emit("reldens.playersQueueBefore",t,n,i,e),Object.keys(e.playersQueue)))r.player.addPlayer(s,e.playersQueue[s]);r.experimentalClientPrediction&&(r.player.positionFromServer=t);let s={player:t,key:n,previousScene:i,roomEvents:e};return await e.events.emit("reldens.createCurrentPlayer",s),s}}playerOnChangeOverride(e){e.playersOnChange=(t,i,n)=>{if(t.state.scene!==e.roomName)return;let r=e.getActiveScene();if(e.playerExists(r,i)){if(r.experimentalClientPrediction&&e.isCurrentPlayer(i)){r.player.positionFromServer=t;return}r.player.updatePlayer(i,t)}}}createSceneInstanceOverride(e){e.createSceneInstance=(e,t,i)=>{let n=new r(e,t,i);return n.experimentalClientPrediction=i.config.get("client/general/engine/experimentalClientPrediction"),n.worldPrediction=!1,n}}createPlayerEngineInstanceOverride(e){e.createPlayerEngineInstance=(e,t,i,r)=>new n({scene:e,playerData:t,gameManager:i,room:r})}}},{"35dabd79ba23aa99":"8hflc",caa2ee44a66bdd90:"6Vn5m"}],"8hflc":[function(e,t,i){let{PlayerEngine:n}=e("a2861f4cd568519f"),{GameConst:r}=e("78935193245f5a91");t.exports.PlayerEnginePrediction=class extends n{constructor(e){super(e),this.predictionBody=!1,this.positionFromServer=!1;let t=this.gameManager.config.get("client/players/reconciliation/timeOutMs");this.reconciliationTimeOutMs=!1===t?1e3:Number(t)}left(){if("pressed"===this.lastKeyState[r.LEFT])return;let e={dir:r.LEFT};this.lastKeyState[r.LEFT]="pressed",this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.LEFT,!0)),this.roomEvents.send(e)}right(){if("pressed"===this.lastKeyState[r.RIGHT])return;this.lastKeyState[r.RIGHT]="pressed";let e={dir:r.RIGHT};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.RIGHT,!0)),this.roomEvents.send(e)}up(){if("pressed"===this.lastKeyState[r.UP])return;this.lastKeyState[r.UP]="pressed";let e={dir:r.UP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.UP,!0)),this.roomEvents.send(e)}down(){if("pressed"===this.lastKeyState[r.DOWN])return;this.lastKeyState[r.DOWN]="pressed";let e={dir:r.DOWN};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.DOWN,!0)),this.roomEvents.send(e)}stop(){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let e={act:r.STOP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.reconcilePosition()),this.roomEvents.send(e)}reconcilePosition(){this.predictionBody&&this.positionFromServer&&(this.predictionBody.stopFull(),setTimeout(()=>{this.predictionBody.position[0]=this.positionFromServer.state.x,this.predictionBody.position[1]=this.positionFromServer.state.y,this.predictionBody.dir=this.positionFromServer.state.dir,this.updatePlayer(this.playerId,this.positionFromServer)},this.reconciliationByTimeOutMs()))}reconciliationTimeOutCallBack(){return!1}reconciliationByTimeOutMs(){let e=this.reconciliationTimeOutCallBack();return Number(!1!==e?e:this.reconciliationTimeOutMs)}moveToPointer(e){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let t={act:r.POINTER,column:e.worldColumn,row:e.worldRow,x:e.worldX-this.leftOff,y:e.worldY-this.topOff};if(this.predictionBody&&this.pointsValidator){this.reconcilePosition();let e=Object.assign({},t);e=this.pointsValidator.makeValidPoints(e),this.predictionBody.moveToPoint(e)}this.roomEvents.send(t)}}},{a2861f4cd568519f:"3GkIQ","78935193245f5a91":"93TbC"}],"8MUNa":[function(e,t,i){let{PluginInterface:n}=e("ff0cd3a039680b50"),{TargetBoxEnricher:r}=e("bc896f1b30e26c8b"),{TeamMessageListener:s}=e("b9e6a2d82debed5b"),{ClanMessageListener:a}=e("d88cac34aed27f09"),{MessageProcessor:o}=e("187e0a90a62f31a1"),{TemplatesHandler:h}=e("a77183244ab38ca1"),{TeamsConst:c}=e("817bd734dbf4f984"),{Logger:l,sc:u}=e("5bd001817d1a1fe2");t.exports.TeamsPlugin=class extends n{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in TeamsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in TeamsPlugin."),this.teamMessageListener=new s,this.clanMessageListener=new a,this.listenEvents(),this.listenMessages()}listenMessages(){this.gameManager&&this.events&&(this.gameManager.config.client.message.listeners[c.KEY]=this.teamMessageListener,this.gameManager.config.client.message.listeners[c.CLAN_KEY]=this.clanMessageListener)}listenEvents(){this.events&&(this.events.on("reldens.createEngineSceneDone",e=>{let t=e.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Team messages queue on TeamsPlugin.",e),!1;o.processClanMessagesQueue(t,this.clanMessageListener),o.processTeamMessagesQueue(t,this.teamMessageListener)}),this.events.on("reldens.preloadUiScene",e=>{h.preloadTemplates(e)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{r.appendClanInviteButton(this.gameManager,t,i,n),r.appendTeamInviteButton(this.gameManager,t,i,n)}))}fetchTeamPlayerBySessionId(e){let t=this.gameManager.gameEngine.uiScene.currentTeam;if(!t)return!1;for(let i of Object.keys(t)){let n=t[i];if(n.sessionId===e)return n}return!1}}},{ff0cd3a039680b50:"fC3To",bc896f1b30e26c8b:"h6ORZ",b9e6a2d82debed5b:"2r7vd",d88cac34aed27f09:"dhhBt","187e0a90a62f31a1":"58JKl",a77183244ab38ca1:"7FChA","817bd734dbf4f984":"eA0W7","5bd001817d1a1fe2":"3lwy5"}],h6ORZ:[function(e,t,i){let{TeamsConst:n}=e("813960296055cff0"),{GameConst:r}=e("26255ed26260a75a"),{Logger:s,sc:a}=e("603fc0fc02377d1b");t.exports.TargetBoxEnricher=class{static appendClanInviteButton(e,t,i,n){let r=e?.gameEngine?.uiScene?.currentClan;if(!r)return!1;if(!r.ownerId)return s.error("Current clan missing owner.",r),!1;if(this.playerBySessionId(r,t.id))return!1;let a=e.getCurrentPlayer();if(!this.targetIsValidPlayer(t,a))return!1;let o=e.config.getWithoutLogs("client/clan/general/openInvites",!1);return(e.playerData.id.toString()===r.ownerId.toString()||!!o)&&this.appendInviteButton("clan",t,e,n)}static appendTeamInviteButton(e,t,i,n){return!(!this.targetIsValidPlayer(t,e.getCurrentPlayer())||e.getFeature("teams").fetchTeamPlayerBySessionId(t.id))&&this.appendInviteButton("team",t,e,n)}static appendInviteButton(e,t,i,r){let o=i.gameEngine.uiScene;if(!1===a.get(o,"uiTarget",!1))return s.critical('Missing "uiTarget" on uiScene.'),!1;let h=o.cache.html.get(e+"PlayerInvite");if(!h)return s.critical('Template "'+e+'PlayerInvite" not found.'),!1;i.gameDom.appendToElement("#target-container",i.gameEngine.parseTemplate(h,{playerName:r,playerId:t.player_id,inviteLabel:i.config.getWithoutLogs(e+"/labels/inviteLabel",n.LABELS[e.toUpperCase()].INVITE_BUTTON_LABEL)}));let c=i.gameDom.getElement("."+e+"-invite-"+t.player_id+" button");c?.addEventListener("click",()=>{let r={act:n.ACTIONS[e.toUpperCase()+"_INVITE"],id:t.player_id};i.activeRoomEvents.send(r),c.style.display="none",i.gameEngine.clearTarget()})}static targetIsValidPlayer(e,t){return r.TYPE_PLAYER===e.type&&t.playerId!==e.id}static playerBySessionId(e,t){let i=Object.keys(e.players);if(0===i.length)return!1;for(let n of i)if(e.players[n].sessionId===t)return e.players[n];return!1}}},{"813960296055cff0":"eA0W7","26255ed26260a75a":"93TbC","603fc0fc02377d1b":"3lwy5"}],eA0W7:[function(e,t,i){let n="cln.";t.exports.TeamsConst={KEY:"teams",CLAN_KEY:"clan",TEAM_PREF:"tm.",CLAN_PREF:n,NAME_LIMIT:50,CLAN_STARTING_POINTS:1,VALIDATION:{SUCCESS:1,NAME_EXISTS:2,LEVEL_ISSUE:3,CREATE_ERROR:4,CREATE_OWNER_ERROR:5},ACTIONS:{TEAM_INVITE:"tm.inv",TEAM_ACCEPTED:"tm.acp",TEAM_LEAVE:"tm.lev",TEAM_UPDATE:"tm.upd",TEAM_LEFT:"tm.lef",TEAM_REMOVE:"tm.rem",CLAN_INITIALIZE:n+"ini",CLAN_CREATE:n+"new",CLAN_INVITE:n+"inv",CLAN_ACCEPTED:n+"acp",CLAN_LEAVE:n+"lev",CLAN_UPDATE:n+"upd",CLAN_LEFT:n+"lef",CLAN_REMOVE:n+"rem",CLAN_REMOVED:n+"remd",CLAN_NAME:n+"nam"},LABELS:{TEAM:{INVITE_BUTTON_LABEL:"Team - Invite",REQUEST_FROM:"Accept team request from:",LEADER_NAME_TITLE:"Team leader: %leaderName",DISBAND:"Disband Team",LEAVE:"Leave Team",PROPERTY_MAX_VALUE:"/ %propertyMaxValue"},CLAN:{CREATE_CLAN_TITLE:"Clan - Creation",INVITE_BUTTON_LABEL:"Clan - Invite",REQUEST_FROM:"Accept clan request from:",CLAN_TITLE:"Clan: %clanName - Leader: %leaderName",NAME_PLACEHOLDER:"Choose a clan name...",CREATE:"Create",DISBAND:"Disband Clan",LEAVE:"Leave Clan",PROPERTY_MAX_VALUE:"/ %propertyMaxValue",PLAYERS_TITLE:"Connected Players:",MEMBERS_TITLE:"Clan Members:",NONE_CONNECTED:"None"}},CHAT:{MESSAGE:{INVITE_ACCEPTED:"%playerName has accepted your invitation.",INVITE_REJECTED:"%playerName has rejected your invitation.",DISBANDED:"%playerName has disbanded the %groupName.",LEFT:"You left the %groupName.",LEAVE:"%playerName has left the %groupName.",REMOVED:"%playerName has been removed from the %groupName.",ENTER:"%playerName has enter the %groupName.",NOT_ENOUGH_PLAYERS:"The team was disbanded due to a lack of players."}}}},{}],"2r7vd":[function(e,t,i){let{TeamMessageHandler:n}=e("6d14aca88eebc089"),{TeamsConst:r}=e("2253975335b3fdcf"),{Logger:s,sc:a}=e("d3f666b286aee6e5");t.exports.TeamMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on TeamMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on TeamMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isTeamMessage(t)&&this.handleTeamMessage(t,r):(this.isTeamMessage(t)&&(i.teamMessagesQueue||(i.teamMessagesQueue=[]),i.teamMessagesQueue.push(t)),s.error("Invalid TeamMessageHandler",r),!1)}handleTeamMessage(e,t){return r.ACTIONS.TEAM_INVITE===e.act?t.showTeamRequest():r.ACTIONS.TEAM_UPDATE===e.act?t.showTeamBox():r.ACTIONS.TEAM_LEFT!==e.act||t.removeTeamUi()}isTeamMessage(e){return 0===e.act?.indexOf(r.TEAM_PREF)}}},{"6d14aca88eebc089":"4FmFV","2253975335b3fdcf":"eA0W7",d3f666b286aee6e5:"3lwy5"}],"4FmFV":[function(e,t,i){let{UserInterface:n}=e("640ee5228c27b39"),{TeamsConst:r}=e("e52de429595682ab"),{Logger:s,sc:a}=e("3da1dc36372a33e1");t.exports.TeamMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on TeamMessageHandler."),!1):(s.info("Missing message on TeamMessageHandler."),!1):(s.info("Missing RoomEvents on TeamMessageHandler."),!1)}showTeamRequest(){this.createTeamUi(this.teamUiKey()),this.roomEvents.initUi({id:this.teamUiKey(),title:this.gameManager.config.getWithoutLogs("client/team/labels/requestFromTitle",r.LABELS.TEAM.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.TEAM_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-1-"+this.teamUiKey())?.addEventListener("click",()=>{this.gameDom.removeElement(".team-invite")}),this.gameDom.getElement("#opt-2-"+this.teamUiKey())?.addEventListener("click",()=>{this.removeTeamUi()})}removeTeamUi(){let e=this.gameManager.getUiElement(this.teamUiKey());if(!e)return s.error('UI Element not found by team UI key "'+this.teamUiKey()+'".'),!1;e.removeElement(),delete this.uiScene.userInterfaces[this.teamUiKey()],delete this.uiScene.elementsUi[this.teamUiKey()],this.uiScene.currentTeam=!1}teamUiKey(){return r.KEY+this.message.id}showTeamBox(){let e=this.teamUiKey();this.createTeamUi(e);let t=this.gameManager.config.getWithoutLogs("client/team/labels/leaderNameTitle",r.LABELS.TEAM.LEADER_NAME_TITLE).replace("%leaderName",this.message.leaderName),i=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!i)return s.error('Missing container: "#box-'+e+' .box-content".'),!1;let n=this.uiScene.elementsUi[e];this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene);let o=a.get(this.message,"players",!1);this.uiScene.currentTeam=o,this.updateTeamBox(o,i)}createTeamUi(e){return a.get(this.uiScene.userInterfaces,e)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[e]=new n(this.gameManager,{id:e,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-teams.html",r.KEY),this.uiScene.userInterfaces[e].createUiElement(this.uiScene,r.KEY),this.uiScene.userInterfaces[e])}updateTeamBox(e,t){if(!e){s.error("Players not defined.",e);return}let i="";for(let t of Object.keys(e))i+=this.createTeamMemberBox(e[t]);t.innerHTML=this.createTeamContainer(i),this.activateTeamPlayerActions(e),this.activateTeamLeaveButtonAction()}createTeamContainer(e){let t=this.uiScene.cache.html.get("teamContainer");if(!t)return s.error('Missing template "teamContainer".'),"";let i=this.gameManager.playerData.id.toString(),n=i===this.message.id.toString(),a="client/team/labels/",o=n?this.gameManager.config.getWithoutLogs(a+"disbandLabel",r.LABELS.TEAM.DISBAND):this.gameManager.config.getWithoutLogs(a+"leaveLabel",r.LABELS.TEAM.LEAVE),h={teamId:this.message.id,playerId:i,leaveActionLabel:o,teamMembers:e};return this.gameManager.gameEngine.parseTemplate(t,h)}activateTeamLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.gameManager.playerData.id.toString());e?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_LEAVE,id:this.message.id})})}createTeamMemberBox(e){let t=this.uiScene.cache.html.get("teamPlayerData");if(!t)return s.error('Missing template "teamPlayerData".'),"";let i=this.gameManager.playerData.id.toString()===this.message.id.toString();return this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties),playerRemove:i?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("teamRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id}):(s.error('Missing template "teamRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/team/labels/propertyMaxValue",r.LABELS.TEAM.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateTeamPlayerActions(e){for(let t of Object.keys(e)){let i=e[t],n=".team-player-"+i.player_id+" .player-name";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let s=".team-player-"+i.player_id+" .properties-list-container";this.gameDom.getElement(s)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let a=".team-player-"+i.player_id+" .team-remove-button";this.gameDom.getElement(a)?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_REMOVE,id:this.message.id,remove:i.player_id})})}}}},{"640ee5228c27b39":"bzImH",e52de429595682ab:"eA0W7","3da1dc36372a33e1":"3lwy5"}],dhhBt:[function(e,t,i){let{ClanMessageHandler:n}=e("ffee11c5f30da2da"),{TeamsConst:r}=e("80c3d53d947c2511"),{Logger:s,sc:a}=e("b7dc8fe4d702b1c7");t.exports.ClanMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ClanMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ClanMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isClanMessage(t)&&this.handleClanMessage(t,r):(this.isClanMessage(t)&&(i.clanMessagesQueue||(i.clanMessagesQueue=[]),i.clanMessagesQueue.push(t)),!1)}handleClanMessage(e,t){return r.ACTIONS.CLAN_INITIALIZE===e.act?t.initializeClanUi():r.ACTIONS.CLAN_CREATE===e.act?r.VALIDATION.SUCCESS===e.result?t.showNewClan():t.initializeClanUi():r.ACTIONS.CLAN_INVITE===e.act?t.showClanRequest():r.ACTIONS.CLAN_UPDATE===e.act?t.showClanBox():r.ACTIONS.CLAN_LEFT===e.act?t.removeClanUi():!r.ACTIONS.CLAN_REMOVED||(t.removeClanUi(),t.initializeClanUi())}isClanMessage(e){return 0===e.act?.indexOf(r.CLAN_PREF)}}},{ffee11c5f30da2da:"9FVGq","80c3d53d947c2511":"eA0W7",b7dc8fe4d702b1c7:"3lwy5"}],"9FVGq":[function(e,t,i){let{UserInterface:n}=e("2dee0f2dc70de1b2"),{TeamsConst:r}=e("435f9309a487dcac"),{Logger:s,sc:a}=e("937cade469140286");t.exports.ClanMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?!!this.uiScene&&this.gameManager.playerData?.id:(s.info("Missing GameManager on ClanMessageHandler."),!1):(s.info("Missing message on ClanMessageHandler."),!1):(s.info("Missing RoomEvents on ClanMessageHandler."),!1)}initializeClanUi(){this.uiScene.currentClan=!1;let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/createClanTitle",r.LABELS.CLAN.CREATE_CLAN_TITLE),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: "#box-clan .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:this.createClanContent()},this.uiScene),this.activateCreateButton(),this.addAndRemoveCaptureKeys()}showNewClan(){let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.gameManager.currentPlayerName()),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: ".clan-dialog-box .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene),this.updateClanBox(i),this.setClanFromMessage()}showClanRequest(){this.createClanUi(),this.roomEvents.initUi({id:r.CLAN_KEY,title:this.gameManager.config.getWithoutLogs("client/clan/labels/requestFromTitle",r.LABELS.CLAN.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.CLAN_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-clan")?.addEventListener("click",()=>{this.initializeClanUi()})}showClanBox(){this.createClanUi();let e=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.message.leaderName),t=this.gameManager.gameDom.getElement("#box-clan .box-content");if(!t)return s.error('Missing container: "#box-clan .box-content".'),!1;let i=this.uiScene.elementsUi[r.CLAN_KEY];this.roomEvents.uiSetTitle(i,{title:e}),this.roomEvents.uiSetContent(i,{content:""},this.uiScene),this.setClanFromMessage(),this.updateClanBox(t)}setClanFromMessage(){let e=a.get(this.message,"players",!1),t=a.get(this.message,"members",!1);this.uiScene.currentClan={id:this.message.id,name:this.message.clanName,leader:this.message.leaderName,ownerId:this.message.ownerId,players:e,members:t}}removeClanUi(){let e=this.gameManager.getUiElement(r.CLAN_KEY);if(!e)return s.error("Clan UI Element not found for remove."),!1;e.removeElement(),delete this.uiScene.userInterfaces[r.CLAN_KEY],delete this.uiScene.elementsUi[r.CLAN_KEY]}createClanUi(){return a.get(this.uiScene.userInterfaces,r.CLAN_KEY)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[r.CLAN_KEY]=new n(this.gameManager,{id:r.CLAN_KEY,type:r.CLAN_KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-clan.html",r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY].createUiElement(this.uiScene,r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY])}createClanContent(){let e=this.uiScene.cache.html.get("clanCreate");if(!e)return s.error('Missing template "clanCreate".'),"";let t={playerId:this.gameManager.playerData.id.toString(),createLabel:this.gameManager.config.getWithoutLogs("client/clan/labels/createLabel",r.LABELS.CLAN.CREATE),clanNamePlaceholder:this.gameManager.config.getWithoutLogs("client/clan/labels/namePlaceholder",r.LABELS.CLAN.NAME_PLACEHOLDER)};return this.gameManager.gameEngine.parseTemplate(e,t)}activateCreateButton(){let e=this.gameManager.gameDom.getElement(".clan-dialog-box .submit-clan-create");if(!e)return s.warning('Clan create button not found by ".clan-dialog-box .clan-create".'),!1;let t=this.gameManager.gameDom.getElement(".clan-dialog-box .clan-name-input");if(!t)return s.warning('Clan create button not found by ".clan-dialog-box .clan-name-input".'),!1;e.addEventListener("click",()=>{if(0===t.value.length)return!1;this.gameManager.gameDom.updateContent(".clan-dialog-box .box-content",this.uiScene.cache.html.get("uiLoading")),this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_CREATE,[r.ACTIONS.CLAN_NAME]:t.value})})}updateClanBox(e){let t=a.get(this.message,"players",[]),i=Object.keys(t),n=0===i.length?this.gameManager.config.getWithoutLogs("client/clan/labels/noneConnected",r.LABELS.CLAN.NONE_CONNECTED):"";for(let e of i)n+=this.createClanPlayerBox(t[e]);let s=this.gameManager.playerData.id.toString()===this.message.ownerId.toString(),o=a.get(this.message,"members",[]),h="";for(let e of Object.keys(o))h+=this.createClanMemberBox(o[e],s);e.innerHTML=this.createClanContainer(n,h),this.activateClanPlayersActions(t),this.activateClanMembersActions(o),this.activateClanLeaveButtonAction()}addAndRemoveCaptureKeys(){let e=this.gameManager.getActiveScene(),t=e.availableControllersKeyCodes(),i=this.gameManager.gameDom.getElement(".clan-name-input");e.addAndRemoveCapture(t,i)}createClanContainer(e,t){let i=this.uiScene.cache.html.get("clanContainer");if(!i)return s.error('Missing template "clanContainer".'),"";let n=this.gameManager.playerData.id.toString()===this.message.ownerId.toString()?this.gameManager.config.getWithoutLogs("client/clan/labels/disbandLabel",r.LABELS.CLAN.DISBAND):this.gameManager.config.getWithoutLogs("client/clan/labels/leaveLabel",r.LABELS.CLAN.LEAVE),a={clanId:this.message.id,playerId:this.gameManager.playerData.id.toString(),leaveActionLabel:n,clanPlayersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanPlayersTitle",r.LABELS.CLAN.PLAYERS_TITLE),clanPlayers:e,clanMembersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanMembersTitle",r.LABELS.CLAN.MEMBERS_TITLE),clanMembers:t};return this.gameManager.gameEngine.parseTemplate(i,a)}activateClanLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.message.id);e?.addEventListener("click",()=>{let e={act:r.ACTIONS.CLAN_LEAVE,id:this.message.id};this.gameManager.activeRoomEvents.send(e)})}createClanPlayerBox(e){let t=this.uiScene.cache.html.get("clanPlayerData");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties)}):(s.error('Missing template "clanPlayerData".'),"")}createClanMemberBox(e,t){let i=this.uiScene.cache.html.get("clanMemberData");if(!i)return s.error('Missing template "clanMemberData".'),"";let n=e.id.toString()!==this.message.ownerId.toString();return this.gameManager.gameEngine.parseTemplate(i,{playerId:e.id.toString(),playerName:e.name,clanRemove:t&&n?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("clanRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.id.toString()}):(s.error('Missing template "clanRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/clan/labels/propertyMaxValue",r.LABELS.CLAN.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateClanPlayersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-player-"+t+" .player-name",r=".clan-player-"+t+" .properties-list-container",a=this.gameDom.getElement(n);a||s.notice("Player name element not found.",n),a?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let o=this.gameDom.getElement(r);a||s.notice("Player properties element not found.",r),o?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)})}}activateClanMembersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-member-"+i.id+" .clan-remove-button";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_REMOVE,id:this.message.id,remove:i.id})})}}}},{"2dee0f2dc70de1b2":"bzImH","435f9309a487dcac":"eA0W7","937cade469140286":"3lwy5"}],"58JKl":[function(e,t,i){let{ClanMessageHandler:n}=e("b6102a2bc5547886"),{TeamMessageHandler:r}=e("8b82527a10949305"),{sc:s}=e("600e9765de53cf98");t.exports.MessageProcessor=class{static processClanMessagesQueue(e,t){if(s.isArray(e.clanMessagesQueue)&&0!==e.clanMessagesQueue.length){for(let i of e.clanMessagesQueue)t.handleClanMessage(i,new n({roomEvents:e,message:i}));e.clanMessagesQueue=[]}}static processTeamMessagesQueue(e,t){if(s.isArray(e.teamMessagesQueue)&&0!==e.teamMessagesQueue.length){for(let i of e.teamMessagesQueue)t.handleTeamMessage(i,new r({roomEvents:e,message:i}));e.teamMessagesQueue=[]}}}},{b6102a2bc5547886:"9FVGq","8b82527a10949305":"4FmFV","600e9765de53cf98":"3lwy5"}],"7FChA":[function(e,t,i){let{TeamsConst:n}=e("7ae425e7585f8b77");t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/teams/templates/";e.load.html(n.KEY,t+"ui-teams.html"),e.load.html(n.CLAN_KEY,t+"ui-clan.html"),e.load.html("teamPlayerInvite",t+"team-invite.html"),e.load.html("teamPlayerAccept",t+"team-accept.html"),e.load.html("teamRemove",t+"team-remove.html"),e.load.html("teamContainer",t+"team-container.html"),e.load.html("teamPlayerData",t+"team-player-data.html"),e.load.html("clanCreate",t+"clan-create.html"),e.load.html("clanPlayerInvite",t+"clan-invite.html"),e.load.html("clanPlayerAccept",t+"clan-accept.html"),e.load.html("clanRemove",t+"clan-remove.html"),e.load.html("clanContainer",t+"clan-container.html"),e.load.html("clanPlayerData",t+"clan-player-data.html"),e.load.html("clanMemberData",t+"clan-member-data.html"),e.load.html("teamsSharedProperty",t+"shared-property.html")}}},{"7ae425e7585f8b77":"eA0W7"}],tkJox:[function(e,t,i){let{Translator:n}=e("c0b37a63a164ee2"),{SnippetsUi:r}=e("248d3f3dadbe8854"),{TemplatesHandler:s}=e("1f76a945ba4ca26b"),{TranslationsMapper:a}=e("9f2145cb2c70fb80"),o=e("3cdaeb7ca281fdbe"),{SnippetsConst:h}=e("12b107607eac2374"),{PluginInterface:c}=e("b68fb0c66be53b"),{Logger:l,sc:u}=e("b6c13c4a8fae8965");t.exports.SnippetsPlugin=class extends c{setup(e){if(this.gameManager=u.get(e,"gameManager",!1),!this.gameManager)return l.error("Game Manager undefined in InventoryPlugin."),!1;this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in InventoryPlugin."),a.forConfig(this.gameManager.config.client,o),this.activeLocale=this.gameManager.initialGameData?.userLocale?.locale.locale||h.DEFAULT_LOCALE,this.gameManager.services.translator=new n({snippets:Object.assign({},this.gameManager.config.client.snippets),dataValues:Object.assign({},this.gameManager.config.client.snippetsDataValues),locale:h.DEFAULT_LOCALE,activeLocale:this.activeLocale}),this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async(e,t,i,n)=>{this.gameManager.services.translator.snippets=Object.assign(this.gameManager.services.translator.snippets,this.gameManager.config.client.snippets)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new r(e),this.uiManager.createUi()})}}},{c0b37a63a164ee2:"aYgYW","248d3f3dadbe8854":"4basu","1f76a945ba4ca26b":"1GX4b","9f2145cb2c70fb80":"1fcQw","3cdaeb7ca281fdbe":"5lWrq","12b107607eac2374":"biSFs",b68fb0c66be53b:"fC3To",b6c13c4a8fae8965:"3lwy5"}],aYgYW:[function(e,t,i){let{SnippetsConst:n}=e("f53f6da57661aae5"),{sc:r}=e("ca9a001439841d68");t.exports.Translator=class{constructor(e){this.snippets=r.get(e,"snippets",{}),this.dataValues=r.get(e,"dataValues",{}),this.locale=r.get(e,"locale",n.DEFAULT_LOCALE),this.activeLocale=r.get(e,"activeLocale",n.DEFAULT_LOCALE)}translate(e,t={},i=!1){i||(i=this.activeLocale);let n=r.get(this.snippets[i],e,e);if(e===n)return e;if(!r.isObject(t))return n;let s=Object.keys(t);if(0===s.length)return n;let a=this.snippetNameSpace(e);for(let e of s){let i=t[e],r="%"+((this.dataValues[a]||{})[e]||e);for(;-1!==n.indexOf(r);)n=n.replace(r,i)}return n}snippetNameSpace(e){let t=e.split(".");return 1===t.length?n.DATA_VALUES_DEFAULT_NAMESPACE:t[0]}t(e,t={},i=!1){return this.translate(e,t,i)}}},{f53f6da57661aae5:"biSFs",ca9a001439841d68:"3lwy5"}],"4basu":[function(e,t,i){let{SnippetsConst:n}=e("9095968e9689ed1b"),{Logger:r,sc:s}=e("4383b901c356e103");t.exports.SnippetsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.translator=this.gameManager.services.translator,this.locales={}}createUi(){this.locales=s.get(this.gameManager.config.client,"locales",{});let e=Object.keys(this.locales);if(1>=e.length)return!1;let t=this.gameManager.gameEngine.parseTemplate(this.uiScene.cache.html.get(n.KEY),{snippetsTitle:this.translator.t("translator.title"),snippetsLabel:this.translator.t("translator.label"),snippetsNotification:this.translator.t("translator.notification")});if(!this.gameManager.gameDom.appendToElement("#settings-dynamic",t))return r.warning("Could not append snippets settings."),!1;let i=this.gameManager.gameDom.getElement(".snippets-setting");if(!i)return r.warning("Snippets settings container not available."),!1;for(let t of e){let e=this.locales[t],n=this.gameManager.gameDom.createElement("option");n.value=e.id,n.innerHTML=e.country_code,i.appendChild(n)}i.addEventListener("change",async()=>{this.gameManager.activeRoomEvents.send({act:n.ACTIONS.UPDATE,up:i.value})})}}},{"9095968e9689ed1b":"biSFs","4383b901c356e103":"3lwy5"}],"1GX4b":[function(e,t,i){let{SnippetsConst:n}=e("da1bec0d581b3bb0");t.exports.TemplatesHandler=class{static preloadTemplates(e){e.load.html(n.KEY,"/assets/features/snippets/templates/ui-snippets.html")}}},{da1bec0d581b3bb0:"biSFs"}],"5lWrq":[function(e,t,i){t.exports={translator:{title:"Languages Settings",label:"Choose your language:",notification:"Changes will take place after next login."}}},{}],aNIyr:[function(e,t,i){let{MessagesListener:n}=e("85a323b712a32599"),{SdkHandler:r}=e("1313cc258c10bcc1"),{ProvidersList:s}=e("939d602a1b11a3bf"),a=e("e0bd7042f0c03284"),{TranslationsMapper:o}=e("ae904a587e959599"),{AdsConst:h}=e("b33cf15ea82be794"),{PluginInterface:c}=e("9d441f820e5e636d"),{Logger:l,sc:u}=e("d2d2d55e6ca71f4b");t.exports.AdsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in AdsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in AdsPlugin."),this.config={},this.activeProviders={},this.playedAds=null,this.setConfig(),this.setSkdHandler(),this.fetchActiveProviders(),this.setTranslations(),this.listenEvents()}setConfig(){this.config=!!this.gameManager&&this.gameManager.config.get("client/ads/general",{})}setSkdHandler(){let e=this.gameManager?.gameDom;this.sdkHandler=!!e&&new r({gameDom:e,config:this.config})}fetchActiveProviders(){let e=u.get(this.config,"providers",{}),t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t.enabled&&(t.classDefinition=u.get(s,i,!1),this.activeProviders[i]=t)}}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,h.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager||!this.sdkHandler)return l.error("Missing properties for AdsPlugin."),!1;this.events.on("reldens.beforeCreateEngine",async(e,t)=>{if(!this.sdkHandler){l.info("Undefined SDK Handler.");return}await this.sdkHandler.setupProvidersSdk(this.activeProviders,t)}),this.events.on("reldens.joinedRoom",async e=>{await n.listenMessages(e,this)})}}},{"85a323b712a32599":"abfmj","1313cc258c10bcc1":"cOb0P","939d602a1b11a3bf":"dIdRn",e0bd7042f0c03284:"dPTjY",ae904a587e959599:"1fcQw",b33cf15ea82be794:"8NbLx","9d441f820e5e636d":"fC3To",d2d2d55e6ca71f4b:"3lwy5"}],abfmj:[function(e,t,i){let{AdsConst:n}=e("4348dc3fba513ca9"),{Logger:r}=e("c1c750da7e6bb927");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.ACTIONS.ADS_PLAYED!==e.act)return!1;if(t.playedAds={},!e.playedAdsModels)return r.info("None played ads.",e),!1;for(let i of e.playedAdsModels)t.playedAds[i.ads_id]=i;return!0})}}},{"4348dc3fba513ca9":"8NbLx",c1c750da7e6bb927:"3lwy5"}],"8NbLx":[function(e,t,i){t.exports.AdsConst={ENVIRONMENTS:{DISABLED:"disabled"},ADS_TYPES:{EVENT_VIDEO:"eventVideo",BANNER:"banner"},ACTIONS:{ADS_PLAYED:"adsP",AD_STARTED:"adS",AD_ENDED:"adE"},MESSAGE:{DATA_VALUES:{NAMESPACE:"ads"}},AWAIT_ADS_TIME:1e3,VIDEOS_MINIMUM_DURATION:3e3}},{}],cOb0P:[function(e,t,i){let{Logger:n,sc:r}=e("e03372517c231481");t.exports.SdkHandler=class{constructor(e){this.gameDom=r.get(e,"gameDom",!1)}async setupProvidersSdk(e,t){if(!this.gameDom)return n.error("Undefined GameDOM on SdkHandler."),!1;if(!r.isObject(e))return!1;let i=Object.keys(e);if(0===i.length)return!1;for(let r of i){let i=e[r];await this.appendSdk(i),await this.activateSdkInstance(i,t),n.info("Activated Ads SDK: "+i.key,i)}}async appendSdk(e){let t=r.get(e,"sdkUrl","");if(""===t)return!1;let i=this.gameDom.getElement("body"),n=this.gameDom.createElement("script");return n.src=t,i.append(n),!0}async activateSdkInstance(e,t){e.classDefinition&&(e.service=new e.classDefinition(e,t,e.activeAds)),r.isFunction(e.service?.activate)&&await e.service.activate()}}},{e03372517c231481:"3lwy5"}],dIdRn:[function(e,t,i){let{CrazyGames:n}=e("e56ab7764646c7b3"),{GameMonetize:r}=e("1a058a436deb6e61"),{GoogleAdSense:s}=e("e8b34c41dab1ace");t.exports.ProvidersList={crazyGames:n,gameMonetize:r,googleAdSense:s}},{e56ab7764646c7b3:"3CRbF","1a058a436deb6e61":"6XwV3",e8b34c41dab1ace:"8V0yJ"}],"3CRbF":[function(e,t,i){let{BannersHandler:n}=e("f96686ce9c54877d"),{VideosHandler:r}=e("786a85289268fabd"),{AdsProvider:s}=e("25abe1dccff858a9"),{AdsConst:a}=e("9c8391f4374e1d6f"),{Logger:o}=e("ff1ebd8b8b8b16e6");t.exports.CrazyGames=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.sdk=this.window?.CrazyGames?.SDK,this.retry=0,this.environment=a.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.metaData.sdkBannerRefreshTime||(this.metaData.sdkBannerRefreshTime=6e4),this.activeAds=this.fetchActiveAds(e);let i={gameManager:t,metaData:e,sdk:this.sdk,hasAdblock:this.hasAdblock,isEnabled:this.isEnabled};this.bannersHandler=new n(i),this.videosHandler=new r(i)}fetchActiveAds(e){return this.gameManager?.config?s.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}validAdsTypes(){return[a.ADS_TYPES.BANNER,a.ADS_TYPES.EVENT_VIDEO]}async activate(){return this.sdk?(this.environment=await this.sdk.getEnvironment(),this.bannersHandler.sdk=this.sdk,this.videosHandler.sdk=this.sdk,!await this.hasAdblock()&&void await this.activateAds()):(this.retry===this.metaData.sdkMaxRetries?o.critical("CrazyGames required object."):this.retry{this.retry++,o.info("CrazyGames required object, retry #"+this.retry+"."),this.sdk=this.window?.CrazyGames?.SDK,this.sdk&&o.info("CrazyGames object found."),this.activate()},this.metaData.sdkRetryTime),!1)}async hasAdblock(){try{let e=await this.sdk.ad.hasAdblock();return e&&o.critical("Adblock detected, please disable."),e}catch(e){o.info("SDK detected error.",e)}return!1}async isEnabled(){return a.ENVIRONMENTS.DISABLED!==await this.sdk.getEnvironment()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return!1;for(let t of e){let e=this.activeAds[t];a.ADS_TYPES.BANNER===e.type.key&&await this.bannersHandler.activateAdBanner(e),a.ADS_TYPES.EVENT_VIDEO===e.type.key&&await this.videosHandler.activateAdVideo(e)}}}},{f96686ce9c54877d:"rqZs2","786a85289268fabd":"74T2t","25abe1dccff858a9":"iayFu","9c8391f4374e1d6f":"8NbLx",ff1ebd8b8b8b16e6:"3lwy5"}],rqZs2:[function(e,t,i){let{Validator:n}=e("3e58599d4b199bfe"),{Logger:r,sc:s}=e("16dda0dd59cf6195");t.exports.BannersHandler=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.metaData=s.get(e,"metaData",{}),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=s.get(e,"sdk",!1),this.hasAdblock=s.get(e,"hasAdblock",!1),this.isEnabled=s.get(e,"isEnabled",!1),this.activeBanners={},this.validator=new n}availableBanners(){return["728x90","300x250","320x50","468x60","320x100"]}availableResponsiveBanners(){return["970x90","320x50","160x600","336x280","728x90","300x600","468x60","970x250","300x250","250x250","120x600"]}validBannerSize(e){return -1!==this.availableBanners().indexOf(e)}validResponsiveBannerSize(e){return -1!==this.availableResponsiveBanners().indexOf(e)}async activateAdBanner(e){if(!e)return r.info("Missing activate ad.",e),!1;if(!this.validator.validate(this))return r.info("Invalid banner."),!1;let t=e.bannerData;if(!t)return r.info("No banner data."),!1;let i=s.get(t,"fullTime",!1),n=s.get(t,"responsive",!1);if(i)return await this.handleBannerType(n,e);let a=s.get(t,"uiReferenceIds",[]);if(0===a.length)return r.warning("Missing banner reference ID."),!1;this.events.on("reldens.openUI",async t=>{if(-1!==a.indexOf("ANY")||-1!==a.indexOf(t.openButton.id)){let i=e.id+"-"+t.openButton.id,r=new Date().getTime(),a=s.get(this.activeBanners,i,!1);if(a&&r{let i=e.id+"-"+t.openButton.id,n=s.get(this.activeBanners,i,!1);n&&n.banner.classList.add("hidden")})}async handleBannerType(e,t,i){return e?this.createResponsiveBanner(t,i):await this.createBanner(t,i)}async createBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=s.get(e.styles,"width","300"),n=s.get(e.styles,"height","250");if(!this.validBannerSize(i+"x"+n))return r.info("CrazyGames - Invalid Banner size."),!1;let a=t||e.id;if(!a)return r.info("CrazyGames - Missing container ID.",e,t),!1;let o=this.gameDom.createElement("div","banner-container-"+a);this.gameDom.getElement("body")?.append(o),await this.isEnabled()&&await this.sdk.banner.requestBanner({id:o.id,width:i,height:n});let h=this.mapStylesWithValues(Object.assign({width:i,height:n},e));return this.gameDom.setElementStyles(o,h),o.classList.add("ads-banner-container"),o}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}mapStylesWithValues(e){let t={"z-index":2e8,width:s.get(e,"width",300),height:s.get(e,"height",250),position:""===s.get(e.styles,"position","")?e.position:"absolute"},i=s.get(e.styles,"top",null);null!==i&&(t.top=i);let n=s.get(e.styles,"bottom",null);null!==n&&(t.bottom=n);let r=s.get(e.styles,"left",null);null!==r&&(t.left=r);let a=s.get(e.styles,"right",null);return null!==a&&(t.right=a),t}async createResponsiveBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=t||e.id;if(!i)return r.info("CrazyGames - Missing container ID.",e,t),!1;let n=this.gameDom.createElement("div","responsive-banner-container-"+i),s=this.mapStylesWithValues(e);return delete s.width,delete s.height,this.gameDom.setElementStyles(n,s),this.gameDom.getElement("body").append(n),await this.isEnabled()&&await this.sdk.banner.requestResponsiveBanner(n.id),n.classList.add("ads-banner-container"),n}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}}},{"3e58599d4b199bfe":"dZuZ9","16dda0dd59cf6195":"3lwy5"}],dZuZ9:[function(e,t,i){let{Logger:n,sc:r}=e("11b40ed905e7acf1");t.exports.Validator=class{validate(e){return e.gameManager?e.sdk?(e.hasAdblock&&r.isFunction(e.hasAdblock)||n.warning("Missing or invalid hasAdblock function on Validator.",e),!!(e.isEnabled&&r.isFunction(e.isEnabled))||(n.error("Missing or invalid isEnabled function on Validator.",e),!1)):(n.error("Missing SDK on Validator.",e),!1):(n.error("Missing Game Manager on Validator.",e),!1)}async canBeActivated(e){return!(!r.isFunction(e.hasAdblock)||await e.hasAdblock())||(n.info("AdBlocker detected."),!1)}}},{"11b40ed905e7acf1":"3lwy5"}],"74T2t":[function(e,t,i){let{Validator:n}=e("eb221c6f45d898b0"),{AdsConst:r}=e("ff99f7bef03d711b"),{Logger:s,sc:a}=e("111cbb28b14bd31b");t.exports.VideosHandler=class{constructor(e){this.gameManager=a.get(e,"gameManager",!1),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=a.get(e,"sdk",!1),this.hasAdblock=a.get(e,"hasAdblock",!1),this.isEnabled=a.get(e,"isEnabled",!1),this.validator=new n,this.isPlayingAd=!1,this.setConfig()}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}async activateAdVideo(e){let t=a.get(e,"eventKey",!1);if(!t)return s.warning("Missing event key.",e),!1;this.events.on(t,async t=>this.isPlayingAd?(s.info("CrazyGames - Another ad is been played."),!1):this.validator.validate(this)&&await this.validator.canBeActivated(this)?this.isEnabled()?await this.tryRePlay(e):(s.info("CrazyGames - SDK not enabled."),!1):(s.error("CrazyGames - Ad can not be activated."),!1))}async tryRePlay(e){let t=this.gameManager.getFeature("ads");if(null===t.playedAds)return setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1;if(a.get(t?.playedAds,e.id,!1)&&!e.replay)return s.info("Ad already played",e),!1;let i=a.get(e,"adStartedCallback",()=>{this.isPlayingAd=!0,s.info("CrazyGames - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:e.id})}),n=a.get(e,"adFinishedCallback",async()=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),o=a.get(e,"adErrorCallback",async t=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-error callback.",t,new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id,error:t}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),h=a.get(e,"rewardItemKey",!1);await this.gameManager.audioManager.changeMuteState(!0,!0),await this.sdk.ad.requestAd(h?"rewarded":"midgame",{adStarted:i,adFinished:n,adError:o})}send(e){let t=this.gameManager?.activeRoomEvents;return t?t?.send(e):(s.warning("CrazyGames - RoomEvents undefined to send an Ad Video message."),!1)}}},{eb221c6f45d898b0:"dZuZ9",ff99f7bef03d711b:"8NbLx","111cbb28b14bd31b":"3lwy5"}],iayFu:[function(e,t,i){let{Logger:n}=e("55d686c62dfd5353");t.exports.AdsProvider=class{static fetchActiveAdsByProviderId(e,t,i){if(!e)return{};let r=Object.keys(i);if(0===r.length)return{};let s={};for(let a of r){let r=i[a];if(e===r.provider.id){if(!r.enabled){n.info("Ad not enabled.",r);continue}if(-1===t.indexOf(r.type.key)){n.info("Invalid ad type.",r);continue}s[a]=r}}return n.info({providerId:e,activeProviderAds:s}),s}}},{"55d686c62dfd5353":"3lwy5"}],"6XwV3":[function(e,t,i){let{AdsProvider:n}=e("f98142cce04e846c"),{AdsConst:r}=e("44a48259b87a5721"),{Logger:s,sc:a}=e("b637051a2a3ead94");t.exports.GameMonetize=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.setSdkOptions(),this.sdk=this.window?.sdk,this.retry=0,this.isPlayingAd=!1,this.environment=r.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.activeAds=this.fetchActiveAds(e),this.activeAdBeenPlayed=!1,this.setConfig()}fetchActiveAds(e){return this.gameManager?.config?n.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}eventKeys(){return{sdkAdStarted:"CONTENT_PAUSE_REQUESTED",sdkAdEnded:"SDK_GAME_START",sdkReady:"SDK_READY"}}setSdkOptions(){return!!this.gameDom&&(this.metaData.gameId?void(this.gameDom.getWindow().SDK_OPTIONS={gameId:this.metaData.gameId,onEvent:async e=>{switch(s.info("GameMonetize - SDK event fired: "+e.name),e.name){case this.eventKeys().sdkAdStarted:await this.adStartedCallback(e);break;case this.eventKeys().sdkAdEnded:await this.adEndedCallback(e);break;case this.eventKeys().sdkReady:await this.sdkReadyCallback(e)}}}):(s.error("GameMonetize - Game ID undefined."),!1))}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}validAdsTypes(){return[r.ADS_TYPES.EVENT_VIDEO]}async adStartedCallback(e){if(this.isPlayingAd=!0,await this.gameManager.audioManager.changeMuteState(!0,!0),!this.activeAdBeenPlayed)return s.info("AdStartedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:this.activeAdBeenPlayed.id})}async adEndedCallback(e){if(this.isPlayingAd=!1,await this.gameManager.audioManager.changeMuteState(!1,!1),!this.activeAdBeenPlayed)return s.info("AdEndedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:this.activeAdBeenPlayed.id})}async sdkReadyCallback(e){this.sdk=this.window.sdk}async activate(){if(!this.sdk)return this.retry===this.metaData.sdkMaxRetries?s.critical("GameMonetize required object."):this.retry{this.retry++,s.info("GameMonetize required object, retry #"+this.retry+"."),this.sdk=this.window?.sdk,this.sdk&&s.info("GameMonetize object found."),this.activate()},this.metaData.sdkRetryTime),!1;await this.activateAds()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return s.info("None active ads."),!1;for(let t of e){let e=this.activeAds[t];if(r.ADS_TYPES.EVENT_VIDEO!==e.type.key)continue;let i=a.get(e,"eventKey",!1);if(!i)return s.warning("Missing event key.",e),!1;this.events.on(i,async t=>(s.info("GameMonetize - Video event fired, playing ad.",t,e),this.isPlayingAd)?(s.info("GameMonetize - Ad is been played."),!1):await this.tryRePlay(e))}}async tryRePlay(e){return null===this.gameManager.getFeature("ads").playedAds?(setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1):(this.activeAdBeenPlayed=e,a.isObjectFunction(this.sdk,"showBanner"))?void await this.sdk.showBanner():(s.critical("GameMonetize SDK not ready."),!1)}send(e){let t=this.gameManager?.activeRoomEvents;return t?t.send(e):(s.warning("GameMonetize - RoomEvents undefined to send an Ad Video message."),!1)}}},{f98142cce04e846c:"iayFu","44a48259b87a5721":"8NbLx",b637051a2a3ead94:"3lwy5"}],"8V0yJ":[function(e,t,i){t.exports.GoogleAdSense=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e}}},{}],dPTjY:[function(e,t,i){t.exports={ads:{}}},{}],"79nNs":[function(e,t,i){let{DebugWorldCreator:n}=e("2f104c4a1fe36eaf"),{PluginInterface:r}=e("c03d54e76a300c60"),{Logger:s,sc:a}=e("56ce9c7fd2ae3df6");t.exports.WorldPlugin=class extends r{setup(e){this.gameManager=a.get(e,"gameManager",!1),this.events=a.get(e,"events",!1),this.debugWorldCreator=!1,this.validateProperties()&&this.setupDebugMode()}validateProperties(){return this.gameManager?!!this.events||(s.error("EventsManager undefined in PredictionPlugin."),!1):(s.error("Game Manager undefined in PredictionPlugin."),!1)}setupDebugMode(){if(!this.gameManager.config.getWithoutLogs("client/world/debug/enabled",!1))return!1;this.debugWorldCreator=new n,this.events.on("reldens.createEngineSceneDone",async e=>{await this.debugWorldCreator.createSceneWorld(e.currentScene)})}}},{"2f104c4a1fe36eaf":"2tOiq",c03d54e76a300c60:"fC3To","56ce9c7fd2ae3df6":"3lwy5"}],"2tOiq":[function(e,t,i){let{Renderer:n}=e("7f57d693a727d80"),{P2world:r}=e("56e554b827a8b617"),{WorldTimer:s}=e("b75a99257129c956"),{Logger:a}=e("493b121a06799e1e");t.exports.DebugWorldCreator=class{async createSceneWorld(e){let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomName,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.debugWorld=this.createWorldInstance(r),e.debugWorld.createLimits(),await e.debugWorld.createWorldContent({}),e.debugWorldTimer=new s({callbacks:[()=>{if(!e.debugWorld){a.error("Scene World not longer exists.",e.roomWorld);return}e.debugWorld.removeBodiesFromWorld()}]}),e.debugWorldTimer.startWorldSteps(e.debugWorld),e.debugWorldRenderer=new n(e)}cloneMapJson(e,t){let i=e.tilesets[0];return i?Object.assign({},e.cache?.tilemap?.entries?.entries[i.name]?.data||{},{layers:t}):{}}findValidLayers(e){let t=[],i=e.tilesets[0];if(!i)return t;for(let n of e.cache.tilemap.entries.entries[i.name].data.layers)-1!==n.name.indexOf("collision")&&t.push(n);return t}createWorldInstance(e){return new r(e)}}},{"7f57d693a727d80":"6kVuK","56e554b827a8b617":"hvh2r",b75a99257129c956:"5zAcU","493b121a06799e1e":"3lwy5"}],"6kVuK":[function(e,t,i){let{Box:n}=e("43cbaab4204b970");t.exports.Renderer=class{constructor(e){this.scene=e,this.gameDom=e.gameManager.gameDom,this.world=e.debugWorld,this.canvasElement=!1,this.canvasContext=!1}fetchCanvasContext(){this.canvasContext=this.canvasElement.getContext("2d")}createCanvas(e,t){this.canvasElement=this.gameDom.createElement("canvas"),this.canvasElement.width=e,this.canvasElement.height=t,this.canvasElement.id="physicsCanvas",this.gameDom.getDocument().body.appendChild(this.canvasElement),this.fetchCanvasContext()}renderLoop(){this.canvasContext.clearRect(0,0,this.canvasElement.width,this.canvasElement.height),this.renderP2World(),this.gameDom.getWindow().requestAnimationFrame(this.renderLoop.bind(this))}renderP2World(){let e=this.canvasContext;for(let t=0;t{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{let t=e?.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Scores messages queue on ScoresPlugin.",e),!1;s.processScoresMessagesQueue(t,this.scoresMessageListener)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in ScoresPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.scoresMessageListener}}},{"3b8c6a6b532efef7":"l5kMc","886a0d766603abc":"fpFc7",e89935d10dce4cba:"d0zyM",e991266a552fb051:"5oUd3",b0db3ae90acf0cc5:"beAgN",e0289d80f135b58e:"1fcQw","84d6714fa827e3e1":"fC3To",f46d2ddbf227db3d:"3lwy5"}],l5kMc:[function(e,t,i){let{ScoresConst:n}=e("fc16b961896d9e7e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/scores/templates/";e.load.html(n.KEY,t+"ui-scores.html"),e.load.html(n.TEMPLATES.SCORES_TABLE,t+"ui-scores-table.html")}}},{fc16b961896d9e7e:"5oUd3"}],"5oUd3":[function(e,t,i){let n="scores.";t.exports.ScoresConst={KEY:"scores",PREFIX:"sco",ACTIONS:{UPDATE:"scoUp",TOP_SCORES_UPDATE:"scoTops"},TEMPLATES:{SCORES_TABLE:"scoresTable"},MESSAGE:{DATA_VALUES:{NAMESPACE:"scores"}},SNIPPETS:{PREFIX:n,TITLE:n+"scoresTitle",CONTENT:n+"scoresContent",MY_SCORE:n+"myScore"}}},{}],fpFc7:[function(e,t,i){let{ScoresMessageHandler:n}=e("d156c5882f191e51"),{ScoresConst:r}=e("2e4cd336beabe6ca"),{Logger:s,sc:a}=e("aebac8790f258c87");t.exports.ScoresMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ScoresMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ScoresMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isScoresMessage(t)&&this.handleScoresMessage(t,r):this.isScoresMessage(t)?(i.scoresMessagesQueue||(i.scoresMessagesQueue=[]),i.scoresMessagesQueue.push(t),!0):(s.error("Invalid ScoresMessageHandler",r),!1)}handleScoresMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updatePlayerScore():r.ACTIONS.TOP_SCORES_UPDATE!==e.act||t.updateScoresBox()}isScoresMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{d156c5882f191e51:"e8G1n","2e4cd336beabe6ca":"5oUd3",aebac8790f258c87:"3lwy5"}],e8G1n:[function(e,t,i){let{UserInterface:n}=e("a45d421f329cd9bb"),{ScoresConst:r}=e("78e1225607fe67de"),{Logger:s,sc:a}=e("98287ac0824fa508");t.exports.ScoresMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on ScoresMessageHandler."),!1):(s.info("Missing message on ScoresMessageHandler."),!1):(s.info("Missing RoomEvents on ScoresMessageHandler."),!1)}createScoresUi(){let e=a.get(this.uiScene.userInterfaces,r.KEY);if(e)return e;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let t=new n(this.gameManager,{id:r.KEY,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/scores/templates/ui-scores.html",r.KEY);t.createUiElement(this.uiScene,r.KEY);let i=this.uiScene.elementsUi[r.KEY];if(!i)return s.error("Scores UI box not found.",{uiScores:t,uiBox:i}),!1;let o=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/title",r.SNIPPETS.TITLE)),h=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/content",r.SNIPPETS.CONTENT));return this.roomEvents.uiSetTitleAndContent(i,{title:o,content:h},this.uiScene),this.uiScene.userInterfaces[r.KEY]=t,this.uiScene.userInterfaces[r.KEY]}updatePlayerScore(){this.createScoresUi(r.KEY);let e=a.get(this.message,"newTotalScore",!1);if(!e){s.debug("Missing new total score on update message.");return}this.uiScene.currentPlayerScore=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}updateScoresBox(){this.createScoresUi(r.KEY);let e=a.get(this.message,"scores",!1);if(!e){s.debug("Missing scores data on message.");return}this.uiScene.scores=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}createContentsUpdate(){let e=this.uiScene.cache.html.get(r.TEMPLATES.SCORES_TABLE);if(!e)return s.error('Missing template "'+r.TEMPLATES.SCORES_TABLE+'".'),"";let t={scores:this.uiScene.scores,showCurrentPlayer:!0,currentPlayerScore:this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/myScore",r.SNIPPETS.MY_SCORE),{myScore:this.uiScene.currentPlayerScore||"0"})};return this.gameManager.gameEngine.parseTemplate(e,t)}}},{a45d421f329cd9bb:"bzImH","78e1225607fe67de":"5oUd3","98287ac0824fa508":"3lwy5"}],d0zyM:[function(e,t,i){let{ScoresMessageHandler:n}=e("45ab9844bbd919a8"),{sc:r}=e("d9c441fdb0377cf");t.exports.MessageProcessor=class{static processScoresMessagesQueue(e,t){if(r.isArray(e.scoresMessagesQueue)&&0!==e.scoresMessagesQueue.length){for(let i of e.scoresMessagesQueue)t.handleScoresMessage(i,new n({roomEvents:e,message:i}));e.scoresMessagesQueue=[]}}}},{"45ab9844bbd919a8":"e8G1n",d9c441fdb0377cf:"3lwy5"}],beAgN:[function(e,t,i){t.exports={scores:{scoresTitle:"Top Players Scores",scoresContent:"No scores available.",myScore:"My score: %myScore"}}},{}],"4p1ha":[function(e,t,i){let{PreloaderHandler:n}=e("efc9996b9ceaadce"),{MessageListener:r}=e("ef29ab05ba87fd5"),{MessageProcessor:s}=e("bd6312294795cf1c"),{RewardsConst:a}=e("a60c417cf40e6e4e"),o=e("702d39ed6c29ddf6"),{TranslationsMapper:h}=e("e6ea40ce120e2033"),{PluginInterface:c}=e("78f7099074cee28a"),{Logger:l,sc:u}=e("76d1b05ad0acce3a");t.exports.RewardsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.events=u.get(e,"events",!1),this.preloaderHandler=new n,this.messageListener=new r,this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.listenMessages(),l.debug("Plugin READY: Rewards"))}validateProperties(){return this.gameManager?!!this.events||(l.error("EventsManager undefined in RewardsPlugin."),!1):(l.error("Game Manager undefined in RewardsPlugin."),!1)}setTranslations(){if(!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,a.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events){l.error('EventsManager undefined in RewardsPlugin for "listenEvents".');return}this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{s.processRewardsMessagesQueue(e,this)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in RewardsPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.messageListener}}},{efc9996b9ceaadce:"8NCLg",ef29ab05ba87fd5:"jXzBf",bd6312294795cf1c:"h8UKT",a60c417cf40e6e4e:"lIgFH","702d39ed6c29ddf6":"carao",e6ea40ce120e2033:"1fcQw","78f7099074cee28a":"fC3To","76d1b05ad0acce3a":"3lwy5"}],"8NCLg":[function(e,t,i){let{RewardsConst:n}=e("c14067eab2e5b23e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/rewards/templates/";e.load.html(n.KEY,t+"ui-rewards.html"),e.load.html(n.TEMPLATES.REWARDS_LIST,t+"ui-rewards-list.html")}}},{c14067eab2e5b23e:"lIgFH"}],lIgFH:[function(e,t,i){let n="rewards.";t.exports.RewardsConst={KEY:"rewards",PREFIX:"rwd",ACTIONS:{INITIALIZE:"rwdIni",UPDATE:"rwdUp",ACCEPT_REWARD:"rwdAcpt",ACCEPTED_REWARD:"rwdAcpted"},SPLIT_EXPERIENCE:{ALL:0,PROPORTIONAL_BY_LEVEL:1},SPLIT_MODIFIER:{ALL:0,RANDOM:1},SPLIT_ITEMS:{DROP_KEEPS:0,RANDOM:1},MESSAGE:{DATA:{LABEL:"rlbl",DESCRIPTION:"rdes",POSITION:"rpos",SHOW_REWARD_IMAGE:"srimg",REWARD_IMAGE:"rimg",REWARD_IMAGE_PATH:"rimgp",EVENT_DATA:"redt",STATE_DATA:"resd",ITEMS_DATA:"rmid",ITEM_KEY:"rikey",ITEM_LABEL:"rilbl",ITEM_DESCRIPTION:"rides",ITEM_QUANTITY:"riqty"},DATA_VALUES:{NAMESPACE:"rewards"}},TEMPLATES:{REWARDS_LIST:"rewardsList"},SNIPPETS:{PREFIX:n,TITLE:n+"title",ACCEPTED_REWARD:n+"acceptedReward"}}},{}],jXzBf:[function(e,t,i){let{MessageHandler:n}=e("4d23f5e42478957c"),{RewardsConst:r}=e("bda46dc94809b55d"),{Logger:s,sc:a}=e("a4007c1db9e3ae27");t.exports.MessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on RewardsMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on RewardsMessageListener.",e),!1;if(!this.isRewardsMessage(t))return!1;let r=new n({roomEvents:i,message:t});return r.validate()?this.handleRewardsMessage(t,r):(i.rewardsMessagesQueue||(i.rewardsMessagesQueue=[]),i.rewardsMessagesQueue.push(t),!0)}handleRewardsMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updateRewardsBox():r.ACTIONS.ACCEPTED_REWARD!==e.act||t.showAcceptedReward()}isRewardsMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{"4d23f5e42478957c":"4T3oM",bda46dc94809b55d:"lIgFH",a4007c1db9e3ae27:"3lwy5"}],"4T3oM":[function(e,t,i){let{UserInterface:n}=e("8d4a3a8b8eeaff6"),{RewardsConst:r}=e("677bd2d65b92e557"),{GameConst:s}=e("7a270c9c6c08724"),{Logger:a,sc:o}=e("70b77844d02b2070");t.exports.MessageHandler=class{constructor(e){this.roomEvents=o.get(e,"roomEvents",!1),this.message=o.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.config=this.gameManager?.config,this.translator=this.gameManager?.services?.translator,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(a.info("Missing GameManager on RewardsMessageHandler."),!1):(a.info("Missing message on RewardsMessageHandler."),!1):(a.info("Missing RoomEvents on RewardsMessageHandler."),!1)}createRewardsUi(e){let t=o.get(this.uiScene.userInterfaces,e);if(t)return t;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let i=new n(this.gameManager,{id:e,type:e,defaultOpen:!0,defaultClose:!0},"/assets/features/rewards/templates/ui-rewards.html",e);i.createUiElement(this.uiScene,e),i.closeButton.addEventListener("click",()=>{this.gameDom.emptyElement(".accepted-reward")});let s=this.uiScene.elementsUi[e];if(!s)return a.error("Scores UI box not found.",{uiRewards:i,uiBox:s}),!1;let h=this.translator.t(this.config.getWithoutLogs("client/rewards/labels/title",r.SNIPPETS.TITLE));return this.roomEvents.uiSetTitleAndContent(s,{title:h},this.uiScene),this.uiScene.userInterfaces[e]=i,this.uiScene.userInterfaces[e]}updateRewardsBox(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"rewards",!1);if(!e){a.debug("Missing rewards data on message.");return}this.enrichForDisplay(e),this.uiScene.rewards=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene),this.showRewardsNotificationBalloon(),this.activateRewardsAction()}showAcceptedReward(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"acceptedReward",!1);if(!e){a.debug("Missing rewards on update message.");return}this.enrichForDisplay([e]),this.uiScene.acceptedReward=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene)}createUpdateContent(){let e=this.uiScene.cache.html.get(r.TEMPLATES.REWARDS_LIST);if(!e)return a.error('Missing template "'+r.TEMPLATES.REWARDS_LIST+'".'),"";let t=this.uiScene.acceptedReward,i=t?this.translator.t(this.config.getWithoutLogs("client/rewards/labels/acceptedReward",r.SNIPPETS.ACCEPTED_REWARD),{rewardLabel:t.translated.label}):"",n={rewards:this.uiScene.rewards,acceptedReward:t,acceptedRewardMessage:i};return this.gameManager.gameEngine.parseTemplate(e,n)}enrichForDisplay(e){for(let t of e){let e=this.translator.t(t[r.MESSAGE.DATA.DESCRIPTION]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});this.config.getWithoutLogs("client/rewards/labels/includeItemsDescription",!0)&&(e+=this.mapItemsText(t));let i=this.translator.t(t[r.MESSAGE.DATA.LABEL]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});t.translated={label:i,description:e};let n=t[r.MESSAGE.DATA.STATE_DATA];t.activeClass=n?.ready&&!n?.complete?"active":"inactive",t.showRewardImage=t[r.MESSAGE.DATA.SHOW_REWARD_IMAGE]||"",t.rewardImage=t[r.MESSAGE.DATA.REWARD_IMAGE]||"",t.rewardImagePath=t[r.MESSAGE.DATA.REWARD_IMAGE_PATH]||""}return e}mapItemsText(e){let t=this.config.getWithoutLogs("client/rewards/labels/itemsSeparator","
"),i=this.config.getWithoutLogs("client/rewards/labels/itemsTemplate","%label (%quantity)");return t+e[r.MESSAGE.DATA.ITEMS_DATA]?.map(e=>i=(i=i.replace("%label",e[r.MESSAGE.DATA.ITEM_LABEL])).replace("%quantity",e[r.MESSAGE.DATA.ITEM_QUANTITY])).join(t)}showRewardsNotificationBalloon(){let e=this.gameDom.getElement("#rewards-notification-balloon"),t=this.gameDom.getElements(".reward-active");if(e&&t&&0{this.gameManager.activeRoomEvents.send({[s.ACTION_KEY]:r.ACTIONS.ACCEPT_REWARD,id:e.dataset.rewardId})})}}},{"8d4a3a8b8eeaff6":"bzImH","677bd2d65b92e557":"lIgFH","7a270c9c6c08724":"93TbC","70b77844d02b2070":"3lwy5"}],h8UKT:[function(e,t,i){let{MessageHandler:n}=e("31470942304bd302"),{Logger:r,sc:s}=e("32739ae155fa16f3");t.exports.MessageProcessor=class{static processRewardsMessagesQueue(e,t){let i=e?.roomEvents;if(!i)return r.critical("RoomEvents undefined for process Rewards messages queue on RewardsPlugin.",e),!1;if(s.isArray(i.rewardsMessagesQueue)&&0!==i.rewardsMessagesQueue.length){for(let e of i.rewardsMessagesQueue)t.messageListener?.handleRewardsMessage(e,new n({roomEvents:i,message:e}));i.rewardsMessagesQueue=[]}}}},{"31470942304bd302":"4T3oM","32739ae155fa16f3":"3lwy5"}],carao:[function(e,t,i){t.exports={rewards:{title:"Rewards",dailyLogin:"Daily Login",dailyDescription:"Login every day and claim your reward",straightDaysLogin:"%loginCount Days Login",straightDaysDescription:"Login every day for %loginCount days and claim your reward",acceptedReward:'You accepted the "%rewardLabel" reward!'}}},{}],dkVHA:[function(e,t,i){let n=e("e6a5960c3a99bcc9").default,r=e("d306a7719b3b609a"),s=e("d3e0e9ccc057727d"),a=e("eb8d3da15fd6263e"),{ErrorsBlockHandler:o}=e("6645d49b0b5d816f"),{GameConst:h}=e("89df318e7a41c05a"),{ErrorManager:c,Logger:l,sc:u}=e("bf14904e4b931b12");t.exports.FirebaseConnector=class{constructor(e){e||c.error("FirebaseConnector - Missing game manager."),this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.analytics=r,this.app=n,this.firebaseAuth=s,this.ui=a,this.authUi=!1,this.isActive=!1,this.containerId="#firebaseui-auth-container",this.uiConfig={signInOptions:[{provider:this.firebaseAuth.GoogleAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.FacebookAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.GithubAuthProvider.PROVIDER_ID}],signInFlow:"popup"},this.gameManager.events.on("reldens.beforeJoinGame",e=>{"firebase-login"===e.formData.formId&&(e.gameManager.userData.isFirebaseLogin=!0)})}startFirebase(){let e=this.gameManager.appServerUrl+h.ROUTE_PATHS.FIREBASE;this.gameDom.getJSON(e,(e,t)=>{if(!t.enabled)return!1;let i=t.firebaseConfig;this.initAuth(i,this.uiConfig),this.gameDom.getWindow().addEventListener("beforeunload",()=>{this.isActive&&this.app.auth().signOut()}),this.app.auth().onAuthStateChanged(e=>(e?this.setActiveUser(e):this.startAuthUi(),!1));let n=this.gameDom.getElement("#firebase-login");n&&this.activateLoginBehavior(n)})}activateLoginBehavior(e){e.addEventListener("submit",t=>{if(t.preventDefault(),!e.checkValidity())return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden")});let t=this.gameDom.getElement("#firebase-username");if(!t)return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden"),t.addEventListener("change",()=>{o.reset(e)}),t.addEventListener("focus",()=>{o.reset(e)})}startAuthUi(){this.isActive=!1,this.gameDom.getElement(this.containerId)&&(this.gameDom.getElement(this.containerId).innerHTML=""),this.authUi.start(this.containerId,this.uiConfig)}setActiveUser(e){this.isActive=!0;let t={formId:"firebase-login",email:e.email,username:this.gameDom.getElement("#firebase-username").value,password:e.uid};this.gameManager.startGame(t,!0)}initAuth(e,t){if(!e||!t)return l.error("Missing firebase configuration."),!1;this.firebaseConfig=e,this.uiConfig=t,this.app.initializeApp(this.firebaseConfig),u.hasOwn(this.firebaseConfig,"measurementId")&&this.app.analytics(),this.authUi=new this.ui.auth.AuthUI(this.app.auth()),u.hasOwn(this.uiConfig,"callbacks")||(this.uiConfig.callbacks={}),u.hasOwn(this.uiConfig.callbacks,"signInSuccessWithAuthResult")||(this.uiConfig.callbacks.signInSuccessWithAuthResult=()=>!1)}}},{e6a5960c3a99bcc9:"llQKY",d306a7719b3b609a:"jiMXy",d3e0e9ccc057727d:"2s8iN",eb8d3da15fd6263e:"1Z3EC","6645d49b0b5d816f":"kzsmo","89df318e7a41c05a":"93TbC",bf14904e4b931b12:"3lwy5"}],llQKY:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>s.default);var r=e("@firebase/app-compat"),s=n.interopDefault(r);/** + */e.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i(85454)})(),t.exports=n()},{"57a99fe9b8471a10":"4VGCc"}],"4VGCc":[function(e,t,i){},{}],e7OdC:[function(e,t,i){t.exports.FPSCounter=class{constructor(e){this.lastFrameTime=performance.now(),this.frameCount=0,this.fpsDisplay=e.createElementWithStyles("div","fps-counter",{padding:"0 20px",background:"#000",color:"#00ff00"}),e.getElement(".header").appendChild(this.fpsDisplay)}updateFPS(){let e=performance.now(),t=e-this.lastFrameTime;this.lastFrameTime=e;let i=Math.round(1e3/t);this.frameCount++,0==this.frameCount%60&&(this.fpsDisplay.textContent="FPS: "+i),requestAnimationFrame(this.updateFPS.bind(this))}start(){this.updateFPS()}}},{}],izuLV:[function(e,t,i){let n="objects.";t.exports.ObjectsConst={OBJECT_ANIMATION:"oa",OBJECT_INTERACTION:"oi",TYPE_OBJECT:"obj",TYPE_ANIMATION:"anim",TYPE_NPC:"npc",TYPE_ENEMY:"enemy",TYPE_TRADER:"trader",TYPE_DROP:"drop",DYNAMIC_ANIMATION:"dyn",MESSAGE:{DATA_VALUES:{NAMESPACE:"objects"}},EVENT_PREFIX:{BASE:"bo",ANIMATION:"ao",DROP:"dep",ENEMY:"eo",NPC:"npc",TRADER:"tnpc"},SNIPPETS:{PREFIX:n,NPC_INVALID:n+"npcInvalid",TRADER:{CONTENT:n+"trader.content",OPTIONS:{BUY:n+"trader.options.buy",SELL:n+"trader.options.sell"},BUY_CONFIRMED:n+"trader.buyConfirmed",SELL_CONFIRMED:n+"trader.sellConfirmed"}},DEFAULTS:{BASE_OBJECT:{CONTENT:"",OPTIONS:{}},TRADER_OBJECT:{INVENTORY_MAP:{buy:"A",sell:"B"},OPTIONS:{BUY:"buy",SELL:"sell"}},TARGETS:{OBJECT:0,PLAYER:1}},TRADE_ACTIONS_FUNCTION_NAME:{ADD:"add",REMOVE:"remove",CONFIRM:"confirm",DISCONFIRM:"disconfirm",CANCEL:"cancel"},TRADE_ACTIONS:{SUB_ACTION:"sub",ADD:"ta",REMOVE:"tr",CONFIRM:"tc",DISCONFIRM:"td"},DROPS:{KEY:"drp",REMOVE:"drmv",PARAMS:"drpp",ASSET_KEY:"dk",PICK_UP_ACT:"rpu",ASSETS_PATH:"/assets/custom/sprites/",FILE:"df",TYPE:"dt"}}},{}],"7XAJ0":[function(e,t,i){let{PlayerEngine:n}=e("ad34e884dd74ab75"),{SceneDynamic:r}=e("8c3cc377813bccbe"),{ScenePreloader:s}=e("eb7c0f886bf8e7c7"),{GameConst:a}=e("dd0538535f6f136a"),{ErrorManager:o,Logger:h,sc:c}=e("2b2fa27d8710e574");t.exports.RoomEvents=class{constructor(e,t){this.room=!1,this.sceneData=!1,this.scenePreloader=!1,this.playersOnAddCallback=!1,this.playersOnRemoveCallback=!1,this.playersQueue={},this.gameManager=t,this.gameEngine=t.gameEngine,this.roomName=e,this.events=t.events,this.objectsUi={},this.tradeUi={},this.gameOverRetries=0,this.gameOverMaxRetries=0,this.gameOverRetryTime=200,this.automaticallyCloseAllDialogsOnSceneChange=t.config.getWithoutLogs("client/rooms/automaticallyCloseAllDialogsOnSceneChange",!0)}async activateRoom(e,t=!1){await this.events.emit("reldens.activateRoom",e,this.gameManager),this.room=e,this.playersOnAddCallback=this.room.state.players.onAdd((e,i)=>{this.checkAndCreateScene(),this.playersOnAdd(e,i,t),this.listenPlayerAndStateChanges(e,i)}),this.playersOnRemoveCallback=this.room.state.players.onRemove((e,t)=>{this.playersOnRemove(e,t)}),this.room.onMessage("*",async e=>{await this.roomOnMessage(e)}),this.room.onLeave(e=>{this.roomOnLeave(e)})}listenPlayerAndStateChanges(e,t){let i=this.gameManager.getCurrentPlayer().player_id,n=Object.keys(e),r=Object.keys(e.state);for(let i of n)e.listen(i,i=>{this.playersOnChange(e,t,"playerChange")});for(let n of r)e.state.listen(n,r=>{if(e.state[n]=r,this.playersOnChange(e,t,"playerChange"),"inState"===n&&e.player_id===i){if(a.STATUS.DEATH===r)return this.showGameOverBox();this.hideGameOverBox()}})}checkAndCreateScene(){if(!this.room.state||this.room.state.sceneData===this.sceneData||(this.sceneData=c.toJson(this.room.state.sceneData),this.gameEngine.scene.getScene(this.roomName)))return;let e=this.createSceneInstance(this.roomName,this.sceneData,this.gameManager);this.gameEngine.scene.add(this.roomName,e,!1)}async playersOnAdd(e,t,i){await this.events.emit("reldens.playersOnAdd",e,t,i,this);let n={x:e.state.x,y:e.state.y,dir:e.state.dir,playerName:e.playerName,avatarKey:e.avatarKey,playedTime:e.playedTime,player_id:e.player_id};if(this.isCurrentPlayer(t))return await this.createCurrentPlayer(e,i,t);this.addOtherPlayers(e,t,n)}isCurrentPlayer(e){return e===this.room.sessionId}addOtherPlayers(e,t,i){if(!this.engineStarted)return this.playersQueue[t]=i,!1;let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;n.player.addPlayer(t,i)}async createCurrentPlayer(e,t,i){this.engineStarted=!0,await this.startEngineScene(e,this.room,t);let n=this.getActiveScene();if(!this.isValidScene(n,e))return!1;for(let r of(await this.events.emit("reldens.playersQueueBefore",e,i,t,this),Object.keys(this.playersQueue)))n.player.addPlayer(r,this.playersQueue[r]);let r={player:e,key:i,previousScene:t,roomEvents:this};return await this.events.emit("reldens.createCurrentPlayer",r),r}isValidScene(e,t){return e.key===t.state.scene&&e.player&&e.player.players}playersOnChange(e,t,i){if(e.state.scene!==this.roomName){e.player_id!==this.gameManager.getCurrentPlayer().player_id||this.gameManager.isChangingScene||h.info("Player scene miss match.",{currentScene:this.roomName,playerSceneOnState:e?.state.scene,player:e?.sessionId,currentPlayer:this.gameManager.getCurrentPlayer()?.playerId,isChangingScene:this.gameManager.isChangingScene});return}let n=this.getActiveScene();this.playerExists(n,t)&&n.player.updatePlayer(t,e)}playersOnRemove(e,t){return(this.events.emitSync("reldens.playersOnRemove",e,t,this),t===this.room.sessionId)?this.gameOverReload():this.removePlayerByKey(t)}removePlayerByKey(e){let t=this.getActiveScene();this.playerExists(t,e)&&(t.player.removePlayer(e),t.player.currentTarget?.id===e&&this.gameEngine.clearTarget())}gameOverReload(){let e={confirmed:!0};this.events.emitSync("reldens.gameOverReload",this,e),!this.gameManager.gameOver&&e.confirmed&&this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.sessionEnded"))}playerExists(e,t){return e.player&&c.hasOwn(e.player.players,t)}async roomOnMessage(e){await this.runGameOver(e),await this.runRevived(e),await this.runChangeScene(e),await this.runReconnect(e),await this.runUpdateStats(e),await this.runInitUi(e),await this.closeBox(e),await this.runCustomMessageListener(e)}async runInitUi(e){if(e.act!==a.UI||!e.id)return!1;await this.events.emit("reldens.initUiBefore",e,this),this.initUi(e),await this.events.emit("reldens.initUiAfter",e,this)}async closeBox(e){if(a.CLOSE_UI_ACTION!==e.act||!e.id)return!1;let t=this.gameManager.gameDom.getElement("#box-"+e.id+" .box-close");return t?(t.click(),!0):(h.error('Box could not be closed ID "'+e.id+'".'),!1)}async runCustomMessageListener(e){let t=c.get(e,"listener","");if(""===t)return!1;let i=this.gameManager.config.get("client/message/listeners",{}),n=this.gameManager.config.get("client/customClasses/message/listeners",{}),r=c.get(n,t,!1);return(r||(r=c.get(i,t,!1)),r)?c.isFunction(r.executeClientMessageActions)?void r.executeClientMessageActions({message:e,roomEvents:this}):(h.error('Listener is missing "executeClientMessageActions" method.',r),!1):(h.error('Listener "'+t+'" is missing.'),!1)}async runUpdateStats(e){return e.act===a.PLAYER_STATS&&(await this.events.emit("reldens.playerStatsUpdateBefore",e,this),await this.updatePlayerStats(e))}async runReconnect(e){if(e.act!==a.RECONNECT)return!1;await this.events.emit("reldens.beforeReconnectGameClient",e,this),await this.gameManager.reconnectGameClient(e,this.room)}async runChangeScene(e){if(e.act===a.CHANGING_SCENE&&this.room.sessionId===e.id&&(this.gameManager.isChangingScene=!0,this.closeAllActiveDialogs(),this.gameManager.getActiveScene().scene.setVisible(!1)),e.act!==a.CHANGED_SCENE||e.scene!==this.room.name||this.room.sessionId===e.id)return!1;await this.events.emit("reldens.startChangedScene",{message:e,roomEvents:this});let t=this.getActiveScene(),{id:i,x:n,y:r,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}=e,u=this.gameManager.config.get("client/players/size/topOffset"),d=this.gameManager.config.get("client/players/size/leftOffset");t.player.addPlayer(i,{x:n-d,y:r-u,dir:s,playerName:o,playedTime:h,avatarKey:c,player_id:l}),this.gameManager.isChangingScene=!1,await this.events.emit("reldens.endChangedScene",{message:e,roomEvents:this})}closeAllActiveDialogs(){if(!this.automaticallyCloseAllDialogsOnSceneChange)return;let e=this.gameManager.gameDom.getElements(".box-close");if(0!==e.length)for(let t of e)t.click()}async runRevived(e){if(e.act!==a.REVIVED)return!1;this.gameManager.gameDom.getElement("#game-over").classList.add("hidden");let t=this.gameManager.getCurrentPlayer(),i=c.get(t.players,e.t,!1);if(!i)return!1;i.visible=!0,c.hasOwn(i,"nameSprite")&&i.nameSprite&&(i.nameSprite.visible=!0),this.getActiveScene().stopOnDeathOrDisabledSent=!1}async runGameOver(e){if(e.act!==a.GAME_OVER)return!1;try{await this.events.emit("reldens.runGameOver",{message:e,defaultBehavior:!0,roomEvents:this}),await this.events.emit("reldens.gameOver",e,this),this.gameManager.gameOver=!0;let t=this.gameManager.getCurrentPlayer();if(!t)return this.gameOverRetriesthis.runGameOver(e),this.gameOverRetryTime),this.gameOverRetries++),!1;t.players[t.playerId].visible=!1,this.showGameOverBox()}catch(t){return setTimeout(()=>this.runGameOver(e),200),this.gameOverRetries++,!1}}showGameOverBox(){return this.displayGameOverBox(!0)}hideGameOverBox(){return this.displayGameOverBox(!1)}displayGameOverBox(e){h.debug("Display game over box: "+(e?"yes":"no")+".");let t=this.gameManager.gameDom.getElement("#game-over");return t?e?(t.classList.remove("hidden"),!0):(t.classList.add("hidden"),!1):(h.debug("GameOver box element not found."),!1)}async roomOnLeave(e){!this.isAbnormalShutdown(e)||this.gameManager.gameOver||this.gameManager.forcedDisconnection||(h.error("There was a connection error.",{code:e,isGameOver:this.gameManager.gameOver,isForcedDisconnection:this.gameManager.forcedDisconnection}),this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.serverDown"))),await this.events.emit("reldens.playerLeftScene",{code:e,roomEvents:this})}isAbnormalShutdown(e){return 1001<=e&&1015>=e}async updatePlayerStats(e){if(!c.hasOwn(e,"stats")||!e.stats)return!1;let t=this.getActiveScene();if(!t.player||!c.hasOwn(t.player.players,this.room.sessionId))return h.error("Player not available.",this.room,t),!1;t.player.players[this.room.sessionId].stats=e.stats,this.gameManager.playerData.stats=e.stats,this.gameManager.playerData.statsBase=e.statsBase;let i=this.gameManager.getUiElement("playerStats");if(!i)return!1;let n=i.getChildByProperty("id","player-stats-container");if(!n)return!1;let r=this.gameEngine.uiScene.cache.html.get("playerStat");for(let t of(n.innerHTML="",Object.keys(e.stats))){let i=c.get(this.gameManager.config.client.players.initialStats[t],"data",!1),s=i&&c.get(i,"showBase",!1)?" / "+e.statsBase[t]:"",a=this.gameManager.gameEngine.parseTemplate(r,{statLabel:t,statValue:e.stats[t]+s});n.innerHTML=n.innerHTML+a}await this.events.emit("reldens.playerStatsUpdateAfter",e,this)}initUi(e){let t=this.gameEngine.uiScene;if(!t||!c.hasOwn(t.elementsUi,e.id))return h.error("User interface not found on UI Scene: "+e.id),!1;let i=t.elementsUi[e.id];this.uiSetTitle(i,e),this.uiSetContent(i,e,t);let n=i.getChildByID("box-"+e.id),r=e.keepCurrentDisplay&&"none"===n.style.display;n.style.display=r?"none":"block",i.setDepth(2),this.gameManager.config.get("client/ui/uiTarget/hideOnDialog")&&this.gameEngine.clearTarget()}uiSetTitleAndContent(e,t,i){this.uiSetTitle(e,t),this.uiSetContent(e,t,i)}uiSetTitle(e,t){let i=c.get(t,"title",!1);if(!1===i)return!1;let n=e.getChildByProperty("className","box-title");if(!n)return!1;n.innerHTML=i}uiSetContent(e,t,i){let n=c.get(t,"content",!1);if(!1===n)return!1;let r=e.getChildByProperty("className","box-content");if(!r)return!1;r.innerHTML=n,this.uiSetContentOptions(i,t,r)}uiSetContentOptions(e,t,i){if(!t.options)return!1;let n=e.cache.html.get("uiOptionsContainer"),r=this.gameManager.gameEngine.parseTemplate(n,{id:"ui-"+t.id});i.innerHTML+=r;let s=Object.keys(t.options);if(0===s.length)return!1;for(let i of s){let{label:n,value:r,icon:s}=t.options[i],o=s?"Icon":"Button",h=e.cache.html.get("uiOption"+o),l={id:i,object_id:t.id,label:n,value:r,icon:"/assets/custom/items/"+s+a.FILES.EXTENSIONS.PNG},u=this.gameManager.gameEngine.parseTemplate(h,l);this.gameManager.gameDom.appendToElement("#ui-"+t.id,u);let d="#opt-"+i+"-"+t.id;this.gameManager.gameDom.getElement(d)?.addEventListener("click",e=>{let i={id:t.id,act:a.BUTTON_OPTION,value:e.target.getAttribute("data-option-value")};Object.assign(i,c.get(t,"overrideSendOptions",{})),this.send(i)})}}async startEngineScene(e,t,i=!1){await this.events.emit("reldens.startEngineScene",this,e,t,i);let n=!1;this.gameEngine.uiScene||(n=!0);let r=a.SCENE_PRELOADER+this.sceneData.roomName;this.gameEngine.scene.getScene(r)?await this.createEngineOnScene(r,e,t,i):await this.createPreloaderAndScene(r,n,e,t,i)}async createEngineOnScene(e,t,i,n){this.getActiveScene().objectsAnimationsData=this.sceneData.objectsAnimationsData,this.scenePreloader=this.gameEngine.scene.getScene(e),await this.events.emit("reldens.createdPreloaderRecurring",this,this.scenePreloader),await this.createEngineScene(t,i,n)}async createPreloaderAndScene(e,t,i,n,r){this.scenePreloader=this.createPreloaderInstance({name:e,map:this.sceneData.roomMap,images:this.sceneData.sceneImages,uiScene:t,gameManager:this.gameManager,preloadAssets:this.sceneData.preloadAssets,objectsAnimationsData:this.sceneData.objectsAnimationsData}),this.gameEngine.scene.add(e,this.scenePreloader,!0),await this.events.emit("reldens.createdPreloaderInstance",this,this.scenePreloader);let s=this.gameEngine.scene.getScene(e);s.load.on("complete",async()=>{this.gameEngine.uiScene||(this.gameEngine.uiScene=s,this.showPlayerName(this.gameManager.playerData.id+" - "+this.gameManager.playerData.name)),await this.createEngineScene(i,n,r)})}showPlayerName(e){let t=this.gameManager.getUiElement("playerBox");if(!t)return!1;let i=t.getChildByProperty("className","player-name");if(!i)return!1;i.innerHTML=e}async createEngineScene(e,t,i){let n=this.gameEngine.scene.getScene(i);n&&n.scene.setVisible(!1),await this.events.emit("reldens.createEngineScene",e,t,i,this),this.gameManager.room?await this.destroyPreviousScene(i,e):this.gameEngine.scene.start(e.state.scene),this.gameManager.room=t;let r=this.gameEngine.scene.getScene(e.state.scene);r.player=this.createPlayerEngineInstance(r,e,this.gameManager,t),r.player.create(),this.addExistentPlayers(t,r),this.updateSceneLabel(this.sceneData.roomTitle),this.send({act:a.PLAYER_STATS}),this.send({act:a.CLIENT_JOINED});let s={player:r.player,previousScene:i,roomEvents:this};await this.events.emit("reldens.playersOnAddReady",s);let o={currentScene:r,previousScene:i,roomEvents:this};return await this.events.emit("reldens.createEngineSceneDone",o),o}addExistentPlayers(e,t){if(0===this.playersCountFromState(e))return!1;for(let i of this.playersKeysFromState(e)){let n=this.playerBySessionIdFromState(e,i);if(!n.sessionId||n.sessionId===e.sessionId)continue;let r={x:n.state.x,y:n.state.y,dir:n.state.dir,playerName:n.playerName,playedTime:n.playedTime,avatarKey:n.avatarKey,player_id:n.player_id};t.player.addPlayer(n.sessionId,r)}}playerBySessionIdFromState(e,t){return e.state.players.get(t)}playersCountFromState(e){return e.state.players.size}playersKeysFromState(e){return Array.from(e.state.players.keys())}async destroyPreviousScene(e,t){if(!e)return h.warning("Missing previous scene data.",e),!1;let i=this.gameEngine.scene.getScene(e);if(!i)return h.warning("Missing previous scene instance.",i),!1;await i.changeScene(),this.gameEngine.scene.stop(e),this.gameEngine.scene.start(t.state.scene)}updateSceneLabel(e){let t=this.gameManager.getUiElement("sceneLabel");if(!t)return!1;let i=t.getChildByProperty("className","scene-label");if(!i)return!1;i.innerHTML=e}getActiveScene(){return this.gameEngine.scene.getScene(this.roomName)}createSceneInstance(e,t,i){return new r(e,t,i)}createPlayerEngineInstance(e,t,i,r){return new n({scene:e,playerData:t,gameManager:i,room:r,roomEvents:this})}createPreloaderInstance(e){return new s(e)}send(e,t){try{return(this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSED||this.room.connection.transport.ws.readyState===this.room.connection.transport.ws.CLOSING)&&o.error("Connection lost."),t||(t="*"),this.room.send(t,e),!0}catch(t){h.critical(t.message,e)}this.gameManager.gameDom.alertReload(this.gameManager.services.translator.t("game.errors.connectionLost"))}}},{ad34e884dd74ab75:"3GkIQ","8c3cc377813bccbe":"6Vn5m",eb7c0f886bf8e7c7:"45YPY",dd0538535f6f136a:"93TbC","2b2fa27d8710e574":"3lwy5"}],"3GkIQ":[function(e,t,i){let{SpriteTextFactory:n}=e("94c0b713770985e9"),{GameConst:r}=e("c99c71c42a9e0f59"),{ActionsConst:s}=e("51d102aa478bf778"),{Logger:a,sc:o}=e("369ffb9744f96759");t.exports.PlayerEngine=class{constructor(e){let{scene:t,playerData:i,gameManager:n,room:r,roomEvents:s}=e;this.scene=t,this.config=n.config,this.gameManager=n,this.events=n.events,this.playerName=i.playerName,this.avatarKey=i.avatarKey,this.roomName=i.state.scene,this.state=i.state,this.room=r,this.roomEvents=s,this.playerId=r.sessionId,this.player_id=i.player_id,this.players={},this.playedTime=i.playedTime,this.mov=!1,this.dir=!1,this.currentTarget=!1,this.pointsValidator=!1,this.animationBasedOnPress=this.config.get("client/players/animations/basedOnPress"),this.topOff=this.config.get("client/players/size/topOffset"),this.leftOff=this.config.get("client/players/size/leftOffset"),this.collideWorldBounds=this.config.get("client/players/animations/collideWorldBounds"),this.fadeDuration=Number(this.config.get("client/players/animations/fadeDuration")),this.cameraRoundPixels=!!this.config.getWithoutLogs("client/general/engine/cameraRoundPixels",!0),this.cameraInterpolationX=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationX",.02)),this.cameraInterpolationY=Number(this.config.getWithoutLogs("client/general/engine/cameraInterpolationY",.02)),this.globalConfigNameText=this.config.get("client/ui/players/nameText"),this.globalConfigShowNames=!!this.config.get("client/ui/players/showNames"),this.globalConfigShowNamesLimit=this.config.getWithoutLogs("client/ui/players/showNamesLimit",10),this.defaultActionKeyConfig=this.config.get("client/ui/controls/defaultActionKey"),this.highlightOnOver=!!this.config.getWithoutLogs("client/ui/players/highlightOnOver",!0),this.highlightColor=this.config.getWithoutLogs("client/ui/players/highlightColor","0x00ff00"),this.lastKeyState={}}create(){let e={x:this.state.x,y:this.state.y,dir:this.state.dir,playerName:this.playerName,avatarKey:this.avatarKey,playedTime:this.playedTime,player_id:this.player_id};this.addPlayer(this.playerId,e),this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.scene.setVisible(!0,this.roomName),this.scene.cameras.main.fadeFrom(this.fadeDuration),this.scene.physics.world.fixedStep=!1,this.scene.physics.world.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setBounds(0,0,this.scene.map.widthInPixels,this.scene.map.heightInPixels),this.scene.cameras.main.setIsSceneCamera(!0),this.scene.cameras.main.on("camerafadeincomplete",()=>{this.scene.cameras.main.startFollow(this.players[this.playerId]),this.scene.cameras.main.setLerp(this.cameraInterpolationX,this.cameraInterpolationY),this.scene.cameras.main.setRoundPixels(this.cameraRoundPixels)})}addPlayer(e,t){if(o.hasOwn(this.players,e))return this.players[e];let{x:i,y:n,dir:r,playerName:s,avatarKey:a,playedTime:h,player_id:c}=t,l=this.gameManager.mappedAvatars[a];return this.players[e]=this.scene.physics.add.sprite(i,n-this.topOff,l),this.players[e].playerName=s,this.players[e].playedTime=h,this.players[e].avatarKey=a,this.players[e].playerId=e,this.players[e].player_id=c,this.players[e].anims.play(l+"_"+r),this.players[e].anims.stop(),this.showPlayerName(e),this.makePlayerInteractive(e),this.players[e].moveSprites={},this.players[e].setDepth(this.players[e].y+this.players[e].body.height),this.players[e].setCollideWorldBounds(this.collideWorldBounds),this.events.emitSync("reldens.playerEngineAddPlayer",this,e,t),this.players[e]}makePlayerInteractive(e){this.players[e].setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(r.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;this.setTargetPlayerById(e)}),this.highlightOnOver&&(this.players[e].on("pointerover",()=>{this.players[e].setTint(this.highlightColor)}),this.players[e].on("pointerout",()=>{this.players[e].clearTint()}))}setTargetPlayerById(e){if(!o.get(this.players,e,!1))return a.info('Target player ID "'+e+'" was not found.'),this.gameManager.gameEngine.clearTarget(),!1;let t=Object.assign({},this.currentTarget);this.currentTarget={id:e,type:r.TYPE_PLAYER,player_id:this.players[e].player_id},this.gameManager.gameEngine.showTarget(this.players[e].playerName,this.currentTarget,t)}showPlayerName(e){if(!this.globalConfigShowNames)return!1;if(!this.players[e])return a.critical('Player ID "'+e+'" not found.',this.players),!1;let t=this.players[e].playerName;if(!t)return a.critical('Player name not found on player ID "'+e+'".',this.players[e]),!1;n.attachTextToSprite(this.players[e],this.applyNameLengthLimit(t),this.globalConfigNameText,this.topOff,"nameSprite",this.scene)}applyNameLengthLimit(e){return 0this.globalConfigShowNamesLimit&&(e=e.slice(0,this.globalConfigShowNamesLimit)+"..."),e}updatePlayer(e,t){let i=this.players[e];if(!i){a.error("PlayerSprite not defined.",this.players,e);return}if(a.debug('Updating player ID "'+e+'". - Current player ID "'+this.player_id+'".'),this.scene.clientInterpolation){this.scene.interpolatePlayersPosition[e]=t.state;return}this.processPlayerPositionAnimationUpdate(i,t.state,e,t.state.x-this.leftOff,t.state.y-this.topOff)}processPlayerPositionAnimationUpdate(e,t,i,n=0,s=0){if(a.debug("Process player position animation update.",{playerSprite:e,playerState:t,playerId:i,newX:n,newY:s}),!e){a.error("Missing player sprite to process animation update.",e,t,i);return}if(!t){a.error("Missing player state to process animation update.",e,t,i);return}if(!i){a.error("Missing player ID to process animation update.",e,t,i);return}if(0!==Object.keys(this.scene.interpolatePlayersPosition).length){if(r.STATUS.DEATH===t.inState||r.STATUS.DISABLED===t.inState){delete this.scene.interpolatePlayersPosition[i];return}this.playPlayerAnimation(e,t,i),this.stopPlayerAnimation(e,t),this.updateSpritePosition(e,n,s),this.updatePlayerState(e,t,i)}}updatePlayerState(e,t,i){let n=e.y+e.body.height;e.depth!==n&&e.setDepth(n),this.events.emitSync("reldens.runPlayerAnimation",this,i,t,e),this.updateNamePosition(e),this.moveAttachedSprites(e,n)}updateSpritePosition(e,t,i){e.x!==t&&(e.x=t),e.y!==i&&(e.y=i)}updateNamePosition(e){if(!this.globalConfigShowNames||!e.nameSprite)return!1;let t=n.getTextPosition(e,this.applyNameLengthLimit(e.playerName),this.globalConfigNameText,this.topOff);e.nameSprite.x=t.x,e.nameSprite.y=t.y}moveAttachedSprites(e,t){let i=Object.keys(e.moveSprites);if(0===i.length)return!1;for(let n of i){let i=e.moveSprites[n];if(i.x===e.x&&i.y===e.y)continue;i.x=e.x,i.y=e.y;let r=t+("above"===o.get(i,"depthByPlayer","")?1:-.1);a.debug('Sprite "'+n+'" new depth: '+r+".",i),i.setDepth(r)}}playPlayerAnimation(e,t,i){if(this.isDeath(t)||this.isDisabled(t))return a.debug('Player with ID "'+i+'" is disabled to play the animation.',t),!1;a.debug("Play player animation.",e.avatarKey,t);let n=this.gameManager.mappedAvatars[e.avatarKey];if(this.animationBasedOnPress){let i=n+"_"+t.dir;return t.x===e.x&&t.y===e.y?(a.debug('Player has not changed, skipped animation "'+i+'".'),!1):(a.debug("Animation played based on press active.",n,{x:t.x+" / "+e.x,y:t.y+" / "+e.y}),void e.anims.play(i,!0))}if(t.x!==e.x){let i=t.x{this.transition=!1,this.gameManager.gameDom.activeElement().blur(),this.minimap.createMap(this,this.gameManager.getCurrentPlayerAnimation()),this.gameManager.isChangingScene=!1}),this.eventsManager.emitSync("reldens.afterSceneDynamicCreate",this)}update(e,t){this.interpolatePositions(),this.movePlayerByPressedButtons()}disableContextMenu(){if(!this.gameManager.config.get("client/ui/controls/disableContextMenu"))return!1;this.gameManager.gameDom.getDocument().addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()})}setupKeyboardAndPointerEvents(){this.input.keyboard.on("keydown",e=>this.executeKeyDownBehavior(e)),this.input.keyboard.on("keyup",e=>{this.executeKeyUpBehavior(e)}),this.input.on("pointerdown",(e,t)=>this.executePointerDownAction(e,t))}async createSceneMap(){for(let e of(this.map=this.make.tilemap({key:this.params.roomName}),this.params.sceneImages)){let t=this.map.addTilesetImage(this.params.roomName,e);t||c.critical("Tileset creation error. Check if the tileset name equals the imageKey without the extension.",{roomName:this.params.roomName,imageKeys:this.params.sceneImages,createdTileset:t}),this.tilesets.push(t)}this.registerLayers(),this.registerTilesetAnimation()}registerTilesetAnimation(){for(let e of this.tilesets)if(this.hasTilesetAnimations(e))for(let t of(this.useTsAnimation=!0,Object.keys(this.layers))){let i=this.layers[t],n=new s;n.register(i,e),n.start(),this.tilesetAnimations.push(n)}}hasTilesetAnimations(e){let t=e?.tileData||{},i=Object.keys(t);if(0===i.length)return!1;for(let e of i)if(t[e].animation)return!0;return!1}executeKeyDownBehavior(e){if(this.gameManager.gameDom.insideInput())return!1;if(r.Keyboard.KeyCodes.SPACE===e.keyCode&&!this.gameManager.gameDom.insideInput()){if(!this.player)return;this.player.runActions()}r.Keyboard.KeyCodes.ESC===e.keyCode&&this.gameManager.gameEngine.clearTarget(),r.Keyboard.KeyCodes.F5===e.keyCode&&(this.gameManager.forcedDisconnection=!0)}executeKeyUpBehavior(e){this.player&&-1!==this.availableControllersKeyCodes().indexOf(e.keyCode)&&this.player.stop()}createControllerKeys(){this.keyLeft=this.input.keyboard.addKey(r.Keyboard.KeyCodes.LEFT),this.keyA=this.input.keyboard.addKey(r.Keyboard.KeyCodes.A),this.keyRight=this.input.keyboard.addKey(r.Keyboard.KeyCodes.RIGHT),this.keyD=this.input.keyboard.addKey(r.Keyboard.KeyCodes.D),this.keyUp=this.input.keyboard.addKey(r.Keyboard.KeyCodes.UP),this.keyW=this.input.keyboard.addKey(r.Keyboard.KeyCodes.W),this.keyDown=this.input.keyboard.addKey(r.Keyboard.KeyCodes.DOWN),this.keyS=this.input.keyboard.addKey(r.Keyboard.KeyCodes.S);let e=this.availableControllersKeyCodes();for(let t of this.gameManager.gameDom.getElements("input"))this.addAndRemoveCapture(e,t)}addAndRemoveCapture(e,t){this.loopKeysAddListenerToElement(e,t,"focusin","removeCapture"),this.loopKeysAddListenerToElement(e,t,"click","removeCapture"),this.loopKeysAddListenerToElement(e,t,"focusout","addCapture"),this.loopKeysAddListenerToElement(e,t,"blur","addCapture")}availableControllersKeyCodes(){return[r.Keyboard.KeyCodes.LEFT,r.Keyboard.KeyCodes.A,r.Keyboard.KeyCodes.RIGHT,r.Keyboard.KeyCodes.D,r.Keyboard.KeyCodes.UP,r.Keyboard.KeyCodes.W,r.Keyboard.KeyCodes.DOWN,r.Keyboard.KeyCodes.S]}executePointerDownAction(e,t){if(0{u.destroy()}})}updatePointerObject(e){if(!this.configManager.get("client/ui/pointer/show"))return;this.arrowSprite&&this.arrowSprite.destroy();let t=this.configManager.get("client/ui/pointer/topOffSet",16);this.arrowSprite=this.physics.add.sprite(e.worldX,e.worldY-t,o.ARROW_DOWN),this.arrowSprite.setDepth(5e5),this.arrowSprite.anims.play(o.ARROW_DOWN,!0).on("animationcomplete",()=>{this.arrowSprite.destroy()})}getAnimationByKey(e){return this.anims&&this.anims?.anims&&this.anims?.anims?.entries?l.get(this.anims.anims.entries,e,!1):(c.error("Animations not loaded.",this.anims),!1)}getObjectFromExtraData(e,t,i){let n=!1,r=e+"K",s=t[e+"T"]===h.DATA_TYPE_VALUE_PLAYER;return!s&&l.hasOwn(this.objectsAnimations,t[r])&&(n=this.objectsAnimations[t[r]]),s&&l.hasOwn(i.players,t[r])&&(n=i.players[t[r]]),n}loopKeysAddListenerToElement(e,t,i,n){t.addEventListener(i,()=>{for(let t of e)this.input.keyboard[n](t)})}}},{c5f254ffb1f1868:"8S6DV","648aa76284c65b04":"4prPd","3e4f1f0221386850":"1LEsD","43a627027f5eb0e5":"93TbC",f368cde667056257:"59VA7","1c07ccf976c90508":"3lwy5"}],"4prPd":[function(e,t,i){t.exports.TileSetAnimation=class{constructor(e){this.timer=e?.timer}register(e,t){for(let i of(this.animations=[],this.registered={},this.layer=e,this.tileset=t,Object.keys(t.tileData))){let e=t.tileData[i];if(!e.animation)continue;e.id=i;let n=0;for(let t of e.animation){if(Number(i)===Number(t?.tileid||0)){e.initIndex=n;break}n++}this.animations.push(e)}}start(){for(let e of this.animations){let t=e.animation.length,i=Number(e.initIndex||0),n=Number((i+1)%t);this.repeat(e,i,n)}}repeat(e,t,i){let n=e.id;this.registered[n]&&(this.registered[n]=null);let r=e.animation,s=r.length,a=Number(this.tileset.firstgid),o=Number(e.animation[t].tileid)+a,h=Number(e.animation[i].tileid)+a;this.layer.replaceByIndex(o,h);let c=r[i].duration,l=Number((i+1)%s);this.registered[n]=this.setTimeout(this.repeat.bind(this,e,Number(i),l),c)}destroy(){for(let e of Object.keys(this.registered))this.registered[e]&&this.clearTimeout(this.registered[e])}setTimeout(e,t){return this.timer?this.timer.setTimeout(e,t):setTimeout(e,t)}clearTimeout(e){if(this.timer)return this.timer.clearTimeout(e);clearTimeout(e)}}},{}],"1LEsD":[function(e,t,i){let{sc:n}=e("786a4b1c3c76b965");t.exports.Minimap=class{constructor(e){this.config=e.config,this.events=e.events}createMap(e,t){this.minimapCamera=!1,this.circle=!1,this.scope=!1,this.awaitOnCamera=n.get(this.config,"awaitOnCamera",400),this.autoWidth=e.map.widthInPixels/n.get(this.config,"mapWidthDivisor",1),this.camWidth=n.get(this.config,"fixedWidth",this.autoWidth),this.autoHeight=e.map.heightInPixels/n.get(this.config,"mapHeightDivisor",1),this.camHeight=n.get(this.config,"fixedHeight",this.autoHeight),this.camX=n.get(this.config,"camX",0),this.camY=n.get(this.config,"camY",0),this.camBackgroundColor=n.get(this.config,"camBackgroundColor","rgba(0,0,0,0.6)"),this.camZoom=n.get(this.config,"camZoom",.15),this.roundMap=n.get(this.config,"roundMap",!1),this.addCircle=n.get(this.config,"addCircle",!1),this.createMinimapCamera(e,t),this.createRoundMap(e),this.events.emitSync("reldens.createdMinimap",this)}createMinimapCamera(e,t){this.minimapCamera=e.cameras.add(this.camX,this.camY,this.camWidth,this.camHeight).setName("minimap").setBackgroundColor(this.camBackgroundColor).setZoom(this.camZoom).startFollow(t,n.get(this.config,"mapCameraRoundPixels",!0),n.get(this.config,"mapCameraLerpX",1),n.get(this.config,"mapCameraLerpY",1)).setRoundPixels(!0).setVisible(!1).setOrigin(n.get(this.config,"mapCameraOriginX",.18),n.get(this.config,"mapCameraOriginY",.18))}createRoundMap(e){if(!this.roundMap)return!1;this.addCircle&&this.addMinimapCircle(e),this.createRoundCamera(e)}addMinimapCircle(e){let t=e.gameManager.getActiveScenePreloader();this.circle=t.add.circle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35),n.get(this.config,"circleColor","rgb(0,0,0)"),n.get(this.config,"circleAlpha",1)),this.circle.setStrokeStyle(n.get(this.config,"circleStrokeLineWidth",6),n.get(this.config,"circleStrokeColor",0),n.get(this.config,"circleStrokeAlpha",.6)),this.circle.setFillStyle(n.get(this.config,"circleFillColor",1),n.get(this.config,"circleFillAlpha",0)),this.circle.setVisible(!1)}createRoundCamera(e){this.scope=e.add.graphics(),this.scope.fillStyle(0,0).fillCircle(n.get(this.config,"circleX",220),n.get(this.config,"circleY",88),n.get(this.config,"circleRadio",80.35)),this.minimapCamera.setMask(this.scope.createGeometryMask())}destroyMap(){delete this.minimapCamera,delete this.circle,delete this.scope}}},{"786a4b1c3c76b965":"3lwy5"}],"45YPY":[function(e,t,i){let{Scene:n,Geom:r}=e("df67ed4c812038a9"),{MinimapUi:s}=e("a689b035cfc5756"),{InstructionsUi:a}=e("55a2dd84a2e283e3"),{SettingsUi:o}=e("29c970db688707f2"),{Joystick:h}=e("c747f1452190e301"),{GameConst:c}=e("475d783a521115cd"),{ActionsConst:l}=e("b9b9df6bd8016f7d"),{Logger:u,sc:d}=e("6e32bad98d4c2ac");t.exports.ScenePreloader=class extends n{constructor(e){super({key:e.name}),this.progressBar=null,this.progressCompleteRect=null,this.progressRect=null,this.userInterfaces={},this.preloadMapKey=e.map,this.preloadImages=e.images,this.uiScene=e.uiScene,this.elementsUi={},this.gameManager=e.gameManager,this.eventsManager=e.gameManager.events,this.preloadAssets=e.preloadAssets||{},this.directionalAnimations={},this.objectsAnimations={},this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.gameManager.activeRoomEvents.getActiveScene().objectsAnimationsData=e.objectsAnimationsData,this.playerSpriteSize={frameWidth:this.gameManager.config.get("client/players/size/width",52),frameHeight:this.gameManager.config.get("client/players/size/height",71)},this.useJoystick=this.gameManager.config.getWithoutLogs("client/ui/controls/useJoystick",!1),this.joystick=new h({scenePreloader:this})}preload(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.beforePreload",this,e),this.preloadUiScene(),this.preloadMapJson(),this.preloadMapImages(),this.preloadValidAssets(),this.preloadPlayerDefaultSprite(),this.preloadArrowPointer(),this.load.image(c.ICON_STATS,this.gameManager.config.get("client/general/assets/statsIconPath","/assets/icons/book.png")),this.load.on("fileprogress",this.onFileProgress,this),this.load.on("progress",this.onLoadProgress,this),this.load.on("complete",this.onLoadComplete,this),this.configuredFrameRate=this.gameManager.config.get("client/general/animations/frameRate",10),this.createProgressBar()}preloadMapJson(){this.preloadMapKey&&this.load.tilemapTiledJSON(this.preloadMapKey,"/assets/maps/"+this.preloadMapKey+".json")}preloadArrowPointer(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={frameWidth:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameWidth",32),frameHeight:this.gameManager.config.getWithoutLogs("client/general/assets/arrowDownFrameHeight",32)};this.load.spritesheet(c.ARROW_DOWN,this.gameManager.config.get("client/general/assets/arrowDownPath","/assets/sprites/arrow-down.png"),e)}preloadUiScene(){this.uiScene&&(this.eventsManager.emitSync("reldens.beforePreloadUiScene",this),this.gameManager.config.get("client/ui/playerBox/enabled")&&this.load.html("playerBox","/assets/html/ui-player-box.html"),this.gameManager.config.get("client/ui/controls/enabled")&&this.load.html("controls","/assets/html/ui-controls.html"),this.useJoystick&&this.load.html("joystick","/assets/html/ui-joystick.html"),this.gameManager.config.get("client/ui/sceneLabel/enabled")&&this.load.html("sceneLabel","/assets/html/ui-scene-label.html"),this.gameManager.config.get("client/ui/instructions/enabled")&&this.load.html("instructions","/assets/html/ui-instructions.html"),this.gameManager.config.get("client/ui/minimap/enabled")&&this.load.html("minimap","/assets/html/ui-minimap.html"),this.gameManager.config.get("client/ui/settings/enabled")&&(this.load.html("settings","/assets/html/ui-settings.html"),this.load.html("settings-content","/assets/html/ui-settings-content.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadTarget/enabled",!0)&&this.load.html("uiTarget","/assets/html/ui-target.html"),this.gameManager.config.getWithoutLogs("client/ui/preloadOptionsTemplates/enabled",!0)&&(this.load.html("uiOptionButton","/assets/html/ui-option-button.html"),this.load.html("uiOptionIcon","/assets/html/ui-option-icon.html"),this.load.html("uiOptionsContainer","/assets/html/ui-options-container.html")),this.gameManager.config.getWithoutLogs("client/ui/preloadLoading/enabled",!0)&&this.load.html("uiLoading","/assets/html/ui-loading.html"),this.eventsManager.emitSync("reldens.preloadUiScene",this))}preloadMapImages(){if(this.preloadImages)for(let e of this.preloadImages)this.load.image(e,`/assets/maps/${e}`)}preloadValidAssets(){if(!d.isObject(this.preloadAssets)){u.info("None assets available for preload.");return}for(let e of Object.keys(this.preloadAssets)){let t=this.preloadAssets[e];if("spritesheet"!==t.asset_type)continue;let i=d.toJson(t.extra_params);if(!i){u.error("Missing spritesheet params.",t);continue}this.load.spritesheet(t.asset_key,`/assets/custom/sprites/${t.asset_file}`,i)}}create(){let e=this.uiScene?this:this.gameManager.gameEngine.uiScene;this.eventsManager.emitSync("reldens.createPreload",this,e),this.uiScene&&this.createUiScene(),this.createPlayerAnimations(d.get(this.gameManager.playerData,"avatarKey",c.IMAGE_PLAYER)),this.createArrowAnimation()}createUiScene(){this.eventsManager.emitSync("reldens.beforeCreateUiScene",this),this.createPlayerBox(),this.createTargetUi(),this.createSceneLabelBox(),this.createControlsBox(),this.createInstructionsBox(),this.createMiniMap(),this.createSettingsUi(),this.eventsManager.emitSync("reldens.createUiScene",this)}createSettingsUi(){let e=this.getUiConfig("settings");e.enabled&&(this.settingsUi=new o,this.settingsUi.createSettings(e,this))}createMiniMap(){let e=this.getUiConfig("minimap");e.enabled&&(this.minimapUi=new s,this.minimapUi.createMinimap(e,this))}createInstructionsBox(){let e=this.getUiConfig("instructions");e.enabled&&(this.instructionsUi=new a,this.instructionsUi.createInstructions(e,this))}createControlsBox(){let e=this.getUiConfig("controls");if(e.enabled)return this.useJoystick?(this.elementsUi.controls=this.createUi("joystick",e),this.joystick.registerJoystickController()):(this.elementsUi.controls=this.createUi("controls",e),this.registerControllers(this.elementsUi.controls))}createUi(e,t){return this.createContent(e,t.uiX,t.uiY)}createContent(e,t,i){return this.add.dom(t,i).createFromCache(e)}createSceneLabelBox(){let e=this.getUiConfig("sceneLabel");e.enabled&&(this.elementsUi.sceneLabel=this.createUi("sceneLabel",e))}createTargetUi(){let e=this.getUiConfig("uiTarget");e.enabled&&(this.uiTarget=this.createUi("uiTarget",e),this.uiTarget.getChildByProperty("className","close-target").addEventListener("click",()=>{this.gameManager.gameEngine.clearTarget()}))}createPlayerBox(){let e=this.getUiConfig("playerBox");if(!e.enabled)return;this.elementsUi.playerBox=this.createUi("playerBox",e);let t=this.elementsUi.playerBox.getChildByProperty("id","logout");t?.addEventListener("click",()=>{this.gameManager.forcedDisconnection=!0,this.gameManager.firebase.isActive&&this.gameManager.firebase.app.auth().signOut(),this.gameManager.gameDom.getWindow().location.reload()})}getUiConfig(e,t,i){let{uiX:n,uiY:r}=this.getUiPosition(e,t,i);return{enabled:this.gameManager.config.getWithoutLogs("client/ui/"+e+"/enabled"),uiX:n,uiY:r}}getUiPosition(e,t,i){""===e&&(e="default");let n=this.gameManager.config.getWithoutLogs("client/ui/"+e,{}),r=d.get(n,"x",0),s=d.get(n,"y",0);if(this.gameManager.config.get("client/ui/screen/responsive")){let e=d.get(n,"responsiveX",!1),a=d.get(n,"responsiveY",!1),o=this.gameManager.gameDom.getElement(".game-container");t||(t=o.offsetWidth),i||(i=o.offsetHeight),r=!1!==e?e*t/100:0,s=!1!==a?a*i/100:0}return{uiX:r,uiY:s}}preloadPlayerDefaultSprite(){let e=this.gameManager.config.get("client/players/animations/fallbackImage","player-base.png");this.load.spritesheet(c.IMAGE_PLAYER,"/assets/custom/sprites/"+e,this.playerSpriteSize)}createPlayerAnimations(e){let t=this.gameManager.config.getWithoutLogs("client/players/animations/"+e+"Frames",this.gameManager.config.get("client/players/animations/defaultFrames"));for(let i of[{k:e+"_"+c.LEFT,img:e,start:t.left.start||3,end:t.left.end||5,repeat:-1,hide:!1},{k:e+"_"+c.RIGHT,img:e,start:t.right.start||6,end:t.right.end||8,repeat:-1,hide:!1},{k:e+"_"+c.UP,img:e,start:t.up.start||9,end:t.up.end||11,repeat:-1,hide:!1},{k:e+"_"+c.DOWN,img:e,start:t.down.start||0,end:t.down.end||2,repeat:-1,hide:!1}])this.createAnimationWith(i);this.eventsManager.emitSync("reldens.createPlayerAnimations",this,e)}createArrowAnimation(){if(!this.gameManager.config.get("client/ui/pointer/show"))return;let e={k:c.ARROW_DOWN,img:c.ARROW_DOWN,start:0,end:2,repeat:3,rate:6};this.createAnimationWith(e)}createAnimationWith(e){if(this.gameManager.createdAnimations[e.k])return;let t={key:e.k,frames:this.anims.generateFrameNumbers(e.img,{start:e.start,end:e.end}),frameRate:d.get(e,"frameRate",this.configuredFrameRate),repeat:e.repeat,hideOnComplete:d.get(e,"hide",!0)};return this.gameManager.createdAnimations[e.k]=this.anims.create(t),this.gameManager.createdAnimations[e.k]}registerControllers(e){this.setupDirButtonInBox(c.UP,e),this.setupDirButtonInBox(c.DOWN,e),this.setupDirButtonInBox(c.LEFT,e),this.setupDirButtonInBox(c.RIGHT,e),this.setupDefaultActionKey(e)}setupDefaultActionKey(e){let t=this.gameManager.config.get("client/ui/controls/defaultActionKey");if(!t)return;let i=this.createActionBox(t);this.gameManager.gameDom.appendToElement(".action-buttons",i),this.setupActionButtonInBox(t,e)}createActionBox(e){let t=this.cache.html.get("actionBox");return this.gameManager.gameEngine.parseTemplate(t,{key:e,actionName:e})}setupDirButtonInBox(e,t){let i=t.getChildByProperty("id",e);i&&this.hold(i,{dir:e})}setupActionButtonInBox(e,t){let i=t.getChildByProperty("id",e);if(i){if(this.gameManager.config.get("client/general/controls/action_button_hold")){this.hold(i,e);return}i?.addEventListener("click",()=>{let t=this.gameManager.activeRoomEvents.getActiveScene(),i={act:l.ACTION,target:t.player.currentTarget,type:e};this.gameManager.activeRoomEvents.send(i)})}}hold(e,t){e.addEventListener("mousedown",i=>{this.startHold(i,e,t)}),e.addEventListener("mouseup",t=>{this.endHold(t,e)}),e.addEventListener("mouseout",t=>{this.endHold(t,e)}),e.addEventListener("touchstart",i=>{this.startHold(i,e,t)}),e.addEventListener("touchend",t=>{this.endHold(t,e)})}startHold(e,t,i){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.add("button-opacity-off");let n=this.gameManager.activeRoomEvents.getActiveScene(),r=i;d.hasOwn(i,"dir")||(r={act:l.ACTION,target:n.player.currentTarget,type:i.type}),this.gameManager.activeRoomEvents.send(r)}endHold(e,t){e.preventDefault(),this.gameManager.config.get("client/ui/controls/opacityEffect")&&t.classList.remove("button-opacity-off"),this.gameManager.activeRoomEvents.send({act:c.STOP})}createProgressBar(){if(!this.gameManager.config.getWithoutLogs("client/ui/loading/show",!0))return;let e=r.Rectangle,t=e.Clone(this.cameras.main);this.progressRect=new e(0,0,t.width/2,50),e.CenterOn(this.progressRect,t.centerX,t.centerY),this.progressCompleteRect=r.Rectangle.Clone(this.progressRect),this.progressBar=this.createGraphics();let i=this.cameras.main.width,n=this.cameras.main.height,s=this.gameManager.config.get("client/ui/loading/font"),a=this.gameManager.config.get("client/ui/loading/fontSize"),o=this.gameManager.config.get("client/ui/loading/assetsSize");this.loadingText=this.createText(i/2,n/2-50,"Loading...",{fontFamily:s,fontSize:a}),this.loadingText.setOrigin(.5,.5),this.loadingText.setFill(this.gameManager.config.get("client/ui/loading/loadingColor")),this.percentText=this.createText(i/2,n/2-5,"0%",{fontFamily:s,fontSize:o}),this.percentText.setOrigin(.5,.5),this.percentText.setFill(this.gameManager.config.get("client/ui/loading/percentColor")),this.assetText=this.createText(i/2,n/2+50,"",{fontFamily:s,fontSize:o}),this.assetText.setFill(this.gameManager.config.get("client/ui/loading/assetsColor")),this.assetText.setOrigin(.5,.5)}createText(e,t,i,n){return this.add.text(e,t,i,n)}createGraphics(){return this.add.graphics()}onLoadComplete(){for(let e of this.children.list)e.destroy();this.loadingText.destroy(),this.assetText.destroy(),this.percentText.destroy(),this.scene.shutdown()}onFileProgress(e){this.gameManager.config.get("client/ui/loading/showAssets")&&this.assetText.setText("Loading "+e.key)}onLoadProgress(e){let t=parseInt(100*e)+"%";this.percentText.setText(t),this.progressRect.width=e*this.progressCompleteRect.width,this.progressBar.clear().fillStyle(2236962).fillRectShape(this.progressCompleteRect).fillStyle(16777215).fillRectShape(this.progressRect)}getUiElement(e,t=!0){return d.hasOwn(this.elementsUi,e)?this.elementsUi[e]:(t&&u.error("UI not found.",{uiName:e}),!1)}}},{df67ed4c812038a9:"8S6DV",a689b035cfc5756:"c3rUy","55a2dd84a2e283e3":"d5Xkk","29c970db688707f2":"3lOFf",c747f1452190e301:"qaPo7","475d783a521115cd":"93TbC",b9b9df6bd8016f7d:"59VA7","6e32bad98d4c2ac":"3lwy5"}],c3rUy:[function(e,t,i){let{sc:n}=e("3099c8189d097700");t.exports.MinimapUi=class{createMinimap(e,t){t.elementsUi.minimap=t.add.dom(e.uiX,e.uiY).createFromCache("minimap");let i=t.elementsUi.minimap.getChildByProperty("id","minimap-open"),n=t.elementsUi.minimap.getChildByProperty("id","minimap-close");i?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.remove("hidden"),i.classList.add("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.showMap(r,t,i,n,e)}),n?.addEventListener("click",()=>{let e=t.elementsUi.minimap.getChildByProperty("id","minimap-ui");e.classList.add("hidden"),i&&i.classList.remove("hidden");let r=t.gameManager.getActiveScene().minimap;r&&this.hideMap(r,t,n,e)})}showMap(e,t,i,n,r){if(this.awaitForCamera(e)){setTimeout(()=>{this.showMap(e,t,i,n,r)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!0),e.circle&&e.circle.setVisible(!0),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:i,minimap:e,box:r})}hideMap(e,t,i,n){if(this.awaitForCamera(e)){setTimeout(()=>{this.hideMap(e,t,i,n)},e.awaitOnCamera);return}e.minimapCamera.setVisible(!1),e.circle&&e.circle.setVisible(!1),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:i,minimap:e,box:n})}awaitForCamera(e){return 0{r.style.display="block",t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})});let a=t.gameManager.gameDom.getElement("#instructions-close");a?.addEventListener("click",()=>{r.style.display="none",t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:s,dialogBox:i,dialogContainer:r,uiScene:t})}),t.elementsUi.instructions=i}}},{"5a1cf36c8d3b7e72":"3lwy5"}],"3lOFf":[function(e,t,i){let{Logger:n}=e("203fa7507cacc04f");t.exports.SettingsUi=class{createSettings(e,t){let i=t.add.dom(e.uiX,e.uiY).createFromCache("settings");if(!i)return n.info("Settings dialog box could not be created."),!1;let r=t.cache.html.get("settings-content");if(!r)return n.info("Settings template not found."),!1;t.gameManager.gameDom.appendToElement(".content",r);let s=t.gameManager.gameDom.getElement("#settings-ui");if(!s)return n.info("Settings container not found."),!1;let a=t.gameManager.gameDom.getElement("#settings-close"),o=i.getChildByProperty("id","settings-open");o?.addEventListener("click",()=>{s.style.display="block",o&&(o.style.display="none"),t.gameManager.events.emit("reldens.openUI",{ui:this,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),a?.addEventListener("click",()=>{s.style.display="none",o&&(o.style.display="block"),t.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:a,openButton:o,dialogBox:i,dialogContainer:s,uiScene:t})}),t.elementsUi.settings=i}}},{"203fa7507cacc04f":"3lwy5"}],qaPo7:[function(e,t,i){let{GameConst:n}=e("88178d0bc5e02e97"),{Logger:r}=e("f4cd4df7f42f9061");t.exports.Joystick=class{constructor(e){this.gameManager=e?.scenePreloader?.gameManager,this.scenePreloader=e?.scenePreloader,this.gameDom=this.gameManager?.gameDom,this.isDragging=!1,this.centerX=!1,this.centerY=!1,this.threshold=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickThreshold",20),this.joystickLeft=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickLeft",25),this.joystickTop=this.gameManager.config.getWithoutLogs("client/ui/controls/joystickTop",25),this.positionSufix="px"}registerJoystickController(){if(!this.gameManager)return r.error("GameManager undefined on Joystick."),!1;this.joystick=this.gameDom.getElement("#joystick"),this.joystickThumb=this.gameDom.getElement("#joystick-thumb"),this.joystickThumb.addEventListener("mousedown",e=>{this.applyMovement(e.clientX,e.clientY)}),this.joystickThumb.addEventListener("touchstart",e=>{e.preventDefault();let t=e.touches?.shift();this.applyMovement(t.clientX,t.clientY)}),this.gameDom.getDocument().addEventListener("mousemove",this.handleMouseMove.bind(this)),this.gameDom.getDocument().addEventListener("mouseup",this.handleStop.bind(this)),this.gameDom.getDocument().addEventListener("touchmove",this.handleTouchMove.bind(this)),this.gameDom.getDocument().addEventListener("touchend",this.handleStop.bind(this))}position(e){return e+this.positionSufix}applyMovement(e,t){this.isDragging=!0;let i=this.joystick.getBoundingClientRect();this.centerX=i.width/2,this.centerY=i.height/2,this.updateThumbPosition(e-i.left,t-i.top)}handleStop(){this.isDragging=!1,this.joystickThumb.style.left=this.position(this.joystickLeft),this.joystickThumb.style.top=this.position(this.joystickTop),this.gameManager.getCurrentPlayer().stop()}updateDirection(e,t){let i=e-this.centerX,r=t-this.centerY,s=n.STOP;if(Math.abs(i)>Math.abs(r)&&Math.abs(i)>this.threshold){for(let e of(s=i>0?Math.abs(r)>this.threshold?r>0?"right-down":"right-up":"right":Math.abs(r)>this.threshold?r>0?"left-down":"left-up":"left").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}if(Math.abs(r)>this.threshold){for(let e of(s=r>0?Math.abs(i)>this.threshold?i>0?"down-right":"down-left":"down":Math.abs(i)>this.threshold?i>0?"up-right":"up-left":"up").split("-"))try{this.gameManager.getCurrentPlayer()[e]()}catch(e){}return s}return this.gameManager.getCurrentPlayer().stop(),s}updateThumbPosition(e,t){let i=e-this.centerX,n=t-this.centerY,r=Math.sqrt(i*i+n*n),s=Math.min(this.centerX,this.centerY);if(r>s){let e=Math.atan2(n,i),t=Math.cos(e)*s+this.centerX-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(t);let r=Math.sin(e)*s+this.centerY-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(r);return}let a=e-this.joystickThumb.offsetWidth/2;this.joystickThumb.style.left=this.position(a);let o=t-this.joystickThumb.offsetHeight/2;this.joystickThumb.style.top=this.position(o)}handleMouseMove(e){if(!this.isDragging)return;let t=this.joystick.getBoundingClientRect(),i=e.clientX-t.left,n=e.clientY-t.top;this.updateThumbPosition(i,n),this.updateDirection(i,n)}handleTouchMove(e){if(!this.isDragging)return;let t=e.touches?.shift(),i=this.joystick.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this.updateThumbPosition(n,r),this.updateDirection(n,r)}}},{"88178d0bc5e02e97":"93TbC",f4cd4df7f42f9061:"3lwy5"}],"401GU":[function(e,t,i){let{RegistrationFormHandler:n}=e("61e9430bb51b7408"),{TermsAndConditionsHandler:r}=e("6e331d321b006ecf"),{LoginFormHandler:s}=e("6146b6a5adb0380b"),{ForgotPasswordFormHandler:a}=e("48bdd5abf515687b"),{GuestFormHandler:o}=e("5b4b95bc89fe7076"),{FullScreenHandler:h}=e("9e3ced5ae6b38dd");t.exports.ClientStartHandler=class{constructor(e){this.gameManager=e}clientStart(){let e=new n(this.gameManager);e.activateRegistration(),new o(this.gameManager).activateGuest();let t=new r(this.gameManager);t.activateTermsAndConditions();let i=new s(this.gameManager);i.activateLogin();let c=new a(this.gameManager);c.activateForgotPassword(),c.displayForgotPassword();let l=new h(this.gameManager);l.activateFullScreen(),this.gameManager.firebase&&this.gameManager.firebase.startFirebase(),Object.assign(this.gameManager.elements,{registrationForm:e,termsAndConditions:t,loginForm:i,forgotPasswordForm:c,fullScreen:l}),this.gameManager.events.emitSync("reldens.clientStartAfter",this)}}},{"61e9430bb51b7408":"gYHC4","6e331d321b006ecf":"ilJrk","6146b6a5adb0380b":"hG35y","48bdd5abf515687b":"jNMHr","5b4b95bc89fe7076":"4jT2q","9e3ced5ae6b38dd":"5GTLr"}],gYHC4:[function(e,t,i){let{ErrorsBlockHandler:n}=e("e090c4bcd3707d9f"),{GameConst:r}=e("e6f38101bdd301e7");t.exports.RegistrationFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.REGISTER_FORM)}activateRegistration(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowRegistration"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS,t=this.gameDom.getElement(e.TERMS.ACCEPT),i=this.gameDom.getElement(e.TERMS.BOX);this.form.addEventListener("submit",n=>{if(n.preventDefault(),!this.form.checkValidity())return!1;let s=this.gameDom.getElement(e.REGISTRATION.PASSWORD).value,a=this.gameDom.getElement(e.REGISTRATION.RE_PASSWORD).value,o=this.form.querySelector(e.RESPONSE_ERROR);if(s!==a&&o)return o.innerHTML="Password and confirmation does not match.",!1;if(!t.checked&&o)return o.innerHTML="Please read and accept the terms and conditions and continue.",!1;i?.classList.add(r.CLASSES.HIDDEN),this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let h={formId:this.form.id,email:this.gameDom.getElement(e.REGISTRATION.EMAIL).value,username:this.gameDom.getElement(e.REGISTRATION.USERNAME).value,password:s,rePassword:a};this.gameManager.startGame(h,!0)})}}},{e090c4bcd3707d9f:"kzsmo",e6f38101bdd301e7:"93TbC"}],kzsmo:[function(e,t,i){let{GameConst:n}=e("32e4ac52cb34a235");t.exports.ErrorsBlockHandler=class{static reset(e){let t=e.querySelector(n.SELECTORS.RESPONSE_ERROR);e.querySelector(n.SELECTORS.INPUT).addEventListener("focus",()=>{t.innerHTML=""})}}},{"32e4ac52cb34a235":"93TbC"}],ilJrk:[function(e,t,i){let{GameConst:n}=e("5e95024018707600"),{Logger:r}=e("b4c60b227487fe12");t.exports.TermsAndConditionsHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.linkContainer=this.gameManager.gameDom.getElement(n.SELECTORS.TERMS.LINK_CONTAINER)}activateTermsAndConditions(){if(!this.linkContainer)return!1;let e=this.gameManager.appServerUrl+n.ROUTE_PATHS.TERMS_AND_CONDITIONS,t=new URL(this.gameDom.getDocument().location).searchParams.get("lang","");""!==t&&(e+="?lang="+t),this.gameDom.getJSON(e,(e,t)=>{if(!t.body||!t.heading||!t.checkboxLabel||!t.link)return!1;if(e)return r.info("Registration error.",e),!1;let i=n.SELECTORS.TERMS;this.gameDom.updateContent(i.HEADING,t.heading),this.gameDom.updateContent(i.BODY,t.body),this.gameDom.updateContent(i.ACCEPT_LABEL,t.checkboxLabel),this.gameDom.updateContent(i.LINK,t.link);let s=this.gameDom.getElement(i.LINK),a=this.gameDom.getElement(i.BOX);s?.addEventListener("click",e=>{e.preventDefault(),a?.classList.remove(n.CLASSES.HIDDEN)}),this.gameDom.getElement(i.CLOSE)?.addEventListener("click",()=>{a?.classList.add(n.CLASSES.HIDDEN)});let o=this.gameDom.getElement(n.SELECTORS.REGISTER_FORM);if(o){let e=this.gameDom.getElement(n.SELECTORS.RESPONSE_ERROR,o),t=this.gameDom.getElement(i.ACCEPT);t.addEventListener("click",()=>{t.checked&&(e.innerHTML="")}),this.gameDom.getElement(i.ACCEPT_LABEL).addEventListener("click",()=>{t.checked&&(e.innerHTML="")})}this.linkContainer?.classList.remove(n.CLASSES.HIDDEN)})}}},{"5e95024018707600":"93TbC",b4c60b227487fe12:"3lwy5"}],hG35y:[function(e,t,i){let{ErrorsBlockHandler:n}=e("d2e27800ca9e6097"),{GameConst:r}=e("9e1bb13aa99be738");t.exports.LoginFormHandler=class{constructor(e){this.gameManager=e,this.form=e.gameDom.getElement(r.SELECTORS.LOGIN_FORM)}activateLogin(){if(!this.form)return!1;n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity()||this.gameManager.submitedForm)return!1;this.gameManager.submitedForm=!0,this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,username:this.form.querySelector(r.SELECTORS.LOGIN.USERNAME).value,password:this.form.querySelector(r.SELECTORS.LOGIN.PASSWORD).value};return this.gameManager.startGame(t,!1)})}}},{d2e27800ca9e6097:"kzsmo","9e1bb13aa99be738":"93TbC"}],jNMHr:[function(e,t,i){let{ErrorsBlockHandler:n}=e("2f903207606daf1a"),{GameConst:r}=e("f41810322298058d");t.exports.ForgotPasswordFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=this.gameManager.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD_FORM)}activateForgotPassword(){return!!this.form&&(this.gameManager.config.get("client/general/users/allowRegistration")?void(n.reset(this.form),this.form.addEventListener("submit",e=>{if(e.preventDefault(),n.reset(this.form),!this.form.checkValidity())return!1;this.form.querySelector(r.SELECTORS.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let t={formId:this.form.id,forgot:!0,email:this.form.querySelector(r.SELECTORS.FORGOT_PASSWORD.EMAIL).value};this.gameManager.startGame(t,!1)})):(this.form.classList.add("hidden"),!0))}displayForgotPassword(){this.gameDom.getJSON(this.gameManager.appServerUrl+r.ROUTE_PATHS.MAILER,(e,t)=>{t.enabled&&this.gameDom.getElement(r.SELECTORS.FORGOT_PASSWORD.CONTAINER).classList.remove(r.CLASSES.HIDDEN)})}}},{"2f903207606daf1a":"kzsmo",f41810322298058d:"93TbC"}],"4jT2q":[function(e,t,i){let{ErrorsBlockHandler:n}=e("ed3946e6f3fa9c11"),{GameConst:r}=e("b422c8c562d99fb2"),{sc:s}=e("f241b93688d82620");t.exports.GuestFormHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.form=e.gameDom.getElement(r.SELECTORS.GUEST_FORM)}activateGuest(){if(!this.form)return!1;if(!this.gameManager.config.get("client/general/users/allowGuest"))return this.form.classList.add("hidden"),!0;n.reset(this.form);let e=r.SELECTORS;this.form.addEventListener("submit",t=>{if(t.preventDefault(),!this.form.checkValidity())return!1;this.form.querySelector(e.LOADING_CONTAINER).classList.remove(r.CLASSES.HIDDEN);let i="guest-"+s.randomChars(12),n=this.gameManager.config.getWithoutLogs("client/general/users/allowGuestUserName",!1)?this.gameDom.getElement(e.GUEST.USERNAME).value:i,a={formId:this.form.id,username:n,password:n,rePassword:n,isGuest:!0};this.gameManager.startGame(a,!0)})}}},{ed3946e6f3fa9c11:"kzsmo",b422c8c562d99fb2:"93TbC",f241b93688d82620:"3lwy5"}],"5GTLr":[function(e,t,i){let{GameConst:n}=e("9cf3053a062e3fe1");t.exports.FullScreenHandler=class{constructor(e){this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.body=this.gameDom.getElement(n.SELECTORS.BODY)}activateFullScreen(){this.gameDom.getElement(n.SELECTORS.FULL_SCREEN_BUTTON)?.addEventListener("click",e=>{if(e.preventDefault(),!this.gameDom.getDocument().fullscreenEnabled)return!1;this.body.requestFullscreen(),this.goFullScreen()}),this.gameDom.getWindow().matchMedia("(display-mode: fullscreen)").addEventListener("change",({matches:e})=>{if(e){this.goFullScreen();return}this.exitFullScreen()})}goFullScreen(){this.body.classList.add(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}exitFullScreen(){this.body.classList.remove(n.CLASSES.FULL_SCREEN_ON),this.gameManager?.gameEngine&&this.gameManager.gameEngine.updateGameSize(this.gameManager)}}},{"9cf3053a062e3fe1":"93TbC"}],"3ZqP5":[function(e,t,i){let{ClientCoreFeatures:n}=e("8ee8ee6c25b82d8c"),{Logger:r,sc:s}=e("5806e45b7c7c3fa8");t.exports.FeaturesManager=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.events=s.get(e,"events",!1)}async loadFeatures(e){if(!this.gameManager)return r.error("Game Manager undefined in FeaturesManager."),!1;if(!this.events)return r.error("EventsManager undefined in FeaturesManager."),!1;this.featuresList={},await this.events.emit("reldens.loadFeatures",this,e);let t=Object.keys(e);if(0===t.length)return this.featuresList;for(let i of t){let t=e[i];s.hasOwn(n,t)&&(this.featuresList[t]=new n[t],"function"==typeof this.featuresList[t].setup&&await this.featuresList[t].setup({gameManager:this.gameManager,events:this.events}),await this.events.emit("reldens.loadFeature_"+t,this.featuresList[t],this))}return this.featuresList}}},{"8ee8ee6c25b82d8c":"2BcLh","5806e45b7c7c3fa8":"3lwy5"}],"2BcLh":[function(e,t,i){let{ChatPlugin:n}=e("949b1921d3bf5140"),{ObjectsPlugin:r}=e("aa8995112e7d6bdb"),{InventoryPlugin:s}=e("d9ef351011c1851b"),{ActionsPlugin:a}=e("408c84b7d592f2b6"),{UsersPlugin:o}=e("12e36b841f0da63e"),{AudioPlugin:h}=e("3fd885750ac6ac6b"),{RoomsPlugin:c}=e("f2563b87854d4a6e"),{PredictionPlugin:l}=e("282babf537556f44"),{TeamsPlugin:u}=e("d0d5a23fa0219ef6"),{SnippetsPlugin:d}=e("ffba7e1c5e50a8a7"),{AdsPlugin:f}=e("d50aaab7df227399"),{WorldPlugin:p}=e("c63ee71351943ae1"),{ScoresPlugin:g}=e("e1d7ab421b11cea0"),{RewardsPlugin:m}=e("bd8f677aa060e20b");t.exports.ClientCoreFeatures={chat:n,objects:r,inventory:s,actions:a,users:o,audio:h,rooms:c,prediction:l,teams:u,snippets:d,ads:f,world:p,scores:g,rewards:m}},{"949b1921d3bf5140":"1pwR6",aa8995112e7d6bdb:"88wg5",d9ef351011c1851b:"83Jlt","408c84b7d592f2b6":"enPaX","12e36b841f0da63e":"1nDQd","3fd885750ac6ac6b":"jRcE9",f2563b87854d4a6e:"3yQhR","282babf537556f44":"80hlx",d0d5a23fa0219ef6:"8MUNa",ffba7e1c5e50a8a7:"tkJox",d50aaab7df227399:"aNIyr",c63ee71351943ae1:"79nNs",e1d7ab421b11cea0:"jv1vT",bd8f677aa060e20b:"4p1ha"}],"1pwR6":[function(e,t,i){let{ChatUi:n}=e("994be9db4994f9a3"),{MessagesListener:r}=e("b6a36cbfb0da5dfe"),{TemplatesHandler:s}=e("deb4c2146b2d1712"),a=e("267812d6128a4b8e"),{TranslationsMapper:o}=e("5e30eadde21dcf94"),{PluginInterface:h}=e("8d1c7a15abb408a"),{ChatConst:c}=e("fe17ff5717202a3b"),{Logger:l,sc:u}=e("ef3698ca9cea9d5");t.exports.ChatPlugin=class extends h{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in ActionsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in ChatPlugin."),this.messagesQueu=[],this.uiManager=!1,this.joinRooms=[c.CHAT_GLOBAL],this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.joinedRoom",async e=>{await r.listenMessages(e,this)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e,this.gameManager.config.get("client/ui/chat/showTabs"))}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi(),this.uiManager.createTabs(),this.uiManager.processMessagesQueue(this.messagesQueu)})}}},{"994be9db4994f9a3":"eLO7b",b6a36cbfb0da5dfe:"lJUIi",deb4c2146b2d1712:"fgdaI","267812d6128a4b8e":"daHmu","5e30eadde21dcf94":"1fcQw","8d1c7a15abb408a":"fC3To",fe17ff5717202a3b:"dUuh0",ef3698ca9cea9d5:"3lwy5"}],eLO7b:[function(e,t,i){let{Input:n}=e("97d93bd9735e7bfb"),{SpriteTextFactory:r}=e("19814f11619c8dd"),{ChatTabs:s}=e("2429a93c399ce990"),{ChatConst:a}=e("644250816f608ee2"),{Logger:o,sc:h}=e("1eb163b9249e21a9");t.exports.ChatUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene?.gameManager,this.gameDom=this.uiScene?.gameManager?.gameDom,this.setChatTypes(),this.setChatConfiguration(),this.uiChat={},this.messagesQueu=[],this.chatInput=!1,this.chatSendButton=!1,this.chatCloseButton=!1,this.chatOpenButton=!1}setChatConfiguration(){if(!this.gameManager||!this.gameManager.config)return!1;this.uiConfig=this.gameManager.config.get("client/ui/chat"),this.overheadChat=h.get(this.uiConfig,"overheadChat",{}),this.overHeadChatEnabled=h.get(this.overheadChat,"enabled",!1),this.overheadText=h.get(this.uiConfig,"overheadText",{}),this.isDefaultOpen=h.get(this.uiConfig,"defaultOpen",!1),this.isTyping=h.get(this.overheadChat,"isTyping",!1),this.showTabs=h.get(this.uiConfig,"showTabs",!1),this.closeChatBoxAfterSend=h.get(this.closeChatBoxAfterSend,"isTyping",!1),this.messagesConfig=this.gameManager.config.get("client/chat/messages"),this.characterLimit=h.get(this.messagesConfig,"characterLimit",0),this.characterLimitOverhead=h.get(this.messagesConfig,"characterLimitOverhead",0),this.appendErrorTypeOnActiveTab=h.get(this.messagesConfig,"appendErrorTypeOnActiveTab",!0)}setChatTypes(){if(!this.gameManager)return o.warning("Missing GameManager on ChatUI."),!1;if(!this.gameDom)return o.warning("Missing GameDom on ChatUI."),!1;if(!this.gameManager.initialGameData)return o.warning('Missing "initialGameData" on ChatUI.'),!1;if(this.chatTypes=h.get(this.gameManager.initialGameData,"chatTypes",[]),0===this.chatTypes.length)return!1;for(let e of(this.chatTypesById={},this.chatTypes))this.chatTypesById[e.id]=e}createUi(){if(!this.uiScene)return o.warning("Missing UI Scene on ChatUI."),!1;let{uiX:e,uiY:t}=this.uiScene.getUiConfig("chat");if(this.uiChat=this.uiScene.add.dom(e,t).createFromCache("chat"),this.uiScene.elementsUi.chat=this.uiChat,this.chatInput=this.uiChat.getChildByProperty("id",a.CHAT_INPUT),!this.chatInput)return o.info("Missing chat input on ChatUI."),!1;this.setupKeyPressBehaviors(),this.chatInput.addEventListener("onfocusout",()=>{this.hideIsTyping()}),this.setupSendButton(),this.setupOpenCloseButtons(),this.overHeadChatEnabled&&this.setupOverheadChatEvents(),this.isDefaultOpen&&this.showChatBox()}createTabs(){return!!this.showTabs&&(this.tabs=new s(this.gameManager,this.uiScene),!0)}setupOverheadChatEvents(){this.gameManager.events.on("reldens.runPlayerAnimation",(e,t,i,n)=>{this.updateOverheadTextPosition(n)})}setupOpenCloseButtons(){this.chatOpenButton=this.uiChat.getChildByProperty("id",a.CHAT_OPEN_BUTTON),this.chatOpenButton?.addEventListener("click",()=>{this.showChatBox(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})}),this.chatCloseButton=this.uiChat.getChildByProperty("id",a.CHAT_CLOSE_BUTTON),this.chatCloseButton?.addEventListener("click",()=>{this.hideChatBox(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:this.chatCloseButton,openButton:this.chatOpenButton,dialogBox:this.uiChat,dialogContainer:this.uiChat.getChildByProperty("id",a.CHAT_UI),uiScene:this.uiScene})})}setupSendButton(){this.chatSendButton=this.uiChat.getChildByProperty("id",a.CHAT_SEND_BUTTON),this.chatSendButton?.addEventListener("click",e=>{e.preventDefault(),this.sendChatMessage(this.chatInput,this.gameManager.activeRoomEvents),this.chatInput.focus()})}setupKeyPressBehaviors(){this.uiScene.input.keyboard.on("keyup-ENTER",()=>{this.isFocussedOnChatInput()||(this.showChatBox(),this.chatInput.focus())}),this.chatInput.addEventListener("keyup",e=>{if(e.keyCode===n.Keyboard.KeyCodes.ENTER){e.preventDefault(),this.sendChatMessage();return}this.showIsTyping()})}showOverheadChat(e,t){if(!this.overHeadChatEnabled)return!1;e.overheadTextSprite&&this.destroyTextSprite(e),t=this.applyTextLimit(t,this.characterLimitOverhead),e.overheadTextSprite=r.attachTextToSprite(e,t,this.overheadText,h.get(this.overheadText,"topOff",0),"overheadTextSprite",this.gameManager.getActiveScene());let i=h.get(this.overheadText,"timeOut",!1);i&&setTimeout(()=>{this.destroyTextSprite(e)},i)}updateOverheadTextPosition(e){if(!e.overheadTextSprite)return!1;let t=r.getTextPosition(e,e.playerName,this.overheadText,h.get(this.overheadText,"topOff",0));e.overheadTextSprite.x=t.x,e.overheadTextSprite.y=t.y}destroyTextSprite(e){if(!e.overheadTextSprite)return!1;e.overheadTextSprite.destroy(),delete e.overheadTextSprite}showIsTyping(){if(!this.overHeadChatEnabled||!this.isTyping||!this.isFocussedOnChatInput())return!1;this.showOverheadChat(this.gameManager.getCurrentPlayerAnimation(),this.gameManager.config.getWithoutLogs("client/ui/chat/waitingContent",this.t(a.SNIPPETS.WAITING)))}hideIsTyping(){if(!this.isTyping)return!1;this.destroyTextSprite(this.gameManager.getCurrentPlayerAnimation())}isFocussedOnChatInput(){return this.gameManager.gameDom.activeElement()===this.chatInput}showChatBox(){this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.remove("hidden"),this.uiChat.setDepth(4),this.chatOpenButton?.classList.add("hidden");let e=this.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);e&&(e.parentNode.scrollTop=e.scrollHeight),this.hideNotificationsBalloon()}hideChatBox(){let e=this.uiChat.getChildByProperty("id",a.CHAT_UI);if(!e)return o.info("Chat UI box not found."),!1;e.classList.add("hidden"),this.uiChat.setDepth(1),this.chatOpenButton?.classList.remove("hidden")}showNotificationBalloon(){this.getActiveBalloon()?.classList.remove("hidden")}hideNotificationsBalloon(){this.getActiveBalloon()?.classList.add("hidden")}getActiveBalloon(){if(!h.get(this.uiConfig,"notificationBalloon"))return!1;let e=this.uiChat.getChildByProperty("id",a.CHAT_BALLOON);return!!e&&e}processMessagesQueue(e){if(0===e.length)return!1;for(let t of e)this.attachNewMessage(t)}attachNewMessage(e){if(!this.gameManager.gameEngine.uiScene.cache)return;let t=this.gameManager.gameEngine.uiScene.cache.html.get("chatMessage"),i=this.translateMessage(e),n=this.gameManager.gameEngine.parseTemplate(t,{from:this.translateFrom(e),color:a.TYPE_COLOR[e[a.TYPES.KEY]],message:i}),r=this.showTabs?a.TYPES.MESSAGE:"",s=h.get(e,a.TYPES.KEY,r),c=h.get(this.chatTypesById,s,!1),l=!!(""!==s&&c?.show_tab)&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+s);l&&this.appendWithScroll(l,n);let u=!!c.also_show_in_type&&this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_PREFIX+c.also_show_in_type);u&&u!==l&&this.appendWithScroll(u,n);let d=""===s&&this.gameManager.gameDom.getElement(a.SELECTORS.CHAT_MESSAGES);if(d&&this.appendWithScroll(d,n),this.appendErrorTypeOnActiveTab&&a.TYPES.ERROR===s){let e=this.gameManager.gameDom.getElement(a.SELECTORS.TAB_CONTENT_ACTIVE);e&&e!==l&&e!==u&&this.appendWithScroll(e,n)}if(!l&&!u&&!d){null===l&&o.warning("Element not found for selector: .tab-content-"+s),null===u&&o.warning("Element not found for selector: .tab-content-"+c.also_show_in_type),o.warning("Chat message not attached to any tab or main panel.",{message:e,defaultType:r,messageType:s,chatType:c,appendToMain:d,appendToTab:l});return}if(e[a.MESSAGE.FROM]&&this.isValidMessageType(e[a.TYPES.KEY])){let t=this.fetchPlayerByName(e[a.MESSAGE.FROM]);t&&this.showOverheadChat(t,i)}this.uiChat.getChildByProperty("id",a.CHAT_UI).classList.contains("hidden")&&this.showNotificationBalloon()}appendWithScroll(e,t){e.innerHTML+=t,e.parentNode.scrollTop=e.scrollHeight}translateFrom(e){let t=e[a.TYPES.KEY],i=e[a.MESSAGE.FROM]||a.TYPES.SYSTEM;return this.isValidSnippetFromType(t)?this.t(a.SNIPPETS.PREFIX+a.TYPES.KEY+t):i}translateMessage(e){let t=e[a.TYPES.KEY];if(!this.isValidSnippetType(t))return e[a.MESSAGE.KEY];let i=e[a.MESSAGE.DATA.KEY];if(!i)return this.t(e[a.MESSAGE.KEY]);if(i[a.MESSAGE.DATA.MODIFIERS]){let t="",n=i[a.MESSAGE.DATA.TARGET_LABEL];for(let r of Object.keys(i[a.MESSAGE.DATA.MODIFIERS])){let s=this.t(r),o=i[a.MESSAGE.DATA.MODIFIERS][r];t+=this.t(e[a.MESSAGE.KEY],{propertyValue:o,propertyLabel:s,targetLabel:n})}return t}return this.t(e[a.MESSAGE.KEY],i)}t(e,t={},i=!1){return this.gameManager.services.translator.t(e,t,i)}isValidMessageType(e){return -1===this.validMessageTypes().indexOf(e)}validMessageTypes(){return[Object.values(a.TYPES)]}isValidSnippetType(e){let t=this.snippetsMessageTypes();for(let i of Object.keys(t))if(t[i]===e)return!0;return!1}snippetsMessageTypes(){let e=Object.assign({},a.TYPES);return delete e[a.TYPES.MESSAGE],delete e[a.TYPES.PRIVATE],delete e[a.TYPES.GLOBAL],delete e[a.TYPES.TEAMS],e}isValidSnippetFromType(e){return -1!==[a.TYPES.SYSTEM,a.TYPES.ERROR].indexOf(e)}fetchPlayerByName(e){let t=this.gameManager.getCurrentPlayer().players,i=Object.keys(t);if(1>=i.length)return!1;for(let n of i){let i=t[n];if(i.playerName===e)return i}}sendChatMessage(){if(!this.isValidMessage())return!1;let e=this.applyTextLimit(this.chatInput.value,this.characterLimit),t={act:a.CHAT_ACTION,m:e};this.gameManager.events.emitSync("reldens.chatMessageObjectCreated",this,t),this.useGlobalRoom()?this.useGlobalRoomForMessage(t):this.gameManager.activeRoomEvents.send(t),this.chatInput.value="",this.closeChatBoxAfterSend&&this.hideChatBox()}applyTextLimit(e,t){return 0{let t=this.gameManager.gameDom.getElement(".tab-label.active");t?.classList.remove("active"),e.target.classList.add("active");let i=this.gameManager.gameDom.getElement(".tab-content.active");i?.classList.remove("active");let n=this.gameManager.gameDom.getElement(".tab-content-"+e.target.dataset.tabId);if(!n)return r.warning("Tab content was not found.",e),!1;n.classList.add("active"),n.parentNode.scrollTop=n.scrollHeight})}}},{a22c3a2311bae153:"dUuh0","6e140e18d42fb249":"3lwy5"}],dUuh0:[function(e,t,i){let n="chat.",r="player.",s={KEY:"ctk",MESSAGE:1,JOINED:2,SYSTEM:3,PRIVATE:4,DAMAGE:5,REWARD:6,SKILL:7,TEAMS:8,GLOBAL:9,ERROR:10};t.exports.ChatConst={ROOM_TYPE_CHAT:"chat",CHAT_ACTION:"c",TYPES:s,CHAT_FROM:"f",CHAT_TO:"t",CHAT_UI:"chat-ui",CHAT_FORM:"chat-form",CHAT_INPUT:"chat-input",CHAT_SEND_BUTTON:"chat-send",CHAT_CLOSE_BUTTON:"chat-close",CHAT_OPEN_BUTTON:"chat-open",CHAT_BALLOON:"notification-balloon",CHAT_GLOBAL:"chat",MESSAGE:{KEY:"m",FROM:"f",TO:"t",DATA:{KEY:"md",SNIPPET:"sp",PLAYER_NAME:"pn",ROOM_NAME:"rn",DAMAGE:"d",TARGET_LABEL:"tL",SKILL_LABEL:"sk",MODIFIERS:"mfs"},DATA_VALUES:{NAMESPACE:"chat",pn:"playerName",rn:"roomName",d:"damage",tL:"targetLabel",sk:"skillLabel",mfs:"modifiers"}},SNIPPETS:{PREFIX:n,PLAYER_PREFIX:r,TAB_PREFIX:"tabs.",NPC_DAMAGE:n+"npcDamage",NPC_DODGED_SKILL:n+"dodgedSkill",MODIFIERS_APPLY:n+"modifiersApply",JOINED_ROOM:n+"joinedRoom",LEFT_ROOM:n+"leftRoom",PRIVATE_MESSAGE_PLAYER_NOT_FOUND:n+"playerNotFound",GLOBAL_MESSAGE_NOT_ALLOWED:n+"globalMessageNotAllowed",GLOBAL_MESSAGE_PERMISSION_DENIED:n+"globalMessagePermissionDenied",PLAYER:{DAMAGE:n+r+"damage",DODGED_SKILL:n+r+"dodgedSkill"},GUEST_INVALID_CHANGE_POINT:n+"guestInvalidChangePoint",WAITING:"..."},SELECTORS:{CONTENTS:"#chat-contents",CHAT_MESSAGES:"#chat-messages",TAB_CONTENT_PREFIX:".tab-content-",TAB_CONTENT_ACTIVE:".tab-content.active"},TYPE_COLOR:{[s.MESSAGE]:"#ffffff",[s.PRIVATE]:"#f39c12",[s.PRIVATE+".to"]:"#00afff",[s.GLOBAL]:"#ffff00",[s.SYSTEM]:"#2ecc71",[s.ERROR]:"#ff0000",[s.DAMAGE]:"#ff0000",[s.SYSTEM+".modifiers"]:"#0feeff",[s.REWARD]:"#2ecc71",[s.TEAMS]:"#2ecc71"}}},{}],lJUIi:[function(e,t,i){let{ChatConst:n}=e("7520fddeb5373b09");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.CHAT_ACTION===e.act){if(!t.uiManager){t.messagesQueu.push(e);return}t.uiManager.attachNewMessage(e)}})}}},{"7520fddeb5373b09":"dUuh0"}],fgdaI:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e,t){let i="/assets/features/chat/templates/";e.load.html("chat",i+"ui-chat.html"),e.load.html("chatMessage",i+"message.html"),t&&(e.load.html("chatTabsContainer",i+"tabs-container.html"),e.load.html("chatTabLabel",i+"tab-label.html"),e.load.html("chatTabContent",i+"tab-content.html"))}}},{}],daHmu:[function(e,t,i){t.exports={chat:{ctk3:"System",ctk10:"System",npcDamage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill",modifiersApply:"%propertyValue %propertyLabel on %targetLabel",joinedRoom:"%playerName has joined %roomName",leftRoom:"%playerName has left",playerNotFound:'Player "%playerName" not found',globalMessagesNotAllowed:"Global messages not allowed",globalMessagePermissionDenied:"Global message permission denied",guestInvalidChangePoint:"The room is not available for guest users.",player:{damage:"%damage damage on %targetLabel",dodgedSkill:"%targetLabel dodged %skill"},tabs:{message:"General",joined:"Joined",system:"System",private:"Private",damage:"Damage",reward:"Rewards",skill:"Skills",teams:"Teams",global:"Global",error:"Error"}}}},{}],"1fcQw":[function(e,t,i){let{SnippetsConst:n}=e("f5fe63265b673629"),{sc:r}=e("70ef676150c60a42");t.exports.TranslationsMapper=class{static forConfig(e,t,i=!1,s=n.DEFAULT_LOCALE){e.snippets||(e.snippets={}),e.snippets[s]||(e.snippets[s]={});let a=this.fromObject(t);if(e.snippets[s]=r.deepMergeProperties(a,e.snippets[s]),!i)return;e.snippetsDataValues||(e.snippetsDataValues={});let o=i.NAMESPACE||n.DATA_VALUES_DEFAULT_NAMESPACE;r.deepMergeProperties(e.snippetsDataValues,{[o]:i})}static fromObject(e){let t=Object.keys(e);if(0===t.length)return{};let i={};for(let n of t)this.recursiveMap(n,e[n],i);return i}static recursiveMap(e,t,i){if(!r.isObject(t)){i[e]=t;return}let s=Object.keys(t);if(0!==s.length)for(let r of s)this.recursiveMap(e+n.CONCAT_CHARACTER+r,t[r],i)}}},{f5fe63265b673629:"biSFs","70ef676150c60a42":"3lwy5"}],biSFs:[function(e,t,i){t.exports.SnippetsConst={KEY:"snippets",DEFAULT_LOCALE:"en_US",CONCAT_CHARACTER:".",DATA_VALUES_DEFAULT_NAMESPACE:"default",ACTIONS:{UPDATE:"sn.Up"}}},{}],fC3To:[function(e,t,i){let{Logger:n}=e("956b760a8a542b20");t.exports.PluginInterface=class{async setup(e){n.error("Setup plugin not implemented.",e)}}},{"956b760a8a542b20":"3lwy5"}],"88wg5":[function(e,t,i){let{AnimationEngine:n}=e("2d0db67a357a1df6"),{ObjectsMessageListener:r}=e("79a86c288b721c2b"),{DropsMessageListener:s}=e("deab023d199335c9"),a=e("8cedb0a2567e4f93"),{TranslationsMapper:o}=e("52449bab2a32580c"),{UserInterface:h}=e("52476153d5a162e6"),{ObjectsConst:c}=e("f64071d16effca52"),{ActionsConst:l}=e("bef8aa2a761e6924"),{PluginInterface:u}=e("6bb02e09282ac53"),{GameConst:d}=e("cb715b6f39878bc"),{Logger:f,sc:p}=e("c0cb3eea0cda2e5e");t.exports.ObjectsPlugin=class extends u{setup(e){this.gameManager=p.get(e,"gameManager",!1),this.gameManager||f.error("Game Manager undefined in InventoryPlugin."),this.events=p.get(e,"events",!1),this.events||f.error("EventsManager undefined in InventoryPlugin."),this.bodyOnAddCallBack=!1,this.bodyOnRemoveCallBack=!1,this.bullets={},this.changeBodyVisibilityOnInactiveState=this.gameManager.config.getWithoutLogs("client/objects/animations/changeBodyVisibilityOnInactiveState",!0),this.missingSpritesTimeOut=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesTimeOut",200),this.missingSpritesMaxRetries=this.gameManager.config.getWithoutLogs("client/general/animations/missingSpritesMaxRetries",5),this.missingSpriteRetry=0,this.listenEvents(),this.setTranslations(),this.setListener()}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.traderObject=new r}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,c.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async e=>{await this.prepareObjectsUi(e.gameManager,e.sceneData.objectsAnimationsData,e)}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{await this.createDynamicAnimations(e)}),this.events.on("reldens.joinedRoom",(e,t)=>{this.listenMessages(e,t),s.listenMessages(e,t)})}listenMessages(e,t){if(e.onMessage("*",e=>{this.startObjectAnimation(e,t),this.objectBattleEndAnimation(e,t)}),!e.state||!e.state.bodies)return!1;this.setAddBodyCallback(e,t),this.setRemoveBodyCallback(e)}setAddBodyCallback(e,t){this.bodyOnAddCallBack=e.state.bodies.onAdd((i,n)=>{this.setOnChangeBodyCallback(i,n,e,t),this.createBulletSprite(n,t,i)})}createBulletSprite(e,t,i){if(-1===e.indexOf("bullet"))return!1;let n=t.activeRoomEvents.getActiveScene(),r="default_bullet",s=(i.key?i.key+"_":"")+"bullet";p.hasOwn(t.gameEngine.uiScene.directionalAnimations,s)&&(s=s+"_"+i.dir),p.hasOwn(n.anims.anims.entries,s)&&(r=s);let a=n?.physics?.add?.sprite(i.x,i.y,r);if(!a)return f.warning("Could not create bullet sprite.",n),!1;a.setDepth(11e3),this.bullets[e]=a}setOnChangeBodyCallback(e,t,i,n){let r=Object.keys(e),s=Object.keys(e.state??{});for(let i of r)e.listen(i,async r=>{await this.events.emit("reldens.objectBodyChange",{body:e,key:t,changes:{[i]:r}}),this.updateBodyProperties(i,s,e,r);let a=n.activeRoomEvents.getActiveScene();if(!a)return;let o=-1!==t.indexOf("bullet"),h=o?this.bullets[t]:a?.objectsAnimations[t];this.setVisibility(h,d.STATUS.ACTIVE===e.inState),this.logObjectBodyUpdate(t,i,r,h);let c=d.STATUS.AVOID_INTERPOLATION!==e.inState;if(a?.clientInterpolation&&c){a.interpolateObjectsPositions[t]=e;return}return o?this.updateBulletBodyPosition(t,e):this.updateObjectsAnimations(t,e,a)})}logObjectBodyUpdate(e,t,i,n){let r={key:e,propertyKey:t,newValue:i};("x"===t||"y"===t)&&n&&n[t]&&(r.currentValue=n[t]),f.debug(r)}setVisibility(e,t){e&&e.sceneSprite&&e.sceneSprite.setVisible(t)}updateBodyProperties(e,t,i,n){if("state"===e){for(let e of t)i.state[e]=n[e];return}i[e]=n}updateBulletBodyPosition(e,t){this.bullets[e]&&(this.bullets[e].x=t.x,this.bullets[e].y=t.y,this.events.emit("reldens.objectBodyChanged",{body:t,key:e}))}updateObjectsAnimations(e,t,i){let n=p.get(i.objectsAnimations,e);if(!n)return!1;n.updateObjectAndSpritePositions(t.x,t.y),this.events.emit("reldens.objectBodyChanged",{body:t,key:e});let r=n.updateObjectDepth();n.inState=t.inState;let s=this.fetchAvailableAnimationKey(i,n,t);return""!==s&&n.sceneSprite.anims.play(s,!0),this.moveSpritesObjects(n,t.x,t.y,r),!t.mov&&(n.sceneSprite.anims.stop(),n.sceneSprite.mov=t.mov,!!n.autoStart&&(n.sceneSprite.anims.play(this.determineAutoStartAnimation(n,s)),!0))}determineAutoStartAnimation(e,t){return!0===e.autoStart?e.key:e.autoStart===c.DYNAMIC_ANIMATION?t:e.autoStart}fetchAvailableAnimationKey(e,t,i){return p.getByPriority(e.anims.anims.entries,[t.key+"_"+i.dir,t.layerName+"_"+t.id+"_"+i.dir,t.key])||""}setRemoveBodyCallback(e){this.bodyOnRemoveCallBack=e.state.bodies.onRemove((e,t)=>{if(-1===t.indexOf("bullet")||!p.hasOwn(this.bullets,t))return!1;this.bullets[t].destroy(),delete this.bullets[t]})}objectBattleEndAnimation(e,t){if(e.act!==l.BATTLE_ENDED)return!1;let i=p.get(t.config.client.skills.animations,e.k+"_death","default_death"),n=t.activeRoomEvents.getActiveScene();try{this.playDeathAnimation(i,n,e)}catch(e){f.warning('Error on sprite "'+i+'" not available.',e.message)}if(!p.hasOwn(e,l.DATA_OBJECT_KEY_TARGET))return!1;e[l.DATA_OBJECT_KEY_TARGET]===n.player.currentTarget?.id&&t.gameEngine.clearTarget();let r=p.get(n.player.players,e[l.DATA_OBJECT_KEY_TARGET],!1);if(!r)return!1;r.visible=!1,p.hasOwn(r,"nameSprite")&&r.nameSprite&&(r.nameSprite.visible=!1)}playDeathAnimation(e,t,i){if(!t.getAnimationByKey(e))return this.missingSpritesMaxRetries===this.missingSpriteRetry?f.debug('Sprite "'+e+'" not available.',e):(this.missingSpriteRetry++,setTimeout(()=>this.playDeathAnimation(e,t,i),this.missingSpritesTimeOut)),!1;let n=t.physics.add.sprite(i.x,i.y,e);return n.setDepth(10500),n.anims.play(e,!0).on("animationcomplete",()=>{n.destroy()}),!0}startObjectAnimation(e,t){if(e.act!==c.OBJECT_ANIMATION&&e.act!==c.TYPE_ANIMATION)return!1;let i=t.activeRoomEvents.getActiveScene();if(!p.hasOwn(i.objectsAnimations,e.key))return!1;i.objectsAnimations[e.key].runAnimation()}moveSpritesObjects(e,t,i,n){if(!e.moveSprites)return;let r=Object.keys(e.moveSprites);if(0!==r.length)for(let s of r){let r=e.moveSprites[s];r.x=t,r.y=i;let a=n+("above"===p.get(e.animationData,"depthByPlayer","")?1:-.1);r.setDepth(a)}}async prepareObjectsUi(e,t,i){if(!t){f.info(["None objects animations data.",i]);return}for(let n of Object.keys(t)){let r=t[n];if(!p.hasOwn(r,"ui"))continue;if(!r.id){f.error(["Object ID not specified. Skipping registry:",r]);continue}let s=p.get(r,"template","/assets/html/dialog-box.html");i.objectsUi[r.id]=new h(e,r,s,"npcDialog"),await e.events.emit("reldens.createdUserInterface",{gameManager:e,id:r.id,userInterface:i.objectsUi[r.id],ObjectsPlugin:this})}}async createDynamicAnimations(e){let t=e.gameManager.activeRoomEvents.getActiveScene();if(!t.objectsAnimationsData){f.info("None animations defined on this scene: "+t.key);return}for(let i of(await this.events.emit("reldens.createDynamicAnimationsBefore",this,e),Object.keys(t.objectsAnimationsData))){let n=t.objectsAnimationsData[i];await this.createAnimationFromAnimData(n,e)}}async createAnimationFromAnimData(e,t){if(!e.key)return f.error("Animation key not specified. Skipping registry.",e),!1;e.frameRate=t.configuredFrameRate,await this.events.emit("reldens.createDynamicAnimation_"+e.key,this,e);let i=new(t.gameManager.config.getWithoutLogs("client/customClasses/objects/"+e.key,n))(t.gameManager,e,t);return i.createAnimation(),i}}},{"2d0db67a357a1df6":"55aYT","79a86c288b721c2b":"9u1ZW",deab023d199335c9:"8cYlw","8cedb0a2567e4f93":"hznMs","52449bab2a32580c":"1fcQw","52476153d5a162e6":"bzImH",f64071d16effca52:"izuLV",bef8aa2a761e6924:"59VA7","6bb02e09282ac53":"fC3To",cb715b6f39878bc:"93TbC",c0cb3eea0cda2e5e:"3lwy5"}],"55aYT":[function(e,t,i){let{Logger:n,sc:r}=e("69cb276730e319a6"),{ObjectsConst:s}=e("4aa72c897fe49299"),{GameConst:a}=e("e5f3f59c83d28a8d");t.exports.AnimationEngine=class{constructor(e,t,i){this.currentPreloader=i,this.currentAnimation=!1,this.gameManager=e,this.enabled=t.enabled||!1,this.key=t.key,this.id=t.id,this.asset_key=t.asset_key||t.key,this.assetPath=t.assetPath||"/assets/custom/sprites/",this.type=t.type||!1,this.ui=t.ui||!1,this.targetName=t.targetName,this.frameRate=t.frameRate||!1,this.frameStart=t.frameStart||0,this.frameEnd=t.frameEnd||0,this.x=t.x||0,this.y=t.y||0,this.repeat=isNaN(t.repeat)?-1:t.repeat,this.hideOnComplete=t.hideOnComplete||!1,this.gameManager.createdAnimations||(this.gameManager.createdAnimations={}),this.destroyOnComplete=t.destroyOnComplete||!1,this.autoStart=t.autoStart||!1,this.layerName=t.layerName||!1,this.positionFix=t.positionFix||!1,this.zeroPad=t.zeroPad||!1,this.prefix=t.prefix||!1,this.isInteractive=t.isInteractive||!1,this.highlightOnOver=!!r.get(t,"highlightOnOver",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightOnOver",!0)),this.highlightColor=r.get(t,"highlightColor",this.gameManager.config.getWithoutLogs("client/ui/animations/highlightColor","0x00ff00")),this.restartTime=r.get(t,"restartTime",!1),this.calculateAnimPosition(),r.hasOwn(t,"animations")&&this.createObjectAnimations(t.animations)}updateObjectAndSpritePositions(e,t){this.sceneSprite.x=e,this.sceneSprite.y=t,this.x=e,this.y=t,this.calculateAnimPosition()}calculateAnimPosition(){this.animPos={x:this.x,y:this.y},this.positionFix&&(r.hasOwn(this.positionFix,"x")&&(this.animPos.x=this.x+this.positionFix.x),r.hasOwn(this.positionFix,"y")&&(this.animPos.y=this.y+this.positionFix.y))}updateObjectDepth(){let e=this.y+this.sceneSprite.height;return this.sceneSprite.setDepth(e),e}createAnimation(){if(!this.enabled){n.error("Animation disabled: "+this.key);return}let e=this.gameManager.activeRoomEvents.getActiveScene();if(!e){n.error("Active scene not found.");return}let t={start:this.frameStart,end:this.frameEnd};if(!1!==this.prefix&&(t.prefix=this.prefix),!1!==this.zeroPad&&(t.zeroPad=this.zeroPad),!this.currentPreloader.anims.textureManager.list[this.asset_key]){n.warning("Asset not found in preloader.",this.asset_key,t),this.currentPreloader.load.spritesheet(this.asset_key,this.assetPath+this.asset_key,t),this.currentPreloader.load.once("complete",async()=>{this.createAnimation()});return}let i=this.currentPreloader.anims.generateFrameNumbers(this.asset_key,t),r={key:this.key,frames:i,frameRate:this.frameRate,repeat:this.repeat,hideOnComplete:this.hideOnComplete};this.currentAnimation=this.gameManager.createdAnimations[this.key],this.currentAnimation||(n.debug("Creating animation: "+this.key),this.currentAnimation=this.currentPreloader.anims.create(r)),this.currentPreloader.objectsAnimations[this.key]=this.currentAnimation,this.gameManager.createdAnimations[this.key]=this.currentAnimation;let s=this.positionFix?this.animPos.x:this.x,a=this.positionFix?this.animPos.y:this.y;return this.sceneSprite=e.physics.add.sprite(s,a,this.asset_key),this.autoStart&&this.sceneSprite.anims.play(this.key,!0),this.enableInteraction(e),this.enableAutoRestart(),this.automaticDestroyOnComplete(),this.sceneSprite.setDepth(this.y+this.sceneSprite.body.height),e.objectsAnimations[this.key]=this,this.gameManager.events.emitSync("reldens.createAnimationAfter",{animationEngine:this}),this.sceneSprite}automaticDestroyOnComplete(){this.destroyOnComplete&&this.sceneSprite.on("animationcomplete",()=>{this.currentAnimation?.destroy(),this.sceneSprite.destroy()},this)}enableAutoRestart(){this.restartTime&&this.sceneSprite.on("animationcomplete",()=>{setTimeout(()=>{this.sceneSprite.anims&&(this.sceneSprite.anims.restart(),this.sceneSprite.anims.pause())},this.restartTime)},this)}enableInteraction(e){this.isInteractive&&(this.sceneSprite.setInteractive({useHandCursor:!0}).on("pointerdown",t=>{if(a.SELECTORS.CANVAS!==t.downElement.nodeName)return!1;let i=this.key===this.asset_key?this.id:this.key,n={act:s.OBJECT_INTERACTION,id:i,type:this.type};if(this.gameManager.activeRoomEvents.send(n),!this.targetName)return!1;let r=Object.assign({},e.player.currentTarget),o={id:i,type:s.TYPE_OBJECT};e.player.currentTarget=o,this.gameManager.gameEngine.showTarget(this.targetName,o,r)}),this.highlightOnOver&&(this.sceneSprite.on("pointerover",()=>{this.sceneSprite.setTint(this.highlightColor)}),this.sceneSprite.on("pointerout",()=>{this.sceneSprite.clearTint()})))}runAnimation(){if(!this.sceneSprite){n.error("Current animation not found: "+this.key);return}this.sceneSprite.anims.play(this.key,!0)}getPosition(){return{x:this.x,y:this.y}}createObjectAnimations(e){if(!e)return;let t=Object.keys(e);if(0!==t.length)for(let i of t){if(this.gameManager.createdAnimations[i]){this.currentPreloader.objectsAnimations[i]=this.gameManager.createdAnimations[i];continue}if(r.hasOwn(this.currentPreloader.objectsAnimations,i))continue;let t=e[i],n={key:i,frames:this.currentPreloader.anims.generateFrameNumbers(t.asset_key||this.asset_key,{start:t.start||this.frameStart,end:t.end||this.frameEnd}),frameRate:t.frameRate||this.frameRate,repeat:t.repeat||this.repeat,hideOnComplete:t.hideOnComplete||this.hideOnComplete,asset_key:t.asset_key||this.asset_key};this.currentPreloader.objectsAnimations[i]=this.currentPreloader.anims.create(n),this.gameManager.createdAnimations[i]=this.currentPreloader.objectsAnimations[i]}}}},{"69cb276730e319a6":"3lwy5","4aa72c897fe49299":"izuLV",e5f3f59c83d28a8d:"93TbC"}],"9u1ZW":[function(e,t,i){let{TraderObjectUi:n}=e("58811b04f3d9bb80"),{Logger:r,sc:s}=e("f04fad6c99485124");t.exports.ObjectsMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on ObjectsMessageListener.",e),!1;if(!s.get(t,"result",!1))return r.error("Missing result data on ObjectsMessageListener.",e),!1;if(!s.get(t,"id",!1))return r.error("Missing Object ID on ObjectsMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on ObjectsMessageListener.",e),!1;let a=new n({roomEvents:i,message:t});if(!a.validate())return!1;a.updateContents()}}},{"58811b04f3d9bb80":"h56Er",f04fad6c99485124:"3lwy5"}],h56Er:[function(e,t,i){let{ItemsConst:n}=e("6f47f46589411c74"),{ObjectsConst:r}=e("5d863b6194329ea"),{Logger:s,sc:a}=e("4eb12b9fd296bfd9");t.exports.TraderObjectUi=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.objectUi=this.roomEvents?.objectsUi[this.message?.id],this.setConfirmMessages()}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene?this.itemsManager?!!this.objectUi||(s.error("Missing objectUi on TraderObjectUi."),!1):(s.error("Missing ItemsManager on TraderObjectUi."),!1):(s.error("Missing UiScene on TraderObjectUi."),!1):(s.error("Missing GameManager on TraderObjectUi."),!1):(s.error("Missing message on TraderObjectUi."),!1):(s.error("Missing RoomEvents on TraderObjectUi."),!1)}setConfirmMessages(){if(!this.gameManager)return!1;this.confirmMessages={buy:this.gameManager.services.translator.t("objects.trader.buyConfirmed"),sell:this.gameManager.services.translator.t("objects.trader.sellConfirmed")}}updateContents(){let e=this.gameManager.gameDom.getElement("#box-"+this.objectUi.id+" .box-content");if(!e)return s.error('Missing container: "#box-'+this.objectUi.id+' .box-content".'),!1;let t=this.message.result.action;if(r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM===this.message.result.subAction)return e.innerHTML=this.confirmMessages[t],!0;let i=a.get(this.message.result,"items",!1),n=this.mapInventoryKeyFromAction(t),o=a.get(this.message.result,"exchangeData",!1),h=a.get(o,n,!1),c=this.message.result.exchangeRequirementsA||[],l=this.message.result.exchangeRewardsB||[];this.updateItemsList(i,t,c,l,e,h),this.updateExchangeData(h,t,c,l,i)}updateItemsList(e,t,i,n,r,s){if(!e)return;let o="",h={};for(let r of Object.keys(e)){let c=e[r],l=Object.assign({manager:this.itemsManager},c,{uid:r}),u=a.get(this.itemsManager.itemClasses,l.key,this.itemsManager.types.classByTypeId(l.type));h[r]=new u(l),h[r].quantityDisplay=1,h[r].quantityMaxDisplay=Math.max(h[r].qty_limit,c.qty),h[r].tradeAction=t,h[r].exchangeRequirements=this.fetchItemRequirements(l.key,i),h[r].exchangeRewards=this.fetchItemRewards(l.key,n),o+=this.createTradeItemBox(h[r],a.get(s,h[r].uid,!1))}r.innerHTML=this.createTradeContainer(t,o),this.activateItemsBoxActions(h),this.activateConfirmButtonAction(t)}activateConfirmButtonAction(e){let t=this.gameManager.gameDom.getElement(".confirm-"+e),i={act:r.OBJECT_INTERACTION,id:this.message.id,value:e,sub:r.TRADE_ACTIONS.CONFIRM};t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send(i)})}updateExchangeData(e,t,i,n,r){if(!1===e)return!1;let a=this.createConfirmItemsBox(e,r,t),o=null;return("buy"===t&&(o=this.gameDom.getElement(".trade-container-buy .trade-col.trade-col-2")),"sell"===t&&(o=this.gameDom.getElement(".trade-container-sell .trade-col.trade-col-1")),null===o)?(s.error('Missing "'+t+'" items container.',{message:this.message}),!1):(o.innerHTML=a,this.assignRemoveActions(e,r,t),!0)}createConfirmItemsBox(e,t,i){let r=Object.keys(e);if(0===r.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on confirmation trader-object-ui.",{message:this.message}),"";let a="",o=this.uiScene.cache.html.get("inventoryTradeItem");if(!o)return s.error('Missing template "inventoryTradeItem".'),"";for(let s of r){let r=e[s],h=t[s],c=n.TRADE_ACTIONS.BUY===i,l=n.TRADE_ACTIONS.SELL===i;a+=this.gameManager.gameEngine.parseTemplate(o,{key:h.key,label:h.label,description:h.description,id:s,qty:h.qty,hiddenClass:"",tradeRequirements:c?this.createTradeRequirementsContent(h):"",tradeRewards:l?this.createTradeRewardsContent(h):"",tradeAction:this.createTradeActionRemove(h),tradeActionKey:i,tradeQuantityContent:r})}return a}assignRemoveActions(e,t,i){let n=Object.keys(e);if(0===n.length)return this.message.lastErrorMessage||s.info("Undefined exchange items on remove trader-object-ui.",{message:this.message}),!1;for(let e of n){let n=".trade-item-to-be-"+i+".trade-item-"+e,a=this.gameDom.getElement(n);if(!a){s.error('Assign trade item "'+e+'" container not found.',{message:this.message});continue}let o=this.gameDom.getElement(".trade-item-"+i+".trade-item-"+e+" .trade-action-remove");if(!o){s.error('Assign trade item "'+e+'" remove button not found.',{message:this.message});continue}let h=t[e];o.addEventListener("click",()=>{a.classList.remove("hidden");let t={act:r.OBJECT_INTERACTION,id:this.message.id,value:i,itemId:e,itemKey:h.key};t[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e,t){let i=this.uiScene.cache.html.get("inventoryTradeContainer");if(!i)return s.error('Missing template "inventoryTradeContainer".'),"";let a=this.message.result.lastErrorData;a?.itemUid&&(a.item=this.fetchItemLabelByUid(a.itemUid)),a?.requiredItemKey&&(a.requiredItem=this.fetchItemLabelByUid(a.requiredItemKey));let o=this.gameManager.services.translator.t(this.message.result.lastErrorMessage,a),h=n.TRADE_ACTIONS.BUY===e?t:"",c=n.TRADE_ACTIONS.SELL===e?t:"";return this.gameManager.gameEngine.parseTemplate(i,{tradeActionKey:e,confirmRequirements:"",lastErrorMessage:o,tradeActionLabel:r.TRADE_ACTIONS_FUNCTION_NAME.CONFIRM,tradeItemsBuy:h,tradeItemsSell:c})}fetchItemLabelByUid(e){return this.gameManager?.inventory?.manager?.items[e]?.label||this.message?.result?.items[e]?.label||""}fetchItemRequirements(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}fetchItemRewards(e,t){if(0===t.length)return!1;let i={};for(let n of t)e===n.itemKey&&(i[n.itemKey]=n);return i}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return s.error('Missing template "inventoryTradeItem".'),"";let r=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!r)return s.error('Missing template "inventoryTradeItemQuantity".'),"";let a=n.TRADE_ACTIONS.BUY===e.tradeAction,o=n.TRADE_ACTIONS.SELL===e.tradeAction,h=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:r.OBJECT_INTERACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[r.TRADE_ACTIONS.SUB_ACTION]=r.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}mapInventoryKeyFromAction(e){return a.get({buy:"A",sell:"B"},e,!1)}}},{"6f47f46589411c74":"g4GOK","5d863b6194329ea":"izuLV","4eb12b9fd296bfd9":"3lwy5"}],g4GOK:[function(e,t,i){t.exports={ItemsServer:e("58ccb446d62c749b"),ItemsManager:e("99fbf686cf9954ad"),Inventory:e("d0e0bc002aa0626b"),ItemGroup:e("f76a9d92dd31d5bc"),ItemBase:e("8e9d5aa6534a13ad"),ItemEquipment:e("8451b91f0c937da4"),ItemUsable:e("106627cf30823e76"),ItemSingle:e("a73a08604f94da54"),ItemSingleEquipment:e("72395d9fa7948595"),ItemSingleUsable:e("6d04ae470a68a6bf"),ItemsFactory:e("f5eb7eeb5f537334"),ModelEntity:e("d4ce696862dbcd35"),ItemsConst:e("a5ef4f750b88ecba"),ItemsEvents:e("a180e01e5de133e0"),Receiver:e("33a340330572bf29"),ItemsDataGenerator:e("bf0687569e27057a"),GroupsDataGenerator:e("27ccd3cf572478fc"),ExchangePlatform:e("90218b41bb50ec4b"),ExchangeRequirement:e("c2601b545e947f39"),RequirementsCollection:e("72f6373fd251e1e3"),RequirementsProcessor:e("79f809e040670ce3"),ExchangeReward:e("3e52122617c11229"),RewardsCollection:e("6edee09b19b2994c"),RewardsProcessor:e("441790981610210a"),ItemsError:e("c48f961fa528324f")}},{"58ccb446d62c749b":"fCIqi","99fbf686cf9954ad":"5wpm2",d0e0bc002aa0626b:"8qkfQ",f76a9d92dd31d5bc:"3auVp","8e9d5aa6534a13ad":"gInMY","8451b91f0c937da4":"53uuI","106627cf30823e76":"d0orT",a73a08604f94da54:"lLwiJ","72395d9fa7948595":"a3dXh","6d04ae470a68a6bf":"9iH9y",f5eb7eeb5f537334:"lrNSa",d4ce696862dbcd35:"3ncwO",a5ef4f750b88ecba:"idEfG",a180e01e5de133e0:"fWlRm","33a340330572bf29":"2R9Cx",bf0687569e27057a:"nHDSk","27ccd3cf572478fc":"btt2J","90218b41bb50ec4b":"gRIlz",c2601b545e947f39:"4hpnF","72f6373fd251e1e3":"1wLI1","79f809e040670ce3":"kxCH2","3e52122617c11229":"iuvBV","6edee09b19b2994c":"hU2Lr","441790981610210a":"1sOiW",c48f961fa528324f:"eODT6"}],fCIqi:[function(e,t,i){let n=e("584cf2f2bf66f26b"),{StorageObserver:r}=e("3442076d73bd51e9"),s=e("906b84f8406328ec"),{Logger:a,ErrorManager:o,sc:h}=e("5ac154b5c4320dd9");t.exports=class{constructor(e){h.hasOwn(e,"owner")||o.error("Undefined owner."),this.manager=new n(e),this.createStorageObserver(e),this.createClient(e)}createClient(e){if(!h.hasOwn(e,"client"))return!1;this.client=new s({manager:this.manager,client:e.client})}createStorageObserver(e){if(!h.hasOwn(e,"persistence")||!e.persistence)return!1;let t=!1;if(h.hasOwn(e,"modelsManager")&&(t=e.modelsManager),!h.hasOwn(e.owner,"persistData")||"function"!=typeof e.owner.persistData)return a.error('Required method "persistData" not found in ItemServer props.owner.'),!1;this.dataServer=new r(this.manager,t),this.dataServer.listenEvents()}}},{"584cf2f2bf66f26b":"5wpm2","3442076d73bd51e9":"j7WCD","906b84f8406328ec":"3NxkK","5ac154b5c4320dd9":"lHuVm"}],"5wpm2":[function(e,t,i){let n=e("4fe5cf381ee58ab2"),r=e("419f5262e5a6365c"),s=e("bf63d9f42b20facf"),{ErrorManager:a,sc:o}=e("21ccb6baff6c486e");t.exports=class extends n{constructor(e){o.hasOwn(e,"owner")||a.error("Undefined owner."),super(e),this.itemClasses=o.get(e,"itemClasses",!1),this.groupClasses=o.get(e,"groupClasses",!1),this.itemsModelData=o.get(e,"itemsModelData",!1),this.ownerIdProperty=o.get(e,"ownerIdProperty","id"),this.owner=e.owner,this.groups={},this.eventsPrefix=this.getOwnerEventKey()+o.get(e,"eventsPrefix",""),this.types=new s}getOwnerId(){return this.owner[this.ownerIdProperty]}getOwnerEventKey(){return o.get(this.owner,"eventsPrefix","items.ownerId."+this.getOwnerId())}getOwnerUniqueEventKey(e){return(o.isFunction(this.owner.eventUniqueKey)?this.owner.eventUniqueKey():"items.ownerId."+this.getOwnerId()+".uKey."+o.getTime())+(e?"."+e:"")}async setup(e){await this.fireEvent(r.MANAGER_INIT,{props:e,manager:this}),o.hasOwn(e,"items")&&await this.setItems(e.items),o.hasOwn(e,"groups")&&await this.setGroups(e.groups)}createItemInstance(e,t){let i=o.get(this.itemsModelData,e,!1);if(!1===i)return!1;if(i.data.modifiers)for(let e of Object.keys(i.data.modifiers))i.data.modifiers[e].target=this.owner;let n=i.class.isSingleInstance(),r=void 0!==t&&n?t:1,s=Object.assign({},i.data,{manager:this,item_id:i.data.id,qty:r});if(delete s.uid,!0===n||1===r)return new i.class(s);let a=[];s.qty=1;for(let e=0;ethis.limitPerItem&&0<=this.limitPerItem?(this.setError("Cannot add item, item qty limit exceeded.",s.ERROR_CODES.ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM,{itemUid:t,qty:e.qty}),!1):(o.hasOwn(this.items,t)&&e.singleInstance?await this.increaseItemQty(t,e.qty):(await this.fireEvent(r.ADD_ITEM_BEFORE,this,e),this.items[t]=e,await this.fireEvent(r.ADD_ITEM,this,e)),this.items[t])}async addItems(e){for(let t of e)if(!await this.addItem(t))return this.setError('Cannot add item "'+t.getInventoryId()+'".',s.ERROR_CODES.ADD_ITEMS_ERROR,{itemUid:t.getInventoryId()}),!1;return!0}async setItem(e){if(this.locked)return this.setError("Inventory locked, cannot set item: "+e.getInventoryId(),s.ERROR_CODES.LOCKED_FOR_SET_ITEM,{itemUid:e.getInventoryId()}),!1;this.items[e.getInventoryId()]=e}async removeItem(e){return this.locked?(this.setError("Inventory locked, cannot remove item: "+e,s.ERROR_CODES.LOCKED_FOR_REMOVE_ITEM,{itemUid:e}),!1):o.hasOwn(this.items,e)?(await this.fireEvent(r.REMOVE_ITEM,this,e),delete this.items[e],!0):(this.setError("Cannot remove item, key not found: "+e,s.ERROR_CODES.KEY_NOT_FOUND,{itemUid:e}),!1)}async setItemQty(e,t){return this.modifyItemQty(s.SET,e,t)}async increaseItemQty(e,t){return this.modifyItemQty(s.INCREASE,e,t)}async decreaseItemQty(e,t){return this.modifyItemQty(s.DECREASE,e,t)}async modifyItemQty(e,t,i){if(this.locked)return this.setError("Inventory locked, cannot modify item qty: "+t,s.ERROR_CODES.LOCKED_FOR_MODIFY_ITEM_QTY,{itemUid:t}),!1;if(!o.hasOwn(this.items,t))return this.setError("Cannot "+e+" item qty, undefined item key: "+t,s.ERROR_CODES.UNDEFINED_ITEM_KEY_FOR_OPERATION,{itemUid:t,operation:e}),!1;if(isNaN(i))return this.setError("Cannot "+e+" item qty, qty is not a number: "+i,s.ERROR_CODES.QTY_NOT_A_NUMBER,{itemUid:t,operation:e,qty:i}),!1;if(this.limitPerItem>0&&i>this.limitPerItem&&(e===s.SET||e===s.INCREASE))return this.setError("Cannot "+e+" item qty, item qty limit exceeded: "+i+" > "+this.limitPerItem,s.ERROR_CODES.ITEM_QTY_LIMIT_EXCEEDED,{itemUid:t,operation:e,limitPerItem:this.limitPerItem}),!1;if(e===s.SET&&(this.items[t].qty=i),e===s.INCREASE&&(this.items[t].qty+=i),e===s.DECREASE){let e=this.items[t].qty-i;0>e&&(e=0),this.items[t].qty=e}return 0===this.items[t].qty&&this.items[t].autoRemoveItemOnZeroQty?(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),await this.removeItem(this.items[t].getInventoryId())):(await this.fireEvent(r.MODIFY_ITEM_QTY,this.items[t],this,e,t,i),!0)}async setItems(e){return this.locked?(this.setError("Inventory locked, cannot set items.",s.ERROR_CODES.LOCKED_FOR_SET_ITEMS),!1):(this.items=e,this.fireEvent(r.SET_ITEMS,{items:e,manager:this}))}async setGroups(e){return this.groups=e,this.fireEvent(r.SET_GROUPS,{groups:e,manager:this})}fireEvent(e,...t){return this.events.emit(this.eventFullName(e),...t)}listenEvent(e,t,i,n){return this.events.onWithKey(this.eventFullName(e),t,i,n)}eventFullName(e){return this.eventsPrefix+"."+e}setError(e="",t="",i={},r=!1){this.lastError=new n(e,t,i,r)}}},{adccac45c69ab6e8:"eODT6","2fd42dbc83a1dbf2":"fWlRm",bb9f4880ce8c412b:"idEfG","4bf1621a8608b780":"lHuVm"}],eODT6:[function(e,t,i){t.exports=class{constructor(e="",t="",i={},n=!1){this.message=e,this.code=t,this.data=i,this.withError=n}}},{}],fWlRm:[function(e,t,i){let n="reldens.items.";t.exports={PREF:n,MANAGER_INIT:n+"setup",EXCHANGE:{INITIALIZED:n+"initialized",CANCELED:n+"canceled",INVALID_PUSH:n+"invalidPush",ITEM_PUSHED:n+"itemPushed",ITEM_REMOVE:n+"itemRemove",CONFIRM:n+"confirm",DISCONFIRM:n+"disconfirm",BEFORE_FINALIZE:n+"beforeFinalize",FINALIZED:n+"finalized"},LOADED_OWNER_ITEMS:n+"loadedOwnerItems",SET_ITEMS:n+"setItems",SET_GROUPS:n+"setGroups",EQUIP_ITEM:n+"equipItem",UNEQUIP_ITEM:n+"unequipItem",ADD_ITEM:n+"addItem",ADD_ITEM_BEFORE:n+"addItemBefore",REMOVE_ITEM:n+"removeItem",MODIFY_ITEM_QTY:n+"modifyItemQty",EQUIP_BEFORE:n+"equipBefore",EQUIP:n+"equip",EXECUTING_ITEM:n+"executingItem",EXECUTED_ITEM:n+"executedItem",VALIDATE:n+"validate"}},{}],idEfG:[function(e,t,i){let n="rinv",r="items.",s="exchange.",a="requirements.",o="reward.",h="equipment.";t.exports={SET:"set",INCREASE:"increase",DECREASE:"decrease",ACTIONS_PREF:n,ACTION_ADD:n+"A",ACTION_REMOVE:n+"R",ACTION_MODIFY_QTY:n+"M",ACTION_EQUIP:n+"E",ACTION_UNEQUIP:n+"U",ACTION_MOD_APPLIED:n+"Ma",ACTION_MOD_REVERTED:n+"Mr",ACTION_EXECUTING:n+"Ex",ACTION_EXECUTED:n+"AExd",ACTION_MANAGER_INIT:n+"Mi",ACTION_SET_ITEMS:n+"Si",ACTION_SET_GROUPS:n+"Sg",BEHAVIOR_SEND:"send",BEHAVIOR_BROADCAST:"broadcast",BEHAVIOR_BOTH:"both",TYPES:{ITEM_BASE:10,EQUIPMENT:1,USABLE:2,SINGLE:3,SINGLE_EQUIPMENT:4,SINGLE_USABLE:5},TRADE_ACTIONS:{BUY:"buy",SELL:"sell",TRADE:"trade"},ERROR_CODES:{PREFIX:r,UNDEFINED_ITEM:r+"undefinedItem",UNDEFINED_METHOD_INVENTORY_ID:r+"undefinedMethodInventoryId",UNDEFINED_ITEM_KEY:r+"undefinedItemKey",INVALID_ITEM_INSTANCE:r+"invalidItemInstance",LOCKED_FOR_ADD_ITEM:r+"lockedForAddItem",MAX_TOTAL_REACHED_FOR_ADD_ITEM:r+"maxTotalReachedForAddItem",ITEM_EXISTS_FOR_ADD_ITEM:r+"itemExistsForAddItem",ITEM_LIMIT_EXCEEDED_FOR_ADD_ITEM:r+"itemLimitExceededForAddItem",ADD_ITEMS_ERROR:r+"addItemsError",LOCKED_FOR_SET_ITEM:r+"lockedForSetItem",LOCKED_FOR_REMOVE_ITEM:r+"lockedForRemoveItem",KEY_NOT_FOUND:r+"keyNotFound",LOCKED_FOR_MODIFY_ITEM_QTY:r+"lockedForModifyItemQty",UNDEFINED_ITEM_KEY_FOR_OPERATION:r+"undefinedItemKeyForOperation",QTY_NOT_A_NUMBER:r+"qtyNotANumber",ITEM_QTY_LIMIT_EXCEEDED:r+"itemQtyLimitExceeded",LOCKED_FOR_SET_ITEMS:r+"lockedForSetItems",EXCHANGE:{MISSING_CONFIRMATION:r+s+"missingConfirmation",INVALID_PUSHED_QUANTITY:r+s+"invalidPushedQuantity",INVALID_QUANTITY:r+s+"invalidQuantity",INVALID_EXCHANGE:r+s+"invalidExchange",DECREASE_QUANTITY:r+s+"decreaseQuantity",ITEM_ADD:r+s+"itemAdd"},REQUIREMENTS:{ITEM_NOT_PRESENT:r+a+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+a+"quantityNotAvailable",ITEM_NOT_PUSHED:r+a+"itemNotPushed",ITEM_QUANTITY_NOT_PUSHED:r+a+"itemQuantityNotPushed",ITEM_DOES_NOT_EXISTS:r+a+"itemDoesNotExists",ITEM_ADD:r+a+"itemAdd"},REWARD:{DOES_NOT_EXISTS:r+o+"doesNotExists",MISSING_ITEM:r+o+"missingItem",ITEM_NOT_PRESENT:r+o+"itemNotPresent",QUANTITY_NOT_AVAILABLE:r+o+"quantityNotAvailable",MISSING_PUSHED:r+o+"missingPushed",GET_ITEM_DOES_NOT_EXISTS:r+o+"getItemDoesNotExists",PROCESS_ITEM:r+o+"processItem",PROCESS_INVENTORY:r+o+"processInventory",ADD_ITEMS:r+o+"addItems",QUANTITY_OVERLOAD:r+o+"quantityOverload"},EQUIPMENT:{MODIFIERS_APPLY:r+h+"modifiersApply",MODIFIERS_REVERT:r+h+"modifiersRevert"}}}},{}],lHuVm:[function(e,t,i){let n=e("2bcd40494882fb47");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("455423ccd9c84c22"),InteractionArea:e("216924daca797e62"),SchemaValidator:e("85ccbf154c9d134e"),Logger:e("f2f4c65d53676758"),sc:e("c3852ea63c51ea54")}},{"2bcd40494882fb47":"cn4Yn","455423ccd9c84c22":"cBHKQ","216924daca797e62":"4m0ij","85ccbf154c9d134e":"4H6po",f2f4c65d53676758:"8oBG9",c3852ea63c51ea54:"s7JqC"}],cn4Yn:[function(e,t,i){let n=e("221f90b1e4d940d7").default,r=e("cadd03cba4a645cb"),s=e("40604cfb25e507f");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{"221f90b1e4d940d7":"46bZC",cadd03cba4a645cb:"8oBG9","40604cfb25e507f":"s7JqC"}],"8oBG9":[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],s7JqC:[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&t=t.length)return;let i=e?"revert":"apply";for(let e of t)this.modifiers[e][i](this.target);return this.manager.fireEvent(r.EQUIP+(e?"Reverted":"Applied")+"Modifiers",this)}isType(e){return this.type===e}async fireEvent(e,...t){return this.manager.fireEvent(e,...t)}listenEvent(e,t,i,n){return this.manager.listenEvent(e,t,i,n)}}},{c12e6ac2d5a93063:"idEfG",c6965a9a447f564a:"fWlRm",e634cd5ec6f60b00:"lHuVm"}],"53uuI":[function(e,t,i){let n=e("33cdc889b48aacb0"),r=e("c5fbc38955884411"),s=e("8ae98c100e6c951f"),{sc:a}=e("bcc3d9fdf3135034");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.EQUIPMENT,this.equipped=a.get(e,"equipped",!1)}async equip(e){if(this.equipped=!0,await this.manager.fireEvent(s.EQUIP_ITEM,this),!1===e||!1===this.manager.applyModifiersAuto)return!1;await this.applyModifiers()}async unequip(e){if(this.equipped=!1,await this.manager.fireEvent(s.UNEQUIP_ITEM,this),!1===e||!1===this.manager.revertModifiersAuto)return!1;await this.revertModifiers()}async applyModifiers(){return this.equipped?await super.applyModifiers():(this.manager.setError("Cannot apply modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_APPLY,{itemUid:this.getInventoryId()}),!1)}async revertModifiers(){return this.equipped?(this.manager.setError("Cannot revert modifiers the item is not equipped: "+this.getInventoryId(),r.ERROR_CODES.EQUIPMENT.MODIFIERS_REVERT,{itemUid:this.getInventoryId()}),!1):await super.revertModifiers()}}},{"33cdc889b48aacb0":"gInMY",c5fbc38955884411:"idEfG","8ae98c100e6c951f":"fWlRm",bcc3d9fdf3135034:"lHuVm"}],d0orT:[function(e,t,i){let n=e("73e1b5628e255757"),r=e("da3e74df899b07c1"),s=e("31d1c1f3f78c977b"),{sc:a}=e("ba8c76a702e812f2");t.exports=class extends n{constructor(e){super(e),this.type=r.TYPES.USABLE,this.uses=a.get(e,"uses",1),this.currentUses=this.uses,this.usesLimit=a.get(e,"usesLimit",!1),this.canUse=!0,this.removeAfterUse=!0,this.useTimeOut=!1,this.useTimer=!1,this.execTimeOut=!1,this.execTimer=!1,this.removeQtyAfterUse=a.get(e,"removeQtyAfterUse",1),this.autoRemoveItemOnZeroQty=a.get(e,"autoRemoveItemOnZeroQty",!0)}async use(e=!1){if(!this.canUse||0>=this.currentUses)return!1;if(e&&(this.target=e),this.useTimeOut&&(this.canUse=!1,this.useTimer=setTimeout(async()=>{this.canUse=!0},this.useTimeOut)),await this.manager.fireEvent(s.EXECUTING_ITEM,this),!1===this.execTimeOut){await this.executeItem();return}this.execTimer=setTimeout(async()=>{await this.executeItem()},this.execTimeOut)}async executeItem(){return await this.applyModifiers(),this.currentUses--,!this.removeAfterUse||0t}le(e,t){return e<=t}ge(e,t){return e>=t}}},{"7f32cc4f678fee29":"JMhgy","3ddfbc21a5968711":"7bVCu",ccbf83a7cf179d24:"4bERK"}],JMhgy:[function(e,t,i){let n=e("d691d4fa6cea2950");t.exports={EventsManager:n,EventsManagerSingleton:new n,ErrorManager:e("d8e958d8f96101bc"),InteractionArea:e("272503a2730d31a"),SchemaValidator:e("7848250a9f47caf1"),Logger:e("404653b25061da31"),sc:e("9d383f341b9eb1ec")}},{d691d4fa6cea2950:"99okY",d8e958d8f96101bc:"8sWui","272503a2730d31a":"bcvJ4","7848250a9f47caf1":"fQvVq","404653b25061da31":"3u2po","9d383f341b9eb1ec":"4qzmB"}],"99okY":[function(e,t,i){let n=e("bb63facf08805c0e").default,r=e("3edeaecc21521149"),s=e("63662fd363376d05");t.exports=class extends n{constructor(){super(),this.eventsByRemoveKeys={},this.debug=!1}onWithKey(e,t,i,n){if(s.hasOwn(this.eventsByRemoveKeys,i)||n&&s.hasOwn(this.eventsByRemoveKeys,n)&&s.hasOwn(this.eventsByRemoveKeys[n],i))return r.debug('Event "'+e+'" exists with key "'+i+'" and masterKey "'+n+'".'),!1;this.on(e,t);let a=this.listeners(e),o=a.indexOf(t),h=a[o];return n?(s.hasOwn(this.eventsByRemoveKeys,n)||(this.eventsByRemoveKeys[n]={}),this.eventsByRemoveKeys[n][i]={eventName:e,callback:t}):this.eventsByRemoveKeys[i]={eventName:e,callback:t},h}offWithKey(e,t){if(t&&!s.hasOwn(this.eventsByRemoveKeys,t))return r.debug('Event not found by masterKey "'+t+'".'),!1;if(!t&&!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Event not found by removeKey "'+e+'".'),!1;let i=t?this.eventsByRemoveKeys[t][e]:this.eventsByRemoveKeys[e],n=this.listeners(i.eventName).indexOf(i.callback);return(this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName],t)?(delete this.eventsByRemoveKeys[t][e],r.debug('Deleted event by removeKey "'+e+'" and masterKey "'+t+'".')):(delete this.eventsByRemoveKeys[e],r.debug('Deleted event by removeKey "'+e+'".')),!0}offByMasterKey(e){if(!s.hasOwn(this.eventsByRemoveKeys,e))return r.debug('Events not found by masterKey "'+e+'".'),!1;for(let t of(r.debug("Removing events by masterKey: "+e,Object.keys(this.eventsByRemoveKeys[e])),Object.keys(this.eventsByRemoveKeys[e]))){let i=this.eventsByRemoveKeys[e][t],n=this.listeners(i.eventName).indexOf(i.callback);this._events[i.eventName].splice(n,1),0===this._events[i.eventName].length&&delete this._events[i.eventName]}delete this.eventsByRemoveKeys[e]}on(e,t){!1!==this.debug&&this.logDebugEvent(e,"Listen"),super.on(e,t)}async emit(e,...t){!1!==this.debug&&this.logDebugEvent(e,"Fire"),await super.emit(e,...t)}logDebugEvent(e,t){(-1!==this.debug.indexOf("all")||-1!==this.debug.indexOf(e)||-1!==e.indexOf(this.debug))&&r.debug(t+" Event:",e)}}},{bb63facf08805c0e:"46bZC","3edeaecc21521149":"3u2po","63662fd363376d05":"4qzmB"}],"3u2po":[function(e,t,i){t.exports=new class{logLevels={none:0,emergency:1,alert:2,critical:3,error:4,warning:5,notice:6,info:7,debug:8};constructor(){let e=this.context();this.enableTraceBack="",this.logLevelBack=3,this.forcedDisabled=!!e.RELDENS_FORCED_DISABLED_LOGS,this.addTimeStamp=(e.RELDENS_INCLUDE_LOGS_TIMESTAMP,!0)}context(){return"undefined"!=typeof window?window:{}}enableTraceAll(){return this.enableTraceBack=this.context().RELDENS_ENABLE_TRACE_FOR,this.context().RELDENS_ENABLE_TRACE_FOR="all",this}restoreTraceFor(){return this.context().RELDENS_ENABLE_TRACE_FOR=this.enableTraceBack,this}setLogLevel(e){return this.logLevelBack=this.context().RELDENS_LOG_LEVEL,this.context().RELDENS_LOG_LEVEL=e,this}restoreLogLevel(){return this.context().RELDENS_LOG_LEVEL=this.logLevelBack,this}setForcedDisabled(e){return this.forcedDisabled=e,this}setAddTimeStamp(e){return this.addTimeStamp=e,this}logLevel(){return this.context().RELDENS_LOG_LEVEL||0}enableTraceFor(){return(this.context().RELDENS_ENABLE_TRACE_FOR||"").split(",")}log(e,...t){if(console.log((this.addTimeStamp?new Date().toISOString().slice(0,19).replace("T"," ")+" - ":"")+e.toUpperCase()+" -",...t),-1!==this.enableTraceFor().indexOf("all")||-1!==this.enableTraceFor().indexOf(e)){if("function"!=typeof Error?.captureStackTrace)return console.log("Error.captureStackTrace is not available.",typeof Error?.captureStackTrace),this;let t={};Error.captureStackTrace(t,e),console.log(t.stack)}return this}debug(...e){return this.forcedDisabled||8>this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],"4qzmB":[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&tthis.maxValue&&(e=this.maxValue),this.minProperty){let t=this.getPropertyValue(this.minProperty);t&&et&&(e=t)}return e}getPropertyValue(e){return this.propertyManager.getPropertyValue(this.target,e)}setOwnerProperty(e,t){return this.propertyManager.setOwnerProperty(this.target,e,t)}}},{"466f1d6a713f27d":"15YIL","3a9190386e2c269":"jefAk",a7b06831aaf035e5:"7bVCu","3a11d9dd77bf6747":"4bERK","994144a57bf406a1":"JMhgy"}],"3NxkK":[function(e,t,i){let n=e("b644d789ee2b40af"),r=e("45ba412a65c2e357"),{PropertyManager:s}=e("994236dc9aef1f79"),{Logger:a,sc:o}=e("8b1efebe48a67288");t.exports=class{constructor(e){this.client=o.get(e,"client",!1),this.manager=o.get(e,"manager",!1),this.sendProperties=o.get(e,"sendProperties",{}),!1===o.hasOwn(e,"sendProperties")&&this.defineBehaviorForProperties(),this.sendTargetProps=o.hasOwn(e,"sendTargetProps")?e.sendTargetProps:{broadcast:[],send:[]},this.propertyManager=new s,this.listenEvents()}validateManager(){return!!this.manager||(a.critical("Undefined manager for Sender."),!1)}validateClient(){return this.client?o.isObjectFunction(this.client,"send")?!!o.isObjectFunction(this.client,"broadcast")||(a.critical('Required method "broadcast" not found in client.',this.client),!1):(a.critical('Required method "send" not found in client.',this.client,typeof this.client.send),!1):(a.critical("Undefined client for Sender."),!1)}defineBehaviorForProperties(e){e||(e={});let t=n.BEHAVIOR_SEND,i=n.BEHAVIOR_BROADCAST;this.setPropertyBehavior(n.ACTION_ADD,e,{behavior:t,send:["id","key","type","qty","label","description","group_id","qty_limit","uses_limit","useTimeOut","execTimeOut","remaining_uses","is_active"]}),this.setPropertyBehavior(n.ACTION_REMOVE,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MODIFY_QTY,e,{behavior:t,send:["id","key","qty"]}),this.setPropertyBehavior(n.ACTION_MOD_APPLIED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_MOD_REVERTED,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_UNEQUIP,e,{behavior:t,send:["id","key"]}),this.setPropertyBehavior(n.ACTION_EXECUTING,e,{behavior:i,broadcast:["id","key","animationData"]}),this.setPropertyBehavior(n.ACTION_EXECUTED,e,{behavior:t,send:["id","key"]})}setPropertyBehavior(e,t,i){o.hasOwn(t,e)&&(this.sendProperties[e]=t[e]),this.sendProperties[e]=i}getItemProperties(e,t,i){if(!o.hasOwn(this.sendProperties,t))return a.critical("Undefined action while getting item properties.",{action:t,sendProperties:this.sendProperties}),!1;if(!o.hasOwn(this.sendProperties[t],i))return a.critical("Undefined behavior while getting item properties.",{behavior:i,action:t,sendProperties:this.sendProperties}),!1;let n={idx:e.getInventoryId()};for(let r of this.sendProperties[t][i]){if(!o.hasOwn(e,r)){a.info("Undefined property: "+r,e);continue}n[r]=e[r]}return n}listenEvents(){if(!this.validateManager())return!1;let e=this.manager.getOwnerEventKey();this.manager.listenEvent(r.ADD_ITEM,this.sendAddItemData.bind(this),this.manager.getOwnerUniqueEventKey("addItemSend"),e),this.manager.listenEvent(r.REMOVE_ITEM,this.sendRemoveItemData.bind(this),this.manager.getOwnerUniqueEventKey("removeItemSend"),e),this.manager.listenEvent(r.MODIFY_ITEM_QTY,this.sendModifyItemQuantityData.bind(this),this.manager.getOwnerUniqueEventKey("modifyItemQtySend"),e),this.manager.listenEvent(r.EQUIP_ITEM,this.sendEquipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemSend"),e),this.manager.listenEvent(r.UNEQUIP_ITEM,this.sendUnequipItemActionData.bind(this),this.manager.getOwnerUniqueEventKey("unequipItemSend"),e),this.manager.listenEvent(r.EQUIP+"AppliedModifiers",this.sendEquipItemAppliedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemAppliedModifiersSend"),e),this.manager.listenEvent(r.EQUIP+"RevertedModifiers",this.sendEquipItemRevertedModifiersData.bind(this),this.manager.getOwnerUniqueEventKey("equipItemRevertedModifiersSend"),e),this.manager.listenEvent(r.EXECUTING_ITEM,this.sendExecutingItemData.bind(this),this.manager.getOwnerUniqueEventKey("executingItemSend"),e),this.manager.listenEvent(r.EXECUTED_ITEM,this.sendExecutedItemData.bind(this),this.manager.getOwnerUniqueEventKey("executedItemSend"),e),this.manager.listenEvent(r.SET_ITEMS,this.sendSetItemsData.bind(this),this.manager.getOwnerUniqueEventKey("setItemsSend"),e),this.manager.listenEvent(r.SET_GROUPS,this.sendSetGroupsData.bind(this),this.manager.getOwnerUniqueEventKey("setGroupsSend"),e)}async sendSetGroupsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i={};for(let t of Object.keys(e.groups)){let{id:n,key:r,label:s,description:a,sort:o}=e.groups[t];i[r]={id:n,key:r,label:s,description:a,sort:o}}return await this.client.send({act:n.ACTION_SET_GROUPS,owner:t,groups:i})}async sendSetItemsData(e){let t=e.manager.getOwnerId();if(this.manager.getOwnerId()!==t)return!1;let i=this.extractItemsDataForSend(e.items);return await this.client.send({act:n.ACTION_SET_ITEMS,owner:t,items:i})}async sendExecutedItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTED)}async sendExecutingItemData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EXECUTING)}async sendEquipItemRevertedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_REVERTED)}async sendEquipItemAppliedModifiersData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MOD_APPLIED)}async sendUnequipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_UNEQUIP)}async sendEquipItemActionData(e){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_EQUIP)}async sendModifyItemQuantityData(e,t,i,r,s){return await this.runBehaviors(e,e.manager.getOwnerId(),n.ACTION_MODIFY_QTY)}async sendRemoveItemData(e,t){let i=e.items[t];return i?await this.runBehaviors(i,i.manager.getOwnerId(),n.ACTION_REMOVE):(a.debug('Item with key "'+t+'" not found.'),!1)}async sendAddItemData(e,t){return await this.runBehaviors(t,t.manager.getOwnerId(),n.ACTION_ADD)}extractItemsDataForSend(e){let t={};for(let i of Object.keys(e)){let r=e[i],s=this.getItemProperties(r,n.ACTION_ADD,n.BEHAVIOR_SEND);s.singleInstance=r.singleInstance,t[r.getInventoryId()]=s}return t}async runBehaviors(e,t,i){if(!e)return a.warning('Invalid "item" parameter.'),!1;if(!this.validateManager()||!this.validateClient())return!1;if(this.manager.getOwnerId()!==t)return a.warning("Item owner ID miss match.",this.manager.getOwnerId(),t),!1;let r=this.sendProperties[i],s=this.getTargetProps(e,r.behavior),o=r.behavior===n.BEHAVIOR_BOTH;if(r.behavior===n.BEHAVIOR_BROADCAST||o){let r=this.getItemProperties(e,i,n.BEHAVIOR_BROADCAST);await this.client.broadcast({act:i,owner:t,item:r,target:s});return}let h=r.behavior===n.BEHAVIOR_SEND,c=r[n.BEHAVIOR_SEND]!==r[n.BEHAVIOR_BROADCAST];if(h||o&&c){let r=this.getItemProperties(e,i,n.BEHAVIOR_SEND);await this.client.send({act:i,owner:t,item:r,targetProps:s})}}getTargetProps(e,t){let i=t===n.BEHAVIOR_BOTH?n.BEHAVIOR_BROADCAST:n.BEHAVIOR_SEND;if(!1===o.hasOwn(this.sendTargetProps,i)||0===this.sendTargetProps[i].length)return{};let r={};for(let t of this.sendTargetProps[i]){let i="id"===t?this.manager.ownerIdProperty:t;r[i]=this.propertyManager.getPropertyValue(e.target,i)}return r}}},{b644d789ee2b40af:"idEfG","45ba412a65c2e357":"fWlRm","994236dc9aef1f79":"iJUHo","8b1efebe48a67288":"lHuVm"}],"3auVp":[function(e,t,i){let n=e("fddf8c3cc708201b"),{ErrorManager:r,sc:s}=e("c1c82d06c77e78b8");t.exports=class extends n{constructor(e){s.hasOwn(e,"id")||r.error("Undefined ItemGroup id."),s.hasOwn(e,"key")||r.error("Undefined ItemGroup key."),e.eventsPref="g"+e.key+"."+s.get(e,"eventsPrefix",""),super(e),this.id=e.id,this.key=e.key,this.label=s.get(e,"label",!1),this.description=s.get(e,"description",!1),this.files_name=s.get(e,"files_name",!1),this.sort=s.get(e,"sort",!1),this.items_limit=s.get(e,"items_limit",!1),this.limit_per_item=s.get(e,"limit_per_item",!1)}}},{fddf8c3cc708201b:"8qkfQ",c1c82d06c77e78b8:"lHuVm"}],"3ncwO":[function(e,t,i){t.exports=class{constructor(e){this.id=e.id,this.key=e.key,this.type=e.type}}},{}],"2R9Cx":[function(e,t,i){let n=e("312a2d95cff483b5"),r=e("f647b9be5cb5de72"),s=e("2edbed84bfb41fb4"),{ErrorManager:a,Logger:o,sc:h}=e("a231b7a801915a72");t.exports=class{constructor(e){h.hasOwn(e,"owner")||a.error("Undefined owner."),this.manager=h.hasOwn(e,"manager")?e.manager:new n(e),this.actions=h.hasOwn(e,"actions")?e.actions:{},!1===h.get(e,"avoidDefaults",!1)&&this.setDefaultActions(),this.recieveErrorsLog=[]}setDefaultActions(){this.actions[r.ACTION_SET_ITEMS]="onSetItems",this.actions[r.ACTION_SET_GROUPS]="onSetGroups",this.actions[r.ACTION_ADD]="onAddItem",this.actions[r.ACTION_REMOVE]="onRemoveItem",this.actions[r.ACTION_MODIFY_QTY]="onSetQty",this.actions[r.ACTION_EQUIP]="onEquipItem",this.actions[r.ACTION_UNEQUIP]="onUnequipItem",this.actions[r.ACTION_MOD_APPLIED]="onModifiersApplied",this.actions[r.ACTION_MOD_REVERTED]="onModifiersReverted",this.actions[r.ACTION_EXECUTING]="onExecuting",this.actions[r.ACTION_EXECUTED]="onExecuted"}processMessage(e){let t=h.get(e,"act","");return 0===t.indexOf(r.ACTIONS_PREF)&&(h.hasOwn(this.actions,t)?"function"!=typeof this[this.actions[t]]?(o.info("Items action is not a function.",e.act),!1):void this[this.actions[t]](e):(o.error("Items action not found",t,e),!1))}onSetItems(e){let t={};for(let i of Object.keys(e.items)){let n=e.items[i],s=Object.assign({manager:this.manager},n,{uid:i}),a=this.getItemClass(s.key,s.type);t[i]=new a(s),t[i].isType(r.TYPES.EQUIPMENT)&&h.hasOwn(s,"is_active")&&(t[i].equipped=1===s.is_active)}return this.manager.setItems(t)}onSetGroups(e){let t={};for(let i of Object.keys(e.groups)){let n=this.getGroupClass(e.groups[i].key);t[e.groups[i].key]=new n(e.groups[i])}return this.manager.setGroups(t)}onAddItem(e){let t=Object.assign({manager:this.manager},e.item,{uid:e.item.idx}),i=new(this.getItemClass(t.key,t.type))(t);this.manager.addItem(i).catch(e=>{this.recieveErrorsLog.push({"Error receiver onAddItem.":e})})}onRemoveItem(e){this.manager.removeItem(e.item.idx).catch(e=>{this.recieveErrorsLog.push({"Error receiver onRemoveItem.":e})})}onSetQty(e){this.manager.setItemQty(e.item.idx,e.item.qty).catch(e=>{this.recieveErrorsLog.push({"Error receiver onSetQty.":e})})}onEquipItem(e){this.manager.items[e.item.idx].equip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onEquipItem.":e})})}onUnequipItem(e){this.manager.items[e.item.idx].unequip(!1).catch(e=>{this.recieveErrorsLog.push({"Error receiver onUnequipItem.":e})})}onModifiersApplied(e){}onModifiersReverted(e){}onExecuting(e){}onExecuted(e){}getItemClass(e,t){return h.get(this.manager.itemClasses,e,this.manager.types.classByTypeId(t))}getGroupClass(e){let t=s;return h.hasOwn(this.manager.groupClasses,e)&&(t=this.manager.groupClasses[e]),t}}},{"312a2d95cff483b5":"5wpm2",f647b9be5cb5de72:"idEfG","2edbed84bfb41fb4":"3auVp",a231b7a801915a72:"lHuVm"}],nHDSk:[function(e,t,i){let n=e("3dd92880a486247f"),{ModifierConst:r,Modifier:s}=e("293ce1d1ff60486a"),{sc:a}=e("45aa0d32b8aa311b");t.exports=class{static itemsListMappedData(e={},t){if(0===t.length)return{};let i={},r=new n;for(let n of t)n.items_modifiers&&(n.modifiers=this.generateItemModifiers(n)),i[n.key]={class:a.get(e,n.key,r.classByTypeId(n.type)),data:n};return i}static generateItemModifiers(e){let t={};for(let i of e.items_modifiers)i.operation!==r.OPS.SET&&(i.value=Number(i.value)),t[i.id]=new s(i);return t}}},{"3dd92880a486247f":"8gXhx","293ce1d1ff60486a":"iJUHo","45aa0d32b8aa311b":"lHuVm"}],btt2J:[function(e,t,i){let{ItemGroup:n}=e("185572600d1291f"),{sc:r}=e("99c50def0f4abb2");t.exports=class{static groupsListMappedData(e,t){if(0===t.length)return{};let i={groupList:{},groupBaseData:{}};for(let n of(i.groupModels=t,t))this.addGroup(n,i,e);return i}static appendGroup(e,t,i){return!!e&&!!t&&!!i&&(r.isArray(t.groupModelsList)||(t.groupModelsList=[]),t.groupModelsList.push(e),this.addGroup(i,e,t),t)}static addGroup(e,t,i){let s=r.get(i,e.key,n),{id:a,key:o,label:h,description:c,sort:l,files_name:u}=e;t.groupList[e.key]={class:s,data:e},t.groupBaseData[o]={id:a,key:o,label:h,description:c,sort:l,files_name:u}}}},{"185572600d1291f":"3auVp","99c50def0f4abb2":"lHuVm"}],gRIlz:[function(e,t,i){let n=e("9ec9f370c69b97e4"),r=e("5bd56f616649a07e"),s=e("f6c0b56ddc826cd5"),a=e("e433549ba9a6abfc"),o=e("24c35dc83734e5b2"),h=e("330f7364569544ad"),c=e("332ac9b4e9ced220"),{EventsManagerSingleton:l,ErrorManager:u,Logger:d,sc:f}=e("71720c1a95ddc1ce");t.exports=class{constructor(e){this.events=f.get(e,"eventsManager",l),this.requirementsProcessor=new s,this.rewardsProcessor=new a,this.exchangeInitializerId=f.get(e,"exchangeInitializerId",!1),this.initializeProperties()}initializeExchangeBetween(e){let t=f.get(e,"inventoryA",null),i=f.get(e,"inventoryB",null);(null===t||null===i)&&u.error("Missing inventories from properties.",e),this.inventories={A:t,B:i},this.lockInventories(),this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:f.get(e,"exchangeRequirementsA",new n),B:f.get(e,"exchangeRequirementsB",new n)},this.exchangeRewards={A:f.get(e,"exchangeRewardsA",new r),B:f.get(e,"exchangeRewardsB",new r)},this.dropExchange={A:f.get(e,"dropExchangeA",!1),B:f.get(e,"dropExchangeB",!1)},this.avoidExchangeDecrease={A:f.get(e,"avoidExchangeDecreaseA",!1),B:f.get(e,"avoidExchangeDecreaseB",!1)},this.setError(),this.events.emit(h.EXCHANGE.INITIALIZED,{exchangePlatform:this,props:e,inventoryA:t,inventoryB:i})}setError(e="",t="",i={},n=!1){this.lastError=new o(e,t,i,n)}cancelExchange(){this.unlockInventories(),this.initializeProperties(),this.events.emit(h.EXCHANGE.CANCELED,{exchangePlatform:this})}initializeProperties(){this.inventories={A:null,B:null},this.confirmations={A:!1,B:!1},this.exchangeBetween={A:{},B:{}},this.exchangeRequirements={A:[],B:[]},this.exchangeRewards={A:[],B:[]},this.setError()}async pushForExchange(e,t,i){return this.confirmations.A||this.confirmations.B?(d.info('Push for exchange "'+e+'" was blocked. Exchange for "'+i+'" and owner "'+this.inventories[i].owner_id+'" was already confirmed.'),!1):this.canBePushed(e,t,i)?(this.exchangeBetween[i][e]=t,this.validateRequirements("A")&&this.validateRewards("A")&&this.validateRequirements("B")&&this.validateRewards("B"))?(this.events.emit(h.EXCHANGE.ITEM_PUSHED,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!0):(delete this.exchangeBetween[i][e],!1):(this.events.emit(h.EXCHANGE.INVALID_PUSH,{exchangePlatform:this,itemUid:e,qty:t,inventoryKey:i}),!1)}async removeFromExchange(e,t){return this.confirmations.A||this.confirmations.B?(d.info('Remove from exchange "'+e+'" was blocked. Exchange for "'+t+'" and owner "'+this.inventories[t].owner_id+'" was already confirmed.'),!1):(this.events.emit(h.EXCHANGE.ITEM_REMOVE,{exchangePlatform:this,itemUid:e,inventoryKey:t}),!!f.hasOwn(this.exchangeBetween[t],e)&&(delete this.exchangeBetween[t][e],!0))}async confirmExchange(e){this.events.emit(h.EXCHANGE.CONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!0}async disconfirmExchange(e){this.events.emit(h.EXCHANGE.DISCONFIRM,{exchangePlatform:this,inventoryKey:e}),this.confirmations[e]=!1}async finalizeExchange(){return(this.events.emit(h.EXCHANGE.BEFORE_FINALIZE,{exchangePlatform:this}),this.confirmations.A&&this.confirmations.B)?!!(this.validateRequirements("A")&&this.validateRequirements("B")&&this.validateRewards("A")&&this.validateRewards("B"))&&(this.unlockInventories(),!1!==await this.executeExchangeFromTo("A","B")&&!1!==await this.executeExchangeFromTo("B","A")&&(this.events.emit(h.EXCHANGE.FINALIZED,{exchangePlatform:this}),this.setError(),!0)):(this.setError("Missing confirmation.",c.ERROR_CODES.EXCHANGE.MISSING_CONFIRMATION,{confirmations:this.confirmations}),!1)}validateRequirements(e){return this.requirementsProcessor.validateRequirements(e,this)}validateRewards(e){return this.rewardsProcessor.validateRewards(e,this)}lockInventories(){this.setLocks(!0)}unlockInventories(){this.setLocks(!1)}setLocks(e){this.setInventoryLock("A",e),this.setInventoryLock("B",e)}setInventoryLock(e,t){let i=f.get(this.inventories,e,!1);return null!==i&&(!1===i?(d.error('Inventory not found "'+e+'".',this.inventories),!1):(i.locked=t,!0))}canBePushed(e,t,i){if(!f.hasOwn(this.inventories[i].items,e))return d.critical("Item Key does not exists on the inventory",e,this.inventories[i].items),!1;let n=this.inventories[i].items[e],r=t<=n.qty||-1===n.qty;return r||this.setError("Invalid item pushed quantity ("+t+"), available: "+n.qty,c.ERROR_CODES.EXCHANGE.INVALID_PUSHED_QUANTITY,{itemUid:e,qty:t,pushedItemQty:n.qty}),r}async executeExchangeFromTo(e,t){if(e===t)return this.setError('Inventories "FROM" and "TO" are the same, exchange cancelled.',c.ERROR_CODES.EXCHANGE.INVALID_EXCHANGE),this.cancelExchange(),this.inventories;let i=this.inventories[e],n=this.inventories[t];for(let r of Object.keys(this.exchangeBetween[e])){let s=this.exchangeBetween[e][r];if(0===s)return this.setError("Invalid item quantity 0.",c.ERROR_CODES.EXCHANGE.INVALID_QUANTITY,{itemUid:r}),!1;let a=!1===this.dropExchange[t]&&n.createItemInstance(i.items[r].key,s);if(!1===await this.rewardsProcessor.processRewards(e,t,r,i,n,this)||!1===await this.requirementsProcessor.processRequirements(e,t,r,s,i,n,this))return!1;let o=!0;if(!1===this.avoidExchangeDecrease[e]&&(i.frozenItems[r]=Object.assign({},i.items[r]),o=await i.decreaseItemQty(r,s)),!1===o)return this.setError("Exchange inventory decrease error.",c.ERROR_CODES.EXCHANGE.DECREASE_QUANTITY,{itemUid:r},i.lastError),!1;if(!1===this.dropExchange[t]){let e=f.isArray(a)?a:[a];if(!1===await n.addItems(e))return this.setError("Exchange add inventory result error.",c.ERROR_CODES.EXCHANGE.ITEM_ADD,{itemUid:r},n.lastError),!1}}return this.exchangeBetween[e]={},this.inventories}oppositeKey(e){return"A"===e?"B":"A"}}},{"9ec9f370c69b97e4":"1wLI1","5bd56f616649a07e":"hU2Lr",f6c0b56ddc826cd5:"kxCH2",e433549ba9a6abfc:"1sOiW","24c35dc83734e5b2":"eODT6","330f7364569544ad":"fWlRm","332ac9b4e9ced220":"idEfG","71720c1a95ddc1ce":"lHuVm"}],"1wLI1":[function(e,t,i){let n=e("dda1e92f871afe97"),{sc:r}=e("ce7f52b0d100b8f7");t.exports=class{constructor(e){this.requirements=r.get(e,"requirements",[])}count(){return this.requirements.length}add(e,t,i,r,s){this.requirements.push(new n({itemUid:e,itemKey:t,requiredItemKey:i,requiredQuantity:r,autoRemoveRequirement:s}))}remove(e){let t=!1,i=0;for(let n of this.requirements){if(n.itemUid===e){t=!0;break}i++}t&&delete this.requirements[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.requirements,e,t)}}},{dda1e92f871afe97:"4hpnF",ce7f52b0d100b8f7:"lHuVm"}],"4hpnF":[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.requiredItemKey=e.requiredItemKey,this.requiredQuantity=Number(e.requiredQuantity),this.autoRemoveRequirement=!!e.autoRemoveRequirement}}},{}],hU2Lr:[function(e,t,i){let n=e("c75245438c2a820e"),{sc:r}=e("74cd247a8747612e");t.exports=class{constructor(e){this.rewards=r.get(e,"rewards",[])}count(){return this.rewards.length}add(e,t,i,r,s){this.rewards.push(new n({itemUid:e,itemKey:t,rewardItemKey:i,rewardQuantity:r,rewardItemIsRequired:s}))}remove(e){let t=!1,i=0;for(let n of this.rewards){if(n.itemUid===e){t=!0;break}i++}t&&delete this.rewards[i]}fetchAllBy(e,t){return r.fetchAllByProperty(this.rewards,e,t)}}},{c75245438c2a820e:"iuvBV","74cd247a8747612e":"lHuVm"}],iuvBV:[function(e,t,i){t.exports=class{constructor(e){this.itemUid=e.itemUid||"",this.itemKey=e.itemKey||"",this.rewardItemKey=e.rewardItemKey,this.rewardQuantity=Number(e.rewardQuantity),this.rewardItemIsRequired=!!e.rewardItemIsRequired}}},{}],kxCH2:[function(e,t,i){let n=e("b11112aa3d4db9e4"),{Logger:r,sc:s}=e("5342d6a91ce0343f");t.exports=class{constructor(e){this.requirementsByItemUid=s.get(e,"requirementsByItemUid",!0),this.requirementsByItemKey=s.get(e,"requirementsByItemKey",!0),this.requirementsTotals={}}validateRequirements(e,t){let i=t.exchangeRequirements[e];if(0===i.count())return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;this.requirementsTotals={};let o=t.oppositeKey(e);for(let h of a){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.DOES_NOT_EXISTS,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRequirements(i,l);if(0!==u.length&&(this.plusRequirementsQuantity(u,a),!this.validateItemRequirements(u,r[h],o,t)))return!1}return!0}fetchItemRequirements(e,t){let i=[];return this.requirementsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.requirementsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRequirementsQuantity(e,t){for(let i of e)s.hasOwn(this.requirementsTotals,i.requiredItemKey)||(this.requirementsTotals[i.requiredItemKey]=0),this.requirementsTotals[i.requiredItemKey]+=i.requiredQuantity*t}validateItemRequirements(e,t,i,r){if(0===e.length)return!0;for(let a of e){let e=r.inventories[i].findItemByKey(a.requiredItemKey);if(!1===e)return r.setError('Required item "'+a.requiredItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PRESENT,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;let o=a.requiredQuantity*t;if(o>e.qty)return r.setError('Required item "'+a.requiredItemKey+'" required quantity ('+o+') is not available on inventory "'+i+'".',n.ERROR_CODES.REQUIREMENTS.QUANTITY_NOT_AVAILABLE,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1;if(!0===a.autoRemoveRequirement)continue;let h=s.get(r.exchangeBetween[i],e.uid,!1);if(!1===h&&!1===a.autoRemoveRequirement)return r.setError('Required item "'+a.requiredItemKey+'" was not pushed for exchange "'+i+'".',n.ERROR_CODES.REQUIREMENTS.ITEM_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i}),!1;if(o>h)return r.setError("Required item "+a.requiredItemKey+" required quantity ("+o+") was not pushed for exchange.",n.ERROR_CODES.REQUIREMENTS.ITEM_QUANTITY_NOT_PUSHED,{requiredItemKey:a.requiredItemKey,inventoryKeyTo:i,totalRequiredQuantity:o}),!1}return!0}async processRequirements(e,t,i,a,o,h,c){let l=s.get(o.items,i,s.get(o.frozenItems,i,!1));if(!1===l)return c.setError('Requirement error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REQUIREMENTS.ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let u=c.exchangeRequirements[e];if(!u||0===u.count())return!0;let d=this.fetchItemRequirements(u,l);if(0===d.length)return!0;for(let e of d){if(!1===s.get(c.exchangeBetween[t],e.requiredItemKey,!1)&&!1===e.autoRemoveRequirement)return!1;let l=h.findItemByKey(e.requiredItemKey);if(!1===l)return r.error("The required item not longer exists.",i,e.requiredItemKey),!1;let u=e.requiredQuantity*a,d=!1===h.dropExchange&&o.createItemInstance(e.requiredItemKey,u);if(h.frozenItems[l.uid]=Object.assign({},l),!1===await h.decreaseItemQty(l.uid,u))return r.error("There was an error while decreasing the required item quantity.",e,l),!1;if(!1!==d){let e=s.isArray(d)?d:[d];if(!1===await h.addItems(e))return c.setError("Requirement add item error.",n.ERROR_CODES.REQUIREMENTS.ITEM_ADD,{},h.lastError),!1}}return!0}}},{b11112aa3d4db9e4:"idEfG","5342d6a91ce0343f":"lHuVm"}],"1sOiW":[function(e,t,i){let n=e("bddde17fed05deaa"),{Logger:r,sc:s}=e("918bdf09bd16e1b2");t.exports=class{constructor(e){this.rewardsByItemUid=s.get(e,"rewardsByItemUid",!0),this.rewardsByItemKey=s.get(e,"rewardsByItemKey",!0),this.rewardsTotals={}}validateRewards(e,t){let i=t.exchangeRewards[e];if(0===i.length)return!0;let r=t.exchangeBetween[e],a=Object.keys(r);if(0===a.length)return!0;let o=t.oppositeKey(e);for(let h of(this.rewardsTotals={},a)){let a=r[h],c=t.inventories[e],l=s.get(c.items,h,s.get(c.frozenItems,h,!1));if(!1===l)return t.setError('Reward error, item "'+h+'" does not exits on inventory "'+e+'".',n.ERROR_CODES.REWARD.MISSING_ITEM,{itemUid:h,inventoryKeyFrom:e}),!1;let u=this.fetchItemRewards(i,l);if(!1!==u&&0!==u.length&&(this.plusRewardsQuantity(u,a),!this.validateItemRewards(u,a,o,t)))return!1}return!0}fetchItemRewards(e,t){if(!t)return r.error("Item does not exits on inventory.",t),!1;let i=[];return this.rewardsByItemUid&&(i=[...i,...e.fetchAllBy("itemUid",t.uid)]),this.rewardsByItemKey&&(i=[...i,...e.fetchAllBy("itemKey",t.key)]),i}plusRewardsQuantity(e,t){for(let i of e)s.hasOwn(this.rewardsTotals,i.rewardItemKey)||(this.rewardsTotals[i.rewardItemKey]=0),this.rewardsTotals[i.rewardItemKey]+=i.rewardQuantity*t}validateItemRewards(e,t,i,r){if(0===e.length)return!0;for(let t of e){if(!1===t.rewardItemIsRequired)continue;let e=r.inventories[i].findItemByKey(t.rewardItemKey);if(!1===e)return r.setError('Reward item "'+t.rewardItemKey+'" is not present on inventory "'+i+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:t.rewardItemKey,inventoryKeyTo:i}),!1;if(this.rewardsTotals[t.rewardItemKey]>e.qty)return r.setError("Reward item "+t.rewardItemKey+" reward quantity ("+t.rewardQuantity+') is not available on inventory "'+i+'".',n.ERROR_CODES.REWARD.QUANTITY_NOT_AVAILABLE,{rewardItemKey:t.rewardItemKey,rewardQuantity:t.rewardQuantity,inventoryKeyTo:i}),!1}return!0}async processRewards(e,t,i,r,a,o){let h=o.exchangeRewards[e];if(0===h.length)return!0;let c=o.oppositeKey(e),l=o.exchangeBetween[e][i];if(!l)return o.setError('Missing pushed for exchange item "'+i+'".',n.ERROR_CODES.REWARD.MISSING_PUSHED,{itemUid:i}),!1;let u=s.get(r.items,i,s.get(r.frozenItems,i,!1));if(!1===u)return o.setError('Reward error, item "'+i+'" does not exits on inventory.',n.ERROR_CODES.REWARD.GET_ITEM_DOES_NOT_EXISTS,{itemUid:i}),!1;let d=this.fetchItemRewards(h,u);return!1===d||0===d.length||!!await this.processItemRewards(d,r,a,c,l,i,o)||(o.setError('Process item reward error, item "'+i+'".',n.ERROR_CODES.REWARD.PROCESS_ITEM,{itemUid:i}),!1)}async processItemRewards(e,t,i,a,o,h,c){if(0===e.length)return!0;for(let l of e){let e=l.rewardQuantity*o;if(!1===l.rewardItemIsRequired){let i=t.createItemInstance(l.rewardItemKey,e),r=s.isArray(i)?i:[i];if(!1===await t.addItems(r)){if(""!==t.lastError.message)return c.setError("Rewards process inventory error.",n.ERROR_CODES.REWARD.PROCESS_ITEM,{},t.lastError),!1;let e=Object.keys(r).join(",");return c.setError("Rewards error on add items: "+e+".",n.ERROR_CODES.REWARD.ADD_ITEMS,{itemsKeys:e}),!1}continue}let u=c.inventories[a].findItemByKey(l.rewardItemKey);if(!1===u)return c.setError('Reward item "'+l.rewardItemKey+'" is not present on inventory "'+a+'".',n.ERROR_CODES.REWARD.ITEM_NOT_PRESENT,{rewardItemKey:l.rewardItemKey,inventoryKeyTo:a}),!1;if(e>u.qty)return c.setError("Reward quantity ("+e+") is bigger than the available in the inventory ("+u.qty+").",n.ERROR_CODES.REWARD.QUANTITY_OVERLOAD,{rewardQuantityTotal:e,rewardInventoryItemQty:u.qty}),!1;let d=i.findItemByKey(l.rewardItemKey);if(!1===d)return r.error("The reward item not longer exists.",h,l.rewardItemKey),!1;let f=t.createItemInstance(l.rewardItemKey,e);if(i.frozenItems[d.uid]=Object.assign({},d),!1===await i.decreaseItemQty(d.uid,l.requiredQuantity))return r.error("There was an error while decreasing the reward item quantity.",l,d),!1;await t.addItem(f)}return!0}}},{bddde17fed05deaa:"idEfG","918bdf09bd16e1b2":"lHuVm"}],"8cYlw":[function(e,t,i){let{ObjectsConst:n}=e("df12497da2e014ac"),{Logger:r,sc:s}=e("bc3fcd89e3b4517e");t.exports.DropsMessageListener=class{static listenMessages(e,t){e.onMessage("*",e=>{let i=s.get(e,n.DROPS.KEY,!1);i&&this.loadObjects(i,t),n.DROPS.REMOVE===e.act&&this.removeDropById(e.id,t)})}static loadObjects(e,t){let i=t.getActiveScene(),n=t.config,r=t.getFeature("objects"),s=i.load;if(!this.validateParams({currentScene:i,gameConfig:n,objectPlugin:r,loader:s}))return!1;for(let[t,a]of Object.entries(e))this.loadSpritesheet(a,s,n),s.once("complete",async e=>{await this.createDropAnimation(r,a,t,i)});return s.start(),!0}static async createDropAnimation(e,t,i,r){let s={type:n.DROPS.PICK_UP_ACT,enabled:!0,ui:!0,frameStart:t[n.DROPS.PARAMS].start,frameEnd:t[n.DROPS.PARAMS].end,repeat:t[n.DROPS.PARAMS].repeat,autoStart:!0,key:i,id:i,targetName:"",layerName:i,isInteractive:!0,asset_key:t[n.DROPS.ASSET_KEY],x:t.x,y:t.y,yoyo:t[n.DROPS.PARAMS].yoyo};return await e.createAnimationFromAnimData(s,r)}static loadSpritesheet(e,t,i){t.spritesheet(e[n.DROPS.ASSET_KEY],this.getSpritesheetPath(e),this.getRewardFrameConfig(e[n.DROPS.PARAMS],i))}static getRewardFrameConfig(e,t){return{frameWidth:s.get(e,"frameWidth",t.getWithoutLogs("client/map/dropsTile/width",t.get("client/map/tileData/width"))),frameHeight:s.get(e,"frameHeight",t.getWithoutLogs("client/map/dropsTile/height",t.get("client/map/tileData/height")))}}static getSpritesheetPath(e){return n.DROPS.ASSETS_PATH+e[n.DROPS.FILE]}static removeDropById(e,t){if(!e)return!1;let i=t.activeRoomEvents.getActiveScene(),n=s.get(i.objectsAnimations,e,!1);if(!n)return!1;n.sceneSprite.destroy(),delete i.objectsAnimations[e]}static validateParams(e){let t=!0;return s.get(e,"currentScene",!1)||(r.error("Scene is undefined in Rewards Message Listener."),t=!1),s.get(e,"gameConfig",!1)||(r.error("Game Config is undefined in Rewards Message Listener."),t=!1),s.get(e,"objectPlugin",!1)||(r.error("Object Plugin is undefined in Rewards Message Listener."),t=!1),s.get(e,"loader",!1)||(r.error("Loader is undefined in Rewards Message Listener."),t=!1),t}}},{df12497da2e014ac:"izuLV",bc3fcd89e3b4517e:"3lwy5"}],hznMs:[function(e,t,i){t.exports={objects:{npcInvalid:"I do not understand.",trader:{content:"Hi there! What would you like to do?",options:{buy:"Buy",sell:"Sell"},buyConfirmed:"Thanks for buying!",sellConfirmed:"Thanks for your products!"}}}},{}],bzImH:[function(e,t,i){let{GameConst:n}=e("d90cf3ac18adcc93"),{Logger:r,sc:s}=e("981fc13f3ba6a83c");t.exports.UserInterface=class{constructor(e,t,i="/assets/html/dialog-box.html",n){this.events=e.events,this.gameDom=e.gameDom,this.initialTitle="",this.initialContent="",this.id=t.id,this.animProps=t,this.template=i,this.uiPositionKey=n||"default",this.openButton=null,this.closeButton=null,this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforePreload",e=>{this.preloadUiElement(e)}),this.events.on("reldens.createPreload",(e,t)=>{this.createUiElement(t)})}preloadUiElement(e){this.template&&e.load.html(this.id,this.template)}createUiElement(e,t=""){""===t&&(t=this.id);let i="box-"+this.id;if(s.get(e.elementsUi,this.id))return this;let n=this.createDialogBox(e,t);this.createBoxContent(e,t,n);let a=this.gameDom.getElement(".ui-box.ui-dialog-box",n.node);return a?(a.id=i,a.classList.add("type-"+(this.animProps?.type||"dialog-box")),this.activateOpenButton(n,a,e),this.activateCloseButton(n,a,e),e.userInterfaces[this.id]=this,e.elementsUi[this.id]=n,this):(r.critical('Missing dialog container for template key: "'+t+'".',{dialogBox:n,dialogContainer:a,objectElementId:i}),!1)}createDialogBox(e,t){let{newWidth:i,newHeight:n}=e.gameManager.gameEngine.getCurrentScreenSize(e.gameManager),{uiX:r,uiY:s}=e.getUiPosition(this.uiPositionKey,i,n);return e.add.dom(r,s).createFromCache(t)}createBoxContent(e,t,i){let n=e.cache.html.get(t);i.innerHTML=e.gameManager.gameEngine.parseTemplate(n,{title:this.initialTitle,content:this.initialContent})}activateOpenButton(e,t,i){return this.openButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_OPEN,e.node),!!this.openButton&&(this.openButton.id=n.UI_BOX+n.UI_OPEN+"-"+this.id,this.openButton.addEventListener("click",()=>{s.get(this.animProps,"defaultOpen",!0)&&(t.style.display="block",this.openButton.style.display="none",!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(this.animProps.depth)),s.isFunction(this.animProps.openCallBack)&&this.animProps.openCallBack(),this.events.emit("reldens.openUI",{ui:this,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})}),this.openButton)}activateCloseButton(e,t,i){if(this.closeButton=this.gameDom.getElement("."+n.UI_BOX+n.UI_CLOSE,e.node),!this.closeButton)return!1;this.closeButton.id=n.UI_BOX+n.UI_CLOSE+"-"+this.id,this.closeButton.addEventListener("click",()=>{s.hasOwn(this.animProps,"sendCloseMessage")&&!1!==this.animProps.sendCloseMessage||i.gameManager.activeRoomEvents.send({act:n.CLOSE_UI_ACTION,id:this.id}),s.get(this.animProps,"defaultClose",!0)&&(t.style.display="none",this.openButton&&(this.openButton.style.display="block"),!1!==s.get(this.animProps,"depth",!1)&&e.setDepth(1)),s.isFunction(this.animProps.closeCallback)&&this.animProps.closeCallback(),this.events.emit("reldens.closeUI",{ui:this,closeButton:this.closeButton,openButton:this.openButton,dialogBox:e,dialogContainer:t,uiScene:i})})}}},{d90cf3ac18adcc93:"93TbC","981fc13f3ba6a83c":"3lwy5"}],"83Jlt":[function(e,t,i){let{InventoryUi:n}=e("3dbcaecc16a8d7f6"),{InventoryReceiver:r}=e("1b246d1f86d4b52c"),{TradeTargetAction:s}=e("e34196023b491a43"),{TradeMessageListener:a}=e("4891eeec00749c11"),{UserInterface:o}=e("c8568ca446361435"),{PluginInterface:h}=e("f9e95a5e7b3e4385"),{TemplatesHandler:c}=e("9a0084a090b55a0d"),{TranslationsMapper:l}=e("3a8304cb1916a776"),u=e("26049dfb393d7854"),{InventoryConst:d}=e("5532f77de2576b30"),{ItemsEvents:f,ItemsConst:p}=e("75f9030ce424b588"),{GameConst:g}=e("28a98a79420c2754"),{Logger:m,sc:v}=e("ddf286423098af38");t.exports.InventoryPlugin=class extends h{setup(e){this.gameManager=v.get(e,"gameManager",!1),this.gameManager||m.error("Game Manager undefined in InventoryPlugin."),this.events=v.get(e,"events",!1),this.events||m.error("EventsManager undefined in InventoryPlugin."),this.tradeTargetAction=new s,this.setTradeUi(),this.listenEvents(),this.setListener(),this.setTranslations()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,u,d.MESSAGE.DATA_VALUES)}setTradeUi(){if(!this.gameManager)return!1;this.tradeUi=new o(this.gameManager,{id:"trade",type:"trade"})}setListener(){if(!this.gameManager)return!1;this.gameManager.config.client.message.listeners.trade=new a}listenEvents(){if(!this.events)return!1;this.events.on("reldens.playersOnAdd",(e,t,i,n)=>{this.onPlayerAdd(t,n,e)}),this.events.on("reldens.preloadUiScene",e=>{c.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>this.onPreloadUiScene(e)),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{this.tradeTargetAction.showTargetExchangeAction(this.gameManager,t,i,n)})}onPreloadUiScene(e){this.uiManager=new n(e),this.uiManager.createUi();let t=e.getUiElement("inventory").getChildByProperty("id",d.INVENTORY_ITEMS);if(!t)return m.error("Inventory UI not found.",t),!1;let i=e.getUiElement("equipment").getChildByProperty("id",d.EQUIPMENT_ITEMS);if(!i)return m.error("Equipment UI not found.",i),!1;let r=e.gameManager.inventory.manager,s=v.get(r,"groups",{});if(Object.keys(s).length)for(let t of(e.gameManager.gameDom.getElement("#"+d.EQUIPMENT_ITEMS).innerHTML="",this.sortGroups(s))){let i=this.createGroupBox(s[t],e.gameManager,e);e.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}let a=v.get(r,"items",{}),o=Object.keys(a);if(0{t.gameManager.inventory.processMessage(e)})}createInventoryInstance(e,t){let i={owner:e,ownerIdProperty:"sessionId",gameManager:t.gameManager},n=t.gameManager.config.getWithoutLogs("client/customClasses/inventory/items",{});n&&0{let s=this.createItemBox(r,"inventoryItem",n,e);n.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(t,r.getInventoryId(),r,e)},n.inventory.manager.getOwnerUniqueEventKey("addItemPack"),r),n.inventory.manager.listenEvent(f.SET_ITEMS,n=>{for(let r of(t.innerHTML="",Object.keys(n.items))){let s=n.items[r];this.displayItem(s,e,i,t,r)}},n.inventory.manager.getOwnerUniqueEventKey("setItemsPack"),r),n.inventory.manager.listenEvent(f.MODIFY_ITEM_QTY,t=>{e.getUiElement("inventory").getChildByID("item-qty-"+t.getInventoryId()).innerHTML=t.qty},n.inventory.manager.getOwnerUniqueEventKey("modifyItemQtyPack"),r),n.inventory.manager.listenEvent(f.REMOVE_ITEM,(t,i)=>{e.getUiElement("inventory").getChildByID("item-"+i).remove()},n.inventory.manager.getOwnerUniqueEventKey("removeItemPack"),r),n.inventory.manager.listenEvent(f.SET_GROUPS,r=>{let s=!1,a=n.gameDom.getElement("#"+d.EQUIPMENT_ITEMS);for(let t of(""!==a.innerHTML&&(s=!0),a.innerHTML="",this.sortGroups(r.groups))){let i=this.createGroupBox(r.groups[t],n,e);n.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,i)}s&&this.resetEquippedItemsDisplay(n,e,i,t)},n.inventory.manager.getOwnerUniqueEventKey("setGroupsPack"),r),n.inventory.manager.listenEvent(f.EQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("equipItemPack"),r),n.inventory.manager.listenEvent(f.UNEQUIP_ITEM,n=>{this.displayItem(n,e,i,t,n.getInventoryId())},n.inventory.manager.getOwnerUniqueEventKey("unequipItemPack"),r)}resetEquippedItemsDisplay(e,t,i,n){let r=Object.keys(e.inventory.manager.items);if(0===r.length)return!1;for(let s of r){let r=e.inventory.manager.items[s];this.isEquipped(r)&&this.displayItem(r,t,i,n,r.getInventoryId())}}displayItem(e,t,i,n,r){let s=this.createItemBox(e,"inventoryItem",t.gameManager,t),a=t.gameManager.gameDom.getElement("#item-"+e.getInventoryId());if(a&&a.remove(),this.isEquipped(e)){let n=this.getGroupById(e.group_id,t.gameManager.inventory.manager.groups);n&&t.gameManager.gameDom.getElement("#group-item-"+n.key+" .equipped-item")?t.gameManager.gameDom.updateContent("#group-item-"+n.key+" .equipped-item",s):t.gameManager.gameDom.appendToElement("#"+d.EQUIPMENT_ITEMS,s),this.setupButtonsActions(i,r,e,t)}else t.gameManager.gameDom.appendToElement("#"+d.INVENTORY_ITEMS,s),this.setupButtonsActions(n,r,e,t)}updateEquipmentStatus(e,t){let i=t.gameDom.getElement("#item-equip-"+e.idx),n=e.equipped?"equipped":"unequipped";i.src="/assets/features/inventory/assets/"+n+g.FILES.EXTENSIONS.PNG}createItemBox(e,t,i,n){let r=n.cache.html.get(t);return i.gameEngine.parseTemplate(r,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,usable:this.isUsable(e)?this.getUsableContent(e,i,n):"",equipment:this.isEquipment(e)?this.getEquipContent(e,i,n):""})}isEquipment(e){return e.isType(p.TYPES.EQUIPMENT)||e.isType(p.TYPES.SINGLE_EQUIPMENT)}isEquipped(e){return this.isEquipment(e)&&!0===e.equipped}isUsable(e){return e.isType(p.TYPES.USABLE)||e.isType(p.TYPES.SINGLE_USABLE)}sortGroups(e){return Object.keys(e).sort((t,i)=>e[t].sort>e[i].sort?1:-1)}createGroupBox(e,t,i){let n=i.cache.html.get("inventoryGroup");return t.gameEngine.parseTemplate(n,{key:e.key,label:e.label,description:e.description,fileName:e.files_name})}setupButtonsActions(e,t,i,n){let r=n.gameManager.gameDom,s=e.querySelector("#item-"+t+" .image-container img");if(!s)return m.error(["Missing image element.","#item-"+t]),!1;s.addEventListener("click",()=>{let i=e.querySelector("#item-"+t+" .item-data-container"),n=!1;"block"!==i.style.display&&(n=!0),e.querySelectorAll(".item-box .image-container img").forEach(function(e){e.style.border="none"}),e.querySelectorAll(".item-data-container").forEach(function(e){e.style.display="none"}),n&&(s.style.border="1px solid #fff",i.style.display="block")});let a=e.querySelector("#item-trash-"+t+" img");if(!a)return m.error(["Missing button.",a]),!1;a.addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="block"}),e.querySelector("#trash-cancel-"+t).addEventListener("click",()=>{e.querySelector("#trash-confirm-"+t).style.display="none"}),e.querySelector("#trash-confirmed-"+t).addEventListener("click",()=>{let e={idx:t,act:d.ACTIONS.REMOVE};n.gameManager.activeRoomEvents.send(e)}),this.isUsable(i)&&r.getElement("#item-use-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.USE,n)),this.isEquipment(i)&&r.getElement("#item-equip-"+t).addEventListener("click",this.clickedBox.bind(this,t,d.ACTIONS.EQUIP,n))}clickedBox(e,t,i){i.gameManager.activeRoomEvents.send({act:t,idx:e})}getUsableContent(e,t,i){let n=i.cache.html.get("inventoryItemUse");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId()})}getEquipContent(e,t,i){let n=i.cache.html.get("inventoryItemEquip");return t.gameEngine.parseTemplate(n,{id:e.getInventoryId(),equipStatus:e.equipped?"equipped":"unequipped"})}getGroupById(e,t){let i=Object.keys(t);if(0===i.length)return!1;for(let n of i)if(t[n].id===e)return t[n]}}},{"3dbcaecc16a8d7f6":"i4XYr","1b246d1f86d4b52c":"ecHHP",e34196023b491a43:"2sgZT","4891eeec00749c11":"7M3Uu",c8568ca446361435:"bzImH",f9e95a5e7b3e4385:"fC3To","9a0084a090b55a0d":"hZf8u","3a8304cb1916a776":"1fcQw","26049dfb393d7854":"1SpFi","5532f77de2576b30":"19bl6","75f9030ce424b588":"g4GOK","28a98a79420c2754":"93TbC",ddf286423098af38:"3lwy5"}],i4XYr:[function(e,t,i){let{UiFactory:n}=e("77ab18c1eefc2684"),{InventoryConst:r}=e("55720af454786e61");t.exports.InventoryUi=class extends n{createUi(){this.create("inventory",5,!0,!0,null,()=>{this.inventoryVisibility("inventory")}),this.create("equipment",4,!0,!0,null,()=>{this.inventoryVisibility("inventory")})}inventoryVisibility(e){let t="#"+r[e+"_ITEMS"];for(let e of this.gameManager.gameDom.getElements(t+" .item-box .image-container img"))e.style.border="none";for(let e of this.gameManager.gameDom.getElements(t+" .item-data-container"))e.style.border="none"}}},{"77ab18c1eefc2684":"k6PNR","55720af454786e61":"19bl6"}],k6PNR:[function(e,t,i){let{GameConst:n}=e("33c9292d731c7911");t.exports.UiFactory=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager}create(e,t,i,r,s,a){let{uiX:o,uiY:h}=this.uiScene.getUiConfig(e),c=this.uiScene.add.dom(o,h).createFromCache(e),l=c.getChildByProperty("id",e+n.UI_OPEN),u=c.getChildByProperty("id",e+n.UI_CLOSE);l?.addEventListener("click",()=>{let n=c.getChildByProperty("id",e+"-ui");i&&(n&&(n.style.display="block"),l.style.display="none",c.setDepth(t)),s&&"function"==typeof s&&s(),this.gameManager.events.emit("reldens.openUI",{ui:this,openButton:l,dialogBox:c,dialogContainer:n,uiScene:this.uiScene})}),u?.addEventListener("click",()=>{let t=c.getChildByProperty("id",e+"-ui");r&&(t&&(t.style.display="none"),c.setDepth(1),l&&(l.style.display="block")),a&&"function"==typeof a&&a(),this.gameManager.events.emit("reldens.closeUI",{ui:this,closeButton:u,openButton:l,dialogBox:c,dialogContainer:t,uiScene:this.uiScene})}),this.uiScene.elementsUi[e]=c}}},{"33c9292d731c7911":"93TbC"}],"19bl6":[function(e,t,i){t.exports.InventoryConst={INVENTORY_ITEMS:"inventory-items",INVENTORY_OPEN:"inventory-open",INVENTORY_CLOSE:"inventory-close",EQUIPMENT_ITEMS:"equipment-items",EQUIPMENT_CLOSE:"equipment-close",EQUIPMENT_OPEN:"equipment-open",ANIMATION_KEY_PREFIX:"aK_",GROUP_BUCKET:"/assets/custom/groups",ACTIONS:{PREFIX:"ivp",REMOVE:"ivpRm",USE:"ivpUse",EQUIP:"ivpEqi",TRADE_START:"ivptStart",TRADE_ACCEPTED:"ivptAccepted",TRADE_SHOW:"ivptShow",TRADE_ACTION:"ivptAction"},MESSAGE:{DATA_VALUES:{NAMESPACE:"items"}}}},{}],ecHHP:[function(e,t,i){let{InventoryConst:n}=e("8882a4643448fce8"),{GameConst:r}=e("2bfdc54146457a66"),{Receiver:s}=e("c0cd661b4f31ab90"),{ErrorManager:a,Logger:o,sc:h}=e("86cd80d57b7740fd");t.exports.InventoryReceiver=class extends s{constructor(e){h.hasOwn(e,"gameManager")||a.error("InventoryReceiver gameManager not specified."),super(e),this.gameManager=e.gameManager,this.itemSprites={},this.itemsAnimations={}}onExecuting(e){let t=e.item;if(!h.hasOwn(t,"animationData"))return o.warning("Item does not contain animation data.",e),!1;let i=n.ANIMATION_KEY_PREFIX+t.key,s=this.gameManager.getActiveScene();if(this.itemSprites[i]&&this.itemSprites[i].anims&&s.anims.get(i))return o.debug("Animation already exists, playing: "+i),this.playSpriteAnimation(i,t),!1;s.load.spritesheet(i,"/assets/custom/sprites/"+t.key+r.FILES.EXTENSIONS.PNG,{frameWidth:t.animationData.frameWidth||64,frameHeight:t.animationData.frameHeight||64}).on("loaderror",e=>{o.error("Sprite load error: "+i,e)}),s.load.on("complete",()=>{o.debug("Scene load complete, playing: "+i),this.createItemSprites(i,t,e,s)}),s.load.start()}createItemSprites(e,t,i,n){let r=this.extractTargetId(t,i,n);if(!r)return o.error("Target ID not found."),!1;let s=h.get(n.player.players,r,!1);if(!s)return o.error("Player sprite not found by target ID."),!1;let a=n.anims.get(e);a||(o.debug("Creating new animation on scene: "+e),a=n.anims.create({key:e,frames:n.anims.generateFrameNumbers(e,{start:t.animationData.start||0,end:t.animationData.end||1}),frameRate:h.get(t.animationData,"frameRate",n.configuredFrameRate),repeat:t.animationData.repeat||3,hideOnComplete:h.get(t.animationData,"hide",!0),showOnStart:h.get(t.animationData,"showOnStart",!0)})),this.itemsAnimations[e]=a;let c=h.get(t.animationData,"fixedX",t.animationData.usePlayerPosition?s.x:0),l=h.get(t.animationData,"fixedY",t.animationData.usePlayerPosition?s.y:0);this.itemSprites[e]=n.physics.add.sprite(c,l,e),this.itemSprites[e]=this.itemSprites[e].setDepth(9e4),this.itemSprites[e].depthByPlayer="above",t.animationData.followPlayer&&(s.moveSprites[e]=this.itemSprites[e]),o.debug("Playing sprite: "+e),this.playSpriteAnimation(e,t).on("animationcomplete",()=>{t.animationData.destroyOnComplete&&this.destroyAnimation(t,e,s)})}playSpriteAnimation(e,t){h.get(t.animationData,"closeInventoryOnUse",!1)&&this.gameManager.gameDom.getElement("#inventory-close")?.click();let i=this.itemSprites[e].anims;return i?(i.visible=!0,i.play(e,h.get(t.animationData,"ignoreIfPlaying",!0))):(o.error("Sprite animation not found: "+e),!1)}destroyAnimation(e,t,i){this.itemSprites[t].destroy(),delete this.itemSprites[t],delete this.itemsAnimations[t],e.animationData.followPlayer&&delete i.moveSprites[t],o.debug("Animation and sprite destroyed: "+t)}extractTargetId(e,t,i){return e.animationData.startsOnTarget&&t.target?.playerId?t.target.playerId:i.player?.playerId||!1}}},{"8882a4643448fce8":"19bl6","2bfdc54146457a66":"93TbC",c0cd661b4f31ab90:"g4GOK","86cd80d57b7740fd":"3lwy5"}],"2sgZT":[function(e,t,i){let{InventoryConst:n}=e("6fd8a45050899827"),{GameConst:r}=e("27ccb472a3005f7d"),{Logger:s,sc:a}=e("b754ab6e7b18af41");t.exports.TradeTargetAction=class{showTargetExchangeAction(e,t,i,o){if(r.TYPE_PLAYER!==t.type||e.getCurrentPlayer().playerId===t.id)return!1;let h=e.gameEngine.uiScene;if(!1===a.get(h,"uiTarget",!1))return!1;let c=h.cache.html.get("inventoryTradeStart");if(!c)return s.critical('Template "inventoryTradeStart" not found.'),!1;e.gameDom.appendToElement("#target-container",e.gameEngine.parseTemplate(c,{playerName:o,playerId:t.id}));let l=e.gameDom.getElement(".start-trade-"+t.id+" button");if(!l)return s.critical('Trade start button not found for selector: ".start-trade-'+t.id+' button"'),!1;l.addEventListener("click",()=>{let i={act:n.ACTIONS.TRADE_START,id:t.id};e.activeRoomEvents.send(i)})}}},{"6fd8a45050899827":"19bl6","27ccb472a3005f7d":"93TbC",b754ab6e7b18af41:"3lwy5"}],"7M3Uu":[function(e,t,i){let{TradeMessageHandler:n}=e("f964b12ccb83d2b4"),{Logger:r,sc:s}=e("8a7eb9c3e6d9d186");t.exports.TradeMessageListener=class{async executeClientMessageActions(e){let t=s.get(e,"message",!1);if(!t)return r.error("Missing message data on TradeMessageListener.",e),!1;let i=s.get(e,"roomEvents",!1);if(!i)return r.error("Missing RoomEvents on TradeMessageListener.",e),!1;new n({roomEvents:i,message:t}).updateContents()}}},{f964b12ccb83d2b4:"kzLY7","8a7eb9c3e6d9d186":"3lwy5"}],kzLY7:[function(e,t,i){let{ErrorManager:n,Logger:r,sc:s}=e("779d25f0124f02f2"),{InventoryConst:a}=e("58803c0e08c63617"),{ObjectsConst:o}=e("3ddb9dce645de8c3"),{UserInterface:h}=e("c49942f179cbbc0a");t.exports.TradeMessageHandler=class{constructor(e){this.roomEvents=s.get(e,"roomEvents",!1),this.message=s.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene,this.itemsManager=this.gameManager?.inventory?.manager,this.validate()}validate(){this.roomEvents||n.error("Missing RoomEvents."),this.message||n.error("Missing message."),this.gameManager||n.error("Missing GameManager."),this.uiScene||n.error("Missing UiScene."),this.itemsManager||n.error("Missing ItemsManager.")}updateContents(){return a.ACTIONS.TRADE_START===this.message.act?this.showTradeRequest():a.ACTIONS.TRADE_SHOW===this.message.act?this.showTradeBox():void 0}showTradeRequest(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.config.getWithoutLogs("client/trade/titles/tradeRequestFromLabel","Trade request from:"),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:a.ACTIONS.TRADE_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-"+e)?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+e)?.click()})}showTradeBox(){let e="trade"+this.message.id;this.createTradeUi(e),this.roomEvents.initUi({id:e,title:this.gameManager.services.translator.t("items.tradeWith",{playerName:this.message.with}),content:"",options:{}});let t=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!t)return r.error('Missing container: "#box-'+e+' .box-content".'),!1;if(!0===this.message.isTradeEnd)return this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click(),!0;let i=s.get(this.message,"items",!1),n=s.get(this.message,"traderItemsData",{}),a=s.get(this.message,"exchangeData",{}),o=s.get(this.message,"playerToExchangeKey",{}),h="A"===o?"B":"A";this.updateItemsList(i,t,a[h]),this.updateMyExchangeData(a[h]||{},i,h),this.updateTraderExchangeData(a[o]||{},n,o)}createTradeUi(e){let t=s.get(this.roomEvents.tradeUi,e);return t||(this.roomEvents.tradeUi[e]=new h(this.gameManager,{id:e,type:"trade"},"/assets/html/dialog-box.html","trade"),this.roomEvents.tradeUi[e].createUiElement(this.uiScene,"trade")),t}updateItemsList(e,t,i){if(!e)return;let n="",r={};for(let t of Object.keys(e)){let a=e[t],o=Object.assign({manager:this.itemsManager},a,{uid:t}),h=s.get(this.itemsManager.itemClasses,o.key,this.itemsManager.types.classByTypeId(o.type));r[t]=new h(o),r[t].quantityDisplay=1,r[t].quantityMaxDisplay=Math.max(r[t].qty_limit,a.qty),r[t].tradeAction="trade",n+=this.createTradeItemBox(r[t],s.get(i,r[t].uid,!1))}t.innerHTML=this.createTradeContainer(n),this.activateItemsBoxActions(r),this.activateConfirmButtonAction()}activateConfirmButtonAction(){let e=this.gameManager.gameDom.getElement(".confirm-"+this.message.id);e?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.CONFIRM})});let t=this.gameManager.gameDom.getElement(".disconfirm-"+this.message.id);t?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:this.message.id,sub:o.TRADE_ACTIONS.DISCONFIRM})});let i=this.gameManager.gameDom.getElement(".cancel-"+this.message.id);i?.addEventListener("click",()=>{this.gameDom.getElement("#box-close-"+"trade"+this.message.id)?.click()})}updateMyExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createConfirmItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-2");return s?(s.innerHTML=n,this.assignRemoveActions(e,t),!0):(r.error('Missing "'+i+'" items container.'),!1)}updateTraderExchangeData(e,t,i){if(0===Object.keys(e).length)return!1;let n=this.createReceivingItemsBox(e,t),s=this.gameDom.getElement(".trade-items-boxes .trade-player-col.trade-col-3");return s?(s.innerHTML=n,!0):(r.error('Missing "'+i+'" items container.'),!1)}createConfirmItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on confirmation trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:this.createTradeActionRemove(a),tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}createReceivingItemsBox(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on receive trade-message-handler.",{message:this.message}),"";let n="",s=this.uiScene.cache.html.get("inventoryTradeItem");if(!s)return r.error('Missing template "inventoryTradeItem".'),"";for(let r of i){let i=e[r],a=t[r];n+=this.gameManager.gameEngine.parseTemplate(s,{key:a.key,label:a.label,description:a.description,id:r,qty:a.qty,hiddenClass:"",tradeAction:"",tradeActionKey:this.message.id,tradeQuantityContent:i})}return n}assignRemoveActions(e,t){let i=Object.keys(e);if(0===i.length)return r.info("Undefined exchange items on remove trade-message-handler.",{message:this.message}),!1;for(let e of i){let i=".pushed-to-trade .trade-item-"+e,n=this.gameDom.getElement(i);if(!n){r.error('Assign trade item "'+e+'" container not found.');continue}let s=this.gameDom.getElement(".pushed-to-trade .trade-item-"+e+" .trade-action-remove");if(!s){r.error('Assign trade item "'+e+'" remove button not found.');continue}let h=t[e];s.addEventListener("click",()=>{n.classList.remove("hidden");let t={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:"remove",itemId:e,itemKey:h.key};t[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.REMOVE,this.gameManager.activeRoomEvents.send(t)})}return!0}createTradeContainer(e){let t=this.uiScene.cache.html.get("inventoryTradePlayerContainer");if(!t)return r.error('Missing template "inventoryTradeContainer".'),"";let i=o.TRADE_ACTIONS_FUNCTION_NAME,n={tradeActionKey:this.message.id,confirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/confirmLabel",i.CONFIRM),disconfirmLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/disconfirmLabel",i.DISCONFIRM),cancelLabel:this.gameManager.config.getWithoutLogs("client/trade/titles/cancelLabel",i.CANCEL),myItems:e,myItemsTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/myItems","My Items:"),pushedToTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/pushedToTradeTitle","Sending:"),gotFromTradeTitle:this.gameManager.config.getWithoutLogs("client/trade/titles/gotFromTradeTitle","Receiving:"),playerConfirmedLabel:this.playerConfirmedLabel()};return this.gameManager.gameEngine.parseTemplate(t,n)}playerConfirmedLabel(){return this.message.playerConfirmed?this.gameManager.config.getWithoutLogs("client/trade/titles/playerConfirmedLabel","%playerName CONFIRMED").replace("%playerName",this.message.with):""}createTradeItemBox(e,t){let i=this.uiScene.cache.html.get("inventoryTradeItem");if(!i)return r.error('Missing template "inventoryTradeItem".'),"";let n=this.uiScene.cache.html.get("inventoryTradeItemQuantity");if(!n)return r.error('Missing template "inventoryTradeItemQuantity".'),"";let s=t||0;return this.gameManager.gameEngine.parseTemplate(i,{key:e.key,label:e.label,description:e.description,id:e.getInventoryId(),qty:e.qty,hiddenClass:0{let e=this.gameDom.getElement(".trade-item-"+i.getInventoryId()+" .item-qty input"),t=e?.value||1,n={act:a.ACTIONS.TRADE_ACTION,id:this.message.id,value:i.tradeAction,itemId:i.getInventoryId(),itemKey:i.key,qty:Number(t)};n[o.TRADE_ACTIONS.SUB_ACTION]=o.TRADE_ACTIONS.ADD,this.gameManager.activeRoomEvents.send(n)})}}}},{"779d25f0124f02f2":"3lwy5","58803c0e08c63617":"19bl6","3ddb9dce645de8c3":"izuLV",c49942f179cbbc0a:"bzImH"}],hZf8u:[function(e,t,i){t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/inventory/templates/";e.load.html("inventory",t+"ui-inventory.html"),e.load.html("equipment",t+"ui-equipment.html"),e.load.html("inventoryItem",t+"item.html"),e.load.html("inventoryItemUse",t+"usable.html"),e.load.html("inventoryItemEquip",t+"equip.html"),e.load.html("inventoryGroup",t+"group.html"),e.load.html("inventoryTradeContainer",t+"trade-container.html"),e.load.html("inventoryTradePlayerContainer",t+"trade-player-container.html"),e.load.html("inventoryTradeRequirements",t+"trade-requirements.html"),e.load.html("inventoryTradeRewards",t+"trade-rewards.html"),e.load.html("inventoryTradeAction",t+"trade-action.html"),e.load.html("inventoryTradeActionRemove",t+"trade-action-remove.html"),e.load.html("inventoryTradeItem",t+"trade-item.html"),e.load.html("inventoryTradeItemQuantity",t+"trade-item-quantity.html"),e.load.html("inventoryTradeStart",t+"trade-start.html"),e.load.html("inventoryTradeAccept",t+"trade-accept.html")}}},{}],"1SpFi":[function(e,t,i){t.exports={items:{undefinedItem:"Add item error, undefined item.",undefinedMethodInventoryId:"Add item error, undefined getInventoryId.",undefinedItemKey:"Add item error, undefined item key.",invalidItemInstance:"Invalid item instance.",lockedForAddItem:"Inventory locked, cannot add item: %itemUid",maxTotalReachedForAddItem:"Cannot add item, max total reached.",itemExistsForAddItem:"Cannot add item, item already exists: %itemUid",itemLimitExceededForAddItem:"Cannot add item, item qty limit exceeded.",addItemsError:'Cannot add item "%itemUid".',lockedForSetItem:"Inventory locked, cannot set item: %itemUid.",lockedForRemoveItem:"Inventory locked, cannot remove item: %itemUid.",keyNotFound:"Cannot remove item, key not found: %itemUid.",lockedForModifyItemQty:"Inventory locked, cannot modify item qty: %itemUid.",undefinedItemKeyForOperation:'Cannot "%operation" item qty, undefined item key: %itemUid.',qtyNotANumber:'Cannot "%operation" item qty, quantity is not a number: %qty.',itemQtyLimitExceeded:'Cannot "%operation" item qty, item qty limit exceeded: %qty > %limitPerItem.',lockedForSetItems:"Inventory locked, cannot set items.",tradeWith:"Trading with %playerName",exchange:{missingConfirmation:"Missing confirmation.",invalidPushedQuantity:"Invalid item pushed quantity (%qty), available: %pushedItemQty.",invalidQuantity:"Invalid item quantity 0.",invalidExchange:'Inventories "FROM" and "TO" are the same, exchange cancelled.',decreaseQuantity:"Exchange inventory decrease error.",itemAdd:"Exchange add inventory result error."},requirements:{itemNotPresent:'Required item "%requiredItemKey" is not present.',quantityNotAvailable:'Required item "%requiredItemKey" quantity %totalRequiredQuantity is not available.',itemNotPushed:'Required item "%requiredItemKey" was not pushed for exchange.',itemQuantityNotPushed:'Required item "%requiredItemKey" quantity %totalRequiredQuantity was not pushed for exchange.',itemDoesNotExists:'Requirement error, item "%itemUid" does not exits on inventory.',itemAdd:"Requirement add item error."},reward:{doesNotExists:'Reward error, item "%itemUid" does not exits.',missingItem:'Reward error, item "%itemUid" does not exits.',itemNotPresent:'Reward item "%rewardItemKey" is not present on inventory.',quantityNotAvailable:"Reward item %rewardItemKey reward quantity (%rewardQuantity) is not available.",missingPushed:'Missing pushed for exchange item "%itemUid".',getItemDoesNotExists:'Reward error, item "%itemUid" does not exits on inventory.',processItem:'Process item reward error, item "%itemUid".',processInventory:"Rewards process inventory error.",addItems:"Rewards error on add items: %itemsKeys.",quantityOverload:"Reward quantity (%rewardQuantityTotal) is bigger than the available in the inventory (%rewardInventoryItemQty)."},equipment:{modifiersApply:"Cannot apply modifiers the item is not equipped: %itemUid",modifiersRevert:"Cannot revert modifiers the item is not equipped: %itemUid"}}}},{}],enPaX:[function(e,t,i){let{SkillsUi:n}=e("6b2d3727d1d70b78"),{PluginInterface:r}=e("c34bb8f0c81f8738"),{PlayerSelector:s}=e("566ebfe7409d2a3a"),{PreloaderHandler:a}=e("7af81ec0e9446267"),{MessagesHandler:o}=e("699da6696693061c"),{GameManagerEnricher:h}=e("c162e687344f571d"),c=e("37b783bb3d5ca68"),{TranslationsMapper:l}=e("f892bc1afce6c5ea"),{ActionsConst:u}=e("dbdea295dce66b04"),{Logger:d,sc:f}=e("1ad70aa0a704e98c");t.exports.ActionsPlugin=class extends r{setup(e){this.gameManager=f.get(e,"gameManager",!1),this.gameManager||d.error("Game Manager undefined in ActionsPlugin."),this.events=f.get(e,"events",!1),this.events||d.error("EventsManager undefined in ActionsPlugin."),this.playerSelector=new s(e),this.preloaderHandler=new a(e),this.setTranslations(),this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;l.forConfig(this.gameManager.config.client,c,u.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager)return!1;this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createPreload",e=>{this.preloaderHandler.createAnimations(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new n(e),this.uiManager.createUi()}),this.events.on("reldens.beforeCreateEngine",e=>{this.playerSelector.populateClassesSelector(f.get(e,"classesData",{}),e.gameConfig.client.players,e.player)}),this.events.on("reldens.activateRoom",e=>{e.onMessage("*",e=>{o.processOrQueueMessage(e,this.gameManager)})}),this.events.on("reldens.playersOnAddReady",e=>{h.withReceiver(e.player,e.roomEvents,this.gameManager)})}}},{"6b2d3727d1d70b78":"fKq6g",c34bb8f0c81f8738:"fC3To","566ebfe7409d2a3a":"6tkLj","7af81ec0e9446267":"asAAa","699da6696693061c":"gldsT",c162e687344f571d:"4okuX","37b783bb3d5ca68":"8JSjE",f892bc1afce6c5ea:"1fcQw",dbdea295dce66b04:"59VA7","1ad70aa0a704e98c":"3lwy5"}],fKq6g:[function(e,t,i){let{ActionsConst:n}=e("fcb0bd426e0a1381");t.exports.SkillsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.defaultAction=this.gameManager.config.get("client/ui/controls/defaultActionKey")}createUi(){let e=n.SELECTORS.UI_PLAYER_EXTRAS;this.appendToUiContainer(e,"skillsClassPath"),this.appendToUiContainer(e,"skillsLevel"),this.appendToUiContainer(e,"skillsExperience",{experienceLabel:this.gameManager.services.translator.t(n.SNIPPETS.EXPERIENCE_LABEL)}),this.createUiBox("skills",7)}appendSkills(e){let t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t!==this.defaultAction&&this.createSkillBox(t)}}appendToUiContainer(e,t,i={}){let n=this.uiScene.cache.html.get(t);0{let t=e.options[e.selectedIndex].dataset.key;n.style.backgroundImage=`url('/assets/custom/sprites/${t}${r.FILES.EXTENSIONS.PNG}')`}),t.append(n)}}},{b243e92bb3fe291b:"59VA7","99fe71ca25218501":"93TbC","350db309ac69e57e":"3lwy5"}],asAAa:[function(e,t,i){let{Logger:n,sc:r}=e("282e615b5cb3f89e"),{GameConst:s}=e("1d3a9c826831f334");t.exports.PreloaderHandler=class{constructor(e){this.gameManager=r.get(e,"gameManager",!1),this.gameManager||n.error("Game Manager undefined in ActionsPlugin PreloaderHandler."),this.events=r.get(e,"events",!1),this.events||n.error("EventsManager undefined in ActionsPlugin PreloaderHandler."),this.setProperties(e)}setProperties(e){if(!this.gameManager)return!1;this.gameDom=this.gameManager.gameDom,this.initialGameData=this.gameManager.initialGameData,this.levelsAnimConfig=this.gameManager.config.get("client/levels/animations"),this.skillsAnimConfig=this.gameManager.config.get("client/skills/animations"),this.assetsCustomActionsSpritesPath=r.get(e,"assetsCustomActionsSpritesPath","assets/custom/actions/sprites/"),this.gameManager.loadedAssets||(this.gameManager.loadedAssets={}),this.gameManager.createdAnimations||(this.gameManager.createdAnimations={})}loadContents(e){e.load.html("skillsClassPath","/assets/features/skills/templates/ui-class-path.html"),e.load.html("skillsLevel","/assets/features/skills/templates/ui-level.html"),e.load.html("skillsExperience","/assets/features/skills/templates/ui-experience.html"),e.load.html("skills","/assets/features/skills/templates/ui-skills.html"),e.load.html("skillBox","/assets/features/skills/templates/ui-skill-box.html"),e.load.html("actionBox","/assets/html/ui-action-box.html"),this.preloadClassPaths(e),this.loopAnimationsAnd(this.levelsAnimConfig,"preload",e),this.loopAnimationsAnd(this.skillsAnimConfig,"preload",e)}preloadClassPaths(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return!1;for(let i of Object.keys(t)){let n=t[i].key;e.load.spritesheet(n,"/assets/custom/sprites/"+n+s.FILES.EXTENSIONS.PNG,e.playerSpriteSize).on("filecomplete",async e=>{this.gameManager.loadedAssets[e]=e})}}createAnimations(e){let t=this.levelsAnimConfig;this.loopAnimationsAnd(t,"create",e);let i=this.skillsAnimConfig;this.loopAnimationsAnd(i,"create",e),this.createAvatarsAnimations(e)}createAvatarsAnimations(e){let t=r.get(this.initialGameData,"classesData",!1);if(!t)return n.debug("Classes data not found. Fallback to player avatar."),!1;for(let i of(this.gameManager.mappedAvatars||(this.gameManager.mappedAvatars={}),n.debug({availableClassesData:t}),Object.keys(t))){let r=t[i].key;this.gameManager.loadedAssets[r]||(r=s.IMAGE_PLAYER,n.info('Avatar for class path "'+r+'" not found in assets. Fallback to player avatar.')),this.gameManager.mappedAvatars[r]=r,e.createPlayerAnimations(r)}return this.gameManager.mappedAvatars}loopAnimationsAnd(e,t,i){if(!e)return n.warning("Animations not found.",e),!1;for(let r of Object.keys(e)){let s=e[r];if(!s.animationData.enabled){n.debug('Animation "'+r+'" not enabled, skipping.',s);continue}n.debug({[t+"Animation"]:s}),this[t+"Animation"](s,i)}}preloadAnimation(e,t){r.hasOwn(e.animationData,["type","img"])&&s.ANIMATIONS_TYPE.SPRITESHEET===e.animationData.type&&this.preloadAnimationsInDirections(e,t),e.classKey&&r.isFunction(e.classKey.prepareAnimation)&&e.classKey.prepareAnimation({data:e,uiScene:t,pack:this})}preloadAnimationsInDirections(e,t){let i=r.get(e.animationData,"dir",0);if(0===i){t.load.spritesheet(this.getAnimationKey(e),this.assetsCustomActionsSpritesPath+e.animationData.img+s.FILES.EXTENSIONS.PNG,e.animationData);return}(1===i||2===i)&&(this.preloadSpriteInDirection(t,e,s.UP),this.preloadSpriteInDirection(t,e,s.DOWN)),(1===i||3===i)&&(this.preloadSpriteInDirection(t,e,s.LEFT),this.preloadSpriteInDirection(t,e,s.RIGHT))}preloadSpriteInDirection(e,t,i){e.load.spritesheet(this.getAnimationKey(t,i),this.assetsCustomActionsSpritesPath+t.animationData.img+"_"+i+s.FILES.EXTENSIONS.PNG,t.animationData)}createAnimation(e,t){if(r.hasOwn(e.animationData,["type","img"])&&e.animationData.type===s.ANIMATIONS_TYPE.SPRITESHEET){let i=r.get(e.animationData,"dir",0);0this.logLevel()?this:this.log("debug",...e)}info(...e){return this.forcedDisabled||7>this.logLevel()?this:this.log("info",...e)}notice(...e){return this.forcedDisabled||6>this.logLevel()?this:this.log("notice",...e)}warning(...e){return this.forcedDisabled||5>this.logLevel()?this:this.log("warning",...e)}error(...e){return this.forcedDisabled||4>this.logLevel()?this:this.log("error",...e)}critical(...e){return this.forcedDisabled||3>this.logLevel()?this:this.log("critical",...e)}alert(...e){return this.forcedDisabled||2>this.logLevel()?this:this.log("alert",...e)}emergency(...e){return this.forcedDisabled||1>this.logLevel()?this:this.log("emergency",...e)}}},{}],igll6:[function(e,t,i){t.exports=new class{hasOwn(e,t){if(this.isArray(t)&&0e[i][t]>e[n][t]?1:-1)}arraySort(e,t,i="asc"){if(!e||!t)return e;let n="act"===i?1:-1,r="act"===i?-1:1;return e.sort((e,i)=>e[t]>i[t]?n:r)}propsAssign(e,t,i){if(!this.isArray(i))return t;for(let n of i)t[n]=e[n];return t}toJson(e,t=!1){return this.parseJson(e)||t}parseJson(e){try{return JSON.parse(e)}catch(e){return!1}}deepJsonClone(e){return JSON.parse(JSON.stringify(e))}get(e,t,i){return this.hasOwn(e,t)?e[t]:i}getByPath(e,t,i){if(!this.isObject(e)||!this.isArray(t))return i;let n=t.shift();return 0===t.length?this.get(e,n,i):this.getByPath(e[n],t,i)}getByPriority(e,t){if(!this.isArray(t))return!1;for(let i of t)if(this.hasOwn(e,i))return e[i];return!1}fetchByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return!1;for(let n of e)if(n[t]===i)return n;return!1}fetchAllByProperty(e,t,i){if(!this.isArray(e)||0===e.length)return[];let n=[];for(let r of e)r[t]===i&&n.push(r);return n}fetchByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let r of n){let n=e[r];if(n[t]===i)return n}return!1}fetchAllByPropertyOnObject(e,t,i){if(!e)return!1;let n=Object.keys(e);if(0===n.length)return!1;let r=[];for(let s of n){let n=e[s];n[t]===i&&r.push(n)}return r}serializeFormData(e){if(0===e.length)return{};let t={};for(let[i,n]of e)void 0!==t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;return t}removeFromArray(e,t){return e.filter(e=>-1===t.indexOf(e))}getCurrentDate(){return new Date().toISOString().slice(0,19).replace("T"," ")}getDateForFileName(){return new Date().toISOString().slice(0,19).replace("T","-").replace(/:/g,"-")}formatDate(e,t="Y-m-d H:i:s"){if(!(e instanceof Date))return e;let i={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate().toString().padStart(2,"0"),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0")};return t.replace(/Y|m|d|H|i|s/g,e=>i[e])}getTime(){return new Date().getTime()}roundToPrecision(e,t=4){return Number(Number(e).toFixed(t))}randomValueFromArray(e){return this.isArray(e)&&0!==e.length?e[Math.floor(Math.random()*e.length)]:null}randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}randomChars(e){return 0>=e?"":this.randomString(e,!1)}randomCharsWithSymbols(e){return 0>=e?"":this.randomString(e,!0)}randomString(e,t=!1){let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t&&(n+="!@#$%&*()_-=+[]{}:;<>,./?");let r=n.length;for(let t=0;tthis.interactionLimits.left&&ethis.interactionLimits.up&&tr&&t[r],a=!1;h.hasOwn(e,s)&&(a=e[s]),h.hasOwn(a,"key")&&a.key-n.key>0&&await this.createAndAutofillLevelsInstances(n,a)}}async createAndAutofillLevelsInstances(e,t){for(let i=e.key+1;ie[i][t]>e[n][t]?1:-1)}async levelUp(){let e=Object.keys(this.levels).pop();if(this.currentLevel>=this.levels[e].key)return!1;this.currentLevel++,await this.applyLevelModifiers(),await this.fireEvent(n.LEVEL_UP,this)}async levelDown(){if(1>=this.currentLevel)return!1;await this.applyLevelModifiers(!0),this.currentLevel--,await this.fireEvent(n.LEVEL_DOWN,this)}async applyLevelModifiers(e){let t=this.getLevelInstance(this.currentLevel);if(!t)return o.error(["Current level instance not found.","Current Level Key:",this.currentLevel]),!1;if(await this.fireEvent(n.LEVEL_APPLY_MODIFIERS,this,t),!t.modifiers)return!1;for(let i of t.modifiers)e?i.revert(this.owner):i.apply(this.owner)}getLevelInstance(e){return h.get(this.levels,e,!1)}async addExperience(e){let t=this.currentExp+e,i=this.levelsByExperience.indexOf(this.currentLevel.toString()),r=i+1,s=this.levelsByExperience[r],a=this.levels[s],o=0,c=!1;if(h.hasOwn(this.levels,this.currentLevel)&&a&&t>=a.requiredExperience){for(let e of this.levelsByExperience.slice(r))if(t>=this.levels[e].requiredExperience&&(c=!0,await this.levelUp()),t=e.modifiers.length)&&r.warning("Level modifiers were not specified.","Level ID:",e.id," - Key:",e.key),this.key=parseInt(e.key),this.modifiers=e.modifiers,this.label=s.get(e,"label",e.key),this.requiredExperience=s.get(e,"requiredExperience",s.get(e,"required_experience",0))}}},{faf9f4d0a81cecea:"7GVS0"}],cBYkx:[function(e,t,i){let n=e("1a8b79feac2da9b0"),r=e("867678cea9a9cfca"),{PropertyManager:s,Condition:a,Calculator:o}=e("2b878b9cf457d0fc"),{InteractionArea:h,EventsManagerSingleton:c,ErrorManager:l,Logger:u,sc:d}=e("cfa6f665a4da61d4");t.exports=class{constructor(e){d.hasOwn(e,"key")||l.error("Missing skill key."),d.hasOwn(e,"owner")||l.error("Missing skill owner."),"function"!=typeof e.owner.getPosition&&l.error("Undefined owner position method."),this.key=e.key,this.owner=e.owner,this.ownerIdProperty=d.get(e,"ownerIdProperty","id"),this.type=n.SKILL.TYPE.BASE,this.customData=d.get(e,"customData",!1),this.autoValidation=d.get(e,"autoValidation",!1),this.skillDelay=d.get(e,"skillDelay",0),this.castTime=d.get(e,"castTime",0),this.owner.isCasting=!1,this.owner.castingTimer=!1,this.isValid=!0,this.usesLimit=d.get(e,"usesLimit",0),this.uses=0,this.canActivate=d.get(e,"canActivate",!0),this.range=d.get(e,"range",0),this.skillActivationTimer=!1,this.lastState="",this.groups=d.get(e,"groups",[]),this.lastAppliedModifiers={},this.rangeAutomaticValidation=d.get(e,"rangeAutomaticValidation",!1),this.rangePropertyX=d.get(e,"rangePropertyX",!1),this.rangePropertyY=d.get(e,"rangePropertyY",!1),this.rangeTargetPropertyX=d.get(e,"rangeTargetPropertyX",!1),this.rangeTargetPropertyY=d.get(e,"rangeTargetPropertyY",!1),this.allowSelfTarget=d.get(e,"allowSelfTarget",!1),this.target=d.get(e,"target",!1),this.events=d.get(e,"events",c),this.ownerConditions=d.get(e,"ownerConditions",[]),this.ownerEffects=d.get(e,"ownerEffects",[]),this.criticalChance=d.get(e,"criticalChance",0),this.criticalMultiplier=d.get(e,"criticalMultiplier",1),this.criticalFixedValue=d.get(e,"criticalFixedValue",0),this.propertyManager=new s,this.calculator=new o}validate(){return(this.isValid=!0,this.fireEvent(r.VALIDATE_BEFORE,this).catch(e=>{u.error(e)}),!this.canActivate||this.owner.isCasting)?(this.lastState=n.SKILL_STATES.CAN_NOT_ACTIVATE,!1):!!this.validateConditions()&&(!(0=this.usesLimit))&&(0{this.canActivate=!0},this.skillDelay)):this.canActivate=!0,this.fireEvent(r.VALIDATE_SUCCESS,this).catch(e=>{u.error(e)}),this.isValid)}validateConditions(){for(let e of this.ownerConditions)if(e instanceof a||l.error(["Wrong Condition instance.",typeof e,"was specified."]),!e.isValidOn(this.owner))return this.fireEvent(r.VALIDATE_FAIL,this,e).catch(e=>{u.error(e)}),!1;return!0}validateRange(e){this.rangePropertyX&&this.rangePropertyY||l.error("Missing range properties for validation.");let t={x:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyX),y:this.propertyManager.getPropertyValue(this.owner,this.rangePropertyY)},i={x:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyX||this.rangePropertyX),y:this.propertyManager.getPropertyValue(e,this.rangeTargetPropertyY||this.rangePropertyY)};return this.isInRange(t,i)}isInRange(e,t){if(this.fireEvent(r.SKILL_BEFORE_IN_RANGE,this).catch(e=>{u.error(e)}),0===this.range)return!0;let i=new h;i.setupInteractionArea(this.range,t.x,t.y);let n=i.isValidInteraction(e.x,e.y);return this.fireEvent(r.SKILL_AFTER_IN_RANGE,this,n).catch(e=>{u.error(e)}),n}async execute(e){if(await this.fireEvent(r.SKILL_BEFORE_EXECUTE,this,e),e&&(this.target=e),this.target||l.error("Target undefined."),!this.onExecuteConditions()||await this.isValidRange(e)||this.autoValidation&&!this.validate())return!1;let t=!1;return this.ownerEffects&&(this.applyModifiers(this.ownerEffects,this.owner,!0),await this.fireEvent(r.SKILL_APPLY_OWNER_EFFECTS,this,e)),0{t=this.finishExecution(e),this.owner.isCasting=!1,this.fireEvent(r.SKILL_AFTER_CAST,this,e,t)},this.castTime)):t=await this.finishExecution(e),this.uses++,await this.onExecuteRewards(),await this.fireEvent(r.SKILL_AFTER_EXECUTE,this,e),t}async isValidRange(e){return this.rangeAutomaticValidation&&this.rangePropertyX&&this.rangePropertyY&&!await this.validateRange(e)}async finishExecution(e){await this.fireEvent(r.SKILL_BEFORE_RUN_LOGIC,this,e);let t=await this.runSkillLogic();return await this.fireEvent(r.SKILL_AFTER_RUN_LOGIC,this,e),t}onExecuteConditions(){return!0}async runSkillLogic(){return!0}async onExecuteRewards(){}applyCriticalValue(e){return this.isCritical()&&(this.criticalMultiplier&&(e*=this.criticalMultiplier),this.criticalFixedValue&&(e+=this.criticalFixedValue)),e}getCriticalDiff(e){return this.applyCriticalValue(e)-e}isCritical(){return!(this.criticalChance<=0)&&this.criticalChancet*this.dodgeOverAimSuccess)return this.lastState=s.SKILL_STATES.DODGED,!1;let n=this.getAffectedPropertyValue(e);if(!this.allowEffectBelowZero&&0>=n)return!1;let a=this.getDiffProportion(t,i),o=this.applyDirectDamage?this.hitDamage:this.calculateProportionDamage(e,this.hitDamage,i,t,a);o+=this.calculateCriticalDamage(o,i,t,a);let c=!this.allowEffectBelowZero&&ni?r:(this.lastState=s.SKILL_STATES.APPLIED_CRITICAL_DAMAGE,r-Math.floor(r*n/100))}calculateProportionDamage(e,t,i,n,r){let s=this.getPropertiesTotal(this.owner,this.attackProperties),a=this.getPropertiesTotal(e,this.defenseProperties),o=s-a;if(o>0){let e=o99?99:e)*t/100);t+=i}if(o<0){let e=-o99?99:e)*t/100);t-=i}if(this.damageAffected&&i>n){let e=Math.floor(t*r/100);t-=e}return t}getPropertiesTotal(e,t){if(!e)return h.warning("Missing object to get properties total."),!1;if(0===t.length)return 0;try{let i=0;for(let n of t){let t=this.propertyManager.getPropertyValue(e,n);i=o.hasOwn(this.propertiesTotalOperators,n)?this.calculator.calculateNewValue(i,this.propertiesTotalOperators[n],t):i+t}return i}catch(e){return h.debug(e.message),!1}}getDiffProportion(e,t){return 100*(t-e)/e}getAffectedPropertyValue(e){return this.propertyManager.getPropertyValue(e,this.affectedProperty)}setAffectedPropertyValue(e,t){return this.propertyManager.setOwnerProperty(e,this.affectedProperty,t)}}},{"9dba7a1ed3b87f64":"cBYkx",d7a74c1b6b680357:"9PsTy",db39812edc044706:"6b010",fbb03c16891d35a5:"7GVS0"}],j4v88:[function(e,t,i){let n=e("e44f791774823c1"),r=e("2db6f1da8a2a090f"),s=e("7b8b51bc133daece"),{ErrorManager:a,sc:o}=e("fba4e87138a39fd8");t.exports=class extends n{constructor(e){super(e),this.type=s.SKILL.TYPE.EFFECT,o.hasOwn(e,"targetEffects")||a.error("Missing targetEffects for skill."),this.targetEffects=e.targetEffects}async runSkillLogic(){if(this.lastState=null,!this.validateRange(this.target))return this.lastState=s.SKILL_STATES.OUT_OF_RANGE,!1;this.lastState=s.SKILL_STATES.APPLYING_EFFECTS,this.applyModifiers(this.targetEffects,this.target),this.lastState=s.SKILL_STATES.APPLIED_EFFECTS,await this.fireEvent(r.SKILL_EFFECT_TARGET_MODIFIERS,this)}}},{e44f791774823c1:"cBYkx","2db6f1da8a2a090f":"9PsTy","7b8b51bc133daece":"6b010",fba4e87138a39fd8:"7GVS0"}],"8uI2I":[function(e,t,i){let n=e("e0c5b517af7e95eb"),{PhysicalPropertiesValidator:r}=e("53bee4a4b8ffb847"),{PhysicalSkillRunner:s}=e("2eeab888db9bf32c"),a=e("816db325f0372799"),o=e("da275099098bc955"),{sc:h}=e("c2948bad11643034");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_ATTACK,this.parentType=a.SKILL.TYPE.ATTACK,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_ATTACK_HIT,e=>{super.runSkillLogic(e)})}}},{e0c5b517af7e95eb:"3f9O5","53bee4a4b8ffb847":"1WOg9","2eeab888db9bf32c":"15hwT","816db325f0372799":"6b010",da275099098bc955:"9PsTy",c2948bad11643034:"7GVS0"}],"1WOg9":[function(e,t,i){let{ErrorManager:n,sc:r}=e("35abe0003c2a362d");t.exports.PhysicalPropertiesValidator=class{static validate(e){"function"!=typeof e.owner.executePhysicalSkill&&n.error("Missing executePhysicalSkill required method."),r.hasOwn(e,"magnitude")||n.error("Missing magnitude property."),r.hasOwn(e,"objectWidth")||n.error("Missing objectWidth property."),r.hasOwn(e,"objectHeight")||n.error("Missing objectHeight property.")}}},{"35abe0003c2a362d":"7GVS0"}],"15hwT":[function(e,t,i){let n=e("633d3b21cd84c369");t.exports.PhysicalSkillRunner=class{static async runSkillLogic(e){return(this.lastState=null,e.validateRange(e.target))?(this.lastState=n.SKILL_STATES.EXECUTE_PHYSICAL_ATTACK,await e.owner.executePhysicalSkill(e.target,e)):this.lastState=n.SKILL_STATES.OUT_OF_RANGE,!1}static async executeOnHit(e,t,i,r){return(await t.fireEvent(i,t,e),t.validateTargetOnHit&&e!==t.target)?(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_INVALID_TARGET,!1):"function"==typeof r&&(this.lastState=n.SKILL_STATES.PHYSICAL_SKILL_RUN_LOGIC,await r(e))}}},{"633d3b21cd84c369":"6b010"}],eaAf1:[function(e,t,i){let n=e("d5317b62b21ebf53"),{PhysicalPropertiesValidator:r}=e("161757e13fa22e4c"),{PhysicalSkillRunner:s}=e("63a7f8ae8a1c8d9b"),a=e("1ec320fdf9897900"),o=e("366775bdaf1fe082"),{sc:h}=e("456bc4241930a2a9");t.exports=class extends n{constructor(e){super(e),this.type=a.SKILL.TYPE.PHYSICAL_EFFECT,this.parentType=a.SKILL.TYPE.EFFECT,r.validate(e),this.magnitude=e.magnitude,this.objectWidth=e.objectWidth,this.objectHeight=e.objectHeight,this.validateTargetOnHit=h.get(e,"validateTargetOnHit",!1)}async runSkillLogic(){return s.runSkillLogic(this)}async executeOnHit(e){return s.executeOnHit(e,this,o.SKILL_PHYSICAL_EFFECT_HIT,e=>{super.runSkillLogic(e)})}}},{d5317b62b21ebf53:"j4v88","161757e13fa22e4c":"1WOg9","63a7f8ae8a1c8d9b":"15hwT","1ec320fdf9897900":"6b010","366775bdaf1fe082":"9PsTy","456bc4241930a2a9":"7GVS0"}],"4okuX":[function(e,t,i){let{ReceiverWrapper:n}=e("7b4e6450c890fa8e"),{Logger:r}=e("d1031ffaeea43394");t.exports.GameManagerEnricher=class{static withReceiver(e,t,i){if(!e||!t||!i)return r.error("Invalid input parameters for GameManagerEnricher.withReceiver method."),!1;if(e?.playerId!==t?.room.sessionId||(i.skills||(i.skills=new n({owner:e,roomEvents:t,events:i.events})),!i.skillsQueue?.length))return!1;for(let e of i.skillsQueue)i.skills.processMessage(e);i.skillsQueue=[]}}},{"7b4e6450c890fa8e":"30jum",d1031ffaeea43394:"3lwy5"}],"30jum":[function(e,t,i){let{Receiver:n}=e("c695b3c1a62eb9d1"),{Logger:r,sc:s}=e("84b4ce5800839523"),{GameConst:a}=e("280612dc61e2a50e"),{ActionsConst:o}=e("6868c5c216c81bc5");t.exports.ReceiverWrapper=class extends n{constructor(e){super(e),this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in ReceiverWrapper."),this.gameManager=s.get(e.roomEvents,"gameManager",!1),this.gameManager||r.error("Game Manager undefined in ReceiverWrapper."),this.room=s.get(e.roomEvents,"room",!1),this.room||r.error("Room undefined in ReceiverWrapper."),this.translator=this.gameManager?.services?.translator}processMessage(e){if(!this.gameManager)return!1;let t=this.gameManager.getActiveScene();if(!t||!t.player)return!1;super.processMessage(e),this.playAttackOrEffectAnimation(e,t),this.playHitAnimation(e,t)}playHitAnimation(e,t){-1!==e.act.indexOf("_hit")&&this.runHitAnimation(e.x,e.y,t,e.act)}playAttackOrEffectAnimation(e,t){let i=-1!==e.act.indexOf("_eff");if(!(-1!==e.act.indexOf("_atk"))&&!i)return;this.events.emitSync("reldens.playerAttack",e,this.room);let n=i?"_eff":"_atk",r=e.act.substring(0,e.act.indexOf(n)),{ownerSprite:a,targetSprite:o,targetType:h}=this.extractOwnerTargetAndType(t,e),c=s.get(this.gameManager.config.client.skills.animations,r,"default"+n);if(a&&t.getAnimationByKey(c)){let e=t.physics.add.sprite(a.x,a.y,c);e.setDepth(2e5);let i="";s.hasOwn(this.gameManager.gameEngine.uiScene.directionalAnimations,c)&&(i=3===this.gameManager.gameEngine.uiScene.directionalAnimations[c]?a.x{e.destroy()})}o&&this.runHitAnimation(o.x,o.y,t,r+"_hit",e.target,h)}extractOwnerTargetAndType(e,t){if(!e)return r.critical("Current scene not found.",e,t),!1;let i=!1,n=!1,a=o.DATA_TYPE_VALUE_PLAYER,h=e.player.players,c=e.objectsAnimations;return s.hasOwn(h,t.owner)&&s.hasOwn(h,t.target)?{ownerSprite:i=h[t.owner],targetSprite:n=h[t.target],targetType:a}:(s.hasOwn(c,t.owner)&&(i=c[t.owner].sceneSprite,n=h[t.target]),s.hasOwn(c,t.target)&&(n=c[t.target].sceneSprite,i=h[t.owner],a=o.DATA_TYPE_VALUE_OBJECT),{ownerSprite:i,targetSprite:n,targetType:a})}runHitAnimation(e,t,i,n,r,a){let h=this.gameManager.config.client.skills.animations,c=s.hasOwn(h,n)?n:o.DEFAULT_HIT_ANIMATION_KEY;if(!i.getAnimationByKey(c)||!s.hasOwn(h,c))return!1;let l=!1,u=!1;a===o.DATA_TYPE_VALUE_PLAYER&&(u=(l=this.gameManager.getCurrentPlayer().players[r]).playerId),a===o.DATA_TYPE_VALUE_OBJECT&&(l=i.objectsAnimations[r],u=r);let d=i.physics.add.sprite(e,t,c);(d=this.setTargetSpriteDepth(l,c,u,d,h)).anims.play(c,!0).on("animationcomplete",()=>{d.destroy(),l&&s.hasOwn(l,"moveSprites")&&delete l.moveSprites[c+"_"+u]})}setTargetSpriteDepth(e,t,i,n,r){if(!e)return n.setDepth(3e5),n;s.hasOwn(e,"targetSprite")&&(e.moveSprites[t+"_"+i]=n);let a=r[t],o=e.depth+("above"===s.get(a.animationData,"depthByPlayer","")?100:-.1);return n.depthByPlayer=a.animationData.depthByPlayer,n.setDepth(o),n}updateLevelAndExperience(e){this.gameManager.gameDom.updateContent(o.SELECTORS.LEVEL_LABEL,this.translator.t(o.SNIPPETS.LEVEL,{currentLevel:e.data[o.MESSAGE.DATA.LEVEL]})),this.onLevelExperienceAdded(e);let t=e.data[o.MESSAGE.DATA.CLASS_PATH_LABEL];t&&this.gameManager.gameDom.updateContent(o.SELECTORS.CLASS_PATH_LABEL,this.translator.t(o.SNIPPETS.CLASS_PATH_LABEL,{classPathLabel:t}));let i=e.data[o.MESSAGE.DATA.NEXT_LEVEL_EXPERIENCE];i&&this.gameManager.gameDom.updateContent(o.SELECTORS.NEXT_LEVEL_EXPERIENCE,this.translator.t(o.SNIPPETS.NEXT_LEVEL_EXPERIENCE,{nextLevelExperience:i}))}onInitClassPathEnd(e){if(this.gameManager.skills&&this.gameManager.skills.uiCreated)return!1;this.gameManager.skills.uiCreated=!0,this.updateLevelAndExperience(e),this.gameManager.skills.skills=e.data[o.MESSAGE.DATA.SKILL_LEVEL],this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl)}onLevelUp(e){this.updateLevelAndExperience(e),s.hasOwn(e.data,"skl")&&(Object.assign(this.gameManager.skills.skills,e.data.skl),this.gameManager.getFeature("actions").uiManager.appendSkills(e.data.skl));let t=this.getLevelUpAnimationKey(e.data.skl);t&&this.playSkillPlayerAnimation(this.gameManager.getCurrentPlayer().playerId,t)}getLevelUpAnimationKey(e){let t=this.gameManager.config.client.levels.animations,i="level_"+this.gameManager.playerData.avatarKey+"_"+e;if(s.hasOwn(t,i))return i;let n="level_"+this.gameManager.playerData.avatarKey;if(s.hasOwn(t,n))return n;let r="level_"+e;return s.hasOwn(t,r)?r:!!s.hasOwn(t,"level_default")&&"level_default"}onLevelExperienceAdded(e){this.gameManager.gameDom.updateContent(o.SELECTORS.CURRENT_EXPERIENCE,this.translator.t(o.SNIPPETS.EXPERIENCE,{experience:e.data[o.MESSAGE.DATA.EXPERIENCE]}))}onSkillBeforeCast(e){this.playSkillPlayerAnimation(e.data.extraData[o.DATA_OWNER_KEY],this.determineCastKey(e))}determineCastKey(e){let t=e.data.skillKey+"_cast";return s.hasOwn(this.gameManager.config.client.skills.animations,t)?t:"default_cast"}playSkillPlayerAnimation(e,t){let i=this.gameManager.getActiveScene(),n=i.getAnimationByKey(t);if(!n)return -1===t.indexOf("default")&&r.error('Animation sprite not found for "'+t+'".',this.gameManager.config.client.skills.animations),!1;let a=this.gameManager.getCurrentPlayer().players[e],o=a.x,h=a.y,c=i.physics.add.sprite(o,h,t),l=s.hasOwn(n,"depthByPlayer")&&"above"===n.depthByPlayer?a.depth+1:a.depth-.1;c.depthByPlayer=n.depthByPlayer,c.setDepth(l),s.get(n,"blockMovement",!1)||(a.moveSprites[t+"_"+a.playerId]=c),c.anims.play(t,!0);let u=s.get(n,"destroyTime",!1);u&&setTimeout(()=>{c.destroy(),delete a.moveSprites[t+"_"+a.playerId]},u)}onSkillAfterCast(e){let t=this.gameManager.getCurrentPlayer();if(!s.hasOwn(e.data.extraData,o.DATA_OWNER_TYPE)||!s.hasOwn(e.data.extraData,o.DATA_OWNER_KEY)||e.data.extraData[o.DATA_OWNER_TYPE]!==o.DATA_TYPE_VALUE_PLAYER||!s.hasOwn(t.players,e.data.extraData[o.DATA_OWNER_KEY]))return!1;let i=this.gameManager.getActiveScene(),n=this.gameManager.getCurrentPlayer().players[e.data.extraData[o.DATA_OWNER_KEY]],r=this.getPlayDirection(e.data.extraData,n,t,i);r&&(n.anims.play(n.avatarKey+"_"+r,!0),n.anims.stop())}onSkillAttackApplyDamage(e){let t=this.gameManager.config.get("client/actions/damage");if(!t.enabled)return!1;let i=this.gameManager.getCurrentPlayer();if(!t.showAll&&e.data.extraData[o.DATA_OWNER_KEY]!==i.playerId)return!1;let n=this.gameManager.getActiveScene(),r=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e.data.extraData,i);if(!r)return!1;n.createFloatingText(r.x,r.y,e.data.d,t.color,t.font,t.fontSize,t.duration,t.top,t.stroke,t.strokeThickness,t.shadowColor)}getPlayDirection(e,t,i,n){let r=!1,s=n.getObjectFromExtraData(o.DATA_OBJECT_KEY_TARGET,e,i);if(!s)return!1;let h=s.x-t.x,c=s.y-t.y;return r=h>=0?a.RIGHT:a.LEFT,Math.abs(h)=0?a.DOWN:a.UP),r}}},{c695b3c1a62eb9d1:"aF25l","84b4ce5800839523":"3lwy5","280612dc61e2a50e":"93TbC","6868c5c216c81bc5":"59VA7"}],"8JSjE":[function(e,t,i){t.exports={actions:{selectClassPath:"Select Your Class-Path",currentLevel:"Level %currentLevel",experience:"%experience",experienceLabel:"XP",classPathLabel:"%classPathLabel",nextLevelExperience:"%nextLevelExperience"}}},{}],"1nDQd":[function(e,t,i){let{LifebarUi:n}=e("8c20660587da4fd1"),{PlayerStatsUi:r}=e("ce28c84d7547fb13"),{ActionsConst:s}=e("f776fabb66dbfa58"),{GameConst:a}=e("182ad229d5814453"),o=e("654cdd1a7a80a011"),{TranslationsMapper:h}=e("63862da16582548e"),{UsersConst:c}=e("356170d1146549c3"),{PluginInterface:l}=e("514d97ef4c40e16"),{Logger:u,sc:d}=e("29f51e27cfc36016");t.exports.UsersPlugin=class extends l{setup(e){this.gameManager=d.get(e,"gameManager",!1),this.events=d.get(e,"events",!1),this.initialGameData={},this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.setupPlayerStatsUi())}validateProperties(){return this.gameManager?!!this.events||(u.error("EventsManager undefined in UsersPlugin."),!1):(u.error("Game Manager undefined in UsersPlugin."),!1)}setupPlayerStatsUi(){this.playerStatsUi=new r({events:this.events}),this.playerStatsUi.createPlayerStatsUi()}listenEvents(){this.events.on("reldens.beforeCreateEngine",(e,t)=>{this.initialGameData=e,this.onBeforeCreateEngine(e,t),this.lifeBarUi||(this.lifeBarUi=new n({events:this.events}),this.lifeBarUi.createLifeBarUi(t))})}setTranslations(){if(!this.events||!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,c.MESSAGE.DATA_VALUES)}onBeforeCreateEngine(e,t){let i=t.config.get("client/players/multiplePlayers/enabled",!1),n=t.config.get("client/rooms/selection/allowOnLogin",!1),r=t.gameDom.getElement("#player-selection"),s=d.isTrue(e,"players")?Object.keys(e.players).length:0;if(0(t.preventDefault(),e.classList.add("hidden"),this.submitSelectedPlayer(i,n,a,r),!1)),this.showAvatarContainer(i,t,a),n.classList.remove("hidden")}submitSelectedPlayer(e,t,i,n){e.events.emitSync("reldens.onPrepareSinglePlayerSelectorFormSubmit",{usersPlugin:this,form:t,selectElement:i,player:n,gameManager:e}),e.initEngine().catch(e=>{u.error(e)})}showAvatarContainer(e,t,i){let n=e.gameDom.getElement(".player-selection-additional-info");if(!n||!this.gameManager.config.getWithoutLogs("client/players/multiplePlayers/showAvatar",!0))return;let r=e.gameDom.createElement("div");r.className="avatar-container";let s=e.gameDom.createElement("div"),o=t.player.avatarKey;s.classList.add("class-path-select-avatar"),s.style.backgroundImage=`url('/assets/custom/sprites/${o}${a.FILES.EXTENSIONS.PNG}')`;let h=this.gameManager.config.getWithoutLogs("client/players/size/width","0")+"px";s.style.backgroundPositionX="-"+h,s.style.width=h,s.style.height=this.gameManager.config.getWithoutLogs("client/players/size/height","0")+"px",r.append(s),n.append(r)}preparePlayerSelector(e,t,i){let n=i.gameDom.getElement("#player-selector-form"),r=i.gameDom.getElement("#player-select-element");if(!n||!r)return!1;for(let s of(n.addEventListener("submit",s=>{s.preventDefault();let a=r.options[r.selectedIndex].value,o=this.getPlayerById(t.players,Number(a));return o&&(e.classList.add("hidden"),i.initialGameData.player=o,i.events.emitSync("reldens.onPreparePlayerSelectorFormSubmit",{usersPlugin:this,form:n,select:r,selectedPlayer:o,gameManager:i}),i.initEngine().catch(e=>{u.error(e)})),!1}),Object.keys(t.players))){let e=t.players[s],i=new Option(this.gameManager.services.translator.t(c.SNIPPETS.OPTION_LABEL,{playerName:e.name,currentLevel:e.currentLevel,classPathLabel:e.currentClassPathLabel}),e.id);i.dataset.key=e.avatarKey,r.append(i)}this.showAvatarContainer(i,t,r),n.classList.remove("hidden")}preparePlayerCreator(e,t,i){let n=i.gameDom.getElement(s.SELECTORS.PLAYER_CREATE_FORM);n&&n.addEventListener("submit",e=>{e.preventDefault(),i.gameDom.getElement("#player-create-form .response-error").innerHTML="";let t=new FormData(n),r=d.serializeFormData(t);if(3>r["new-player-name"].toString().length)return!1;i.submitedForm=!0,i.events.emitSync("reldens.onPreparePlayerCreationFormSubmit",{usersPlugin:this,form:n,gameManager:i});try{i.gameRoom.send("*",{act:a.CREATE_PLAYER,formData:r})}catch(e){u.critical("Create player error.",e),i.gameDom.alertReload(i.services.translator.t("game.errors.connectionLost"))}return!1})}getPlayerById(e,t){if(0===e.length)return!1;for(let i of e)if(i.id===t)return i;return!1}}},{"8c20660587da4fd1":"k9uwf",ce28c84d7547fb13:"bNgpB",f776fabb66dbfa58:"59VA7","182ad229d5814453":"93TbC","654cdd1a7a80a011":"ddEMb","63862da16582548e":"1fcQw","356170d1146549c3":"8dKJt","514d97ef4c40e16":"fC3To","29f51e27cfc36016":"3lwy5"}],k9uwf:[function(e,t,i){let{UsersConst:n}=e("aad623d6d02417c4"),{ActionsConst:r}=e("479d0bf7c66730cb"),{GameConst:s}=e("d5d1589d2f5e4492"),{ObjectsConst:a}=e("50eec9aa11029ed5"),{ObjectsHandler:o}=e("d6180c46f85f20ae"),{sc:h}=e("1d465cbfd4bfebd9");t.exports.LifebarUi=class{constructor(e){this.events=e.events}createLifeBarUi(e){return this.barConfig=e.config.get("client/ui/lifeBar"),!!this.barConfig.enabled&&(this.gameManager=e,this.fixedPositionX=!1,this.fixedPositionY=!1,this.barProperty=this.gameManager.config.get("client/actions/skills/affectedProperty"),this.playerSize=this.gameManager.config.get("client/players/size"),this.lifeBars={},this.lifeDataByKey={},this.listenEvents(),this)}listenEvents(){this.events.on("reldens.playerStatsUpdateAfter",(e,t)=>{this.updatePlayerLifeBar(e,t)}),this.events.on("reldens.joinedRoom",e=>{this.listenMessages(e)}),this.events.on("reldens.runPlayerAnimation",(e,t)=>{this.drawPlayerLifeBar(t)}),this.events.on("reldens.updateGameSizeBefore",(e,t,i)=>{this.drawOnGameResize(t,i)}),this.events.on("reldens.playersOnRemove",(e,t)=>{this.removePlayerLifeBar(t)}),this.events.on("reldens.playerEngineAddPlayer",()=>{this.processLifeBarQueue()}),this.events.on("reldens.createAnimationAfter",()=>{o.drawObjectsLifeBar(this)}),this.events.on("reldens.objectBodyChanged",e=>{o.generateObjectLifeBar(e.key,this)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i)=>{this.showTargetLifeBar(t,i)}),this.events.on("reldens.gameEngineClearTarget",(e,t)=>{this.clearPreviousBar(t)})}drawOnGameResize(e,t){if(!this.barConfig.fixedPosition)return!1;this.setPlayerLifeBarFixedPosition(e,t),this.drawPlayerLifeBar(this.gameManager.getCurrentPlayer().playerId)}clearPreviousBar(e){e&&h.hasOwn(this.lifeBars,e.id)&&this.gameManager.getCurrentPlayer().playerId!==e.id&&this.lifeBars[e.id].destroy()}showTargetLifeBar(e,t){if(!this.barConfig.showOnClick)return!1;this.clearPreviousBar(t),e.type===a.TYPE_OBJECT&&o.generateObjectLifeBar(e.id,this),e.type===s.TYPE_PLAYER&&this.drawPlayerLifeBar(e.id)}barPropertyValue(){return this.barProperty+"Value"}barPropertyTotal(){return this.barProperty+"Total"}setPlayerLifeBarFixedPosition(e,t){if(!e||!t){let i=this.gameManager.gameEngine.getCurrentScreenSize(this.gameManager);e=i.newWidth,t=i.newHeight}let{uiX:i,uiY:n}=this.gameManager.gameEngine.uiScene.getUiConfig("lifeBar",e,t);this.fixedPositionX=i,this.fixedPositionY=n}updatePlayerLifeBar(e,t){let i=t.gameManager.getCurrentPlayer();this.updatePlayerBarData(i.playerId,e.statsBase[this.barProperty],e.stats[this.barProperty]),this.drawPlayerLifeBar(i.playerId)}listenMessages(e){e.onMessage("*",e=>{this.listenBattleEnd(e),this.listenLifeBarUpdates(e)})}listenBattleEnd(e){if(e.act!==r.BATTLE_ENDED||!h.hasOwn(this.lifeBars,e.t))return!1;this.lifeBars[e.t].destroy()}listenLifeBarUpdates(e){if(e.act!==n.ACTION_LIFEBAR_UPDATE)return!1;o.processObjectLifeBarMessage(e,!0,this),this.processPlayerLifeBarMessage(e,!0)}canShowPlayerLifeBar(e){let t=this.gameManager.getCurrentPlayer();if(!h.isFunction(t?.isDeath))return!1;let i=e===t?.playerId;return i&&t&&(t.isDeath()||t.isDisabled())?(this.lifeBars[e]?.setVisible(!1),!1):!!i||!!this.barConfig.showAllPlayers||this.barConfig.showOnClick&&e===this.getCurrentTargetId()}queueLifeBarMessage(e){h.hasOwn(this.gameManager,"lifeBarQueue")||(this.gameManager.lifeBarQueue=[]),this.gameManager.lifeBarQueue.push(e)}processPlayerLifeBarMessage(e,t=!1){if(r.DATA_TYPE_VALUE_PLAYER!==e[r.DATA_OWNER_TYPE])return!1;let i=this.gameManager.getCurrentPlayer(),n=e[r.DATA_OWNER_KEY];return i&&i.players&&i.players[n]?(this.updatePlayerBarData(n,e.totalValue,e.newValue),this.canShowPlayerLifeBar(n)&&this.drawPlayerLifeBar(n),!0):(t&&this.queueLifeBarMessage(e),!1)}updatePlayerBarData(e,t,i){let n=this.gameManager.getCurrentPlayer();n.players[e][this.barPropertyTotal()]=t,n.players[e][this.barPropertyValue()]=i}processLifeBarQueue(){if(0===this.gameManager.lifeBarQueue.length)return!1;let e=[];for(let t of this.gameManager.lifeBarQueue)o.processObjectLifeBarMessage(t,!1,this)&&e.push(t),this.processPlayerLifeBarMessage(t,!1)&&e.push(t);0!e.includes(t)))}drawPlayerLifeBar(e){if(this.destroyByKey(e),!this.canShowPlayerLifeBar(e))return this.lifeBars[e]?.setVisible(!1),!1;let t=this.prepareBarData(e),i=this.barConfig.height,n=this.barConfig.top,r=this.barConfig.width,s=t.player.x-r/2,a=t.player.y-i-n+t.ownerTop/2;return e===this.gameManager.getCurrentPlayer().playerId&&this.barConfig.fixedPosition?(this.lifeBars[e]=this.gameManager.getActiveScenePreloader().add.graphics(),(!1===this.fixedPositionX||!1===this.fixedPositionY)&&this.setPlayerLifeBarFixedPosition(),s=this.fixedPositionX,a=this.fixedPositionY):this.lifeBars[e]=this.gameManager.getActiveScene().add.graphics(),this.drawBar(this.lifeBars[e],t.fullValue,t.filledValue,s,a),this}destroyByKey(e){h.hasOwn(this.lifeBars,e)&&this.lifeBars[e].destroy()}prepareBarData(e){let t=this.gameManager.getCurrentPlayer().players[e],i=t[this.barPropertyTotal()],n=t[this.barPropertyValue()],r=h.get(t,"topOff",0)-this.playerSize.height;return{player:t,fullValue:i,filledValue:n,ownerTop:r}}removePlayerLifeBar(e){if(!h.hasOwn(this.lifeBars,e))return!1;this.lifeBars[e].destroy(),delete this.lifeBars[e]}drawBar(e,t,i,n,r){let s=this.barConfig.height,a=this.barConfig.width;e.clear(),e.fillStyle(parseInt(this.barConfig.fillStyle),1),e.fillRect(n,r,i*a/t,s),e.lineStyle(1,parseInt(this.barConfig.lineStyle)),e.strokeRect(n,r,a,s),e.alpha=.6,e.setDepth(3e5)}getCurrentTargetId(){return h.get(this.gameManager.getCurrentPlayer()?.currentTarget,"id",!1)}getObjectByKey(e){return h.get(this.gameManager.getActiveScene()?.objectsAnimations,e,!1)}}},{aad623d6d02417c4:"8dKJt","479d0bf7c66730cb":"59VA7",d5d1589d2f5e4492:"93TbC","50eec9aa11029ed5":"izuLV",d6180c46f85f20ae:"evhzg","1d465cbfd4bfebd9":"3lwy5"}],"8dKJt":[function(e,t,i){let n="users.";t.exports.UsersConst={ACTION_LIFEBAR_UPDATE:"alu",SNIPPETS:{PREFIX:n,OPTION_LABEL:n+"optionLabel"},MESSAGE:{DATA_VALUES:{NAMESPACE:"users"}}}},{}],evhzg:[function(e,t,i){let{ActionsConst:n}=e("66c72f936244bf4c"),{GameConst:r}=e("4fbfbb1e3b1b87b5");t.exports.ObjectsHandler=class{static processObjectLifeBarMessage(e,t=!1,i){if(!this.isValidMessage(e,i))return!1;let r=e[n.DATA_OWNER_KEY],s={};s[i.barPropertyTotal()]=e.totalValue,s[i.barPropertyValue()]=e.newValue,i.lifeDataByKey[r]=s;let a=i.getObjectByKey(r);return a?(this.drawObjectLifeBar(a,e[n.DATA_OWNER_KEY],e.totalValue,e.newValue,i),!0):(t&&i.queueLifeBarMessage(e),!1)}static isValidMessage(e,t){return n.DATA_TYPE_VALUE_OBJECT===e[n.DATA_OWNER_TYPE]&&t.barConfig.showEnemies}static drawObjectsLifeBar(e){for(let t of Object.keys(e.lifeDataByKey)){let i=e.getObjectByKey(t);this.drawObjectLifeBar(i,t,e.lifeDataByKey[t][e.barPropertyTotal()],e.lifeDataByKey[t][e.barPropertyValue()],e)}}static isValidToDraw(e,t,i){return!!e&&r.STATUS.DEATH!==e.inState&&r.STATUS.DISABLED!==e.inState&&!(i.barConfig.showOnClick&&t!==i.getCurrentTargetId())}static generateObjectLifeBar(e,t){let i=t.lifeDataByKey[e];if(!i)return!1;let n=t.getObjectByKey(e);this.drawObjectLifeBar(n,e,i[t.barPropertyTotal()],i[t.barPropertyValue()],t)}static drawObjectLifeBar(e,t,i,n,r){if(r.destroyByKey(t),!this.isValidToDraw(e,t,r))return!1;this.drawLifeBarInPosition(r,t,e,i,n)}static drawLifeBarInPosition(e,t,i,n,r){e.lifeBars[t]=e.gameManager.getActiveScene().add.graphics();let{x:s,y:a}=this.calculateObjectLifeBarPosition(i,e);e.drawBar(e.lifeBars[t],n,r,s,a)}static calculateObjectLifeBarPosition(e,t){return{x:e.x-e.sceneSprite.width/2,y:e.y-e.sceneSprite.height/2-t.barConfig.height-t.barConfig.top}}}},{"66c72f936244bf4c":"59VA7","4fbfbb1e3b1b87b5":"93TbC"}],bNgpB:[function(e,t,i){t.exports.PlayerStatsUi=class{constructor(e){this.events=e.events}createPlayerStatsUi(){this.events.on("reldens.beforePreloadUiScene",e=>{if(!e.gameManager.config.get("client/ui/playerStats/enabled"))return!1;e.load.html("playerStats","/assets/html/ui-player-stats.html"),e.load.html("playerStat","/assets/html/player-stat.html")}),this.events.on("reldens.beforeCreateUiScene",e=>{let t=e.getUiConfig("playerStats");if(!t.enabled)return!1;let i=e.add.dom(t.uiX,t.uiY).createFromCache("playerStats"),n=i.getChildByProperty("id","player-stats-close"),r=i.getChildByProperty("id","player-stats-open");r?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="block",r.style.display="none",i.setDepth(4),this.events.emit("reldens.openUI",{ui:this,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),n?.addEventListener("click",()=>{let t=i.getChildByProperty("id","player-stats-ui");t.style.display="none",r&&(r.style.display="block"),i.setDepth(1),this.events.emit("reldens.closeUI",{ui:this,closeButton:n,openButton:r,dialogBox:i,dialogContainer:t,uiScene:e})}),e.elementsUi.playerStats=i})}}},{}],ddEMb:[function(e,t,i){t.exports={users:{optionLabel:"%playerName - LvL %currentLevel - %classPathLabel"}}},{}],jRcE9:[function(e,t,i){let{AudioManager:n}=e("541d832742a00ab5"),{SceneAudioPlayer:r}=e("fb79730c9351b42b"),{MessagesListener:s}=e("1d50534b7413d902"),{AudioUi:a}=e("c9088bc3e4085a8a"),{TranslationsMapper:o}=e("6f071ff9a7a2b90e"),h=e("818427dea57ab21c"),{PluginInterface:c}=e("21904e239c915c7f"),{AudioConst:l}=e("587f9c67cc5dcf55"),{Logger:u,sc:d}=e("d13dcc30aa283061");t.exports.AudioPlugin=class extends c{setup(e){this.events=d.get(e,"events",!1),this.events||u.error("EventsManager undefined in AudioPlugin."),this.gameManager=d.get(e,"gameManager",!1),this.gameManager||u.error("Game Manager undefined in AudioPlugin."),this.setTranslations(),this.messagesListener=new s,this.sceneAudioPlayer=r,this.initialAudiosData={},this.listenEvents()}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,h,l.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events)return!1;this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.audioManager||(t.audioManager=new n({events:this.events,currentPlayerData:e.player}),this.initialAudiosData=d.get(e,"audio",{}))}),this.events.on("reldens.joinedRoom",(e,t)=>{t.audioManager.updateDefaultConfig(t.config.getWithoutLogs("client/general/audio/defaultAudioConfig")),this.messagesListener.listenMessages(e,t)}),this.events.on("reldens.preloadUiScene",async e=>{e.load.html("audio","/assets/html/ui-audio.html"),e.load.html("audio-category","/assets/html/ui-audio-category-row.html")}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new a(e),this.uiManager.createUi()}),this.events.on("reldens.afterSceneDynamicCreate",async e=>{let t=e.gameManager.audioManager;if(!t)return!1;let i=d.get(this.initialAudiosData,"globalAudios",{});await t.loadGlobalAudios(i,e),await this.messagesListener.processQueue(),this.sceneAudioPlayer.associateSceneAnimationsAudios(t,e),e.cameras.main.on("camerafadeincomplete",()=>{this.sceneAudioPlayer.playSceneAudio(t,e)})}),this.events.on("reldens.changeSceneDestroyPrevious",e=>{e.gameManager.audioManager.destroySceneAudios()}),this.events.on("reldens.allAudiosLoaded",(e,t,i)=>{this.sceneAudioPlayer.playSceneAudio(e,i,!0)})}}},{"541d832742a00ab5":"6hRLM",fb79730c9351b42b:"4ld6d","1d50534b7413d902":"khKLI",c9088bc3e4085a8a:"a2LOL","6f071ff9a7a2b90e":"1fcQw","818427dea57ab21c":"i11rh","21904e239c915c7f":"fC3To","587f9c67cc5dcf55":"6GwZf",d13dcc30aa283061:"3lwy5"}],"6hRLM":[function(e,t,i){let{AudioConst:n}=e("326aa6ee5d80738b"),{Logger:r,sc:s}=e("bddd20eeb20a74c3");t.exports.AudioManager=class{constructor(e){this.events=s.get(e,"events",!1),this.events||r.error("EventsManager undefined in AudioManager."),this.globalAudios=s.get(e,"globalAudios",{}),this.roomsAudios=s.get(e,"roomsAudios",{}),this.categories=s.get(e,"categories",{}),this.playerConfig=s.get(e,"playerConfig",{}),this.currentPlayerData=s.get(e,"currentPlayerData",{}),this.playing={},this.currentMuteState=!1,this.changedMutedState={},this.lockedMuteState=!1,this.defaultAudioConfig={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!0,delay:0}}async setAudio(e,t){if(this.lockedMuteState)return r.info("Locked mute state to set audio."),!1;await this.events.emit("reldens.setAudio",{audioManager:this,categoryKey:e,enabled:t});let i=this.categories[e];if(this.playerConfig[i.id]=t?1:0,!s.hasOwn(this.playing,e))return!0;let n=t?"play":"stop",a=this.playing[e];return i.single_audio&&s.isObjectFunction(a,n)?this.setAudioForSingleEntity(a,n,e,t):this.setAudioForElementChildren(a,i,t)}setAudioForSingleEntity(e,t,i,n){if(!e)return r.error("Missing playingElement.",{audioKey:i,playingElement:e}),!1;if(!e.currentConfig)return!1;if(!s.isObjectFunction(e,t))return r.error("Missing playOrStop method in playingElement.",{audioKey:i,playOrStop:t,playingElement:e}),!1;try{e[t](),e.mute=!n}catch(n){r.error("PlayingElement error.",{audioKey:i,playOrStop:t,playingElement:e,error:n})}return!0}setAudioForElementChildren(e,t,i){if(t.single_audio)return!1;let n=Object.keys(e);if(0===n.length)return!1;for(let t of n)this.setAudioForSingleEntity(e[t],"stop",t,i);return!0}generateAudio(e,t){let i=Object.assign({},this.defaultAudioConfig,t.config||{});if(!s.hasOwn(e.cache.audio.entries.entries,t.audio_key))return r.error("Audio file does not exists. Audio key: "+t.audio_key,e.cache.audio.entries.entries),!1;let n=e.sound.add(t.audio_key,i);if(t.markers&&0{if(a!==e.audio_key)return!1;let o=this.generateAudio(i,e);if(!1===o)return r.error("AudioLoader can not generate the audio.",{"Audio key:":e.audio_key,"Storage key:":n}),!1;"roomsAudios"===n?this.roomsAudios[i.key][e.audio_key]=o:this.globalAudios[e.audio_key]=o,s++,await this.fireAudioEvents(t,i,e,s)}),h.start()}}async existsFileByXMLHttpRequest(e){try{let t=await fetch(e,{method:"HEAD"});return 404!==t.status}catch(e){return r.error("Error fetching:",e),!1}}async prepareFiles(e){let t=e.files_name.split(","),i=[];for(let e of t){let t=n.AUDIO_BUCKET+"/"+e;!1!==await this.existsFileByXMLHttpRequest(t)&&i.push(t)}return i}async fireAudioEvents(e,t,i,n){await t.gameManager.events.emit("reldens.audioLoaded",this,e,t,i),n===e.length&&await t.gameManager.events.emit("reldens.allAudiosLoaded",this,e,t,i)}removeAudiosFromScene(e,t){if(0===e.length||!t)return!1;for(let i of e)this.removeSceneAudioByAudioKey(t,i.audio_key);return!0}removeSceneAudioByAudioKey(e,t){e.sound.removeByKey(t),s.hasOwn(e.cache.audio.entries.entries,t)&&delete e.cache.audio.entries.entries[t],s.hasOwn(this.roomsAudios[e.key],t)&&delete this.roomsAudios[e.key][t],s.hasOwn(this.globalAudios,t)&&delete this.globalAudios[t]}updateDefaultConfig(e){s.isObject(e)&&Object.assign(this.defaultAudioConfig,e)}async processUpdateData(e,t,i){e.playerConfig&&(this.playerConfig=e.playerConfig),e.categories&&(this.addCategories(e.categories),await this.events.emit("reldens.audioManagerUpdateCategoriesLoaded",this,t,i,e));let n=s.get(e,"audios",{});if(0{if(t.children.list.length<=0)return!1;for(let i of t.children.list)"Sprite"===i.type&&(i.on("animationstart",r=>{let s=n.AUDIO_ANIMATION_KEY_START+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationupdate",r=>{let s=n.AUDIO_ANIMATION_KEY_UPDATE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationcomplete",r=>{let s=n.AUDIO_ANIMATION_KEY_COMPLETE+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationrepeat",r=>{let s=n.AUDIO_ANIMATION_KEY_REPEAT+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}),i.on("animationstop",r=>{let s=n.AUDIO_ANIMATION_KEY_STOP+r.key,a=this.attachAudioToSprite(i,s,e,t);!1!==a&&this.playSpriteAudio(a,t,i,e)}))})}attachAudioToSprite(e,t,i,n){return s.hasOwn(e.associatedAudio,t)||(s.hasOwn(e,"associatedAudio")||(e.associatedAudio={}),s.hasOwn(e.associatedAudio,t)||(e.associatedAudio[t]=i.findAudio(t,n.key))),e.associatedAudio[t]}playSpriteAudio(e,t,i,n){let a=Number(n.currentPlayerData.id),o=Number(s.get(i,"player_id")),h=this.isCurrentPlayerSprite(o,a);if(e.audio.data.config?.onlyCurrentPlayer&&!h)return!1;let c=t.player;if(h&&c&&(c.isDisabled()||c.isDeath()))return!1;if(!e||!e.audio||!e.audio.data)return r.error("Missing associated audio data.",e),!1;let l=e.audio.data.category.category_key,u=s.get(n.categories,l,!1),d=s.get(n.playerConfig,u.id,u.enabled);if(!u||!d)return!1;let f=e.audio.audioInstance;if(u.single_audio&&s.isObjectFunction(n.playing[u.category_key],"stop")&&n.playing[u.category_key].stop(),u.single_audio)return n.playing[u.category_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(!u.single_audio){if(!e.marker)return n.playing[u.category_key][e.audio.data.audio_key]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(),!0);if(e.marker)return n.playing[u.category_key][e.marker]=f,!this.isMutedState(n,u.category_key,f)&&(f.mute=!1,f.play(e.marker),!0)}}isCurrentPlayerSprite(e,t){return e&&e===t}isMutedState(e,t,i){return!1!==e.currentMuteState&&(r.info("AudioManager in muted state to play audio.",{mutedKey:t,audioInstance:i}),e.changedMutedState[t]=e.currentMuteState,!0)}}},{"30220416ce7546a9":"6GwZf",f35c0a4a20893403:"3lwy5"}],khKLI:[function(e,t,i){let{AudioConst:n}=e("f38271dbda4592b9");t.exports.MessagesListener=class{constructor(){this.queueMessages=[],this.sceneReady=!1}listenMessages(e,t){e.onMessage("*",async i=>{await this.processMessage(i,e,t)})}async processQueue(){if(this.sceneReady=!0,0===this.queueMessages.length)return!1;for(let e of this.queueMessages){let{message:t,room:i,gameManager:n}=e;await this.processMessage(t,i,n)}return!0}async processMessage(e,t,i){!1===this.sceneReady&&this.queueMessages.push({message:e,room:t,gameManager:i}),e.act===n.AUDIO_UPDATE&&await i.audioManager.processUpdateData(e,t,i),e.act===n.AUDIO_DELETE&&await i.audioManager.processDeleteData(e,t,i)}}},{f38271dbda4592b9:"6GwZf"}],a2LOL:[function(e,t,i){let{SceneAudioPlayer:n}=e("d9b7615cb55a6656"),{AudioUpdate:r}=e("9bae50dfe6fad086"),{sc:s}=e("fc209b9537d685a9");t.exports.AudioUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.audioManager=this.gameManager.audioManager,this.sceneAudioPlayer=n}createUi(){if(!this.audioManager.categories)return;let e=this.uiScene.cache.html.get("audio"),t=this.uiScene.cache.html.get("audio-category"),i=this.prepareAudioSettingsContent(t,e);this.gameManager.gameDom.appendToElement("#settings-dynamic",i);let n=this.gameManager.gameDom.getElements(".audio-setting");if(0===n.length)return!1;for(let e of n)e.addEventListener("click",async t=>{await this.audioManager.setAudio(t.target.dataset.categoryKey,e.checked),this.gameManager.activeRoomEvents.send(new r(e.value,e.checked)),this.sceneAudioPlayer.playSceneAudio(this.audioManager,this.gameManager.getActiveScene())})}prepareAudioSettingsContent(e,t){let i=this.prepareCategoriesRows(e);return this.gameManager.gameEngine.parseTemplate(t,{audioCategories:i,settingsTitle:this.gameManager.services.translator.t("audio.settingsTitle")})}prepareCategoriesRows(e){let t="";for(let i of Object.keys(this.audioManager.categories)){let n=this.audioManager.categories[i],r=s.get(this.audioManager.playerConfig,n.id,n.enabled);t+=this.gameManager.gameEngine.parseTemplate(e,{categoryId:n.id,categoryLabel:n.category_label,categoryKey:n.category_key,categoryChecked:r?' checked="checked"':""})}return t}}},{d9b7615cb55a6656:"4ld6d","9bae50dfe6fad086":"ibm3l",fc209b9537d685a9:"3lwy5"}],ibm3l:[function(e,t,i){let{AudioConst:n}=e("206716204b95df4c"),{GameConst:r}=e("c7ddf895e347bc66");t.exports.AudioUpdate=class{constructor(e,t){this[r.ACTION_KEY]=n.AUDIO_UPDATE,this[n.MESSAGE.DATA.UPDATE_TYPE]=e,this[n.MESSAGE.DATA.UPDATE_VALUE]=t}}},{"206716204b95df4c":"6GwZf",c7ddf895e347bc66:"93TbC"}],i11rh:[function(e,t,i){t.exports={audio:{settingsTitle:"Audio Settings"}}},{}],"3yQhR":[function(e,t,i){let{ActionsConst:n}=e("1e41f2c4a061523b"),{RoomsConst:r}=e("c28085823a93fbc9"),{PluginInterface:s}=e("6710f6d3bb0219bd"),{Logger:a,sc:o}=e("4de0a3d14a3e7a84");t.exports.RoomsPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.gameManager||a.error("Game Manager undefined in RoomsPlugin."),this.events=o.get(e,"events",!1),this.events||a.error("EventsManager undefined in RoomsPlugin."),this.events.on("reldens.beforeCreateEngine",(e,t)=>{t.config.get("client/rooms/selection/allowOnLogin",!1)&&e.roomSelection&&this.populateSceneSelector(e.roomSelection,t)}),this.events.on("reldens.onPrepareSinglePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerSelectorFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)}),this.events.on("reldens.onPreparePlayerCreationFormSubmit",e=>{this.appendSelectedScene(e.gameManager,e.form)})}populateSceneSelector(e,t){let i=t.gameDom.getElement(n.SELECTORS.PLAYER_CREATION_ADDITIONAL_INFO),r=t.gameDom.getElement(n.SELECTORS.PLAYER_SELECTION_ADDITIONAL_INFO);if(!i&&!r)return a.warning("Missing element.",{playerCreationAdditional:i,playerSelectionAdditional:r}),!1;if(i){let n=this.filterCreationRooms(e),r=this.createSelectorElements(t,n,"creation");i.append(r)}if(r){let i=this.createSelectorElements(t,e,"selection");r.append(i)}}filterCreationRooms(e){let t=[];for(let i of e)i.name!==r.ROOM_LAST_LOCATION_KEY&&t.push(i);return t}appendSelectedScene(e,t){let i=e.gameDom.getElement(".scene-select",t);if(!i)return;let n=i.options[i.selectedIndex].value;n&&(e.initialGameData.selectedScene=n)}createSelectorElements(e,t,i){let n=e.gameDom.createElement("div");n.classList.add("input-box");let r=e.gameDom.createElement("label");r.htmlFor=i+"SelectedScene",r.innerText=this.gameManager.services.translator.t("game.pleaseSelectScene");let s=e.gameDom.createElement("select");for(let e of(s.name=i+"SelectedScene",s.id=i+"SelectedScene",s.classList.add("select-element"),s.classList.add("scene-select"),t)){let t=new Option(e.title,e.name);s.append(t)}return n.append(r),n.append(s),n}}},{"1e41f2c4a061523b":"59VA7",c28085823a93fbc9:"9vHHC","6710f6d3bb0219bd":"fC3To","4de0a3d14a3e7a84":"3lwy5"}],"80hlx":[function(e,t,i){let{PredictionWorldCreator:n}=e("1f99afae6127aa6e"),{RoomEventsOverride:r}=e("fd23b82a5f097c7a"),{PluginInterface:s}=e("eb3ab2d7c28717c2"),{Logger:a,sc:o}=e("fc917919e6e14072");t.exports.PredictionPlugin=class extends s{setup(e){this.gameManager=o.get(e,"gameManager",!1),this.events=o.get(e,"events",!1),this.predictionWorldCreator=new n,this.roomEventsOverride=new r,this.validateProperties()&&this.listenEvents()}validateProperties(){return this.gameManager?!!this.events||(a.error("EventsManager undefined in PredictionPlugin."),!1):(a.error("Game Manager undefined in PredictionPlugin."),!1)}listenEvents(){this.events.on("reldens.createEngineSceneDone",async e=>{await this.predictionWorldCreator.createSceneWorld(e.currentScene)}),this.events.on("reldens.createdRoomsEventsInstance",(e,t)=>{this.roomEventsOverride.createCurrentPlayerOverride(t.activeRoomEvents),this.roomEventsOverride.playerOnChangeOverride(t.activeRoomEvents),this.roomEventsOverride.createPlayerEngineInstanceOverride(t.activeRoomEvents),this.roomEventsOverride.createSceneInstanceOverride(t.activeRoomEvents)})}}},{"1f99afae6127aa6e":"4rqFy",fd23b82a5f097c7a:"4xzUf",eb3ab2d7c28717c2:"fC3To",fc917919e6e14072:"3lwy5"}],"4rqFy":[function(e,t,i){let{CollisionsManager:n}=e("804590972ed05c20"),{P2world:r}=e("398044c66c46a0d1"),{WorldPointsValidator:s}=e("1ceec76f8d305544"),{WorldTimer:a}=e("6582f8b293532f90"),{Logger:o,sc:h}=e("8c1495bc004bacd5");t.exports.PredictionWorldCreator=class{async createSceneWorld(e){if(!e.experimentalClientPrediction)return;let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomMap,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.worldPrediction=this.createWorldInstance(r),e.worldPrediction.createLimits(),await e.worldPrediction.createWorldContent({});let h=e.gameManager.getCurrentPlayer();if(!h){o.error("Current player not present for prediction.");return}let c={id:h.playerId,width:e.configManager.get("client/players/physicalBody/width"),height:e.configManager.get("client/players/physicalBody/height"),bodyState:h.state},l=e.worldPrediction.createPlayerBody(c);l.updateBodyState=this.updateBodyStateOverride(l,h),h.predictionBody=l,e.worldPredictionTimer=new a({callbacks:[()=>{if(!e.worldPrediction){o.error("Scene World not longer exists.",e.roomWorld);return}e.worldPrediction.removeBodiesFromWorld()}]}),e.worldPredictionTimer.startWorldSteps(e.worldPrediction),e.collisionsManager=new n({roomWorld:e.worldPrediction}),h.pointsValidator=new s(i.width,i.height)}cloneMapJson(e,t){return Object.assign({},e.cache?.tilemap?.entries?.entries[e.tileset.name]?.data||{},{layers:t})}findValidLayers(e){let t=[];for(let i of e.cache.tilemap.entries.entries[e.tileset.name].data.layers)-1!==i.name.indexOf("collision")&&t.push(i);return t}updateBodyStateOverride(e,t){return()=>{if(!h.hasOwn(e.bodyState,"x")||!h.hasOwn(e.bodyState,"y")||!e.position[0]||!e.position[1])return;if(e.isNotMoving()){e.bodyState.mov=!1;return}e.bodyState.x!==e.position[0]&&(e.bodyState.x=e.position[0]),e.bodyState.y!==e.position[1]&&(e.bodyState.y=e.position[1]);let i=0!==Number(Number(e.velocity[0]).toFixed(2))||0!==Number(e.velocity[1].toFixed(2));e.bodyState.mov!==i&&(e.bodyState.mov=i);let n={x:e.position[0],y:e.position[1],dir:e.bodyState.dir};t.updatePlayer(t.playerId,{state:n})}}createWorldInstance(e){return new r(e)}}},{"804590972ed05c20":"dlIjw","398044c66c46a0d1":"hvh2r","1ceec76f8d305544":"e44so","6582f8b293532f90":"5zAcU","8c1495bc004bacd5":"3lwy5"}],dlIjw:[function(e,t,i){let{PhysicalBody:n}=e("8b976b60c28092e0"),{ErrorManager:r,Logger:s,sc:a}=e("92f5971959d19587");t.exports.CollisionsManager=class{constructor(e){this.activateCollisions(e)}activateCollisions(e){e&&(this.room=e,a.hasOwn(this.room,"roomWorld")||r.error("Room world not found."),this.guestEmailDomain=this.room.config.getWithoutLogs("server/players/guestsUser/emailDomain"),this.room.roomWorld.on("postBroadphase",this.onWorldStepStart.bind(this)),this.room.roomWorld.on("preSolve",this.beforeResolveCollision.bind(this)),this.room.roomWorld.on("beginContact",this.onCollisionsBegin.bind(this)),this.room.roomWorld.on("endContact",this.onCollisionsEnd.bind(this)))}onWorldStepStart(e){let{pairs:t}=e;if(1>=t.length)return;let i=!1,n=!1,r=!1,s=!1;for(let e of t)e.playerId&&e.pStop&&e.stopFull(),e.roomObject&&e.pStop&&e.stopFull(),e.playerId&&(r=e),e.isBullet&&(i&&!n&&(n=e),i||(i=e),e.removeInvalidStateBulletBody()),e.isRoomObject&&!e.isBullet&&(s=e);this.room.roomWorld.bulletsStopOnPlayer&&r&&i&&r.stopFull(),this.room.roomWorld.bulletsStopOnObject&&s&&i&&s.stopFull(),this.removeIdleBullets()}removeIdleBullets(){if(0!==this.room.roomWorld.removeBulletsStateIds.length)for(let e of this.room.roomWorld.removeBulletsStateIds)this.room.state.removeBody(e),this.room.roomWorld.removeBulletsStateIds.splice(this.room.roomWorld.removeBulletsStateIds.indexOf(e),1)}beforeResolveCollision(e){if(this.room.roomWorld.allowPassWallsFromBelow)for(let t of e.contactEquations){let e=this.getPlayerBody(t),i=this.getWallBody(t);if(!e||!i||i.isWorldWall)return;e.position[1]>i.position[1]&&(t.enabled=!1)}}onCollisionsBegin(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return t.playerId&&i.playerId?this.playerHitPlayerBegin(t,i):(t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectBegin(n,r):n&&r.changeScenePoint?this.playerHitChangePointBegin(n,r):n&&r.isWall?this.playerHitWallBegin(n,r):t.isRoomObject&&i.isRoomObject?this.objectHitObjectBegin(t,i):void(t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall&&this.objectHitWallBegin(s,r))}onCollisionsEnd(e){let t=e.bodyA,i=e.bodyB,n=!1,r=!1,s=!1;return(e.bodyA.playerId&&e.bodyB.playerId&&this.playerHitPlayerEnd(e.bodyA,e.bodyB),t.playerId&&(n=t,r=i),i.playerId&&(n=i,r=t),n&&r.isRoomObject)?this.playerHitObjectEnd(n,r):n&&r.isWall?this.playerHitWallEnd(n,r):(t.isRoomObject&&i.isRoomObject&&this.objectHitObjectEnd(t,i),t.isRoomObject&&(s=t,r=i),i.isRoomObject&&(s=i,r=t),s&&r.isWall)?this.objectHitWallEnd(s,r):void 0}playerHitPlayerBegin(e,t){this.room.events.emit("reldens.playerHitPlayer",{bodyA:e,bodyB:t})}playerHitPlayerEnd(e,t){e.stopFull(),t.stopFull(),this.room.events.emit("reldens.playerHitPlayerEnd",{bodyA:e,bodyB:t})}playerHitObjectBegin(e,t){this.room.events.emit("reldens.startPlayerHitObjectBegin",{playerBody:e,otherBody:t}),this.findAlternativePath(e),t.roomObject&&a.isFunction(t.roomObject.onHit)&&t.roomObject.onHit({bodyA:e,bodyB:t,room:this.room}),this.room.events.emit("reldens.endPlayerHitObjectBegin",{playerBody:e,otherBody:t})}playerHitObjectEnd(e,t){let i={stopFull:!0,continue:!0};if(this.room.events.emit("reldens.playerHitObjectEnd",{playerBody:e,result:i}),!i.continue)return!1;e.stopFull(i.stopFull)}playerHitWallBegin(e,t){this.room.events.emit("reldens.playerHitWallBegin",{playerBody:e,wallBody:t})}playerHitWallEnd(e,t){if(this.room.events.emit("reldens.startPlayerHitWallEnd",{playerBody:e,wallBody:t}),e.autoMoving&&1{s.error("There was an error while setting the next scene initial position.",e)}),this.room.events.emit("reldens.endPlayerHitChangePoint",{collisionsManager:this,playerSchema:i,playerBody:e,changePoint:t,changeData:h})}objectHitObjectBegin(e,t){this.room.events.emit("reldens.startObjectHitObject",{bodyA:e,bodyB:t});let i=a.hasOwn(e,"hitPriority"),n=a.hasOwn(t,"hitPriority"),r={bodyA:e,bodyB:t,room:this.room},s=(i||n)&&(!i||n&&!(i>n))?t:e;s.roomObject&&a.isFunction(s.roomObject?.onHit)&&s.roomObject.onHit(r),e.isBullet&&e.roomObject.removeBullet(e),t.isBullet&&t.roomObject.removeBullet(t),this.findAlternativePath(e),this.findAlternativePath(t),this.room.events.emit("reldens.endObjectHitObject",{bodyA:e,bodyB:t,priorityObject:s})}objectHitObjectEnd(e,t){this.bodyFullStop(e),this.bodyFullStop(t),this.room.events.emit("reldens.objectHitObjectEnd",{bodyA:e,bodyB:t})}objectHitWallBegin(e,t){let i={objectBody:e,wall:t,continue:!0};return this.room.events.emit("reldens.objectHitWallBegin",i),i.continue&&e.isBullet&&e.roomObject.removeBullet(e),i}objectHitWallEnd(e){this.room.events.emit("reldens.startObjectHitWall",{objectBody:e}),this.resetObjectAutoMove(e),this.room.events.emit("reldens.endObjectHitWall",{objectBody:e})}bodyFullStop(e){if(!e)return!1;!(e.autoMoving&&0Math.abs(this.velocity[0])?0:o.roundToPrecision(this.velocity[0],4),this.velocity[1]=1e-4>Math.abs(this.velocity[1])?0:o.roundToPrecision(this.velocity[1],4),.001>Math.abs(this.velocity[0])&&this.stopX(),.001>Math.abs(this.velocity[1])&&this.stopY(),this.updateBodyState()}speedToNext(){if(!this.autoMoving||0===this.autoMoving.length){this.setShapesCollisionGroup(this.originalCollisionGroup);return}if(!this.autoMoving[0]){a.error("Missing autoMoving first index."),this.setShapesCollisionGroup(this.originalCollisionGroup);return}let e=this.autoMoving[0][0],t=this.autoMoving[0][1];if(0!==this.speedToNextRetryCounter.col&&this.speedToNextRetryCounter.col===e&&0!==this.speedToNextRetryCounter.row&&this.speedToNextRetryCounter.row===t&&0!==this.velocity[0]&&0!==this.velocity[1]&&this.speedToNextRetryCounter.retries++,this.speedToNextMaxRetries===this.speedToNextRetryCounter.retries){this.speedToNextRetryCounter.col=0,this.speedToNextRetryCounter.row=0;let e=this.autoMoving.shift(),t=this.autoMoving.pop();this.stopFull(!0),this.alignToTile(),this.autoMoving=this.getPathFinder().findPath(e,t),this.speedToNextRetryCounter.retries=0;return}if(this.speedToNextRetryCounter.col=e,this.speedToNextRetryCounter.row=t,this.currentCol===e&&this.currentRow===t){this.autoMoving.shift(),0===this.autoMoving.length&&this.stopAutoMoving();return}this.currentCol===e&&0!==this.velocity[0]&&(this.stopX(),this.alignToTile()),this.currentCol>e&&this.initMove(s.LEFT,!0),this.currentColt&&this.initMove(s.UP,!0),this.currentRow=Math.abs(i)&&.01>=Math.abs(n)&&(this.position[0]=e,this.position[1]=t)}updateBodyState(){if(!o.hasOwn(this.bodyState,"x")||!o.hasOwn(this.bodyState,"y"))return;if(this.isNotMoving()){this.bodyState.mov=!1;return}let e=o.roundToPrecision(this.position[0],0),t=o.roundToPrecision(this.position[1],0);if(!e||!t)return;this.bodyState.x!==e&&(this.bodyState.x=o.roundToPrecision(e,this.worldPositionPrecision)),this.bodyState.y!==t&&(this.bodyState.y=o.roundToPrecision(t,this.worldPositionPrecision));let i=o.roundToPrecision(this.velocity[0],this.worldSpeedPrecision),n=o.roundToPrecision(this.velocity[1],this.worldSpeedPrecision);this.bodyState.mov=0!==i||0!==n,this.removeInvalidStateBulletBody()}bodyLogKey(){return this.playerId?"PJ-"+this.playerId:this.bodyState?.key}removeInvalidStateBulletBody(){this.isBullet&&(this.isOutOfWorldBounds()||this.hasInvalidSpeed())&&(this.world.removeBodies.push(this),this.bodyStateId&&this.world.removeBulletsStateIds.push(this.bodyStateId))}hasInvalidSpeed(){if(!this.applySpeedThresholdOnBullets&&this.isBullet)return!1;let e=this.isBullet?this.originalSpeed.x:this.movementSpeed,t=this.isBullet?this.originalSpeed.x:this.movementSpeed,i=e*this.speedThreshold,n=t*this.speedThreshold;return Math.abs(this.velocity[0])this.position[0]||this.position[0]>this.worldWidth*this.worldTileWidth||0>this.position[1]||this.position[1]>this.worldHeight*this.worldTileHeight}isNotMoving(){let e=this.movementSpeed*this.speedThreshold,t=o.roundToPrecision(this.velocity[0]),i=o.roundToPrecision(this.velocity[1]);if(0!==this.velocity[0]&&Math.abs(t)this.velocity[0]?-1:1,n=0===this.velocity[1]?0:0>this.velocity[1]?-1:1;e===s.RIGHT&&(i=1),e===s.LEFT&&(i=-1),e===s.UP&&(n=-1),e===s.DOWN&&(n=1);let r=this.normalizeSpeed(i,n);this.velocity[0]=t*i*r,this.velocity[1]=t*n*r,(e===s.RIGHT||e===s.LEFT)&&this.validateAndSetDirection(e,this.diagonalHorizontal,this.velocity[1]),(e===s.UP||e===s.DOWN)&&this.validateAndSetDirection(e,!this.diagonalHorizontal,this.velocity[0])}moveUp(e){if(!this.world.applyGravity){this.velocity[1]=-e;return}this.canJump()&&(this.velocity[1]=-this.jumpSpeed,setTimeout(()=>{this.stopY()},this.jumpTimeMs))}calculateMagnitude(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}checkNonZeroComponents(e,t){return Math.abs(e)>0||Math.abs(t)>0}normalizeSpeed(e,t){return this.checkNonZeroComponents(e,t)?1/this.calculateMagnitude(e,t):0}validateAndSetDirection(e,t,i){(this.animationBasedOnPress||this.bodyState.autoDirection)&&(t||0===i)&&(this.bodyState.dir=e)}stopMove(){this.world&&this.world.applyGravity?this.stopX():this.stopFull()}stopFull(e=!1){this.velocity[0]=0,this.world?.applyGravity||(this.velocity[1]=0),this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopX(e=!1){this.velocity[0]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}stopY(e=!1){this.velocity[1]=0,this.angularVelocity=0,this.angularForce=0,this.pStop=e}moveToPoint(e){this.resetAuto(),this.updateCurrentPoints();let t=[this.currentCol,this.currentRow],i=[e.column,e.row],n=this.getPathFinder();return n?(this.autoMoving=n.findPath(t,i),this.autoMoving||(this.setShapesCollisionGroup(this.originalCollisionGroup),this.stopMove()),this.autoMoving):(this.setShapesCollisionGroup(this.originalCollisionGroup),!1)}updateCurrentPoints(){if(!this.world)return;let{currentCol:e,currentRow:t}=this.positionToTiles(this.position[0],this.position[1]);return this.originalCol||(this.originalCol=e),this.originalRow||(this.originalRow=t),this.currentCol=e,this.currentRow=t,this}moveToOriginalPoint(){if(this.originalCol&&this.originalRow||this.updateCurrentPoints(),this.disableObjectsCollisionsOnReturn&&this.setShapesCollisionGroup(0),this.stopFull(),0===this.moveToOriginalPointWithDelay){this.moveToPoint({column:this.originalCol,row:this.originalRow});return}this.moveToOriginalPointTimer=setTimeout(()=>{this.moveToPoint({column:this.originalCol,row:this.originalRow})},this.moveToOriginalPointWithDelay)}setShapesCollisionGroup(e){if(this.lastSetCollisionGroup!==e)for(let t of(this.lastSetCollisionGroup=e,this.shapes))t.collisionGroup=e}canJump(){for(let e of this.world.narrowphase.contactEquations){let t=e.bodyA===this?e.bodyA:e.bodyB,i=e.bodyA.isWall?e.bodyA:e.bodyB;if(t.playerId&&0<=Number(Number(t.velocity[1]).toFixed(2))&&i.isWall&&!i.isWorldWall&&t.position[1]=0?i>this.worldWidth?this.worldWidth:i:0;let n=Math.round((t-this.worldTileHeight/2)/this.worldTileHeight);return{currentCol:i,currentRow:n=n>=0?n>this.worldHeight?this.worldHeight:n:0}}getPathFinder(){return this.pathFinder?this.pathFinder:this.world?.pathFinder}get worldTileWidth(){return this.world?.mapJson?.tilewidth}get worldTileHeight(){return this.world?.mapJson?.tileheight}get worldWidth(){return this.world?.mapJson?.width}get worldHeight(){return this.world?.mapJson?.height}}},{"3304f256e9e76c94":"6bkiu","37df9b723b227260":"93TbC","924061961623cd99":"3lwy5"}],"6bkiu":[function(e,t,i){Object.defineProperty(t.exports={AABB:e("684b4c2f51a7982f"),AngleLockEquation:e("bdffc69900b9d197"),Body:e("3f75664c0e64d6f0"),Broadphase:e("6a91eca7403fbf23"),Capsule:e("856d4f0d9932be15"),Circle:e("2ed19d42da3c562d"),Constraint:e("aa927dde400e3497"),ContactEquation:e("2d074b8afa958c13"),ContactEquationPool:e("c3b18056b7840eb7"),ContactMaterial:e("95c5dc13a3c7c260"),Convex:e("ac59578c032edc9f"),DistanceConstraint:e("5c90feeb31df3d5e"),Equation:e("f8f4511fa21776ff"),EventEmitter:e("c3d3b3771d6558ce"),FrictionEquation:e("cab660c3bd983ee4"),FrictionEquationPool:e("87607de358c9c21"),GearConstraint:e("90a946d116b90b53"),GSSolver:e("6894c0e11a66902e"),Heightfield:e("4b3b7392ecef1240"),Line:e("1e20d14367f50060"),LockConstraint:e("fdc7a4304d635ff8"),Material:e("2ead159ba8c055f3"),Narrowphase:e("9e6fca932dff920d"),NaiveBroadphase:e("b1c0219aba2108d9"),Particle:e("9633119b46909ded"),Plane:e("4f144cae12074657"),Pool:e("a996dbee78852c0f"),RevoluteConstraint:e("34cc4dd48e1d0bad"),PrismaticConstraint:e("53d36735aa65530e"),Ray:e("1d4b6783af535b58"),RaycastResult:e("f9b0bdbeada25bdf"),Box:e("1eaca10f1a6fb0c1"),RotationalVelocityEquation:e("316198d4ce4102e3"),SAPBroadphase:e("60bfc18e7e665b71"),Shape:e("1eb899949248649e"),Solver:e("3c21f4f3806b3be"),Spring:e("e3ff62163c08949b"),TopDownVehicle:e("e782a409308bbff6"),LinearSpring:e("78e7b803f9bca9ee"),RotationalSpring:e("fe49496c221554ba"),Utils:e("36b147cdc3f4bb72"),World:e("551a53932a4cfdc8"),vec2:e("19262ec940ce734e"),version:e("df51020e342624b").version},"Rectangle",{get:function(){return console.warn("The Rectangle class has been renamed to Box."),this.Box}})},{"684b4c2f51a7982f":"7Fman",bdffc69900b9d197:"jaQW1","3f75664c0e64d6f0":"1vLHz","6a91eca7403fbf23":"5ZGdm","856d4f0d9932be15":"iCu6l","2ed19d42da3c562d":"71oh9",aa927dde400e3497:"fl4d5","2d074b8afa958c13":"2hWGL",c3b18056b7840eb7:"c7vmA","95c5dc13a3c7c260":"7VedP",ac59578c032edc9f:"jXoGk","5c90feeb31df3d5e":"eMph3",f8f4511fa21776ff:"kSmDE",c3d3b3771d6558ce:"3wc90",cab660c3bd983ee4:"6o1RQ","87607de358c9c21":"dT2Zx","90a946d116b90b53":"c2nuE","6894c0e11a66902e":"Kc35t","4b3b7392ecef1240":"g5PHm","1e20d14367f50060":"3e8Uk",fdc7a4304d635ff8:"3C7H6","2ead159ba8c055f3":"kKj3c","9e6fca932dff920d":"bsKDm",b1c0219aba2108d9:"liK4P","9633119b46909ded":"hsc7O","4f144cae12074657":"kpexr",a996dbee78852c0f:"5lrfq","34cc4dd48e1d0bad":"aOW07","53d36735aa65530e":"iK7mQ","1d4b6783af535b58":"3aaBs",f9b0bdbeada25bdf:"bK4Qs","1eaca10f1a6fb0c1":"1uf32","316198d4ce4102e3":"dpMuH","60bfc18e7e665b71":"cJxaR","1eb899949248649e":"fyiLV","3c21f4f3806b3be":"cslpB",e3ff62163c08949b:"cXKmN",e782a409308bbff6:"cQjmW","78e7b803f9bca9ee":"4chxn",fe49496c221554ba:"j6tWA","36b147cdc3f4bb72":"7sQcP","551a53932a4cfdc8":"5xqPb","19262ec940ce734e":"geg3A",df51020e342624b:"aPywz"}],"7Fman":[function(e,t,i){var n=e("b3f1d8665c8114ff");function r(e){this.lowerBound=n.create(),e&&e.lowerBound&&n.copy(this.lowerBound,e.lowerBound),this.upperBound=n.create(),e&&e.upperBound&&n.copy(this.upperBound,e.upperBound)}e("def10f340a350e0e"),t.exports=r;var s=n.create();r.prototype.setFromPoints=function(e,t,i,r){var a=this.lowerBound,o=this.upperBound;"number"!=typeof i&&(i=0),0!==i?n.rotate(a,e[0],i):n.copy(a,e[0]),n.copy(o,a);for(var h=Math.cos(i),c=Math.sin(i),l=1;lo[p]&&(o[p]=u[p]),u[p]i&&(this.lowerBound[t]=i);var n=e.upperBound[t];this.upperBound[t]h?-1:o}},{b3f1d8665c8114ff:"geg3A",def10f340a350e0e:"7sQcP"}],geg3A:[function(e,t,i){var n=t.exports={},r=e("d83d88b709f376af");n.crossLength=function(e,t){return e[0]*t[1]-e[1]*t[0]},n.crossVZ=function(e,t,i){return n.rotate(e,t,-Math.PI/2),n.scale(e,e,i),e},n.crossZV=function(e,t,i){return n.rotate(e,i,Math.PI/2),n.scale(e,e,t),e},n.rotate=function(e,t,i){if(0!==i){var n=Math.cos(i),r=Math.sin(i),s=t[0],a=t[1];e[0]=n*s-r*a,e[1]=r*s+n*a}else e[0]=t[0],e[1]=t[1]},n.rotate90cw=function(e,t){var i=t[0],n=t[1];e[0]=n,e[1]=-i},n.toLocalFrame=function(e,t,i,r){n.copy(e,t),n.sub(e,e,i),n.rotate(e,e,-r)},n.toGlobalFrame=function(e,t,i,r){n.copy(e,t),n.rotate(e,e,r),n.add(e,e,i)},n.vectorToLocalFrame=function(e,t,i){n.rotate(e,t,-i)},n.vectorToGlobalFrame=function(e,t,i){n.rotate(e,t,i)},n.centroid=function(e,t,i,r){return n.add(e,t,i),n.add(e,e,r),n.scale(e,e,1/3),e},n.create=function(){var e=new r.ARRAY_TYPE(2);return e[0]=0,e[1]=0,e},n.clone=function(e){var t=new r.ARRAY_TYPE(2);return t[0]=e[0],t[1]=e[1],t},n.fromValues=function(e,t){var i=new r.ARRAY_TYPE(2);return i[0]=e,i[1]=t,i},n.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},n.set=function(e,t,i){return e[0]=t,e[1]=i,e},n.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},n.subtract=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},n.sub=n.subtract,n.multiply=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},n.mul=n.multiply,n.divide=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},n.div=n.divide,n.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},n.distance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},n.dist=n.distance,n.squaredDistance=function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n},n.sqrDist=n.squaredDistance,n.length=function(e){var t=e[0],i=e[1];return Math.sqrt(t*t+i*i)},n.len=n.length,n.squaredLength=function(e){var t=e[0],i=e[1];return t*t+i*i},n.sqrLen=n.squaredLength,n.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},n.normalize=function(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),e[0]=t[0]*r,e[1]=t[1]*r),e},n.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},n.str=function(e){return"vec2("+e[0]+", "+e[1]+")"},n.lerp=function(e,t,i,n){var r=t[0],s=t[1];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e},n.reflect=function(e,t,i){var n=t[0]*i[0]+t[1]*i[1];e[0]=t[0]-2*i[0]*n,e[1]=t[1]-2*i[1]*n},n.getLineSegmentsIntersection=function(e,t,i,r,s){var a=n.getLineSegmentsIntersectionFraction(t,i,r,s);return!(a<0)&&(e[0]=t[0]+a*(i[0]-t[0]),e[1]=t[1]+a*(i[1]-t[1]),!0)},n.getLineSegmentsIntersectionFraction=function(e,t,i,n){var r,s,a=t[0]-e[0],o=t[1]-e[1],h=n[0]-i[0],c=n[1]-i[1];return(r=(-o*(e[0]-i[0])+a*(e[1]-i[1]))/(-h*o+a*c),s=(h*(e[1]-i[1])-c*(e[0]-i[0]))/(-h*o+a*c),r>=0&&r<=1&&s>=0&&s<=1)?s:-1}},{d83d88b709f376af:"7sQcP"}],"7sQcP":[function(e,t,i){function n(){}t.exports=n,n.appendArray=function(e,t){if(t.length<15e4)e.push.apply(e,t);else for(var i=0,n=t.length;i!==n;++i)e.push(t[i])},n.splice=function(e,t,i){i=i||1;for(var n=t,r=e.length-i;ni&&(i=a+o)}this.boundingRadius=i},l.prototype.addShape=function(e,t,i){if(e.body)throw Error("A shape can only be added to one body.");e.body=this,t?n.copy(e.position,t):n.set(e.position,0,0),e.angle=i||0,this.shapes.push(e),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},l.prototype.removeShape=function(e){var t=this.shapes.indexOf(e);return -1!==t&&(this.shapes.splice(t,1),this.aabbNeedsUpdate=!0,e.body=null,!0)},l.prototype.updateMassProperties=function(){if(this.type===l.STATIC||this.type===l.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var e=this.shapes,t=e.length,i=this.mass/t,r=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var s=0;s0?1/r:0}this.invMass=1/this.mass,n.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}},n.create(),l.prototype.applyForce=function(e,t){if(n.add(this.force,this.force,e),t){var i=n.crossLength(t,e);this.angularForce+=i}};var f=n.create(),p=n.create(),g=n.create();l.prototype.applyForceLocal=function(e,t){t=t||g,this.vectorToWorldFrame(f,e),this.vectorToWorldFrame(p,t),this.applyForce(f,p)};var m=n.create();l.prototype.applyImpulse=function(e,t){if(this.type===l.DYNAMIC&&(n.scale(m,e,this.invMass),n.multiply(m,this.massMultiplier,m),n.add(this.velocity,m,this.velocity),t)){var i=n.crossLength(t,e);i*=this.invInertia,this.angularVelocity+=i}};var v=n.create(),y=n.create(),b=n.create();l.prototype.applyImpulseLocal=function(e,t){t=t||b,this.vectorToWorldFrame(v,e),this.vectorToWorldFrame(y,t),this.applyImpulse(v,y)},l.prototype.toLocalFrame=function(e,t){n.toLocalFrame(e,t,this.position,this.angle)},l.prototype.toWorldFrame=function(e,t){n.toGlobalFrame(e,t,this.position,this.angle)},l.prototype.vectorToLocalFrame=function(e,t){n.vectorToLocalFrame(e,t,this.angle)},l.prototype.vectorToWorldFrame=function(e,t){n.vectorToGlobalFrame(e,t,this.angle)},l.prototype.fromPolygon=function(e,t){t=t||{};for(var i,a=this.shapes.length;a>=0;--a)this.removeShape(this.shapes[a]);var o=new r.Polygon;if(o.vertices=e,o.makeCCW(),"number"==typeof t.removeCollinearPoints&&o.removeCollinearPoints(t.removeCollinearPoints),void 0===t.skipSimpleCheck&&!o.isSimple())return!1;this.concavePath=o.vertices.slice(0);for(var a=0;a=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=l.AWAKE):(this.idleTime+=i,this.sleepState=l.SLEEPY),this.idleTime>this.sleepTimeLimit&&(t?this.wantsToSleep=!0:this.sleep()))},l.prototype.overlaps=function(e){return this.world.overlapKeeper.bodiesAreOverlapping(this,e)};var T=n.create(),S=n.create();l.prototype.integrate=function(e){var t=this.invMass,i=this.force,r=this.position,s=this.velocity;n.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*e),n.scale(T,i,e*t),n.multiply(T,this.massMultiplier,T),n.add(s,T,s),this.integrateToTimeOfImpact(e)||(n.scale(S,s,e),n.add(r,r,S),this.fixedRotation||(this.angle+=this.angularVelocity*e)),this.aabbNeedsUpdate=!0};var A=new a,C=new o({mode:o.ALL}),_=n.create(),I=n.create(),O=n.create(),P=n.create();l.prototype.integrateToTimeOfImpact=function(e){if(this.ccdSpeedThreshold<0||n.squaredLength(this.velocity)=c&&he.vertices.length)throw Error("lol2");if(t<0)throw Error("lol3");for(var n=t;nt[e][0])&&(e=i);r.left(this.at(e-1),this.at(e),this.at(e+1))||this.reverse()},a.prototype.reverse=function(){for(var e=[],t=0,i=this.vertices.length;t!==i;t++)e.push(this.vertices.pop());this.vertices=e},a.prototype.isReflex=function(e){return r.right(this.at(e-1),this.at(e),this.at(e+1))};var o=[],h=[];function c(e,t,i,n,r){r=r||0;var a=t[1]-e[1],o=e[0]-t[0],h=a*e[0]+o*e[1],c=n[1]-i[1],l=i[0]-n[0],u=c*i[0]+l*i[1],d=a*l-c*o;return s.eq(d,0,r)?[0,0]:[(l*h-o*u)/d,(a*u-c*h)/d]}a.prototype.canSee=function(e,t){var i,s;if(r.leftOn(this.at(e+1),this.at(e),this.at(t))&&r.rightOn(this.at(e-1),this.at(e),this.at(t)))return!1;s=r.sqdist(this.at(e),this.at(t));for(var a=0;a!==this.vertices.length;++a)if((a+1)%this.vertices.length!==e&&a!==e&&r.leftOn(this.at(e),this.at(t),this.at(a+1))&&r.rightOn(this.at(e),this.at(t),this.at(a))&&(o[0]=this.at(e),o[1]=this.at(t),h[0]=this.at(a),h[1]=this.at(a+1),i=n.lineInt(o,h),r.sqdist(this.at(e),i)0?this.slice(e):[this]},a.prototype.slice=function(e){if(0==e.length)return[this];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2==e[0].length&&e[0][0]instanceof Array){for(var t=[this],i=0;is)return console.warn("quickDecomp: max level ("+s+") reached."),e;for(var w=0;wm&&(m+=this.vertices.length),g=Number.MAX_VALUE,m3&&i>=0;--i)r.collinear(this.at(i-1),this.at(i),this.at(i+1),e)&&(this.vertices.splice(i%this.vertices.length,1),i--,t++);return t}},{d8008e40e643f58e:"4K6SZ","27760a6f627f557e":"jyNL6",edd1be50e7a94605:"7TFSV"}],"4K6SZ":[function(e,t,i){var n=e("fea8e7ecc9e8fe4");function r(){}t.exports=r,r.lineInt=function(e,t,i){i=i||0;var r,s,a,o,h,c,l,u=[0,0];return r=e[1][1]-e[0][1],s=e[0][0]-e[1][0],a=r*e[0][0]+s*e[0][1],o=t[1][1]-t[0][1],h=t[0][0]-t[1][0],c=o*t[0][0]+h*t[0][1],l=r*h-o*s,n.eq(l,0,i)||(u[0]=(h*a-s*c)/l,u[1]=(r*c-o*a)/l),u},r.segmentsIntersect=function(e,t,i,n){var r=t[0]-e[0],s=t[1]-e[1],a=n[0]-i[0],o=n[1]-i[1];if(a*s-o*r==0)return!1;var h=(r*(i[1]-e[1])+s*(e[0]-i[0]))/(a*s-o*r),c=(a*(e[1]-i[1])+o*(i[0]-e[0]))/(o*r-a*s);return h>=0&&h<=1&&c>=0&&c<=1}},{fea8e7ecc9e8fe4:"7TFSV"}],"7TFSV":[function(e,t,i){function n(){}t.exports=n,n.eq=function(e,t,i){return Math.abs(e-t)<(i=i||0)}},{}],jyNL6:[function(e,t,i){function n(){}t.exports=n,n.area=function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])},n.left=function(e,t,i){return n.area(e,t,i)>0},n.leftOn=function(e,t,i){return n.area(e,t,i)>=0},n.right=function(e,t,i){return 0>n.area(e,t,i)},n.rightOn=function(e,t,i){return 0>=n.area(e,t,i)};var r=[],s=[];n.collinear=function(e,t,i,a){return a?(r[0]=t[0]-e[0],r[1]=t[1]-e[1],s[0]=i[0]-t[0],s[1]=i[1]-t[1],Math.acos((r[0]*s[0]+r[1]*s[1])/(Math.sqrt(r[0]*r[0]+r[1]*r[1])*Math.sqrt(s[0]*s[0]+s[1]*s[1])))s)&&(s=n),(null===a||ns){var c=a;a=s,s=c}r.set(t,a,s)},a.prototype.projectOntoWorldAxis=function(e,t,i,n){var s=h;this.projectOntoLocalAxis(e,n),0!==i?r.rotate(s,e,i):s=e;var a=r.dot(t,s);r.set(n,n[0]+a,n[1]+a)},a.prototype.updateTriangles=function(){this.triangles.length=0;for(var e=[],t=0;tt&&(t=n)}this.boundingRadius=Math.sqrt(t)},a.triangleArea=function(e,t,i){return((t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1]))*.5},a.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var e=this.triangles,t=this.vertices,i=0;i!==e.length;i++){var n=e[i],r=t[n[0]],s=t[n[1]],o=t[n[2]],h=a.triangleArea(r,s,o);this.area+=h}},a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)};var p=r.create(),g=r.create(),m=r.create();a.prototype.raycast=function(e,t,i,n){var s=this.vertices;r.toLocalFrame(p,t.from,i,n),r.toLocalFrame(g,t.to,i,n);for(var a=s.length,o=0;o=0&&(r.sub(m,c,h),r.rotate(m,m,-Math.PI/2+n),r.normalize(m,m),t.reportIntersection(e,l,m,o))}}},{"841fd986776e9f0c":"fyiLV",dcb74eb19e59e896:"geg3A","84be6d54e4a9572e":"5fcbo",a884cbe4162e15c3:"5arAY"}],fyiLV:[function(e,t,i){t.exports=r;var n=e("7f0647825fa1536d");function r(e){e=e||{},this.body=null,this.position=n.fromValues(0,0),e.position&&n.copy(this.position,e.position),this.angle=e.angle||0,this.type=e.type||0,this.id=r.idCounter++,this.boundingRadius=0,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:1,this.collisionResponse=void 0===e.collisionResponse||e.collisionResponse,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:1,this.material=e.material||null,this.area=0,this.sensor=void 0!==e.sensor&&e.sensor,this.type&&this.updateBoundingRadius(),this.updateArea()}r.idCounter=0,r.CIRCLE=1,r.PARTICLE=2,r.PLANE=4,r.CONVEX=8,r.LINE=16,r.BOX=32,Object.defineProperty(r,"RECTANGLE",{get:function(){return console.warn("Shape.RECTANGLE is deprecated, use Shape.BOX instead."),r.BOX}}),r.CAPSULE=64,r.HEIGHTFIELD=128,r.prototype.computeMomentOfInertia=function(e){},r.prototype.updateBoundingRadius=function(){},r.prototype.updateArea=function(){},r.prototype.computeAABB=function(e,t,i){},r.prototype.raycast=function(e,t,i,n){}},{"7f0647825fa1536d":"geg3A"}],"5fcbo":[function(e,t,i){var n={};n.GetArea=function(e){if(e.length<6)return 0;for(var t=e.length-2,i=0,n=0;n>1;if(t<3)return[];for(var i=[],r=[],s=0;s3;){var o=r[(s+0)%a],h=r[(s+1)%a],c=r[(s+2)%a],l=e[2*o],u=e[2*o+1],d=e[2*h],f=e[2*h+1],p=e[2*c],g=e[2*c+1],m=!1;if(n._convex(l,u,d,f,p,g)){m=!0;for(var v=0;v3*a)break}return i.push(r[0],r[1],r[2]),i},n._PointInTriangle=function(e,t,i,n,r,s,a,o){var h=a-i,c=o-n,l=r-i,u=s-n,d=e-i,f=t-n,p=h*h+c*c,g=h*l+c*u,m=h*d+c*f,v=l*l+u*u,y=l*d+u*f,b=1/(p*v-g*g),x=(v*m-g*y)*b,E=(p*y-g*m)*b;return x>=0&&E>=0&&x+E<1},n._convex=function(e,t,i,n,r,s){return(t-n)*(r-i)+(i-e)*(s-n)>=0},t.exports=n},{}],bK4Qs:[function(e,t,i){var n=e("ffed16535981586e"),r=e("b8c131fd689cab6d");function s(){this.normal=n.create(),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1}t.exports=s,s.prototype.reset=function(){n.set(this.normal,0,0),this.shape=null,this.body=null,this.faceIndex=-1,this.fraction=-1,this.isStopped=!1},s.prototype.getHitDistance=function(e){return n.distance(e.from,e.to)*this.fraction},s.prototype.hasHit=function(){return -1!==this.fraction},s.prototype.getHitPoint=function(e,t){n.lerp(e,t.from,t.to,this.fraction)},s.prototype.stop=function(){this.isStopped=!0},s.prototype.shouldStop=function(e){return this.isStopped||-1!==this.fraction&&e.mode===r.ANY},s.prototype.set=function(e,t,i,r,s){n.copy(this.normal,e),this.shape=t,this.body=i,this.fraction=r,this.faceIndex=s}},{ffed16535981586e:"geg3A",b8c131fd689cab6d:"3aaBs"}],"3aaBs":[function(e,t,i){t.exports=r;var n=e("33edfb61f004dada");function r(e){e=e||{},this.from=e.from?n.fromValues(e.from[0],e.from[1]):n.create(),this.to=e.to?n.fromValues(e.to[0],e.to[1]):n.create(),this.checkCollisionResponse=void 0===e.checkCollisionResponse||e.checkCollisionResponse,this.skipBackfaces=!!e.skipBackfaces,this.collisionMask=void 0!==e.collisionMask?e.collisionMask:-1,this.collisionGroup=void 0!==e.collisionGroup?e.collisionGroup:-1,this.mode=void 0!==e.mode?e.mode:r.ANY,this.callback=e.callback||function(e){},this.direction=n.create(),this.length=1,this.update()}e("9e89c41e6357f79c"),e("197f77279886c828"),e("bb1f87d75f3ca6c0"),r.prototype.constructor=r,r.CLOSEST=1,r.ANY=2,r.ALL=4,r.prototype.update=function(){var e=this.direction;n.sub(e,this.to,this.from),this.length=n.length(e),n.normalize(e,e)},r.prototype.intersectBodies=function(e,t){for(var i=0,n=t.length;!e.shouldStop(this)&&i=0||s.containsPoint(this.from))&&this.intersectBody(e,r)}};var s=n.create();r.prototype.intersectBody=function(e,t){var i=this.checkCollisionResponse;if(!i||t.collisionResponse)for(var r=0,a=t.shapes.length;rt.boundingRadius*t.boundingRadius||(this._currentBody=s,this._currentShape=t,t.raycast(e,this,r,i),this._currentBody=this._currentShape=null)},r.prototype.getAABB=function(e){var t=this.to,i=this.from;n.set(e.lowerBound,Math.min(t[0],i[0]),Math.min(t[1],i[1])),n.set(e.upperBound,Math.max(t[0],i[0]),Math.max(t[1],i[1]))},n.create(),r.prototype.reportIntersection=function(e,t,i,s){this.from,this.to;var a=this._currentShape,o=this._currentBody;if(!(this.skipBackfaces&&n.dot(i,this.direction)>0))switch(this.mode){case r.ALL:e.set(i,a,o,t,s),this.callback(e);break;case r.CLOSEST:(t=0&&(r.rotate(h,u,n),r.scale(h,h,2*f-1),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}for(var m=Math.pow(this.radius,2)+Math.pow(d,2),f=0;f<2;f++){r.set(c,d*(2*f-1),0),r.toGlobalFrame(c,c,i,n);var v=Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2),y=2*((a[0]-s[0])*(s[0]-c[0])+(a[1]-s[1])*(s[1]-c[1])),g=Math.pow(y,2)-4*v*(Math.pow(s[0]-c[0],2)+Math.pow(s[1]-c[1],2)-Math.pow(this.radius,2));if(!(g<0)){if(0===g){if(r.lerp(o,s,a,g),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,g,h,-1),e.shouldStop(t)))return}else{var b=Math.sqrt(g),x=1/(2*v),E=(-y-b)*x,w=(-y+b)*x;if(E>=0&&E<=1&&(r.lerp(o,s,a,E),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,E,h,-1),e.shouldStop(t)))||w>=0&&w<=1&&(r.lerp(o,s,a,w),r.squaredDistance(o,i)>m&&(r.sub(h,o,c),r.normalize(h,h),t.reportIntersection(e,w,h,-1),e.shouldStop(t))))return}}}}},{"9e9977082ca4fe14":"fyiLV","18975187aa31e1cf":"geg3A"}],"71oh9":[function(e,t,i){var n=e("7b96c457d59a0d0"),r=e("b89d644e39bbe061");function s(e){"number"==typeof arguments[0]&&(e={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),e=e||{},this.radius=e.radius||1,e.type=n.CIRCLE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){var t=this.radius;return e*t*t/2},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},s.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},s.prototype.computeAABB=function(e,t,i){var n=this.radius;r.set(e.upperBound,n,n),r.set(e.lowerBound,-n,-n),t&&(r.add(e.lowerBound,e.lowerBound,t),r.add(e.upperBound,e.upperBound,t))};var a=r.create(),o=r.create();s.prototype.raycast=function(e,t,i,n){var s=t.from,h=t.to,c=this.radius,l=Math.pow(h[0]-s[0],2)+Math.pow(h[1]-s[1],2),u=2*((h[0]-s[0])*(s[0]-i[0])+(h[1]-s[1])*(s[1]-i[1])),d=Math.pow(u,2)-4*l*(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)-Math.pow(c,2));if(!(d<0)){if(0===d)r.lerp(a,s,h,d),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,d,o,-1);else{var f=Math.sqrt(d),p=1/(2*l),g=(-u-f)*p,m=(-u+f)*p;if(g>=0&&g<=1&&(r.lerp(a,s,h,g),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,g,o,-1),e.shouldStop(t)))return;m>=0&&m<=1&&(r.lerp(a,s,h,m),r.sub(o,a,i),r.normalize(o,o),t.reportIntersection(e,m,o,-1))}}}},{"7b96c457d59a0d0":"fyiLV",b89d644e39bbe061:"geg3A"}],fl4d5:[function(e,t,i){t.exports=r;var n=e("72b9dd33e1ac0322");function r(e,t,i,r){this.type=i,r=n.defaults(r,{collideConnected:!0,wakeUpBodies:!0}),this.equations=[],this.bodyA=e,this.bodyB=t,this.collideConnected=r.collideConnected,r.wakeUpBodies&&(e&&e.wakeUp(),t&&t.wakeUp())}r.prototype.update=function(){throw Error("method update() not implmemented in this Constraint subclass!")},r.DISTANCE=1,r.GEAR=2,r.LOCK=3,r.PRISMATIC=4,r.REVOLUTE=5,r.prototype.setStiffness=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.stiffness=e,n.needsUpdate=!0}},r.prototype.setRelaxation=function(e){for(var t=this.equations,i=0;i!==t.length;i++){var n=t[i];n.relaxation=e,n.needsUpdate=!0}}},{"72b9dd33e1ac0322":"7sQcP"}],"2hWGL":[function(e,t,i){var n=e("d1ef8939b96b621"),r=e("b8f27de80732e752");function s(e,t){n.call(this,e,t,0,Number.MAX_VALUE),this.contactPointA=r.create(),this.penetrationVec=r.create(),this.contactPointB=r.create(),this.normalA=r.create(),this.restitution=0,this.firstImpact=!1,this.shapeA=null,this.shapeB=null}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeB=function(e,t,i){var n,s,a=this.bodyA,o=this.bodyB,h=this.contactPointA,c=this.contactPointB,l=a.position,u=o.position,d=this.penetrationVec,f=this.normalA,p=this.G,g=r.crossLength(h,f),m=r.crossLength(c,f);return p[0]=-f[0],p[1]=-f[1],p[2]=-g,p[3]=f[0],p[4]=f[1],p[5]=m,r.add(d,u,c),r.sub(d,d,l),r.sub(d,d,h),this.firstImpact&&0!==this.restitution?(s=0,n=1/t*(1+this.restitution)*this.computeGW()):(s=r.dot(f,d)+this.offset,n=this.computeGW()),-s*e-n*t-i*this.computeGiMf()};var a=r.create(),o=r.create(),h=r.create();s.prototype.getVelocityAlongNormal=function(){return this.bodyA.getVelocityAtPoint(a,this.contactPointA),this.bodyB.getVelocityAtPoint(o,this.contactPointB),r.subtract(h,a,o),r.dot(this.normalA,h)}},{d1ef8939b96b621:"kSmDE",b8f27de80732e752:"geg3A"}],c7vmA:[function(e,t,i){var n=e("c9592f5c11436c3c"),r=e("16e85c8eda8f563e");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=null,this}},{c9592f5c11436c3c:"2hWGL","16e85c8eda8f563e":"5lrfq"}],"5lrfq":[function(e,t,i){function n(e){e=e||{},this.objects=[],void 0!==e.size&&this.resize(e.size)}t.exports=n,n.prototype.resize=function(e){for(var t=this.objects;t.length>e;)t.pop();for(;t.lengththis.upperLimit&&(a.maxForce=0,a.minForce=-this.maxForce,this.distance=this.upperLimit,u=!0),this.lowerLimitEnabled&&this.positionf*o&&(g=f*o-u),s[e]+=g,t.addToWlambda(g),g}},{"5da883f1a169a767":"geg3A","806c911d364412af":"cslpB","860c6aa487698116":"7sQcP","407b0a2d87bc3b6e":"6o1RQ"}],cslpB:[function(e,t,i){e("ead7d6ca55bdfe1c");var n=e("d16ea32444765393");function r(e,t){e=e||{},n.call(this),this.type=t,this.equations=[],this.equationSortFunction=e.equationSortFunction||!1}t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.solve=function(e,t){throw Error("Solver.solve should be implemented by subclasses!")};var s={bodies:[]};r.prototype.solveIsland=function(e,t){this.removeAllEquations(),t.equations.length&&(this.addEquations(t.equations),s.bodies.length=0,t.getBodies(s.bodies),s.bodies.length&&this.solve(e,s))},r.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},r.prototype.addEquation=function(e){e.enabled&&this.equations.push(e)},r.prototype.addEquations=function(e){for(var t=0,i=e.length;t!==i;t++){var n=e[t];n.enabled&&this.equations.push(n)}},r.prototype.removeEquation=function(e){var t=this.equations.indexOf(e);-1!==t&&this.equations.splice(t,1)},r.prototype.removeAllEquations=function(){this.equations.length=0},r.GS=1,r.ISLAND=2},{ead7d6ca55bdfe1c:"7sQcP",d16ea32444765393:"3wc90"}],g5PHm:[function(e,t,i){var n=e("8b74883bebf2335f"),r=e("2a849db0ba73e95d");function s(e){if(Array.isArray(arguments[0])){if(e={heights:arguments[0]},"object"==typeof arguments[1])for(var t in arguments[1])e[t]=arguments[1][t];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}e=e||{},this.heights=e.heights?e.heights.slice(0):[],this.maxValue=e.maxValue||null,this.minValue=e.minValue||null,this.elementWidth=e.elementWidth||.1,(void 0===e.maxValue||void 0===e.minValue)&&this.updateMaxMinValues(),e.type=n.HEIGHTFIELD,n.call(this,e)}e("2dc7f9a400756551"),t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.updateMaxMinValues=function(){for(var e=this.heights,t=e[0],i=e[0],n=0;n!==e.length;n++){var r=e[n];r>t&&(t=r),rf){var p=d;d=f,f=p}for(var g=0;g=0&&(r.sub(o,c,h),r.rotate(o,o,n+Math.PI/2),r.normalize(o,o),t.reportIntersection(e,m,o,-1),e.shouldStop(t)))return}}},{"8b74883bebf2335f":"fyiLV","2a849db0ba73e95d":"geg3A","2dc7f9a400756551":"7sQcP"}],"3e8Uk":[function(e,t,i){var n=e("e0cff235fc0213eb"),r=e("f3353cee691d66a4");function s(e){"number"==typeof arguments[0]&&(e={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),e=e||{},this.length=e.length||1,e.type=n.LINE,n.call(this,e)}t.exports=s,s.prototype=new n,s.prototype.constructor=s,s.prototype.computeMomentOfInertia=function(e){return e*Math.pow(this.length,2)/12},s.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var a=[r.create(),r.create()];s.prototype.computeAABB=function(e,t,i){var n=this.length/2;r.set(a[0],-n,0),r.set(a[1],n,0),e.setFromPoints(a,t,i,0)},r.create();var o=r.create(),h=r.create(),c=r.create(),l=r.fromValues(0,1);s.prototype.raycast=function(e,t,i,n){var s=t.from,a=t.to,u=this.length/2;r.set(h,-u,0),r.set(c,u,0),r.toGlobalFrame(h,h,i,n),r.toGlobalFrame(c,c,i,n);var d=r.getLineSegmentsIntersectionFraction(h,c,s,a);d>=0&&(r.rotate(o,l,n),t.reportIntersection(e,d,o,-1))}},{e0cff235fc0213eb:"fyiLV",f3353cee691d66a4:"geg3A"}],"3C7H6":[function(e,t,i){var n=e("97b5dc61d97fd4de"),r=e("48200108ddae2806"),s=e("6dd72d87868993d0");function a(e,t,i){i=i||{},n.call(this,e,t,n.LOCK,i);var a=void 0===i.maxForce?Number.MAX_VALUE:i.maxForce;i.localAngleB;var o=new s(e,t,-a,a),h=new s(e,t,-a,a),c=new s(e,t,-a,a),l=r.create(),u=r.create(),d=this;o.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[0]},h.computeGq=function(){return r.rotate(l,d.localOffsetB,e.angle),r.sub(u,t.position,e.position),r.sub(u,u,l),u[1]};var f=r.create(),p=r.create();c.computeGq=function(){return r.rotate(f,d.localOffsetB,t.angle-d.localAngleB),r.scale(f,f,-1),r.sub(u,e.position,t.position),r.add(u,u,f),r.rotate(p,f,-Math.PI/2),r.normalize(p,p),r.dot(u,p)},this.localOffsetB=r.create(),i.localOffsetB?r.copy(this.localOffsetB,i.localOffsetB):(r.sub(this.localOffsetB,t.position,e.position),r.rotate(this.localOffsetB,this.localOffsetB,-e.angle)),this.localAngleB=0,"number"==typeof i.localAngleB?this.localAngleB=i.localAngleB:this.localAngleB=t.angle-e.angle,this.equations.push(o,h,c),this.setMaxForce(a)}t.exports=a,a.prototype=new n,a.prototype.constructor=a,a.prototype.setMaxForce=function(e){for(var t=this.equations,i=0;iR&&M0)for(var E=0;EMath.pow(p,2))return 0;if(u)return!0;var g=this.createContactEquation(e,o,t,h);return r(g.normalA,c,i),n.normalize(g.normalA,g.normalA),n.scale(g.contactPointA,g.normalA,d),n.scale(g.contactPointB,g.normalA,-f),s(g.contactPointA,g.contactPointA,i),r(g.contactPointA,g.contactPointA,e.position),s(g.contactPointB,g.contactPointB,c),r(g.contactPointB,g.contactPointB,o.position),this.contactEquations.push(g),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(g)),1},k.prototype[f.PLANE|f.CONVEX]=k.prototype[f.PLANE|f.BOX]=k.prototype.planeConvex=function(e,t,i,o,h,c,l,u,d){var f=0;n.rotate(v,g,o);for(var p=0;p!==c.vertices.length;p++){var b=c.vertices[p];if(n.rotate(m,b,u),s(m,m,l),r(y,m,i),0>=a(y,v)){if(d)return!0;f++;var x=this.createContactEquation(e,h,t,c);r(y,m,i),n.copy(x.normalA,v);var E=a(y,x.normalA);n.scale(y,x.normalA,E),r(x.contactPointB,m,h.position),r(x.contactPointA,m,y),r(x.contactPointA,x.contactPointA,e.position),this.contactEquations.push(x),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&f&&this.frictionEquations.push(this.createFrictionFromAverage(f)),f},k.prototype[f.PARTICLE|f.PLANE]=k.prototype.particlePlane=function(e,t,i,s,o,h,c,l,u){l=l||0,r(m,i,c),n.rotate(v,g,l);var d=a(m,v);if(d>0)return 0;if(u)return!0;var f=this.createContactEquation(o,e,h,t);return n.copy(f.normalA,v),n.scale(m,f.normalA,d),r(f.contactPointA,i,m),r(f.contactPointA,f.contactPointA,o.position),r(f.contactPointB,i,e.position),this.contactEquations.push(f),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(f)),1},k.prototype[f.CIRCLE|f.PARTICLE]=k.prototype.circleParticle=function(e,t,i,a,o,h,c,l,u){if(r(m,c,i),n.squaredLength(m)>Math.pow(t.radius,2))return 0;if(u)return!0;var d=this.createContactEquation(e,o,t,h);return n.copy(d.normalA,m),n.normalize(d.normalA,d.normalA),n.scale(d.contactPointA,d.normalA,t.radius),s(d.contactPointA,d.contactPointA,i),r(d.contactPointA,d.contactPointA,e.position),r(d.contactPointB,c,o.position),this.contactEquations.push(d),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(d)),1};var q=new u({radius:1}),J=n.create(),$=n.create();n.create(),k.prototype[f.PLANE|f.CAPSULE]=k.prototype.planeCapsule=function(e,t,i,r,a,o,h,c,l){n.set(J,-o.length/2,0),n.rotate(J,J,c),s(J,J,h),n.set($,o.length/2,0),n.rotate($,$,c),s($,$,h),q.radius=o.radius,this.enableFrictionReduction&&(u=this.enableFriction,this.enableFriction=!1);var u,d=this.circlePlane(a,q,J,0,e,t,i,r,l),f=this.circlePlane(a,q,$,0,e,t,i,r,l);if(this.enableFrictionReduction&&(this.enableFriction=u),l)return d||f;var p=d+f;return this.enableFrictionReduction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p},k.prototype[f.CIRCLE|f.PLANE]=k.prototype.circlePlane=function(e,t,i,o,h,c,l,u,d){var f=u;f=f||0,r(m,i,l),n.rotate(v,g,f);var p=a(v,m);if(p>t.radius)return 0;if(d)return!0;var b=this.createContactEquation(h,e,c,t);return n.copy(b.normalA,v),n.scale(b.contactPointB,b.normalA,-t.radius),s(b.contactPointB,b.contactPointB,i),r(b.contactPointB,b.contactPointB,e.position),n.scale(y,b.normalA,p),r(b.contactPointA,m,y),s(b.contactPointA,b.contactPointA,l),r(b.contactPointA,b.contactPointA,h.position),this.contactEquations.push(b),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(b)),1},k.prototype[f.CONVEX]=k.prototype[f.CONVEX|f.BOX]=k.prototype[f.BOX]=k.prototype.convexConvex=function(e,t,i,o,h,c,l,u,d,f){var p=0,f="number"==typeof f?f:0;if(!k.findSeparatingAxis(t,i,o,c,l,u,m))return 0;r(T,l,i),a(m,T)>0&&n.scale(m,m,-1);var g=k.getClosestEdge(t,o,m,!0),E=k.getClosestEdge(c,u,m);if(-1===g||-1===E)return 0;for(var A=0;A<2;A++){var C,_=g,I=E,O=t,P=c,M=i,R=l,L=o,D=u,N=e,F=h;0===A&&(C=_,_=I,I=C,C=O,O=P,P=C,C=M,M=R,R=C,C=L,L=D,D=C,C=N,N=F,F=C);for(var B=I;B=3){if(d)return!0;var H=this.createContactEquation(N,F,O,P);p++;var j=O.vertices[_%O.vertices.length],W=O.vertices[(_+1)%O.vertices.length];n.rotate(y,j,L),n.rotate(b,W,L),s(y,y,M),s(b,b,M),r(x,b,y),n.rotate90cw(H.normalA,x),n.normalize(H.normalA,H.normalA),r(T,v,y);var Y=a(H.normalA,T);n.scale(w,H.normalA,Y),r(H.contactPointA,v,M),r(H.contactPointA,H.contactPointA,w),s(H.contactPointA,H.contactPointA,M),r(H.contactPointA,H.contactPointA,N.position),r(H.contactPointB,v,R),s(H.contactPointB,H.contactPointB,R),r(H.contactPointB,H.contactPointB,F.position),this.contactEquations.push(H),!this.enableFrictionReduction&&this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(H))}}}return this.enableFrictionReduction&&this.enableFriction&&p&&this.frictionEquations.push(this.createFrictionFromAverage(p)),p};var Q=n.fromValues(0,0);k.projectConvexOntoAxis=function(e,t,i,r,s){var o,h=null,c=null;n.rotate(Q,r,-i);for(var l=0;lh)&&(h=o),(null===c||oh){var u=c;c=h,h=u}var d=a(t,r);n.set(s,c+d,h+d)};var Z=n.fromValues(0,0),ee=n.fromValues(0,0),et=n.fromValues(0,0),ei=n.fromValues(0,0),en=n.fromValues(0,0),er=n.fromValues(0,0);k.findSeparatingAxis=function(e,t,i,s,a,o,h){var c=null,l=!1,u=!1;if(e instanceof p&&s instanceof p)for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;2!==m;m++){0===m?n.set(ei,0,1):1===m&&n.set(ei,1,0),0!==g&&n.rotate(ei,ei,g),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}else for(var d=0;2!==d;d++){var f=e,g=i;1===d&&(f=s,g=o);for(var m=0;m!==f.vertices.length;m++){n.rotate(ee,f.vertices[m],g),n.rotate(et,f.vertices[(m+1)%f.vertices.length],g),r(Z,et,ee),n.rotate90cw(ei,Z),n.normalize(ei,ei),k.projectConvexOntoAxis(e,t,i,ei,en),k.projectConvexOntoAxis(s,a,o,ei,er);var v=en,y=er;en[0]>er[0]&&(y=en,v=er);var b=y[0]-v[1];l=b<=0,(null===c||b>c)&&(n.copy(h,ei),c=b,u=l)}}return u};var es=n.fromValues(0,0),ea=n.fromValues(0,0),eo=n.fromValues(0,0);k.getClosestEdge=function(e,t,i,s){n.rotate(es,i,-t),s&&n.scale(es,es,-1);for(var o=-1,h=e.vertices.length,c=-1,l=0;l!==h;l++){r(ea,e.vertices[(l+1)%h],e.vertices[l%h]),n.rotate90cw(eo,ea),n.normalize(eo,eo);var u=a(eo,es);(-1===o||u>c)&&(o=l%h,c=u)}return o};var eh=n.create(),ec=n.create(),el=n.create(),eu=n.create(),ed=n.create(),ef=n.create(),ep=n.create();k.prototype[f.CIRCLE|f.HEIGHTFIELD]=k.prototype.circleHeightfield=function(e,t,i,a,o,h,c,l,u,d){var f=h.heights,d=d||t.radius,p=h.elementWidth,g=Math.floor((i[0]-d-c[0])/p),m=Math.ceil((i[0]+d-c[0])/p);g<0&&(g=0),m>=f.length&&(m=f.length-1);for(var v=f[g],y=f[m],b=g;bv&&(v=f[b]);if(i[1]-d>v)return!u&&0;for(var x=!1,b=g;b=el[0]&&eh[0]0){for(var b=g;b<=m;b++)if(n.set(el,b*p,f[b]),n.add(el,el,c),n.sub(ec,i,el),n.squaredLength(ec)=l.length&&(f=l.length-1);for(var p=l[d],g=l[f],m=d;mp&&(p=l[m]);if(e.aabb.lowerBound[1]>p)return!c&&0;for(var v=0,m=d;m(0|t)?e<<16|65535&t:t<<16|65535&e)|0},r.prototype.getByKey=function(e){return e|=0,this.data[e]},r.prototype.get=function(e,t){return this.data[this.getKey(e,t)]},r.prototype.set=function(e,t,i){if(!i)throw Error("No data!");var n=this.getKey(e,t);return this.data[n]||this.keys.push(n),this.data[n]=i,n},r.prototype.reset=function(){for(var e=this.data,t=this.keys,i=t.length;i--;)delete e[t[i]];t.length=0},r.prototype.copy=function(e){this.reset(),n.appendArray(this.keys,e.keys);for(var t=e.keys.length;t--;){var i=e.keys[t];this.data[i]=e.data[i]}}},{"8f6c901d02437d27":"7sQcP"}],"1uf32":[function(e,t,i){var n=e("57927c61fbcf992f"),r=e("1e621ded3903d68e"),s=e("a8501ada722b06e1");function a(e){"number"==typeof arguments[0]&&"number"==typeof arguments[1]&&(e={width:arguments[0],height:arguments[1]},console.warn("The Rectangle has been renamed to Box and its constructor signature has changed. Please use the following format: new Box({ width: 1, height: 1, ... })")),e=e||{};var t=this.width=e.width||1,i=this.height=e.height||1,a=[n.fromValues(-t/2,-i/2),n.fromValues(t/2,-i/2),n.fromValues(t/2,i/2),n.fromValues(-t/2,i/2)],o=[n.fromValues(1,0),n.fromValues(0,1)];e.vertices=a,e.axes=o,e.type=r.BOX,s.call(this,e)}t.exports=a,a.prototype=new s,a.prototype.constructor=a,a.prototype.computeMomentOfInertia=function(e){var t=this.width,i=this.height;return e*(i*i+t*t)/12},a.prototype.updateBoundingRadius=function(){var e=this.width,t=this.height;this.boundingRadius=Math.sqrt(e*e+t*t)/2},n.create(),n.create(),n.create(),n.create(),a.prototype.computeAABB=function(e,t,i){e.setFromPoints(this.vertices,t,i,0)},a.prototype.updateArea=function(){this.area=this.width*this.height}},{"57927c61fbcf992f":"geg3A","1e621ded3903d68e":"fyiLV",a8501ada722b06e1:"jXoGk"}],liK4P:[function(e,t,i){e("852348000d7d6d69"),e("b1906358d63dd535"),e("2589eb1c960dc6a0"),e("41d1d194c5bc6ec2");var n=e("c59906df004f11c2");function r(){n.call(this,n.NAIVE)}e("3a4bfb1510f2f292"),t.exports=r,r.prototype=new n,r.prototype.constructor=r,r.prototype.getCollisionPairs=function(e){var t=e.bodies,i=this.result;i.length=0;for(var r=0,s=t.length;r!==s;r++)for(var a=t[r],o=0;o0)&&!(r.squaredDistance(s,c)d)p.angle=d,-1===r.indexOf(p)&&r.push(p);else{var v=r.indexOf(p);-1!==v&&r.splice(v,1)}if(this.lowerLimitEnabled&&mi)a.scale(r.normalA,c,-1),a.sub(r.contactPointA,l,o.position),a.sub(r.contactPointB,u,h.position),a.scale(p,c,i),a.add(r.contactPointA,r.contactPointA,p),-1===e.indexOf(r)&&e.push(r);else{var x=e.indexOf(r);-1!==x&&e.splice(x,1)}if(this.lowerLimitEnabled&&y=0&&!(e[s].aabb.lowerBound[t]<=r.aabb.lowerBound[t]);s--)e[s+1]=e[s];e[s+1]=r}return e},s.prototype.sortList=function(){var e=this.axisList,t=this.axisIndex;s.sortAxisList(e,t)},s.prototype.getCollisionPairs=function(e){var t=this.axisList,i=this.result,n=this.axisIndex;i.length=0;for(var s=t.length;s--;){var a=t[s];a.aabbNeedsUpdate&&a.updateAABB()}this.sortList();for(var o=0,h=0|t.length;o!==h;o++)for(var c=t[o],l=o+1;l=e&&n=0;g-=2)for(var T=b.length-2;T>=0;T-=2)(w[g]===b[T]&&w[g+1]===b[T+1]||w[g+1]===b[T]&&w[g]===b[T+1])&&b.splice(T,2);var A=l.length;for(g=0;g!==A;g++){var C=l[g];if(!C.collideConnected)for(var T=b.length-2;T>=0;T-=2)(C.bodyA===b[T]&&C.bodyB===b[T+1]||C.bodyB===b[T]&&C.bodyA===b[T+1])&&b.splice(T,2)}this.postBroadphaseEvent.pairs=b,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,c.reset(this);for(var g=0,_=b.length;g!==_;g+=2)for(var I=b[g],O=b[g+1],P=0,M=I.shapes.length;P!==M;P++)for(var R=I.shapes[P],L=R.position,D=R.angle,k=0,N=O.shapes.length;k!==N;k++){var F=O.shapes[k],B=F.position,U=F.angle,V=this.defaultContactMaterial;if(R.material&&F.material){var G=this.getContactMaterial(R.material,F.material);G&&(V=G)}this.runNarrowphase(c,I,R,L,D,O,F,B,U,V,this.frictionGravity)}for(var g=0;g!==o;g++){var j=n[g];j._wakeUpAfterNarrowphase&&(j.wakeUp(),j._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(S);for(var W=this.endContactEvent,k=S.length;k--;){var Y=S[k];W.shapeA=Y.shapeA,W.shapeB=Y.shapeB,W.bodyA=Y.bodyA,W.bodyB=Y.bodyB,this.emit(W)}S.length=0}var H=this.preSolveEvent;H.contactEquations=c.contactEquations,H.frictionEquations=c.frictionEquations,this.emit(H),H.contactEquations=H.frictionEquations=null;var A=l.length;for(g=0;g!==A;g++)l[g].update();if(c.contactEquations.length||c.frictionEquations.length||A){if(this.islandSplit){for(f.equations.length=0,v.appendArray(f.equations,c.contactEquations),v.appendArray(f.equations,c.frictionEquations),g=0;g!==A;g++)v.appendArray(f.equations,l[g].equations);f.split(this);for(var g=0;g!==f.islands.length;g++){var z=f.islands[g];z.equations.length&&a.solveIsland(e,z)}}else{for(a.addEquations(c.contactEquations),a.addEquations(c.frictionEquations),g=0;g!==A;g++)a.addEquations(l[g].equations);this.solveConstraints&&a.solve(e,this),a.removeAllEquations()}}for(var g=0;g!==o;g++){var j=n[g];j.integrate(e)}for(var g=0;g!==o;g++)n[g].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,g=0;g!==c.contactEquations.length;g++){var K=c.contactEquations[g];K.firstImpact&&(X.bodyA=K.bodyA,X.bodyB=K.bodyB,X.shapeA=K.shapeA,X.shapeB=K.shapeB,X.contactEquation=K,this.emit(X))}if(this.sleepMode===x.BODY_SLEEPING)for(g=0;g!==o;g++)n[g].sleepTick(this.time,!1,e);else if(this.sleepMode===x.ISLAND_SLEEPING&&this.islandSplit){for(g=0;g!==o;g++)n[g].sleepTick(this.time,!0,e);for(var g=0;g0,e.frictionCoefficient=l.friction,f=t.type===u.STATIC||t.type===u.KINEMATIC?a.mass:a.type===u.STATIC||a.type===u.KINEMATIC?t.mass:t.mass*a.mass/(t.mass+a.mass),e.slipForce=l.friction*d*f,e.restitution=l.restitution,e.surfaceVelocity=l.surfaceVelocity,e.frictionStiffness=l.frictionStiffness,e.frictionRelaxation=l.frictionRelaxation,e.stiffness=l.stiffness,e.relaxation=l.relaxation,e.contactSkinSize=l.contactSkinSize,e.enabledEquations=t.collisionResponse&&a.collisionResponse&&i.collisionResponse&&o.collisionResponse;var m=e[i.type|o.type],v=0;if(m){var y=i.sensor||o.sensor,b=e.frictionEquations.length;v=i.type=2*Math.pow(a.sleepSpeedLimit,2)&&(t._wakeUpAfterNarrowphase=!0),a.allowSleep&&a.type===u.DYNAMIC&&a.sleepState===u.SLEEPING&&t.sleepState===u.AWAKE&&t.type!==u.STATIC&&r.squaredLength(t.velocity)+Math.pow(t.angularVelocity,2)>=2*Math.pow(t.sleepSpeedLimit,2)&&(a._wakeUpAfterNarrowphase=!0),this.overlapKeeper.setOverlapping(t,i,a,o),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(i,o)){var E=this.beginContactEvent;if(E.shapeA=i,E.shapeB=o,E.bodyA=t,E.bodyB=a,E.contactEquations.length=0,"number"==typeof v)for(var S=e.contactEquations.length-v;S1)for(var S=e.frictionEquations.length-x;S=0;t--)this.removeConstraint(e[t]);for(var i=this.bodies,t=i.length-1;t>=0;t--)this.removeBody(i[t]);for(var n=this.springs,t=n.length-1;t>=0;t--)this.removeSpring(n[t]);for(var r=this.contactMaterials,t=r.length-1;t>=0;t--)this.removeContactMaterial(r[t]);x.apply(this)};var A=r.create(),C=(r.fromValues(0,0),r.fromValues(0,0));x.prototype.hitTest=function(e,t,i){i=i||0;var n=new u({position:e}),l=new c;n.addShape(l);for(var d=this.narrowphase,f=[],p=0,g=t.length;p!==g;p++)for(var m=t[p],v=0,y=m.shapes.length;v!==y;v++){var b=m.shapes[v];r.rotate(A,b.position,m.angle),r.add(A,A,m.position);var x=b.angle+m.angle;(b instanceof s&&d.circleParticle(m,b,A,x,n,l,e,0,!0)||b instanceof a&&d.particleConvex(n,l,e,0,m,b,A,x,!0)||b instanceof o&&d.particlePlane(n,l,e,0,m,b,A,x,!0)||b instanceof h&&d.particleCapsule(n,l,e,0,m,b,A,x,!0)||b instanceof c&&r.squaredLength(r.sub(C,A,e)) (http://steffe.se)","keywords":["p2.js","p2","physics","engine","2d"],"main":"./src/p2.js","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/schteppe/p2.js.git"},"bugs":{"url":"https://github.com/schteppe/p2.js/issues"},"licenses":[{"type":"MIT"}],"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},"dependencies":{"poly-decomp":"0.1.1"}}')},{}],kYZwj:[function(e,t,i){var n=e("d1c511ff43075908");e("6ad6aae9d3178c1c");var r=e("ae69163b5e95d902");function s(){this.overlappingShapesLastState=new n,this.overlappingShapesCurrentState=new n,this.recordPool=new r({size:16}),this.tmpDict=new n,this.tmpArray1=[]}e("ca81eee98f7bd467"),t.exports=s,s.prototype.tick=function(){for(var e=this.overlappingShapesLastState,t=this.overlappingShapesCurrentState,i=e.keys.length;i--;){var n=e.keys[i],r=e.getByKey(n);t.getByKey(n),r&&this.recordPool.release(r)}e.reset(),e.copy(t),t.reset()},s.prototype.setOverlapping=function(e,t,i,n){this.overlappingShapesLastState;var r=this.overlappingShapesCurrentState;if(!r.get(t.id,n.id)){var s=this.recordPool.get();s.set(e,t,i,n),r.set(t.id,n.id,s)}},s.prototype.getNewOverlaps=function(e){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,e)},s.prototype.getEndOverlaps=function(e){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,e)},s.prototype.bodiesAreOverlapping=function(e,t){for(var i=this.overlappingShapesCurrentState,n=i.keys.length;n--;){var r=i.keys[n],s=i.data[r];if(s.bodyA===e&&s.bodyB===t||s.bodyA===t&&s.bodyB===e)return!0}return!1},s.prototype.getDiff=function(e,t,i){var i=i||[];i.length=0;for(var n=t.keys.length;n--;){var r=t.keys[n],s=t.data[r];if(!s)throw Error("Key "+r+" had no data!");e.data[r]||i.push(s)}return i},s.prototype.isNewOverlap=function(e,t){var i=0|e.id,n=0|t.id,r=this.overlappingShapesLastState,s=this.overlappingShapesCurrentState;return!r.get(i,n)&&!!s.get(i,n)},s.prototype.getNewBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getEndBodyOverlaps=function(e){this.tmpArray1.length=0;var t=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(t,e)},s.prototype.getBodyDiff=function(e,t){t=t||[];for(var i=this.tmpDict,n=e.length;n--;){var r=e[n];i.set(0|r.bodyA.id,0|r.bodyB.id,r)}for(n=i.keys.length;n--;){var r=i.getByKey(i.keys[n]);r&&t.push(r.bodyA,r.bodyB)}return i.reset(),t}},{d1c511ff43075908:"gyzPH","6ad6aae9d3178c1c":"cwAfS",ae69163b5e95d902:"fO0xd",ca81eee98f7bd467:"7sQcP"}],cwAfS:[function(e,t,i){function n(e,t,i,n){this.shapeA=t,this.shapeB=n,this.bodyA=e,this.bodyB=i}t.exports=n,n.prototype.set=function(e,t,i,r){n.call(this,e,t,i,r)}},{}],fO0xd:[function(e,t,i){var n=e("ef39e4c8e830c20e"),r=e("6e41b1482492ad2f");function s(){r.apply(this,arguments)}t.exports=s,s.prototype=new r,s.prototype.constructor=s,s.prototype.create=function(){return new n},s.prototype.destroy=function(e){return e.bodyA=e.bodyB=e.shapeA=e.shapeB=null,this}},{ef39e4c8e830c20e:"cwAfS","6e41b1482492ad2f":"5lrfq"}],bVaR4:[function(e,t,i){e("f7108e810eaecffd"),e("50bfc1b1a312ac2f"),e("2f6d951f62024392");var n=e("9526c01719846e44"),r=e("82ea80983f48bd5f"),s=e("29efc1b1b871dc45");function a(e){this.nodePool=new n({size:16}),this.islandPool=new r({size:8}),this.equations=[],this.islands=[],this.nodes=[],this.queue=[]}t.exports=a,a.getUnvisitedNode=function(e){for(var t=e.length,i=0;i!==t;i++){var n=e[i];if(!n.visited&&n.body.type===s.DYNAMIC)return n}return!1},a.prototype.visit=function(e,t,i){t.push(e.body);for(var n=e.equations.length,r=0;r!==n;r++){var s=e.equations[r];-1===i.indexOf(s)&&i.push(s)}},a.prototype.bfs=function(e,t,i){var n=this.queue;for(n.length=0,n.push(e),e.visited=!0,this.visit(e,t,i);n.length;)for(var r,o=n.pop();r=a.getUnvisitedNode(o.neighbors);)r.visited=!0,this.visit(r,t,i),r.body.type===s.DYNAMIC&&n.push(r)},a.prototype.split=function(e){for(var t,i=e.bodies,n=this.nodes,r=this.equations;n.length;)this.nodePool.release(n.pop());for(var s=0;s!==i.length;s++){var o=this.nodePool.get();o.body=i[s],n.push(o)}for(var h=0;h!==r.length;h++){var c=r[h],s=i.indexOf(c.bodyA),l=i.indexOf(c.bodyB),u=n[s],d=n[l];u.neighbors.push(d),d.neighbors.push(u),u.equations.push(c),d.equations.push(c)}for(var f=this.islands,s=0;s{this.worldDateTime=new Date},1e3)}enablePathFinder(){this.usePathFinder&&(this.pathFinder=new h,this.pathFinder.world=this,this.pathFinder.createGridFromMap())}validateRequiredProperties(e){this.events||f.error("EventsManager undefined in P2world."),this.roomId&&this.sceneName&&this.sceneTiledMapFile||(p.critical("World creation missing data in options.",{roomId:this.roomId,sceneName:this.sceneName,sceneTiledMapFile:this.sceneTiledMapFile}),f.error("World creation missing data in options.")),this.config||f.error("Missing Config Manager.")}async createWorldContent(e){if(!this.validateMapData(this.mapJson)){p.error("Missing map data.",this.mapJson);return}this.shouldGroupBodies()||p.warning("Group bodies fully disabled, this can impact performance."),this.changePoints=this.getSceneChangePoints(e);let t=this.mapJson.layers,i=[];for(let e of t){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayerBefore",t),i.push(...await this.createLayerContents(t.layer)),await this.events.emit("reldens.parsingMapLayerAfter",t)}for(let e of i){let{layer:t,tileIndex:i,tileW:n,tileH:r,posX:s,posY:a}=e;await this.createRoomObjectBody(t,i,n,r,s,a)}for(let e of(this.processBodiesQueue(),t)){let t={layer:e,world:this};await this.events.emit("reldens.parsingMapLayersAfterBodiesQueue",t)}p.info("Total wall bodies found: "+this.totalBodiesCount,"Total wall bodies created: "+this.totalBodiesCreated)}processBodiesQueue(){for(let e of(this.queueBodies.sort((e,t)=>e.tileIndexes[0]-t.tileIndexes[0]),this.queueBodies))this.addBody(e);this.queueBodies=[]}async createLayerContents(e){let t=this.mapJson.tilewidth,i=this.mapJson.tileheight,n=t/2,r=i/2,s=-1!==e.name.indexOf("change-points"),a=-1!==e.name.indexOf("collisions"),o=[];for(let h=0;he.y?s:-s),h=e.x+(t.x>e.x?a:-a),c=Math.atan2(t.y-o,t.x-h),l=180*c/Math.PI,u=i.key?i.key:"",f=i.magnitude*Math.cos(c),g=i.magnitude*Math.sin(c),m=this.calculateDirection(i,e,t);p.debug('Shooting bullet "'+u+'":',{objectWidth:n,objectHeight:r,bulletY:o,bulletX:h,fromPosition:e,toPosition:t,bulletAngle:l,speedX:f,speedY:g});let v="BULLET_"+this.determineFromType(i),y=this.createCollisionBody(n,r,h,o,this.bulletsBodyType,d.COLLISIONS[v],1,!0,!0,u,m);y.updateMassProperties(),y.roomObject=i,y.hitPriority=i.hitPriority?i.hitPriority:2,y.isRoomObject=!0,y.isBullet=!0,y.key=""===u?"bullet-"+y.id:u,this.addBody(y);let b=u+"_bullet_"+y.id;return y.bodyStateId=b,i.room.state.addBodyToState(y.bodyState,b),y.angle=l,y.originalSpeed={x:f,y:g},y.velocity[0]=f,y.velocity[1]=g,y}determineFromType(e){return this.typeDeterminer.isPlayer(e.owner)?d.FROM_TYPES.PLAYER:this.typeDeterminer.isObject(e.owner)?d.FROM_TYPES.OBJECT:d.FROM_TYPES.OTHER}calculateDirection(e,t,i){return 3===g.get(e,"animDir",!1)?t.x=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t,i){if(i||2==arguments.length)for(var n,r=0,s=t.length;r=e.length)return!1;for(var i=e.length-1,n=t;nn?1:0},g=function(){function t(){for(var e=[],t=0;t=this.length)){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)}},t.prototype.setAt=function(t,i){if(null==i){console.error("ArraySchema items cannot be null nor undefined; Use `deleteAt(index)` instead.");return}if(this.$items.get(t)!==i){void 0!==i.$changes&&i.$changes.setParent(this,this.$changes.root,t);var n,r,s=null!==(r=null===(n=this.$changes.indexes[t])||void 0===n?void 0:n.op)&&void 0!==r?r:e.OPERATION.ADD;this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,i),this.$changes.change(t,s)}},t.prototype.deleteAt=function(e){var t=Array.from(this.$items.keys())[e];return void 0!==t&&this.$deleteAt(t)},t.prototype.$deleteAt=function(e){return this.$changes.delete(e),this.$indexes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.concat=function(){for(var e,i=[],n=0;n>6:(n<55296||n>=57344?e[t++]=224|n>>12:(r++,n=65536+((1023&n)<<10|1023&i.charCodeAt(r)),e[t++]=240|n>>18,e[t++]=128|n>>12&63),e[t++]=128|n>>6&63),e[t++]=128|63&n)}function T(e,t){e.push(255&t)}function S(e,t){e.push(255&t)}function A(e,t){e.push(255&t),e.push(t>>8&255)}function C(e,t){e.push(255&t),e.push(t>>8&255)}function _(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function I(e,t){e.push(255&t),e.push(255&t>>8),e.push(255&t>>16),e.push(255&t>>24)}function O(e,t){var i=Math.floor(t/4294967296);I(e,t>>>0),I(e,i)}function P(e,t){I(e,t>>>0),I(e,t/4294967296>>0)}var M=new Int32Array(2),R=new Float32Array(M.buffer),L=new Float64Array(M.buffer);function D(e,t){R[0]=t,_(e,M[0])}function k(e,t){L[0]=t,_(e,M[0]),_(e,M[1])}function N(e,t){t||(t="");var i=function(e){for(var t=0,i=0,n=0,r=e.length;n=57344?i+=3:(n++,i+=4);return i}(t),n=0;if(i<32)e.push(160|i),n=1;else if(i<256)e.push(217),S(e,i),n=2;else if(i<65536)e.push(218),C(e,i),n=3;else if(i<4294967296)e.push(219),I(e,i),n=5;else throw Error("String too long");return w(e,e.length,t),n+i}function F(e,t){return isNaN(t)?F(e,0):isFinite(t)?t!==(0|t)?(e.push(203),k(e,t),9):t>=0?t<128?(S(e,t),1):t<256?(e.push(204),S(e,t),2):t<65536?(e.push(205),C(e,t),3):t<4294967296?(e.push(206),I(e,t),5):(e.push(207),P(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),T(e,t),2):t>=-32768?(e.push(209),A(e,t),3):t>=-2147483648?(e.push(210),_(e,t),5):(e.push(211),O(e,t),9):F(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var B=Object.freeze({__proto__:null,boolean:function(e,t){return S(e,t?1:0)},float32:function(e,t){D(e,t)},float64:function(e,t){k(e,t)},int16:A,int32:_,int64:O,int8:T,number:F,string:N,uint16:C,uint32:I,uint64:P,uint8:S,utf8Write:w,writeFloat32:D,writeFloat64:k});function U(e,t){return V(e,t)<<24>>24}function V(e,t){return e[t.offset++]}function G(e,t){return j(e,t)<<16>>16}function j(e,t){return e[t.offset++]|e[t.offset++]<<8}function W(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function Y(e,t){return W(e,t)>>>0}function H(e,t){var i=Y(e,t);return 4294967296*W(e,t)+i}function z(e,t){var i=Y(e,t);return 4294967296*Y(e,t)+i}var X=new Int32Array(2),K=new Float32Array(X.buffer),q=new Float64Array(X.buffer);function J(e,t){return X[0]=W(e,t),K[0]}function $(e,t){return X[0]=W(e,t),X[1]=W(e,t),q[0]}function Q(e,t){var i,n=e[t.offset++];n<192?i=31&n:217===n?i=V(e,t):218===n?i=j(e,t):219===n&&(i=Y(e,t));var r=function(e,t,i){for(var n="",r=0,s=t,a=t+i;s=65536?(r-=65536,n+=String.fromCharCode((r>>>10)+55296,(1023&r)+56320)):n+=String.fromCharCode(r);continue}console.error("Invalid byte "+o.toString(16))}return n}(e,t.offset,i);return t.offset+=i,r}function Z(e,t){var i=e[t.offset++];if(i<128)return i;if(202===i)return J(e,t);if(203===i)return $(e,t);if(204===i)return V(e,t);if(205===i)return j(e,t);if(206===i)return Y(e,t);if(207===i)return z(e,t);else if(208===i)return U(e,t);else if(209===i)return G(e,t);else if(210===i)return W(e,t);else if(211===i)return H(e,t);else if(i>223)return-((255-i+1)*1)}function ee(e,t){return 255===e[t.offset-1]&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var et=Object.freeze({__proto__:null,arrayCheck:function(e,t){return e[t.offset]<160},boolean:function(e,t){return V(e,t)>0},float32:function(e,t){return J(e,t)},float64:function(e,t){return $(e,t)},int16:G,int32:W,int64:H,int8:U,number:Z,numberCheck:function(e,t){var i=e[t.offset];return i<128||i>=202&&i<=211},readFloat32:J,readFloat64:$,string:Q,stringCheck:function(e,t){var i=e[t.offset];return i<192&&i>160||217===i||218===i||219===i},switchStructureCheck:ee,uint16:j,uint32:Y,uint64:z,uint8:V}),ei=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some(function(t){return t===e})},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),en=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach(function(e){return t.add(e)})}return t.prototype.onAdd=function(t,i){return void 0===i&&(i=!0),u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,i?this.$items:void 0)},t.prototype.onRemove=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return u(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){if(this.has(t))return!1;var i,n,r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var s=null!==(n=null===(i=this.$changes.indexes[r])||void 0===i?void 0:i.op)&&void 0!==n?n:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,s),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,i,n=this.$items.entries();(i=n.next())&&!i.done;)if(e===i.value[1]){t=i.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&d.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,i=this.$items.values(),n=!1;(t=i.next())&&!t.done;)if(e===t.value){n=!0;break}return n},t.prototype.forEach=function(e){var t=this;this.$items.forEach(function(i,n,r){return e(i,n,t)})},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach(function(t,i){e.push("function"==typeof t.toJSON?t.toJSON():t)}),e},t.prototype.clone=function(e){var i;return e?i=Object.assign(new t,this):(i=new t,this.forEach(function(e){e.$changes?i.add(e.clone()):i.add(e)})),i},t}(),er=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),es=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,i){void 0===i&&(i=!0),this.refs.set(e,t),i&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){var t=this.refCounts[e];if(void 0===t){console.warn("trying to remove reference ".concat(e," that doesn't exist"));return}if(0===t){console.warn("trying to remove reference ".concat(e," with 0 refCount"));return}this.refCounts[e]=t-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach(function(t){if(!(e.refCounts[t]>0)){var i=e.refs.get(t);if(i instanceof eh)for(var n in i._definition.schema)"string"!=typeof i._definition.schema[n]&&i[n]&&i[n].$changes&&e.removeRef(i[n].$changes.refId);else{var r=i.$changes.parent._definition;"function"==typeof Object.values(r.schema[r.fieldsByIndex[i.$changes.parentIndex]])[0]&&Array.from(i.values()).forEach(function(t){return e.removeRef(t.$changes.refId)})}e.refs.delete(t),delete e.refCounts[t]}}),this.deletedRefs.clear()},e}(),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Error);function eo(e,t,i,n){if(!(e instanceof t))throw new ea("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(i.constructor.name,"#").concat(n))}var eh=function(){function t(){for(var e=[],t=0;t>6<<6:l;if(p===e.OPERATION.CLEAR){r.clear(s);continue}var y=f?l%(p||255):Z(i,n),b=f?r._definition.fieldsByIndex[y]:"",x=d.getType(y),E=void 0,w=void 0,T=void 0;if(f?w=r["_".concat(b)]:(w=r.getByIndex(y),(p&e.OPERATION.ADD)===e.OPERATION.ADD?(T=r instanceof m?Q(i,n):y,r.setIndex(y,T)):T=r.getIndex(y)),(p&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(p!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(y),w&&w.$changes&&a.removeRef(w.$changes.refId),E=null),void 0===b){console.warn("@colyseus/schema: definition mismatch");for(var S={offset:n.offset};n.offsets?t[0]+n[0]:s,h=t[1]+n[1]>a?t[1]+n[1]:a,c=t[0]-n[0]<0?t[0]-n[0]:0,l=t[1]-n[1]<0?t[1]-n[1]:0,u=this.grid.getNodeAt(o,t[1]);u&&!u.walkable&&(u=this.grid.getNodeAt(t[0],h))&&!u.walkable&&(u=this.grid.getNodeAt(o,h))&&!u.walkable&&(u=this.grid.getNodeAt(c,t[1]))&&!u.walkable&&(u=this.grid.getNodeAt(t[0],l))&&!u.walkable&&(u=this.grid.getNodeAt(c,l))&&!u.walkable&&(u=this.grid.getNodeAt(c,h))&&!u.walkable&&(u=this.grid.getNodeAt(o,l)),u&&u.walkable&&(i=this.grid.clone(),r=this.finder.findPath(e[0],e[1],u.x,u.y,i))}return r}}},{d026eb33ec4f8a6d:"3lwy5","8e5cc24e68f2d485":"jSlJ0"}],jSlJ0:[function(e,t,i){t.exports=e("c08c5d893d481d77")},{c08c5d893d481d77:"110ct"}],"110ct":[function(e,t,i){t.exports={Heap:e("a11c2d2f6228b64d"),Node:e("5d6357416bae419"),Grid:e("eb2500554bbf40a2"),Util:e("b8fdf53e7c2bda86"),DiagonalMovement:e("ea6942fe46b7874a"),Heuristic:e("cc79ac15c71b85de"),AStarFinder:e("92550c19cc8290da"),BestFirstFinder:e("8fe7b6287e43173"),BreadthFirstFinder:e("49f4cbf7cb03de5a"),DijkstraFinder:e("f055f2df42298a76"),BiAStarFinder:e("ae88c656fdc0b402"),BiBestFirstFinder:e("6dfdccafa1ea046a"),BiBreadthFirstFinder:e("4f4a8a58aa00c271"),BiDijkstraFinder:e("f9f2731f8e4ac9f4"),IDAStarFinder:e("548d4f7f580680d4"),JumpPointFinder:e("c94d58273ef6271a")}},{a11c2d2f6228b64d:"j1Rgs","5d6357416bae419":"eTBTH",eb2500554bbf40a2:"4U8Sg",b8fdf53e7c2bda86:"eXbk6",ea6942fe46b7874a:"44ekP",cc79ac15c71b85de:"7ivQz","92550c19cc8290da":"b9jsj","8fe7b6287e43173":"j0U38","49f4cbf7cb03de5a":"c3dtf",f055f2df42298a76:"aTw5v",ae88c656fdc0b402:"gqRU9","6dfdccafa1ea046a":"OQep8","4f4a8a58aa00c271":"5kxE6",f9f2731f8e4ac9f4:"b2sHM","548d4f7f580680d4":"9146d",c94d58273ef6271a:"8thbF"}],j1Rgs:[function(e,t,i){t.exports=e("30b1093da33c692b")},{"30b1093da33c692b":"jKwEm"}],jKwEm:[function(e,t,i){(function(){var e,i,n,r,s,a,o,h,c,l,u,d,f,p,g;n=Math.floor,l=Math.min,i=function(e,t){return et?1:0},c=function(e,t,r,s,a){var o;if(null==r&&(r=0),null==a&&(a=i),r<0)throw Error("lo must be non-negative");for(null==s&&(s=e.length);ra(t,e[o=n((r+s)/2)])?s=o:r=o+1;return[].splice.apply(e,[r,r-r].concat(t)),t},a=function(e,t,n){return null==n&&(n=i),e.push(t),p(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,g(e,0,t)):r=n,r},h=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,g(e,0,n),r},o=function(e,t,n){var r;return null==n&&(n=i),e.length&&0>n(e[0],t)&&(t=(r=[e[0],t])[0],e[0]=r[1],g(e,0,n)),t},r=function(e,t){var r,s,a,o,h,c;for(null==t&&(t=i),o=(function(){c=[];for(var t=0,i=n(e.length/2);0<=i?ti;0<=i?t++:t--)c.push(t);return c}).apply(this).reverse(),h=[],s=0,a=o.length;sn(a=p[u],o)&&(c(h,a,0,null,n),h.pop(),o=h[h.length-1]);return h}for(r(e,n),m=[],d=0,g=l(t,e.length);0<=g?dg;0<=g?++d:--d)m.push(s(e,n));return m},p=function(e,t,n,r){var s,a,o;for(null==r&&(r=i),s=e[n];n>t;){if(0>r(s,a=e[o=n-1>>1])){e[n]=a,n=o;continue}break}return e[n]=s},g=function(e,t,n){var r,s,a,o,h;for(null==n&&(n=i),s=e.length,h=t,a=e[t],r=2*t+1;rn(e[r],e[o]))&&(r=o),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,p(e,h,t,n)},e=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=a,e.pop=s,e.replace=h,e.pushpop=o,e.heapify=r,e.updateItem=f,e.nlargest=u,e.nsmallest=d,e.prototype.push=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return -1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return h(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return o(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return r(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return f(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(null!==t?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)},{}],eTBTH:[function(e,t,i){t.exports=function(e,t,i){this.x=e,this.y=t,this.walkable=void 0===i||i}},{}],"4U8Sg":[function(e,t,i){var n=e("3debe8dfc5f4b19"),r=e("1630f01fef4aa0f7");function s(e,t,i){var n;"object"!=typeof e?n=e:(t=e.length,n=e[0].length,i=e),this.width=n,this.height=t,this.nodes=this._buildNodes(n,t,i)}s.prototype._buildNodes=function(e,t,i){var r,s,a=Array(t);for(r=0;r=0&&e=0&&t-o&&(h-=o,e+=r),c0&&new Date().getTime()-l>1e3*this.timeLimit)return 1/0;var o,h,f,g,m,v=t+u(e,p)*this.weight;if(v>i)return v;if(e==p)return n[a]=[e.x,e.y],e;var y=s.getNeighbors(e,this.diagonalMovement);for(g=0,h=1/0;m=y[g];++g){if(this.trackRecursion&&(m.retainCount=m.retainCount+1||1,!0!==m.tested&&(m.tested=!0)),(f=d(m,t+(o=m,e.x===o.x||e.y===o.y?1:Math.SQRT2),i,n,a+1))instanceof r)return n[a]=[e.x,e.y],f;this.trackRecursion&&0==--m.retainCount&&(m.tested=!1),fthis.worldWidth?this.worldWidth:e.column,e.row=e.row<0?0:e.row,e.row=e.row>this.worldHeight?this.worldHeight:e.row,e}}},{}],"5zAcU":[function(e,t,i){let{Logger:n,sc:r}=e("9b59b4ef27f548b6");t.exports.WorldTimer=class{constructor(e){this.clockInstance=r.get(e,"clockInstance",!1),this.callbacks=r.get(e,"callbacks",[]),this.worldTimer={},this.paused=!1,this.lastCallTime=0,this.stepTime=0,this.startedTime=new Date().getTime(),this.currentTime=this.startedTime}startWorldSteps(e){if(!e){n.error("World instance invalid.",{world:e});return}if(this.stepTime=1e3*e.timeStep,this.clockInstance){this.worldTimer=this.clockInstance.setInterval(()=>{this.setIntervalCallback(e)},this.stepTime);return}this.worldTimer=setInterval(()=>{this.setIntervalCallback(e)},this.stepTime)}setIntervalCallback(e){this.paused||(this.currentTime+=this.stepTime,this.stepWorld(e),this.executeCallbacks())}stepWorld(e){if(e.useFixedWorldStep){e.step(e.timeStep);return}this.stepWorldWithSubSteps(e)}executeCallbacks(){if(0!==this.callbacks.length)for(let e of this.callbacks)e()}stepWorldWithSubSteps(e){let t=Date.now()/1e3-this.lastCallTime;e.step(e.timeStep,t,e.maxSubSteps)}}},{"9b59b4ef27f548b6":"3lwy5"}],"4xzUf":[function(e,t,i){let{PlayerEnginePrediction:n}=e("35dabd79ba23aa99"),{SceneDynamic:r}=e("caa2ee44a66bdd90");t.exports.RoomEventsOverride=class{createCurrentPlayerOverride(e){e.createCurrentPlayer=async(t,i,n)=>{e.engineStarted=!0,await e.startEngineScene(t,e.room,i);let r=e.getActiveScene();if(!e.isValidScene(r,t))return!1;for(let s of(await e.events.emit("reldens.playersQueueBefore",t,n,i,e),Object.keys(e.playersQueue)))r.player.addPlayer(s,e.playersQueue[s]);r.experimentalClientPrediction&&(r.player.positionFromServer=t);let s={player:t,key:n,previousScene:i,roomEvents:e};return await e.events.emit("reldens.createCurrentPlayer",s),s}}playerOnChangeOverride(e){e.playersOnChange=(t,i,n)=>{if(t.state.scene!==e.roomName)return;let r=e.getActiveScene();if(e.playerExists(r,i)){if(r.experimentalClientPrediction&&e.isCurrentPlayer(i)){r.player.positionFromServer=t;return}r.player.updatePlayer(i,t)}}}createSceneInstanceOverride(e){e.createSceneInstance=(e,t,i)=>{let n=new r(e,t,i);return n.experimentalClientPrediction=i.config.get("client/general/engine/experimentalClientPrediction"),n.worldPrediction=!1,n}}createPlayerEngineInstanceOverride(e){e.createPlayerEngineInstance=(e,t,i,r)=>new n({scene:e,playerData:t,gameManager:i,room:r})}}},{"35dabd79ba23aa99":"8hflc",caa2ee44a66bdd90:"6Vn5m"}],"8hflc":[function(e,t,i){let{PlayerEngine:n}=e("a2861f4cd568519f"),{GameConst:r}=e("78935193245f5a91");t.exports.PlayerEnginePrediction=class extends n{constructor(e){super(e),this.predictionBody=!1,this.positionFromServer=!1;let t=this.gameManager.config.get("client/players/reconciliation/timeOutMs");this.reconciliationTimeOutMs=!1===t?1e3:Number(t)}left(){if("pressed"===this.lastKeyState[r.LEFT])return;let e={dir:r.LEFT};this.lastKeyState[r.LEFT]="pressed",this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.LEFT,!0)),this.roomEvents.send(e)}right(){if("pressed"===this.lastKeyState[r.RIGHT])return;this.lastKeyState[r.RIGHT]="pressed";let e={dir:r.RIGHT};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.RIGHT,!0)),this.roomEvents.send(e)}up(){if("pressed"===this.lastKeyState[r.UP])return;this.lastKeyState[r.UP]="pressed";let e={dir:r.UP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.UP,!0)),this.roomEvents.send(e)}down(){if("pressed"===this.lastKeyState[r.DOWN])return;this.lastKeyState[r.DOWN]="pressed";let e={dir:r.DOWN};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.predictionBody.initMove(r.DOWN,!0)),this.roomEvents.send(e)}stop(){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let e={act:r.STOP};this.predictionBody&&(e.time=this.scene.worldPredictionTimer.currentTime,this.reconcilePosition()),this.roomEvents.send(e)}reconcilePosition(){this.predictionBody&&this.positionFromServer&&(this.predictionBody.stopFull(),setTimeout(()=>{this.predictionBody.position[0]=this.positionFromServer.state.x,this.predictionBody.position[1]=this.positionFromServer.state.y,this.predictionBody.dir=this.positionFromServer.state.dir,this.updatePlayer(this.playerId,this.positionFromServer)},this.reconciliationByTimeOutMs()))}reconciliationTimeOutCallBack(){return!1}reconciliationByTimeOutMs(){let e=this.reconciliationTimeOutCallBack();return Number(!1!==e?e:this.reconciliationTimeOutMs)}moveToPointer(e){this.lastKeyState[r.LEFT]="",this.lastKeyState[r.RIGHT]="",this.lastKeyState[r.UP]="",this.lastKeyState[r.DOWN]="";let t={act:r.POINTER,column:e.worldColumn,row:e.worldRow,x:e.worldX-this.leftOff,y:e.worldY-this.topOff};if(this.predictionBody&&this.pointsValidator){this.reconcilePosition();let e=Object.assign({},t);e=this.pointsValidator.makeValidPoints(e),this.predictionBody.moveToPoint(e)}this.roomEvents.send(t)}}},{a2861f4cd568519f:"3GkIQ","78935193245f5a91":"93TbC"}],"8MUNa":[function(e,t,i){let{PluginInterface:n}=e("ff0cd3a039680b50"),{TargetBoxEnricher:r}=e("bc896f1b30e26c8b"),{TeamMessageListener:s}=e("b9e6a2d82debed5b"),{ClanMessageListener:a}=e("d88cac34aed27f09"),{MessageProcessor:o}=e("187e0a90a62f31a1"),{TemplatesHandler:h}=e("a77183244ab38ca1"),{TeamsConst:c}=e("817bd734dbf4f984"),{Logger:l,sc:u}=e("5bd001817d1a1fe2");t.exports.TeamsPlugin=class extends n{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in TeamsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in TeamsPlugin."),this.teamMessageListener=new s,this.clanMessageListener=new a,this.listenEvents(),this.listenMessages()}listenMessages(){this.gameManager&&this.events&&(this.gameManager.config.client.message.listeners[c.KEY]=this.teamMessageListener,this.gameManager.config.client.message.listeners[c.CLAN_KEY]=this.clanMessageListener)}listenEvents(){this.events&&(this.events.on("reldens.createEngineSceneDone",e=>{let t=e.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Team messages queue on TeamsPlugin.",e),!1;o.processClanMessagesQueue(t,this.clanMessageListener),o.processTeamMessagesQueue(t,this.teamMessageListener)}),this.events.on("reldens.preloadUiScene",e=>{h.preloadTemplates(e)}),this.events.on("reldens.gameEngineShowTarget",(e,t,i,n)=>{r.appendClanInviteButton(this.gameManager,t,i,n),r.appendTeamInviteButton(this.gameManager,t,i,n)}))}fetchTeamPlayerBySessionId(e){let t=this.gameManager.gameEngine.uiScene.currentTeam;if(!t)return!1;for(let i of Object.keys(t)){let n=t[i];if(n.sessionId===e)return n}return!1}}},{ff0cd3a039680b50:"fC3To",bc896f1b30e26c8b:"h6ORZ",b9e6a2d82debed5b:"2r7vd",d88cac34aed27f09:"dhhBt","187e0a90a62f31a1":"58JKl",a77183244ab38ca1:"7FChA","817bd734dbf4f984":"eA0W7","5bd001817d1a1fe2":"3lwy5"}],h6ORZ:[function(e,t,i){let{TeamsConst:n}=e("813960296055cff0"),{GameConst:r}=e("26255ed26260a75a"),{Logger:s,sc:a}=e("603fc0fc02377d1b");t.exports.TargetBoxEnricher=class{static appendClanInviteButton(e,t,i,n){let r=e?.gameEngine?.uiScene?.currentClan;if(!r)return!1;if(!r.ownerId)return s.error("Current clan missing owner.",r),!1;if(this.playerBySessionId(r,t.id))return!1;let a=e.getCurrentPlayer();if(!this.targetIsValidPlayer(t,a))return!1;let o=e.config.getWithoutLogs("client/clan/general/openInvites",!1);return(e.playerData.id.toString()===r.ownerId.toString()||!!o)&&this.appendInviteButton("clan",t,e,n)}static appendTeamInviteButton(e,t,i,n){return!(!this.targetIsValidPlayer(t,e.getCurrentPlayer())||e.getFeature("teams").fetchTeamPlayerBySessionId(t.id))&&this.appendInviteButton("team",t,e,n)}static appendInviteButton(e,t,i,r){let o=i.gameEngine.uiScene;if(!1===a.get(o,"uiTarget",!1))return s.critical('Missing "uiTarget" on uiScene.'),!1;let h=o.cache.html.get(e+"PlayerInvite");if(!h)return s.critical('Template "'+e+'PlayerInvite" not found.'),!1;i.gameDom.appendToElement("#target-container",i.gameEngine.parseTemplate(h,{playerName:r,playerId:t.player_id,inviteLabel:i.config.getWithoutLogs(e+"/labels/inviteLabel",n.LABELS[e.toUpperCase()].INVITE_BUTTON_LABEL)}));let c=i.gameDom.getElement("."+e+"-invite-"+t.player_id+" button");c?.addEventListener("click",()=>{let r={act:n.ACTIONS[e.toUpperCase()+"_INVITE"],id:t.player_id};i.activeRoomEvents.send(r),c.style.display="none",i.gameEngine.clearTarget()})}static targetIsValidPlayer(e,t){return r.TYPE_PLAYER===e.type&&t.playerId!==e.id}static playerBySessionId(e,t){let i=Object.keys(e.players);if(0===i.length)return!1;for(let n of i)if(e.players[n].sessionId===t)return e.players[n];return!1}}},{"813960296055cff0":"eA0W7","26255ed26260a75a":"93TbC","603fc0fc02377d1b":"3lwy5"}],eA0W7:[function(e,t,i){let n="cln.";t.exports.TeamsConst={KEY:"teams",CLAN_KEY:"clan",TEAM_PREF:"tm.",CLAN_PREF:n,NAME_LIMIT:50,CLAN_STARTING_POINTS:1,VALIDATION:{SUCCESS:1,NAME_EXISTS:2,LEVEL_ISSUE:3,CREATE_ERROR:4,CREATE_OWNER_ERROR:5},ACTIONS:{TEAM_INVITE:"tm.inv",TEAM_ACCEPTED:"tm.acp",TEAM_LEAVE:"tm.lev",TEAM_UPDATE:"tm.upd",TEAM_LEFT:"tm.lef",TEAM_REMOVE:"tm.rem",CLAN_INITIALIZE:n+"ini",CLAN_CREATE:n+"new",CLAN_INVITE:n+"inv",CLAN_ACCEPTED:n+"acp",CLAN_LEAVE:n+"lev",CLAN_UPDATE:n+"upd",CLAN_LEFT:n+"lef",CLAN_REMOVE:n+"rem",CLAN_REMOVED:n+"remd",CLAN_NAME:n+"nam"},LABELS:{TEAM:{INVITE_BUTTON_LABEL:"Team - Invite",REQUEST_FROM:"Accept team request from:",LEADER_NAME_TITLE:"Team leader: %leaderName",DISBAND:"Disband Team",LEAVE:"Leave Team",PROPERTY_MAX_VALUE:"/ %propertyMaxValue"},CLAN:{CREATE_CLAN_TITLE:"Clan - Creation",INVITE_BUTTON_LABEL:"Clan - Invite",REQUEST_FROM:"Accept clan request from:",CLAN_TITLE:"Clan: %clanName - Leader: %leaderName",NAME_PLACEHOLDER:"Choose a clan name...",CREATE:"Create",DISBAND:"Disband Clan",LEAVE:"Leave Clan",PROPERTY_MAX_VALUE:"/ %propertyMaxValue",PLAYERS_TITLE:"Connected Players:",MEMBERS_TITLE:"Clan Members:",NONE_CONNECTED:"None"}},CHAT:{MESSAGE:{INVITE_ACCEPTED:"%playerName has accepted your invitation.",INVITE_REJECTED:"%playerName has rejected your invitation.",DISBANDED:"%playerName has disbanded the %groupName.",LEFT:"You left the %groupName.",LEAVE:"%playerName has left the %groupName.",REMOVED:"%playerName has been removed from the %groupName.",ENTER:"%playerName has enter the %groupName.",NOT_ENOUGH_PLAYERS:"The team was disbanded due to a lack of players."}}}},{}],"2r7vd":[function(e,t,i){let{TeamMessageHandler:n}=e("6d14aca88eebc089"),{TeamsConst:r}=e("2253975335b3fdcf"),{Logger:s,sc:a}=e("d3f666b286aee6e5");t.exports.TeamMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on TeamMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on TeamMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isTeamMessage(t)&&this.handleTeamMessage(t,r):(this.isTeamMessage(t)&&(i.teamMessagesQueue||(i.teamMessagesQueue=[]),i.teamMessagesQueue.push(t)),s.error("Invalid TeamMessageHandler",r),!1)}handleTeamMessage(e,t){return r.ACTIONS.TEAM_INVITE===e.act?t.showTeamRequest():r.ACTIONS.TEAM_UPDATE===e.act?t.showTeamBox():r.ACTIONS.TEAM_LEFT!==e.act||t.removeTeamUi()}isTeamMessage(e){return 0===e.act?.indexOf(r.TEAM_PREF)}}},{"6d14aca88eebc089":"4FmFV","2253975335b3fdcf":"eA0W7",d3f666b286aee6e5:"3lwy5"}],"4FmFV":[function(e,t,i){let{UserInterface:n}=e("640ee5228c27b39"),{TeamsConst:r}=e("e52de429595682ab"),{Logger:s,sc:a}=e("3da1dc36372a33e1");t.exports.TeamMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on TeamMessageHandler."),!1):(s.info("Missing message on TeamMessageHandler."),!1):(s.info("Missing RoomEvents on TeamMessageHandler."),!1)}showTeamRequest(){this.createTeamUi(this.teamUiKey()),this.roomEvents.initUi({id:this.teamUiKey(),title:this.gameManager.config.getWithoutLogs("client/team/labels/requestFromTitle",r.LABELS.TEAM.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.TEAM_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-1-"+this.teamUiKey())?.addEventListener("click",()=>{this.gameDom.removeElement(".team-invite")}),this.gameDom.getElement("#opt-2-"+this.teamUiKey())?.addEventListener("click",()=>{this.removeTeamUi()})}removeTeamUi(){let e=this.gameManager.getUiElement(this.teamUiKey());if(!e)return s.error('UI Element not found by team UI key "'+this.teamUiKey()+'".'),!1;e.removeElement(),delete this.uiScene.userInterfaces[this.teamUiKey()],delete this.uiScene.elementsUi[this.teamUiKey()],this.uiScene.currentTeam=!1}teamUiKey(){return r.KEY+this.message.id}showTeamBox(){let e=this.teamUiKey();this.createTeamUi(e);let t=this.gameManager.config.getWithoutLogs("client/team/labels/leaderNameTitle",r.LABELS.TEAM.LEADER_NAME_TITLE).replace("%leaderName",this.message.leaderName),i=this.gameManager.gameDom.getElement("#box-"+e+" .box-content");if(!i)return s.error('Missing container: "#box-'+e+' .box-content".'),!1;let n=this.uiScene.elementsUi[e];this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene);let o=a.get(this.message,"players",!1);this.uiScene.currentTeam=o,this.updateTeamBox(o,i)}createTeamUi(e){return a.get(this.uiScene.userInterfaces,e)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[e]=new n(this.gameManager,{id:e,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-teams.html",r.KEY),this.uiScene.userInterfaces[e].createUiElement(this.uiScene,r.KEY),this.uiScene.userInterfaces[e])}updateTeamBox(e,t){if(!e){s.error("Players not defined.",e);return}let i="";for(let t of Object.keys(e))i+=this.createTeamMemberBox(e[t]);t.innerHTML=this.createTeamContainer(i),this.activateTeamPlayerActions(e),this.activateTeamLeaveButtonAction()}createTeamContainer(e){let t=this.uiScene.cache.html.get("teamContainer");if(!t)return s.error('Missing template "teamContainer".'),"";let i=this.gameManager.playerData.id.toString(),n=i===this.message.id.toString(),a="client/team/labels/",o=n?this.gameManager.config.getWithoutLogs(a+"disbandLabel",r.LABELS.TEAM.DISBAND):this.gameManager.config.getWithoutLogs(a+"leaveLabel",r.LABELS.TEAM.LEAVE),h={teamId:this.message.id,playerId:i,leaveActionLabel:o,teamMembers:e};return this.gameManager.gameEngine.parseTemplate(t,h)}activateTeamLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.gameManager.playerData.id.toString());e?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_LEAVE,id:this.message.id})})}createTeamMemberBox(e){let t=this.uiScene.cache.html.get("teamPlayerData");if(!t)return s.error('Missing template "teamPlayerData".'),"";let i=this.gameManager.playerData.id.toString()===this.message.id.toString();return this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties),playerRemove:i?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("teamRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id}):(s.error('Missing template "teamRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/team/labels/propertyMaxValue",r.LABELS.TEAM.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateTeamPlayerActions(e){for(let t of Object.keys(e)){let i=e[t],n=".team-player-"+i.player_id+" .player-name";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let s=".team-player-"+i.player_id+" .properties-list-container";this.gameDom.getElement(s)?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let a=".team-player-"+i.player_id+" .team-remove-button";this.gameDom.getElement(a)?.addEventListener("click",()=>{this.roomEvents.send({act:r.ACTIONS.TEAM_REMOVE,id:this.message.id,remove:i.player_id})})}}}},{"640ee5228c27b39":"bzImH",e52de429595682ab:"eA0W7","3da1dc36372a33e1":"3lwy5"}],dhhBt:[function(e,t,i){let{ClanMessageHandler:n}=e("ffee11c5f30da2da"),{TeamsConst:r}=e("80c3d53d947c2511"),{Logger:s,sc:a}=e("b7dc8fe4d702b1c7");t.exports.ClanMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ClanMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ClanMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isClanMessage(t)&&this.handleClanMessage(t,r):(this.isClanMessage(t)&&(i.clanMessagesQueue||(i.clanMessagesQueue=[]),i.clanMessagesQueue.push(t)),!1)}handleClanMessage(e,t){return r.ACTIONS.CLAN_INITIALIZE===e.act?t.initializeClanUi():r.ACTIONS.CLAN_CREATE===e.act?r.VALIDATION.SUCCESS===e.result?t.showNewClan():t.initializeClanUi():r.ACTIONS.CLAN_INVITE===e.act?t.showClanRequest():r.ACTIONS.CLAN_UPDATE===e.act?t.showClanBox():r.ACTIONS.CLAN_LEFT===e.act?t.removeClanUi():!r.ACTIONS.CLAN_REMOVED||(t.removeClanUi(),t.initializeClanUi())}isClanMessage(e){return 0===e.act?.indexOf(r.CLAN_PREF)}}},{ffee11c5f30da2da:"9FVGq","80c3d53d947c2511":"eA0W7",b7dc8fe4d702b1c7:"3lwy5"}],"9FVGq":[function(e,t,i){let{UserInterface:n}=e("2dee0f2dc70de1b2"),{TeamsConst:r}=e("435f9309a487dcac"),{Logger:s,sc:a}=e("937cade469140286");t.exports.ClanMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?!!this.uiScene&&this.gameManager.playerData?.id:(s.info("Missing GameManager on ClanMessageHandler."),!1):(s.info("Missing message on ClanMessageHandler."),!1):(s.info("Missing RoomEvents on ClanMessageHandler."),!1)}initializeClanUi(){this.uiScene.currentClan=!1;let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/createClanTitle",r.LABELS.CLAN.CREATE_CLAN_TITLE),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: "#box-clan .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:this.createClanContent()},this.uiScene),this.activateCreateButton(),this.addAndRemoveCaptureKeys()}showNewClan(){let e=this.createClanUi(),t=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.gameManager.currentPlayerName()),i=this.gameManager.gameDom.getElement(".clan-dialog-box .box-content");if(!i)return s.error('Missing container: ".clan-dialog-box .box-content".'),!1;let n=this.uiScene.elementsUi[r.CLAN_KEY];if(!n)return s.error("Clan UI box not found.",{clanUi:e,container:i,uiBox:n}),!1;this.roomEvents.uiSetTitle(n,{title:t}),this.roomEvents.uiSetContent(n,{content:""},this.uiScene),this.updateClanBox(i),this.setClanFromMessage()}showClanRequest(){this.createClanUi(),this.roomEvents.initUi({id:r.CLAN_KEY,title:this.gameManager.config.getWithoutLogs("client/clan/labels/requestFromTitle",r.LABELS.CLAN.REQUEST_FROM),content:this.message.from,options:this.gameManager.config.get("client/ui/options/acceptOrDecline"),overrideSendOptions:{act:r.ACTIONS.CLAN_ACCEPTED,id:this.message.id}}),this.gameDom.getElement("#opt-2-clan")?.addEventListener("click",()=>{this.initializeClanUi()})}showClanBox(){this.createClanUi();let e=this.gameManager.config.getWithoutLogs("client/clan/labels/clanTitle",r.LABELS.CLAN.CLAN_TITLE).replace("%clanName",this.message.clanName).replace("%leaderName",this.message.leaderName),t=this.gameManager.gameDom.getElement("#box-clan .box-content");if(!t)return s.error('Missing container: "#box-clan .box-content".'),!1;let i=this.uiScene.elementsUi[r.CLAN_KEY];this.roomEvents.uiSetTitle(i,{title:e}),this.roomEvents.uiSetContent(i,{content:""},this.uiScene),this.setClanFromMessage(),this.updateClanBox(t)}setClanFromMessage(){let e=a.get(this.message,"players",!1),t=a.get(this.message,"members",!1);this.uiScene.currentClan={id:this.message.id,name:this.message.clanName,leader:this.message.leaderName,ownerId:this.message.ownerId,players:e,members:t}}removeClanUi(){let e=this.gameManager.getUiElement(r.CLAN_KEY);if(!e)return s.error("Clan UI Element not found for remove."),!1;e.removeElement(),delete this.uiScene.userInterfaces[r.CLAN_KEY],delete this.uiScene.elementsUi[r.CLAN_KEY]}createClanUi(){return a.get(this.uiScene.userInterfaces,r.CLAN_KEY)||(this.uiScene.userInterfaces||(this.uiScene.userInterfaces={}),this.uiScene.userInterfaces[r.CLAN_KEY]=new n(this.gameManager,{id:r.CLAN_KEY,type:r.CLAN_KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/teams/templates/ui-clan.html",r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY].createUiElement(this.uiScene,r.CLAN_KEY),this.uiScene.userInterfaces[r.CLAN_KEY])}createClanContent(){let e=this.uiScene.cache.html.get("clanCreate");if(!e)return s.error('Missing template "clanCreate".'),"";let t={playerId:this.gameManager.playerData.id.toString(),createLabel:this.gameManager.config.getWithoutLogs("client/clan/labels/createLabel",r.LABELS.CLAN.CREATE),clanNamePlaceholder:this.gameManager.config.getWithoutLogs("client/clan/labels/namePlaceholder",r.LABELS.CLAN.NAME_PLACEHOLDER)};return this.gameManager.gameEngine.parseTemplate(e,t)}activateCreateButton(){let e=this.gameManager.gameDom.getElement(".clan-dialog-box .submit-clan-create");if(!e)return s.warning('Clan create button not found by ".clan-dialog-box .clan-create".'),!1;let t=this.gameManager.gameDom.getElement(".clan-dialog-box .clan-name-input");if(!t)return s.warning('Clan create button not found by ".clan-dialog-box .clan-name-input".'),!1;e.addEventListener("click",()=>{if(0===t.value.length)return!1;this.gameManager.gameDom.updateContent(".clan-dialog-box .box-content",this.uiScene.cache.html.get("uiLoading")),this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_CREATE,[r.ACTIONS.CLAN_NAME]:t.value})})}updateClanBox(e){let t=a.get(this.message,"players",[]),i=Object.keys(t),n=0===i.length?this.gameManager.config.getWithoutLogs("client/clan/labels/noneConnected",r.LABELS.CLAN.NONE_CONNECTED):"";for(let e of i)n+=this.createClanPlayerBox(t[e]);let s=this.gameManager.playerData.id.toString()===this.message.ownerId.toString(),o=a.get(this.message,"members",[]),h="";for(let e of Object.keys(o))h+=this.createClanMemberBox(o[e],s);e.innerHTML=this.createClanContainer(n,h),this.activateClanPlayersActions(t),this.activateClanMembersActions(o),this.activateClanLeaveButtonAction()}addAndRemoveCaptureKeys(){let e=this.gameManager.getActiveScene(),t=e.availableControllersKeyCodes(),i=this.gameManager.gameDom.getElement(".clan-name-input");e.addAndRemoveCapture(t,i)}createClanContainer(e,t){let i=this.uiScene.cache.html.get("clanContainer");if(!i)return s.error('Missing template "clanContainer".'),"";let n=this.gameManager.playerData.id.toString()===this.message.ownerId.toString()?this.gameManager.config.getWithoutLogs("client/clan/labels/disbandLabel",r.LABELS.CLAN.DISBAND):this.gameManager.config.getWithoutLogs("client/clan/labels/leaveLabel",r.LABELS.CLAN.LEAVE),a={clanId:this.message.id,playerId:this.gameManager.playerData.id.toString(),leaveActionLabel:n,clanPlayersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanPlayersTitle",r.LABELS.CLAN.PLAYERS_TITLE),clanPlayers:e,clanMembersTitle:this.gameManager.config.getWithoutLogs("client/clan/labels/clanMembersTitle",r.LABELS.CLAN.MEMBERS_TITLE),clanMembers:t};return this.gameManager.gameEngine.parseTemplate(i,a)}activateClanLeaveButtonAction(){let e=this.gameManager.gameDom.getElement(".leave-"+this.message.id);e?.addEventListener("click",()=>{let e={act:r.ACTIONS.CLAN_LEAVE,id:this.message.id};this.gameManager.activeRoomEvents.send(e)})}createClanPlayerBox(e){let t=this.uiScene.cache.html.get("clanPlayerData");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.player_id,playerName:e.name,playerProperties:this.createSharedPropertiesContent(e.sharedProperties)}):(s.error('Missing template "clanPlayerData".'),"")}createClanMemberBox(e,t){let i=this.uiScene.cache.html.get("clanMemberData");if(!i)return s.error('Missing template "clanMemberData".'),"";let n=e.id.toString()!==this.message.ownerId.toString();return this.gameManager.gameEngine.parseTemplate(i,{playerId:e.id.toString(),playerName:e.name,clanRemove:t&&n?this.createDismissPlayerButton(e):""})}createDismissPlayerButton(e){let t=this.uiScene.cache.html.get("clanRemove");return t?this.gameManager.gameEngine.parseTemplate(t,{playerId:e.id.toString()}):(s.error('Missing template "clanRemove".'),"")}createSharedPropertiesContent(e){let t=this.uiScene.cache.html.get("teamsSharedProperty");if(!t)return s.error('Missing template "teamsSharedProperty".'),"";let i="";for(let n of Object.keys(e)){t=this.uiScene.cache.html.get("teamsSharedProperty");let s=e[n],o=a.get(s,"max","");""!==o&&(o=this.gameManager.config.getWithoutLogs("client/clan/labels/propertyMaxValue",r.LABELS.CLAN.PROPERTY_MAX_VALUE).replace("%propertyMaxValue",o)),i+=this.gameManager.gameEngine.parseTemplate(t,{key:n,label:s.label,value:s.value,max:o})}return i}activateClanPlayersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-player-"+t+" .player-name",r=".clan-player-"+t+" .properties-list-container",a=this.gameDom.getElement(n);a||s.notice("Player name element not found.",n),a?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)});let o=this.gameDom.getElement(r);a||s.notice("Player properties element not found.",r),o?.addEventListener("click",()=>{this.gameManager.getCurrentPlayer().setTargetPlayerById(i.sessionId)})}}activateClanMembersActions(e){for(let t of Object.keys(e)){let i=e[t],n=".clan-member-"+i.id+" .clan-remove-button";this.gameDom.getElement(n)?.addEventListener("click",()=>{this.gameManager.activeRoomEvents.send({act:r.ACTIONS.CLAN_REMOVE,id:this.message.id,remove:i.id})})}}}},{"2dee0f2dc70de1b2":"bzImH","435f9309a487dcac":"eA0W7","937cade469140286":"3lwy5"}],"58JKl":[function(e,t,i){let{ClanMessageHandler:n}=e("b6102a2bc5547886"),{TeamMessageHandler:r}=e("8b82527a10949305"),{sc:s}=e("600e9765de53cf98");t.exports.MessageProcessor=class{static processClanMessagesQueue(e,t){if(s.isArray(e.clanMessagesQueue)&&0!==e.clanMessagesQueue.length){for(let i of e.clanMessagesQueue)t.handleClanMessage(i,new n({roomEvents:e,message:i}));e.clanMessagesQueue=[]}}static processTeamMessagesQueue(e,t){if(s.isArray(e.teamMessagesQueue)&&0!==e.teamMessagesQueue.length){for(let i of e.teamMessagesQueue)t.handleTeamMessage(i,new r({roomEvents:e,message:i}));e.teamMessagesQueue=[]}}}},{b6102a2bc5547886:"9FVGq","8b82527a10949305":"4FmFV","600e9765de53cf98":"3lwy5"}],"7FChA":[function(e,t,i){let{TeamsConst:n}=e("7ae425e7585f8b77");t.exports.TemplatesHandler=class{static preloadTemplates(e){let t="/assets/features/teams/templates/";e.load.html(n.KEY,t+"ui-teams.html"),e.load.html(n.CLAN_KEY,t+"ui-clan.html"),e.load.html("teamPlayerInvite",t+"team-invite.html"),e.load.html("teamPlayerAccept",t+"team-accept.html"),e.load.html("teamRemove",t+"team-remove.html"),e.load.html("teamContainer",t+"team-container.html"),e.load.html("teamPlayerData",t+"team-player-data.html"),e.load.html("clanCreate",t+"clan-create.html"),e.load.html("clanPlayerInvite",t+"clan-invite.html"),e.load.html("clanPlayerAccept",t+"clan-accept.html"),e.load.html("clanRemove",t+"clan-remove.html"),e.load.html("clanContainer",t+"clan-container.html"),e.load.html("clanPlayerData",t+"clan-player-data.html"),e.load.html("clanMemberData",t+"clan-member-data.html"),e.load.html("teamsSharedProperty",t+"shared-property.html")}}},{"7ae425e7585f8b77":"eA0W7"}],tkJox:[function(e,t,i){let{Translator:n}=e("c0b37a63a164ee2"),{SnippetsUi:r}=e("248d3f3dadbe8854"),{TemplatesHandler:s}=e("1f76a945ba4ca26b"),{TranslationsMapper:a}=e("9f2145cb2c70fb80"),o=e("3cdaeb7ca281fdbe"),{SnippetsConst:h}=e("12b107607eac2374"),{PluginInterface:c}=e("b68fb0c66be53b"),{Logger:l,sc:u}=e("b6c13c4a8fae8965");t.exports.SnippetsPlugin=class extends c{setup(e){if(this.gameManager=u.get(e,"gameManager",!1),!this.gameManager)return l.error("Game Manager undefined in InventoryPlugin."),!1;this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in InventoryPlugin."),a.forConfig(this.gameManager.config.client,o),this.activeLocale=this.gameManager.initialGameData?.userLocale?.locale.locale||h.DEFAULT_LOCALE,this.gameManager.services.translator=new n({snippets:Object.assign({},this.gameManager.config.client.snippets),dataValues:Object.assign({},this.gameManager.config.client.snippetsDataValues),locale:h.DEFAULT_LOCALE,activeLocale:this.activeLocale}),this.listenEvents()}listenEvents(){if(!this.events)return!1;this.events.on("reldens.startEngineScene",async(e,t,i,n)=>{this.gameManager.services.translator.snippets=Object.assign(this.gameManager.services.translator.snippets,this.gameManager.config.client.snippets)}),this.events.on("reldens.preloadUiScene",e=>{s.preloadTemplates(e)}),this.events.on("reldens.createUiScene",e=>{this.uiManager=new r(e),this.uiManager.createUi()})}}},{c0b37a63a164ee2:"aYgYW","248d3f3dadbe8854":"4basu","1f76a945ba4ca26b":"1GX4b","9f2145cb2c70fb80":"1fcQw","3cdaeb7ca281fdbe":"5lWrq","12b107607eac2374":"biSFs",b68fb0c66be53b:"fC3To",b6c13c4a8fae8965:"3lwy5"}],aYgYW:[function(e,t,i){let{SnippetsConst:n}=e("f53f6da57661aae5"),{sc:r}=e("ca9a001439841d68");t.exports.Translator=class{constructor(e){this.snippets=r.get(e,"snippets",{}),this.dataValues=r.get(e,"dataValues",{}),this.locale=r.get(e,"locale",n.DEFAULT_LOCALE),this.activeLocale=r.get(e,"activeLocale",n.DEFAULT_LOCALE)}translate(e,t={},i=!1){i||(i=this.activeLocale);let n=r.get(this.snippets[i],e,e);if(e===n)return e;if(!r.isObject(t))return n;let s=Object.keys(t);if(0===s.length)return n;let a=this.snippetNameSpace(e);for(let e of s){let i=t[e],r="%"+((this.dataValues[a]||{})[e]||e);for(;-1!==n.indexOf(r);)n=n.replace(r,i)}return n}snippetNameSpace(e){let t=e.split(".");return 1===t.length?n.DATA_VALUES_DEFAULT_NAMESPACE:t[0]}t(e,t={},i=!1){return this.translate(e,t,i)}}},{f53f6da57661aae5:"biSFs",ca9a001439841d68:"3lwy5"}],"4basu":[function(e,t,i){let{SnippetsConst:n}=e("9095968e9689ed1b"),{Logger:r,sc:s}=e("4383b901c356e103");t.exports.SnippetsUi=class{constructor(e){this.uiScene=e,this.gameManager=this.uiScene.gameManager,this.translator=this.gameManager.services.translator,this.locales={}}createUi(){this.locales=s.get(this.gameManager.config.client,"locales",{});let e=Object.keys(this.locales);if(1>=e.length)return!1;let t=this.gameManager.gameEngine.parseTemplate(this.uiScene.cache.html.get(n.KEY),{snippetsTitle:this.translator.t("translator.title"),snippetsLabel:this.translator.t("translator.label"),snippetsNotification:this.translator.t("translator.notification")});if(!this.gameManager.gameDom.appendToElement("#settings-dynamic",t))return r.warning("Could not append snippets settings."),!1;let i=this.gameManager.gameDom.getElement(".snippets-setting");if(!i)return r.warning("Snippets settings container not available."),!1;for(let t of e){let e=this.locales[t],n=this.gameManager.gameDom.createElement("option");n.value=e.id,n.innerHTML=e.country_code,i.appendChild(n)}i.addEventListener("change",async()=>{this.gameManager.activeRoomEvents.send({act:n.ACTIONS.UPDATE,up:i.value})})}}},{"9095968e9689ed1b":"biSFs","4383b901c356e103":"3lwy5"}],"1GX4b":[function(e,t,i){let{SnippetsConst:n}=e("da1bec0d581b3bb0");t.exports.TemplatesHandler=class{static preloadTemplates(e){e.load.html(n.KEY,"/assets/features/snippets/templates/ui-snippets.html")}}},{da1bec0d581b3bb0:"biSFs"}],"5lWrq":[function(e,t,i){t.exports={translator:{title:"Languages Settings",label:"Choose your language:",notification:"Changes will take place after next login."}}},{}],aNIyr:[function(e,t,i){let{MessagesListener:n}=e("85a323b712a32599"),{SdkHandler:r}=e("1313cc258c10bcc1"),{ProvidersList:s}=e("939d602a1b11a3bf"),a=e("e0bd7042f0c03284"),{TranslationsMapper:o}=e("ae904a587e959599"),{AdsConst:h}=e("b33cf15ea82be794"),{PluginInterface:c}=e("9d441f820e5e636d"),{Logger:l,sc:u}=e("d2d2d55e6ca71f4b");t.exports.AdsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.gameManager||l.error("Game Manager undefined in AdsPlugin."),this.events=u.get(e,"events",!1),this.events||l.error("EventsManager undefined in AdsPlugin."),this.config={},this.activeProviders={},this.playedAds=null,this.setConfig(),this.setSkdHandler(),this.fetchActiveProviders(),this.setTranslations(),this.listenEvents()}setConfig(){this.config=!!this.gameManager&&this.gameManager.config.get("client/ads/general",{})}setSkdHandler(){let e=this.gameManager?.gameDom;this.sdkHandler=!!e&&new r({gameDom:e,config:this.config})}fetchActiveProviders(){let e=u.get(this.config,"providers",{}),t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=e[i];t.enabled&&(t.classDefinition=u.get(s,i,!1),this.activeProviders[i]=t)}}setTranslations(){if(!this.gameManager)return!1;o.forConfig(this.gameManager.config.client,a,h.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events||!this.gameManager||!this.sdkHandler)return l.error("Missing properties for AdsPlugin."),!1;this.events.on("reldens.beforeCreateEngine",async(e,t)=>{if(!this.sdkHandler){l.info("Undefined SDK Handler.");return}await this.sdkHandler.setupProvidersSdk(this.activeProviders,t)}),this.events.on("reldens.joinedRoom",async e=>{await n.listenMessages(e,this)})}}},{"85a323b712a32599":"abfmj","1313cc258c10bcc1":"cOb0P","939d602a1b11a3bf":"dIdRn",e0bd7042f0c03284:"dPTjY",ae904a587e959599:"1fcQw",b33cf15ea82be794:"8NbLx","9d441f820e5e636d":"fC3To",d2d2d55e6ca71f4b:"3lwy5"}],abfmj:[function(e,t,i){let{AdsConst:n}=e("4348dc3fba513ca9"),{Logger:r}=e("c1c750da7e6bb927");t.exports.MessagesListener=class{static async listenMessages(e,t){e.onMessage("*",e=>{if(n.ACTIONS.ADS_PLAYED!==e.act)return!1;if(t.playedAds={},!e.playedAdsModels)return r.info("None played ads.",e),!1;for(let i of e.playedAdsModels)t.playedAds[i.ads_id]=i;return!0})}}},{"4348dc3fba513ca9":"8NbLx",c1c750da7e6bb927:"3lwy5"}],"8NbLx":[function(e,t,i){t.exports.AdsConst={ENVIRONMENTS:{DISABLED:"disabled"},ADS_TYPES:{EVENT_VIDEO:"eventVideo",BANNER:"banner"},ACTIONS:{ADS_PLAYED:"adsP",AD_STARTED:"adS",AD_ENDED:"adE"},MESSAGE:{DATA_VALUES:{NAMESPACE:"ads"}},AWAIT_ADS_TIME:1e3,VIDEOS_MINIMUM_DURATION:3e3}},{}],cOb0P:[function(e,t,i){let{Logger:n,sc:r}=e("e03372517c231481");t.exports.SdkHandler=class{constructor(e){this.gameDom=r.get(e,"gameDom",!1)}async setupProvidersSdk(e,t){if(!this.gameDom)return n.error("Undefined GameDOM on SdkHandler."),!1;if(!r.isObject(e))return!1;let i=Object.keys(e);if(0===i.length)return!1;for(let r of i){let i=e[r];await this.appendSdk(i),await this.activateSdkInstance(i,t),n.info("Activated Ads SDK: "+i.key,i)}}async appendSdk(e){let t=r.get(e,"sdkUrl","");if(""===t)return!1;let i=this.gameDom.getElement("body"),n=this.gameDom.createElement("script");return n.src=t,i.append(n),!0}async activateSdkInstance(e,t){e.classDefinition&&(e.service=new e.classDefinition(e,t,e.activeAds)),r.isFunction(e.service?.activate)&&await e.service.activate()}}},{e03372517c231481:"3lwy5"}],dIdRn:[function(e,t,i){let{CrazyGames:n}=e("e56ab7764646c7b3"),{GameMonetize:r}=e("1a058a436deb6e61"),{GoogleAdSense:s}=e("e8b34c41dab1ace");t.exports.ProvidersList={crazyGames:n,gameMonetize:r,googleAdSense:s}},{e56ab7764646c7b3:"3CRbF","1a058a436deb6e61":"6XwV3",e8b34c41dab1ace:"8V0yJ"}],"3CRbF":[function(e,t,i){let{BannersHandler:n}=e("f96686ce9c54877d"),{VideosHandler:r}=e("786a85289268fabd"),{AdsProvider:s}=e("25abe1dccff858a9"),{AdsConst:a}=e("9c8391f4374e1d6f"),{Logger:o}=e("ff1ebd8b8b8b16e6");t.exports.CrazyGames=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.sdk=this.window?.CrazyGames?.SDK,this.retry=0,this.environment=a.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.metaData.sdkBannerRefreshTime||(this.metaData.sdkBannerRefreshTime=6e4),this.activeAds=this.fetchActiveAds(e);let i={gameManager:t,metaData:e,sdk:this.sdk,hasAdblock:this.hasAdblock,isEnabled:this.isEnabled};this.bannersHandler=new n(i),this.videosHandler=new r(i)}fetchActiveAds(e){return this.gameManager?.config?s.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}validAdsTypes(){return[a.ADS_TYPES.BANNER,a.ADS_TYPES.EVENT_VIDEO]}async activate(){return this.sdk?(this.environment=await this.sdk.getEnvironment(),this.bannersHandler.sdk=this.sdk,this.videosHandler.sdk=this.sdk,!await this.hasAdblock()&&void await this.activateAds()):(this.retry===this.metaData.sdkMaxRetries?o.critical("CrazyGames required object."):this.retry{this.retry++,o.info("CrazyGames required object, retry #"+this.retry+"."),this.sdk=this.window?.CrazyGames?.SDK,this.sdk&&o.info("CrazyGames object found."),this.activate()},this.metaData.sdkRetryTime),!1)}async hasAdblock(){try{let e=await this.sdk.ad.hasAdblock();return e&&o.critical("Adblock detected, please disable."),e}catch(e){o.info("SDK detected error.",e)}return!1}async isEnabled(){return a.ENVIRONMENTS.DISABLED!==await this.sdk.getEnvironment()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return!1;for(let t of e){let e=this.activeAds[t];a.ADS_TYPES.BANNER===e.type.key&&await this.bannersHandler.activateAdBanner(e),a.ADS_TYPES.EVENT_VIDEO===e.type.key&&await this.videosHandler.activateAdVideo(e)}}}},{f96686ce9c54877d:"rqZs2","786a85289268fabd":"74T2t","25abe1dccff858a9":"iayFu","9c8391f4374e1d6f":"8NbLx",ff1ebd8b8b8b16e6:"3lwy5"}],rqZs2:[function(e,t,i){let{Validator:n}=e("3e58599d4b199bfe"),{Logger:r,sc:s}=e("16dda0dd59cf6195");t.exports.BannersHandler=class{constructor(e){this.gameManager=s.get(e,"gameManager",!1),this.metaData=s.get(e,"metaData",{}),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=s.get(e,"sdk",!1),this.hasAdblock=s.get(e,"hasAdblock",!1),this.isEnabled=s.get(e,"isEnabled",!1),this.activeBanners={},this.validator=new n}availableBanners(){return["728x90","300x250","320x50","468x60","320x100"]}availableResponsiveBanners(){return["970x90","320x50","160x600","336x280","728x90","300x600","468x60","970x250","300x250","250x250","120x600"]}validBannerSize(e){return -1!==this.availableBanners().indexOf(e)}validResponsiveBannerSize(e){return -1!==this.availableResponsiveBanners().indexOf(e)}async activateAdBanner(e){if(!e)return r.info("Missing activate ad.",e),!1;if(!this.validator.validate(this))return r.info("Invalid banner."),!1;let t=e.bannerData;if(!t)return r.info("No banner data."),!1;let i=s.get(t,"fullTime",!1),n=s.get(t,"responsive",!1);if(i)return await this.handleBannerType(n,e);let a=s.get(t,"uiReferenceIds",[]);if(0===a.length)return r.warning("Missing banner reference ID."),!1;this.events.on("reldens.openUI",async t=>{if(-1!==a.indexOf("ANY")||-1!==a.indexOf(t.openButton.id)){let i=e.id+"-"+t.openButton.id,r=new Date().getTime(),a=s.get(this.activeBanners,i,!1);if(a&&r{let i=e.id+"-"+t.openButton.id,n=s.get(this.activeBanners,i,!1);n&&n.banner.classList.add("hidden")})}async handleBannerType(e,t,i){return e?this.createResponsiveBanner(t,i):await this.createBanner(t,i)}async createBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=s.get(e.styles,"width","300"),n=s.get(e.styles,"height","250");if(!this.validBannerSize(i+"x"+n))return r.info("CrazyGames - Invalid Banner size."),!1;let a=t||e.id;if(!a)return r.info("CrazyGames - Missing container ID.",e,t),!1;let o=this.gameDom.createElement("div","banner-container-"+a);this.gameDom.getElement("body")?.append(o),await this.isEnabled()&&await this.sdk.banner.requestBanner({id:o.id,width:i,height:n});let h=this.mapStylesWithValues(Object.assign({width:i,height:n},e));return this.gameDom.setElementStyles(o,h),o.classList.add("ads-banner-container"),o}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}mapStylesWithValues(e){let t={"z-index":2e8,width:s.get(e,"width",300),height:s.get(e,"height",250),position:""===s.get(e.styles,"position","")?e.position:"absolute"},i=s.get(e.styles,"top",null);null!==i&&(t.top=i);let n=s.get(e.styles,"bottom",null);null!==n&&(t.bottom=n);let r=s.get(e.styles,"left",null);null!==r&&(t.left=r);let a=s.get(e.styles,"right",null);return null!==a&&(t.right=a),t}async createResponsiveBanner(e,t){if(!this.validator.validate(this)||!await this.validator.canBeActivated(this))return!1;if(!this.isEnabled())return r.info("SDK not enabled."),!1;try{let i=t||e.id;if(!i)return r.info("CrazyGames - Missing container ID.",e,t),!1;let n=this.gameDom.createElement("div","responsive-banner-container-"+i),s=this.mapStylesWithValues(e);return delete s.width,delete s.height,this.gameDom.setElementStyles(n,s),this.gameDom.getElement("body").append(n),await this.isEnabled()&&await this.sdk.banner.requestResponsiveBanner(n.id),n.classList.add("ads-banner-container"),n}catch(e){return r.critical("CrazyGames - Error on banner request.",e),!1}}}},{"3e58599d4b199bfe":"dZuZ9","16dda0dd59cf6195":"3lwy5"}],dZuZ9:[function(e,t,i){let{Logger:n,sc:r}=e("11b40ed905e7acf1");t.exports.Validator=class{validate(e){return e.gameManager?e.sdk?(e.hasAdblock&&r.isFunction(e.hasAdblock)||n.warning("Missing or invalid hasAdblock function on Validator.",e),!!(e.isEnabled&&r.isFunction(e.isEnabled))||(n.error("Missing or invalid isEnabled function on Validator.",e),!1)):(n.error("Missing SDK on Validator.",e),!1):(n.error("Missing Game Manager on Validator.",e),!1)}async canBeActivated(e){return!(!r.isFunction(e.hasAdblock)||await e.hasAdblock())||(n.info("AdBlocker detected."),!1)}}},{"11b40ed905e7acf1":"3lwy5"}],"74T2t":[function(e,t,i){let{Validator:n}=e("eb221c6f45d898b0"),{AdsConst:r}=e("ff99f7bef03d711b"),{Logger:s,sc:a}=e("111cbb28b14bd31b");t.exports.VideosHandler=class{constructor(e){this.gameManager=a.get(e,"gameManager",!1),this.gameDom=this.gameManager?.gameDom,this.events=this.gameManager?.events,this.sdk=a.get(e,"sdk",!1),this.hasAdblock=a.get(e,"hasAdblock",!1),this.isEnabled=a.get(e,"isEnabled",!1),this.validator=new n,this.isPlayingAd=!1,this.setConfig()}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/crazyGames/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}async activateAdVideo(e){let t=a.get(e,"eventKey",!1);if(!t)return s.warning("Missing event key.",e),!1;this.events.on(t,async t=>this.isPlayingAd?(s.info("CrazyGames - Another ad is been played."),!1):this.validator.validate(this)&&await this.validator.canBeActivated(this)?this.isEnabled()?await this.tryRePlay(e):(s.info("CrazyGames - SDK not enabled."),!1):(s.error("CrazyGames - Ad can not be activated."),!1))}async tryRePlay(e){let t=this.gameManager.getFeature("ads");if(null===t.playedAds)return setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1;if(a.get(t?.playedAds,e.id,!1)&&!e.replay)return s.info("Ad already played",e),!1;let i=a.get(e,"adStartedCallback",()=>{this.isPlayingAd=!0,s.info("CrazyGames - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:e.id})}),n=a.get(e,"adFinishedCallback",async()=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),o=a.get(e,"adErrorCallback",async t=>{this.isPlayingAd=!1,s.info("CrazyGames - Ad-error callback.",t,new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:e.id,error:t}),await this.gameManager.audioManager.changeMuteState(!1,!1)}),h=a.get(e,"rewardItemKey",!1);await this.gameManager.audioManager.changeMuteState(!0,!0),await this.sdk.ad.requestAd(h?"rewarded":"midgame",{adStarted:i,adFinished:n,adError:o})}send(e){let t=this.gameManager?.activeRoomEvents;return t?t?.send(e):(s.warning("CrazyGames - RoomEvents undefined to send an Ad Video message."),!1)}}},{eb221c6f45d898b0:"dZuZ9",ff99f7bef03d711b:"8NbLx","111cbb28b14bd31b":"3lwy5"}],iayFu:[function(e,t,i){let{Logger:n}=e("55d686c62dfd5353");t.exports.AdsProvider=class{static fetchActiveAdsByProviderId(e,t,i){if(!e)return{};let r=Object.keys(i);if(0===r.length)return{};let s={};for(let a of r){let r=i[a];if(e===r.provider.id){if(!r.enabled){n.info("Ad not enabled.",r);continue}if(-1===t.indexOf(r.type.key)){n.info("Invalid ad type.",r);continue}s[a]=r}}return n.info({providerId:e,activeProviderAds:s}),s}}},{"55d686c62dfd5353":"3lwy5"}],"6XwV3":[function(e,t,i){let{AdsProvider:n}=e("f98142cce04e846c"),{AdsConst:r}=e("44a48259b87a5721"),{Logger:s,sc:a}=e("b637051a2a3ead94");t.exports.GameMonetize=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e,this.setSdkOptions(),this.sdk=this.window?.sdk,this.retry=0,this.isPlayingAd=!1,this.environment=r.ENVIRONMENTS.DISABLED,this.metaData.sdkRetryTime||(this.metaData.sdkRetryTime=500),this.metaData.sdkMaxRetries||(this.metaData.sdkMaxRetries=10),this.activeAds=this.fetchActiveAds(e),this.activeAdBeenPlayed=!1,this.setConfig()}fetchActiveAds(e){return this.gameManager?.config?n.fetchActiveAdsByProviderId(e.id,this.validAdsTypes(),this.gameManager.config.get("client/ads/collection",{})):{}}eventKeys(){return{sdkAdStarted:"CONTENT_PAUSE_REQUESTED",sdkAdEnded:"SDK_GAME_START",sdkReady:"SDK_READY"}}setSdkOptions(){return!!this.gameDom&&(this.metaData.gameId?void(this.gameDom.getWindow().SDK_OPTIONS={gameId:this.metaData.gameId,onEvent:async e=>{switch(s.info("GameMonetize - SDK event fired: "+e.name),e.name){case this.eventKeys().sdkAdStarted:await this.adStartedCallback(e);break;case this.eventKeys().sdkAdEnded:await this.adEndedCallback(e);break;case this.eventKeys().sdkReady:await this.sdkReadyCallback(e)}}}):(s.error("GameMonetize - Game ID undefined."),!1))}setConfig(){this.videoMinimumDuration=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/videoMinimumDuration",r.VIDEOS_MINIMUM_DURATION):r.VIDEOS_MINIMUM_DURATION,this.awaitAdsTime=this.gameManager?this.gameManager.config.getWithoutLogs("client/ads/general/providers/gameMonetize/awaitAdsTime",r.AWAIT_ADS_TIME):r.AWAIT_ADS_TIME}validAdsTypes(){return[r.ADS_TYPES.EVENT_VIDEO]}async adStartedCallback(e){if(this.isPlayingAd=!0,await this.gameManager.audioManager.changeMuteState(!0,!0),!this.activeAdBeenPlayed)return s.info("AdStartedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-started callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_STARTED,ads_id:this.activeAdBeenPlayed.id})}async adEndedCallback(e){if(this.isPlayingAd=!1,await this.gameManager.audioManager.changeMuteState(!1,!1),!this.activeAdBeenPlayed)return s.info("AdEndedCallback undefined activeAd.",e,this.activeAdBeenPlayed),!1;s.info("GameMonetize - Ad-finished callback.",new Date().getTime()),this.send({act:r.ACTIONS.AD_ENDED,ads_id:this.activeAdBeenPlayed.id})}async sdkReadyCallback(e){this.sdk=this.window.sdk}async activate(){if(!this.sdk)return this.retry===this.metaData.sdkMaxRetries?s.critical("GameMonetize required object."):this.retry{this.retry++,s.info("GameMonetize required object, retry #"+this.retry+"."),this.sdk=this.window?.sdk,this.sdk&&s.info("GameMonetize object found."),this.activate()},this.metaData.sdkRetryTime),!1;await this.activateAds()}async activateAds(){let e=Object.keys(this.activeAds);if(0===e.length)return s.info("None active ads."),!1;for(let t of e){let e=this.activeAds[t];if(r.ADS_TYPES.EVENT_VIDEO!==e.type.key)continue;let i=a.get(e,"eventKey",!1);if(!i)return s.warning("Missing event key.",e),!1;this.events.on(i,async t=>(s.info("GameMonetize - Video event fired, playing ad.",t,e),this.isPlayingAd)?(s.info("GameMonetize - Ad is been played."),!1):await this.tryRePlay(e))}}async tryRePlay(e){return null===this.gameManager.getFeature("ads").playedAds?(setTimeout(()=>{this.tryRePlay(e)},this.awaitAdsTime),!1):(this.activeAdBeenPlayed=e,a.isObjectFunction(this.sdk,"showBanner"))?void await this.sdk.showBanner():(s.critical("GameMonetize SDK not ready."),!1)}send(e){let t=this.gameManager?.activeRoomEvents;return t?t.send(e):(s.warning("GameMonetize - RoomEvents undefined to send an Ad Video message."),!1)}}},{f98142cce04e846c:"iayFu","44a48259b87a5721":"8NbLx",b637051a2a3ead94:"3lwy5"}],"8V0yJ":[function(e,t,i){t.exports.GoogleAdSense=class{constructor(e,t){this.gameManager=t,this.gameDom=t?.gameDom,this.events=t?.events,this.window=t?.gameDom?.getWindow(),this.metaData=e}}},{}],dPTjY:[function(e,t,i){t.exports={ads:{}}},{}],"79nNs":[function(e,t,i){let{DebugWorldCreator:n}=e("2f104c4a1fe36eaf"),{PluginInterface:r}=e("c03d54e76a300c60"),{Logger:s,sc:a}=e("56ce9c7fd2ae3df6");t.exports.WorldPlugin=class extends r{setup(e){this.gameManager=a.get(e,"gameManager",!1),this.events=a.get(e,"events",!1),this.debugWorldCreator=!1,this.validateProperties()&&this.setupDebugMode()}validateProperties(){return this.gameManager?!!this.events||(s.error("EventsManager undefined in PredictionPlugin."),!1):(s.error("Game Manager undefined in PredictionPlugin."),!1)}setupDebugMode(){if(!this.gameManager.config.getWithoutLogs("client/world/debug/enabled",!1))return!1;this.debugWorldCreator=new n,this.events.on("reldens.createEngineSceneDone",async e=>{await this.debugWorldCreator.createSceneWorld(e.currentScene)})}}},{"2f104c4a1fe36eaf":"2tOiq",c03d54e76a300c60:"fC3To","56ce9c7fd2ae3df6":"3lwy5"}],"2tOiq":[function(e,t,i){let{Renderer:n}=e("7f57d693a727d80"),{P2world:r}=e("56e554b827a8b617"),{WorldTimer:s}=e("b75a99257129c956"),{Logger:a}=e("493b121a06799e1e");t.exports.DebugWorldCreator=class{async createSceneWorld(e){let t=this.findValidLayers(e),i=this.cloneMapJson(e,t),r={sceneName:e.key,roomId:e.params.roomId,roomMap:e.params.roomName,mapJson:i,config:e.configManager,events:e.eventsManager,allowSimultaneous:e.configManager.get("client/general/controls/allowSimultaneousKeys",!0),worldConfig:e.gameManager.activeRoomEvents.sceneData?.worldConfig||e.worldConfig};e.debugWorld=this.createWorldInstance(r),e.debugWorld.createLimits(),await e.debugWorld.createWorldContent({}),e.debugWorldTimer=new s({callbacks:[()=>{if(!e.debugWorld){a.error("Scene World not longer exists.",e.roomWorld);return}e.debugWorld.removeBodiesFromWorld()}]}),e.debugWorldTimer.startWorldSteps(e.debugWorld),e.debugWorldRenderer=new n(e)}cloneMapJson(e,t){let i=e.tilesets[0];return i?Object.assign({},e.cache?.tilemap?.entries?.entries[i.name]?.data||{},{layers:t}):{}}findValidLayers(e){let t=[],i=e.tilesets[0];if(!i)return t;for(let n of e.cache.tilemap.entries.entries[i.name].data.layers)-1!==n.name.indexOf("collision")&&t.push(n);return t}createWorldInstance(e){return new r(e)}}},{"7f57d693a727d80":"6kVuK","56e554b827a8b617":"hvh2r",b75a99257129c956:"5zAcU","493b121a06799e1e":"3lwy5"}],"6kVuK":[function(e,t,i){let{Box:n}=e("43cbaab4204b970");t.exports.Renderer=class{constructor(e){this.scene=e,this.gameDom=e.gameManager.gameDom,this.world=e.debugWorld,this.canvasElement=!1,this.canvasContext=!1}fetchCanvasContext(){this.canvasContext=this.canvasElement.getContext("2d")}createCanvas(e,t){this.canvasElement=this.gameDom.createElement("canvas"),this.canvasElement.width=e,this.canvasElement.height=t,this.canvasElement.id="physicsCanvas",this.gameDom.getDocument().body.appendChild(this.canvasElement),this.fetchCanvasContext()}renderLoop(){this.canvasContext.clearRect(0,0,this.canvasElement.width,this.canvasElement.height),this.renderP2World(),this.gameDom.getWindow().requestAnimationFrame(this.renderLoop.bind(this))}renderP2World(){let e=this.canvasContext;for(let t=0;t{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{let t=e?.roomEvents;if(!t)return l.critical("RoomEvents undefined for process Scores messages queue on ScoresPlugin.",e),!1;s.processScoresMessagesQueue(t,this.scoresMessageListener)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in ScoresPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.scoresMessageListener}}},{"3b8c6a6b532efef7":"l5kMc","886a0d766603abc":"fpFc7",e89935d10dce4cba:"d0zyM",e991266a552fb051:"5oUd3",b0db3ae90acf0cc5:"beAgN",e0289d80f135b58e:"1fcQw","84d6714fa827e3e1":"fC3To",f46d2ddbf227db3d:"3lwy5"}],l5kMc:[function(e,t,i){let{ScoresConst:n}=e("fc16b961896d9e7e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/scores/templates/";e.load.html(n.KEY,t+"ui-scores.html"),e.load.html(n.TEMPLATES.SCORES_TABLE,t+"ui-scores-table.html")}}},{fc16b961896d9e7e:"5oUd3"}],"5oUd3":[function(e,t,i){let n="scores.";t.exports.ScoresConst={KEY:"scores",PREFIX:"sco",ACTIONS:{UPDATE:"scoUp",TOP_SCORES_UPDATE:"scoTops"},TEMPLATES:{SCORES_TABLE:"scoresTable"},MESSAGE:{DATA_VALUES:{NAMESPACE:"scores"}},SNIPPETS:{PREFIX:n,TITLE:n+"scoresTitle",CONTENT:n+"scoresContent",MY_SCORE:n+"myScore"}}},{}],fpFc7:[function(e,t,i){let{ScoresMessageHandler:n}=e("d156c5882f191e51"),{ScoresConst:r}=e("2e4cd336beabe6ca"),{Logger:s,sc:a}=e("aebac8790f258c87");t.exports.ScoresMessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on ScoresMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on ScoresMessageListener.",e),!1;let r=new n({roomEvents:i,message:t});return r.validate()?!!this.isScoresMessage(t)&&this.handleScoresMessage(t,r):this.isScoresMessage(t)?(i.scoresMessagesQueue||(i.scoresMessagesQueue=[]),i.scoresMessagesQueue.push(t),!0):(s.error("Invalid ScoresMessageHandler",r),!1)}handleScoresMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updatePlayerScore():r.ACTIONS.TOP_SCORES_UPDATE!==e.act||t.updateScoresBox()}isScoresMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{d156c5882f191e51:"e8G1n","2e4cd336beabe6ca":"5oUd3",aebac8790f258c87:"3lwy5"}],e8G1n:[function(e,t,i){let{UserInterface:n}=e("a45d421f329cd9bb"),{ScoresConst:r}=e("78e1225607fe67de"),{Logger:s,sc:a}=e("98287ac0824fa508");t.exports.ScoresMessageHandler=class{constructor(e){this.roomEvents=a.get(e,"roomEvents",!1),this.message=a.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(s.info("Missing GameManager on ScoresMessageHandler."),!1):(s.info("Missing message on ScoresMessageHandler."),!1):(s.info("Missing RoomEvents on ScoresMessageHandler."),!1)}createScoresUi(){let e=a.get(this.uiScene.userInterfaces,r.KEY);if(e)return e;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let t=new n(this.gameManager,{id:r.KEY,type:r.KEY,defaultOpen:!0,defaultClose:!0},"/assets/features/scores/templates/ui-scores.html",r.KEY);t.createUiElement(this.uiScene,r.KEY);let i=this.uiScene.elementsUi[r.KEY];if(!i)return s.error("Scores UI box not found.",{uiScores:t,uiBox:i}),!1;let o=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/title",r.SNIPPETS.TITLE)),h=this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/content",r.SNIPPETS.CONTENT));return this.roomEvents.uiSetTitleAndContent(i,{title:o,content:h},this.uiScene),this.uiScene.userInterfaces[r.KEY]=t,this.uiScene.userInterfaces[r.KEY]}updatePlayerScore(){this.createScoresUi(r.KEY);let e=a.get(this.message,"newTotalScore",!1);if(!e){s.debug("Missing new total score on update message.");return}this.uiScene.currentPlayerScore=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}updateScoresBox(){this.createScoresUi(r.KEY);let e=a.get(this.message,"scores",!1);if(!e){s.debug("Missing scores data on message.");return}this.uiScene.scores=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createContentsUpdate()},this.uiScene)}createContentsUpdate(){let e=this.uiScene.cache.html.get(r.TEMPLATES.SCORES_TABLE);if(!e)return s.error('Missing template "'+r.TEMPLATES.SCORES_TABLE+'".'),"";let t={scores:this.uiScene.scores,showCurrentPlayer:!0,currentPlayerScore:this.gameManager.services.translator.t(this.gameManager.config.getWithoutLogs("client/scores/labels/myScore",r.SNIPPETS.MY_SCORE),{myScore:this.uiScene.currentPlayerScore||"0"})};return this.gameManager.gameEngine.parseTemplate(e,t)}}},{a45d421f329cd9bb:"bzImH","78e1225607fe67de":"5oUd3","98287ac0824fa508":"3lwy5"}],d0zyM:[function(e,t,i){let{ScoresMessageHandler:n}=e("45ab9844bbd919a8"),{sc:r}=e("d9c441fdb0377cf");t.exports.MessageProcessor=class{static processScoresMessagesQueue(e,t){if(r.isArray(e.scoresMessagesQueue)&&0!==e.scoresMessagesQueue.length){for(let i of e.scoresMessagesQueue)t.handleScoresMessage(i,new n({roomEvents:e,message:i}));e.scoresMessagesQueue=[]}}}},{"45ab9844bbd919a8":"e8G1n",d9c441fdb0377cf:"3lwy5"}],beAgN:[function(e,t,i){t.exports={scores:{scoresTitle:"Top Players Scores",scoresContent:"No scores available.",myScore:"My score: %myScore"}}},{}],"4p1ha":[function(e,t,i){let{PreloaderHandler:n}=e("efc9996b9ceaadce"),{MessageListener:r}=e("ef29ab05ba87fd5"),{MessageProcessor:s}=e("bd6312294795cf1c"),{RewardsConst:a}=e("a60c417cf40e6e4e"),o=e("702d39ed6c29ddf6"),{TranslationsMapper:h}=e("e6ea40ce120e2033"),{PluginInterface:c}=e("78f7099074cee28a"),{Logger:l,sc:u}=e("76d1b05ad0acce3a");t.exports.RewardsPlugin=class extends c{setup(e){this.gameManager=u.get(e,"gameManager",!1),this.events=u.get(e,"events",!1),this.preloaderHandler=new n,this.messageListener=new r,this.validateProperties()&&(this.setTranslations(),this.listenEvents(),this.listenMessages(),l.debug("Plugin READY: Rewards"))}validateProperties(){return this.gameManager?!!this.events||(l.error("EventsManager undefined in RewardsPlugin."),!1):(l.error("Game Manager undefined in RewardsPlugin."),!1)}setTranslations(){if(!this.gameManager)return!1;h.forConfig(this.gameManager.config.client,o,a.MESSAGE.DATA_VALUES)}listenEvents(){if(!this.events){l.error('EventsManager undefined in RewardsPlugin for "listenEvents".');return}this.events.on("reldens.preloadUiScene",e=>{this.preloaderHandler.loadContents(e)}),this.events.on("reldens.createEngineSceneDone",e=>{s.processRewardsMessagesQueue(e,this)})}listenMessages(){if(!this.gameManager||!this.events){l.error('Game Manager or EventsManager undefined in RewardsPlugin for "listenMessages".');return}this.gameManager.config.client.message.listeners[a.KEY]=this.messageListener}}},{efc9996b9ceaadce:"8NCLg",ef29ab05ba87fd5:"jXzBf",bd6312294795cf1c:"h8UKT",a60c417cf40e6e4e:"lIgFH","702d39ed6c29ddf6":"carao",e6ea40ce120e2033:"1fcQw","78f7099074cee28a":"fC3To","76d1b05ad0acce3a":"3lwy5"}],"8NCLg":[function(e,t,i){let{RewardsConst:n}=e("c14067eab2e5b23e");t.exports.PreloaderHandler=class{loadContents(e){let t="/assets/features/rewards/templates/";e.load.html(n.KEY,t+"ui-rewards.html"),e.load.html(n.TEMPLATES.REWARDS_LIST,t+"ui-rewards-list.html")}}},{c14067eab2e5b23e:"lIgFH"}],lIgFH:[function(e,t,i){let n="rewards.";t.exports.RewardsConst={KEY:"rewards",PREFIX:"rwd",ACTIONS:{INITIALIZE:"rwdIni",UPDATE:"rwdUp",ACCEPT_REWARD:"rwdAcpt",ACCEPTED_REWARD:"rwdAcpted"},SPLIT_EXPERIENCE:{ALL:0,PROPORTIONAL_BY_LEVEL:1},SPLIT_MODIFIER:{ALL:0,RANDOM:1},SPLIT_ITEMS:{DROP_KEEPS:0,RANDOM:1},MESSAGE:{DATA:{LABEL:"rlbl",DESCRIPTION:"rdes",POSITION:"rpos",SHOW_REWARD_IMAGE:"srimg",REWARD_IMAGE:"rimg",REWARD_IMAGE_PATH:"rimgp",EVENT_DATA:"redt",STATE_DATA:"resd",ITEMS_DATA:"rmid",ITEM_KEY:"rikey",ITEM_LABEL:"rilbl",ITEM_DESCRIPTION:"rides",ITEM_QUANTITY:"riqty"},DATA_VALUES:{NAMESPACE:"rewards"}},TEMPLATES:{REWARDS_LIST:"rewardsList"},SNIPPETS:{PREFIX:n,TITLE:n+"title",ACCEPTED_REWARD:n+"acceptedReward"}}},{}],jXzBf:[function(e,t,i){let{MessageHandler:n}=e("4d23f5e42478957c"),{RewardsConst:r}=e("bda46dc94809b55d"),{Logger:s,sc:a}=e("a4007c1db9e3ae27");t.exports.MessageListener=class{async executeClientMessageActions(e){let t=a.get(e,"message",!1);if(!t)return s.error("Missing message data on RewardsMessageListener.",e),!1;let i=a.get(e,"roomEvents",!1);if(!i)return s.error("Missing RoomEvents on RewardsMessageListener.",e),!1;if(!this.isRewardsMessage(t))return!1;let r=new n({roomEvents:i,message:t});return r.validate()?this.handleRewardsMessage(t,r):(i.rewardsMessagesQueue||(i.rewardsMessagesQueue=[]),i.rewardsMessagesQueue.push(t),!0)}handleRewardsMessage(e,t){return r.ACTIONS.UPDATE===e.act?t.updateRewardsBox():r.ACTIONS.ACCEPTED_REWARD!==e.act||t.showAcceptedReward()}isRewardsMessage(e){return 0===e.act?.indexOf(r.PREFIX)}}},{"4d23f5e42478957c":"4T3oM",bda46dc94809b55d:"lIgFH",a4007c1db9e3ae27:"3lwy5"}],"4T3oM":[function(e,t,i){let{UserInterface:n}=e("8d4a3a8b8eeaff6"),{RewardsConst:r}=e("677bd2d65b92e557"),{GameConst:s}=e("7a270c9c6c08724"),{Logger:a,sc:o}=e("70b77844d02b2070");t.exports.MessageHandler=class{constructor(e){this.roomEvents=o.get(e,"roomEvents",!1),this.message=o.get(e,"message",!1),this.gameManager=this.roomEvents?.gameManager,this.gameDom=this.gameManager?.gameDom,this.config=this.gameManager?.config,this.translator=this.gameManager?.services?.translator,this.uiScene=this.gameManager?.gameEngine?.uiScene}validate(){return this.roomEvents?this.message?this.gameManager?this.uiScene:(a.info("Missing GameManager on RewardsMessageHandler."),!1):(a.info("Missing message on RewardsMessageHandler."),!1):(a.info("Missing RoomEvents on RewardsMessageHandler."),!1)}createRewardsUi(e){let t=o.get(this.uiScene.userInterfaces,e);if(t)return t;this.uiScene.userInterfaces||(this.uiScene.userInterfaces={});let i=new n(this.gameManager,{id:e,type:e,defaultOpen:!0,defaultClose:!0},"/assets/features/rewards/templates/ui-rewards.html",e);i.createUiElement(this.uiScene,e),i.closeButton.addEventListener("click",()=>{this.gameDom.emptyElement(".accepted-reward")});let s=this.uiScene.elementsUi[e];if(!s)return a.error("Scores UI box not found.",{uiRewards:i,uiBox:s}),!1;let h=this.translator.t(this.config.getWithoutLogs("client/rewards/labels/title",r.SNIPPETS.TITLE));return this.roomEvents.uiSetTitleAndContent(s,{title:h},this.uiScene),this.uiScene.userInterfaces[e]=i,this.uiScene.userInterfaces[e]}updateRewardsBox(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"rewards",!1);if(!e){a.debug("Missing rewards data on message.");return}this.enrichForDisplay(e),this.uiScene.rewards=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene),this.showRewardsNotificationBalloon(),this.activateRewardsAction()}showAcceptedReward(){this.createRewardsUi(r.KEY);let e=o.get(this.message,"acceptedReward",!1);if(!e){a.debug("Missing rewards on update message.");return}this.enrichForDisplay([e]),this.uiScene.acceptedReward=e,this.roomEvents.uiSetContent(this.uiScene.elementsUi[r.KEY],{content:this.createUpdateContent()},this.uiScene)}createUpdateContent(){let e=this.uiScene.cache.html.get(r.TEMPLATES.REWARDS_LIST);if(!e)return a.error('Missing template "'+r.TEMPLATES.REWARDS_LIST+'".'),"";let t=this.uiScene.acceptedReward,i=t?this.translator.t(this.config.getWithoutLogs("client/rewards/labels/acceptedReward",r.SNIPPETS.ACCEPTED_REWARD),{rewardLabel:t.translated.label}):"",n={rewards:this.uiScene.rewards,acceptedReward:t,acceptedRewardMessage:i};return this.gameManager.gameEngine.parseTemplate(e,n)}enrichForDisplay(e){for(let t of e){let e=this.translator.t(t[r.MESSAGE.DATA.DESCRIPTION]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});this.config.getWithoutLogs("client/rewards/labels/includeItemsDescription",!0)&&(e+=this.mapItemsText(t));let i=this.translator.t(t[r.MESSAGE.DATA.LABEL]||"",{loginCount:t[r.MESSAGE.DATA.EVENT_DATA]?.days||""});t.translated={label:i,description:e};let n=t[r.MESSAGE.DATA.STATE_DATA];t.activeClass=n?.ready&&!n?.complete?"active":"inactive",t.showRewardImage=t[r.MESSAGE.DATA.SHOW_REWARD_IMAGE]||"",t.rewardImage=t[r.MESSAGE.DATA.REWARD_IMAGE]||"",t.rewardImagePath=t[r.MESSAGE.DATA.REWARD_IMAGE_PATH]||""}return e}mapItemsText(e){let t=this.config.getWithoutLogs("client/rewards/labels/itemsSeparator","
"),i=this.config.getWithoutLogs("client/rewards/labels/itemsTemplate","%label (%quantity)");return t+e[r.MESSAGE.DATA.ITEMS_DATA]?.map(e=>i=(i=i.replace("%label",e[r.MESSAGE.DATA.ITEM_LABEL])).replace("%quantity",e[r.MESSAGE.DATA.ITEM_QUANTITY])).join(t)}showRewardsNotificationBalloon(){let e=this.gameDom.getElement("#rewards-notification-balloon"),t=this.gameDom.getElements(".reward-active");if(e&&t&&0{this.gameManager.activeRoomEvents.send({[s.ACTION_KEY]:r.ACTIONS.ACCEPT_REWARD,id:e.dataset.rewardId})})}}},{"8d4a3a8b8eeaff6":"bzImH","677bd2d65b92e557":"lIgFH","7a270c9c6c08724":"93TbC","70b77844d02b2070":"3lwy5"}],h8UKT:[function(e,t,i){let{MessageHandler:n}=e("31470942304bd302"),{Logger:r,sc:s}=e("32739ae155fa16f3");t.exports.MessageProcessor=class{static processRewardsMessagesQueue(e,t){let i=e?.roomEvents;if(!i)return r.critical("RoomEvents undefined for process Rewards messages queue on RewardsPlugin.",e),!1;if(s.isArray(i.rewardsMessagesQueue)&&0!==i.rewardsMessagesQueue.length){for(let e of i.rewardsMessagesQueue)t.messageListener?.handleRewardsMessage(e,new n({roomEvents:i,message:e}));i.rewardsMessagesQueue=[]}}}},{"31470942304bd302":"4T3oM","32739ae155fa16f3":"3lwy5"}],carao:[function(e,t,i){t.exports={rewards:{title:"Rewards",dailyLogin:"Daily Login",dailyDescription:"Login every day and claim your reward",straightDaysLogin:"%loginCount Days Login",straightDaysDescription:"Login every day for %loginCount days and claim your reward",acceptedReward:'You accepted the "%rewardLabel" reward!'}}},{}],dkVHA:[function(e,t,i){let n=e("e6a5960c3a99bcc9").default,r=e("d306a7719b3b609a"),s=e("d3e0e9ccc057727d"),a=e("eb8d3da15fd6263e"),{ErrorsBlockHandler:o}=e("6645d49b0b5d816f"),{GameConst:h}=e("89df318e7a41c05a"),{ErrorManager:c,Logger:l,sc:u}=e("bf14904e4b931b12");t.exports.FirebaseConnector=class{constructor(e){e||c.error("FirebaseConnector - Missing game manager."),this.gameManager=e,this.gameDom=this.gameManager.gameDom,this.analytics=r,this.app=n,this.firebaseAuth=s,this.ui=a,this.authUi=!1,this.isActive=!1,this.containerId="#firebaseui-auth-container",this.uiConfig={signInOptions:[{provider:this.firebaseAuth.GoogleAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.FacebookAuthProvider.PROVIDER_ID},{provider:this.firebaseAuth.GithubAuthProvider.PROVIDER_ID}],signInFlow:"popup"},this.gameManager.events.on("reldens.beforeJoinGame",e=>{"firebase-login"===e.formData.formId&&(e.gameManager.userData.isFirebaseLogin=!0)})}startFirebase(){let e=this.gameManager.appServerUrl+h.ROUTE_PATHS.FIREBASE;this.gameDom.getJSON(e,(e,t)=>{if(!t.enabled)return!1;let i=t.firebaseConfig;this.initAuth(i,this.uiConfig),this.gameDom.getWindow().addEventListener("beforeunload",()=>{this.isActive&&this.app.auth().signOut()}),this.app.auth().onAuthStateChanged(e=>(e?this.setActiveUser(e):this.startAuthUi(),!1));let n=this.gameDom.getElement("#firebase-login");n&&this.activateLoginBehavior(n)})}activateLoginBehavior(e){e.addEventListener("submit",t=>{if(t.preventDefault(),!e.checkValidity())return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden")});let t=this.gameDom.getElement("#firebase-username");if(!t)return!1;this.gameDom.getElement(".firebase-row-container").classList.remove("hidden"),t.addEventListener("change",()=>{o.reset(e)}),t.addEventListener("focus",()=>{o.reset(e)})}startAuthUi(){this.isActive=!1,this.gameDom.getElement(this.containerId)&&(this.gameDom.getElement(this.containerId).innerHTML=""),this.authUi.start(this.containerId,this.uiConfig)}setActiveUser(e){this.isActive=!0;let t={formId:"firebase-login",email:e.email,username:this.gameDom.getElement("#firebase-username").value,password:e.uid};this.gameManager.startGame(t,!0)}initAuth(e,t){if(!e||!t)return l.error("Missing firebase configuration."),!1;this.firebaseConfig=e,this.uiConfig=t,this.app.initializeApp(this.firebaseConfig),u.hasOwn(this.firebaseConfig,"measurementId")&&this.app.analytics(),this.authUi=new this.ui.auth.AuthUI(this.app.auth()),u.hasOwn(this.uiConfig,"callbacks")||(this.uiConfig.callbacks={}),u.hasOwn(this.uiConfig.callbacks,"signInSuccessWithAuthResult")||(this.uiConfig.callbacks.signInSuccessWithAuthResult=()=>!1)}}},{e6a5960c3a99bcc9:"llQKY",d306a7719b3b609a:"jiMXy",d3e0e9ccc057727d:"2s8iN",eb8d3da15fd6263e:"1Z3EC","6645d49b0b5d816f":"kzsmo","89df318e7a41c05a":"93TbC",bf14904e4b931b12:"3lwy5"}],llQKY:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>s.default);var r=e("@firebase/app-compat"),s=n.interopDefault(r);/** * @license * Copyright 2020 Google LLC * @@ -4876,7 +4876,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"CONSTANTS",()=>a),n.export(i,"DecodeBase64StringError",()=>d),n.export(i,"Deferred",()=>_),n.export(i,"ErrorFactory",()=>z),n.export(i,"FirebaseError",()=>H),n.export(i,"MAX_VALUE_MILLIS",()=>eT),n.export(i,"RANDOM_FACTOR",()=>eS),n.export(i,"Sha1",()=>el),n.export(i,"areCookiesEnabled",()=>Y),n.export(i,"assert",()=>o),n.export(i,"assertionError",()=>h),n.export(i,"async",()=>ef),n.export(i,"base64",()=>u),n.export(i,"base64Decode",()=>g),n.export(i,"base64Encode",()=>f),n.export(i,"base64urlEncodeWithoutPadding",()=>p),n.export(i,"calculateBackoffMillis",()=>eA),n.export(i,"contains",()=>et),n.export(i,"createMockUserToken",()=>I),n.export(i,"createSubscribe",()=>eu),n.export(i,"decode",()=>J),n.export(i,"deepCopy",()=>m),n.export(i,"deepEqual",()=>function e(t,i){if(t===i)return!0;let n=Object.keys(t),r=Object.keys(i);for(let s of n){if(!r.includes(s))return!1;let n=t[s],a=i[s];if(es(n)&&es(a)){if(!e(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}),n.export(i,"deepExtend",()=>v),n.export(i,"errorPrefix",()=>em),n.export(i,"extractQuerystring",()=>ec),n.export(i,"getDefaultAppConfig",()=>A),n.export(i,"getDefaultEmulatorHost",()=>T),n.export(i,"getDefaultEmulatorHostnameAndPort",()=>S),n.export(i,"getDefaults",()=>w),n.export(i,"getExperimentalSetting",()=>C),n.export(i,"getGlobal",()=>y),n.export(i,"getModularInstance",()=>e_),n.export(i,"getUA",()=>O),n.export(i,"isAdmin",()=>ee),n.export(i,"isBrowser",()=>R),n.export(i,"isBrowserExtension",()=>k),n.export(i,"isCloudflareWorker",()=>D),n.export(i,"isElectron",()=>F),n.export(i,"isEmpty",()=>en),n.export(i,"isIE",()=>B),n.export(i,"isIndexedDBAvailable",()=>j),n.export(i,"isMobileCordova",()=>P),n.export(i,"isNode",()=>M),n.export(i,"isNodeSdk",()=>V),n.export(i,"isReactNative",()=>N),n.export(i,"isSafari",()=>G),n.export(i,"isUWP",()=>U),n.export(i,"isValidFormat",()=>Z),n.export(i,"isValidTimestamp",()=>$),n.export(i,"isWebWorker",()=>L),n.export(i,"issuedAtTime",()=>Q),n.export(i,"jsonEval",()=>q),n.export(i,"map",()=>er),n.export(i,"ordinal",()=>eC),n.export(i,"promiseWithTimeout",()=>ea),n.export(i,"querystring",()=>eo),n.export(i,"querystringDecode",()=>eh),n.export(i,"safeGet",()=>ei),n.export(i,"stringLength",()=>eE),n.export(i,"stringToByteArray",()=>ex),n.export(i,"stringify",()=>K),n.export(i,"uuidv4",()=>ew),n.export(i,"validateArgCount",()=>eg),n.export(i,"validateCallback",()=>ey),n.export(i,"validateContextObject",()=>eb),n.export(i,"validateIndexedDBOpenable",()=>W),n.export(i,"validateNamespace",()=>ev);var r=arguments[3],s=e("d07263985281b344");let a={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw h(t)},h=function(e){return Error("Firebase Database ("+a.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},c=function(e){let t=[],i=0;for(let n=0;n>6|192:((64512&r)==55296&&n+1>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128)}return t},l=function(e){let t=[],i=0,n=0;for(;i191&&r<224){let s=e[i++];t[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){let s=((7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[i++],a=e[i++];t[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}}return t.join("")},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t>2,l=(3&r)<<4|a>>4,u=(15&a)<<2|h>>6,d=63&h;o||(d=64,s||(u=64)),n.push(i[c],i[l],i[u],i[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let i=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t>4;if(n.push(h),64!==a){let e=s<<4&240|a>>2;if(n.push(e),64!==o){let e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class d extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let f=function(e){let t=c(e);return u.encodeByteArray(t,!0)},p=function(e){return f(e).replace(/\./g,"")},g=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"CONSTANTS",()=>a),n.export(i,"DecodeBase64StringError",()=>d),n.export(i,"Deferred",()=>_),n.export(i,"ErrorFactory",()=>z),n.export(i,"FirebaseError",()=>H),n.export(i,"MAX_VALUE_MILLIS",()=>eT),n.export(i,"RANDOM_FACTOR",()=>eS),n.export(i,"Sha1",()=>el),n.export(i,"areCookiesEnabled",()=>Y),n.export(i,"assert",()=>o),n.export(i,"assertionError",()=>h),n.export(i,"async",()=>ef),n.export(i,"base64",()=>u),n.export(i,"base64Decode",()=>g),n.export(i,"base64Encode",()=>f),n.export(i,"base64urlEncodeWithoutPadding",()=>p),n.export(i,"calculateBackoffMillis",()=>eA),n.export(i,"contains",()=>et),n.export(i,"createMockUserToken",()=>I),n.export(i,"createSubscribe",()=>eu),n.export(i,"decode",()=>J),n.export(i,"deepCopy",()=>m),n.export(i,"deepEqual",()=>function e(t,i){if(t===i)return!0;let n=Object.keys(t),r=Object.keys(i);for(let s of n){if(!r.includes(s))return!1;let n=t[s],a=i[s];if(es(n)&&es(a)){if(!e(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}),n.export(i,"deepExtend",()=>v),n.export(i,"errorPrefix",()=>em),n.export(i,"extractQuerystring",()=>ec),n.export(i,"getDefaultAppConfig",()=>A),n.export(i,"getDefaultEmulatorHost",()=>T),n.export(i,"getDefaultEmulatorHostnameAndPort",()=>S),n.export(i,"getDefaults",()=>w),n.export(i,"getExperimentalSetting",()=>C),n.export(i,"getGlobal",()=>y),n.export(i,"getModularInstance",()=>e_),n.export(i,"getUA",()=>O),n.export(i,"isAdmin",()=>ee),n.export(i,"isBrowser",()=>R),n.export(i,"isBrowserExtension",()=>k),n.export(i,"isCloudflareWorker",()=>D),n.export(i,"isElectron",()=>F),n.export(i,"isEmpty",()=>en),n.export(i,"isIE",()=>B),n.export(i,"isIndexedDBAvailable",()=>j),n.export(i,"isMobileCordova",()=>P),n.export(i,"isNode",()=>M),n.export(i,"isNodeSdk",()=>V),n.export(i,"isReactNative",()=>N),n.export(i,"isSafari",()=>G),n.export(i,"isUWP",()=>U),n.export(i,"isValidFormat",()=>Z),n.export(i,"isValidTimestamp",()=>$),n.export(i,"isWebWorker",()=>L),n.export(i,"issuedAtTime",()=>Q),n.export(i,"jsonEval",()=>K),n.export(i,"map",()=>er),n.export(i,"ordinal",()=>eC),n.export(i,"promiseWithTimeout",()=>ea),n.export(i,"querystring",()=>eo),n.export(i,"querystringDecode",()=>eh),n.export(i,"safeGet",()=>ei),n.export(i,"stringLength",()=>eE),n.export(i,"stringToByteArray",()=>ex),n.export(i,"stringify",()=>q),n.export(i,"uuidv4",()=>ew),n.export(i,"validateArgCount",()=>eg),n.export(i,"validateCallback",()=>ey),n.export(i,"validateContextObject",()=>eb),n.export(i,"validateIndexedDBOpenable",()=>W),n.export(i,"validateNamespace",()=>ev);var r=arguments[3],s=e("d07263985281b344");let a={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw h(t)},h=function(e){return Error("Firebase Database ("+a.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},c=function(e){let t=[],i=0;for(let n=0;n>6|192:((64512&r)==55296&&n+1>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128)}return t},l=function(e){let t=[],i=0,n=0;for(;i191&&r<224){let s=e[i++];t[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){let s=((7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[i++],a=e[i++];t[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}}return t.join("")},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t>2,l=(3&r)<<4|a>>4,u=(15&a)<<2|h>>6,d=63&h;o||(d=64,s||(u=64)),n.push(i[c],i[l],i[u],i[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let i=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t>4;if(n.push(h),64!==a){let e=s<<4&240|a>>2;if(n.push(e),64!==o){let e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class d extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let f=function(e){let t=c(e);return u.encodeByteArray(t,!0)},p=function(e){return f(e).replace(/\./g,"")},g=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2017 Google LLC * @@ -4981,7 +4981,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function q(e){return JSON.parse(e)}function K(e){return JSON.stringify(e)}/** + */function K(e){return JSON.parse(e)}function q(e){return JSON.stringify(e)}/** * @license * Copyright 2017 Google LLC * @@ -4996,7 +4996,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let J=function(e){let t={},i={},n={},r="";try{let s=e.split(".");t=q(g(s[0])||""),i=q(g(s[1])||""),r=s[2],n=i.d||{},delete i.d}catch(e){}return{header:t,claims:i,data:n,signature:r}},$=function(e){let t=J(e).claims,i=Math.floor(new Date().getTime()/1e3),n=0,r=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),r=t.hasOwnProperty("exp")?t.exp:n+86400),!!i&&!!n&&!!r&&i>=n&&i<=r},Q=function(e){let t=J(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},Z=function(e){let t=J(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},ee=function(e){let t=J(e).claims;return"object"==typeof t&&!0===t.admin};/** + */let J=function(e){let t={},i={},n={},r="";try{let s=e.split(".");t=K(g(s[0])||""),i=K(g(s[1])||""),r=s[2],n=i.d||{},delete i.d}catch(e){}return{header:t,claims:i,data:n,signature:r}},$=function(e){let t=J(e).claims,i=Math.floor(new Date().getTime()/1e3),n=0,r=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),r=t.hasOwnProperty("exp")?t.exp:n+86400),!!i&&!!n&&!!r&&i>=n&&i<=r},Q=function(e){let t=J(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},Z=function(e){let t=J(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},ee=function(e){let t=J(e).claims;return"object"==typeof t&&!0===t.admin};/** * @license * Copyright 2017 Google LLC * @@ -5266,7 +5266,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let u=e=>new l(e.getProvider("app-compat").getImmediate(),e.getProvider("analytics").getImmediate());function d(){let e={Analytics:l,settings:h.settings,isSupported:h.isSupported,EventName:r};(0,o.default).INTERNAL.registerComponent(new(0,c.Component)("analytics-compat",u,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}d(),(0,o.default).registerVersion("@firebase/analytics-compat","0.2.14")},{"@firebase/app-compat":"9Npvu","@firebase/analytics":"d71wp","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],d71wp:[function(e,t,i){let n,r,s,a;var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"getAnalytics",()=>G),o.export(i,"getGoogleAnalyticsClientId",()=>H),o.export(i,"initializeAnalytics",()=>j),o.export(i,"isSupported",()=>W),o.export(i,"logEvent",()=>J),o.export(i,"setAnalyticsCollectionEnabled",()=>q),o.export(i,"setConsent",()=>$),o.export(i,"setCurrentScreen",()=>Y),o.export(i,"setDefaultEventParameters",()=>K),o.export(i,"setUserId",()=>z),o.export(i,"setUserProperties",()=>X),o.export(i,"settings",()=>V);var h=e("@firebase/app"),c=e("@firebase/logger"),l=e("@firebase/util"),u=e("@firebase/component");e("@firebase/installations");/** + */let u=e=>new l(e.getProvider("app-compat").getImmediate(),e.getProvider("analytics").getImmediate());function d(){let e={Analytics:l,settings:h.settings,isSupported:h.isSupported,EventName:r};(0,o.default).INTERNAL.registerComponent(new(0,c.Component)("analytics-compat",u,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}d(),(0,o.default).registerVersion("@firebase/analytics-compat","0.2.14")},{"@firebase/app-compat":"9Npvu","@firebase/analytics":"d71wp","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],d71wp:[function(e,t,i){let n,r,s,a;var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"getAnalytics",()=>G),o.export(i,"getGoogleAnalyticsClientId",()=>H),o.export(i,"initializeAnalytics",()=>j),o.export(i,"isSupported",()=>W),o.export(i,"logEvent",()=>J),o.export(i,"setAnalyticsCollectionEnabled",()=>K),o.export(i,"setConsent",()=>$),o.export(i,"setCurrentScreen",()=>Y),o.export(i,"setDefaultEventParameters",()=>q),o.export(i,"setUserId",()=>z),o.export(i,"setUserProperties",()=>X),o.export(i,"settings",()=>V);var h=e("@firebase/app"),c=e("@firebase/logger"),l=e("@firebase/util"),u=e("@firebase/component");e("@firebase/installations");/** * @license * Copyright 2019 Google LLC * @@ -5326,7 +5326,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class L{constructor(e){this.app=e}_delete(){return delete D[this.app.options.appId],Promise.resolve()}}let D={},k=[],N={},F="dataLayer",B="gtag",U=!1;function V(e){if(U)throw g.create("already-initialized");e.dataLayerName&&(F=e.dataLayerName),e.gtagName&&(B=e.gtagName)}function G(e=(0,h.getApp)()){e=(0,l.getModularInstance)(e);let t=(0,h._getProvider)(e,d);return t.isInitialized()?t.getImmediate():j(e)}function j(e,t={}){let i=(0,h._getProvider)(e,d);if(i.isInitialized()){let e=i.getImmediate();if((0,l.deepEqual)(t,i.getOptions()))return e;throw g.create("already-initialized")}return i.initialize({options:t})}async function W(){if((0,l.isBrowserExtension)()||!(0,l.areCookiesEnabled)()||!(0,l.isIndexedDBAvailable)())return!1;try{return await (0,l.validateIndexedDBOpenable)()}catch(e){return!1}}function Y(e,t,i){e=(0,l.getModularInstance)(e),C(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}async function H(e){return e=(0,l.getModularInstance)(e),O(a,D[e.app.options.appId])}function z(e,t,i){e=(0,l.getModularInstance)(e),_(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function X(e,t,i){e=(0,l.getModularInstance)(e),I(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function q(e,t){P(D[(e=(0,l.getModularInstance)(e)).app.options.appId],t).catch(e=>p.error(e))}function K(e){a?a("set",e):n=e}function J(e,t,i,n){e=(0,l.getModularInstance)(e),A(a,D[e.app.options.appId],t,i,n).catch(e=>p.error(e))}function $(e){a?a("consent","update",e):r=e}let Q="@firebase/analytics",Z="0.10.8";(0,h._registerComponent)(new u.Component(d,(e,{options:t})=>(function(e,t,i){!function(){let e=[];if((0,l.isBrowserExtension)()&&e.push("This is a browser extension environment."),(0,l.areCookiesEnabled)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),i=g.create("invalid-analytics-context",{errorInfo:t});p.warn(i.message)}}();let n=e.options.appId;if(!n)throw g.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)p.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw g.create("no-api-key")}if(null!=D[n])throw g.create("already-exists",{id:n});if(!U){var r,o,h,c;let e,t;r=F,e=[],Array.isArray(window[r])?e=window[r]:window[r]=e;let{wrappedGtag:i,gtagCore:n}=(o=F,h=B,t=function(...e){window[o].push(arguments)},window[h]&&"function"==typeof window[h]&&(t=window[h]),window[h]=(c=t,async function(e,...t){try{if("event"===e){let[e,i]=t;await b(c,D,k,e,i)}else if("config"===e){let[e,i]=t;await y(c,D,k,N,e,i)}else if("consent"===e){let[e,i]=t;c("consent",e,i)}else if("get"===e){let[e,i,n]=t;c("get",e,i,n)}else if("set"===e){let[e]=t;c("set",e)}else c(e,...t)}catch(e){p.error(e)}}),{gtagCore:t,wrappedGtag:window[h]});a=i,s=n,U=!0}return D[n]=R(e,k,N,t,s,F,i),new L(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),(0,h._registerComponent)(new u.Component("analytics-internal",function(e){try{let t=e.getProvider(d).getImmediate();return{logEvent:(e,i,n)=>J(t,e,i,n)}}catch(e){throw g.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),(0,h.registerVersion)(Q,Z),(0,h.registerVersion)(Q,Z,"esm2017")},{"@firebase/app":"hZODh","@firebase/logger":"7RF90","@firebase/util":"j1gcd","@firebase/component":"dVjVM","@firebase/installations":"fWFBI","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],fWFBI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"deleteInstallations",()=>$),n.export(i,"getId",()=>X),n.export(i,"getInstallations",()=>Z),n.export(i,"getToken",()=>q),n.export(i,"onIdChange",()=>Q);var r=e("@firebase/app"),s=e("@firebase/component"),a=e("@firebase/util"),o=e("idb");let h="@firebase/installations",c="0.6.9",l=`w:${c}`,u="FIS_v2",d=new a.ErrorFactory("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function f(e){return e instanceof a.FirebaseError&&e.code.includes("request-failed")}/** + */class L{constructor(e){this.app=e}_delete(){return delete D[this.app.options.appId],Promise.resolve()}}let D={},k=[],N={},F="dataLayer",B="gtag",U=!1;function V(e){if(U)throw g.create("already-initialized");e.dataLayerName&&(F=e.dataLayerName),e.gtagName&&(B=e.gtagName)}function G(e=(0,h.getApp)()){e=(0,l.getModularInstance)(e);let t=(0,h._getProvider)(e,d);return t.isInitialized()?t.getImmediate():j(e)}function j(e,t={}){let i=(0,h._getProvider)(e,d);if(i.isInitialized()){let e=i.getImmediate();if((0,l.deepEqual)(t,i.getOptions()))return e;throw g.create("already-initialized")}return i.initialize({options:t})}async function W(){if((0,l.isBrowserExtension)()||!(0,l.areCookiesEnabled)()||!(0,l.isIndexedDBAvailable)())return!1;try{return await (0,l.validateIndexedDBOpenable)()}catch(e){return!1}}function Y(e,t,i){e=(0,l.getModularInstance)(e),C(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}async function H(e){return e=(0,l.getModularInstance)(e),O(a,D[e.app.options.appId])}function z(e,t,i){e=(0,l.getModularInstance)(e),_(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function X(e,t,i){e=(0,l.getModularInstance)(e),I(a,D[e.app.options.appId],t,i).catch(e=>p.error(e))}function K(e,t){P(D[(e=(0,l.getModularInstance)(e)).app.options.appId],t).catch(e=>p.error(e))}function q(e){a?a("set",e):n=e}function J(e,t,i,n){e=(0,l.getModularInstance)(e),A(a,D[e.app.options.appId],t,i,n).catch(e=>p.error(e))}function $(e){a?a("consent","update",e):r=e}let Q="@firebase/analytics",Z="0.10.8";(0,h._registerComponent)(new u.Component(d,(e,{options:t})=>(function(e,t,i){!function(){let e=[];if((0,l.isBrowserExtension)()&&e.push("This is a browser extension environment."),(0,l.areCookiesEnabled)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),i=g.create("invalid-analytics-context",{errorInfo:t});p.warn(i.message)}}();let n=e.options.appId;if(!n)throw g.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)p.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw g.create("no-api-key")}if(null!=D[n])throw g.create("already-exists",{id:n});if(!U){var r,o,h,c;let e,t;r=F,e=[],Array.isArray(window[r])?e=window[r]:window[r]=e;let{wrappedGtag:i,gtagCore:n}=(o=F,h=B,t=function(...e){window[o].push(arguments)},window[h]&&"function"==typeof window[h]&&(t=window[h]),window[h]=(c=t,async function(e,...t){try{if("event"===e){let[e,i]=t;await b(c,D,k,e,i)}else if("config"===e){let[e,i]=t;await y(c,D,k,N,e,i)}else if("consent"===e){let[e,i]=t;c("consent",e,i)}else if("get"===e){let[e,i,n]=t;c("get",e,i,n)}else if("set"===e){let[e]=t;c("set",e)}else c(e,...t)}catch(e){p.error(e)}}),{gtagCore:t,wrappedGtag:window[h]});a=i,s=n,U=!0}return D[n]=R(e,k,N,t,s,F,i),new L(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),(0,h._registerComponent)(new u.Component("analytics-internal",function(e){try{let t=e.getProvider(d).getImmediate();return{logEvent:(e,i,n)=>J(t,e,i,n)}}catch(e){throw g.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),(0,h.registerVersion)(Q,Z),(0,h.registerVersion)(Q,Z,"esm2017")},{"@firebase/app":"hZODh","@firebase/logger":"7RF90","@firebase/util":"j1gcd","@firebase/component":"dVjVM","@firebase/installations":"fWFBI","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],fWFBI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"deleteInstallations",()=>$),n.export(i,"getId",()=>X),n.export(i,"getInstallations",()=>Z),n.export(i,"getToken",()=>K),n.export(i,"onIdChange",()=>Q);var r=e("@firebase/app"),s=e("@firebase/component"),a=e("@firebase/util"),o=e("idb");let h="@firebase/installations",c="0.6.9",l=`w:${c}`,u="FIS_v2",d=new a.ErrorFactory("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function f(e){return e instanceof a.FirebaseError&&e.code.includes("request-failed")}/** * @license * Copyright 2019 Google LLC * @@ -5491,7 +5491,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function q(e,t=!1){return await K(e),(await j(e,t)).token}async function K(e){let{registrationPromise:t}=await N(e);t&&await t}/** + */async function K(e,t=!1){return await q(e),(await j(e,t)).token}async function q(e){let{registrationPromise:t}=await N(e);t&&await t}/** * @license * Copyright 2019 Google LLC * @@ -5581,7 +5581,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function(e){if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw ee(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=(0,r._getProvider)(t,"heartbeat");return{app:t,appConfig:i,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,r._registerComponent)(new s.Component("installations-internal",e=>{let t=e.getProvider("app").getImmediate(),i=(0,r._getProvider)(t,et).getImmediate();return{getId:()=>X(i),getToken:e=>q(i,e)}},"PRIVATE")),(0,r.registerVersion)(h,c),(0,r.registerVersion)(h,c,"esm2017")},{"@firebase/app":"hZODh","@firebase/component":"dVjVM","@firebase/util":"j1gcd",idb:"4zejX","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"2s8iN":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var r=e("@firebase/auth");n.exportAll(r,i)},{"@firebase/auth":"7aHdK","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"7aHdK":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"ActionCodeOperation",()=>r.A),n.export(i,"ActionCodeURL",()=>r.ai),n.export(i,"AuthCredential",()=>r.L),n.export(i,"AuthErrorCodes",()=>r.I),n.export(i,"EmailAuthCredential",()=>r.M),n.export(i,"EmailAuthProvider",()=>r.V),n.export(i,"FacebookAuthProvider",()=>r.W),n.export(i,"FactorId",()=>r.F),n.export(i,"GithubAuthProvider",()=>r.Y),n.export(i,"GoogleAuthProvider",()=>r.X),n.export(i,"OAuthCredential",()=>r.N),n.export(i,"OAuthProvider",()=>r.Z),n.export(i,"OperationType",()=>r.O),n.export(i,"PhoneAuthCredential",()=>r.Q),n.export(i,"PhoneAuthProvider",()=>r.P),n.export(i,"PhoneMultiFactorGenerator",()=>r.m),n.export(i,"ProviderId",()=>r.p),n.export(i,"RecaptchaVerifier",()=>r.R),n.export(i,"SAMLAuthProvider",()=>r._),n.export(i,"SignInMethod",()=>r.S),n.export(i,"TotpMultiFactorGenerator",()=>r.T),n.export(i,"TotpSecret",()=>r.n),n.export(i,"TwitterAuthProvider",()=>r.$),n.export(i,"applyActionCode",()=>r.a7),n.export(i,"beforeAuthStateChanged",()=>r.x),n.export(i,"browserLocalPersistence",()=>r.b),n.export(i,"browserPopupRedirectResolver",()=>r.k),n.export(i,"browserSessionPersistence",()=>r.a),n.export(i,"checkActionCode",()=>r.a8),n.export(i,"confirmPasswordReset",()=>r.a6),n.export(i,"connectAuthEmulator",()=>r.K),n.export(i,"createUserWithEmailAndPassword",()=>r.aa),n.export(i,"debugErrorMap",()=>r.G),n.export(i,"deleteUser",()=>r.E),n.export(i,"fetchSignInMethodsForEmail",()=>r.af),n.export(i,"getAdditionalUserInfo",()=>r.aq),n.export(i,"getAuth",()=>r.o),n.export(i,"getIdToken",()=>r.an),n.export(i,"getIdTokenResult",()=>r.ao),n.export(i,"getMultiFactorResolver",()=>r.as),n.export(i,"getRedirectResult",()=>r.j),n.export(i,"inMemoryPersistence",()=>r.U),n.export(i,"indexedDBLocalPersistence",()=>r.i),n.export(i,"initializeAuth",()=>r.J),n.export(i,"initializeRecaptchaConfig",()=>r.t),n.export(i,"isSignInWithEmailLink",()=>r.ad),n.export(i,"linkWithCredential",()=>r.a2),n.export(i,"linkWithPhoneNumber",()=>r.l),n.export(i,"linkWithPopup",()=>r.d),n.export(i,"linkWithRedirect",()=>r.g),n.export(i,"multiFactor",()=>r.at),n.export(i,"onAuthStateChanged",()=>r.y),n.export(i,"onIdTokenChanged",()=>r.w),n.export(i,"parseActionCodeURL",()=>r.aj),n.export(i,"prodErrorMap",()=>r.H),n.export(i,"reauthenticateWithCredential",()=>r.a3),n.export(i,"reauthenticateWithPhoneNumber",()=>r.r),n.export(i,"reauthenticateWithPopup",()=>r.e),n.export(i,"reauthenticateWithRedirect",()=>r.h),n.export(i,"reload",()=>r.ar),n.export(i,"revokeAccessToken",()=>r.D),n.export(i,"sendEmailVerification",()=>r.ag),n.export(i,"sendPasswordResetEmail",()=>r.a5),n.export(i,"sendSignInLinkToEmail",()=>r.ac),n.export(i,"setPersistence",()=>r.q),n.export(i,"signInAnonymously",()=>r.a0),n.export(i,"signInWithCredential",()=>r.a1),n.export(i,"signInWithCustomToken",()=>r.a4),n.export(i,"signInWithEmailAndPassword",()=>r.ab),n.export(i,"signInWithEmailLink",()=>r.ae),n.export(i,"signInWithPhoneNumber",()=>r.s),n.export(i,"signInWithPopup",()=>r.c),n.export(i,"signInWithRedirect",()=>r.f),n.export(i,"signOut",()=>r.C),n.export(i,"unlink",()=>r.ap),n.export(i,"updateCurrentUser",()=>r.B),n.export(i,"updateEmail",()=>r.al),n.export(i,"updatePassword",()=>r.am),n.export(i,"updatePhoneNumber",()=>r.u),n.export(i,"updateProfile",()=>r.ak),n.export(i,"useDeviceLanguage",()=>r.z),n.export(i,"validatePassword",()=>r.v),n.export(i,"verifyBeforeUpdateEmail",()=>r.ah),n.export(i,"verifyPasswordResetCode",()=>r.a9);var r=e("./index-68602d24.js");e("@firebase/app"),e("@firebase/util"),e("@firebase/logger"),e("tslib"),e("@firebase/component")},{"./index-68602d24.js":"gWuQ9","@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],gWuQ9:[function(e,t,i){var n,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"$",()=>tE),r.export(i,"A",()=>p),r.export(i,"B",()=>ig),r.export(i,"C",()=>im),r.export(i,"D",()=>iv),r.export(i,"E",()=>iy),r.export(i,"F",()=>l),r.export(i,"G",()=>m),r.export(i,"H",()=>v),r.export(i,"I",()=>b),r.export(i,"J",()=>eq),r.export(i,"K",()=>eK),r.export(i,"L",()=>eQ),r.export(i,"M",()=>tt),r.export(i,"N",()=>tn),r.export(i,"O",()=>f),r.export(i,"P",()=>i8),r.export(i,"Q",()=>tc),r.export(i,"R",()=>i2),r.export(i,"S",()=>d),r.export(i,"T",()=>n$),r.export(i,"U",()=>ex),r.export(i,"V",()=>td),r.export(i,"W",()=>tm),r.export(i,"X",()=>tv),r.export(i,"Y",()=>ty),r.export(i,"Z",()=>tg),r.export(i,"_",()=>tx),r.export(i,"a",()=>iP),r.export(i,"a0",()=>tA),r.export(i,"a1",()=>tD),r.export(i,"a2",()=>tk),r.export(i,"a3",()=>tN),r.export(i,"a4",()=>tB),r.export(i,"a5",()=>tY),r.export(i,"a6",()=>tH),r.export(i,"a7",()=>tz),r.export(i,"a8",()=>tX),r.export(i,"a9",()=>tq),r.export(i,"aA",()=>eR),r.export(i,"aB",()=>T),r.export(i,"aC",()=>I),r.export(i,"aD",()=>nI),r.export(i,"aE",()=>ey),r.export(i,"aF",()=>eE),r.export(i,"aG",()=>nC),r.export(i,"aH",()=>nm),r.export(i,"aI",()=>ng),r.export(i,"aJ",()=>eU),r.export(i,"aK",()=>em),r.export(i,"aL",()=>eB),r.export(i,"aM",()=>eD),r.export(i,"aN",()=>iR),r.export(i,"aO",()=>nW),r.export(i,"aP",()=>N),r.export(i,"aQ",()=>tb),r.export(i,"aa",()=>tK),r.export(i,"ab",()=>tJ),r.export(i,"ac",()=>t$),r.export(i,"ad",()=>tQ),r.export(i,"ae",()=>tZ),r.export(i,"af",()=>t1),r.export(i,"ag",()=>t2),r.export(i,"ah",()=>t3),r.export(i,"ai",()=>tl),r.export(i,"aj",()=>tu),r.export(i,"ak",()=>t4),r.export(i,"al",()=>t9),r.export(i,"am",()=>t6),r.export(i,"an",()=>et),r.export(i,"ao",()=>ei),r.export(i,"ap",()=>tO),r.export(i,"aq",()=>ia),r.export(i,"ar",()=>el),r.export(i,"as",()=>iE),r.export(i,"at",()=>iS),r.export(i,"au",()=>P),r.export(i,"av",()=>eM),r.export(i,"aw",()=>eI),r.export(i,"ax",()=>w),r.export(i,"ay",()=>nH),r.export(i,"az",()=>nM),r.export(i,"b",()=>iI),r.export(i,"c",()=>no),r.export(i,"d",()=>nc),r.export(i,"e",()=>nh),r.export(i,"f",()=>nb),r.export(i,"g",()=>nT),r.export(i,"h",()=>nE),r.export(i,"i",()=>iX),r.export(i,"j",()=>nA),r.export(i,"k",()=>nX),r.export(i,"l",()=>i4),r.export(i,"m",()=>nJ),r.export(i,"n",()=>nZ),r.export(i,"o",()=>n6),r.export(i,"p",()=>u),r.export(i,"q",()=>io),r.export(i,"r",()=>i9),r.export(i,"s",()=>i5),r.export(i,"t",()=>ih),r.export(i,"u",()=>i7),r.export(i,"v",()=>ic),r.export(i,"w",()=>il),r.export(i,"x",()=>iu),r.export(i,"y",()=>id),r.export(i,"z",()=>ip);var s=e("@firebase/app"),a=e("@firebase/util"),o=e("@firebase/logger"),h=e("tslib"),c=e("@firebase/component");/** + */function(e){if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw ee(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=(0,r._getProvider)(t,"heartbeat");return{app:t,appConfig:i,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,r._registerComponent)(new s.Component("installations-internal",e=>{let t=e.getProvider("app").getImmediate(),i=(0,r._getProvider)(t,et).getImmediate();return{getId:()=>X(i),getToken:e=>K(i,e)}},"PRIVATE")),(0,r.registerVersion)(h,c),(0,r.registerVersion)(h,c,"esm2017")},{"@firebase/app":"hZODh","@firebase/component":"dVjVM","@firebase/util":"j1gcd",idb:"4zejX","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"2s8iN":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var r=e("@firebase/auth");n.exportAll(r,i)},{"@firebase/auth":"7aHdK","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"7aHdK":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"ActionCodeOperation",()=>r.A),n.export(i,"ActionCodeURL",()=>r.ai),n.export(i,"AuthCredential",()=>r.L),n.export(i,"AuthErrorCodes",()=>r.I),n.export(i,"EmailAuthCredential",()=>r.M),n.export(i,"EmailAuthProvider",()=>r.V),n.export(i,"FacebookAuthProvider",()=>r.W),n.export(i,"FactorId",()=>r.F),n.export(i,"GithubAuthProvider",()=>r.Y),n.export(i,"GoogleAuthProvider",()=>r.X),n.export(i,"OAuthCredential",()=>r.N),n.export(i,"OAuthProvider",()=>r.Z),n.export(i,"OperationType",()=>r.O),n.export(i,"PhoneAuthCredential",()=>r.Q),n.export(i,"PhoneAuthProvider",()=>r.P),n.export(i,"PhoneMultiFactorGenerator",()=>r.m),n.export(i,"ProviderId",()=>r.p),n.export(i,"RecaptchaVerifier",()=>r.R),n.export(i,"SAMLAuthProvider",()=>r._),n.export(i,"SignInMethod",()=>r.S),n.export(i,"TotpMultiFactorGenerator",()=>r.T),n.export(i,"TotpSecret",()=>r.n),n.export(i,"TwitterAuthProvider",()=>r.$),n.export(i,"applyActionCode",()=>r.a7),n.export(i,"beforeAuthStateChanged",()=>r.x),n.export(i,"browserLocalPersistence",()=>r.b),n.export(i,"browserPopupRedirectResolver",()=>r.k),n.export(i,"browserSessionPersistence",()=>r.a),n.export(i,"checkActionCode",()=>r.a8),n.export(i,"confirmPasswordReset",()=>r.a6),n.export(i,"connectAuthEmulator",()=>r.K),n.export(i,"createUserWithEmailAndPassword",()=>r.aa),n.export(i,"debugErrorMap",()=>r.G),n.export(i,"deleteUser",()=>r.E),n.export(i,"fetchSignInMethodsForEmail",()=>r.af),n.export(i,"getAdditionalUserInfo",()=>r.aq),n.export(i,"getAuth",()=>r.o),n.export(i,"getIdToken",()=>r.an),n.export(i,"getIdTokenResult",()=>r.ao),n.export(i,"getMultiFactorResolver",()=>r.as),n.export(i,"getRedirectResult",()=>r.j),n.export(i,"inMemoryPersistence",()=>r.U),n.export(i,"indexedDBLocalPersistence",()=>r.i),n.export(i,"initializeAuth",()=>r.J),n.export(i,"initializeRecaptchaConfig",()=>r.t),n.export(i,"isSignInWithEmailLink",()=>r.ad),n.export(i,"linkWithCredential",()=>r.a2),n.export(i,"linkWithPhoneNumber",()=>r.l),n.export(i,"linkWithPopup",()=>r.d),n.export(i,"linkWithRedirect",()=>r.g),n.export(i,"multiFactor",()=>r.at),n.export(i,"onAuthStateChanged",()=>r.y),n.export(i,"onIdTokenChanged",()=>r.w),n.export(i,"parseActionCodeURL",()=>r.aj),n.export(i,"prodErrorMap",()=>r.H),n.export(i,"reauthenticateWithCredential",()=>r.a3),n.export(i,"reauthenticateWithPhoneNumber",()=>r.r),n.export(i,"reauthenticateWithPopup",()=>r.e),n.export(i,"reauthenticateWithRedirect",()=>r.h),n.export(i,"reload",()=>r.ar),n.export(i,"revokeAccessToken",()=>r.D),n.export(i,"sendEmailVerification",()=>r.ag),n.export(i,"sendPasswordResetEmail",()=>r.a5),n.export(i,"sendSignInLinkToEmail",()=>r.ac),n.export(i,"setPersistence",()=>r.q),n.export(i,"signInAnonymously",()=>r.a0),n.export(i,"signInWithCredential",()=>r.a1),n.export(i,"signInWithCustomToken",()=>r.a4),n.export(i,"signInWithEmailAndPassword",()=>r.ab),n.export(i,"signInWithEmailLink",()=>r.ae),n.export(i,"signInWithPhoneNumber",()=>r.s),n.export(i,"signInWithPopup",()=>r.c),n.export(i,"signInWithRedirect",()=>r.f),n.export(i,"signOut",()=>r.C),n.export(i,"unlink",()=>r.ap),n.export(i,"updateCurrentUser",()=>r.B),n.export(i,"updateEmail",()=>r.al),n.export(i,"updatePassword",()=>r.am),n.export(i,"updatePhoneNumber",()=>r.u),n.export(i,"updateProfile",()=>r.ak),n.export(i,"useDeviceLanguage",()=>r.z),n.export(i,"validatePassword",()=>r.v),n.export(i,"verifyBeforeUpdateEmail",()=>r.ah),n.export(i,"verifyPasswordResetCode",()=>r.a9);var r=e("./index-68602d24.js");e("@firebase/app"),e("@firebase/util"),e("@firebase/logger"),e("tslib"),e("@firebase/component")},{"./index-68602d24.js":"gWuQ9","@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],gWuQ9:[function(e,t,i){var n,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"$",()=>tE),r.export(i,"A",()=>p),r.export(i,"B",()=>ig),r.export(i,"C",()=>im),r.export(i,"D",()=>iv),r.export(i,"E",()=>iy),r.export(i,"F",()=>l),r.export(i,"G",()=>m),r.export(i,"H",()=>v),r.export(i,"I",()=>b),r.export(i,"J",()=>eK),r.export(i,"K",()=>eq),r.export(i,"L",()=>eQ),r.export(i,"M",()=>tt),r.export(i,"N",()=>tn),r.export(i,"O",()=>f),r.export(i,"P",()=>i8),r.export(i,"Q",()=>tc),r.export(i,"R",()=>i2),r.export(i,"S",()=>d),r.export(i,"T",()=>n$),r.export(i,"U",()=>ex),r.export(i,"V",()=>td),r.export(i,"W",()=>tm),r.export(i,"X",()=>tv),r.export(i,"Y",()=>ty),r.export(i,"Z",()=>tg),r.export(i,"_",()=>tx),r.export(i,"a",()=>iP),r.export(i,"a0",()=>tA),r.export(i,"a1",()=>tD),r.export(i,"a2",()=>tk),r.export(i,"a3",()=>tN),r.export(i,"a4",()=>tB),r.export(i,"a5",()=>tY),r.export(i,"a6",()=>tH),r.export(i,"a7",()=>tz),r.export(i,"a8",()=>tX),r.export(i,"a9",()=>tK),r.export(i,"aA",()=>eR),r.export(i,"aB",()=>T),r.export(i,"aC",()=>I),r.export(i,"aD",()=>nI),r.export(i,"aE",()=>ey),r.export(i,"aF",()=>eE),r.export(i,"aG",()=>nC),r.export(i,"aH",()=>nm),r.export(i,"aI",()=>ng),r.export(i,"aJ",()=>eU),r.export(i,"aK",()=>em),r.export(i,"aL",()=>eB),r.export(i,"aM",()=>eD),r.export(i,"aN",()=>iR),r.export(i,"aO",()=>nW),r.export(i,"aP",()=>N),r.export(i,"aQ",()=>tb),r.export(i,"aa",()=>tq),r.export(i,"ab",()=>tJ),r.export(i,"ac",()=>t$),r.export(i,"ad",()=>tQ),r.export(i,"ae",()=>tZ),r.export(i,"af",()=>t1),r.export(i,"ag",()=>t2),r.export(i,"ah",()=>t3),r.export(i,"ai",()=>tl),r.export(i,"aj",()=>tu),r.export(i,"ak",()=>t4),r.export(i,"al",()=>t9),r.export(i,"am",()=>t6),r.export(i,"an",()=>et),r.export(i,"ao",()=>ei),r.export(i,"ap",()=>tO),r.export(i,"aq",()=>ia),r.export(i,"ar",()=>el),r.export(i,"as",()=>iE),r.export(i,"at",()=>iS),r.export(i,"au",()=>P),r.export(i,"av",()=>eM),r.export(i,"aw",()=>eI),r.export(i,"ax",()=>w),r.export(i,"ay",()=>nH),r.export(i,"az",()=>nM),r.export(i,"b",()=>iI),r.export(i,"c",()=>no),r.export(i,"d",()=>nc),r.export(i,"e",()=>nh),r.export(i,"f",()=>nb),r.export(i,"g",()=>nT),r.export(i,"h",()=>nE),r.export(i,"i",()=>iX),r.export(i,"j",()=>nA),r.export(i,"k",()=>nX),r.export(i,"l",()=>i4),r.export(i,"m",()=>nJ),r.export(i,"n",()=>nZ),r.export(i,"o",()=>n6),r.export(i,"p",()=>u),r.export(i,"q",()=>io),r.export(i,"r",()=>i9),r.export(i,"s",()=>i5),r.export(i,"t",()=>ih),r.export(i,"u",()=>i7),r.export(i,"v",()=>ic),r.export(i,"w",()=>il),r.export(i,"x",()=>iu),r.export(i,"y",()=>id),r.export(i,"z",()=>ip);var s=e("@firebase/app"),a=e("@firebase/util"),o=e("@firebase/logger"),h=e("tslib"),c=e("@firebase/component");/** * @license * Copyright 2021 Google LLC * @@ -5716,7 +5716,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function z(e){return void 0!==e&&void 0!==e.getResponse}function X(e){return void 0!==e&&void 0!==e.enterprise}class q{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}/** + */function z(e){return void 0!==e&&void 0!==e.getResponse}function X(e){return void 0!==e&&void 0!==e.enterprise}class K{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}/** * @license * Copyright 2020 Google LLC * @@ -5731,7 +5731,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function K(e){return(await V(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function J(e,t){return V(e,"GET","/v2/recaptchaConfig",U(e,t))}/** + */async function q(e){return(await V(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function J(e,t){return V(e,"GET","/v2/recaptchaConfig",U(e,t))}/** * @license * Copyright 2020 Google LLC * @@ -6016,7 +6016,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let eG={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ej(e){return eG.loadJS(e)}function eW(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eY{constructor(e){this.type="recaptcha-enterprise",this.auth=eU(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{J(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new q(n);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function n(t,i,n){let r=window.grecaptcha;X(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):n(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,r)=>{i(this.auth).then(i=>{if(!t&&X(window.grecaptcha))n(i,e,r);else{if("undefined"==typeof window){r(Error("RecaptchaVerifier is only supported in browser"));return}let t=eG.recaptchaEnterpriseScript;0!==t.length&&(t+=i),ej(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function eH(e,t,i,n=!1){let r;let s=new eY(e);try{r=await s.verify(i)}catch(e){r=await s.verify(i,!0)}let a=Object.assign({},t);return n?Object.assign(a,{captchaResp:r}):Object.assign(a,{captchaResponse:r}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ez(e,t,i,n){var r;if(null===(r=e._getRecaptchaConfig())||void 0===r||!r.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async r=>{if("auth/missing-recaptcha-token"!==r.code)return Promise.reject(r);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}});{let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}}async function eX(e){let t=eU(e),i=new q(await J(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")&&new eY(t).verify()}/** + */let eG={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ej(e){return eG.loadJS(e)}function eW(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eY{constructor(e){this.type="recaptcha-enterprise",this.auth=eU(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>{J(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new K(n);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function n(t,i,n){let r=window.grecaptcha;X(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i("NO_RECAPTCHA")})}):n(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,r)=>{i(this.auth).then(i=>{if(!t&&X(window.grecaptcha))n(i,e,r);else{if("undefined"==typeof window){r(Error("RecaptchaVerifier is only supported in browser"));return}let t=eG.recaptchaEnterpriseScript;0!==t.length&&(t+=i),ej(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function eH(e,t,i,n=!1){let r;let s=new eY(e);try{r=await s.verify(i)}catch(e){r=await s.verify(i,!0)}let a=Object.assign({},t);return n?Object.assign(a,{captchaResp:r}):Object.assign(a,{captchaResponse:r}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function ez(e,t,i,n){var r;if(null===(r=e._getRecaptchaConfig())||void 0===r||!r.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async r=>{if("auth/missing-recaptcha-token"!==r.code)return Promise.reject(r);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}});{let r=await eH(e,t,i,"getOobCode"===i);return n(e,r)}}async function eX(e){let t=eU(e),i=new K(await J(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")&&new eY(t).verify()}/** * @license * Copyright 2020 Google LLC * @@ -6031,7 +6031,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function eq(e,t){let i=(0,s._getProvider)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),n=i.getOptions();if((0,a.deepEqual)(n,null!=t?t:{}))return e;w(e,"already-initialized")}return i.initialize({options:t})}function eK(e,t,i){let n=eU(e);I(n._canInitEmulator,n,"emulator-config-failed"),I(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!(null==i?void 0:i.disableWarnings),s=eJ(t),{host:a,port:o}=function(e){let t=eJ(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let e=r[1];return{host:e,port:e$(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:e$(t)}}}(t),h=null===o?"":`:${o}`;n.config.emulator={url:`${s}//${a}${h}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eJ(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function e$(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** + */function eK(e,t){let i=(0,s._getProvider)(e,"auth");if(i.isInitialized()){let e=i.getImmediate(),n=i.getOptions();if((0,a.deepEqual)(n,null!=t?t:{}))return e;w(e,"already-initialized")}return i.initialize({options:t})}function eq(e,t,i){let n=eU(e);I(n._canInitEmulator,n,"emulator-config-failed"),I(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!(null==i?void 0:i.disableWarnings),s=eJ(t),{host:a,port:o}=function(e){let t=eJ(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let e=r[1];return{host:e,port:e$(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:e$(t)}}}(t),h=null===o?"":`:${o}`;n.config.emulator={url:`${s}//${a}${h}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eJ(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function e$(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/** * @license * Copyright 2020 Google LLC * @@ -6466,7 +6466,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function tW(e){let t=eU(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function tY(e,t,i){let n=eU(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};i&&tj(n,r,i),await ez(n,r,"getOobCode",e9)}async function tH(e,t,i){await eZ((0,a.getModularInstance)(e),{oobCode:t,newPassword:i}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}async function tz(e,t){await e2((0,a.getModularInstance)(e),{oobCode:t})}async function tX(e,t){let i=(0,a.getModularInstance)(e),n=await eZ(i,{oobCode:t}),r=n.requestType;switch(I(r,i,"internal-error"),r){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":I(n.newEmail,i,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":I(n.mfaInfo,i,"internal-error");default:I(n.email,i,"internal-error")}let s=null;return n.mfaInfo&&(s=tU._fromServerResponse(eU(i),n.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.newEmail:n.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.email:n.newEmail)||null,multiFactorInfo:s},operation:r}}async function tq(e,t){let{data:i}=await tX((0,a.getModularInstance)(e),t);return i.email}async function tK(e,t,i){if((0,s._isFirebaseServerApp)(e.app))return Promise.reject(A(e));let n=eU(e),r=ez(n,{returnSecureToken:!0,email:t,password:i,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tw),a=await r.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t}),o=await tT._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(o.user),o}function tJ(e,t,i){return(0,s._isFirebaseServerApp)(e.app)?Promise.reject(A(e)):tD((0,a.getModularInstance)(e),td.credential(t,i)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}/** + */async function tW(e){let t=eU(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function tY(e,t,i){let n=eU(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};i&&tj(n,r,i),await ez(n,r,"getOobCode",e9)}async function tH(e,t,i){await eZ((0,a.getModularInstance)(e),{oobCode:t,newPassword:i}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}async function tz(e,t){await e2((0,a.getModularInstance)(e),{oobCode:t})}async function tX(e,t){let i=(0,a.getModularInstance)(e),n=await eZ(i,{oobCode:t}),r=n.requestType;switch(I(r,i,"internal-error"),r){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":I(n.newEmail,i,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":I(n.mfaInfo,i,"internal-error");default:I(n.email,i,"internal-error")}let s=null;return n.mfaInfo&&(s=tU._fromServerResponse(eU(i),n.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.newEmail:n.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.email:n.newEmail)||null,multiFactorInfo:s},operation:r}}async function tK(e,t){let{data:i}=await tX((0,a.getModularInstance)(e),t);return i.email}async function tq(e,t,i){if((0,s._isFirebaseServerApp)(e.app))return Promise.reject(A(e));let n=eU(e),r=ez(n,{returnSecureToken:!0,email:t,password:i,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tw),a=await r.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t}),o=await tT._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(o.user),o}function tJ(e,t,i){return(0,s._isFirebaseServerApp)(e.app)?Promise.reject(A(e)):tD((0,a.getModularInstance)(e),td.credential(t,i)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tW(e),t})}/** * @license * Copyright 2020 Google LLC * @@ -6721,7 +6721,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let iF="firebaseLocalStorageDb",iB="firebaseLocalStorage",iU="fbase_key";class iV{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function iG(e,t){return e.transaction([iB],t?"readwrite":"readonly").objectStore(iB)}function ij(){let e=indexedDB.open(iF,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(iB,{keyPath:iU})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(iB)?t(i):(i.close(),await new iV(indexedDB.deleteDatabase(iF)).toPromise(),t(await ij()))})})}async function iW(e,t,i){return new iV(iG(e,!0).put({[iU]:t,value:i})).toPromise()}async function iY(e,t){let i=iG(e,!1).get(t),n=await new iV(i).toPromise();return void 0===n?null:n.value}function iH(e,t){return new iV(iG(e,!0).delete(t)).toPromise()}class iz{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await ij()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ik()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iM._getInstance(ik()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await iN(),!this.activeServiceWorker)return;this.sender=new iL(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ij();return await iW(e,iA,"1"),await iH(e,iA),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>iW(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iY(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iH(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iV(iG(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:n,value:r}of e)i.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(r)&&(this.notifyListeners(n,r),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}iz.type="LOCAL";let iX=iz;class iq{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new iK(e,this.auth.name,t||{})),this.counter++,i}reset(e){var t;let i=e||1e12;null===(t=this._widgets.get(i))||void 0===t||t.delete(),this._widgets.delete(i)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class iK{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let n="string"==typeof e?document.getElementById(e):e;I(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],i="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")}(0);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/** + */let iF="firebaseLocalStorageDb",iB="firebaseLocalStorage",iU="fbase_key";class iV{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function iG(e,t){return e.transaction([iB],t?"readwrite":"readonly").objectStore(iB)}function ij(){let e=indexedDB.open(iF,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(iB,{keyPath:iU})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(iB)?t(i):(i.close(),await new iV(indexedDB.deleteDatabase(iF)).toPromise(),t(await ij()))})})}async function iW(e,t,i){return new iV(iG(e,!0).put({[iU]:t,value:i})).toPromise()}async function iY(e,t){let i=iG(e,!1).get(t),n=await new iV(i).toPromise();return void 0===n?null:n.value}function iH(e,t){return new iV(iG(e,!0).delete(t)).toPromise()}class iz{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await ij()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ik()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iM._getInstance(ik()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await iN(),!this.activeServiceWorker)return;this.sender=new iL(this.activeServiceWorker);let i=await this.sender._send("ping",{},800);i&&(null===(e=i[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=i[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ij();return await iW(e,iA,"1"),await iH(e,iA),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>iW(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iY(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iH(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iV(iG(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:n,value:r}of e)i.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(r)&&(this.notifyListeners(n,r),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}iz.type="LOCAL";let iX=iz;class iK{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new iq(e,this.auth.name,t||{})),this.counter++,i}reset(e){var t;let i=e||1e12;null===(t=this._widgets.get(i))||void 0===t||t.delete(),this._widgets.delete(i)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class iq{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let n="string"==typeof e?document.getElementById(e):e;I(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],i="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")}(0);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/** * @license * Copyright 2020 Google LLC * @@ -6736,7 +6736,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let iJ=eW("rcb"),i$=new D(3e4,6e4);class iQ{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=iD().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return(I(t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t),e,"argument-error"),this.shouldResolveImmediately(t)&&z(iD().grecaptcha))?Promise.resolve(iD().grecaptcha):new Promise((i,n)=>{let r=iD().setTimeout(()=>{n(T(e,"network-request-failed"))},i$.get());iD()[iJ]=()=>{iD().clearTimeout(r),delete iD()[iJ];let s=iD().grecaptcha;if(!s||!z(s)){n(T(e,"internal-error"));return}let a=s.render;s.render=(e,t)=>{let i=a(e,t);return this.counter++,i},this.hostLanguage=t,i(s)},ej(`${eG.recaptchaV2Script}?${(0,a.querystring)({onload:iJ,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(r),n(T(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=iD().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iZ{async load(e){return new iq(e)}clearedOneInstance(){}}/** + */let iJ=eW("rcb"),i$=new D(3e4,6e4);class iQ{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=iD().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return(I(t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t),e,"argument-error"),this.shouldResolveImmediately(t)&&z(iD().grecaptcha))?Promise.resolve(iD().grecaptcha):new Promise((i,n)=>{let r=iD().setTimeout(()=>{n(T(e,"network-request-failed"))},i$.get());iD()[iJ]=()=>{iD().clearTimeout(r),delete iD()[iJ];let s=iD().grecaptcha;if(!s||!z(s)){n(T(e,"internal-error"));return}let a=s.render;s.render=(e,t)=>{let i=a(e,t);return this.counter++,i},this.hostLanguage=t,i(s)},ej(`${eG.recaptchaV2Script}?${(0,a.querystring)({onload:iJ,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(r),n(T(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=iD().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iZ{async load(e){return new iK(e)}clearedOneInstance(){}}/** * @license * Copyright 2020 Google LLC * @@ -6751,7 +6751,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let i0="recaptcha",i1={theme:"light",type:"image"};class i2{constructor(e,t,i=Object.assign({},i1)){this.parameters=i,this.type=i0,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eU(e),this.isInvisible="invisible"===this.parameters.size,I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let n="string"==typeof t?document.getElementById(t):t;I(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iZ:new iQ,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise(i=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),i(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){I(!this.parameters.sitekey,this.auth,"argument-error"),I(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let i=iD()[e];"function"==typeof i&&i(t)}}}assertNotDestroyed(){I(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;I(R()&&!ik(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await K(this.auth);I(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return I(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/** + */let i0="recaptcha",i1={theme:"light",type:"image"};class i2{constructor(e,t,i=Object.assign({},i1)){this.parameters=i,this.type=i0,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eU(e),this.isInvisible="invisible"===this.parameters.size,I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let n="string"==typeof t?document.getElementById(t):t;I(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iZ:new iQ,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise(i=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),i(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){I(!this.parameters.sitekey,this.auth,"argument-error"),I(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),I("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let i=iD()[e];"function"==typeof i&&i(t)}}}assertNotDestroyed(){I(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;I(R()&&!ik(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await q(this.auth);I(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return I(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/** * @license * Copyright 2020 Google LLC * @@ -6931,7 +6931,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let nz="webStorageSupport",nX=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=iP,this._completeRedirectFn=nC,this._overrideRedirectResult=nm}async _openPopup(e,t,i,n){var r;P(null===(r=this.eventManagers[e._key()])||void 0===r?void 0:r.manager,"_initialize() not called before _openPopup()");let s=await nH(e,t,i,M(),n);return function(e,t,i,n=500,r=600){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),h="",c=Object.assign(Object.assign({},nj),{width:n.toString(),height:r.toString(),top:s,left:o}),l=(0,a.getUA)().toLowerCase();i&&(h=eC(l)?"_blank":i),eS(l)&&(t=t||"http://localhost",c.scrollbars="yes");let u=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,a.getUA)()){var t;return eM(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==h)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}(t||"",h),new nW(null);let d=window.open(t||"",h,u);I(d,e,"popup-blocked");try{d.focus()}catch(e){}return new nW(d)}(e,s,iR())}async _openRedirect(e,t,i,n){var r;return await this._originValidation(e),r=await nH(e,t,i,M(),n),iD().location.href=r,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(P(i,"If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await nG(e),i=new nI(e);return t.register("authEvent",t=>(I(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nz,{type:nz},i=>{var n;let r=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n[nz];void 0!==r&&t(!!r),w(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nD(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eL()||eA()||eM()}};class nq{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return O("unexpected MultiFactorSessionType")}}}class nK extends nq{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nK(e)}_finalizeEnroll(e,t,i){return V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nJ{constructor(){}static assertion(e){return nK._fromCredential(e)}}nJ.FACTOR_ID="phone";class n${static assertionForEnrollment(e,t){return nQ._fromSecret(e,t)}static assertionForSignIn(e,t){return nQ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;I(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let n=await V(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",U(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return nZ._fromStartTotpMfaEnrollmentResponse(n,e.user.auth)}}n$.FACTOR_ID="totp";class nQ extends nq{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new nQ(t,void 0,e)}static _fromEnrollmentId(e,t){return new nQ(t,e)}async _finalizeEnroll(e,t,i){return I(void 0!==this.secret,e,"argument-error"),V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){I(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class nZ{constructor(e,t,i,n,r,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=r}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nZ(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let n=!1;return(n0(e)||n0(t))&&(n=!0),n&&(n0(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),n0(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function n0(e){return void 0===e||(null==e?void 0:e.length)===0}var n1="@firebase/auth",n2="1.7.9";/** + */let nz="webStorageSupport",nX=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=iP,this._completeRedirectFn=nC,this._overrideRedirectResult=nm}async _openPopup(e,t,i,n){var r;P(null===(r=this.eventManagers[e._key()])||void 0===r?void 0:r.manager,"_initialize() not called before _openPopup()");let s=await nH(e,t,i,M(),n);return function(e,t,i,n=500,r=600){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString(),h="",c=Object.assign(Object.assign({},nj),{width:n.toString(),height:r.toString(),top:s,left:o}),l=(0,a.getUA)().toLowerCase();i&&(h=eC(l)?"_blank":i),eS(l)&&(t=t||"http://localhost",c.scrollbars="yes");let u=Object.entries(c).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,a.getUA)()){var t;return eM(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==h)return function(e,t){let i=document.createElement("a");i.href=e,i.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(n)}(t||"",h),new nW(null);let d=window.open(t||"",h,u);I(d,e,"popup-blocked");try{d.focus()}catch(e){}return new nW(d)}(e,s,iR())}async _openRedirect(e,t,i,n){var r;return await this._originValidation(e),r=await nH(e,t,i,M(),n),iD().location.href=r,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(P(i,"If manager is not set, promise should be"),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await nG(e),i=new nI(e);return t.register("authEvent",t=>(I(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nz,{type:nz},i=>{var n;let r=null===(n=null==i?void 0:i[0])||void 0===n?void 0:n[nz];void 0!==r&&t(!!r),w(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nD(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eL()||eA()||eM()}};class nK{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return O("unexpected MultiFactorSessionType")}}}class nq extends nK{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nq(e)}_finalizeEnroll(e,t,i){return V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nJ{constructor(){}static assertion(e){return nq._fromCredential(e)}}nJ.FACTOR_ID="phone";class n${static assertionForEnrollment(e,t){return nQ._fromSecret(e,t)}static assertionForSignIn(e,t){return nQ._fromEnrollmentId(e,t)}static async generateSecret(e){var t,i;I(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let n=await V(i=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",U(i,{idToken:e.credential,totpEnrollmentInfo:{}}));return nZ._fromStartTotpMfaEnrollmentResponse(n,e.user.auth)}}n$.FACTOR_ID="totp";class nQ extends nK{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new nQ(t,void 0,e)}static _fromEnrollmentId(e,t){return new nQ(t,e)}async _finalizeEnroll(e,t,i){return I(void 0!==this.secret,e,"argument-error"),V(e,"POST","/v2/accounts/mfaEnrollment:finalize",U(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){I(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return V(e,"POST","/v2/accounts/mfaSignIn:finalize",U(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class nZ{constructor(e,t,i,n,r,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=r}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nZ(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var i;let n=!1;return(n0(e)||n0(t))&&(n=!0),n&&(n0(e)&&(e=(null===(i=this.auth.currentUser)||void 0===i?void 0:i.email)||"unknownuser"),n0(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function n0(e){return void 0===e||(null==e?void 0:e.length)===0}var n1="@firebase/auth",n2="1.7.9";/** * @license * Copyright 2020 Google LLC * @@ -6946,7 +6946,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class n3{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){I(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let n5=(0,a.getExperimentalSetting)("authIdTokenMaxAge")||300,n4=null,n9=e=>async t=>{let i=t&&await t.getIdTokenResult(),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>n5)return;let r=null==i?void 0:i.token;n4!==r&&(n4=r,await fetch(e,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))};function n6(e=(0,s.getApp)()){let t=(0,s._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=eq(e,{popupRedirectResolver:nX,persistence:[iX,iI,iP]}),n=(0,a.getExperimentalSetting)("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){let t=n9(e.toString());iu(i,t,()=>t(i.currentUser)),il(i,e=>t(e))}}let r=(0,a.getDefaultEmulatorHost)("auth");return r&&eK(i,`http://${r}`),i}eG={loadJS:e=>new Promise((t,i)=>{var n,r;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=T("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(r=null===(n=document.getElementsByTagName("head"))||void 0===n?void 0:n[0])&&void 0!==r?r:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},n="Browser",(0,s._registerComponent)(new(0,c.Component)("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;I(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let h=new eB(i,r,s,{apiKey:a,authDomain:o,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:eD(n)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],n=(Array.isArray(i)?i:[i]).map(ey);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(h,t),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s._registerComponent)(new(0,c.Component)("auth-internal",e=>new n3(eU(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.registerVersion)(n1,n2,/** + */class n3{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){I(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let n5=(0,a.getExperimentalSetting)("authIdTokenMaxAge")||300,n4=null,n9=e=>async t=>{let i=t&&await t.getIdTokenResult(),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>n5)return;let r=null==i?void 0:i.token;n4!==r&&(n4=r,await fetch(e,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))};function n6(e=(0,s.getApp)()){let t=(0,s._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let i=eK(e,{popupRedirectResolver:nX,persistence:[iX,iI,iP]}),n=(0,a.getExperimentalSetting)("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){let t=n9(e.toString());iu(i,t,()=>t(i.currentUser)),il(i,e=>t(e))}}let r=(0,a.getDefaultEmulatorHost)("auth");return r&&eq(i,`http://${r}`),i}eG={loadJS:e=>new Promise((t,i)=>{var n,r;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=T("internal-error");t.customData=e,i(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(r=null===(n=document.getElementsByTagName("head"))||void 0===n?void 0:n[0])&&void 0!==r?r:document).appendChild(s)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},n="Browser",(0,s._registerComponent)(new(0,c.Component)("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:a,authDomain:o}=i.options;I(a&&!a.includes(":"),"invalid-api-key",{appName:i.name});let h=new eB(i,r,s,{apiKey:a,authDomain:o,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:eD(n)});return function(e,t){let i=(null==t?void 0:t.persistence)||[],n=(Array.isArray(i)?i:[i]).map(ey);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(h,t),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,s._registerComponent)(new(0,c.Component)("auth-internal",e=>new n3(eU(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.registerVersion)(n1,n2,/** * @license * Copyright 2020 Google LLC * @@ -6961,7 +6961,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(n)),(0,s.registerVersion)(n1,n2,"esm2017")},{"@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"3aD9C":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"__extends",()=>s),n.export(i,"__assign",()=>a),n.export(i,"__rest",()=>o),n.export(i,"__decorate",()=>h),n.export(i,"__param",()=>c),n.export(i,"__esDecorate",()=>l),n.export(i,"__runInitializers",()=>u),n.export(i,"__propKey",()=>d),n.export(i,"__setFunctionName",()=>f),n.export(i,"__metadata",()=>p),n.export(i,"__awaiter",()=>g),n.export(i,"__generator",()=>m),n.export(i,"__createBinding",()=>v),n.export(i,"__exportStar",()=>y),n.export(i,"__values",()=>b),n.export(i,"__read",()=>x),n.export(i,"__spread",()=>E),n.export(i,"__spreadArrays",()=>w),n.export(i,"__spreadArray",()=>T),n.export(i,"__await",()=>S),n.export(i,"__asyncGenerator",()=>A),n.export(i,"__asyncDelegator",()=>C),n.export(i,"__asyncValues",()=>_),n.export(i,"__makeTemplateObject",()=>I),n.export(i,"__importStar",()=>M),n.export(i,"__importDefault",()=>R),n.export(i,"__classPrivateFieldGet",()=>L),n.export(i,"__classPrivateFieldSet",()=>D),n.export(i,"__classPrivateFieldIn",()=>k),n.export(i,"__addDisposableResource",()=>N),n.export(i,"__disposeResources",()=>B),n.export(i,"__rewriteRelativeImportExtension",()=>U);var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var a=function(){return(a=Object.assign||function(e){for(var t,i=1,n=arguments.length;it.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i}function h(e,t,i,n){var r,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t){return function(i,n){t(i,n,e)}}function l(e,t,i,n,r,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,h=n.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!t&&e?n.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,f=i.length-1;f>=0;f--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,i[f])("accessor"===h?{get:u.get,set:u.set}:u[c],p);if("accessor"===h){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=a(m.get))&&(u.get=o),(o=a(m.set))&&(u.set=o),(o=a(m.init))&&r.unshift(o)}else(o=a(m))&&("field"===h?r.unshift(o):u[c]=o)}l&&Object.defineProperty(l,n.name,u),d=!0}function u(e,t,i){for(var n=arguments.length>2,r=0;r0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a}function E(){for(var e=[],t=0;t1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var i;(i=r[e](t)).value instanceof S?Promise.resolve(i.value.v).then(h,c):l(s[0][2],i)}catch(e){l(s[0][3],e)}}function h(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function C(e){var t,i;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:S(e[n](t)),done:!1}:r?r(t):t}:r}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise(function(n,r){!function(e,t,i,n){Promise.resolve(n).then(function(t){e({value:t,done:i})},t)}(n,r,(t=e[i](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return(P=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t})(e)};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=P(e),n=0;nc);var r=e("firebase/compat/app"),s=n.interopDefault(r);e("firebase/compat/auth");var a=e("dialog-polyfill"),o=n.interopDefault(a);e("material-design-lite/src/mdlComponentHandler"),e("material-design-lite/src/button/button"),e("material-design-lite/src/progress/progress"),e("material-design-lite/src/spinner/spinner"),e("material-design-lite/src/textfield/textfield");var h=arguments[3];(function(){(function(){var e,t,i="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)t=Object.setPrototypeOf;else{t:{var n={};try{n.__proto__={xb:!0},n4=n.xb;break t}catch(e){}n4=!1}t=n4?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var r=t;function a(e,t){if(e.prototype=i(t.prototype),e.prototype.constructor=e,r)r(e,t);else for(var n in t)if("prototype"!=n){if(Object.defineProperties){var s=Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(e,n,s)}else e[n]=t[n]}e.K=t.prototype}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c="undefined"!=typeof window&&window===this?this:void 0!==h&&null!=h?h:this;function l(e,t){if(t){var i=c;e=e.split(".");for(var n=0;n(t=t||0)&&(t=Math.max(t+n,0));t>>0),S=0;function A(e,t,i){return e.call.apply(e.bind,arguments)}function C(e,t,i){if(!e)throw Error();if(2/g,J=/"/g,$=/'/g,Q=/\x00/g,Z=/[\x00&<>"']/;function ee(e,t){return et?1:0}function et(e){return Z.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(X,"&")),-1!=e.indexOf("<")&&(e=e.replace(q,"<")),-1!=e.indexOf(">")&&(e=e.replace(K,">")),-1!=e.indexOf('"')&&(e=e.replace(J,""")),-1!=e.indexOf("'")&&(e=e.replace($,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Q,"�"))),e}function ei(e,t,i){for(var n in e)t.call(i,e[n],n,e)}function en(e){var t,i={};for(t in e)i[t]=e[t];return i}var er="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function es(e,t){for(var i,n,r=1;r=e.length)throw ea;if(t in e)return e[t++];t++}},i}throw Error("Not implemented")}function ec(e,t){this.g={},this.a=[],this.j=this.h=0;var i=arguments.length;if(1=n.a.length)throw ea;var r=n.a[t++];return e?r:n.g[r]},r};var ed=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ef(e,t,i,n){for(var r=i.length;0<=(t=e.indexOf(i,t))&&tn)return null;var r=e.indexOf("&",n);return(0>r||r>i)&&(r=i),n+=t.length+1,decodeURIComponent(e.substr(n,r-n).replace(/\+/g," "))}var em=/[?&]($|#)/;function ev(e,t){var i;this.h=this.A=this.j="",this.C=null,this.s=this.g="",this.i=!1,e instanceof ev?(this.i=d(t)?t:e.i,ey(this,e.j),this.A=e.A,this.h=e.h,eb(this,e.C),this.g=e.g,ex(this,eD(e.a)),this.s=e.s):e&&(i=String(e).match(ed))?(this.i=!!t,ey(this,i[1]||"",!0),this.A=ew(i[2]||""),this.h=ew(i[3]||"",!0),eb(this,i[4]),this.g=ew(i[5]||"",!0),ex(this,i[6]||"",!0),this.s=ew(i[7]||"")):(this.i=!!t,this.a=new eP(null,this.i))}function ey(e,t,i){e.j=i?ew(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function eb(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.C=t}else e.C=null}function ex(e,t,i){var n,r;t instanceof eP?(e.a=t,n=e.a,(r=e.i)&&!n.j&&(eM(n),n.h=null,n.a.forEach(function(e,t){var i=t.toLowerCase();t!=i&&(eR(this,t),eR(this,i),0>4&15).toString(16)+(15&e).toString(16)}ev.prototype.toString=function(){var e=[],t=this.j;t&&e.push(eT(t,eA,!0),":");var i=this.h;return(i||"file"==t)&&(e.push("//"),(t=this.A)&&e.push(eT(t,eA,!0),"@"),e.push(encodeURIComponent(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.C)&&e.push(":",String(i))),(i=this.g)&&(this.h&&"/"!=i.charAt(0)&&e.push("/"),e.push(eT(i,"/"==i.charAt(0)?e_:eC,!0))),(i=this.a.toString())&&e.push("?",i),(i=this.s)&&e.push("#",eT(i,eO)),e.join("")};var eA=/[#\/\?@]/g,eC=/[#\?:]/g,e_=/[#\?]/g,eI=/[#\?@]/g,eO=/#/g;function eP(e,t){this.g=this.a=null,this.h=e||null,this.j=!!t}function eM(e){e.a||(e.a=new ec,e.g=0,e.h&&function(e,t){if(e){e=e.split("&");for(var i=0;i2*e.h&&el(e)))}function eL(e,t){return eM(e),t=ek(e,t),eu(e.a.g,t)}function eD(e){var t=new eP;return t.h=e.h,e.a&&(t.a=new ec(e.a),t.g=e.g),t}function ek(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function eN(e){this.a=eE(e)}function eF(e){return e.a.a.get(eU.Pa)||null}function eB(e,t){t?e.a.a.set(eU.PROVIDER_ID,t):eR(e.a.a,eU.PROVIDER_ID)}(e=eP.prototype).add=function(e,t){eM(this),this.h=null,e=ek(this,e);var i=this.a.get(e);return i||this.a.set(e,i=[]),i.push(t),this.g+=1,this},e.clear=function(){this.a=this.h=null,this.g=0},e.forEach=function(e,t){eM(this),this.a.forEach(function(i,n){F(i,function(i){e.call(t,i,n,this)},this)},this)},e.ja=function(){eM(this);for(var e=this.a.la(),t=this.a.ja(),i=[],n=0;nparseFloat(e1)){n7=String(e3);break t}}n7=e1}var e5={};function e4(e){var t;return t=function(){for(var t=0,i=z(String(n7)).split("."),n=z(String(e)).split("."),r=Math.max(i.length,n.length),s=0;0==t&&s",0);var tm=tg("",0);tg("
",0);var tv=(n2=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!!e.firstChild&&(t=e.firstChild.firstChild,e.innerHTML=tf(tm),!t.parentElement)},n5=!1,function(){return n5||(n3=n2(),n5=!0),n3});function ty(e,t){t=t instanceof tn?t:to(t),e.assign(tr(t))}function tb(e,t){this.a=d(e)?e:0,this.g=d(t)?t:0}function tx(e,t){this.width=e,this.height=t}function tE(e){return e?new tM(tI(e)):n9||(n9=new tM)}function tw(e,t){var i=t||document;return i.querySelectorAll&&i.querySelector?i.querySelectorAll("."+e):tS(document,e,t)}function tT(e,t){var i=t||document;if(i.getElementsByClassName)e=i.getElementsByClassName(e)[0];else{i=document;var n=t||i;e=n.querySelectorAll&&n.querySelector&&e?n.querySelector(e?"."+e:""):tS(i,e,t)[0]||null}return e||null}function tS(e,t,i){var n;if((e=i||e).querySelectorAll&&e.querySelector&&t)return e.querySelectorAll(t?"."+t:"");if(t&&e.getElementsByClassName){var r=e.getElementsByClassName(t);return r}if(r=e.getElementsByTagName("*"),t){var s={};for(i=n=0;e=r[i];i++){var a=e.className;"function"==typeof a.split&&G(a.split(/\s+/),t)&&(s[n++]=e)}return s.length=n,s}return r}tb.prototype.toString=function(){return"("+this.a+", "+this.g+")"},tb.prototype.ceil=function(){return this.a=Math.ceil(this.a),this.g=Math.ceil(this.g),this},tb.prototype.floor=function(){return this.a=Math.floor(this.a),this.g=Math.floor(this.g),this},tb.prototype.round=function(){return this.a=Math.round(this.a),this.g=Math.round(this.g),this},(e=tx.prototype).toString=function(){return"("+this.width+" x "+this.height+")"},e.aspectRatio=function(){return this.width/this.height},e.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},e.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},e.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this};var tA={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function tC(e){return e.scrollingElement?e.scrollingElement:(eJ||"CSS1Compat"!=e.compatMode)&&e.body||e.documentElement}function t_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tI(e){return 9==e.nodeType?e:e.ownerDocument||e.document}function tO(e,t){if("textContent"in e)e.textContent=t;else if(3==e.nodeType)e.data=String(t);else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=String(t)}else{for(var i;i=e.firstChild;)e.removeChild(i);e.appendChild(tI(e).createTextNode(String(t)))}}function tP(e,t){return t?function(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}(e,function(e){return!t||f(e.className)&&G(e.className.split(/\s+/),t)}):null}function tM(e){this.a=e||u.document||document}tM.prototype.N=function(){return f(void 0)?this.a.getElementById(void 0):void 0};var tR={Fc:!0},tL={Hc:!0},tD={},tk={Gc:!0};function tN(){throw Error("Do not instantiate directly")}function tF(e,t,i,n){if(e=e(t||tU,void 0,i),n=(n||tE()).a.createElement("DIV"),(e=function(e){if(!w(e))return et(String(e));if(e instanceof tN){if(e.fa===tR)return e.content;if(e.fa===tk)return et(e.content)}return k("Soy template output is unsafe for use as HTML: "+e),"zSoyz"}(e)).match(tB),e=tg(e,null),tv())for(;n.lastChild;)n.removeChild(n.lastChild);return n.innerHTML=tf(e),1==n.childNodes.length&&1==(e=n.firstChild).nodeType&&(n=e),n}tN.prototype.va=null,tN.prototype.toString=function(){return this.content};var tB=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,tU={};function tV(){tN.call(this)}function tG(e){return null!=e&&e.fa===tR?e:e instanceof td?tH(tf(e).toString(),e.g()):tH(et(String(String(e))),function(e){if(null!=e)switch(e.va){case 1:return 1;case -1:return -1;case 0:return 0}return null}(e))}function tj(){tN.call(this)}function tW(e,t){this.content=String(e),this.va=null!=t?t:null}function tY(e){return new tW(e,void 0)}R(tV,tN),tV.prototype.fa=tR,R(tj,tN),tj.prototype.fa=tL,tj.prototype.va=1,R(tW,tN),tW.prototype.fa=tk;var tH=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return e=new t(String(e)),void 0!==i&&(e.va=i),e}}(tV),tz=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e){return new t(String(e))}}(tj);function tX(e){return(e=String(e))?new tW(e,void 0):""}var tq=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return(e=String(e))?(e=new t(e),void 0!==i&&(e.va=i),e):""}}(tV);function tK(e){return null!=e&&e.fa===tR?String(String(e.content).replace(t9,"").replace(t6,"<")).replace(t2,tZ):et(String(e))}function tJ(e){return null!=e&&e.fa===tL?e=String(e).replace(t3,t1):e instanceof tn?e=String(tr(e).toString()).replace(t3,t1):t4.test(e=String(e))?e=e.replace(t3,t1):(k("Bad value `%s` for |filterNormalizeUri",[e]),e="#zSoyz"),e}function t$(e){return null!=e&&e.fa===tD?e=e.content:null==e?e="":e instanceof tl?e instanceof tl&&e.constructor===tl&&e.g===tu?e=e.a:(k("expected object of type SafeStyle, got '"+e+"' of type "+y(e)),e="type_error:SafeStyle"):t5.test(e=String(e))||(k("Bad value `%s` for |filterCssValue",[e]),e="zSoyz"),e}var tQ={"\0":"�"," ":" ","\n":" ","\v":" ","\f":" ","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","…":"…"," ":" ","\u2028":"
","\u2029":"
"};function tZ(e){return tQ[e]}var t0={"\0":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08"," ":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","":"%7F","…":"%C2%85"," ":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","!":"%EF%BC%81","#":"%EF%BC%83","$":"%EF%BC%84","&":"%EF%BC%86","'":"%EF%BC%87","(":"%EF%BC%88",")":"%EF%BC%89","*":"%EF%BC%8A","+":"%EF%BC%8B",",":"%EF%BC%8C","/":"%EF%BC%8F",":":"%EF%BC%9A",";":"%EF%BC%9B","=":"%EF%BC%9D","?":"%EF%BC%9F","@":"%EF%BC%A0","[":"%EF%BC%BB","]":"%EF%BC%BD"};function t1(e){return t0[e]}var t2=/[\x00\x22\x27\x3c\x3e]/g,t3=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,t5=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,t4=/^(?![^#?]*\/(?:\.|%2E){2}(?:[\/?#]|$))(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,t9=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,t6=/=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var ib="closure_listenable_"+(1e6*Math.random()|0),ix=0;function iE(e,t,i,n,r){this.listener=e,this.proxy=null,this.src=t,this.type=i,this.capture=!!n,this.La=r,this.key=++ix,this.sa=this.Ia=!1}function iw(e){e.sa=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function iT(e){this.src=e,this.a={},this.g=0}function iS(e,t){var i=t.type;i in e.a&&j(e.a[i],t)&&(iw(t),0==e.a[i].length&&(delete e.a[i],e.g--))}function iA(e,t,i,n){for(var r=0;rn.keyCode||void 0!=n.returnValue)){t:{var r=!1;if(0==n.keyCode)try{n.keyCode=-1;break t}catch(e){r=!0}(r||void 0==n.returnValue)&&(n.returnValue=!0)}for(n=[],r=t.g;r;r=r.parentNode)n.push(r);for(e=e.type,r=n.length-1;!t.h&&0<=r;r--){t.g=n[r];var s=ik(n[r],e,!0,t);i=i&&s}for(r=0;!t.h&&r>>0);function iV(e){return E(e)?e:(e[iU]||(e[iU]=function(t){return e.handleEvent(t)}),e[iU])}function iG(){ia.call(this),this.J=new iT(this),this.wb=this,this.Ha=null}function ij(e,t){var i,n=e.Ha;if(n)for(i=[];n;n=n.Ha)i.push(n);if(e=e.wb,n=t.type||t,f(t))t=new im(t,e);else if(t instanceof im)t.target=t.target||e;else{var r=t;es(t=new im(n,e),r)}if(r=!0,i)for(var s=i.length-1;!t.h&&0<=s;s--){var a=t.g=i[s];r=iW(a,n,!0,t)&&r}if(t.h||(r=iW(a=t.g=e,n,!0,t)&&r,t.h||(r=iW(a,n,!1,t)&&r)),i)for(s=0;!t.h&&se.g&&(e.g++,t.next=e.a,e.a=t)}function iQ(){this.g=this.a=null}a(iq,iG),iq.prototype.N=function(){return this.a},iq.prototype.register=function(){var e=iX(this.N());iY[e]?G(iY[e],this)||iY[e].push(this):iY[e]=[this]},iJ.prototype.get=function(){if(0',null),i.document.write(tf(t)),i.document.close())):(i=i.open(tr(n).toString(),e,s))&&t.noopener&&(i.opener=null),i}function ng(){try{return!(!window.opener||!window.opener.location||window.opener.location.hostname!==window.location.hostname||window.opener.location.protocol!==window.location.protocol)}catch(e){}return!1}function nm(e){np(e,{target:window.cordova&&window.cordova.InAppBrowser?"_system":"_blank"},void 0)}function nv(e,t){if(null==(e=w(e)&&1==e.nodeType?e:document.querySelector(String(e))))throw Error(t||"Cannot find element.");return e}function ny(){return window.location.href}function nb(e){this.s=[],this.T=nO,this.O=e||null,this.j=this.a=!1,this.h=void 0,this.J=this.l=this.A=!1,this.i=0,this.g=null,this.C=0}function nx(e,t,i){e.a=!0,e.h=i,e.j=!t,nS(e)}function nE(e){if(e.a){if(!e.J)throw new nA(e);e.J=!1}}function nw(e,t,i){e.s.push([t,i,void 0]),e.a&&nS(e)}function nT(e){return V(e.s,function(e){return E(e[1])})}function nS(e){if(e.i&&e.a&&nT(e)){var t=e.i,i=nI[t];i&&(u.clearTimeout(i.a),delete nI[t]),e.i=0}e.g&&(e.g.C--,delete e.g),t=e.h;for(var n=i=!1;e.s.length&&!e.A;){var r=e.s.shift(),s=r[0],a=r[1];if(r=r[2],s=e.j?a:s)try{var o=s.call(r||e.O,t);d(o)&&(e.j=e.j&&(o==t||o instanceof Error),e.h=t=o),(iK(t)||"function"==typeof u.Promise&&t instanceof u.Promise)&&(n=!0,e.A=!0)}catch(n){t=n,e.j=!0,nT(e)||(i=!0)}}e.h=t,n&&(o=_(e.L,e,!0),n=_(e.L,e,!1),t instanceof nb?(nw(t,o,n),t.l=!0):t.then(o,n)),i&&(nI[(t=new n_(t)).a]=t,e.i=t.a)}function nA(){L.call(this)}function nC(){L.call(this)}function n_(e){this.a=u.setTimeout(_(this.h,this),0),this.g=e}R(nf,L),nf.prototype.name="cancel",nb.prototype.cancel=function(e){if(this.a)this.h instanceof nb&&this.h.cancel();else{if(this.g){var t=this.g;delete this.g,e?t.cancel(e):(t.C--,0>=t.C&&t.cancel())}this.T?this.T.call(this.O,this):this.J=!0,this.a||(e=new nC(this),nE(this),nx(this,!1,e))}},nb.prototype.L=function(e,t){this.A=!1,nx(this,e,t)},nb.prototype.callback=function(e){nE(this),nx(this,!0,e)},nb.prototype.then=function(e,t,i){var n,r,s=new i9(function(e,t){n=e,r=t});return nw(this,n,function(e){e instanceof nC?s.cancel():r(e)}),s.then(e,t,i)},nb.prototype.$goog_Thenable=!0,R(nA,L),nA.prototype.message="Deferred has already fired",nA.prototype.name="AlreadyCalledError",R(nC,L),nC.prototype.message="Deferred was canceled",nC.prototype.name="CanceledError",n_.prototype.h=function(){throw delete nI[this.a],this.g};var nI={};function nO(){if(this&&this.rb){var e=this.rb;e&&"SCRIPT"==e.tagName&&nP(e,!0,this.sb)}}function nP(e,t,i){null!=i&&u.clearTimeout(i),e.onload=m,e.onerror=m,e.onreadystatechange=m,t&&window.setTimeout(function(){t_(e)},0)}function nM(e,t){var i="Jsloader error (code #"+e+")";t&&(i+=": "+t),L.call(this,i),this.code=e}function nR(){return u.google&&u.google.accounts&&u.google.accounts.id||null}function nL(e){this.a=e||nR(),this.h=!1,this.g=null}R(nM,L),nL.prototype.cancel=function(){this.a&&this.h&&(this.g&&this.g(null),this.a.cancel())},v(nL);var nD=new e6(e8,"https://accounts.google.com/gsi/client");function nk(){this.a=null}function nN(e,t){this.a=e,this.g=t||function(e){throw e}}function nF(e,t,i){this.reset(e,t,i,void 0,void 0)}nk.prototype.load=function(){var e,t,i,n=this;if(this.a)return this.a;var r=((e=nD)instanceof e6&&e.constructor===e6&&e.g===e7?e=e.a:(k("expected object of type Const, got '"+e+"'"),e="type_error:Const"),(t=new te).a=e,t);return nR()?nn():this.a=(i=null,new i9(function(e){"complete"==u.document.readyState?e():iM(window,"load",i=function(){e()})}).Ca(function(e){throw iR(window,"load",i),e})).then(function(){if(!nR())return new i9(function(e,t){var i,s,a,o,h,c,l,d,f,m=setTimeout(function(){n.a=null,t(Error("Network error!"))},1e4);u.onGoogleLibraryLoad=function(){clearTimeout(m),e()},nn((a=(s={}).document||document,o=tt(r).toString(),l=new nb(c={rb:h=document.createElement("SCRIPT"),sb:void 0}),d=null,0<(f=null!=s.timeout?s.timeout:5e3)&&(d=window.setTimeout(function(){nP(h,!0);var e=new nM(1,"Timeout reached for loading script "+o);nE(l),nx(l,!1,e)},f),c.sb=d),h.onload=h.onreadystatechange=function(){h.readyState&&"loaded"!=h.readyState&&"complete"!=h.readyState||(nP(h,s.xc||!1,d),l.callback(null))},h.onerror=function(){nP(h,!0,d);var e=new nM(0,"Error while loading script "+o);nE(l),nx(l,!1,e)},es(c=s.attributes||{},{type:"text/javascript",charset:"UTF-8"}),ei(c,function(e,t){e&&"object"==typeof e&&e.ma&&(e=e.ka()),"style"==t?h.style.cssText=e:"class"==t?h.className=e:"for"==t?h.htmlFor=e:tA.hasOwnProperty(t)?h.setAttribute(tA[t],e):0==t.lastIndexOf("aria-",0)||0==t.lastIndexOf("data-",0)?h.setAttribute(t,e):h[t]=e}),function(e,t){if(e.src=tt(t),null===g)i:{if((t=(t=u.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&p.test(t)){g=t;break i}g=""}(t=g)&&e.setAttribute("nonce",t)}(h,r),((i=(a||document).getElementsByTagName("HEAD"))&&0!=i.length?i[0]:a.documentElement).appendChild(h),l)).then(function(){nR()&&e()}).Ca(function(e){clearTimeout(m),n.a=null,t(e)})})})},v(nk),nN.prototype.confirm=function(e){return nn(this.a.confirm(e)).Ca(this.g)},nF.prototype.a=null;var nB=0;function nU(e){this.s=e,this.a=this.h=this.j=this.g=null}function nV(e,t){this.name=e,this.value=t}nF.prototype.reset=function(e,t,i,n,r){"number"==typeof r||nB++,this.h=n||P(),this.j=e,this.s=t,this.g=i,delete this.a},nV.prototype.toString=function(){return this.name};var nG=new nV("SEVERE",1e3),nj=new nV("WARNING",900),nW=new nV("CONFIG",700);nU.prototype.log=function(e,t,i){if(e.value>=function e(t){return t.j?t.j:t.g?e(t.g):(k("Root logger has no level set."),null)}(this).value)for(E(t)&&(t=t()),e=new nF(e,String(t),this.s),i&&(e.a=i),i=this;i;){var n=i,r=e;if(n.a)for(var s=0;t=n.a[s];s++)t(r);i=i.g}};var nY={},nH=null;function nz(){nH||(nH=new nU(""),nY[""]=nH,nH.j=nW)}function nX(){this.a=P()}var nq=null;function nK(e){this.j=e||"",nq||(nq=new nX),this.s=nq}function nJ(e){return 10>e?"0"+e:String(e)}function n$(e){nK.call(this,e)}function nQ(){this.s=_(this.h,this),this.a=new n$,this.a.g=!1,this.a.h=!1,this.g=this.a.a=!1,this.j={}}nX.prototype.set=function(e){this.a=e},nX.prototype.reset=function(){this.set(P())},nX.prototype.get=function(){return this.a},nK.prototype.a=!0,nK.prototype.g=!0,nK.prototype.h=!1,R(n$,nK),nQ.prototype.h=function(e){if(!this.j[e.g]){var t,i,n=function(e,t){var i=[];if(i.push(e.j," "),e.g){var n=new Date(t.h);i.push("[",nJ(n.getFullYear()-2e3)+nJ(n.getMonth()+1)+nJ(n.getDate())+" "+nJ(n.getHours())+":"+nJ(n.getMinutes())+":"+nJ(n.getSeconds())+"."+nJ(Math.floor(n.getMilliseconds()/10)),"] ")}return i.push("[",function(e,t){t=(e=(e.h-t)/1e3).toFixed(3);var i=0;if(1>e)i=2;else for(;100>e;)i++,e*=10;for(;0=nG.value)return"error";if(e.value>=nj.value)return"warn";if(e.value>=nW.value)return"log"}return"debug"}(e.j),i=e.a,nZ[t]?nZ[t](n,i||""):nZ.log(n,i||""))}};var nZ=u.console;function n0(e,t){var i=ri;i&&i.log(nG,e,t)}ri=function e(t){if(nz(),!(i=nY[t])){i=new nU(t);var i,n=t.lastIndexOf("."),r=t.substr(n+1);(n=e(t.substr(0,n))).h||(n.h={}),n.h[r]=i,i.g=n,nY[t]=i}return i}("firebaseui");var n1=new nQ;if(1!=n1.g){nz(),rn=nH;var n2,n3,n5,n4,n9,n6,n7,n8,re,rt,ri,rn,rr=n1.s;rn.a||(rn.a=[]),rn.a.push(rr),n1.g=!0}function rs(e){var t=ri;t&&t.log(nj,e,void 0)}function ra(){this.a=("undefined"==typeof document?null:document)||{cookie:""}}function ro(e){e=(e.a.cookie||"").split(";");for(var t,i,n=[],r=[],s=0;si?"":0==i?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(P()+1e3*i).toUTCString(),this.a.cookie=e+"="+t+r+n+i+s},e.get=function(e,t){for(var i,n=e+"=",r=(this.a.cookie||"").split(";"),s=0;s>=8),t[i++]=r}return t}function rm(e){for(this.i=e,this.g=this.i.length/4,this.j=this.g+6,this.h=[[],[],[],[]],this.s=[[],[],[],[]],this.a=Array(rv*(this.j+1)),e=0;er;r++)i=t[i=4*r+n],e.h[n][r]=i}function rb(e){for(var t=[],i=0;in;n++)t[4*n+i]=e.h[i][n];return t}function rx(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]^=e.a[4*t+n][i]}function rE(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]=t[e.h[i][n]]}function rw(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][i]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][(i+t)%rv]}function rT(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][(i+t)%rv]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][i]}function rS(e){e[0]=rA[e[0]],e[1]=rA[e[1]],e[2]=rA[e[2]],e[3]=rA[e[3]]}var rA=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rC=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],r_=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],rI=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,27,25,31,29,19,17,23,21,11,9,15,13,3,1,7,5,59,57,63,61,51,49,55,53,43,41,47,45,35,33,39,37,91,89,95,93,83,81,87,85,75,73,79,77,67,65,71,69,123,121,127,125,115,113,119,117,107,105,111,109,99,97,103,101,155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229],rO=[0,3,6,5,12,15,10,9,24,27,30,29,20,23,18,17,48,51,54,53,60,63,58,57,40,43,46,45,36,39,34,33,96,99,102,101,108,111,106,105,120,123,126,125,116,119,114,113,80,83,86,85,92,95,90,89,72,75,78,77,68,71,66,65,192,195,198,197,204,207,202,201,216,219,222,221,212,215,210,209,240,243,246,245,252,255,250,249,232,235,238,237,228,231,226,225,160,163,166,165,172,175,170,169,184,187,190,189,180,183,178,177,144,147,150,149,156,159,154,153,136,139,142,141,132,135,130,129,155,152,157,158,151,148,145,146,131,128,133,134,143,140,137,138,171,168,173,174,167,164,161,162,179,176,181,182,191,188,185,186,251,248,253,254,247,244,241,242,227,224,229,230,239,236,233,234,203,200,205,206,199,196,193,194,211,208,213,214,223,220,217,218,91,88,93,94,87,84,81,82,67,64,69,70,79,76,73,74,107,104,109,110,103,100,97,98,115,112,117,118,127,124,121,122,59,56,61,62,55,52,49,50,35,32,37,38,47,44,41,42,11,8,13,14,7,4,1,2,19,16,21,22,31,28,25,26],rP=[0,9,18,27,36,45,54,63,72,65,90,83,108,101,126,119,144,153,130,139,180,189,166,175,216,209,202,195,252,245,238,231,59,50,41,32,31,22,13,4,115,122,97,104,87,94,69,76,171,162,185,176,143,134,157,148,227,234,241,248,199,206,213,220,118,127,100,109,82,91,64,73,62,55,44,37,26,19,8,1,230,239,244,253,194,203,208,217,174,167,188,181,138,131,152,145,77,68,95,86,105,96,123,114,5,12,23,30,33,40,51,58,221,212,207,198,249,240,235,226,149,156,135,142,177,184,163,170,236,229,254,247,200,193,218,211,164,173,182,191,128,137,146,155,124,117,110,103,88,81,74,67,52,61,38,47,16,25,2,11,215,222,197,204,243,250,225,232,159,150,141,132,187,178,169,160,71,78,85,92,99,106,113,120,15,6,29,20,43,34,57,48,154,147,136,129,190,183,172,165,210,219,192,201,246,255,228,237,10,3,24,17,46,39,60,53,66,75,80,89,102,111,116,125,161,168,179,186,133,140,151,158,233,224,251,242,205,196,223,214,49,56,35,42,21,28,7,14,121,112,107,98,93,84,79,70],rM=[0,11,22,29,44,39,58,49,88,83,78,69,116,127,98,105,176,187,166,173,156,151,138,129,232,227,254,245,196,207,210,217,123,112,109,102,87,92,65,74,35,40,53,62,15,4,25,18,203,192,221,214,231,236,241,250,147,152,133,142,191,180,169,162,246,253,224,235,218,209,204,199,174,165,184,179,130,137,148,159,70,77,80,91,106,97,124,119,30,21,8,3,50,57,36,47,141,134,155,144,161,170,183,188,213,222,195,200,249,242,239,228,61,54,43,32,17,26,7,12,101,110,115,120,73,66,95,84,247,252,225,234,219,208,205,198,175,164,185,178,131,136,149,158,71,76,81,90,107,96,125,118,31,20,9,2,51,56,37,46,140,135,154,145,160,171,182,189,212,223,194,201,248,243,238,229,60,55,42,33,16,27,6,13,100,111,114,121,72,67,94,85,1,10,23,28,45,38,59,48,89,82,79,68,117,126,99,104,177,186,167,172,157,150,139,128,233,226,255,244,197,206,211,216,122,113,108,103,86,93,64,75,34,41,52,63,14,5,24,19,202,193,220,215,230,237,240,251,146,153,132,143,190,181,168,163],rR=[0,13,26,23,52,57,46,35,104,101,114,127,92,81,70,75,208,221,202,199,228,233,254,243,184,181,162,175,140,129,150,155,187,182,161,172,143,130,149,152,211,222,201,196,231,234,253,240,107,102,113,124,95,82,69,72,3,14,25,20,55,58,45,32,109,96,119,122,89,84,67,78,5,8,31,18,49,60,43,38,189,176,167,170,137,132,147,158,213,216,207,194,225,236,251,246,214,219,204,193,226,239,248,245,190,179,164,169,138,135,144,157,6,11,28,17,50,63,40,37,110,99,116,121,90,87,64,77,218,215,192,205,238,227,244,249,178,191,168,165,134,139,156,145,10,7,16,29,62,51,36,41,98,111,120,117,86,91,76,65,97,108,123,118,85,88,79,66,9,4,19,30,61,48,39,42,177,188,171,166,133,136,159,146,217,212,195,206,237,224,247,250,183,186,173,160,131,142,153,148,223,210,197,200,235,230,241,252,103,106,125,112,83,94,73,68,15,2,21,24,59,54,33,44,12,1,22,27,56,53,34,47,100,105,126,115,80,93,74,71,220,209,198,203,232,229,242,255,180,185,174,163,128,141,154,151],rL=[0,14,28,18,56,54,36,42,112,126,108,98,72,70,84,90,224,238,252,242,216,214,196,202,144,158,140,130,168,166,180,186,219,213,199,201,227,237,255,241,171,165,183,185,147,157,143,129,59,53,39,41,3,13,31,17,75,69,87,89,115,125,111,97,173,163,177,191,149,155,137,135,221,211,193,207,229,235,249,247,77,67,81,95,117,123,105,103,61,51,33,47,5,11,25,23,118,120,106,100,78,64,82,92,6,8,26,20,62,48,34,44,150,152,138,132,174,160,178,188,230,232,250,244,222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,52,58,40,38,124,114,96,110,68,74,88,86,55,57,43,37,15,1,19,29,71,73,91,85,127,113,99,109,215,217,203,197,239,225,243,253,167,169,187,181,159,145,131,141];function rD(e,t){e=new rm(rN(e)),t=rg(t);for(var i,n=t.splice(0,16),r="";n.length;){i=16-n.length;for(var s=0;so;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rI[a[0]]^rO[a[1]]^a[2]^a[3],s[1][o]=a[0]^rI[a[1]]^rO[a[2]]^a[3],s[2][o]=a[0]^a[1]^rI[a[2]]^rO[a[3]],s[3][o]=rO[a[0]]^a[1]^a[2]^rI[a[3]];rx(i,n)}rE(i,rA),rw(i),rx(i,i.j),r+=U(rb(i),function(e){return 1<(e=e.toString(16)).length?e:"0"+e}).join(""),n=t.splice(0,16)}return r}function rk(e,t){e=new rm(rN(e));for(var i=[],n=0;no;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rL[a[0]]^rM[a[1]]^rR[a[2]]^rP[a[3]],s[1][o]=rP[a[0]]^rL[a[1]]^rM[a[2]]^rR[a[3]],s[2][o]=rR[a[0]]^rP[a[1]]^rL[a[2]]^rM[a[3]],s[3][o]=rM[a[0]]^rR[a[1]]^rP[a[2]]^rL[a[3]]}if(rT(n),rE(n,rC),rx(n,0),8192>=(n=rb(n)).length)n=String.fromCharCode.apply(null,n);else{for(s=0,r="";s=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,i)}(n,s,s+8192));n=r}t+=n,r=i.splice(0,16)}return t.replace(/(\x00)+$/,"")}function rN(e){e=rg(e.substring(0,32));for(var t=32-e.length,i=0;i=i.length)throw ea;var n=i.key(t++);if(e)return n;if(!f(n=i.getItem(n)))throw"Storage mechanism: Invalid value was encountered";return n},n},e.clear=function(){this.a.clear()},e.key=function(e){return this.a.key(e)},R(rz,rY),R(rX,rY),R(rq,rW),rq.prototype.set=function(e,t){this.g.set(this.a+e,t)},rq.prototype.get=function(e){return this.g.get(this.a+e)},rq.prototype.ra=function(e){this.g.ra(this.a+e)},rq.prototype.ha=function(e){var t=this.g.ha(!0),i=this,n=new eo;return n.next=function(){for(var n=t.next();n.substr(0,i.a.length)!=i.a;)n=t.next();return e?n.substr(i.a.length):i.g.get(n)},n},rH(new rz);var rK=new rX,rJ=new rj(rH(rK)?new rq(rK,"firebaseui"):null),r$={name:"pendingEmailCredential",storage:rJ},rQ={name:"redirectStatus",storage:rJ},rZ={name:"redirectUrl",storage:rJ},r0={name:"emailForSignIn",storage:new rj(new rl(3600,"/"))},r1={name:"pendingEncryptedCredential",storage:new rj(new rl(3600,"/"))};function r2(e,t){return e.storage.get(t?e.name+":"+t:e.name)}function r3(e,t){e.storage.a.ra(t?e.name+":"+t:e.name)}function r5(e,t,i){e.storage.set(i?e.name+":"+i:e.name,t)}function r4(e){return r2(rZ,e)||null}function r9(e){return rf(e=r2(r$,e)||null)}function r6(e){r3(r$,e)}function r7(e){return(e=r2(rQ,e)||null)&&void 0!==e.tenantId?new rp(e.tenantId):null}function r8(){this.W={}}function se(e,t,i){if(t.toLowerCase() in e.W)throw Error("Configuration "+t+" has already been defined.");e.W[t.toLowerCase()]=i}function st(e,t,i){if(!(t.toLowerCase() in e.W))throw Error("Configuration "+t+" is not defined.");e.W[t.toLowerCase()]=i}function si(e,t){if(!(e=e.get(t)))throw Error("Configuration "+t+" is required.");return e}function sn(){this.g=void 0,this.a={}}function sr(e,t,i,n){for(var r=0;r=e||96<=e&&106>=e||65<=e&&90>=e||(eJ||eX)&&0==e)return!0;switch(e){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:return!0;case 173:return eK;default:return!1}}function at(e){return eK?e=function(e){switch(e){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return e}}(e):eQ&&eJ&&93===e&&(e=91),e}function ai(e){iG.call(this),this.a=e,iO(e,"keydown",this.g,!1,this),iO(e,"click",this.h,!1,this)}function an(e,t){var i=new as(t);if(ij(e,i)){i=new ar(t);try{ij(e,i)}finally{t.stopPropagation()}}}function ar(e){iv.call(this,e.a),this.type="action"}function as(e){iv.call(this,e.a),this.type="beforeaction"}function aa(e){iG.call(this),this.a=e,e=ez?"focusout":"blur",this.g=iO(this.a,ez?"focusin":"focus",this,!ez),this.h=iO(this.a,e,this,!ez)}function ao(e,t){iG.call(this),this.g=e||1,this.a=t||u,this.h=_(this.gc,this),this.j=P()}function ah(e){e.Ka=!1,e.aa&&(e.a.clearTimeout(e.aa),e.aa=null)}function ac(e){ia.call(this),this.g=e,this.a={}}R(ai,iG),ai.prototype.g=function(e){(13==e.keyCode||eJ&&3==e.keyCode)&&an(this,e)},ai.prototype.h=function(e){an(this,e)},ai.prototype.o=function(){ai.K.o.call(this),iR(this.a,"keydown",this.g,!1,this),iR(this.a,"click",this.h,!1,this),delete this.a},R(ar,iv),R(as,iv),R(aa,iG),aa.prototype.handleEvent=function(e){var t=new iv(e.a);t.type="focusin"==e.type||"focus"==e.type?"focusin":"focusout",ij(this,t)},aa.prototype.o=function(){aa.K.o.call(this),iL(this.g),iL(this.h),delete this.a},R(ao,iG),(e=ao.prototype).Ka=!1,e.aa=null,e.gc=function(){if(this.Ka){var e=P()-this.j;0=e.keyCode)return!1;if(ae(e.keyCode))return!0;switch(e.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!eK;default:return 166>e.keyCode||183t.charCode&&ae(n)?t.charCode:0):eH&&!eJ?r=ae(n=this.X)?t.keyCode:0:("keypress"==e.type?(ax&&(i=this.Ua),t.keyCode==t.charCode?32>t.keyCode?(n=t.keyCode,r=0):(n=this.X,r=t.charCode):(n=t.keyCode||this.X,r=t.charCode||0)):(n=t.keyCode||this.X,r=t.charCode||0),eQ&&63==r&&224==n&&(n=191));var s=n=at(n);n?63232<=n&&n in av?s=av[n]:25==n&&e.shiftKey&&(s=9):t.keyIdentifier&&t.keyIdentifier in ay&&(s=ay[t.keyIdentifier]),eK&&ab&&"keypress"==e.type&&!s8(s,this.R,e.shiftKey,e.ctrlKey,i,e.metaKey)||(e=s==this.R,this.R=s,(t=new aw(s,r,e,t)).altKey=i,ij(this,t))},e.N=function(){return this.qa},e.o=function(){am.K.o.call(this),aE(this)},R(aw,iv),aT.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"},aT.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},aT.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},aT.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this};var a_={thin:2,medium:4,thick:6};function aI(e,t){if("none"==(e.currentStyle?e.currentStyle[t+"Style"]:null))return 0;var i=e.currentStyle?e.currentStyle[t+"Width"]:null;if(i in a_)e=a_[i];else if(/^\d+px?$/.test(i))e=parseInt(i,10);else{t=e.style.left;var n=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,e.style.left=i,i=e.style.pixelLeft,e.style.left=t,e.runtimeStyle.left=n,e=+i}return e}function aO(){}function aP(e){iG.call(this),this.s=e||tE(),this.cb=null,this.na=!1,this.g=null,this.L=void 0,this.oa=this.Ea=this.Y=null}function aM(e,t){return e.g?tT(t,e.g||e.s.a):null}function aR(e){return e.L||(e.L=new ac(e)),e.L}function aL(e,t){e.Ea&&F(e.Ea,t,void 0)}function aD(e,t){var i=tP(e,"firebaseui-textfield");t?(s9(e,"firebaseui-input-invalid"),s4(e,"firebaseui-input"),i&&s9(i,"firebaseui-textfield-invalid")):(s9(e,"firebaseui-input"),s4(e,"firebaseui-input-invalid"),i&&s4(i,"firebaseui-textfield-invalid"))}function ak(e,t,i){ic(e,I(il,t=new af(t))),au(aR(e),t,"input",i)}function aN(e,t,i){ic(e,I(il,t=new am(t))),au(aR(e),t,"key",function(e){13==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i(e))})}function aF(e,t,i){ic(e,I(il,t=new ai(t))),au(aR(e),t,"action",function(e){e.stopPropagation(),e.preventDefault(),i(e)})}function aB(e){s4(e,"firebaseui-hidden")}function aU(e,t){t&&tO(e,t),s9(e,"firebaseui-hidden")}function aV(e){return!s5(e,"firebaseui-hidden")&&"none"!=e.style.display}function aG(e){var t=(e=e||{}).email,i=e.disabled,n='

')}function aj(e){e=(e=e||{}).label;var t='")}function aW(){return tH(""+aj({label:tX("Sign In")}))}function aY(){return tH(""+aj({label:tX("Save")}))}function aH(){return tH(""+aj({label:tX("Continue")}))}function az(e){e=(e=e||{}).label;var t='
')}function aX(){var e='

')}function aq(){return tH('Trouble signing in?')}function aK(e){e=(e=e||{}).label;var t='")}function aJ(e){var t="";return e.F&&e.D&&(t+=''),tH(t)}function a$(e){var t="";return e.F&&e.D&&(t+='

By continuing, you are indicating that you accept our Terms of Service and Privacy Policy.

'),tH(t)}function aQ(e){return tH(e='

'+tG(e.message)+'  Dismiss

')}function aZ(e){var t=e.content;return tH(''+tG(t)+"")}function a0(e){var t=e.message;return tH(aZ({content:tq('
'+tG(t)+"
")}))}function a1(e){var t='
';e=e.items;for(var i=e.length,n=0;n'+(r.Ma?'
':"")+'
'+tG(r.label)+"
"}return tH(t=""+aZ({Ab:tX("firebaseui-list-box-dialog"),content:tq(t+"
")}))}function a2(e){return tH((e=e||{}).tb?'
':'
')}function a3(e,t){return tY((e=(e=e||{}).ga).S?e.S:t.hb[e.providerId]?""+t.hb[e.providerId]:e.providerId&&0==e.providerId.indexOf("saml.")?e.providerId.substring(5):e.providerId&&0==e.providerId.indexOf("oidc.")?e.providerId.substring(5):""+e.providerId)}function a5(e){a6(e,"upgradeElement")}function a4(e){a6(e,"downgradeElements")}v(aO),aO.prototype.a=0,R(aP,iG),(e=aP.prototype).Lb=aO.Xa(),e.N=function(){return this.g},e.Za=function(e){if(this.Y&&this.Y!=e)throw Error("Method not supported");aP.K.Za.call(this,e)},e.kb=function(){this.g=this.s.a.createElement("DIV")},e.render=function(e){if(this.na)throw Error("Component already rendered");this.g||this.kb(),e?e.insertBefore(this.g,null):this.s.a.body.appendChild(this.g),this.Y&&!this.Y.na||this.v()},e.v=function(){this.na=!0,aL(this,function(e){!e.na&&e.N()&&e.v()})},e.ya=function(){aL(this,function(e){e.na&&e.ya()}),this.L&&ad(this.L),this.na=!1},e.o=function(){this.na&&this.ya(),this.L&&(this.L.m(),delete this.L),aL(this,function(e){e.m()}),this.g&&t_(this.g),this.Y=this.g=this.oa=this.Ea=null,aP.K.o.call(this)},e.removeChild=function(e,t){if(e){var i=f(e)?e:e.cb||(e.cb=":"+(e.Lb.a++).toString(36));if(e=this.oa&&i&&(null!==(e=this.oa)&&i in e?e[i]:void 0)||null,i&&e){var n=this.oa;if(i in n&&delete n[i],j(this.Ea,e),t&&(e.ya(),e.g&&t_(e.g)),null==(t=e))throw Error("Unable to set parent component");t.Y=null,aP.K.Za.call(t,null)}}if(!e)throw Error("Child is not in parent component");return e},aQ.a="firebaseui.auth.soy2.element.infoBar",a0.a="firebaseui.auth.soy2.element.progressDialog",a1.a="firebaseui.auth.soy2.element.listBoxDialog",a2.a="firebaseui.auth.soy2.element.busyIndicator";var a9=["mdl-js-textfield","mdl-js-progress","mdl-js-spinner","mdl-js-button"];function a6(e,t){e&&window.componentHandler&&window.componentHandler[t]&&a9.forEach(function(i){s5(e,i)&&window.componentHandler[t](e),F(tw(i,e),function(e){window.componentHandler[t](e)})})}function a7(e,t,i){if(a8.call(this),document.body.appendChild(e),e.showModal||window.dialogPolyfill.registerDialog(e),e.showModal(),a5(e),t&&aF(this,e,function(t){var i=e.getBoundingClientRect();(t.clientX
'+(t?aK(null):"")+aj(null)+'
")}function ou(e,t,i){return t=(e=e||{}).ia,tH(e='")}function od(e,t,i){var n=(e=e||{}).Tb;t=e.Ta;var r=e.ia;return i='",tH(i)}function of(e,t,i){return t=(e=e||{}).Ta,tH(e='

Recover password

Get instructions sent to this email that explain how to reset your password

'+aG(e)+'
'+(t?aK(null):"")+aj({label:tX("Send")})+'
")}function op(e,t,i){t=e.G;var n="";return n+='

Check your email

'+(e="Follow the instructions sent to "+tG(e.email)+" to recover your password")+'

',t&&(n+='
'+aj({label:tX("Done")})+"
"),tH(n+='
")}function og(e,t,i){return tH('
'+a2(null,null,i)+"
")}function om(e,t,i){return tH('
'+a2({tb:!0},null,i)+"
")}function ov(){return tH('
')}function oy(e,t,i){return t='",tH(t)}function ob(e,t,i){return e='

Trouble getting email?

Try these common fixes:

  • Check if the email was marked as spam or filtered.
  • Check your internet connection.
  • Check that you did not misspell your email.
  • Check that your inbox space is not running out or other inbox settings related issues.

If the steps above didn\'t work, you can resend the email. Note that this will deactivate the link in the older email.

'+aK({label:tX("Back")})+'
",tH(e)}function ox(e,t,i){return tH(e='")}function oE(){return tH('

New device or browser detected

Try opening the link using the same device or browser where you started the sign-in process.

'+aK({label:tX("Dismiss")})+"
")}function ow(){return tH('

Session ended

The session associated with this sign-in request has either expired or was cleared.

'+aK({label:tX("Dismiss")})+"
")}function oT(e,t,i){return tH('

Sign in

You already have an account

'+(e="You’ve already used "+tG(e.email)+" to sign in. Enter your password for that account.")+"

"+aX()+'
'+aW()+'
")}function oS(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='")}function oA(e,t,i){t="";var n=""+a3(e,i);return tH(t+='")}function oC(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='

Sign in

You already have an account

'+(n="You’ve already used "+tG(n)+". Sign in with "+tG(e)+" to continue.")+'

'+aj({label:tX("Sign in with "+e)})+'
")}function o_(e,t,i){var n=(e=e||{}).kc;t=e.yb,e=e.Eb;var r='

Not Authorized

';return n?r+=n=""+tG(n)+" is not authorized to view the requested page.":r+="User is not authorized to view the requested page.",r+="

",t&&(r+='

'+(t="Please contact "+tG(t)+" for authorization.")+"

"),r+='
'+aK({label:tX("Back")})+'
")}function oI(e,t,i){return tH('

Sign in

'+(e="To continue sign in with "+tG(e.email)+" on this device, you have to recover the password.")+'

'+aK(null)+aj({label:tX("Recover password")})+'
")}function oO(e){var t="";return tH(t+='

Reset your password

for '+tG(e.email)+"

"+az(function(e){function t(){}var i={label:tX("New password")};for(var n in t.prototype=e,e=new t,i)e[n]=i[n];return e}(e))+'
'+aY()+"
")}function oP(e){return tH(e='

Password changed

You can now sign in with your new password

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oM(e){return tH(e='

Try resetting your password again

Your request to reset your password has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oR(e){var t=e.G,i="";return tH(i+='

Updated email address

'+(e="Your sign-in email address has been changed back to "+tG(e.email)+".")+'

If you didn’t ask to change your sign-in email, it’s possible someone is trying to access your account and you should change your password right away.

'+(t?'
'+aH()+"
":"")+"
")}function oL(e){return tH(e='

Unable to update your email address

There was a problem changing your sign-in email back.

If you try again and still can’t reset your email, try asking your administrator for help.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oD(e){return tH(e='

Your email has been verified

You can now sign in with your new account

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function ok(e){return tH(e='

Try verifying your email again

Your request to verify your email has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oN(e){var t=e.G,i="";return tH(i+='

Your email has been verified and changed

'+(e="You can now sign in with your new email "+tG(e.email)+".")+'

'+(t?'
'+aH()+"
":"")+"
")}function oF(e){return tH(e='

Try updating your email again

Your request to verify and update your email has expired or the link has already been used.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oB(e){var t=e.factorId,i=e.phoneNumber;e=e.G;var n='

Removed second factor

';return"phone"===t?n+=t="The "+tG(t)+" "+tG(i)+" was removed as a second authentication step.":n+="The device or app was removed as a second authentication step.",tH(n+='

If you don\'t recognize this device, someone might be trying to access your account. Consider changing your password right away.

'+(e?'
'+aH()+"
":"")+"
")}function oU(e){return tH(e='

Couldn\'t remove your second factor

Something went wrong removing your second factor.

Try removing it again. If that doesn\'t work, contact support for assistance.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oV(e){var t=e.zb;return e='

Error encountered

'+tG(e.errorMessage)+'

',t&&(e+=aj({label:tX("Retry")})),tH(e+"
")}function oG(e){return tH(e='

Error encountered

'+tG(e.errorMessage)+"

")}function oj(e,t,i){var n=e.Qb;return tH('

Sign in

'+(e="Continue with "+tG(e.jc)+"?")+'

'+(n="You originally wanted to sign in with "+tG(n))+'

'+aK(null)+aj({label:tX("Continue")})+'
")}function oW(e,t,i){var n='")}function oY(e,t,i){var n,r=(e=e||{}).Gb,s=e.Va;return t=e.ia,n=(e='")}function oH(e,t,i){t=(e=e||{}).phoneNumber;var n="";return e='Enter the 6-digit code we sent to ‎'+tG(t)+"",tG(t),t=n,i='"))}function oz(){return tH('

Sign Out

You are now successfully signed out.

')}function oX(e,t,i){var n='
    ';t=(e=e.ec).length;for(var r=0;r',s.V?a+=tG(s.V):a+=s="Sign in to "+tG(s.displayName),n+='
  • '+(a=tH(a+''+o+""))+"
  • "}return tH(n+='
")}function oq(e,t,i){return tH('

Sign in

'+aG(null)+'
'+aj(null)+'
")}function oK(){return aM(this,"firebaseui-id-submit")}function oJ(){return aM(this,"firebaseui-id-secondary-link")}function o$(e,t){aF(this,oK.call(this),function(t){e(t)});var i=oJ.call(this);i&&t&&aF(this,i,function(e){t(e)})}function oQ(){return aM(this,"firebaseui-id-password")}function oZ(){return aM(this,"firebaseui-id-password-error")}function o0(){var e=oQ.call(this),t=oZ.call(this);ak(this,e,function(){aV(t)&&(aD(e,!0),aB(t))})}function o1(){var e=oQ.call(this),t=oZ.call(this);return s6(e)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("Enter your password").toString()),t=!1),t?s6(e):null}function o2(e,t,i,n,r,s){oa.call(this,oT,{email:e},s,"passwordLinking",{F:n,D:r}),this.w=t,this.H=i}R(os,im),R(oa,aP),(e=oa.prototype).kb=function(){var e=tF(this.fb,this.eb,this.Z,this.s);a5(e),this.g=e},e.v=function(){if(oa.K.v.call(this),iz(oo(this),new os("pageEnter",oo(this),{pageId:this.Ga})),this.bb()&&this.Z.F){var e=this.Z.F;aF(this,this.bb(),function(){e()})}if(this.ab()&&this.Z.D){var t=this.Z.D;aF(this,this.ab(),function(){t()})}},e.ya=function(){iz(oo(this),new os("pageExit",oo(this),{pageId:this.Ga})),oa.K.ya.call(this)},e.o=function(){window.clearTimeout(this.ca),this.eb=this.fb=this.ca=null,this.Fa=!1,this.A=null,a4(this.N()),oa.K.o.call(this)},e.I=function(e,t,i,n){function r(){if(a.T)return null;a.Fa=!1,window.clearTimeout(a.ca),a.ca=null,a.A&&(a4(a.A),t_(a.A),a.A=null)}var s,a=this;return a.Fa?null:(a.Fa=!0,s=s5(a.N(),"firebaseui-use-spinner"),a.ca=window.setTimeout(function(){a.N()&&null===a.A&&(a.A=tF(a2,{tb:s},null,a.s),a.N().appendChild(a.A),a5(a.A))},500),e.apply(null,t).then(i,n).then(r,r))},O(oa.prototype,{a:function(e){ot.call(this);var t=tF(aQ,{message:e},null,this.s);this.N().appendChild(t),aF(this,on.call(this),function(){t_(t)})},yc:ot,Ac:oi,zc:on,$:function(e,t){e=tF(a0,{Ma:e,message:t},null,this.s),a7.call(this,e)},h:a8,Cb:oe,Cc:function(){return aM(this,"firebaseui-tos")},bb:function(){return aM(this,"firebaseui-tos-link")},ab:function(){return aM(this,"firebaseui-pp-link")},Dc:function(){return aM(this,"firebaseui-tos-list")}}),ol.a="firebaseui.auth.soy2.page.signIn",ou.a="firebaseui.auth.soy2.page.passwordSignIn",od.a="firebaseui.auth.soy2.page.passwordSignUp",of.a="firebaseui.auth.soy2.page.passwordRecovery",op.a="firebaseui.auth.soy2.page.passwordRecoveryEmailSent",og.a="firebaseui.auth.soy2.page.callback",om.a="firebaseui.auth.soy2.page.spinner",ov.a="firebaseui.auth.soy2.page.blank",oy.a="firebaseui.auth.soy2.page.emailLinkSignInSent",ob.a="firebaseui.auth.soy2.page.emailNotReceived",ox.a="firebaseui.auth.soy2.page.emailLinkSignInConfirmation",oE.a="firebaseui.auth.soy2.page.differentDeviceError",ow.a="firebaseui.auth.soy2.page.anonymousUserMismatch",oT.a="firebaseui.auth.soy2.page.passwordLinking",oS.a="firebaseui.auth.soy2.page.emailLinkSignInLinking",oA.a="firebaseui.auth.soy2.page.emailLinkSignInLinkingDifferentDevice",oC.a="firebaseui.auth.soy2.page.federatedLinking",o_.a="firebaseui.auth.soy2.page.unauthorizedUser",oI.a="firebaseui.auth.soy2.page.unsupportedProvider",oO.a="firebaseui.auth.soy2.page.passwordReset",oP.a="firebaseui.auth.soy2.page.passwordResetSuccess",oM.a="firebaseui.auth.soy2.page.passwordResetFailure",oR.a="firebaseui.auth.soy2.page.emailChangeRevokeSuccess",oL.a="firebaseui.auth.soy2.page.emailChangeRevokeFailure",oD.a="firebaseui.auth.soy2.page.emailVerificationSuccess",ok.a="firebaseui.auth.soy2.page.emailVerificationFailure",oN.a="firebaseui.auth.soy2.page.verifyAndChangeEmailSuccess",oF.a="firebaseui.auth.soy2.page.verifyAndChangeEmailFailure",oB.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionSuccess",oU.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionFailure",oV.a="firebaseui.auth.soy2.page.recoverableError",oG.a="firebaseui.auth.soy2.page.unrecoverableError",oj.a="firebaseui.auth.soy2.page.emailMismatch",oW.a="firebaseui.auth.soy2.page.providerSignIn",oY.a="firebaseui.auth.soy2.page.phoneSignInStart",oH.a="firebaseui.auth.soy2.page.phoneSignInFinish",oz.a="firebaseui.auth.soy2.page.signOut",oX.a="firebaseui.auth.soy2.page.selectTenant",oq.a="firebaseui.auth.soy2.page.providerMatchByEmail",a(o2,oa),o2.prototype.v=function(){this.P(),this.M(this.w,this.H),oc(this,this.i(),this.w),this.i().focus(),oa.prototype.v.call(this)},o2.prototype.o=function(){this.w=null,oa.prototype.o.call(this)},o2.prototype.j=function(){return s6(aM(this,"firebaseui-id-email"))},O(o2.prototype,{i:oQ,B:oZ,P:o0,u:o1,ea:oK,ba:oJ,M:o$});var o3=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function o5(){return aM(this,"firebaseui-id-email")}function o4(){return aM(this,"firebaseui-id-email-error")}function o9(e){var t=o5.call(this),i=o4.call(this);ak(this,t,function(){aV(i)&&(aD(t,!0),aB(i))}),e&&aN(this,t,function(){e()})}function o6(){return z(s6(o5.call(this))||"")}function o7(){var e=o5.call(this),t=o4.call(this),i=s6(e)||"";return i?o3.test(i)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("That email address isn't correct").toString()),t=!1):(aD(e,!1),aU(t,tY("Enter your email address to continue").toString()),t=!1),t?z(s6(e)):null}function o8(e,t,i,n,r,s,a){oa.call(this,ou,{email:i,ia:!!s},a,"passwordSignIn",{F:n,D:r}),this.w=e,this.H=t}function he(e,t,i,n,r,s){oa.call(this,e,t,n,r||"notice",s),this.i=i||null}function ht(e,t,i,n,r){he.call(this,op,{email:e,G:!!t},t,r,"passwordRecoveryEmailSent",{F:i,D:n})}function hi(e,t){he.call(this,oD,{G:!!e},e,t,"emailVerificationSuccess")}function hn(e,t){he.call(this,ok,{G:!!e},e,t,"emailVerificationFailure")}function hr(e,t,i){he.call(this,oN,{email:e,G:!!t},t,i,"verifyAndChangeEmailSuccess")}function hs(e,t){he.call(this,oF,{G:!!e},e,t,"verifyAndChangeEmailFailure")}function ha(e,t){he.call(this,oU,{G:!!e},e,t,"revertSecondFactorAdditionFailure")}function ho(e){he.call(this,oz,void 0,void 0,e,"signOut")}function hh(e,t){he.call(this,oP,{G:!!e},e,t,"passwordResetSuccess")}function hc(e,t){he.call(this,oM,{G:!!e},e,t,"passwordResetFailure")}function hl(e,t){he.call(this,oL,{G:!!e},e,t,"emailChangeRevokeFailure")}function hu(e,t,i){he.call(this,oV,{errorMessage:e,zb:!!t},t,i,"recoverableError")}function hd(e,t){he.call(this,oG,{errorMessage:e},void 0,t,"unrecoverableError")}function hf(e){if("auth/invalid-credential"===e.code&&e.message&&-1!==e.message.indexOf("error=consent_required"))return{code:"auth/user-cancelled"};if(e.message&&-1!==e.message.indexOf("HTTP Cloud Function returned an error:")){var t=JSON.parse(e.message.substring(e.message.indexOf("{"),e.message.lastIndexOf("}")+1));return{code:e.code,message:t&&t.error&&t.error.message||e.message}}return e}function hp(e,t,i,n){function r(i){if(!i.name||"cancel"!=i.name){t:{var n=i.message;try{var r=((JSON.parse(n).error||{}).message||"").toLowerCase().match(/invalid.+(access|id)_token/);if(r&&r.length){var s=!0;break t}}catch(e){}s=!1}if(s)i=oo(t),t.m(),hE(e,i,void 0,tY("Your sign-in session has expired. Please try again.").toString());else{if(s=i&&i.message||"",i.code){if("auth/email-already-in-use"==i.code||"auth/credential-already-in-use"==i.code)return;s=hv(i)}t.a(s)}}}if(cN(e),n)return hg(e,i),nn();if(!i.credential)throw Error("No credential found!");if(!cC(e).currentUser&&!i.user)throw Error("User not logged in.");try{var s,a=(s=i,cU(e),cL(e,function(t){if(e.j&&!e.j.isAnonymous&&sx(cB(e))&&!cC(e).currentUser)return cG(e).then(function(){return"password"==s.credential.providerId&&(s.credential=null),s});if(t)return cG(e).then(function(){return t.linkWithCredential(s.credential)}).then(function(e){return s.user=e.user,s.credential=e.credential,s.operationType=e.operationType,s.additionalUserInfo=e.additionalUserInfo,s},function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return cj(e,t,s.credential)});if(!s.user)throw Error('Internal error: An incompatible or outdated version of "firebase.js" may be used.');return cG(e).then(function(){return c_(e).updateCurrentUser(s.user)}).then(function(){return s.user=c_(e).currentUser,s.operationType="signIn",s.credential&&s.credential.providerId&&"password"==s.credential.providerId&&(s.credential=null),s})}))}catch(e){return n0(e.code||e.message,e),t.a(e.code||e.message),nn()}return i=a.then(function(t){hg(e,t)},r).then(void 0,r),ck(e,a),nn(i)}function hg(e,t){if(!t.user)throw Error("No user found");var i=sV(cB(e));if(sU(cB(e))&&i&&rs("Both signInSuccess and signInSuccessWithAuthResult callbacks are provided. Only signInSuccessWithAuthResult callback will be invoked."),i){i=sV(cB(e));var n=r4(cI(e))||void 0;r3(rZ,cI(e));var r=!1;ng()?((!i||i(t,n))&&(r=!0,ty(window.opener.location,hm(e,n))),i||window.close()):(!i||i(t,n))&&(r=!0,ty(window.location,hm(e,n))),r||e.reset()}else{i=t.user,t=t.credential,n=sU(cB(e)),r=r4(cI(e))||void 0,r3(rZ,cI(e));var s=!1;ng()?((!n||n(i,t,r))&&(s=!0,ty(window.opener.location,hm(e,r))),n||window.close()):(!n||n(i,t,r))&&(s=!0,ty(window.location,hm(e,r))),s||e.reset()}}function hm(e,t){if(!(e=t||cB(e).a.get("signInSuccessUrl")))throw Error("No redirect URL has been found. You must either specify a signInSuccessUrl in the configuration, pass in a redirect URL to the widget URL, or return false from the callback.");return e}function hv(e){var t={code:e.code},i="";switch((t=t||{}).code){case"auth/email-already-in-use":i+="The email address is already used by another account";break;case"auth/requires-recent-login":case"auth/user-token-expired":i+=tY("Please login again to perform this operation");break;case"auth/too-many-requests":i+="You have entered an incorrect password too many times. Please try again in a few minutes.";break;case"auth/user-cancelled":i+="Please authorize the required permissions to sign in to the application";break;case"auth/user-not-found":i+="That email address doesn't match an existing account";break;case"auth/weak-password":i+="Strong passwords have at least 6 characters and a mix of letters and numbers";break;case"auth/wrong-password":i+="The email and password you entered don't match";break;case"auth/network-request-failed":i+="A network error has occurred";break;case"auth/invalid-phone-number":i+=t7();break;case"auth/invalid-verification-code":i+=tY("Wrong code. Try again.");break;case"auth/code-expired":i+="This code is no longer valid";break;case"auth/expired-action-code":i+="This code has expired.";break;case"auth/invalid-action-code":i+="The action code is invalid. This can happen if the code is malformed, expired, or has already been used."}if(t=tY(i).toString())return t;try{return JSON.parse(e.message),n0("Internal error: "+e.message,void 0),ie().toString()}catch(t){return e.message}}function hy(e,t,i,n){function r(){var i,n;i=new rp(e.h.tenantId||null),n=cI(e),r5(rQ,{tenantId:i.a},n),ck(e,t.I(_(e.dc,e),[c],function(){if("file:"===(window.location&&window.location.protocol))return ck(e,cT(e).then(function(i){t.m(),r3(rQ,cI(e)),s2("callback",e,h,nn(i))},a))},o))}function a(n){if(r3(rQ,cI(e)),!n.name||"cancel"!=n.name)switch((n=hf(n)).code){case"auth/popup-blocked":r();break;case"auth/popup-closed-by-user":case"auth/cancelled-popup-request":case"auth/credential-already-in-use":break;case"auth/network-request-failed":case"auth/too-many-requests":case"auth/user-cancelled":t.a(hv(n));break;case"auth/admin-restricted-operation":t.m(),sI(cB(e))?s2("handleUnauthorizedUser",e,h,null,i):s2("callback",e,h,nr(n));break;default:t.m(),s2("callback",e,h,nr(n))}}function o(i){r3(rQ,cI(e)),i.name&&"cancel"==i.name||(n0("signInWithRedirect: "+i.code,void 0),i=hv(i),"blank"==t.Ga&&sF(cB(e))?(t.m(),s2("providerSignIn",e,h,i)):t.a(i))}var h=oo(t),c=function(e,t,i){var n=sy[t]&&s.default.auth[sy[t]]?new s.default.auth[sy[t]]:0==t.indexOf("saml.")?new s.default.auth.SAMLAuthProvider(t):new s.default.auth.OAuthProvider(t);if(!n)throw Error("Invalid Firebase Auth provider!");var r=sO(cB(e),t);if(n.addScope)for(var a=0;a(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n?(r=n,i=""):i=t.substring(r+1,n),n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,n=t[0]+(t[1]?"?"+t[1]:"")+t[2]):n=t,cB(this).a.get("popupMode")?(e=(window.screen.availHeight-600)/2,t=(window.screen.availWidth-500)/2,n=n||"about:blank",(e={width:500,height:600,top:0{let t=setTimeout(()=>{e(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})})}/** + */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(n)),(0,s.registerVersion)(n1,n2,"esm2017")},{"@firebase/app":"hZODh","@firebase/util":"j1gcd","@firebase/logger":"7RF90",tslib:"3aD9C","@firebase/component":"dVjVM","@parcel/transformer-js/src/esmodule-helpers.js":"2SoND"}],"3aD9C":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"__extends",()=>s),n.export(i,"__assign",()=>a),n.export(i,"__rest",()=>o),n.export(i,"__decorate",()=>h),n.export(i,"__param",()=>c),n.export(i,"__esDecorate",()=>l),n.export(i,"__runInitializers",()=>u),n.export(i,"__propKey",()=>d),n.export(i,"__setFunctionName",()=>f),n.export(i,"__metadata",()=>p),n.export(i,"__awaiter",()=>g),n.export(i,"__generator",()=>m),n.export(i,"__createBinding",()=>v),n.export(i,"__exportStar",()=>y),n.export(i,"__values",()=>b),n.export(i,"__read",()=>x),n.export(i,"__spread",()=>E),n.export(i,"__spreadArrays",()=>w),n.export(i,"__spreadArray",()=>T),n.export(i,"__await",()=>S),n.export(i,"__asyncGenerator",()=>A),n.export(i,"__asyncDelegator",()=>C),n.export(i,"__asyncValues",()=>_),n.export(i,"__makeTemplateObject",()=>I),n.export(i,"__importStar",()=>M),n.export(i,"__importDefault",()=>R),n.export(i,"__classPrivateFieldGet",()=>L),n.export(i,"__classPrivateFieldSet",()=>D),n.export(i,"__classPrivateFieldIn",()=>k),n.export(i,"__addDisposableResource",()=>N),n.export(i,"__disposeResources",()=>B),n.export(i,"__rewriteRelativeImportExtension",()=>U);var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var a=function(){return(a=Object.assign||function(e){for(var t,i=1,n=arguments.length;it.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i}function h(e,t,i,n){var r,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function c(e,t){return function(i,n){t(i,n,e)}}function l(e,t,i,n,r,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,h=n.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!t&&e?n.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,f=i.length-1;f>=0;f--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,i[f])("accessor"===h?{get:u.get,set:u.set}:u[c],p);if("accessor"===h){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=a(m.get))&&(u.get=o),(o=a(m.set))&&(u.set=o),(o=a(m.init))&&r.unshift(o)}else(o=a(m))&&("field"===h?r.unshift(o):u[c]=o)}l&&Object.defineProperty(l,n.name,u),d=!0}function u(e,t,i){for(var n=arguments.length>2,r=0;r0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a}function E(){for(var e=[],t=0;t1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var i;(i=r[e](t)).value instanceof S?Promise.resolve(i.value.v).then(h,c):l(s[0][2],i)}catch(e){l(s[0][3],e)}}function h(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function C(e){var t,i;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(i=!i)?{value:S(e[n](t)),done:!1}:r?r(t):t}:r}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise(function(n,r){!function(e,t,i,n){Promise.resolve(n).then(function(t){e({value:t,done:i})},t)}(n,r,(t=e[i](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return(P=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t})(e)};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=P(e),n=0;nc);var r=e("firebase/compat/app"),s=n.interopDefault(r);e("firebase/compat/auth");var a=e("dialog-polyfill"),o=n.interopDefault(a);e("material-design-lite/src/mdlComponentHandler"),e("material-design-lite/src/button/button"),e("material-design-lite/src/progress/progress"),e("material-design-lite/src/spinner/spinner"),e("material-design-lite/src/textfield/textfield");var h=arguments[3];(function(){(function(){var e,t,i="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)t=Object.setPrototypeOf;else{t:{var n={};try{n.__proto__={xb:!0},n4=n.xb;break t}catch(e){}n4=!1}t=n4?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var r=t;function a(e,t){if(e.prototype=i(t.prototype),e.prototype.constructor=e,r)r(e,t);else for(var n in t)if("prototype"!=n){if(Object.defineProperties){var s=Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(e,n,s)}else e[n]=t[n]}e.K=t.prototype}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c="undefined"!=typeof window&&window===this?this:void 0!==h&&null!=h?h:this;function l(e,t){if(t){var i=c;e=e.split(".");for(var n=0;n(t=t||0)&&(t=Math.max(t+n,0));t>>0),S=0;function A(e,t,i){return e.call.apply(e.bind,arguments)}function C(e,t,i){if(!e)throw Error();if(2/g,J=/"/g,$=/'/g,Q=/\x00/g,Z=/[\x00&<>"']/;function ee(e,t){return et?1:0}function et(e){return Z.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(X,"&")),-1!=e.indexOf("<")&&(e=e.replace(K,"<")),-1!=e.indexOf(">")&&(e=e.replace(q,">")),-1!=e.indexOf('"')&&(e=e.replace(J,""")),-1!=e.indexOf("'")&&(e=e.replace($,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Q,"�"))),e}function ei(e,t,i){for(var n in e)t.call(i,e[n],n,e)}function en(e){var t,i={};for(t in e)i[t]=e[t];return i}var er="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function es(e,t){for(var i,n,r=1;r=e.length)throw ea;if(t in e)return e[t++];t++}},i}throw Error("Not implemented")}function ec(e,t){this.g={},this.a=[],this.j=this.h=0;var i=arguments.length;if(1=n.a.length)throw ea;var r=n.a[t++];return e?r:n.g[r]},r};var ed=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ef(e,t,i,n){for(var r=i.length;0<=(t=e.indexOf(i,t))&&tn)return null;var r=e.indexOf("&",n);return(0>r||r>i)&&(r=i),n+=t.length+1,decodeURIComponent(e.substr(n,r-n).replace(/\+/g," "))}var em=/[?&]($|#)/;function ev(e,t){var i;this.h=this.A=this.j="",this.C=null,this.s=this.g="",this.i=!1,e instanceof ev?(this.i=d(t)?t:e.i,ey(this,e.j),this.A=e.A,this.h=e.h,eb(this,e.C),this.g=e.g,ex(this,eD(e.a)),this.s=e.s):e&&(i=String(e).match(ed))?(this.i=!!t,ey(this,i[1]||"",!0),this.A=ew(i[2]||""),this.h=ew(i[3]||"",!0),eb(this,i[4]),this.g=ew(i[5]||"",!0),ex(this,i[6]||"",!0),this.s=ew(i[7]||"")):(this.i=!!t,this.a=new eP(null,this.i))}function ey(e,t,i){e.j=i?ew(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function eb(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.C=t}else e.C=null}function ex(e,t,i){var n,r;t instanceof eP?(e.a=t,n=e.a,(r=e.i)&&!n.j&&(eM(n),n.h=null,n.a.forEach(function(e,t){var i=t.toLowerCase();t!=i&&(eR(this,t),eR(this,i),0>4&15).toString(16)+(15&e).toString(16)}ev.prototype.toString=function(){var e=[],t=this.j;t&&e.push(eT(t,eA,!0),":");var i=this.h;return(i||"file"==t)&&(e.push("//"),(t=this.A)&&e.push(eT(t,eA,!0),"@"),e.push(encodeURIComponent(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.C)&&e.push(":",String(i))),(i=this.g)&&(this.h&&"/"!=i.charAt(0)&&e.push("/"),e.push(eT(i,"/"==i.charAt(0)?e_:eC,!0))),(i=this.a.toString())&&e.push("?",i),(i=this.s)&&e.push("#",eT(i,eO)),e.join("")};var eA=/[#\/\?@]/g,eC=/[#\?:]/g,e_=/[#\?]/g,eI=/[#\?@]/g,eO=/#/g;function eP(e,t){this.g=this.a=null,this.h=e||null,this.j=!!t}function eM(e){e.a||(e.a=new ec,e.g=0,e.h&&function(e,t){if(e){e=e.split("&");for(var i=0;i2*e.h&&el(e)))}function eL(e,t){return eM(e),t=ek(e,t),eu(e.a.g,t)}function eD(e){var t=new eP;return t.h=e.h,e.a&&(t.a=new ec(e.a),t.g=e.g),t}function ek(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function eN(e){this.a=eE(e)}function eF(e){return e.a.a.get(eU.Pa)||null}function eB(e,t){t?e.a.a.set(eU.PROVIDER_ID,t):eR(e.a.a,eU.PROVIDER_ID)}(e=eP.prototype).add=function(e,t){eM(this),this.h=null,e=ek(this,e);var i=this.a.get(e);return i||this.a.set(e,i=[]),i.push(t),this.g+=1,this},e.clear=function(){this.a=this.h=null,this.g=0},e.forEach=function(e,t){eM(this),this.a.forEach(function(i,n){F(i,function(i){e.call(t,i,n,this)},this)},this)},e.ja=function(){eM(this);for(var e=this.a.la(),t=this.a.ja(),i=[],n=0;nparseFloat(e1)){n7=String(e3);break t}}n7=e1}var e5={};function e4(e){var t;return t=function(){for(var t=0,i=z(String(n7)).split("."),n=z(String(e)).split("."),r=Math.max(i.length,n.length),s=0;0==t&&s",0);var tm=tg("",0);tg("
",0);var tv=(n2=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!!e.firstChild&&(t=e.firstChild.firstChild,e.innerHTML=tf(tm),!t.parentElement)},n5=!1,function(){return n5||(n3=n2(),n5=!0),n3});function ty(e,t){t=t instanceof tn?t:to(t),e.assign(tr(t))}function tb(e,t){this.a=d(e)?e:0,this.g=d(t)?t:0}function tx(e,t){this.width=e,this.height=t}function tE(e){return e?new tM(tI(e)):n9||(n9=new tM)}function tw(e,t){var i=t||document;return i.querySelectorAll&&i.querySelector?i.querySelectorAll("."+e):tS(document,e,t)}function tT(e,t){var i=t||document;if(i.getElementsByClassName)e=i.getElementsByClassName(e)[0];else{i=document;var n=t||i;e=n.querySelectorAll&&n.querySelector&&e?n.querySelector(e?"."+e:""):tS(i,e,t)[0]||null}return e||null}function tS(e,t,i){var n;if((e=i||e).querySelectorAll&&e.querySelector&&t)return e.querySelectorAll(t?"."+t:"");if(t&&e.getElementsByClassName){var r=e.getElementsByClassName(t);return r}if(r=e.getElementsByTagName("*"),t){var s={};for(i=n=0;e=r[i];i++){var a=e.className;"function"==typeof a.split&&G(a.split(/\s+/),t)&&(s[n++]=e)}return s.length=n,s}return r}tb.prototype.toString=function(){return"("+this.a+", "+this.g+")"},tb.prototype.ceil=function(){return this.a=Math.ceil(this.a),this.g=Math.ceil(this.g),this},tb.prototype.floor=function(){return this.a=Math.floor(this.a),this.g=Math.floor(this.g),this},tb.prototype.round=function(){return this.a=Math.round(this.a),this.g=Math.round(this.g),this},(e=tx.prototype).toString=function(){return"("+this.width+" x "+this.height+")"},e.aspectRatio=function(){return this.width/this.height},e.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},e.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},e.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this};var tA={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function tC(e){return e.scrollingElement?e.scrollingElement:(eJ||"CSS1Compat"!=e.compatMode)&&e.body||e.documentElement}function t_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tI(e){return 9==e.nodeType?e:e.ownerDocument||e.document}function tO(e,t){if("textContent"in e)e.textContent=t;else if(3==e.nodeType)e.data=String(t);else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=String(t)}else{for(var i;i=e.firstChild;)e.removeChild(i);e.appendChild(tI(e).createTextNode(String(t)))}}function tP(e,t){return t?function(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}(e,function(e){return!t||f(e.className)&&G(e.className.split(/\s+/),t)}):null}function tM(e){this.a=e||u.document||document}tM.prototype.N=function(){return f(void 0)?this.a.getElementById(void 0):void 0};var tR={Fc:!0},tL={Hc:!0},tD={},tk={Gc:!0};function tN(){throw Error("Do not instantiate directly")}function tF(e,t,i,n){if(e=e(t||tU,void 0,i),n=(n||tE()).a.createElement("DIV"),(e=function(e){if(!w(e))return et(String(e));if(e instanceof tN){if(e.fa===tR)return e.content;if(e.fa===tk)return et(e.content)}return k("Soy template output is unsafe for use as HTML: "+e),"zSoyz"}(e)).match(tB),e=tg(e,null),tv())for(;n.lastChild;)n.removeChild(n.lastChild);return n.innerHTML=tf(e),1==n.childNodes.length&&1==(e=n.firstChild).nodeType&&(n=e),n}tN.prototype.va=null,tN.prototype.toString=function(){return this.content};var tB=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,tU={};function tV(){tN.call(this)}function tG(e){return null!=e&&e.fa===tR?e:e instanceof td?tH(tf(e).toString(),e.g()):tH(et(String(String(e))),function(e){if(null!=e)switch(e.va){case 1:return 1;case -1:return -1;case 0:return 0}return null}(e))}function tj(){tN.call(this)}function tW(e,t){this.content=String(e),this.va=null!=t?t:null}function tY(e){return new tW(e,void 0)}R(tV,tN),tV.prototype.fa=tR,R(tj,tN),tj.prototype.fa=tL,tj.prototype.va=1,R(tW,tN),tW.prototype.fa=tk;var tH=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return e=new t(String(e)),void 0!==i&&(e.va=i),e}}(tV),tz=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e){return new t(String(e))}}(tj);function tX(e){return(e=String(e))?new tW(e,void 0):""}var tK=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,i){return(e=String(e))?(e=new t(e),void 0!==i&&(e.va=i),e):""}}(tV);function tq(e){return null!=e&&e.fa===tR?String(String(e.content).replace(t9,"").replace(t6,"<")).replace(t2,tZ):et(String(e))}function tJ(e){return null!=e&&e.fa===tL?e=String(e).replace(t3,t1):e instanceof tn?e=String(tr(e).toString()).replace(t3,t1):t4.test(e=String(e))?e=e.replace(t3,t1):(k("Bad value `%s` for |filterNormalizeUri",[e]),e="#zSoyz"),e}function t$(e){return null!=e&&e.fa===tD?e=e.content:null==e?e="":e instanceof tl?e instanceof tl&&e.constructor===tl&&e.g===tu?e=e.a:(k("expected object of type SafeStyle, got '"+e+"' of type "+y(e)),e="type_error:SafeStyle"):t5.test(e=String(e))||(k("Bad value `%s` for |filterCssValue",[e]),e="zSoyz"),e}var tQ={"\0":"�"," ":" ","\n":" ","\v":" ","\f":" ","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","…":"…"," ":" ","\u2028":"
","\u2029":"
"};function tZ(e){return tQ[e]}var t0={"\0":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08"," ":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","":"%7F","…":"%C2%85"," ":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","!":"%EF%BC%81","#":"%EF%BC%83","$":"%EF%BC%84","&":"%EF%BC%86","'":"%EF%BC%87","(":"%EF%BC%88",")":"%EF%BC%89","*":"%EF%BC%8A","+":"%EF%BC%8B",",":"%EF%BC%8C","/":"%EF%BC%8F",":":"%EF%BC%9A",";":"%EF%BC%9B","=":"%EF%BC%9D","?":"%EF%BC%9F","@":"%EF%BC%A0","[":"%EF%BC%BB","]":"%EF%BC%BD"};function t1(e){return t0[e]}var t2=/[\x00\x22\x27\x3c\x3e]/g,t3=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,t5=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,t4=/^(?![^#?]*\/(?:\.|%2E){2}(?:[\/?#]|$))(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,t9=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,t6=/=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var ib="closure_listenable_"+(1e6*Math.random()|0),ix=0;function iE(e,t,i,n,r){this.listener=e,this.proxy=null,this.src=t,this.type=i,this.capture=!!n,this.La=r,this.key=++ix,this.sa=this.Ia=!1}function iw(e){e.sa=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function iT(e){this.src=e,this.a={},this.g=0}function iS(e,t){var i=t.type;i in e.a&&j(e.a[i],t)&&(iw(t),0==e.a[i].length&&(delete e.a[i],e.g--))}function iA(e,t,i,n){for(var r=0;rn.keyCode||void 0!=n.returnValue)){t:{var r=!1;if(0==n.keyCode)try{n.keyCode=-1;break t}catch(e){r=!0}(r||void 0==n.returnValue)&&(n.returnValue=!0)}for(n=[],r=t.g;r;r=r.parentNode)n.push(r);for(e=e.type,r=n.length-1;!t.h&&0<=r;r--){t.g=n[r];var s=ik(n[r],e,!0,t);i=i&&s}for(r=0;!t.h&&r>>0);function iV(e){return E(e)?e:(e[iU]||(e[iU]=function(t){return e.handleEvent(t)}),e[iU])}function iG(){ia.call(this),this.J=new iT(this),this.wb=this,this.Ha=null}function ij(e,t){var i,n=e.Ha;if(n)for(i=[];n;n=n.Ha)i.push(n);if(e=e.wb,n=t.type||t,f(t))t=new im(t,e);else if(t instanceof im)t.target=t.target||e;else{var r=t;es(t=new im(n,e),r)}if(r=!0,i)for(var s=i.length-1;!t.h&&0<=s;s--){var a=t.g=i[s];r=iW(a,n,!0,t)&&r}if(t.h||(r=iW(a=t.g=e,n,!0,t)&&r,t.h||(r=iW(a,n,!1,t)&&r)),i)for(s=0;!t.h&&se.g&&(e.g++,t.next=e.a,e.a=t)}function iQ(){this.g=this.a=null}a(iK,iG),iK.prototype.N=function(){return this.a},iK.prototype.register=function(){var e=iX(this.N());iY[e]?G(iY[e],this)||iY[e].push(this):iY[e]=[this]},iJ.prototype.get=function(){if(0',null),i.document.write(tf(t)),i.document.close())):(i=i.open(tr(n).toString(),e,s))&&t.noopener&&(i.opener=null),i}function ng(){try{return!(!window.opener||!window.opener.location||window.opener.location.hostname!==window.location.hostname||window.opener.location.protocol!==window.location.protocol)}catch(e){}return!1}function nm(e){np(e,{target:window.cordova&&window.cordova.InAppBrowser?"_system":"_blank"},void 0)}function nv(e,t){if(null==(e=w(e)&&1==e.nodeType?e:document.querySelector(String(e))))throw Error(t||"Cannot find element.");return e}function ny(){return window.location.href}function nb(e){this.s=[],this.T=nO,this.O=e||null,this.j=this.a=!1,this.h=void 0,this.J=this.l=this.A=!1,this.i=0,this.g=null,this.C=0}function nx(e,t,i){e.a=!0,e.h=i,e.j=!t,nS(e)}function nE(e){if(e.a){if(!e.J)throw new nA(e);e.J=!1}}function nw(e,t,i){e.s.push([t,i,void 0]),e.a&&nS(e)}function nT(e){return V(e.s,function(e){return E(e[1])})}function nS(e){if(e.i&&e.a&&nT(e)){var t=e.i,i=nI[t];i&&(u.clearTimeout(i.a),delete nI[t]),e.i=0}e.g&&(e.g.C--,delete e.g),t=e.h;for(var n=i=!1;e.s.length&&!e.A;){var r=e.s.shift(),s=r[0],a=r[1];if(r=r[2],s=e.j?a:s)try{var o=s.call(r||e.O,t);d(o)&&(e.j=e.j&&(o==t||o instanceof Error),e.h=t=o),(iq(t)||"function"==typeof u.Promise&&t instanceof u.Promise)&&(n=!0,e.A=!0)}catch(n){t=n,e.j=!0,nT(e)||(i=!0)}}e.h=t,n&&(o=_(e.L,e,!0),n=_(e.L,e,!1),t instanceof nb?(nw(t,o,n),t.l=!0):t.then(o,n)),i&&(nI[(t=new n_(t)).a]=t,e.i=t.a)}function nA(){L.call(this)}function nC(){L.call(this)}function n_(e){this.a=u.setTimeout(_(this.h,this),0),this.g=e}R(nf,L),nf.prototype.name="cancel",nb.prototype.cancel=function(e){if(this.a)this.h instanceof nb&&this.h.cancel();else{if(this.g){var t=this.g;delete this.g,e?t.cancel(e):(t.C--,0>=t.C&&t.cancel())}this.T?this.T.call(this.O,this):this.J=!0,this.a||(e=new nC(this),nE(this),nx(this,!1,e))}},nb.prototype.L=function(e,t){this.A=!1,nx(this,e,t)},nb.prototype.callback=function(e){nE(this),nx(this,!0,e)},nb.prototype.then=function(e,t,i){var n,r,s=new i9(function(e,t){n=e,r=t});return nw(this,n,function(e){e instanceof nC?s.cancel():r(e)}),s.then(e,t,i)},nb.prototype.$goog_Thenable=!0,R(nA,L),nA.prototype.message="Deferred has already fired",nA.prototype.name="AlreadyCalledError",R(nC,L),nC.prototype.message="Deferred was canceled",nC.prototype.name="CanceledError",n_.prototype.h=function(){throw delete nI[this.a],this.g};var nI={};function nO(){if(this&&this.rb){var e=this.rb;e&&"SCRIPT"==e.tagName&&nP(e,!0,this.sb)}}function nP(e,t,i){null!=i&&u.clearTimeout(i),e.onload=m,e.onerror=m,e.onreadystatechange=m,t&&window.setTimeout(function(){t_(e)},0)}function nM(e,t){var i="Jsloader error (code #"+e+")";t&&(i+=": "+t),L.call(this,i),this.code=e}function nR(){return u.google&&u.google.accounts&&u.google.accounts.id||null}function nL(e){this.a=e||nR(),this.h=!1,this.g=null}R(nM,L),nL.prototype.cancel=function(){this.a&&this.h&&(this.g&&this.g(null),this.a.cancel())},v(nL);var nD=new e6(e8,"https://accounts.google.com/gsi/client");function nk(){this.a=null}function nN(e,t){this.a=e,this.g=t||function(e){throw e}}function nF(e,t,i){this.reset(e,t,i,void 0,void 0)}nk.prototype.load=function(){var e,t,i,n=this;if(this.a)return this.a;var r=((e=nD)instanceof e6&&e.constructor===e6&&e.g===e7?e=e.a:(k("expected object of type Const, got '"+e+"'"),e="type_error:Const"),(t=new te).a=e,t);return nR()?nn():this.a=(i=null,new i9(function(e){"complete"==u.document.readyState?e():iM(window,"load",i=function(){e()})}).Ca(function(e){throw iR(window,"load",i),e})).then(function(){if(!nR())return new i9(function(e,t){var i,s,a,o,h,c,l,d,f,m=setTimeout(function(){n.a=null,t(Error("Network error!"))},1e4);u.onGoogleLibraryLoad=function(){clearTimeout(m),e()},nn((a=(s={}).document||document,o=tt(r).toString(),l=new nb(c={rb:h=document.createElement("SCRIPT"),sb:void 0}),d=null,0<(f=null!=s.timeout?s.timeout:5e3)&&(d=window.setTimeout(function(){nP(h,!0);var e=new nM(1,"Timeout reached for loading script "+o);nE(l),nx(l,!1,e)},f),c.sb=d),h.onload=h.onreadystatechange=function(){h.readyState&&"loaded"!=h.readyState&&"complete"!=h.readyState||(nP(h,s.xc||!1,d),l.callback(null))},h.onerror=function(){nP(h,!0,d);var e=new nM(0,"Error while loading script "+o);nE(l),nx(l,!1,e)},es(c=s.attributes||{},{type:"text/javascript",charset:"UTF-8"}),ei(c,function(e,t){e&&"object"==typeof e&&e.ma&&(e=e.ka()),"style"==t?h.style.cssText=e:"class"==t?h.className=e:"for"==t?h.htmlFor=e:tA.hasOwnProperty(t)?h.setAttribute(tA[t],e):0==t.lastIndexOf("aria-",0)||0==t.lastIndexOf("data-",0)?h.setAttribute(t,e):h[t]=e}),function(e,t){if(e.src=tt(t),null===g)i:{if((t=(t=u.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&p.test(t)){g=t;break i}g=""}(t=g)&&e.setAttribute("nonce",t)}(h,r),((i=(a||document).getElementsByTagName("HEAD"))&&0!=i.length?i[0]:a.documentElement).appendChild(h),l)).then(function(){nR()&&e()}).Ca(function(e){clearTimeout(m),n.a=null,t(e)})})})},v(nk),nN.prototype.confirm=function(e){return nn(this.a.confirm(e)).Ca(this.g)},nF.prototype.a=null;var nB=0;function nU(e){this.s=e,this.a=this.h=this.j=this.g=null}function nV(e,t){this.name=e,this.value=t}nF.prototype.reset=function(e,t,i,n,r){"number"==typeof r||nB++,this.h=n||P(),this.j=e,this.s=t,this.g=i,delete this.a},nV.prototype.toString=function(){return this.name};var nG=new nV("SEVERE",1e3),nj=new nV("WARNING",900),nW=new nV("CONFIG",700);nU.prototype.log=function(e,t,i){if(e.value>=function e(t){return t.j?t.j:t.g?e(t.g):(k("Root logger has no level set."),null)}(this).value)for(E(t)&&(t=t()),e=new nF(e,String(t),this.s),i&&(e.a=i),i=this;i;){var n=i,r=e;if(n.a)for(var s=0;t=n.a[s];s++)t(r);i=i.g}};var nY={},nH=null;function nz(){nH||(nH=new nU(""),nY[""]=nH,nH.j=nW)}function nX(){this.a=P()}var nK=null;function nq(e){this.j=e||"",nK||(nK=new nX),this.s=nK}function nJ(e){return 10>e?"0"+e:String(e)}function n$(e){nq.call(this,e)}function nQ(){this.s=_(this.h,this),this.a=new n$,this.a.g=!1,this.a.h=!1,this.g=this.a.a=!1,this.j={}}nX.prototype.set=function(e){this.a=e},nX.prototype.reset=function(){this.set(P())},nX.prototype.get=function(){return this.a},nq.prototype.a=!0,nq.prototype.g=!0,nq.prototype.h=!1,R(n$,nq),nQ.prototype.h=function(e){if(!this.j[e.g]){var t,i,n=function(e,t){var i=[];if(i.push(e.j," "),e.g){var n=new Date(t.h);i.push("[",nJ(n.getFullYear()-2e3)+nJ(n.getMonth()+1)+nJ(n.getDate())+" "+nJ(n.getHours())+":"+nJ(n.getMinutes())+":"+nJ(n.getSeconds())+"."+nJ(Math.floor(n.getMilliseconds()/10)),"] ")}return i.push("[",function(e,t){t=(e=(e.h-t)/1e3).toFixed(3);var i=0;if(1>e)i=2;else for(;100>e;)i++,e*=10;for(;0=nG.value)return"error";if(e.value>=nj.value)return"warn";if(e.value>=nW.value)return"log"}return"debug"}(e.j),i=e.a,nZ[t]?nZ[t](n,i||""):nZ.log(n,i||""))}};var nZ=u.console;function n0(e,t){var i=ri;i&&i.log(nG,e,t)}ri=function e(t){if(nz(),!(i=nY[t])){i=new nU(t);var i,n=t.lastIndexOf("."),r=t.substr(n+1);(n=e(t.substr(0,n))).h||(n.h={}),n.h[r]=i,i.g=n,nY[t]=i}return i}("firebaseui");var n1=new nQ;if(1!=n1.g){nz(),rn=nH;var n2,n3,n5,n4,n9,n6,n7,n8,re,rt,ri,rn,rr=n1.s;rn.a||(rn.a=[]),rn.a.push(rr),n1.g=!0}function rs(e){var t=ri;t&&t.log(nj,e,void 0)}function ra(){this.a=("undefined"==typeof document?null:document)||{cookie:""}}function ro(e){e=(e.a.cookie||"").split(";");for(var t,i,n=[],r=[],s=0;si?"":0==i?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(P()+1e3*i).toUTCString(),this.a.cookie=e+"="+t+r+n+i+s},e.get=function(e,t){for(var i,n=e+"=",r=(this.a.cookie||"").split(";"),s=0;s>=8),t[i++]=r}return t}function rm(e){for(this.i=e,this.g=this.i.length/4,this.j=this.g+6,this.h=[[],[],[],[]],this.s=[[],[],[],[]],this.a=Array(rv*(this.j+1)),e=0;er;r++)i=t[i=4*r+n],e.h[n][r]=i}function rb(e){for(var t=[],i=0;in;n++)t[4*n+i]=e.h[i][n];return t}function rx(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]^=e.a[4*t+n][i]}function rE(e,t){for(var i=0;4>i;i++)for(var n=0;4>n;n++)e.h[i][n]=t[e.h[i][n]]}function rw(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][i]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][(i+t)%rv]}function rT(e){for(var t=1;4>t;t++)for(var i=0;4>i;i++)e.s[t][(i+t)%rv]=e.h[t][i];for(t=1;4>t;t++)for(i=0;4>i;i++)e.h[t][i]=e.s[t][i]}function rS(e){e[0]=rA[e[0]],e[1]=rA[e[1]],e[2]=rA[e[2]],e[3]=rA[e[3]]}var rA=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rC=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],r_=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],rI=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,27,25,31,29,19,17,23,21,11,9,15,13,3,1,7,5,59,57,63,61,51,49,55,53,43,41,47,45,35,33,39,37,91,89,95,93,83,81,87,85,75,73,79,77,67,65,71,69,123,121,127,125,115,113,119,117,107,105,111,109,99,97,103,101,155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229],rO=[0,3,6,5,12,15,10,9,24,27,30,29,20,23,18,17,48,51,54,53,60,63,58,57,40,43,46,45,36,39,34,33,96,99,102,101,108,111,106,105,120,123,126,125,116,119,114,113,80,83,86,85,92,95,90,89,72,75,78,77,68,71,66,65,192,195,198,197,204,207,202,201,216,219,222,221,212,215,210,209,240,243,246,245,252,255,250,249,232,235,238,237,228,231,226,225,160,163,166,165,172,175,170,169,184,187,190,189,180,183,178,177,144,147,150,149,156,159,154,153,136,139,142,141,132,135,130,129,155,152,157,158,151,148,145,146,131,128,133,134,143,140,137,138,171,168,173,174,167,164,161,162,179,176,181,182,191,188,185,186,251,248,253,254,247,244,241,242,227,224,229,230,239,236,233,234,203,200,205,206,199,196,193,194,211,208,213,214,223,220,217,218,91,88,93,94,87,84,81,82,67,64,69,70,79,76,73,74,107,104,109,110,103,100,97,98,115,112,117,118,127,124,121,122,59,56,61,62,55,52,49,50,35,32,37,38,47,44,41,42,11,8,13,14,7,4,1,2,19,16,21,22,31,28,25,26],rP=[0,9,18,27,36,45,54,63,72,65,90,83,108,101,126,119,144,153,130,139,180,189,166,175,216,209,202,195,252,245,238,231,59,50,41,32,31,22,13,4,115,122,97,104,87,94,69,76,171,162,185,176,143,134,157,148,227,234,241,248,199,206,213,220,118,127,100,109,82,91,64,73,62,55,44,37,26,19,8,1,230,239,244,253,194,203,208,217,174,167,188,181,138,131,152,145,77,68,95,86,105,96,123,114,5,12,23,30,33,40,51,58,221,212,207,198,249,240,235,226,149,156,135,142,177,184,163,170,236,229,254,247,200,193,218,211,164,173,182,191,128,137,146,155,124,117,110,103,88,81,74,67,52,61,38,47,16,25,2,11,215,222,197,204,243,250,225,232,159,150,141,132,187,178,169,160,71,78,85,92,99,106,113,120,15,6,29,20,43,34,57,48,154,147,136,129,190,183,172,165,210,219,192,201,246,255,228,237,10,3,24,17,46,39,60,53,66,75,80,89,102,111,116,125,161,168,179,186,133,140,151,158,233,224,251,242,205,196,223,214,49,56,35,42,21,28,7,14,121,112,107,98,93,84,79,70],rM=[0,11,22,29,44,39,58,49,88,83,78,69,116,127,98,105,176,187,166,173,156,151,138,129,232,227,254,245,196,207,210,217,123,112,109,102,87,92,65,74,35,40,53,62,15,4,25,18,203,192,221,214,231,236,241,250,147,152,133,142,191,180,169,162,246,253,224,235,218,209,204,199,174,165,184,179,130,137,148,159,70,77,80,91,106,97,124,119,30,21,8,3,50,57,36,47,141,134,155,144,161,170,183,188,213,222,195,200,249,242,239,228,61,54,43,32,17,26,7,12,101,110,115,120,73,66,95,84,247,252,225,234,219,208,205,198,175,164,185,178,131,136,149,158,71,76,81,90,107,96,125,118,31,20,9,2,51,56,37,46,140,135,154,145,160,171,182,189,212,223,194,201,248,243,238,229,60,55,42,33,16,27,6,13,100,111,114,121,72,67,94,85,1,10,23,28,45,38,59,48,89,82,79,68,117,126,99,104,177,186,167,172,157,150,139,128,233,226,255,244,197,206,211,216,122,113,108,103,86,93,64,75,34,41,52,63,14,5,24,19,202,193,220,215,230,237,240,251,146,153,132,143,190,181,168,163],rR=[0,13,26,23,52,57,46,35,104,101,114,127,92,81,70,75,208,221,202,199,228,233,254,243,184,181,162,175,140,129,150,155,187,182,161,172,143,130,149,152,211,222,201,196,231,234,253,240,107,102,113,124,95,82,69,72,3,14,25,20,55,58,45,32,109,96,119,122,89,84,67,78,5,8,31,18,49,60,43,38,189,176,167,170,137,132,147,158,213,216,207,194,225,236,251,246,214,219,204,193,226,239,248,245,190,179,164,169,138,135,144,157,6,11,28,17,50,63,40,37,110,99,116,121,90,87,64,77,218,215,192,205,238,227,244,249,178,191,168,165,134,139,156,145,10,7,16,29,62,51,36,41,98,111,120,117,86,91,76,65,97,108,123,118,85,88,79,66,9,4,19,30,61,48,39,42,177,188,171,166,133,136,159,146,217,212,195,206,237,224,247,250,183,186,173,160,131,142,153,148,223,210,197,200,235,230,241,252,103,106,125,112,83,94,73,68,15,2,21,24,59,54,33,44,12,1,22,27,56,53,34,47,100,105,126,115,80,93,74,71,220,209,198,203,232,229,242,255,180,185,174,163,128,141,154,151],rL=[0,14,28,18,56,54,36,42,112,126,108,98,72,70,84,90,224,238,252,242,216,214,196,202,144,158,140,130,168,166,180,186,219,213,199,201,227,237,255,241,171,165,183,185,147,157,143,129,59,53,39,41,3,13,31,17,75,69,87,89,115,125,111,97,173,163,177,191,149,155,137,135,221,211,193,207,229,235,249,247,77,67,81,95,117,123,105,103,61,51,33,47,5,11,25,23,118,120,106,100,78,64,82,92,6,8,26,20,62,48,34,44,150,152,138,132,174,160,178,188,230,232,250,244,222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,52,58,40,38,124,114,96,110,68,74,88,86,55,57,43,37,15,1,19,29,71,73,91,85,127,113,99,109,215,217,203,197,239,225,243,253,167,169,187,181,159,145,131,141];function rD(e,t){e=new rm(rN(e)),t=rg(t);for(var i,n=t.splice(0,16),r="";n.length;){i=16-n.length;for(var s=0;so;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rI[a[0]]^rO[a[1]]^a[2]^a[3],s[1][o]=a[0]^rI[a[1]]^rO[a[2]]^a[3],s[2][o]=a[0]^a[1]^rI[a[2]]^rO[a[3]],s[3][o]=rO[a[0]]^a[1]^a[2]^rI[a[3]];rx(i,n)}rE(i,rA),rw(i),rx(i,i.j),r+=U(rb(i),function(e){return 1<(e=e.toString(16)).length?e:"0"+e}).join(""),n=t.splice(0,16)}return r}function rk(e,t){e=new rm(rN(e));for(var i=[],n=0;no;o++)a[0]=s[0][o],a[1]=s[1][o],a[2]=s[2][o],a[3]=s[3][o],s[0][o]=rL[a[0]]^rM[a[1]]^rR[a[2]]^rP[a[3]],s[1][o]=rP[a[0]]^rL[a[1]]^rM[a[2]]^rR[a[3]],s[2][o]=rR[a[0]]^rP[a[1]]^rL[a[2]]^rM[a[3]],s[3][o]=rM[a[0]]^rR[a[1]]^rP[a[2]]^rL[a[3]]}if(rT(n),rE(n,rC),rx(n,0),8192>=(n=rb(n)).length)n=String.fromCharCode.apply(null,n);else{for(s=0,r="";s=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,i)}(n,s,s+8192));n=r}t+=n,r=i.splice(0,16)}return t.replace(/(\x00)+$/,"")}function rN(e){e=rg(e.substring(0,32));for(var t=32-e.length,i=0;i=i.length)throw ea;var n=i.key(t++);if(e)return n;if(!f(n=i.getItem(n)))throw"Storage mechanism: Invalid value was encountered";return n},n},e.clear=function(){this.a.clear()},e.key=function(e){return this.a.key(e)},R(rz,rY),R(rX,rY),R(rK,rW),rK.prototype.set=function(e,t){this.g.set(this.a+e,t)},rK.prototype.get=function(e){return this.g.get(this.a+e)},rK.prototype.ra=function(e){this.g.ra(this.a+e)},rK.prototype.ha=function(e){var t=this.g.ha(!0),i=this,n=new eo;return n.next=function(){for(var n=t.next();n.substr(0,i.a.length)!=i.a;)n=t.next();return e?n.substr(i.a.length):i.g.get(n)},n},rH(new rz);var rq=new rX,rJ=new rj(rH(rq)?new rK(rq,"firebaseui"):null),r$={name:"pendingEmailCredential",storage:rJ},rQ={name:"redirectStatus",storage:rJ},rZ={name:"redirectUrl",storage:rJ},r0={name:"emailForSignIn",storage:new rj(new rl(3600,"/"))},r1={name:"pendingEncryptedCredential",storage:new rj(new rl(3600,"/"))};function r2(e,t){return e.storage.get(t?e.name+":"+t:e.name)}function r3(e,t){e.storage.a.ra(t?e.name+":"+t:e.name)}function r5(e,t,i){e.storage.set(i?e.name+":"+i:e.name,t)}function r4(e){return r2(rZ,e)||null}function r9(e){return rf(e=r2(r$,e)||null)}function r6(e){r3(r$,e)}function r7(e){return(e=r2(rQ,e)||null)&&void 0!==e.tenantId?new rp(e.tenantId):null}function r8(){this.W={}}function se(e,t,i){if(t.toLowerCase() in e.W)throw Error("Configuration "+t+" has already been defined.");e.W[t.toLowerCase()]=i}function st(e,t,i){if(!(t.toLowerCase() in e.W))throw Error("Configuration "+t+" is not defined.");e.W[t.toLowerCase()]=i}function si(e,t){if(!(e=e.get(t)))throw Error("Configuration "+t+" is required.");return e}function sn(){this.g=void 0,this.a={}}function sr(e,t,i,n){for(var r=0;r=e||96<=e&&106>=e||65<=e&&90>=e||(eJ||eX)&&0==e)return!0;switch(e){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:return!0;case 173:return eq;default:return!1}}function at(e){return eq?e=function(e){switch(e){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return e}}(e):eQ&&eJ&&93===e&&(e=91),e}function ai(e){iG.call(this),this.a=e,iO(e,"keydown",this.g,!1,this),iO(e,"click",this.h,!1,this)}function an(e,t){var i=new as(t);if(ij(e,i)){i=new ar(t);try{ij(e,i)}finally{t.stopPropagation()}}}function ar(e){iv.call(this,e.a),this.type="action"}function as(e){iv.call(this,e.a),this.type="beforeaction"}function aa(e){iG.call(this),this.a=e,e=ez?"focusout":"blur",this.g=iO(this.a,ez?"focusin":"focus",this,!ez),this.h=iO(this.a,e,this,!ez)}function ao(e,t){iG.call(this),this.g=e||1,this.a=t||u,this.h=_(this.gc,this),this.j=P()}function ah(e){e.Ka=!1,e.aa&&(e.a.clearTimeout(e.aa),e.aa=null)}function ac(e){ia.call(this),this.g=e,this.a={}}R(ai,iG),ai.prototype.g=function(e){(13==e.keyCode||eJ&&3==e.keyCode)&&an(this,e)},ai.prototype.h=function(e){an(this,e)},ai.prototype.o=function(){ai.K.o.call(this),iR(this.a,"keydown",this.g,!1,this),iR(this.a,"click",this.h,!1,this),delete this.a},R(ar,iv),R(as,iv),R(aa,iG),aa.prototype.handleEvent=function(e){var t=new iv(e.a);t.type="focusin"==e.type||"focus"==e.type?"focusin":"focusout",ij(this,t)},aa.prototype.o=function(){aa.K.o.call(this),iL(this.g),iL(this.h),delete this.a},R(ao,iG),(e=ao.prototype).Ka=!1,e.aa=null,e.gc=function(){if(this.Ka){var e=P()-this.j;0=e.keyCode)return!1;if(ae(e.keyCode))return!0;switch(e.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!eq;default:return 166>e.keyCode||183t.charCode&&ae(n)?t.charCode:0):eH&&!eJ?r=ae(n=this.X)?t.keyCode:0:("keypress"==e.type?(ax&&(i=this.Ua),t.keyCode==t.charCode?32>t.keyCode?(n=t.keyCode,r=0):(n=this.X,r=t.charCode):(n=t.keyCode||this.X,r=t.charCode||0)):(n=t.keyCode||this.X,r=t.charCode||0),eQ&&63==r&&224==n&&(n=191));var s=n=at(n);n?63232<=n&&n in av?s=av[n]:25==n&&e.shiftKey&&(s=9):t.keyIdentifier&&t.keyIdentifier in ay&&(s=ay[t.keyIdentifier]),eq&&ab&&"keypress"==e.type&&!s8(s,this.R,e.shiftKey,e.ctrlKey,i,e.metaKey)||(e=s==this.R,this.R=s,(t=new aw(s,r,e,t)).altKey=i,ij(this,t))},e.N=function(){return this.qa},e.o=function(){am.K.o.call(this),aE(this)},R(aw,iv),aT.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"},aT.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},aT.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},aT.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this};var a_={thin:2,medium:4,thick:6};function aI(e,t){if("none"==(e.currentStyle?e.currentStyle[t+"Style"]:null))return 0;var i=e.currentStyle?e.currentStyle[t+"Width"]:null;if(i in a_)e=a_[i];else if(/^\d+px?$/.test(i))e=parseInt(i,10);else{t=e.style.left;var n=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,e.style.left=i,i=e.style.pixelLeft,e.style.left=t,e.runtimeStyle.left=n,e=+i}return e}function aO(){}function aP(e){iG.call(this),this.s=e||tE(),this.cb=null,this.na=!1,this.g=null,this.L=void 0,this.oa=this.Ea=this.Y=null}function aM(e,t){return e.g?tT(t,e.g||e.s.a):null}function aR(e){return e.L||(e.L=new ac(e)),e.L}function aL(e,t){e.Ea&&F(e.Ea,t,void 0)}function aD(e,t){var i=tP(e,"firebaseui-textfield");t?(s9(e,"firebaseui-input-invalid"),s4(e,"firebaseui-input"),i&&s9(i,"firebaseui-textfield-invalid")):(s9(e,"firebaseui-input"),s4(e,"firebaseui-input-invalid"),i&&s4(i,"firebaseui-textfield-invalid"))}function ak(e,t,i){ic(e,I(il,t=new af(t))),au(aR(e),t,"input",i)}function aN(e,t,i){ic(e,I(il,t=new am(t))),au(aR(e),t,"key",function(e){13==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i(e))})}function aF(e,t,i){ic(e,I(il,t=new ai(t))),au(aR(e),t,"action",function(e){e.stopPropagation(),e.preventDefault(),i(e)})}function aB(e){s4(e,"firebaseui-hidden")}function aU(e,t){t&&tO(e,t),s9(e,"firebaseui-hidden")}function aV(e){return!s5(e,"firebaseui-hidden")&&"none"!=e.style.display}function aG(e){var t=(e=e||{}).email,i=e.disabled,n='

')}function aj(e){e=(e=e||{}).label;var t='")}function aW(){return tH(""+aj({label:tX("Sign In")}))}function aY(){return tH(""+aj({label:tX("Save")}))}function aH(){return tH(""+aj({label:tX("Continue")}))}function az(e){e=(e=e||{}).label;var t='

')}function aX(){var e='

')}function aK(){return tH('Trouble signing in?')}function aq(e){e=(e=e||{}).label;var t='")}function aJ(e){var t="";return e.F&&e.D&&(t+=''),tH(t)}function a$(e){var t="";return e.F&&e.D&&(t+='

By continuing, you are indicating that you accept our Terms of Service and Privacy Policy.

'),tH(t)}function aQ(e){return tH(e='

'+tG(e.message)+'  Dismiss

')}function aZ(e){var t=e.content;return tH(''+tG(t)+"")}function a0(e){var t=e.message;return tH(aZ({content:tK('
'+tG(t)+"
")}))}function a1(e){var t='
';e=e.items;for(var i=e.length,n=0;n'+(r.Ma?'
':"")+'
'+tG(r.label)+"
"}return tH(t=""+aZ({Ab:tX("firebaseui-list-box-dialog"),content:tK(t+"
")}))}function a2(e){return tH((e=e||{}).tb?'
':'
')}function a3(e,t){return tY((e=(e=e||{}).ga).S?e.S:t.hb[e.providerId]?""+t.hb[e.providerId]:e.providerId&&0==e.providerId.indexOf("saml.")?e.providerId.substring(5):e.providerId&&0==e.providerId.indexOf("oidc.")?e.providerId.substring(5):""+e.providerId)}function a5(e){a6(e,"upgradeElement")}function a4(e){a6(e,"downgradeElements")}v(aO),aO.prototype.a=0,R(aP,iG),(e=aP.prototype).Lb=aO.Xa(),e.N=function(){return this.g},e.Za=function(e){if(this.Y&&this.Y!=e)throw Error("Method not supported");aP.K.Za.call(this,e)},e.kb=function(){this.g=this.s.a.createElement("DIV")},e.render=function(e){if(this.na)throw Error("Component already rendered");this.g||this.kb(),e?e.insertBefore(this.g,null):this.s.a.body.appendChild(this.g),this.Y&&!this.Y.na||this.v()},e.v=function(){this.na=!0,aL(this,function(e){!e.na&&e.N()&&e.v()})},e.ya=function(){aL(this,function(e){e.na&&e.ya()}),this.L&&ad(this.L),this.na=!1},e.o=function(){this.na&&this.ya(),this.L&&(this.L.m(),delete this.L),aL(this,function(e){e.m()}),this.g&&t_(this.g),this.Y=this.g=this.oa=this.Ea=null,aP.K.o.call(this)},e.removeChild=function(e,t){if(e){var i=f(e)?e:e.cb||(e.cb=":"+(e.Lb.a++).toString(36));if(e=this.oa&&i&&(null!==(e=this.oa)&&i in e?e[i]:void 0)||null,i&&e){var n=this.oa;if(i in n&&delete n[i],j(this.Ea,e),t&&(e.ya(),e.g&&t_(e.g)),null==(t=e))throw Error("Unable to set parent component");t.Y=null,aP.K.Za.call(t,null)}}if(!e)throw Error("Child is not in parent component");return e},aQ.a="firebaseui.auth.soy2.element.infoBar",a0.a="firebaseui.auth.soy2.element.progressDialog",a1.a="firebaseui.auth.soy2.element.listBoxDialog",a2.a="firebaseui.auth.soy2.element.busyIndicator";var a9=["mdl-js-textfield","mdl-js-progress","mdl-js-spinner","mdl-js-button"];function a6(e,t){e&&window.componentHandler&&window.componentHandler[t]&&a9.forEach(function(i){s5(e,i)&&window.componentHandler[t](e),F(tw(i,e),function(e){window.componentHandler[t](e)})})}function a7(e,t,i){if(a8.call(this),document.body.appendChild(e),e.showModal||window.dialogPolyfill.registerDialog(e),e.showModal(),a5(e),t&&aF(this,e,function(t){var i=e.getBoundingClientRect();(t.clientX
'+(t?aq(null):"")+aj(null)+'
")}function ou(e,t,i){return t=(e=e||{}).ia,tH(e='")}function od(e,t,i){var n=(e=e||{}).Tb;t=e.Ta;var r=e.ia;return i='",tH(i)}function of(e,t,i){return t=(e=e||{}).Ta,tH(e='

Recover password

Get instructions sent to this email that explain how to reset your password

'+aG(e)+'
'+(t?aq(null):"")+aj({label:tX("Send")})+'
")}function op(e,t,i){t=e.G;var n="";return n+='

Check your email

'+(e="Follow the instructions sent to "+tG(e.email)+" to recover your password")+'

',t&&(n+='
'+aj({label:tX("Done")})+"
"),tH(n+='
")}function og(e,t,i){return tH('
'+a2(null,null,i)+"
")}function om(e,t,i){return tH('
'+a2({tb:!0},null,i)+"
")}function ov(){return tH('
')}function oy(e,t,i){return t='",tH(t)}function ob(e,t,i){return e='

Trouble getting email?

Try these common fixes:

  • Check if the email was marked as spam or filtered.
  • Check your internet connection.
  • Check that you did not misspell your email.
  • Check that your inbox space is not running out or other inbox settings related issues.

If the steps above didn\'t work, you can resend the email. Note that this will deactivate the link in the older email.

'+aq({label:tX("Back")})+'
",tH(e)}function ox(e,t,i){return tH(e='")}function oE(){return tH('

New device or browser detected

Try opening the link using the same device or browser where you started the sign-in process.

'+aq({label:tX("Dismiss")})+"
")}function ow(){return tH('

Session ended

The session associated with this sign-in request has either expired or was cleared.

'+aq({label:tX("Dismiss")})+"
")}function oT(e,t,i){return tH('

Sign in

You already have an account

'+(e="You’ve already used "+tG(e.email)+" to sign in. Enter your password for that account.")+"

"+aX()+'
'+aW()+'
")}function oS(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='")}function oA(e,t,i){t="";var n=""+a3(e,i);return tH(t+='")}function oC(e,t,i){var n=e.email;return t="",e=tX(e=""+a3(e,i)),tH(t+='

Sign in

You already have an account

'+(n="You’ve already used "+tG(n)+". Sign in with "+tG(e)+" to continue.")+'

'+aj({label:tX("Sign in with "+e)})+'
")}function o_(e,t,i){var n=(e=e||{}).kc;t=e.yb,e=e.Eb;var r='

Not Authorized

';return n?r+=n=""+tG(n)+" is not authorized to view the requested page.":r+="User is not authorized to view the requested page.",r+="

",t&&(r+='

'+(t="Please contact "+tG(t)+" for authorization.")+"

"),r+='
'+aq({label:tX("Back")})+'
")}function oI(e,t,i){return tH('

Sign in

'+(e="To continue sign in with "+tG(e.email)+" on this device, you have to recover the password.")+'

'+aq(null)+aj({label:tX("Recover password")})+'
")}function oO(e){var t="";return tH(t+='

Reset your password

for '+tG(e.email)+"

"+az(function(e){function t(){}var i={label:tX("New password")};for(var n in t.prototype=e,e=new t,i)e[n]=i[n];return e}(e))+'
'+aY()+"
")}function oP(e){return tH(e='

Password changed

You can now sign in with your new password

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oM(e){return tH(e='

Try resetting your password again

Your request to reset your password has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oR(e){var t=e.G,i="";return tH(i+='

Updated email address

'+(e="Your sign-in email address has been changed back to "+tG(e.email)+".")+'

If you didn’t ask to change your sign-in email, it’s possible someone is trying to access your account and you should change your password right away.

'+(t?'
'+aH()+"
":"")+"
")}function oL(e){return tH(e='

Unable to update your email address

There was a problem changing your sign-in email back.

If you try again and still can’t reset your email, try asking your administrator for help.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oD(e){return tH(e='

Your email has been verified

You can now sign in with your new account

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function ok(e){return tH(e='

Try verifying your email again

Your request to verify your email has expired or the link has already been used

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oN(e){var t=e.G,i="";return tH(i+='

Your email has been verified and changed

'+(e="You can now sign in with your new email "+tG(e.email)+".")+'

'+(t?'
'+aH()+"
":"")+"
")}function oF(e){return tH(e='

Try updating your email again

Your request to verify and update your email has expired or the link has already been used.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oB(e){var t=e.factorId,i=e.phoneNumber;e=e.G;var n='

Removed second factor

';return"phone"===t?n+=t="The "+tG(t)+" "+tG(i)+" was removed as a second authentication step.":n+="The device or app was removed as a second authentication step.",tH(n+='

If you don\'t recognize this device, someone might be trying to access your account. Consider changing your password right away.

'+(e?'
'+aH()+"
":"")+"
")}function oU(e){return tH(e='

Couldn\'t remove your second factor

Something went wrong removing your second factor.

Try removing it again. If that doesn\'t work, contact support for assistance.

'+((e=e||{}).G?'
'+aH()+"
":"")+"
")}function oV(e){var t=e.zb;return e='

Error encountered

'+tG(e.errorMessage)+'

',t&&(e+=aj({label:tX("Retry")})),tH(e+"
")}function oG(e){return tH(e='

Error encountered

'+tG(e.errorMessage)+"

")}function oj(e,t,i){var n=e.Qb;return tH('

Sign in

'+(e="Continue with "+tG(e.jc)+"?")+'

'+(n="You originally wanted to sign in with "+tG(n))+'

'+aq(null)+aj({label:tX("Continue")})+'
")}function oW(e,t,i){var n='")}function oY(e,t,i){var n,r=(e=e||{}).Gb,s=e.Va;return t=e.ia,n=(e='")}function oH(e,t,i){t=(e=e||{}).phoneNumber;var n="";return e='Enter the 6-digit code we sent to ‎'+tG(t)+"",tG(t),t=n,i='"))}function oz(){return tH('

Sign Out

You are now successfully signed out.

')}function oX(e,t,i){var n='
    ';t=(e=e.ec).length;for(var r=0;r',s.V?a+=tG(s.V):a+=s="Sign in to "+tG(s.displayName),n+='
  • '+(a=tH(a+''+o+""))+"
  • "}return tH(n+='
")}function oK(e,t,i){return tH('

Sign in

'+aG(null)+'
'+aj(null)+'
")}function oq(){return aM(this,"firebaseui-id-submit")}function oJ(){return aM(this,"firebaseui-id-secondary-link")}function o$(e,t){aF(this,oq.call(this),function(t){e(t)});var i=oJ.call(this);i&&t&&aF(this,i,function(e){t(e)})}function oQ(){return aM(this,"firebaseui-id-password")}function oZ(){return aM(this,"firebaseui-id-password-error")}function o0(){var e=oQ.call(this),t=oZ.call(this);ak(this,e,function(){aV(t)&&(aD(e,!0),aB(t))})}function o1(){var e=oQ.call(this),t=oZ.call(this);return s6(e)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("Enter your password").toString()),t=!1),t?s6(e):null}function o2(e,t,i,n,r,s){oa.call(this,oT,{email:e},s,"passwordLinking",{F:n,D:r}),this.w=t,this.H=i}R(os,im),R(oa,aP),(e=oa.prototype).kb=function(){var e=tF(this.fb,this.eb,this.Z,this.s);a5(e),this.g=e},e.v=function(){if(oa.K.v.call(this),iz(oo(this),new os("pageEnter",oo(this),{pageId:this.Ga})),this.bb()&&this.Z.F){var e=this.Z.F;aF(this,this.bb(),function(){e()})}if(this.ab()&&this.Z.D){var t=this.Z.D;aF(this,this.ab(),function(){t()})}},e.ya=function(){iz(oo(this),new os("pageExit",oo(this),{pageId:this.Ga})),oa.K.ya.call(this)},e.o=function(){window.clearTimeout(this.ca),this.eb=this.fb=this.ca=null,this.Fa=!1,this.A=null,a4(this.N()),oa.K.o.call(this)},e.I=function(e,t,i,n){function r(){if(a.T)return null;a.Fa=!1,window.clearTimeout(a.ca),a.ca=null,a.A&&(a4(a.A),t_(a.A),a.A=null)}var s,a=this;return a.Fa?null:(a.Fa=!0,s=s5(a.N(),"firebaseui-use-spinner"),a.ca=window.setTimeout(function(){a.N()&&null===a.A&&(a.A=tF(a2,{tb:s},null,a.s),a.N().appendChild(a.A),a5(a.A))},500),e.apply(null,t).then(i,n).then(r,r))},O(oa.prototype,{a:function(e){ot.call(this);var t=tF(aQ,{message:e},null,this.s);this.N().appendChild(t),aF(this,on.call(this),function(){t_(t)})},yc:ot,Ac:oi,zc:on,$:function(e,t){e=tF(a0,{Ma:e,message:t},null,this.s),a7.call(this,e)},h:a8,Cb:oe,Cc:function(){return aM(this,"firebaseui-tos")},bb:function(){return aM(this,"firebaseui-tos-link")},ab:function(){return aM(this,"firebaseui-pp-link")},Dc:function(){return aM(this,"firebaseui-tos-list")}}),ol.a="firebaseui.auth.soy2.page.signIn",ou.a="firebaseui.auth.soy2.page.passwordSignIn",od.a="firebaseui.auth.soy2.page.passwordSignUp",of.a="firebaseui.auth.soy2.page.passwordRecovery",op.a="firebaseui.auth.soy2.page.passwordRecoveryEmailSent",og.a="firebaseui.auth.soy2.page.callback",om.a="firebaseui.auth.soy2.page.spinner",ov.a="firebaseui.auth.soy2.page.blank",oy.a="firebaseui.auth.soy2.page.emailLinkSignInSent",ob.a="firebaseui.auth.soy2.page.emailNotReceived",ox.a="firebaseui.auth.soy2.page.emailLinkSignInConfirmation",oE.a="firebaseui.auth.soy2.page.differentDeviceError",ow.a="firebaseui.auth.soy2.page.anonymousUserMismatch",oT.a="firebaseui.auth.soy2.page.passwordLinking",oS.a="firebaseui.auth.soy2.page.emailLinkSignInLinking",oA.a="firebaseui.auth.soy2.page.emailLinkSignInLinkingDifferentDevice",oC.a="firebaseui.auth.soy2.page.federatedLinking",o_.a="firebaseui.auth.soy2.page.unauthorizedUser",oI.a="firebaseui.auth.soy2.page.unsupportedProvider",oO.a="firebaseui.auth.soy2.page.passwordReset",oP.a="firebaseui.auth.soy2.page.passwordResetSuccess",oM.a="firebaseui.auth.soy2.page.passwordResetFailure",oR.a="firebaseui.auth.soy2.page.emailChangeRevokeSuccess",oL.a="firebaseui.auth.soy2.page.emailChangeRevokeFailure",oD.a="firebaseui.auth.soy2.page.emailVerificationSuccess",ok.a="firebaseui.auth.soy2.page.emailVerificationFailure",oN.a="firebaseui.auth.soy2.page.verifyAndChangeEmailSuccess",oF.a="firebaseui.auth.soy2.page.verifyAndChangeEmailFailure",oB.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionSuccess",oU.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionFailure",oV.a="firebaseui.auth.soy2.page.recoverableError",oG.a="firebaseui.auth.soy2.page.unrecoverableError",oj.a="firebaseui.auth.soy2.page.emailMismatch",oW.a="firebaseui.auth.soy2.page.providerSignIn",oY.a="firebaseui.auth.soy2.page.phoneSignInStart",oH.a="firebaseui.auth.soy2.page.phoneSignInFinish",oz.a="firebaseui.auth.soy2.page.signOut",oX.a="firebaseui.auth.soy2.page.selectTenant",oK.a="firebaseui.auth.soy2.page.providerMatchByEmail",a(o2,oa),o2.prototype.v=function(){this.P(),this.M(this.w,this.H),oc(this,this.i(),this.w),this.i().focus(),oa.prototype.v.call(this)},o2.prototype.o=function(){this.w=null,oa.prototype.o.call(this)},o2.prototype.j=function(){return s6(aM(this,"firebaseui-id-email"))},O(o2.prototype,{i:oQ,B:oZ,P:o0,u:o1,ea:oq,ba:oJ,M:o$});var o3=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function o5(){return aM(this,"firebaseui-id-email")}function o4(){return aM(this,"firebaseui-id-email-error")}function o9(e){var t=o5.call(this),i=o4.call(this);ak(this,t,function(){aV(i)&&(aD(t,!0),aB(i))}),e&&aN(this,t,function(){e()})}function o6(){return z(s6(o5.call(this))||"")}function o7(){var e=o5.call(this),t=o4.call(this),i=s6(e)||"";return i?o3.test(i)?(aD(e,!0),aB(t),t=!0):(aD(e,!1),aU(t,tY("That email address isn't correct").toString()),t=!1):(aD(e,!1),aU(t,tY("Enter your email address to continue").toString()),t=!1),t?z(s6(e)):null}function o8(e,t,i,n,r,s,a){oa.call(this,ou,{email:i,ia:!!s},a,"passwordSignIn",{F:n,D:r}),this.w=e,this.H=t}function he(e,t,i,n,r,s){oa.call(this,e,t,n,r||"notice",s),this.i=i||null}function ht(e,t,i,n,r){he.call(this,op,{email:e,G:!!t},t,r,"passwordRecoveryEmailSent",{F:i,D:n})}function hi(e,t){he.call(this,oD,{G:!!e},e,t,"emailVerificationSuccess")}function hn(e,t){he.call(this,ok,{G:!!e},e,t,"emailVerificationFailure")}function hr(e,t,i){he.call(this,oN,{email:e,G:!!t},t,i,"verifyAndChangeEmailSuccess")}function hs(e,t){he.call(this,oF,{G:!!e},e,t,"verifyAndChangeEmailFailure")}function ha(e,t){he.call(this,oU,{G:!!e},e,t,"revertSecondFactorAdditionFailure")}function ho(e){he.call(this,oz,void 0,void 0,e,"signOut")}function hh(e,t){he.call(this,oP,{G:!!e},e,t,"passwordResetSuccess")}function hc(e,t){he.call(this,oM,{G:!!e},e,t,"passwordResetFailure")}function hl(e,t){he.call(this,oL,{G:!!e},e,t,"emailChangeRevokeFailure")}function hu(e,t,i){he.call(this,oV,{errorMessage:e,zb:!!t},t,i,"recoverableError")}function hd(e,t){he.call(this,oG,{errorMessage:e},void 0,t,"unrecoverableError")}function hf(e){if("auth/invalid-credential"===e.code&&e.message&&-1!==e.message.indexOf("error=consent_required"))return{code:"auth/user-cancelled"};if(e.message&&-1!==e.message.indexOf("HTTP Cloud Function returned an error:")){var t=JSON.parse(e.message.substring(e.message.indexOf("{"),e.message.lastIndexOf("}")+1));return{code:e.code,message:t&&t.error&&t.error.message||e.message}}return e}function hp(e,t,i,n){function r(i){if(!i.name||"cancel"!=i.name){t:{var n=i.message;try{var r=((JSON.parse(n).error||{}).message||"").toLowerCase().match(/invalid.+(access|id)_token/);if(r&&r.length){var s=!0;break t}}catch(e){}s=!1}if(s)i=oo(t),t.m(),hE(e,i,void 0,tY("Your sign-in session has expired. Please try again.").toString());else{if(s=i&&i.message||"",i.code){if("auth/email-already-in-use"==i.code||"auth/credential-already-in-use"==i.code)return;s=hv(i)}t.a(s)}}}if(cN(e),n)return hg(e,i),nn();if(!i.credential)throw Error("No credential found!");if(!cC(e).currentUser&&!i.user)throw Error("User not logged in.");try{var s,a=(s=i,cU(e),cL(e,function(t){if(e.j&&!e.j.isAnonymous&&sx(cB(e))&&!cC(e).currentUser)return cG(e).then(function(){return"password"==s.credential.providerId&&(s.credential=null),s});if(t)return cG(e).then(function(){return t.linkWithCredential(s.credential)}).then(function(e){return s.user=e.user,s.credential=e.credential,s.operationType=e.operationType,s.additionalUserInfo=e.additionalUserInfo,s},function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return cj(e,t,s.credential)});if(!s.user)throw Error('Internal error: An incompatible or outdated version of "firebase.js" may be used.');return cG(e).then(function(){return c_(e).updateCurrentUser(s.user)}).then(function(){return s.user=c_(e).currentUser,s.operationType="signIn",s.credential&&s.credential.providerId&&"password"==s.credential.providerId&&(s.credential=null),s})}))}catch(e){return n0(e.code||e.message,e),t.a(e.code||e.message),nn()}return i=a.then(function(t){hg(e,t)},r).then(void 0,r),ck(e,a),nn(i)}function hg(e,t){if(!t.user)throw Error("No user found");var i=sV(cB(e));if(sU(cB(e))&&i&&rs("Both signInSuccess and signInSuccessWithAuthResult callbacks are provided. Only signInSuccessWithAuthResult callback will be invoked."),i){i=sV(cB(e));var n=r4(cI(e))||void 0;r3(rZ,cI(e));var r=!1;ng()?((!i||i(t,n))&&(r=!0,ty(window.opener.location,hm(e,n))),i||window.close()):(!i||i(t,n))&&(r=!0,ty(window.location,hm(e,n))),r||e.reset()}else{i=t.user,t=t.credential,n=sU(cB(e)),r=r4(cI(e))||void 0,r3(rZ,cI(e));var s=!1;ng()?((!n||n(i,t,r))&&(s=!0,ty(window.opener.location,hm(e,r))),n||window.close()):(!n||n(i,t,r))&&(s=!0,ty(window.location,hm(e,r))),s||e.reset()}}function hm(e,t){if(!(e=t||cB(e).a.get("signInSuccessUrl")))throw Error("No redirect URL has been found. You must either specify a signInSuccessUrl in the configuration, pass in a redirect URL to the widget URL, or return false from the callback.");return e}function hv(e){var t={code:e.code},i="";switch((t=t||{}).code){case"auth/email-already-in-use":i+="The email address is already used by another account";break;case"auth/requires-recent-login":case"auth/user-token-expired":i+=tY("Please login again to perform this operation");break;case"auth/too-many-requests":i+="You have entered an incorrect password too many times. Please try again in a few minutes.";break;case"auth/user-cancelled":i+="Please authorize the required permissions to sign in to the application";break;case"auth/user-not-found":i+="That email address doesn't match an existing account";break;case"auth/weak-password":i+="Strong passwords have at least 6 characters and a mix of letters and numbers";break;case"auth/wrong-password":i+="The email and password you entered don't match";break;case"auth/network-request-failed":i+="A network error has occurred";break;case"auth/invalid-phone-number":i+=t7();break;case"auth/invalid-verification-code":i+=tY("Wrong code. Try again.");break;case"auth/code-expired":i+="This code is no longer valid";break;case"auth/expired-action-code":i+="This code has expired.";break;case"auth/invalid-action-code":i+="The action code is invalid. This can happen if the code is malformed, expired, or has already been used."}if(t=tY(i).toString())return t;try{return JSON.parse(e.message),n0("Internal error: "+e.message,void 0),ie().toString()}catch(t){return e.message}}function hy(e,t,i,n){function r(){var i,n;i=new rp(e.h.tenantId||null),n=cI(e),r5(rQ,{tenantId:i.a},n),ck(e,t.I(_(e.dc,e),[c],function(){if("file:"===(window.location&&window.location.protocol))return ck(e,cT(e).then(function(i){t.m(),r3(rQ,cI(e)),s2("callback",e,h,nn(i))},a))},o))}function a(n){if(r3(rQ,cI(e)),!n.name||"cancel"!=n.name)switch((n=hf(n)).code){case"auth/popup-blocked":r();break;case"auth/popup-closed-by-user":case"auth/cancelled-popup-request":case"auth/credential-already-in-use":break;case"auth/network-request-failed":case"auth/too-many-requests":case"auth/user-cancelled":t.a(hv(n));break;case"auth/admin-restricted-operation":t.m(),sI(cB(e))?s2("handleUnauthorizedUser",e,h,null,i):s2("callback",e,h,nr(n));break;default:t.m(),s2("callback",e,h,nr(n))}}function o(i){r3(rQ,cI(e)),i.name&&"cancel"==i.name||(n0("signInWithRedirect: "+i.code,void 0),i=hv(i),"blank"==t.Ga&&sF(cB(e))?(t.m(),s2("providerSignIn",e,h,i)):t.a(i))}var h=oo(t),c=function(e,t,i){var n=sy[t]&&s.default.auth[sy[t]]?new s.default.auth[sy[t]]:0==t.indexOf("saml.")?new s.default.auth.SAMLAuthProvider(t):new s.default.auth.OAuthProvider(t);if(!n)throw Error("Invalid Firebase Auth provider!");var r=sO(cB(e),t);if(n.addScope)for(var a=0;a(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n?(r=n,i=""):i=t.substring(r+1,n),n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,n=t[0]+(t[1]?"?"+t[1]:"")+t[2]):n=t,cB(this).a.get("popupMode")?(e=(window.screen.availHeight-600)/2,t=(window.screen.availWidth-500)/2,n=n||"about:blank",(e={width:500,height:600,top:0{let t=setTimeout(()=>{e(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})})}/** * @license * Copyright 2020 Google LLC * diff --git a/dist/reldens-admin-client.js b/dist/reldens-admin-client.js index 45aa502..aab1c32 100644 --- a/dist/reldens-admin-client.js +++ b/dist/reldens-admin-client.js @@ -1 +1 @@ -!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],c=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!c[t]){if(!e[t]){var n="function"==typeof i[o]&&i[o];if(!r&&n)return n(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}f.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},f.cache={};var u=c[t]=new s.Module(t);e[t][0].call(u.exports,f,u,u.exports,this)}return c[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=c,s.parent=l,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[o]}}),i[o]=s;for(var d=0;d{let e=window.location,t=e.pathname;function r(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}if("true"===new URLSearchParams(e.search).get("login-error")){let e=document.querySelector("form.login-form .response-error");e&&(e.innerHTML="Login error, please try again.")}let o=document.querySelectorAll("form");if(o)for(let e of o)e.addEventListener("submit",t=>{let r=document.querySelector('input[type="submit"]');r.disabled=!0;let o=document.querySelector(".submit-container .loading");o&&o.classList.remove("hidden"),(e.classList.contains("form-delete")||e.classList.contains("confirmation-required"))&&!confirm("Are you sure?")&&(t.preventDefault(),r.disabled=!1,o.classList.add("hidden"))});let n=document.querySelectorAll(".with-sub-items h3");if(n)for(let e of n)e.addEventListener("click",e=>{e.currentTarget.parentNode.classList.toggle("active")});let i=document.querySelectorAll(".with-sub-items");if(i){let r=!1;for(let o of i){for(let n of o.querySelectorAll(".side-bar-item a")){let i=n.href.replace(e.host,"").replace(e.protocol+"//","");if(-1!==t.indexOf(i)){n.parentNode.classList.add("active"),o.classList.add("active"),r=!0;break}}if(r)break}}let l=document.querySelector(".filters-toggle"),c=document.querySelector(".filters-toggle-content");l&&c&&(l.addEventListener("click",()=>{c.classList.toggle("hidden")}),0""!==e.value).length&&c.classList.remove("hidden"));let a=document.querySelector(".list-select");a&&a.addEventListener("click",e=>{for(let t of document.querySelectorAll(".ids-checkbox"))t.checked=1===Number(e.currentTarget.dataset.checked);e.currentTarget.dataset.checked=1===Number(e.currentTarget.dataset.checked)?0:1});let s=document.querySelector(".list-delete-selection"),d=document.getElementById("delete-selection-form"),u=document.querySelector(".hidden-ids-input");s&&d&&u&&s.addEventListener("click",()=>{if(!confirm("Are you sure?"))return;let e=document.querySelectorAll(".ids-checkbox"),t=[];for(let r of e)r.checked&&t.push(r.value);u.value=t.join(","),d.submit()});let f=document.querySelector(".notification");if(f){let t=document.querySelector(".notification .close");t?.addEventListener("click",()=>{f.classList.remove("success","error")});let o=new URLSearchParams(e.search).get("result");o||(o=function(e){let t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("result"));let n=document.querySelector(".notification .message");if(o&&n){let e="success"===o?"success":"error";n.innerHTML="",f.classList.add(e),n.innerHTML="success"===o?"Success!":"There was an error: "+r(o),document.cookie="result=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}}let m=document.querySelector(".shutting-down .shutting-down-time");if(m){let e=m.getAttribute("data-shutting-down-time");if(e){m.innerHTML=r(e)+"s",e=Number(e);let t=setInterval(()=>{m.innerHTML=r(e)+"s",0===Number(--e)&&clearInterval(t)},1e3)}}for(let e of document.querySelectorAll(".maps-wizard-form .map-wizard-option.with-state"))e.addEventListener("click",e=>{for(let e of document.querySelectorAll(".wizard-option-container"))e.classList.remove("active");e.currentTarget.parentNode.parentNode.classList.add("active")});for(let e of document.querySelectorAll(".mapCanvas"))fetch(e.dataset.mapJson).then(e=>e.json()).then(t=>(function(e,t){let r=e.getContext("2d"),o=new Image;o.src=e.dataset.imageKey;let n=t.tilesets.shift(),i=n.tilewidth,l=n.tileheight,c=n.margin,a=n.spacing,s=n.imagewidth/(n.tilewidth+n.spacing);o.onload=()=>{for(let e of t.layers){if("tilelayer"!==e.type)continue;let t=e.width;for(let n=0;n{console.error("Error loading tileset image")}})(e,t)).catch(e=>console.error("Error fetching JSON:",e))})},{}]},["bIz9c"],"bIz9c","parcelRequire0bd7"); \ No newline at end of file +!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],c=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!c[t]){if(!e[t]){var n="function"==typeof i[o]&&i[o];if(!r&&n)return n(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}f.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},f.cache={};var u=c[t]=new s.Module(t);e[t][0].call(u.exports,f,u,u.exports,this)}return c[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=c,s.parent=l,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[o]}}),i[o]=s;for(var d=0;d{let e=window.location,t=e.pathname;function r(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}if("true"===new URLSearchParams(e.search).get("login-error")){let e=document.querySelector("form.login-form .response-error");e&&(e.innerHTML="Login error, please try again.")}let o=document.querySelectorAll("form");if(o)for(let e of o)e.addEventListener("submit",t=>{let r=document.querySelector('input[type="submit"]');r.disabled=!0;let o=document.querySelector(".submit-container .loading");o&&o.classList.remove("hidden"),(e.classList.contains("form-delete")||e.classList.contains("confirmation-required"))&&!confirm("Are you sure?")&&(t.preventDefault(),r.disabled=!1,o.classList.add("hidden"))});let n=document.querySelectorAll(".with-sub-items h3");if(n)for(let e of n)e.addEventListener("click",e=>{e.currentTarget.parentNode.classList.toggle("active")});let i=document.querySelectorAll(".with-sub-items");if(i){let r=!1;for(let o of i){for(let n of o.querySelectorAll(".side-bar-item a")){let i=n.href.replace(e.host,"").replace(e.protocol+"//","");if(t===i||0===t.indexOf(i+"/")){n.parentNode.classList.add("active"),o.classList.add("active"),r=!0;break}}if(r)break}}let l=document.querySelector(".filters-toggle"),c=document.querySelector(".filters-toggle-content");l&&c&&(l.addEventListener("click",()=>{c.classList.toggle("hidden")}),0""!==e.value).length&&c.classList.remove("hidden"));let a=document.querySelector(".list-select");a&&a.addEventListener("click",e=>{for(let t of document.querySelectorAll(".ids-checkbox"))t.checked=1===Number(e.currentTarget.dataset.checked);e.currentTarget.dataset.checked=1===Number(e.currentTarget.dataset.checked)?0:1});let s=document.querySelector(".list-delete-selection"),d=document.getElementById("delete-selection-form"),u=document.querySelector(".hidden-ids-input");s&&d&&u&&s.addEventListener("click",()=>{if(!confirm("Are you sure?"))return;let e=document.querySelectorAll(".ids-checkbox"),t=[];for(let r of e)r.checked&&t.push(r.value);u.value=t.join(","),d.submit()});let f=document.querySelector(".notification");if(f){let t=document.querySelector(".notification .close");t?.addEventListener("click",()=>{f.classList.remove("success","error")});let o=new URLSearchParams(e.search).get("result");o||(o=function(e){let t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("result"));let n=document.querySelector(".notification .message");if(o&&n){let e="success"===o?"success":"error";n.innerHTML="",f.classList.add(e),n.innerHTML="success"===o?"Success!":"There was an error: "+r(o),document.cookie="result=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}}let m=document.querySelector(".shutting-down .shutting-down-time");if(m){let e=m.getAttribute("data-shutting-down-time");if(e){m.innerHTML=r(e)+"s",e=Number(e);let t=setInterval(()=>{m.innerHTML=r(e)+"s",0===Number(--e)&&clearInterval(t)},1e3)}}for(let e of document.querySelectorAll(".maps-wizard-form .map-wizard-option.with-state"))e.addEventListener("click",e=>{for(let e of document.querySelectorAll(".wizard-option-container"))e.classList.remove("active");e.currentTarget.parentNode.parentNode.classList.add("active")});for(let e of document.querySelectorAll(".mapCanvas"))fetch(e.dataset.mapJson).then(e=>e.json()).then(t=>(function(e,t){let r=e.getContext("2d"),o=new Image;o.src=e.dataset.imageKey;let n=t.tilesets.shift(),i=n.tilewidth,l=n.tileheight,c=n.margin,a=n.spacing,s=n.imagewidth/(n.tilewidth+n.spacing);o.onload=()=>{for(let e of t.layers){if("tilelayer"!==e.type)continue;let t=e.width;for(let n=0;n{console.error("Error loading tileset image")}})(e,t)).catch(e=>console.error("Error fetching JSON:",e))})},{}]},["bIz9c"],"bIz9c","parcelRequire0bd7"); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bb70685..b2d271b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "reldens-skeleton", - "version": "4.0.0-beta.38.1", + "version": "4.0.0-beta.38.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "reldens-skeleton", - "version": "4.0.0-beta.38.1", + "version": "4.0.0-beta.38.2", "license": "MIT", "dependencies": { - "reldens": "^4.0.0-beta.38.1" + "reldens": "^4.0.0-beta.38.2" }, "devDependencies": { "@colyseus/loadtest": "^0.15.7", - "@reldens/utils": "^0.38.0" + "@reldens/utils": "^0.39.0" }, "engines": { "node": ">=18.0.0", @@ -3768,6 +3768,14 @@ "@reldens/utils": "^0.38.0" } }, + "node_modules/@reldens/items-system/node_modules/@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "dependencies": { + "await-event-emitter": "2.0.2" + } + }, "node_modules/@reldens/modifiers": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@reldens/modifiers/-/modifiers-0.25.0.tgz", @@ -3776,6 +3784,14 @@ "@reldens/utils": "^0.38.0" } }, + "node_modules/@reldens/modifiers/node_modules/@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "dependencies": { + "await-event-emitter": "2.0.2" + } + }, "node_modules/@reldens/skills": { "version": "0.33.0", "resolved": "https://registry.npmjs.org/@reldens/skills/-/skills-0.33.0.tgz", @@ -3786,6 +3802,14 @@ "@reldens/utils": "^0.38.0" } }, + "node_modules/@reldens/skills/node_modules/@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "dependencies": { + "await-event-emitter": "2.0.2" + } + }, "node_modules/@reldens/storage": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/@reldens/storage/-/storage-0.30.0.tgz", @@ -3799,6 +3823,14 @@ "objection": "^3.1.5" } }, + "node_modules/@reldens/storage/node_modules/@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "dependencies": { + "await-event-emitter": "2.0.2" + } + }, "node_modules/@reldens/tile-map-generator": { "version": "0.16.0", "resolved": "https://registry.npmjs.org/@reldens/tile-map-generator/-/tile-map-generator-0.16.0.tgz", @@ -3835,9 +3867,9 @@ } }, "node_modules/@reldens/utils": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", - "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.39.0.tgz", + "integrity": "sha512-U+japIXXmroiC/MxLxDswkavM8M/YRm1VB75tC8kR5PJZ4TA9QLdcgPzMRwcrFDeuNyvloGdftQg5wwXCIWX1Q==", "dependencies": { "await-event-emitter": "2.0.2" } @@ -4648,9 +4680,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001680", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", - "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "version": "1.0.30001683", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", + "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==", "funding": [ { "type": "opencollective", @@ -8336,9 +8368,9 @@ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/reldens": { - "version": "4.0.0-beta.38.1", - "resolved": "https://registry.npmjs.org/reldens/-/reldens-4.0.0-beta.38.1.tgz", - "integrity": "sha512-GHkuR10kJZ5R+DZ9S+e1+z36cQzauqAQG5qv8Iq5kpZi9u4Hw8XZlzaVeiVRP2sihHUdzxpcaqfr+sF2OBHAxw==", + "version": "4.0.0-beta.38.2", + "resolved": "https://registry.npmjs.org/reldens/-/reldens-4.0.0-beta.38.2.tgz", + "integrity": "sha512-ME6CxW96dbqKFcmhU0T0ZrRww/IVwGxlVxVE7OLVAvX46pan6I7gWpL0fVT2B8ML4MnsmYuRR71r9BFF/JAyWQ==", "dependencies": { "@colyseus/core": "0.15.55", "@colyseus/monitor": "0.15.8", @@ -8403,7 +8435,7 @@ "@reldens/skills": "^0.33.0", "@reldens/storage": "^0.30.0", "@reldens/tile-map-generator": "^0.16.0", - "@reldens/utils": "^0.38.0", + "@reldens/utils": "^0.39.0", "@sendgrid/mail": "8.1.4", "bcrypt": "5.1.1", "body-parser": "1.20.3", @@ -12005,6 +12037,16 @@ "@reldens/modifiers": "^0.25.0", "@reldens/storage": "^0.30.0", "@reldens/utils": "^0.38.0" + }, + "dependencies": { + "@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "requires": { + "await-event-emitter": "2.0.2" + } + } } }, "@reldens/modifiers": { @@ -12013,6 +12055,16 @@ "integrity": "sha512-5KClhPJE23uIbL+mW8XxAWzC/k/UO8k8xFhmHxuBx0GaLKTPLsooUGZnKVFgtsBk8Ow8EvUm1fBErQjXJFwEog==", "requires": { "@reldens/utils": "^0.38.0" + }, + "dependencies": { + "@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "requires": { + "await-event-emitter": "2.0.2" + } + } } }, "@reldens/skills": { @@ -12023,6 +12075,16 @@ "@reldens/modifiers": "^0.25.0", "@reldens/storage": "^0.30.0", "@reldens/utils": "^0.38.0" + }, + "dependencies": { + "@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "requires": { + "await-event-emitter": "2.0.2" + } + } } }, "@reldens/storage": { @@ -12036,6 +12098,16 @@ "knex": "^3.1.0", "mysql": "^2.18.1", "objection": "^3.1.5" + }, + "dependencies": { + "@reldens/utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", + "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "requires": { + "await-event-emitter": "2.0.2" + } + } } }, "@reldens/tile-map-generator": { @@ -12078,9 +12150,9 @@ } }, "@reldens/utils": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.38.0.tgz", - "integrity": "sha512-fqouyi+57YINYkwMjTPi7NsqEzMTH/DZSVfbU06QBwnXB2vuG+61YGOOa3546x9Wt6GdTGjIOldLBwOXIZ6qrw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@reldens/utils/-/utils-0.39.0.tgz", + "integrity": "sha512-U+japIXXmroiC/MxLxDswkavM8M/YRm1VB75tC8kR5PJZ4TA9QLdcgPzMRwcrFDeuNyvloGdftQg5wwXCIWX1Q==", "requires": { "await-event-emitter": "2.0.2" } @@ -12650,9 +12722,9 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "caniuse-lite": { - "version": "1.0.30001680", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", - "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==" + "version": "1.0.30001683", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", + "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==" }, "chalk": { "version": "4.1.2", @@ -15316,9 +15388,9 @@ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "reldens": { - "version": "4.0.0-beta.38.1", - "resolved": "https://registry.npmjs.org/reldens/-/reldens-4.0.0-beta.38.1.tgz", - "integrity": "sha512-GHkuR10kJZ5R+DZ9S+e1+z36cQzauqAQG5qv8Iq5kpZi9u4Hw8XZlzaVeiVRP2sihHUdzxpcaqfr+sF2OBHAxw==", + "version": "4.0.0-beta.38.2", + "resolved": "https://registry.npmjs.org/reldens/-/reldens-4.0.0-beta.38.2.tgz", + "integrity": "sha512-ME6CxW96dbqKFcmhU0T0ZrRww/IVwGxlVxVE7OLVAvX46pan6I7gWpL0fVT2B8ML4MnsmYuRR71r9BFF/JAyWQ==", "requires": { "@colyseus/core": "0.15.55", "@colyseus/monitor": "0.15.8", @@ -15383,7 +15455,7 @@ "@reldens/skills": "^0.33.0", "@reldens/storage": "^0.30.0", "@reldens/tile-map-generator": "^0.16.0", - "@reldens/utils": "^0.38.0", + "@reldens/utils": "^0.39.0", "@sendgrid/mail": "8.1.4", "bcrypt": "5.1.1", "body-parser": "1.20.3", diff --git a/package.json b/package.json index a656f15..1a9223f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reldens-skeleton", - "version": "4.0.0-beta.38.1", + "version": "4.0.0-beta.38.2", "description": "Reldens - Skeleton", "author": "Damian A. Pastorini", "license": "MIT", @@ -23,10 +23,10 @@ "process": false }, "dependencies": { - "reldens": "^4.0.0-beta.38.1" + "reldens": "^4.0.0-beta.38.2" }, "devDependencies": { "@colyseus/loadtest": "^0.15.7", - "@reldens/utils": "^0.38.0" + "@reldens/utils": "^0.39.0" } } diff --git a/theme/admin/reldens-admin-client.js b/theme/admin/reldens-admin-client.js index 80a794b..5ee2cf0 100644 --- a/theme/admin/reldens-admin-client.js +++ b/theme/admin/reldens-admin-client.js @@ -84,7 +84,7 @@ window.addEventListener('DOMContentLoaded', () => { let links = container.querySelectorAll('.side-bar-item a'); for(let link of links){ let linkWithoutHost = link.href.replace(location.host, '').replace(location.protocol+'//', ''); - if(-1 !== currentPath.indexOf(linkWithoutHost)){ + if(currentPath === linkWithoutHost || 0 === currentPath.indexOf(linkWithoutHost+'/')){ link.parentNode.classList.add('active'); container.classList.add('active'); done = true;