@openmrs/esm-form-builder-app 1.2.0 → 1.2.1-pre.399
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/005c31cb8e74f2861d2dd89daa445c97.js +1 -0
- package/dist/00dd4105d08d7e0e18acdcdaf67e41e3.js +1 -0
- package/dist/012befa304f9d3301612b7e61bbd8e9f.js +1 -0
- package/dist/02247718c28d39292c963c71226e8cd7.js +1 -0
- package/dist/02a7b71c33ab537969ad793fdbff0c4b.js +1 -0
- package/dist/04663680da9d3218eb0dc3291e16bc53.js +1 -0
- package/dist/04b27f726b4012ea6d1948316f4f1c77.js +1 -0
- package/dist/05384955a053e0b3df5788bf1f1c47c0.js +1 -0
- package/dist/0635009c2adfb1e135ac863ecd69ea49.js +1 -0
- package/dist/065cca5ee44499ad0b3303676081e6e0.js +1 -0
- package/dist/07103c76673893268265c7aab199aae1.js +1 -0
- package/dist/07bfb0460df5f49069dcb9ba7b1002dc.js +1 -0
- package/dist/084e043529444adcf514dd6a08c1f256.js +1 -0
- package/dist/08f5f3425970e1a2cc69aca0af9e7916.js +1 -0
- package/dist/09317849e123412bcd7f356a2f8f27e1.js +1 -0
- package/dist/09883827885fdc27fdc76f6177d18f01.js +1 -0
- package/dist/09a394f4be27f0b4699a3f6a385cf234.js +1 -0
- package/dist/09c3477b38698f5e2a0a350695bf46de.js +1 -0
- package/dist/0aeba5a0f56905f54200eb5d31a8dab9.js +1 -0
- package/dist/0b2fb43b9c28ce56059fe671b77de116.js +1 -0
- package/dist/0b5af5881dad080fc94d127455f52bff.js +1 -0
- package/dist/0c5837fc60d68faaee3e1f2cb6a719d8.js +1 -0
- package/dist/0c63f19f512adc1320834773a9aede2a.js +1 -0
- package/dist/0d136d14ad6d8fd07d551406229fb83d.js +1 -0
- package/dist/0df524faf129895ba8459a7a31a69558.js +1 -0
- package/dist/0e1f0d971c548d9e4dafae8ad47e336f.js +1 -0
- package/dist/124840495202cae10be935f3a03a1ac6.js +1 -0
- package/dist/12aace2834b1246f00fb238244461fe5.js +1 -0
- package/dist/12d0110980476e3f869a6deae95cc7fb.js +1 -0
- package/dist/1308ddebe6d58476be729b4f1188e4fb.js +1 -0
- package/dist/137005a5052584b4d8f9beb2a1d2eba1.js +1 -0
- package/dist/13dff8322c66f47120e880a2f82f9bd8.js +1 -0
- package/dist/14f810a44b5f3aec4d295e1a4aa7117d.js +1 -0
- package/dist/167b0afd6e3ff50e5b499d519d8e6792.js +1 -0
- package/dist/1685c713bda1ad4fc64a810fef807bfe.js +1 -0
- package/dist/1851a916a9f56640b6b147a7a6fcb39c.js +1 -0
- package/dist/18fad86424be355200fdfb8ac58acfc1.js +1 -0
- package/dist/1ad04c0d4599fb3d75c4bbe65c239445.js +1 -0
- package/dist/1ae03c1415fc080f6345de82998890ee.js +1 -0
- package/dist/1b6f70bafdce2d7b376a5b482eb91a8a.js +1 -0
- package/dist/1ba86d41cb77831f58d062ecc1af36fa.js +1 -0
- package/dist/1bc8f889c5604fc9af39dba9e7c76ecc.js +1 -0
- package/dist/1c2604df4a00b2624aeb726ba464e266.js +1 -0
- package/dist/1d63ff53406d226d93537e3adc48a328.js +1 -0
- package/dist/1d71ee2847d7c66b32e345212edf3771.js +1 -0
- package/dist/1df37979dc9b5afcf377b2f2c29ce870.js +1 -0
- package/dist/1e330f5ced69669205b3a3fc06855880.js +1 -0
- package/dist/1efcb42302415c59301a8c05a01fa385.js +1 -0
- package/dist/20a80f46074a22aa25782dbfc91563bf.js +1 -0
- package/dist/20add0a08bcdbf1b9e603d0886fe7bdd.js +1 -0
- package/dist/22b1c7623861a82912a440d6d363fece.js +1 -0
- package/dist/230c0c31d902ad1c84c266061dbf7651.js +1 -0
- package/dist/2345dd4d36dc8faedd4a26916c0e1d1d.js +1 -0
- package/dist/237044fac34e3703de2805836d76b0f7.js +1 -0
- package/dist/2385f32cb99588bf4a2a70218526b954.js +1 -0
- package/dist/23a7bca708b6dd829842fb64fef25535.js +1 -0
- package/dist/25471243aa447690bb0a12c162a7c9f3.js +1 -0
- package/dist/258.js +1 -0
- package/dist/258.js.map +1 -0
- package/dist/25ecfb04f367d3bee35beabec47fc38d.js +1 -0
- package/dist/267.js +1 -0
- package/dist/267.js.map +1 -0
- package/dist/298d1f058e019c1015560abea42c3c9e.js +1 -0
- package/dist/29925a7945795fef3620c3bf30947605.js +1 -0
- package/dist/29e0b740060608b2ac4c6e4c1e7a495d.js +1 -0
- package/dist/2a15ecbbf94668d5032766a982c126f9.js +1 -0
- package/dist/2ba569d70299b323599337fc68fee345.js +1 -0
- package/dist/2cf1a62fa399c2f158b70a1ed65f3ce0.js +1 -0
- package/dist/2d028eb3d0377b2db9cf435d512a9907.js +1 -0
- package/dist/2d0b123ac70fe6e7499bf12ab8f80a98.js +1 -0
- package/dist/2d7dea2e3a6c1d261b6420f45ee5707a.js +1 -0
- package/dist/2df3b40f4dc6a6cd7008b133ab96c7fa.js +1 -0
- package/dist/2dfe48c107e6022fcc9cc9c80cd226ac.js +1 -0
- package/dist/2e07d0d151407017a37dce22291584b7.js +1 -0
- package/dist/2ede631ad9ede0c4b9d307b8b9ddb788.js +1 -0
- package/dist/2f9794aee78306ed8938e9feddd93f94.js +1 -0
- package/dist/301.js +1 -0
- package/dist/301.js.map +1 -0
- package/dist/3051429dd8e2b2a47598d28de8558665.js +1 -0
- package/dist/309fa9aa538f0f7660607b7af0ed1457.js +1 -0
- package/dist/3141746d89d6a058ee2518184f06a3d6.js +1 -0
- package/dist/323b9e3e8b115817cf6d07f50effcfe4.js +1 -0
- package/dist/32556b05939b88e8fa0c577b331cfe33.js +1 -0
- package/dist/32a3943be6e7ca22331dcd8e3ad467db.js +1 -0
- package/dist/32a86184cc8cdd428d7f4f51e197790e.js +1 -0
- package/dist/338dd9374d7e917c8494de647b46e437.js +1 -0
- package/dist/347d30bee70667dca9980d79a86cff1e.js +1 -0
- package/dist/34811af478bf02cb3260d447634c344c.js +1 -0
- package/dist/348fb09dfded8723b63eeab3bc5d8830.js +1 -0
- package/dist/34974af8cc6823f8d40e5a797ba0abec.js +1 -0
- package/dist/34fcb3fcad48b021dadac1437a7c3897.js +1 -0
- package/dist/3515506c991f5271604a663e8f6f6537.js +1 -0
- package/dist/3550cd24b3559ac6d79547d281e69d0e.js +1 -0
- package/dist/35be7e81f3e75ca91c05d7d6474ffe7a.js +1 -0
- package/dist/36910f41128c717575216532b61fdd5c.js +1 -0
- package/dist/36b9a7f762d660a872b00b0f35d64208.js +1 -0
- package/dist/377.js +1 -0
- package/dist/377.js.map +1 -0
- package/dist/38683fcaa70649d0dae69b747b2e1bf9.js +1 -0
- package/dist/395af523c1cfad2a48126a4d14a24f62.js +1 -0
- package/dist/39dc11a588c3ffc16ceda05df70a13bb.js +1 -0
- package/dist/3a35ac6f058e5155704b91f9c956057c.js +1 -0
- package/dist/3b688c3f85be67184e87c0132e54c12d.js +1 -0
- package/dist/3bbf99b06b6eed98e22bd05ecd23aa9d.js +1 -0
- package/dist/3c44dbf49ff0ceb629ab0d166cddd8da.js +1 -0
- package/dist/3c544a6a5bb67d0b47467cc9767a2f09.js +1 -0
- package/dist/3c7a1cad8e96e4af87a4fbf3e29dd02c.js +1 -0
- package/dist/3cdbae3d3cdf964a6d6e8d443cbab354.js +1 -0
- package/dist/3d5697c8b4e3dd36924786e5cafde3b2.js +1 -0
- package/dist/3e26710b1cd37c7ecf680f47f2b8abc7.js +1 -0
- package/dist/3e79a5462c5f3c52f6f9ad46f9630225.js +1 -0
- package/dist/3e9fcd72844b45121f6252af95616edc.js +1 -0
- package/dist/3f5a168a938e08ceba33e3ecc557734b.js +1 -0
- package/dist/3f5cbf44c92b64ff5b5a9b4913d42155.js +1 -0
- package/dist/401.js +1 -0
- package/dist/401.js.map +1 -0
- package/dist/4150406c2a8177be60c084a1ed117241.js +1 -0
- package/dist/41689a5d9e6af3d0cff07fc4f61c7741.js +1 -0
- package/dist/4169f7b17c20c7eae468129e153f2831.js +1 -0
- package/dist/416b4e993d43e92ae81ca73a8beeb566.js +1 -0
- package/dist/43c50b8169718191c6b4487cbb0782fd.js +1 -0
- package/dist/43db4f2b7eb08dbb8e7dbc132c999aa6.js +1 -0
- package/dist/442.js +2 -0
- package/dist/442.js.LICENSE.txt +68 -0
- package/dist/442.js.map +1 -0
- package/dist/4461237a4e05a0bfc3820606d1926b53.js +1 -0
- package/dist/4484e281fe2c21b13bf10aec0c61960f.js +1 -0
- package/dist/4630f6d715e48a56148d128093d4137c.js +1 -0
- package/dist/471e1edde7b0d0a074411863c1e21927.js +1 -0
- package/dist/475f58e4f9c874fda8dce9b1f9c8803f.js +1 -0
- package/dist/47809c9cae441cc910caf95d7d4fb526.js +1 -0
- package/dist/478e630c8929a7549303e2705a9f8bbc.js +1 -0
- package/dist/47a83c7d47f19b999a570201a667e789.js +1 -0
- package/dist/4815b0b811a104227aa9e62ea343a0d7.js +1 -0
- package/dist/4870dabb22e3487ac074dd4ac616ea70.js +1 -0
- package/dist/49023f935822457ab83c0f7d397ea7ad.js +1 -0
- package/dist/49b28e4acd11db2c46f0d414dd9ec3f0.js +1 -0
- package/dist/4a1c2a572f0cfb1ab9a825abb6682cb0.js +1 -0
- package/dist/4a7f707d564e148111b313ca9e674f4d.js +1 -0
- package/dist/4a84f574e5720c29bcac1a726b32de74.js +1 -0
- package/dist/4ace28f0013341725e235b3aba9da1f5.js +1 -0
- package/dist/4b4261a45af76c5046915ad1992c2201.js +1 -0
- package/dist/4bc9121ea47fb26054e0d278c31bc2d2.js +1 -0
- package/dist/4c05271259c1159639ee548ba4f5db32.js +1 -0
- package/dist/4c5d3454ed7c01eb9a0509dbd20e2a28.js +1 -0
- package/dist/4c7f4a2b8de71b12302a21ab877e46c1.js +1 -0
- package/dist/4e46c67cf627175f8bfca95c577607ac.js +1 -0
- package/dist/4ec1d3e105e2e77c385ef7abcfaa3483.js +1 -0
- package/dist/50db98db4e11993952cb187dab7bdd3b.js +1 -0
- package/dist/525b09646dafd90d7d64648848eea4b9.js +1 -0
- package/dist/537.js +1 -0
- package/dist/537.js.map +1 -0
- package/dist/53f2fdf90295cff79396b0eb08f8cb12.js +1 -0
- package/dist/541848729340f824b4fd58662a3d2624.js +1 -0
- package/dist/545a327c0c271e6496d3fbba8810c745.js +1 -0
- package/dist/556faa7d6efae8565176196a890ea7b0.js +1 -0
- package/dist/55ce51ac937ca88dcdf79668d0cdd831.js +1 -0
- package/dist/55ecab46828f78b38896f32d01bc38a4.js +1 -0
- package/dist/55f3f7a501d348eb7af35928c5816857.js +1 -0
- package/dist/56959d2f3b3e29fb203e0bbd5991e6e3.js +1 -0
- package/dist/574.js +1 -0
- package/dist/58f526236e8823b56df3e12fd7486ade.js +1 -0
- package/dist/5950799dcc668c14e5a989c1003293f5.js +1 -0
- package/dist/59bfb91526c1c5cca9069cc2c2f321ed.js +1 -0
- package/dist/5a76c98d29103de9690fbe8961b1ce12.js +1 -0
- package/dist/5b5adbfb43d512a87f2f776f6a4ef25b.js +1 -0
- package/dist/5b72acc5c17379677d11d7b808e319c7.js +1 -0
- package/dist/5bb86040107e84d77c4fc67c0ea41d00.js +1 -0
- package/dist/5bee4cb0b16c7f1470e4eaa6c3f9c5e4.js +1 -0
- package/dist/5cb4882ff2a9eac36722d5eb9a87bdbd.js +1 -0
- package/dist/5d92050e4d49e0a83cd45c0249bcdd69.js +1 -0
- package/dist/5e03d4224ff478eaa9c9547f404d82d4.js +1 -0
- package/dist/5e2b739f50121f961d6a608a25bac400.js +1 -0
- package/dist/5e4e9c0dcaa3c0bd7068a8baf4779396.js +1 -0
- package/dist/5ebfeb93125ffa76c121f4a983b53a4c.js +1 -0
- package/dist/5f12711459efb0424af2bf5b65e725ea.js +1 -0
- package/dist/5f235dd97a6dfd82a290f0aae894ef81.js +1 -0
- package/dist/5f5de01d30333b334ea0aef6597e2c67.js +1 -0
- package/dist/5fec44c542bf68320528d6cb00d35fef.js +1 -0
- package/dist/60c1727f2176b7cd2e81d88d0c697062.js +1 -0
- package/dist/61a8f4225948ade140f7d190c48c1cac.js +1 -0
- package/dist/638fb30c918f4a675c1236ccf194061c.js +1 -0
- package/dist/656394060cd2a2744bd38f196014ad34.js +1 -0
- package/dist/6615eea954762d64e9fd53a5071ecea7.js +1 -0
- package/dist/663.js +2 -0
- package/dist/663.js.LICENSE.txt +9 -0
- package/dist/663.js.map +1 -0
- package/dist/66be1ebd9a5038e7850c73daa4907a6b.js +1 -0
- package/dist/6705bf98a0601eefd8dadf2548c113a9.js +1 -0
- package/dist/6710a45fd8743d4f136efc27a2d48f97.js +1 -0
- package/dist/687.js +2 -0
- package/dist/687.js.LICENSE.txt +27 -0
- package/dist/687.js.map +1 -0
- package/dist/691aadd6510d97afd442f998d86bcce8.js +1 -0
- package/dist/69ee2115bb4bd9f4b4c35c4e1c2deb69.js +1 -0
- package/dist/6a15a7059a563e7571563c6cf97e5ae0.js +1 -0
- package/dist/6a3121c2ab987e8e1b78264d790482f0.js +1 -0
- package/dist/6b8e6bb024cbf000ec92201f2f5fb41c.js +1 -0
- package/dist/6ba9367b5ba548b58b4c1a1b2610e278.js +1 -0
- package/dist/6beb70f532b1694b2bd8652e8cf9d920.js +1 -0
- package/dist/6cddbb76b88ce81a67d49e045ddcfff4.js +1 -0
- package/dist/6d18a9b02f2615db9c2f77d128b13a4f.js +1 -0
- package/dist/6d86eb3f75ae72f605962249a43f74db.js +1 -0
- package/dist/6e10b63942da7cad30d6a08ff91bac3d.js +1 -0
- package/dist/6ed19c230a894e477183ea46e03e23d7.js +1 -0
- package/dist/6ed29bac73c3e47ffbb7bdb3efccd2c2.js +1 -0
- package/dist/6f183309bd8c328ccd26b9e59949176c.js +1 -0
- package/dist/6f36b59f6a2607bacd313472af372bcf.js +1 -0
- package/dist/6f4dcd9b39a70504e5cc2270f11611d3.js +1 -0
- package/dist/6f6ee9f513b4c047f75cd2a3bfd28fdb.js +1 -0
- package/dist/6fa662dfafaa837c5178a04d771b97ca.js +1 -0
- package/dist/6fd07cd6edfd543d0169b1f2f3b85c69.js +1 -0
- package/dist/6fd6566f8a8967f9ca4c8bcb1e734997.js +1 -0
- package/dist/709.js +1 -0
- package/dist/709.js.map +1 -0
- package/dist/70ce708daecc5bfa9c31091ffbfe4348.js +1 -0
- package/dist/721c2f2848129c42d22df192932d8b9c.js +1 -0
- package/dist/74fce469f6fd3a63d06cb096d8cb33c1.js +1 -0
- package/dist/7558f57dcf15e80b66dc0923418940e1.js +1 -0
- package/dist/75ec62eb4a3e281fbf270ca3c6f5a052.js +1 -0
- package/dist/763a3d47c0a5b4dafc578271d1dbe5a2.js +1 -0
- package/dist/767f98f21e44e8b0a850efcd8a1f48b1.js +1 -0
- package/dist/776bff2acdfb0f49119be89204852659.js +1 -0
- package/dist/77815565a6459ac1bcee35a3f0c38fa2.js +1 -0
- package/dist/77aa50c577f2734a557b514ad2999c81.js +1 -0
- package/dist/77eb67b4cb33adf88e7498d5c1ee73bc.js +1 -0
- package/dist/7874f7ea8d7a1a899d3daa8a937b8185.js +1 -0
- package/dist/793.js +2 -0
- package/dist/793.js.LICENSE.txt +3 -0
- package/dist/793.js.map +1 -0
- package/dist/79807848432e353d25b5f6ba7f9d6be7.js +1 -0
- package/dist/79d6f436213e2d2e57cf25ad09cce5fd.js +1 -0
- package/dist/7b2b5c33a232707fb5a0fd741e20db5c.js +1 -0
- package/dist/7b32f4e832ff98adb867947ea419dcd7.js +1 -0
- package/dist/7c2e454bf4dd49d8858992b4c4d0fa79.js +1 -0
- package/dist/7cf5aef5d02db3d31c230070997e3106.js +1 -0
- package/dist/7d8684362f8b3fbbda87b2843c6f1e08.js +1 -0
- package/dist/7e52c90a575ce1643964f5ce0d7762ce.js +1 -0
- package/dist/7e76d1c8b6d74d08657dc1f8adea23af.js +1 -0
- package/dist/7ebd5bc8c4f770f5920fdeb6d017c260.js +1 -0
- package/dist/7f9756dc440b9054ef7be5c18e981489.js +1 -0
- package/dist/7fa23058009da9b6acc57b1b3f409af7.js +1 -0
- package/dist/8.js +1 -0
- package/dist/8.js.map +1 -0
- package/dist/80058c6fc137495baab5efb509c066d1.js +1 -0
- package/dist/802f0388ed0024f6e66263e0b5d0719a.js +1 -0
- package/dist/80b2d05f959ace1e4f4bc919b3c47ce9.js +1 -0
- package/dist/812eebdf5716c798ea06fffa34d697e1.js +1 -0
- package/dist/8142d98f172436913834303ddb297614.js +1 -0
- package/dist/818637b7c928e96140b4165ec1a28716.js +1 -0
- package/dist/846c188abd1e1d001f108325a45e4fcf.js +1 -0
- package/dist/84a3a877521d307fee2e25dc10c566a3.js +1 -0
- package/dist/8554743ec38eb7620f195a550718d5a5.js +1 -0
- package/dist/86bbd732125e81000d416830e2af3373.js +1 -0
- package/dist/87455db28e9f83d04423dc021a8c7dfa.js +1 -0
- package/dist/876ff9e114857c02696293d335b4ae1a.js +1 -0
- package/dist/88a9f8dd2f1a4f1b7025a0054dc9b6ca.js +1 -0
- package/dist/88dfa0504a90d969288208f06243a51b.js +1 -0
- package/dist/890673ec2ade737ba8dc086c27a15832.js +1 -0
- package/dist/8a075caa090def25b7d31166447b0422.js +1 -0
- package/dist/8b971d3d6052ff5c0e68ab6462ef6cd6.js +1 -0
- package/dist/8bace6519d27715fc7e157ce826c2466.js +1 -0
- package/dist/8bdef070ee34261c730585b92c73bfc0.js +1 -0
- package/dist/8d6f901172e081378b3f71ced22bd27d.js +1 -0
- package/dist/8db5a7641a7961a60a06a4580934c6dd.js +1 -0
- package/dist/8df6f650cae24a33633e62725256b473.js +1 -0
- package/dist/8e4a13e11fb1f90284b62f2aafc24159.js +1 -0
- package/dist/8e52c4c6dcd07a70750cce9d0238de80.js +1 -0
- package/dist/8e9dcf094f4a920cd7570b900dcade14.js +1 -0
- package/dist/8ea6d6a0b0068c2f77b0c16cf54781ee.js +1 -0
- package/dist/8f8e16fca6bb136e854210476076db56.js +1 -0
- package/dist/8ffdb3c31fe43613ef5958523a4c8811.js +1 -0
- package/dist/908.js +2 -0
- package/dist/908.js.LICENSE.txt +19 -0
- package/dist/908.js.map +1 -0
- package/dist/90a9bbb6d378556d6fd011683f9d2a19.js +1 -0
- package/dist/916570993f1e76695881fa2f80ed8e97.js +1 -0
- package/dist/91a54f7ec8712c253c321fa8c0ecea88.js +1 -0
- package/dist/9267b01489dc622174c79d66aabad75e.js +1 -0
- package/dist/92e48a52deeb0d49e62e71b651ac94d4.js +1 -0
- package/dist/92ed6269f1e4ce2610392f8f0945f52d.js +1 -0
- package/dist/9334a3d022d77446a57a1ff9c514aac1.js +1 -0
- package/dist/9335adaad37ca2c73c753914494308de.js +1 -0
- package/dist/93976d3253c624ab38535c9c11a03964.js +1 -0
- package/dist/93d3f5bfff644c1da9c1d2f1f36dee48.js +1 -0
- package/dist/9413a25b5d8713f93e516564035efe18.js +1 -0
- package/dist/9460057df9b997c74a6f49dbe4fc756c.js +1 -0
- package/dist/948239f502be5a9c3830962fca20b645.js +1 -0
- package/dist/94b311f7ebe0b6fc0ea21ef4054cc941.js +1 -0
- package/dist/94edab2c469764c36c3168450158945d.js +1 -0
- package/dist/95a397d972f2a7de8cdc04ca53685bd0.js +1 -0
- package/dist/95fcb791d45fdb23ce12d767bef27364.js +1 -0
- package/dist/963fe755e7903232a3dcb1522644baa6.js +1 -0
- package/dist/965b93c353728f852661c8d1efb85209.js +1 -0
- package/dist/967f19e2c6a1030c7dda3872af0655e2.js +1 -0
- package/dist/968df64a26e4d3f3f19fb5ee0375d1a2.js +1 -0
- package/dist/971b454512e21a1bbc5957ea1ff5cd6d.js +1 -0
- package/dist/97362a1a0bab1742ace71b77c9f2e6ba.js +1 -0
- package/dist/98fefcba0e57063d438ab1624b88500d.js +1 -0
- package/dist/99916f77cfc0b12071bf9b1f7f157927.js +1 -0
- package/dist/9a3b2bcb995d70cc7f1251ea01f7f7ad.js +1 -0
- package/dist/9b4e7a533e32c15ff067e8e556ad7361.js +1 -0
- package/dist/9b5591231cdcb0a8bf42d91bc832961c.js +1 -0
- package/dist/9be75425dae9d92151882fb7ec8feaad.js +1 -0
- package/dist/9c14e8b091b9cda1af1e301f30f590bb.js +1 -0
- package/dist/9cde1fe7566568a2aa4a52b94e601121.js +1 -0
- package/dist/9d65cf36f7b9cf89092cc5d14dbdd268.js +1 -0
- package/dist/9de7677a35456e3d6462cde13ab34d77.js +1 -0
- package/dist/a014ca50c1ee2e363a72658798192bfc.js +1 -0
- package/dist/a097ec0a88ad050ab617d5d2838e7271.js +1 -0
- package/dist/a185873f7503e2298b6a3aa624a04569.js +1 -0
- package/dist/a259f251157cfe113f97ba8755ecd773.js +1 -0
- package/dist/a2ec46920acdb513b03ba411ead28885.js +1 -0
- package/dist/a33defe272c7c273e24f2b7d07e1b55d.js +1 -0
- package/dist/a3ad0e0d06864aeab9c581f22f0e464f.js +1 -0
- package/dist/a3fd239fe774602b982b86b933b37351.js +1 -0
- package/dist/a40a76889417789c4deadad7e56fe347.js +1 -0
- package/dist/a42399a2f62bdefb8f04a5138f565c07.js +1 -0
- package/dist/a5437770d94ec8751475e4fbbee929e7.js +1 -0
- package/dist/a5a1f783ff112ea78b48e0f07b172d64.js +1 -0
- package/dist/a5f50331ceef8856a227f90ee98efe99.js +1 -0
- package/dist/a62c838b216053594fbeaab1fa43affb.js +1 -0
- package/dist/a6429ec1a3da3670b6c3f51f89bc9d28.js +1 -0
- package/dist/a8a79f6ae1a5aa39029a2919799b5309.js +1 -0
- package/dist/a8c023563de11bd4a9b0a6d5371a5cad.js +1 -0
- package/dist/a96eb1125446d8f9aeab0aad57345a54.js +1 -0
- package/dist/a9f5269d916ede39c13d7e6da1f3490d.js +1 -0
- package/dist/aa03d5fe405fad2c95833152cff27ec8.js +1 -0
- package/dist/aa8ed5452c1e96856e2f43990b850e4e.js +1 -0
- package/dist/ab29c54e832cb105d3a1593776c86342.js +1 -0
- package/dist/ac768a5ded60bd4ac64b9239f0a96d7a.js +1 -0
- package/dist/ac8fdd27ce0e3f059072ff3ea7f712fb.js +1 -0
- package/dist/ad2bb67bce7519803305da9add4bc92d.js +1 -0
- package/dist/ad933e2dde52678164ee01e592075659.js +1 -0
- package/dist/ae22707304315382162e6869f1137be1.js +1 -0
- package/dist/ae8f84901cf7dcae0f04e3c5a513b1d9.js +1 -0
- package/dist/ae9c720bdd0810cc560fc388872dafc2.js +1 -0
- package/dist/aedbd0d4b40dc5af28b49e09d364a193.js +1 -0
- package/dist/afa4cad84a05492e3ffe0e52e0bedaa2.js +1 -0
- package/dist/b05cf76e96066eb785c2e4a333d10502.js +1 -0
- package/dist/b0e6a4801ab78970901c2c3173fa3044.js +1 -0
- package/dist/b0ed15ae7c5fde998175c3c082146fe9.js +1 -0
- package/dist/b28db978172597c7090eba9324d09126.js +1 -0
- package/dist/b2f17beb37e88a3a3a714db00a13b9b4.js +1 -0
- package/dist/b33a2e676d49a7934d4edea8dfb86716.js +1 -0
- package/dist/b3688558a1cee156b5acfba04f1401a4.js +1 -0
- package/dist/b3e4f816d6e363d03f04986eed11baac.js +1 -0
- package/dist/b55d59b61ecd4e3c1f459afc71cde110.js +1 -0
- package/dist/b5d974700fd54a5ee73a03f63833d1ba.js +1 -0
- package/dist/b68801d2cb433e43ca05cb62893a34be.js +1 -0
- package/dist/b6d6cf52065c42df54b1d289351c0124.js +1 -0
- package/dist/b7b3de284b037d65b380a781dc10bf05.js +1 -0
- package/dist/b8324a5dd37f3475ce2b244b830d6c26.js +1 -0
- package/dist/b8936d57747b1b4e14705ff5c1056d35.js +1 -0
- package/dist/b8f78ce9f07036935f95bb4fa6f6a0d7.js +1 -0
- package/dist/b9700fe2b2af83e2e905f5f89ac08e02.js +1 -0
- package/dist/b97a611d29e4ad702ea774406c81f0c7.js +1 -0
- package/dist/b9da183e6c2fa1107ca574be8f7c44be.js +1 -0
- package/dist/ba6b031fe43127991c97cf1bbe718689.js +1 -0
- package/dist/bc36fdf63bba18a4d8d221d7d45fea20.js +1 -0
- package/dist/bc67e419b0625f91e533f751c7862814.js +1 -0
- package/dist/bdebc3dc6f8b6acfb303346c09024830.js +1 -0
- package/dist/be32351e3981e946b0468d965089d295.js +1 -0
- package/dist/bed3d80560f47548f118098497409f0a.js +1 -0
- package/dist/c02ef4937a43a41fef6a664df26b51a1.js +1 -0
- package/dist/c0b7e78a8f6f54ee50b2939de2e84d6c.js +1 -0
- package/dist/c1e56a19505d75095ceca1b05ca0e0a1.js +1 -0
- package/dist/c26e3a6ce2e86b6d76307f3f29a4afe0.js +1 -0
- package/dist/c39341975dc2bc05818173a6ad5d30c3.js +1 -0
- package/dist/c3f7060087f63ef3e7c3718466eeed16.js +1 -0
- package/dist/c40a219840accebc2ac9279469aa2386.js +1 -0
- package/dist/c4dd1c9ded60399a5eeaa79d77d9b1f5.js +1 -0
- package/dist/c4e7515198e5db697627b1dd688fd99e.js +1 -0
- package/dist/c5e66df773dc4a4350c3cf37f77d093f.js +1 -0
- package/dist/c6503659d041a4dd26e088419b7395e8.js +1 -0
- package/dist/c7055eab568e32849603ca6004ce5c3c.js +1 -0
- package/dist/c8118346c4cc4c9980d2cd8f89d6d498.js +1 -0
- package/dist/c9386b639cdad090cacb02b7b0afa85d.js +1 -0
- package/dist/c95b5aae2a7034beef4c710d0a671c81.js +1 -0
- package/dist/ca439a7330bff09434b2d2bad157a97b.js +1 -0
- package/dist/cac63f1893f897a73135ffdb787f5939.js +1 -0
- package/dist/caf7d94a2203e1043033c984f6992522.js +1 -0
- package/dist/caf96bd27a3feb0cc1e93bbe7c201006.js +1 -0
- package/dist/cb1208df779495eb92e32b5d05b5b80d.js +1 -0
- package/dist/cb1260a4fda6f9ef76810087e7f3d6cc.js +1 -0
- package/dist/cbf3484406027954b0ea74ef16cdd154.js +1 -0
- package/dist/cc96174f117f0b6eb9956e15cd5fdca4.js +1 -0
- package/dist/cda61deec3a67f590d36baf70ba4ea3c.js +1 -0
- package/dist/cdf05b749173b3567d45237bdc483aba.js +1 -0
- package/dist/ce19b4994fcd8ca22b29fab21d4b887c.js +1 -0
- package/dist/ce1d1602773687fd1dd9a55525b40c7b.js +1 -0
- package/dist/ce2289ee0dd8af2c8e45bb02dac31b00.js +1 -0
- package/dist/ce7fbf867d7047a6f37abf943e18e145.js +1 -0
- package/dist/cf3a033ad3f0dcd46f7580c243ac2b13.js +1 -0
- package/dist/d01a902c73814ec8aa179c75f11d972f.js +1 -0
- package/dist/d0669ef826c35ba40e1c945d5d6e05b7.js +1 -0
- package/dist/d0ad842b7ad3dc97e62aca89851125e1.js +1 -0
- package/dist/d1577b72ca96cbc38c8acc9f6a6add9e.js +1 -0
- package/dist/d1978f243b9306683f70a363ef7d0a7b.js +1 -0
- package/dist/d1e5d07127f4e0b7cfdc20b321e61ca8.js +1 -0
- package/dist/d1f62a0a43a41516c0636fa22c057252.js +1 -0
- package/dist/d49660017b954347fe7cc24f88182e84.js +1 -0
- package/dist/d547d68a7dddccfa4f968e2e0097b689.js +1 -0
- package/dist/d56fb5c656fc8415ba2a661bc27c10bf.js +1 -0
- package/dist/d6ddfb035c91552f182b93d36f37bd83.js +1 -0
- package/dist/d7945210fd88487ec67520554b0314ec.js +1 -0
- package/dist/d8cc35cc51ba4c0479c4944d97304f15.js +1 -0
- package/dist/d8eff8909c2622dda90804e863214bf1.js +1 -0
- package/dist/d979211bf60161af239f587e7fbcc41d.js +1 -0
- package/dist/dac2a15feda3d7136a4448e63adb6eeb.js +1 -0
- package/dist/dada7ea4318abc5e4b0bded876c80c5b.js +1 -0
- package/dist/db6596c28c7bce047966031049e2398b.js +1 -0
- package/dist/db768fe42742d6e81d319913c956e017.js +1 -0
- package/dist/dcce977bc807cb8f8aa7f908211202ce.js +1 -0
- package/dist/deee5d460e7f8065ff90e8bb59e9bfe7.js +1 -0
- package/dist/deef8cdfcda94a9b7c717fb2ef75d657.js +1 -0
- package/dist/dfb26d6490fe3c6c70810cd356715f96.js +1 -0
- package/dist/e046e26707316ee52624b77acb581be0.js +1 -0
- package/dist/e0c308552c48432f7bd89ec9ba28d183.js +1 -0
- package/dist/e0c4ac848089e5c58f89dbe01c1b8e16.js +1 -0
- package/dist/e182f086b034818d7947960b528b24f7.js +1 -0
- package/dist/e1d9b91d4e4b506ea97e0107064c4e2e.js +1 -0
- package/dist/e1ea2341a4e2aa61752ab1b891834377.js +1 -0
- package/dist/e256e943b111c7cc22b7c881afddd7af.js +1 -0
- package/dist/e2eeafb3a0656ae70463e381aa36884d.js +1 -0
- package/dist/e3fbd267b3f13eb265b667774cffe6a5.js +1 -0
- package/dist/e4630a83894977487b63a98f4ef88b2d.js +1 -0
- package/dist/e4b5c126af531bc62b2efbab0606bb88.js +1 -0
- package/dist/e535b8bffd2a2d7b799b87bee8b19b68.js +1 -0
- package/dist/e6603fcc635fd13832371cbac8e92b4c.js +1 -0
- package/dist/e6d29dbb71c5513dfc42fcf0aae5393e.js +1 -0
- package/dist/e7c296bf3f2956fd992ae291bc996874.js +1 -0
- package/dist/e88c852e358464c7394fc5096ab6d66b.js +1 -0
- package/dist/e95d8e903be583d4a240ebabe1cdcc05.js +1 -0
- package/dist/e9ac6e53cda55b8ded75c3168bed622a.js +1 -0
- package/dist/eadd25779cd5fdf8a3e0a6b3f5ab1f81.js +1 -0
- package/dist/eaed0eb2c63a823402e51a4b4e14adef.js +1 -0
- package/dist/eaf5a4f6728ec24ff6800d92d8cb8399.js +1 -0
- package/dist/ebb21b22b0c9daacd007f22e3162f61b.js +1 -0
- package/dist/ed82ad4000e9e9c82cbe8c7fb2606037.js +1 -0
- package/dist/ed8784024211fef3a64090500873ce19.js +1 -0
- package/dist/ed974137d8f716991c9b4e08d0afa958.js +1 -0
- package/dist/edce23a59a3681261bccc96f44419b20.js +1 -0
- package/dist/ee953ef1fb8c52e9ee18b9e821acb870.js +1 -0
- package/dist/eef950456228796815ecb8918a510a37.js +1 -0
- package/dist/ef27ffb78c01096efef064bde49f36f9.js +1 -0
- package/dist/efa15ef2b1745cd75ca9838b6c75e3b0.js +1 -0
- package/dist/f064c7092c899f2916d7efeff8d0d4a7.js +1 -0
- package/dist/f0d3dcd6fbf614d12538c7eb85ad763e.js +1 -0
- package/dist/f0eb765fcae23f9c9e69720cc5792065.js +1 -0
- package/dist/f2196245706d59b8293062458e484fa3.js +1 -0
- package/dist/f267b21f148c3ea9cf9eee4a00118445.js +1 -0
- package/dist/f2b7543385b081d4a1d38d59298d6dab.js +1 -0
- package/dist/f2ef5891c9614095450e1a75c880e1eb.js +1 -0
- package/dist/f3622b945264eafeefeefaea0a746fc7.js +1 -0
- package/dist/f39cf22d6697799be9b3980f31dae6dc.js +1 -0
- package/dist/f3b2a9746d4453410b186023c67f6fcd.js +1 -0
- package/dist/f4522ba422e83e3f5c4831d6a8468b12.js +1 -0
- package/dist/f4726cbc42d80e6035641c9776490f35.js +1 -0
- package/dist/f6231d9285ead4bbac9beb1ef1fb9b13.js +1 -0
- package/dist/f655a14dabae0424d9b9e1cc0f2ee138.js +1 -0
- package/dist/f674f96d229dfd26c71d057bce911f74.js +1 -0
- package/dist/f6967e9c55fc7dae7209a3ce453cc6e1.js +1 -0
- package/dist/f7f23e84761c27b79313251321d9bbc8.js +1 -0
- package/dist/f8435c0a7ccad780c7434398b2bc5927.js +1 -0
- package/dist/f86ac61532228ef0d66a69983485644c.js +1 -0
- package/dist/f889aaa911d8792732b1d0c27becca35.js +1 -0
- package/dist/f92bda44d35d6d04a7e25bf28d13e36d.js +1 -0
- package/dist/f9c1a2801cd8f99e9876e8b5323d821a.js +1 -0
- package/dist/f9d6d4dd0d5e07cbe6f5bb84c9a69ac0.js +1 -0
- package/dist/fcf6e514f9e50a0313e06f5a673ea215.js +1 -0
- package/dist/fd2abe1cf8ba0bcd9a522a2d8b5d9b7b.js +1 -0
- package/dist/fe8b3a78eefa93a39724a49282532802.js +1 -0
- package/dist/fe9aaa2e8278cf7e57935cb3ef71d96a.js +1 -0
- package/dist/ffd89ca886ec22fc443527b8e296f194.js +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-form-builder-app.js +1 -0
- package/dist/openmrs-esm-form-builder-app.js.buildmanifest.json +900 -0
- package/dist/openmrs-esm-form-builder-app.js.map +1 -0
- package/dist/openmrs-esm-form-builder-app.old +1 -0
- package/package.json +3 -2
- package/src/form-builder-admin-card-link.component.tsx +29 -0
- package/src/index.ts +10 -0
package/dist/442.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 442.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[]).push([[442],{87421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-obs-group__flexColumn___JVcYD{display:flex;flex-direction:column;margin-right:2.5rem;flex:1}.-esm-form-builder__ohri-obs-group__flexRow___EVOsO{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB{max-width:18rem}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB input[class*=cds--date-picker__input]{width:18rem !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div,.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB div[class*=cds--number]{margin-top:0 !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div>div>div{max-width:18rem !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div>div>div>div{max-width:18rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/group/ohri-obs-group.scss"],names:[],mappings:"AAAA,uDACE,YAAA,CACA,qBAAA,CACA,mBAAA,CACA,MAAA,CAGF,oDACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CAGF,2DACE,eAAA,CAGF,iGACE,sBAAA,CAGF,kJACE,uBAAA,CAIF,uEACE,0BAAA,CAIF,2EACE,0BAAA",sourceRoot:""}]),s.locals={flexColumn:"-esm-form-builder__ohri-obs-group__flexColumn___JVcYD",flexRow:"-esm-form-builder__ohri-obs-group__flexRow___EVOsO",obsGroupColumn:"-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB"};const a=s},14893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-content-switcher__formField____1mmu{margin-top:.625rem}.-esm-form-builder__ohri-content-switcher__formField____1mmu>div>div>label{color:#525252}.-esm-form-builder__ohri-content-switcher__textContainer___geZGE label{font-size:.875rem !important}.-esm-form-builder__ohri-content-switcher__errorLegend___WWdcY legend,.-esm-form-builder__ohri-content-switcher__errorLabel___QaAwN label{color:#da1e28 !important}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr{border-radius:4px;width:15rem}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr button{background-color:#f4f4f4}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr button:before{display:none !important}.-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0{background-color:#edf5ff !important;border:1px solid #0f62fe !important;color:#0f62fe !important;padding:0 0 0 1rem}.-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0 button:focus{border:none !important}.-esm-form-builder__ohri-content-switcher__sansSwitchOverrides___bARXC{border:solid 1px #a6c8ff !important;background-color:#f4f4f4 !important;padding:0 0 0 1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/content-switcher/ohri-content-switcher.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,kBAAA,CAGF,2EACE,aCyCQ,CDrCR,uEACE,4BAAA,CAIJ,0IACE,wBAAA,CAGF,kEACE,iBAAA,CACA,WAAA,CAEA,yEACC,wBCiBO,CDfP,gFACE,uBAAA,CAKL,mEACE,mCAAA,CACA,mCAAA,CACA,wBAAA,CACA,kBAAA,CAEA,gFACE,sBAAA,CAIJ,uEACE,mCAAA,CACA,mCAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-content-switcher__formField____1mmu",textContainer:"-esm-form-builder__ohri-content-switcher__textContainer___geZGE",errorLegend:"-esm-form-builder__ohri-content-switcher__errorLegend___WWdcY",errorLabel:"-esm-form-builder__ohri-content-switcher__errorLabel___QaAwN",selectedOption:"-esm-form-builder__ohri-content-switcher__selectedOption___jZidr",switchOverrides:"-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0",sansSwitchOverrides:"-esm-form-builder__ohri-content-switcher__sansSwitchOverrides___bARXC"};const a=s},91850:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-date__datetime___IQnq6>div{flex:none !important;box-sizing:content-box !important}.-esm-form-builder__ohri-date__datePickerOverrides___YvsVu input{width:22.313rem !important}.-esm-form-builder__ohri-date__disabled___cF_T9 label{color:#525252 !important}.-esm-form-builder__ohri-date__errorLabel___QhJX4 label{color:#da1e28 !important}.-esm-form-builder__ohri-date__formField___ptMVo .bx--time-picker__input-field{width:auto;margin-left:5rem}.-esm-form-builder__ohri-date__formField___ptMVo .bx--label--disabled{margin-left:5rem}.-esm-form-builder__ohri-date__timePicker___pypOy{width:6.57rem;padding-left:.2rem}.-esm-form-builder__ohri-date__row___K2POt{display:flex;flex-direction:row;align-items:baseline}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/date/ohri-date.scss"],names:[],mappings:"AAEA,oDACE,oBAAA,CACA,iCAAA,CAGF,iEACE,0BAAA,CAGF,sDACE,wBAAA,CAGF,wDACE,wBAAA,CAGF,+EACE,UAAA,CACA,gBAAA,CAGF,sEACE,gBAAA,CAEF,kDACE,aAAA,CACA,kBAAA,CAGF,2CACE,YAAA,CACA,kBAAA,CACA,oBAAA",sourceRoot:""}]),s.locals={datetime:"-esm-form-builder__ohri-date__datetime___IQnq6",datePickerOverrides:"-esm-form-builder__ohri-date__datePickerOverrides___YvsVu",disabled:"-esm-form-builder__ohri-date__disabled___cF_T9",errorLabel:"-esm-form-builder__ohri-date__errorLabel___QhJX4",formField:"-esm-form-builder__ohri-date__formField___ptMVo",timePicker:"-esm-form-builder__ohri-date__timePicker___pypOy",row:"-esm-form-builder__ohri-date__row___K2POt"};const a=s},25123:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-encounter-location__formField___zMCeM,.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx{margin-top:10px}.-esm-form-builder__ohri-encounter-location__formField___zMCeM>div>div>label,.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>label{color:#525252}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx{width:auto}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>label{max-width:auto}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>div{width:22.313rem !important}.-esm-form-builder__ohri-encounter-location__flexRow___usT8y{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe{width:auto;padding-bottom:15px}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe>div>div{width:22.313rem !important}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe>div div div input{border:0 !important;border-bottom:1px solid #8d8d8d !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/location/ohri-encounter-location.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,mIACE,eAAA,CAGF,+JACE,aCyCQ,CDtCV,oEAEE,UAAA,CAEA,kFACE,cAAA,CAGF,gFACE,0BAAA,CAIJ,6DACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CAGF,yEACE,UAAA,CACA,mBAAA,CAGF,iFACE,0BAAA,CAGF,2FACE,mBAAA,CACA,0CAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-encounter-location__formField___zMCeM",formInputField:"-esm-form-builder__ohri-encounter-location__formInputField___JBEqx",flexRow:"-esm-form-builder__ohri-encounter-location__flexRow___usT8y",multiselectOverride:"-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe"};const a=s},35508:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,'.-esm-form-builder__ohri-multi-select__formField___a2WqE{margin-top:10px}.-esm-form-builder__ohri-multi-select__formField___a2WqE>div>div>label{color:#525252}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g{width:auto;padding-bottom:15px}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g>div>div{width:22.313rem !important}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g>div div div input{border:0 !important;border-bottom:1px solid #8d8d8d !important}.-esm-form-builder__ohri-multi-select__errorLabel___wMpTR label{color:#da1e28}.-esm-form-builder__ohri-multi-select__list___mCHup{margin-left:"1rem"}',"",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/multi-select/ohri-multi-select.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,yDACE,eAAA,CAGF,uEACE,aCyCQ,CDtCV,mEACE,UAAA,CACA,mBAAA,CAGF,2EACE,0BAAA,CAGF,qFACE,mBAAA,CACA,0CAAA,CAGF,gEACE,aCwEO,CDrET,oDACE,kBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-multi-select__formField___a2WqE",multiselectOverride:"-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g",errorLabel:"-esm-form-builder__ohri-multi-select__errorLabel___wMpTR",list:"-esm-form-builder__ohri-multi-select__list___mCHup"};const a=s},9592:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-number__formField___WwVyG,.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number{margin-top:10px}.-esm-form-builder__ohri-number__formField___WwVyG>div>div>label,.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number>div>div>label{color:#525252}.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number{width:22.313rem;font-size:.875rem}.-esm-form-builder__ohri-number__row___h69AF{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-number__errorLabel___mvtO3 label{color:#da1e28}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/number/ohri-number.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,4HACE,eAAA,CAGF,wJACE,aCyCQ,CDtCV,yEAEE,eAAA,CACA,iBAAA,CAGF,6CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,0DACE,aC0EO",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-number__formField___WwVyG",numberInputWrapper:"-esm-form-builder__ohri-number__numberInputWrapper___hYJc5",row:"-esm-form-builder__ohri-number__row___h69AF",errorLabel:"-esm-form-builder__ohri-number__errorLabel___mvtO3"};const a=s},66168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-radio__formField___TJhLV{margin-top:10px}.-esm-form-builder__ohri-radio__formField___TJhLV>div>div>label{color:#525252}.-esm-form-builder__ohri-radio__row___hgPco{display:flex;flex-direction:row;align-items:center}.-esm-form-builder__ohri-radio__errorLabel___vju38 .cds--form-requirement{display:block;max-height:12.5rem;overflow:visible;font-weight:400;color:#da1e28}.-esm-form-builder__ohri-radio__errorLegend___2DfpY legend{color:#da1e28 !important}.-esm-form-builder__ohri-radio__warningLabel___dJNGl .cds--form-requirement{display:block;max-height:12.5rem;overflow:visible;font-weight:400;color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/radio/ohri-radio.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,kDACE,eAAA,CAGF,gEACE,aCyCQ,CDtCV,4CACE,YAAA,CACA,kBAAA,CACA,kBAAA,CAGF,0EACE,aAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,aC4EO,CDzET,2DACE,wBAAA,CAGF,4EACE,aAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,aCeQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-radio__formField___TJhLV",row:"-esm-form-builder__ohri-radio__row___hgPco",errorLabel:"-esm-form-builder__ohri-radio__errorLabel___vju38",errorLegend:"-esm-form-builder__ohri-radio__errorLegend___2DfpY",warningLabel:"-esm-form-builder__ohri-radio__warningLabel___dJNGl"};const a=s},1943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-dropdown__formField___s7Ka0,.-esm-form-builder__ohri-dropdown__formInputField___yuJep{margin-top:10px}.-esm-form-builder__ohri-dropdown__formField___s7Ka0>div>div>label,.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>label{color:#525252}.-esm-form-builder__ohri-dropdown__formInputField___yuJep{width:auto}.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>label{max-width:auto}.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>div{width:22.313rem !important}.-esm-form-builder__ohri-dropdown__row___TqeJ7{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-dropdown__errorLabel___kwUjk label{color:#da1e28 !important}.-esm-form-builder__ohri-dropdown__dropdown___VDKDG>div div button{border-bottom:1px solid #8d8d8d !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/select/ohri-dropdown.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,+GACE,eAAA,CAGF,2IACE,aCyCQ,CDtCV,0DAEE,UAAA,CAEA,wEACE,cAAA,CAGF,sEACE,0BAAA,CAGJ,+CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,4DACE,wBAAA,CAGF,mEACE,0CAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-dropdown__formField___s7Ka0",formInputField:"-esm-form-builder__ohri-dropdown__formInputField___yuJep",row:"-esm-form-builder__ohri-dropdown__row___TqeJ7",errorLabel:"-esm-form-builder__ohri-dropdown__errorLabel___kwUjk",dropdown:"-esm-form-builder__ohri-dropdown__dropdown___VDKDG"};const a=s},53162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-text-area__textInputOverrides___ci1ne>div>div{width:22.313rem}.-esm-form-builder__ohri-text-area__errorLabel___de7hv label{color:#da1e28 !important}.-esm-form-builder__ohri-text-area__formField___p6sqf{margin-top:10px}.-esm-form-builder__ohri-text-area__formField___p6sqf>div>div>label{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/text-area/ohri-text-area.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uEACE,eAAA,CAGF,6DACE,wBAAA,CAGF,sDACE,eAAA,CAGF,oEACE,aCiCQ",sourceRoot:""}]),s.locals={textInputOverrides:"-esm-form-builder__ohri-text-area__textInputOverrides___ci1ne",errorLabel:"-esm-form-builder__ohri-text-area__errorLabel___de7hv",formField:"-esm-form-builder__ohri-text-area__formField___p6sqf"};const a=s},39891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-text__formField___yVOKF{margin-top:10px}.-esm-form-builder__ohri-text__formField___yVOKF>div>div>label{color:#525252}.-esm-form-builder__ohri-text__row___PndHa{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-text__textInputOverrides___GTSpQ>div>div{width:22.313rem}.-esm-form-builder__ohri-text__errorLabel___oH8vr label{color:#da1e28 !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/text/ohri-text.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,iDACE,eAAA,CAGF,+DACE,aCyCQ,CDtCV,2CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,kEACE,eAAA,CAGF,wDACE,wBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-text__formField___yVOKF",row:"-esm-form-builder__ohri-text__row___PndHa",textInputOverrides:"-esm-form-builder__ohri-text__textInputOverrides___GTSpQ",errorLabel:"-esm-form-builder__ohri-text__errorLabel___oH8vr"};const a=s},44491:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-toggle__formField___GmqAk{margin-top:10px}.-esm-form-builder__ohri-toggle__formField___GmqAk>div>div>label{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/toggle/ohri-toggle.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,mDACE,eAAA,CAGF,iEACE,aCyCQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-toggle__formField___GmqAk"};const a=s},62416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-unspecified__unspecified___htLwq>div label{font-size:12px;color:#525252;padding-bottom:1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/unspecified/ohri-unspecified.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,oEACE,cAAA,CACA,aC4CQ,CD3CR,mBAAA",sourceRoot:""}]),s.locals={unspecified:"-esm-form-builder__ohri-unspecified__unspecified___htLwq"};const a=s},14018:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-label__label___XS0tg{width:auto !important}.-esm-form-builder__ohri-label__label___XS0tg .cds--assistive-text{max-width:30rem !important;font-size:.75rem;white-space:pre-line !important}.-esm-form-builder__ohri-label__label___XS0tg .cds--label{font-weight:bolder}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/label/ohri-label.scss"],names:[],mappings:"AACA,8CACE,qBAAA,CAEA,mEACE,0BAAA,CACA,gBAAA,CACA,+BAAA,CAGF,0DACE,kBAAA",sourceRoot:""}]),s.locals={label:"-esm-form-builder__ohri-label__label___XS0tg"};const a=s},53540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,'.-esm-form-builder__linear-loader__linearActivity___GkfeQ{overflow:hidden;width:100%;height:4px;background-color:var(--brand-03);margin-top:0px}.-esm-form-builder__linear-loader__determinate___fzhk9{position:relative;max-width:100%;height:100%;-webkit-transition:width 500ms ease-out 1s;-moz-transition:width 500ms ease-out 1s;-o-transition:width 500ms ease-out 1s;transition:width 500ms ease-out 1s;background-color:var(--brand-02)}.-esm-form-builder__linear-loader__indeterminate___nms4d{position:relative;width:100%;height:100%}.-esm-form-builder__linear-loader__indeterminate___nms4d:before{content:"";position:absolute;height:100%;background-color:var(--brand-02);animation:-esm-form-builder__linear-loader__indeterminate_first___Sa5cF 2.5s infinite ease-out}.-esm-form-builder__linear-loader__indeterminate___nms4d:after{content:"";position:absolute;height:100%;background-color:var(--brand-01);animation:-esm-form-builder__linear-loader__indeterminate_second___YdRgo 2.5s infinite ease-in}@keyframes -esm-form-builder__linear-loader__indeterminate_first___Sa5cF{0%{left:-100%;width:100%}100%{left:100%;width:10%}}@keyframes -esm-form-builder__linear-loader__indeterminate_second___YdRgo{0%{left:-150%;width:100%}100%{left:100%;width:10%}}',"",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/loaders/linear-loader.scss"],names:[],mappings:"AAAA,0DACC,eAAA,CACA,UAAA,CACA,UAAA,CACA,gCAAA,CACA,cAAA,CAGD,uDACC,iBAAA,CACA,cAAA,CACA,WAAA,CACA,0CAAA,CACA,uCAAA,CACA,qCAAA,CACA,kCAAA,CACA,gCAAA,CAGD,yDACC,iBAAA,CACA,UAAA,CACA,WAAA,CAGD,gEACC,UAAA,CACA,iBAAA,CACA,WAAA,CACA,gCAAA,CACA,8FAAA,CAGD,+DACC,UAAA,CACA,iBAAA,CACA,WAAA,CACA,gCAAA,CACA,8FAAA,CAGD,yEACC,GACC,UAAA,CACA,UAAA,CAED,KACC,SAAA,CACA,SAAA,CAAA,CAIF,0EACC,GACC,UAAA,CACA,UAAA,CAED,KACC,SAAA,CACA,SAAA,CAAA",sourceRoot:""}]),s.locals={linearActivity:"-esm-form-builder__linear-loader__linearActivity___GkfeQ",determinate:"-esm-form-builder__linear-loader__determinate___fzhk9",indeterminate:"-esm-form-builder__linear-loader__indeterminate___nms4d",indeterminate_first:"-esm-form-builder__linear-loader__indeterminate_first___Sa5cF",indeterminate_second:"-esm-form-builder__linear-loader__indeterminate_second___YdRgo"};const a=s},19714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__loading__centerLoadingSVG___XVNCz{display:flex;width:100vw;height:100vh;justify-content:center;align-items:center}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/loaders/loading.scss"],names:[],mappings:"AAAA,sDACE,YAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={centerLoadingSVG:"-esm-form-builder__loading__centerLoadingSVG___XVNCz"};const a=s},3210:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-form-page__divider___hM2dm{background-color:rgba(107,104,104,.5);margin:25px 0}.-esm-form-builder__ohri-form-page__pageContent___MA2cC:last-child>hr{display:none}.-esm-form-builder__ohri-form-page__pageHeader___gRicT{display:flex;flex-direction:row;margin:.5rem 1rem}.-esm-form-builder__ohri-form-page__pageTitle___ULWs1{font-size:1.25rem;font-weight:600;line-height:1.4;color:#161616;width:100%}.-esm-form-builder__ohri-form-page__required___E9Rsu{margin:.25rem 27rem .5rem 0;font-size:.875rem;line-height:1.29;letter-spacing:.16px;color:#525252;width:100%}.-esm-form-builder__ohri-form-page__formSection___DQghF{flex:1 1 65%}.-esm-form-builder__ohri-form-page__formSection___DQghF>div>fieldset{margin-bottom:0 !important}.-esm-form-builder__ohri-form-page__collapseToggle___YRCmP{margin-Left:-180px;margin-bottom:20px;margin-top:-10px}.-esm-form-builder__ohri-form-page__sectionContent___fW_BX>div{background-color:#f4f4f4}.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div input,.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div textarea,.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div dropdown,.-esm-form-builder__ohri-form-page__formSection___DQghF .cds--dropdown button{background-color:#fff !important}@media(min-width: 640px){.cds--accordion__content{padding-right:2rem !important}}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/page/ohri-form-page.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,oDACE,qCAAA,CACA,aAAA,CAGF,sEACE,YAAA,CAGF,uDACE,YAAA,CACA,kBAAA,CACA,iBAAA,CAGF,sDACE,iBAAA,CACA,eAAA,CACA,eAAA,CACA,aC8BS,CD7BT,UAAA,CAGF,qDACE,2BAAA,CACA,iBAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCkBQ,CDjBR,UAAA,CAGF,wDACE,YAAA,CAGF,qEACE,0BAAA,CAGF,2DACE,kBAAA,CACA,kBAAA,CACA,gBAAA,CAGF,+DACE,wBCPQ,CDUV,kTAIE,gCAAA,CAGF,yBACE,yBACE,6BAAA,CAAA",sourceRoot:""}]),s.locals={divider:"-esm-form-builder__ohri-form-page__divider___hM2dm",pageContent:"-esm-form-builder__ohri-form-page__pageContent___MA2cC",pageHeader:"-esm-form-builder__ohri-form-page__pageHeader___gRicT",pageTitle:"-esm-form-builder__ohri-form-page__pageTitle___ULWs1",required:"-esm-form-builder__ohri-form-page__required___E9Rsu",formSection:"-esm-form-builder__ohri-form-page__formSection___DQghF",collapseToggle:"-esm-form-builder__ohri-form-page__collapseToggle___YRCmP",sectionContent:"-esm-form-builder__ohri-form-page__sectionContent___fW_BX"};const a=s},59428:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__patient-banner__patientBannerContainer___r99qe{display:flex;width:100%;position:sticky;flex-direction:row;align-items:baseline;padding:0}.-esm-form-builder__patient-banner__patientBannerContainer___r99qe>div{width:100%}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/patient-banner/patient-banner.scss"],names:[],mappings:"AAAA,mEACE,YAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,oBAAA,CACA,SAAA,CAGF,uEACE,UAAA",sourceRoot:""}]),s.locals={patientBannerContainer:"-esm-form-builder__patient-banner__patientBannerContainer___r99qe"};const a=s},25581:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__previous-value-review__formField___SID6y{margin-left:2rem;max-width:19rem}.-esm-form-builder__previous-value-review__formField___SID6y>div>div>label{color:#525252}.-esm-form-builder__previous-value-review__row___e5GtS{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__previous-value-review__reuseButton___gPowO{margin-left:3rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/previous-value-review/previous-value-review.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,gBAAA,CACA,eAAA,CAEA,2EACE,aCyCM,CDrCV,uDACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,+DACE,gBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__previous-value-review__formField___SID6y",row:"-esm-form-builder__previous-value-review__row___e5GtS",reuseButton:"-esm-form-builder__previous-value-review__reuseButton___gPowO"};const a=s},36475:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-repeat__boldLegend___SZclb>legend{font-weight:bolder}.-esm-form-builder__ohri-repeat__flexColumn___kX35D,.-esm-form-builder__ohri-repeat__removeButton___Zqm_4{display:flex;flex-direction:column;margin-right:2.5rem;flex:1}.-esm-form-builder__ohri-repeat__removeButton___Zqm_4{padding-top:1.2rem;margin-left:.5rem}.-esm-form-builder__ohri-repeat__obsGroupContainer___NKvCf{margin:1rem 0rem}.-esm-form-builder__ohri-repeat__separator___q7dYW{border-top:1px solid #bbb;margin-bottom:2rem;width:85%;float:left}.-esm-form-builder__ohri-repeat__container___wf9vK{margin-top:.65rem;margin-bottom:2rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/repeat/ohri-repeat.scss"],names:[],mappings:"AAAA,2DACE,kBAAA,CAGF,0GACE,YAAA,CACA,qBAAA,CACA,mBAAA,CACA,MAAA,CAGF,sDAEE,kBAAA,CACA,iBAAA,CAGF,2DACE,gBAAA,CAGF,mDACE,yBAAA,CACA,kBAAA,CACA,SAAA,CACA,UAAA,CAGF,mDACE,iBAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={boldLegend:"-esm-form-builder__ohri-repeat__boldLegend___SZclb",flexColumn:"-esm-form-builder__ohri-repeat__flexColumn___kX35D",removeButton:"-esm-form-builder__ohri-repeat__removeButton___Zqm_4",obsGroupContainer:"-esm-form-builder__ohri-repeat__obsGroupContainer___NKvCf",separator:"-esm-form-builder__ohri-repeat__separator___q7dYW",container:"-esm-form-builder__ohri-repeat__container___wf9vK"};const a=s},7358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-form-section__section___A0nPs{border-radius:solid 1px rgba(107,104,104,.5);margin-bottom:3.063rem}.-esm-form-builder__ohri-form-section__sectionTitle___HjV16{max-width:200px;font-size:1rem;font-weight:600;line-height:1.38;color:#525252;margin-bottom:.5rem}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1{margin-top:1.438rem;width:90%}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1 .cds--fieldset{margin-bottom:0}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1>div{margin-bottom:1rem}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1 .cds--label{text-align:left}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/section/ohri-form-section.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uDACE,4CAAA,CACA,sBAAA,CAGF,4DACE,eAAA,CACA,cAAA,CACA,eAAA,CACA,gBAAA,CACA,aCoCQ,CDnCR,mBAAA,CAGF,gEACE,mBAAA,CACA,SAAA,CAKF,+EACE,eAAA,CAGF,oEACE,kBAAA,CAGF,4EACE,eAAA",sourceRoot:""}]),s.locals={section:"-esm-form-builder__ohri-form-section__section___A0nPs",sectionTitle:"-esm-form-builder__ohri-form-section__sectionTitle___HjV16",sectionContainer:"-esm-form-builder__ohri-form-section__sectionContainer___R6re1"};const a=s},39855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9{width:12rem;min-height:8rem;overscroll-behavior:contain;margin-right:1rem}.-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy{max-height:100%}.-esm-form-builder__ohri-form-sidebar__sidenavActions___uBQf8{margin-left:.6rem}@media all and (device-width: 600px)and (device-height: 1024px)and (orientation: portrait){.-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9{width:11rem;max-height:500px;margin-right:20px;position:fixed}.-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy{max-Height:200px;overflow-y:scroll}}.-esm-form-builder__ohri-form-sidebar__link___LYFku{margin:.375rem 0 .375rem .5rem;font-size:1rem;line-height:1.43;letter-spacing:.16px;color:#161616;cursor:pointer}.-esm-form-builder__ohri-form-sidebar__link___LYFku:hover{outline:none}.-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe,.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ,.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q,.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm{border-left:.5rem solid var(--brand-03);height:2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:.25rem .5rem;background-color:#fff;cursor:pointer}.-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm:hover{background-color:#f4f4f4}.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm{font-weight:600;background-color:#e0e0e0}.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q{border-left:.5rem solid var(--brand-02);background-color:#defbe6}.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ{border-left:.5rem solid #da1e28;color:#a2191f !important;background-color:#ffd7d9}.-esm-form-builder__ohri-form-sidebar__sidebarSectionErrorActive___rkwXm{border-left:.5rem solid #da1e28;font-weight:600;color:#a2191f !important;background-color:#ffd7d9}.-esm-form-builder__ohri-form-sidebar__sidebarSectionLink___N1R3m{font-size:.875rem;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:.16px;color:#161616}.-esm-form-builder__ohri-form-sidebar__sideBarHorizontalLine___EIsSG{margin-top:1.5rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/sidebar/ohri-form-sidebar.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uDACE,WAAA,CACA,eAAA,CACA,2BAAA,CACA,iBAAA,CAGF,2DACE,eAAA,CAGF,8DACE,iBAAA,CAGF,2FACE,uDACE,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,cAAA,CAGF,2DACE,gBAAA,CACA,iBAAA,CAAA,CAIJ,oDACE,8BAAA,CACA,cAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCeS,CDdT,cAAA,CAEA,0DACE,YAAA,CAIJ,uQACE,uCAAA,CACA,WAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,oBAAA,CACA,qBCuEQ,CDtER,cAAA,CAEA,+RACE,wBCbM,CDiBV,oEAEE,eAAA,CACA,wBCnBQ,CDsBV,kEAEE,uCAAA,CACA,wBChBS,CDmBX,mEAEE,+BAAA,CACA,wBAAA,CACA,wBCkBO,CDfT,yEACE,+BAAA,CACA,eAAA,CACA,wBAAA,CACA,wBCWO,CDRT,kEACE,iBAAA,CACA,mBAAA,CACA,iBAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCxCS,CD2CX,qEACE,iBAAA",sourceRoot:""}]),s.locals={sidebar:"-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9",sidebarList:"-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy",sidenavActions:"-esm-form-builder__ohri-form-sidebar__sidenavActions___uBQf8",link:"-esm-form-builder__ohri-form-sidebar__link___LYFku",sidebarSection:"-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe",sidebarSectionError:"-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ",sidebarSectionDone:"-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q",sidebarSectionActive:"-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm",sidebarSectionErrorActive:"-esm-form-builder__ohri-form-sidebar__sidebarSectionErrorActive___rkwXm",sidebarSectionLink:"-esm-form-builder__ohri-form-sidebar__sidebarSectionLink___N1R3m",sideBarHorizontalLine:"-esm-form-builder__ohri-form-sidebar__sideBarHorizontalLine___EIsSG"};const a=s},38388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-value__value___GWkBB,.-esm-form-builder__ohri-value__item___spDzw,.-esm-form-builder__ohri-value__empty___l0amb{font-size:.875rem;font-weight:600}.-esm-form-builder__ohri-value__empty___l0amb{color:#c6c6c6}.-esm-form-builder__ohri-value__item___spDzw{margin-bottom:.5rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/value/ohri-value.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,yIACE,iBAAA,CACA,eAAA,CAGF,8CAEE,aCmCQ,CDhCV,6CAEE,mBAAA",sourceRoot:""}]),s.locals={value:"-esm-form-builder__ohri-value__value___GWkBB",item:"-esm-form-builder__ohri-value__item___spDzw",empty:"-esm-form-builder__ohri-value__empty___l0amb"};const a=s},93481:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-field-value-view__formField___zfyY6{margin-top:10px}.-esm-form-builder__ohri-field-value-view__formField___zfyY6>div>div>label{color:#525252}.-esm-form-builder__ohri-field-value-view__readonly___GxZ2l{border-bottom:.5px #c6c6c6;border-style:solid}.-esm-form-builder__ohri-field-value-view__readonly___GxZ2l>div{padding-bottom:7px !important}.-esm-form-builder__ohri-field-value-view__value___czNwR{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/value/view/ohri-field-value-view.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,eAAA,CAGF,2EACE,aCyCQ,CDtCV,4DACE,0BAAA,CACA,kBAAA,CAGF,gEACE,6BAAA,CAGF,yDACE,aC4BQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-field-value-view__formField___zfyY6",readonly:"-esm-form-builder__ohri-field-value-view__readonly___GxZ2l",value:"-esm-form-builder__ohri-field-value-view__value___czNwR"};const a=s},83937:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74263),i=n.n(r),o=n(23238),s=n.n(o)()(i());s.push([e.id,".-esm-form-builder__ohri-form__ohriForm___ffj6r{height:100%;overflow:hidden;flex-grow:1}.-esm-form-builder__ohri-form__ohriFormContainer___pDKKY{display:-webkit-flex;height:100%;overflow-y:hidden;flex-direction:column}.-esm-form-builder__ohri-form__ohriFormBody___TlYni,.-esm-form-builder__ohri-form__loader___QVkQ_{display:-webkit-flex;flex-direction:row;height:100%}.-esm-form-builder__ohri-form__loader___QVkQ_{height:1rem}.-esm-form-builder__ohri-form__ohriFormContainer___pDKKY .cds--label{font-size:.875rem;width:18rem}.-esm-form-builder__ohri-form__formContent___Shu_B{height:calc(100vh - 6rem);margin:0;flex-basis:65%;flex-grow:1;flex-shrink:1;position:relative;overflow-y:hidden;display:flex;flex-direction:column}.-esm-form-builder__ohri-form__formContentBody___KhGka{overflow-y:auto;width:inherit;position:sticky}.-esm-form-builder__ohri-form__minifiedFormContentBody___YpxHU{margin-bottom:3rem !important}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8{width:100%;height:63.5px;position:absolute;bottom:0}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8 .cds--btn{max-width:50%;height:3.9rem}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8>button{width:50%}.-esm-form-builder__ohri-form__markdownContainer___rYHzz{padding:1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/ohri-form.scss"],names:[],mappings:"AAAA,gDACE,WAAA,CACA,eAAA,CACA,WAAA,CAGF,yDACE,oBAAA,CACA,WAAA,CACA,iBAAA,CACA,qBAAA,CAGF,kGACE,oBAAA,CACA,kBAAA,CACA,WAAA,CAGF,8CAEE,WAAA,CAGF,qEACE,iBAAA,CACA,WAAA,CAGF,mDACE,yBAAA,CACA,QAAA,CACA,cAAA,CACA,WAAA,CACA,aAAA,CACA,iBAAA,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CAGF,uDACE,eAAA,CACA,aAAA,CACA,eAAA,CAGF,+DACE,6BAAA,CAGF,uDACE,UAAA,CACA,aAAA,CACA,iBAAA,CACA,QAAA,CAGF,iEACE,aAAA,CACA,aAAA,CAGF,8DACE,SAAA,CAGF,yDACE,YAAA",sourceRoot:""}]),s.locals={ohriForm:"-esm-form-builder__ohri-form__ohriForm___ffj6r",ohriFormContainer:"-esm-form-builder__ohri-form__ohriFormContainer___pDKKY",ohriFormBody:"-esm-form-builder__ohri-form__ohriFormBody___TlYni",loader:"-esm-form-builder__ohri-form__loader___QVkQ_",formContent:"-esm-form-builder__ohri-form__formContent___Shu_B",formContentBody:"-esm-form-builder__ohri-form__formContentBody___KhGka",minifiedFormContentBody:"-esm-form-builder__ohri-form__minifiedFormContentBody___YpxHU",minifiedButtons:"-esm-form-builder__ohri-form__minifiedButtons___JkZB8",markdownContainer:"-esm-form-builder__ohri-form__markdownContainer___rYHzz"};const a=s},2953:(e,t,n)=>{e.exports=n.p+"caf7d94a2203e1043033c984f6992522.js"},65542:(e,t,n)=>{e.exports=n.p+"41689a5d9e6af3d0cff07fc4f61c7741.js"},37220:(e,t,n)=>{e.exports=n.p+"ffd89ca886ec22fc443527b8e296f194.js"},7138:(e,t,n)=>{e.exports=n.p+"b55d59b61ecd4e3c1f459afc71cde110.js"},52835:(e,t,n)=>{e.exports=n.p+"e0c4ac848089e5c58f89dbe01c1b8e16.js"},99756:(e,t,n)=>{e.exports=n.p+"5e2b739f50121f961d6a608a25bac400.js"},78831:(e,t,n)=>{e.exports=n.p+"07103c76673893268265c7aab199aae1.js"},10795:(e,t,n)=>{e.exports=n.p+"8b971d3d6052ff5c0e68ab6462ef6cd6.js"},43336:(e,t,n)=>{e.exports=n.p+"802f0388ed0024f6e66263e0b5d0719a.js"},45706:(e,t,n)=>{e.exports=n.p+"4c05271259c1159639ee548ba4f5db32.js"},17029:(e,t,n)=>{e.exports=n.p+"d1f62a0a43a41516c0636fa22c057252.js"},61607:(e,t,n)=>{e.exports=n.p+"ce19b4994fcd8ca22b29fab21d4b887c.js"},43341:(e,t,n)=>{e.exports=n.p+"23a7bca708b6dd829842fb64fef25535.js"},91221:(e,t,n)=>{e.exports=n.p+"7b2b5c33a232707fb5a0fd741e20db5c.js"},95567:(e,t,n)=>{e.exports=n.p+"be32351e3981e946b0468d965089d295.js"},36529:(e,t,n)=>{e.exports=n.p+"b05cf76e96066eb785c2e4a333d10502.js"},91786:(e,t,n)=>{e.exports=n.p+"167b0afd6e3ff50e5b499d519d8e6792.js"},34180:(e,t,n)=>{e.exports=n.p+"92ed6269f1e4ce2610392f8f0945f52d.js"},19138:(e,t,n)=>{e.exports=n.p+"a5a1f783ff112ea78b48e0f07b172d64.js"},23824:(e,t,n)=>{e.exports=n.p+"3141746d89d6a058ee2518184f06a3d6.js"},35930:(e,t,n)=>{e.exports=n.p+"3550cd24b3559ac6d79547d281e69d0e.js"},86498:(e,t,n)=>{e.exports=n.p+"e0c308552c48432f7bd89ec9ba28d183.js"},33431:(e,t,n)=>{e.exports=n.p+"f9d6d4dd0d5e07cbe6f5bb84c9a69ac0.js"},33925:(e,t,n)=>{e.exports=n.p+"5e03d4224ff478eaa9c9547f404d82d4.js"},15544:(e,t,n)=>{e.exports=n.p+"38683fcaa70649d0dae69b747b2e1bf9.js"},7566:(e,t,n)=>{e.exports=n.p+"f0eb765fcae23f9c9e69720cc5792065.js"},65733:(e,t,n)=>{e.exports=n.p+"8f8e16fca6bb136e854210476076db56.js"},7284:(e,t,n)=>{e.exports=n.p+"a2ec46920acdb513b03ba411ead28885.js"},7384:(e,t,n)=>{e.exports=n.p+"f39cf22d6697799be9b3980f31dae6dc.js"},37479:(e,t,n)=>{e.exports=n.p+"556faa7d6efae8565176196a890ea7b0.js"},83823:(e,t,n)=>{e.exports=n.p+"c40a219840accebc2ac9279469aa2386.js"},36567:(e,t,n)=>{e.exports=n.p+"2a15ecbbf94668d5032766a982c126f9.js"},34169:(e,t,n)=>{e.exports=n.p+"d0669ef826c35ba40e1c945d5d6e05b7.js"},65105:(e,t,n)=>{e.exports=n.p+"eaed0eb2c63a823402e51a4b4e14adef.js"},57381:(e,t,n)=>{e.exports=n.p+"a3ad0e0d06864aeab9c581f22f0e464f.js"},20948:(e,t,n)=>{e.exports=n.p+"a5437770d94ec8751475e4fbbee929e7.js"},27815:(e,t,n)=>{e.exports=n.p+"f9c1a2801cd8f99e9876e8b5323d821a.js"},31409:(e,t,n)=>{e.exports=n.p+"4870dabb22e3487ac074dd4ac616ea70.js"},51751:(e,t,n)=>{e.exports=n.p+"25471243aa447690bb0a12c162a7c9f3.js"},71727:(e,t,n)=>{e.exports=n.p+"91a54f7ec8712c253c321fa8c0ecea88.js"},90437:(e,t,n)=>{e.exports=n.p+"f86ac61532228ef0d66a69983485644c.js"},62353:(e,t,n)=>{e.exports=n.p+"9335adaad37ca2c73c753914494308de.js"},48699:(e,t,n)=>{e.exports=n.p+"c6503659d041a4dd26e088419b7395e8.js"},11437:(e,t,n)=>{e.exports=n.p+"32a3943be6e7ca22331dcd8e3ad467db.js"},80987:(e,t,n)=>{e.exports=n.p+"ac768a5ded60bd4ac64b9239f0a96d7a.js"},75661:(e,t,n)=>{e.exports=n.p+"49b28e4acd11db2c46f0d414dd9ec3f0.js"},22204:(e,t,n)=>{e.exports=n.p+"6f36b59f6a2607bacd313472af372bcf.js"},78023:(e,t,n)=>{e.exports=n.p+"541848729340f824b4fd58662a3d2624.js"},94747:(e,t,n)=>{e.exports=n.p+"dfb26d6490fe3c6c70810cd356715f96.js"},94763:(e,t,n)=>{e.exports=n.p+"4150406c2a8177be60c084a1ed117241.js"},11845:(e,t,n)=>{e.exports=n.p+"b9da183e6c2fa1107ca574be8f7c44be.js"},43084:(e,t,n)=>{e.exports=n.p+"b3e4f816d6e363d03f04986eed11baac.js"},93019:(e,t,n)=>{e.exports=n.p+"5f235dd97a6dfd82a290f0aae894ef81.js"},91451:(e,t,n)=>{e.exports=n.p+"478e630c8929a7549303e2705a9f8bbc.js"},73039:(e,t,n)=>{e.exports=n.p+"cf3a033ad3f0dcd46f7580c243ac2b13.js"},53204:(e,t,n)=>{e.exports=n.p+"2d0b123ac70fe6e7499bf12ab8f80a98.js"},32793:(e,t,n)=>{e.exports=n.p+"1ba86d41cb77831f58d062ecc1af36fa.js"},81037:(e,t,n)=>{e.exports=n.p+"eef950456228796815ecb8918a510a37.js"},32489:(e,t,n)=>{e.exports=n.p+"4ec1d3e105e2e77c385ef7abcfaa3483.js"},86916:(e,t,n)=>{e.exports=n.p+"5f12711459efb0424af2bf5b65e725ea.js"},66124:(e,t,n)=>{e.exports=n.p+"3a35ac6f058e5155704b91f9c956057c.js"},85097:(e,t,n)=>{e.exports=n.p+"32556b05939b88e8fa0c577b331cfe33.js"},46961:(e,t,n)=>{e.exports=n.p+"12aace2834b1246f00fb238244461fe5.js"},91111:(e,t,n)=>{e.exports=n.p+"1685c713bda1ad4fc64a810fef807bfe.js"},78847:(e,t,n)=>{e.exports=n.p+"47809c9cae441cc910caf95d7d4fb526.js"},88247:(e,t,n)=>{e.exports=n.p+"a8a79f6ae1a5aa39029a2919799b5309.js"},84627:(e,t,n)=>{e.exports=n.p+"2385f32cb99588bf4a2a70218526b954.js"},68857:(e,t,n)=>{e.exports=n.p+"0635009c2adfb1e135ac863ecd69ea49.js"},89738:(e,t,n)=>{e.exports=n.p+"a185873f7503e2298b6a3aa624a04569.js"},54311:(e,t,n)=>{e.exports=n.p+"4169f7b17c20c7eae468129e153f2831.js"},23351:(e,t,n)=>{e.exports=n.p+"9334a3d022d77446a57a1ff9c514aac1.js"},43309:(e,t,n)=>{e.exports=n.p+"fe9aaa2e8278cf7e57935cb3ef71d96a.js"},28877:(e,t,n)=>{e.exports=n.p+"ed8784024211fef3a64090500873ce19.js"},22881:(e,t,n)=>{e.exports=n.p+"1308ddebe6d58476be729b4f1188e4fb.js"},31246:(e,t,n)=>{e.exports=n.p+"f6967e9c55fc7dae7209a3ce453cc6e1.js"},38039:(e,t,n)=>{e.exports=n.p+"a96eb1125446d8f9aeab0aad57345a54.js"},62345:(e,t,n)=>{e.exports=n.p+"8142d98f172436913834303ddb297614.js"},93720:(e,t,n)=>{e.exports=n.p+"2ede631ad9ede0c4b9d307b8b9ddb788.js"},15002:(e,t,n)=>{e.exports=n.p+"aedbd0d4b40dc5af28b49e09d364a193.js"},10263:(e,t,n)=>{e.exports=n.p+"eaf5a4f6728ec24ff6800d92d8cb8399.js"},46784:(e,t,n)=>{e.exports=n.p+"22b1c7623861a82912a440d6d363fece.js"},56908:(e,t,n)=>{e.exports=n.p+"e6603fcc635fd13832371cbac8e92b4c.js"},95323:(e,t,n)=>{e.exports=n.p+"02a7b71c33ab537969ad793fdbff0c4b.js"},87733:(e,t,n)=>{e.exports=n.p+"1851a916a9f56640b6b147a7a6fcb39c.js"},17954:(e,t,n)=>{e.exports=n.p+"2345dd4d36dc8faedd4a26916c0e1d1d.js"},39716:(e,t,n)=>{e.exports=n.p+"6b8e6bb024cbf000ec92201f2f5fb41c.js"},33192:(e,t,n)=>{e.exports=n.p+"1ad04c0d4599fb3d75c4bbe65c239445.js"},44483:(e,t,n)=>{e.exports=n.p+"f674f96d229dfd26c71d057bce911f74.js"},65440:(e,t,n)=>{e.exports=n.p+"656394060cd2a2744bd38f196014ad34.js"},40412:(e,t,n)=>{e.exports=n.p+"93d3f5bfff644c1da9c1d2f1f36dee48.js"},75155:(e,t,n)=>{e.exports=n.p+"7b32f4e832ff98adb867947ea419dcd7.js"},69229:(e,t,n)=>{e.exports=n.p+"6705bf98a0601eefd8dadf2548c113a9.js"},49385:(e,t,n)=>{e.exports=n.p+"3d5697c8b4e3dd36924786e5cafde3b2.js"},10285:(e,t,n)=>{e.exports=n.p+"efa15ef2b1745cd75ca9838b6c75e3b0.js"},4482:(e,t,n)=>{e.exports=n.p+"846c188abd1e1d001f108325a45e4fcf.js"},98887:(e,t,n)=>{e.exports=n.p+"395af523c1cfad2a48126a4d14a24f62.js"},47623:(e,t,n)=>{e.exports=n.p+"818637b7c928e96140b4165ec1a28716.js"},26862:(e,t,n)=>{e.exports=n.p+"005c31cb8e74f2861d2dd89daa445c97.js"},17586:(e,t,n)=>{e.exports=n.p+"c02ef4937a43a41fef6a664df26b51a1.js"},36034:(e,t,n)=>{e.exports=n.p+"88dfa0504a90d969288208f06243a51b.js"},60211:(e,t,n)=>{e.exports=n.p+"58f526236e8823b56df3e12fd7486ade.js"},48756:(e,t,n)=>{e.exports=n.p+"1bc8f889c5604fc9af39dba9e7c76ecc.js"},86522:(e,t,n)=>{e.exports=n.p+"2e07d0d151407017a37dce22291584b7.js"},45483:(e,t,n)=>{e.exports=n.p+"2df3b40f4dc6a6cd7008b133ab96c7fa.js"},58819:(e,t,n)=>{e.exports=n.p+"d0ad842b7ad3dc97e62aca89851125e1.js"},91032:(e,t,n)=>{e.exports=n.p+"065cca5ee44499ad0b3303676081e6e0.js"},86969:(e,t,n)=>{e.exports=n.p+"e1d9b91d4e4b506ea97e0107064c4e2e.js"},44134:(e,t,n)=>{e.exports=n.p+"34fcb3fcad48b021dadac1437a7c3897.js"},93955:(e,t,n)=>{e.exports=n.p+"a62c838b216053594fbeaab1fa43affb.js"},61527:(e,t,n)=>{e.exports=n.p+"20add0a08bcdbf1b9e603d0886fe7bdd.js"},3519:(e,t,n)=>{e.exports=n.p+"9b4e7a533e32c15ff067e8e556ad7361.js"},43442:(e,t,n)=>{e.exports=n.p+"cc96174f117f0b6eb9956e15cd5fdca4.js"},71533:(e,t,n)=>{e.exports=n.p+"ce2289ee0dd8af2c8e45bb02dac31b00.js"},13941:(e,t,n)=>{e.exports=n.p+"3e79a5462c5f3c52f6f9ad46f9630225.js"},92538:(e,t,n)=>{e.exports=n.p+"d8eff8909c2622dda90804e863214bf1.js"},46902:(e,t,n)=>{e.exports=n.p+"7e52c90a575ce1643964f5ce0d7762ce.js"},89356:(e,t,n)=>{e.exports=n.p+"309fa9aa538f0f7660607b7af0ed1457.js"},61794:(e,t,n)=>{e.exports=n.p+"6f6ee9f513b4c047f75cd2a3bfd28fdb.js"},93808:(e,t,n)=>{e.exports=n.p+"88a9f8dd2f1a4f1b7025a0054dc9b6ca.js"},61919:(e,t,n)=>{e.exports=n.p+"f267b21f148c3ea9cf9eee4a00118445.js"},3146:(e,t,n)=>{e.exports=n.p+"34974af8cc6823f8d40e5a797ba0abec.js"},18160:(e,t,n)=>{e.exports=n.p+"c39341975dc2bc05818173a6ad5d30c3.js"},36901:(e,t,n)=>{e.exports=n.p+"a6429ec1a3da3670b6c3f51f89bc9d28.js"},97621:(e,t,n)=>{e.exports=n.p+"b5d974700fd54a5ee73a03f63833d1ba.js"},25368:(e,t,n)=>{e.exports=n.p+"084e043529444adcf514dd6a08c1f256.js"},99438:(e,t,n)=>{e.exports=n.p+"09c3477b38698f5e2a0a350695bf46de.js"},40075:(e,t,n)=>{e.exports=n.p+"e1ea2341a4e2aa61752ab1b891834377.js"},77010:(e,t,n)=>{e.exports=n.p+"60c1727f2176b7cd2e81d88d0c697062.js"},59635:(e,t,n)=>{e.exports=n.p+"8db5a7641a7961a60a06a4580934c6dd.js"},29948:(e,t,n)=>{e.exports=n.p+"c1e56a19505d75095ceca1b05ca0e0a1.js"},20035:(e,t,n)=>{e.exports=n.p+"00dd4105d08d7e0e18acdcdaf67e41e3.js"},7155:(e,t,n)=>{e.exports=n.p+"ed974137d8f716991c9b4e08d0afa958.js"},34236:(e,t,n)=>{e.exports=n.p+"f4522ba422e83e3f5c4831d6a8468b12.js"},72336:(e,t,n)=>{e.exports=n.p+"ab29c54e832cb105d3a1593776c86342.js"},14357:(e,t,n)=>{e.exports=n.p+"5b5adbfb43d512a87f2f776f6a4ef25b.js"},99840:(e,t,n)=>{e.exports=n.p+"c5e66df773dc4a4350c3cf37f77d093f.js"},50373:(e,t,n)=>{e.exports=n.p+"66be1ebd9a5038e7850c73daa4907a6b.js"},882:(e,t,n)=>{e.exports=n.p+"e256e943b111c7cc22b7c881afddd7af.js"},86782:(e,t,n)=>{e.exports=n.p+"aa03d5fe405fad2c95833152cff27ec8.js"},75047:(e,t,n)=>{e.exports=n.p+"8554743ec38eb7620f195a550718d5a5.js"},2379:(e,t,n)=>{e.exports=n.p+"5950799dcc668c14e5a989c1003293f5.js"},28900:(e,t,n)=>{e.exports=n.p+"e046e26707316ee52624b77acb581be0.js"},19418:(e,t,n)=>{e.exports=n.p+"4815b0b811a104227aa9e62ea343a0d7.js"},23447:(e,t,n)=>{e.exports=n.p+"cb1260a4fda6f9ef76810087e7f3d6cc.js"},64863:(e,t,n)=>{e.exports=n.p+"05384955a053e0b3df5788bf1f1c47c0.js"},33871:(e,t,n)=>{e.exports=n.p+"deee5d460e7f8065ff90e8bb59e9bfe7.js"},14969:(e,t,n)=>{e.exports=n.p+"812eebdf5716c798ea06fffa34d697e1.js"},50345:(e,t,n)=>{e.exports=n.p+"f8435c0a7ccad780c7434398b2bc5927.js"},29129:(e,t,n)=>{e.exports=n.p+"6d18a9b02f2615db9c2f77d128b13a4f.js"},57733:(e,t,n)=>{e.exports=n.p+"5e4e9c0dcaa3c0bd7068a8baf4779396.js"},56501:(e,t,n)=>{e.exports=n.p+"2d7dea2e3a6c1d261b6420f45ee5707a.js"},63878:(e,t,n)=>{e.exports=n.p+"f889aaa911d8792732b1d0c27becca35.js"},84686:(e,t,n)=>{e.exports=n.p+"f3622b945264eafeefeefaea0a746fc7.js"},70308:(e,t,n)=>{e.exports=n.p+"cb1208df779495eb92e32b5d05b5b80d.js"},65760:(e,t,n)=>{e.exports=n.p+"fd2abe1cf8ba0bcd9a522a2d8b5d9b7b.js"},49412:(e,t,n)=>{e.exports=n.p+"49023f935822457ab83c0f7d397ea7ad.js"},99671:(e,t,n)=>{e.exports=n.p+"80b2d05f959ace1e4f4bc919b3c47ce9.js"},15113:(e,t,n)=>{e.exports=n.p+"525b09646dafd90d7d64648848eea4b9.js"},46496:(e,t,n)=>{e.exports=n.p+"963fe755e7903232a3dcb1522644baa6.js"},18759:(e,t,n)=>{e.exports=n.p+"afa4cad84a05492e3ffe0e52e0bedaa2.js"},55749:(e,t,n)=>{e.exports=n.p+"74fce469f6fd3a63d06cb096d8cb33c1.js"},80992:(e,t,n)=>{e.exports=n.p+"3f5cbf44c92b64ff5b5a9b4913d42155.js"},71020:(e,t,n)=>{e.exports=n.p+"87455db28e9f83d04423dc021a8c7dfa.js"},40737:(e,t,n)=>{e.exports=n.p+"ebb21b22b0c9daacd007f22e3162f61b.js"},27133:(e,t,n)=>{e.exports=n.p+"6e10b63942da7cad30d6a08ff91bac3d.js"},49075:(e,t,n)=>{e.exports=n.p+"0df524faf129895ba8459a7a31a69558.js"},60157:(e,t,n)=>{e.exports=n.p+"965b93c353728f852661c8d1efb85209.js"},1853:(e,t,n)=>{e.exports=n.p+"c0b7e78a8f6f54ee50b2939de2e84d6c.js"},97339:(e,t,n)=>{e.exports=n.p+"1efcb42302415c59301a8c05a01fa385.js"},25068:(e,t,n)=>{e.exports=n.p+"ce1d1602773687fd1dd9a55525b40c7b.js"},23812:(e,t,n)=>{e.exports=n.p+"348fb09dfded8723b63eeab3bc5d8830.js"},61488:(e,t,n)=>{e.exports=n.p+"db768fe42742d6e81d319913c956e017.js"},30464:(e,t,n)=>{e.exports=n.p+"55ce51ac937ca88dcdf79668d0cdd831.js"},12397:(e,t,n)=>{e.exports=n.p+"a42399a2f62bdefb8f04a5138f565c07.js"},28731:(e,t,n)=>{e.exports=n.p+"5cb4882ff2a9eac36722d5eb9a87bdbd.js"},641:(e,t,n)=>{e.exports=n.p+"c95b5aae2a7034beef4c710d0a671c81.js"},4635:(e,t,n)=>{e.exports=n.p+"6a15a7059a563e7571563c6cf97e5ae0.js"},54007:(e,t,n)=>{e.exports=n.p+"0aeba5a0f56905f54200eb5d31a8dab9.js"},41960:(e,t,n)=>{e.exports=n.p+"f3b2a9746d4453410b186023c67f6fcd.js"},32423:(e,t,n)=>{e.exports=n.p+"6fd6566f8a8967f9ca4c8bcb1e734997.js"},70194:(e,t,n)=>{e.exports=n.p+"e7c296bf3f2956fd992ae291bc996874.js"},68629:(e,t,n)=>{e.exports=n.p+"07bfb0460df5f49069dcb9ba7b1002dc.js"},15639:(e,t,n)=>{e.exports=n.p+"cdf05b749173b3567d45237bdc483aba.js"},39054:(e,t,n)=>{e.exports=n.p+"4c7f4a2b8de71b12302a21ab877e46c1.js"},4351:(e,t,n)=>{e.exports=n.p+"763a3d47c0a5b4dafc578271d1dbe5a2.js"},97862:(e,t,n)=>{e.exports=n.p+"f92bda44d35d6d04a7e25bf28d13e36d.js"},46009:(e,t,n)=>{e.exports=n.p+"f0d3dcd6fbf614d12538c7eb85ad763e.js"},47778:(e,t,n)=>{e.exports=n.p+"5b72acc5c17379677d11d7b808e319c7.js"},12820:(e,t,n)=>{e.exports=n.p+"32a86184cc8cdd428d7f4f51e197790e.js"},58376:(e,t,n)=>{e.exports=n.p+"98fefcba0e57063d438ab1624b88500d.js"},44508:(e,t,n)=>{e.exports=n.p+"2ba569d70299b323599337fc68fee345.js"},45189:(e,t,n)=>{e.exports=n.p+"bc67e419b0625f91e533f751c7862814.js"},62714:(e,t,n)=>{e.exports=n.p+"776bff2acdfb0f49119be89204852659.js"},60480:(e,t,n)=>{e.exports=n.p+"a40a76889417789c4deadad7e56fe347.js"},48198:(e,t,n)=>{e.exports=n.p+"137005a5052584b4d8f9beb2a1d2eba1.js"},6902:(e,t,n)=>{e.exports=n.p+"0c63f19f512adc1320834773a9aede2a.js"},27007:(e,t,n)=>{e.exports=n.p+"9b5591231cdcb0a8bf42d91bc832961c.js"},50758:(e,t,n)=>{e.exports=n.p+"e535b8bffd2a2d7b799b87bee8b19b68.js"},15322:(e,t,n)=>{e.exports=n.p+"b97a611d29e4ad702ea774406c81f0c7.js"},69660:(e,t,n)=>{e.exports=n.p+"1b6f70bafdce2d7b376a5b482eb91a8a.js"},84035:(e,t,n)=>{e.exports=n.p+"4630f6d715e48a56148d128093d4137c.js"},30437:(e,t,n)=>{e.exports=n.p+"a8c023563de11bd4a9b0a6d5371a5cad.js"},840:(e,t,n)=>{e.exports=n.p+"b9700fe2b2af83e2e905f5f89ac08e02.js"},82943:(e,t,n)=>{e.exports=n.p+"3e26710b1cd37c7ecf680f47f2b8abc7.js"},98816:(e,t,n)=>{e.exports=n.p+"4bc9121ea47fb26054e0d278c31bc2d2.js"},37611:(e,t,n)=>{e.exports=n.p+"6710a45fd8743d4f136efc27a2d48f97.js"},97997:(e,t,n)=>{e.exports=n.p+"edce23a59a3681261bccc96f44419b20.js"},30702:(e,t,n)=>{e.exports=n.p+"09883827885fdc27fdc76f6177d18f01.js"},28531:(e,t,n)=>{e.exports=n.p+"34811af478bf02cb3260d447634c344c.js"},1066:(e,t,n)=>{e.exports=n.p+"09a394f4be27f0b4699a3f6a385cf234.js"},65509:(e,t,n)=>{e.exports=n.p+"c26e3a6ce2e86b6d76307f3f29a4afe0.js"},26207:(e,t,n)=>{e.exports=n.p+"a3fd239fe774602b982b86b933b37351.js"},96043:(e,t,n)=>{e.exports=n.p+"3051429dd8e2b2a47598d28de8558665.js"},20280:(e,t,n)=>{e.exports=n.p+"14f810a44b5f3aec4d295e1a4aa7117d.js"},17290:(e,t,n)=>{e.exports=n.p+"d1978f243b9306683f70a363ef7d0a7b.js"},60340:(e,t,n)=>{e.exports=n.p+"f6231d9285ead4bbac9beb1ef1fb9b13.js"},92428:(e,t,n)=>{e.exports=n.p+"1c2604df4a00b2624aeb726ba464e266.js"},19449:(e,t,n)=>{e.exports=n.p+"4a84f574e5720c29bcac1a726b32de74.js"},33945:(e,t,n)=>{e.exports=n.p+"ae9c720bdd0810cc560fc388872dafc2.js"},32064:(e,t,n)=>{e.exports=n.p+"6fa662dfafaa837c5178a04d771b97ca.js"},79105:(e,t,n)=>{e.exports=n.p+"7cf5aef5d02db3d31c230070997e3106.js"},84444:(e,t,n)=>{e.exports=n.p+"338dd9374d7e917c8494de647b46e437.js"},40948:(e,t,n)=>{e.exports=n.p+"75ec62eb4a3e281fbf270ca3c6f5a052.js"},6333:(e,t,n)=>{e.exports=n.p+"8ea6d6a0b0068c2f77b0c16cf54781ee.js"},92427:(e,t,n)=>{e.exports=n.p+"3e9fcd72844b45121f6252af95616edc.js"},23290:(e,t,n)=>{e.exports=n.p+"4461237a4e05a0bfc3820606d1926b53.js"},47531:(e,t,n)=>{e.exports=n.p+"b33a2e676d49a7934d4edea8dfb86716.js"},20109:(e,t,n)=>{e.exports=n.p+"6615eea954762d64e9fd53a5071ecea7.js"},91833:(e,t,n)=>{e.exports=n.p+"a014ca50c1ee2e363a72658798192bfc.js"},66676:(e,t,n)=>{e.exports=n.p+"db6596c28c7bce047966031049e2398b.js"},85924:(e,t,n)=>{e.exports=n.p+"6a3121c2ab987e8e1b78264d790482f0.js"},93219:(e,t,n)=>{e.exports=n.p+"eadd25779cd5fdf8a3e0a6b3f5ab1f81.js"},28158:(e,t,n)=>{e.exports=n.p+"b8324a5dd37f3475ce2b244b830d6c26.js"},18156:(e,t,n)=>{e.exports=n.p+"9be75425dae9d92151882fb7ec8feaad.js"},33284:(e,t,n)=>{e.exports=n.p+"4a7f707d564e148111b313ca9e674f4d.js"},55116:(e,t,n)=>{e.exports=n.p+"1d63ff53406d226d93537e3adc48a328.js"},21738:(e,t,n)=>{e.exports=n.p+"124840495202cae10be935f3a03a1ac6.js"},49244:(e,t,n)=>{e.exports=n.p+"e88c852e358464c7394fc5096ab6d66b.js"},13083:(e,t,n)=>{e.exports=n.p+"7874f7ea8d7a1a899d3daa8a937b8185.js"},77707:(e,t,n)=>{e.exports=n.p+"69ee2115bb4bd9f4b4c35c4e1c2deb69.js"},19077:(e,t,n)=>{e.exports=n.p+"3b688c3f85be67184e87c0132e54c12d.js"},5801:(e,t,n)=>{e.exports=n.p+"d01a902c73814ec8aa179c75f11d972f.js"},70477:(e,t,n)=>{e.exports=n.p+"fe8b3a78eefa93a39724a49282532802.js"},81373:(e,t,n)=>{e.exports=n.p+"f2b7543385b081d4a1d38d59298d6dab.js"},69056:(e,t,n)=>{e.exports=n.p+"04b27f726b4012ea6d1948316f4f1c77.js"},38973:(e,t,n)=>{e.exports=n.p+"638fb30c918f4a675c1236ccf194061c.js"},82889:(e,t,n)=>{e.exports=n.p+"0d136d14ad6d8fd07d551406229fb83d.js"},83998:(e,t,n)=>{e.exports=n.p+"8a075caa090def25b7d31166447b0422.js"},45922:(e,t,n)=>{e.exports=n.p+"7558f57dcf15e80b66dc0923418940e1.js"},58518:(e,t,n)=>{e.exports=n.p+"61a8f4225948ade140f7d190c48c1cac.js"},26048:(e,t,n)=>{e.exports=n.p+"cda61deec3a67f590d36baf70ba4ea3c.js"},49237:(e,t,n)=>{e.exports=n.p+"2dfe48c107e6022fcc9cc9c80cd226ac.js"},81755:(e,t,n)=>{e.exports=n.p+"9d65cf36f7b9cf89092cc5d14dbdd268.js"},50139:(e,t,n)=>{e.exports=n.p+"8bace6519d27715fc7e157ce826c2466.js"},87943:(e,t,n)=>{e.exports=n.p+"b6d6cf52065c42df54b1d289351c0124.js"},35131:(e,t,n)=>{e.exports=n.p+"80058c6fc137495baab5efb509c066d1.js"},17750:(e,t,n)=>{e.exports=n.p+"691aadd6510d97afd442f998d86bcce8.js"},58096:(e,t,n)=>{e.exports=n.p+"7fa23058009da9b6acc57b1b3f409af7.js"},36769:(e,t,n)=>{e.exports=n.p+"36910f41128c717575216532b61fdd5c.js"},20396:(e,t,n)=>{e.exports=n.p+"6ed19c230a894e477183ea46e03e23d7.js"},15517:(e,t,n)=>{e.exports=n.p+"ed82ad4000e9e9c82cbe8c7fb2606037.js"},73043:(e,t,n)=>{e.exports=n.p+"721c2f2848129c42d22df192932d8b9c.js"},93614:(e,t,n)=>{e.exports=n.p+"b0ed15ae7c5fde998175c3c082146fe9.js"},90171:(e,t,n)=>{e.exports=n.p+"43c50b8169718191c6b4487cbb0782fd.js"},38650:(e,t,n)=>{e.exports=n.p+"4a1c2a572f0cfb1ab9a825abb6682cb0.js"},37871:(e,t,n)=>{e.exports=n.p+"8e4a13e11fb1f90284b62f2aafc24159.js"},45942:(e,t,n)=>{e.exports=n.p+"cbf3484406027954b0ea74ef16cdd154.js"},76041:(e,t,n)=>{e.exports=n.p+"e4630a83894977487b63a98f4ef88b2d.js"},86491:(e,t,n)=>{e.exports=n.p+"8e52c4c6dcd07a70750cce9d0238de80.js"},86270:(e,t,n)=>{e.exports=n.p+"7ebd5bc8c4f770f5920fdeb6d017c260.js"},5876:(e,t,n)=>{e.exports=n.p+"9cde1fe7566568a2aa4a52b94e601121.js"},95686:(e,t,n)=>{e.exports=n.p+"e6d29dbb71c5513dfc42fcf0aae5393e.js"},36042:(e,t,n)=>{e.exports=n.p+"ad2bb67bce7519803305da9add4bc92d.js"},66652:(e,t,n)=>{e.exports=n.p+"e9ac6e53cda55b8ded75c3168bed622a.js"},95345:(e,t,n)=>{e.exports=n.p+"e95d8e903be583d4a240ebabe1cdcc05.js"},54968:(e,t,n)=>{e.exports=n.p+"9de7677a35456e3d6462cde13ab34d77.js"},58541:(e,t,n)=>{e.exports=n.p+"f2196245706d59b8293062458e484fa3.js"},37087:(e,t,n)=>{e.exports=n.p+"a259f251157cfe113f97ba8755ecd773.js"},50391:(e,t,n)=>{e.exports=n.p+"347d30bee70667dca9980d79a86cff1e.js"},23159:(e,t,n)=>{e.exports=n.p+"4e46c67cf627175f8bfca95c577607ac.js"},22951:(e,t,n)=>{e.exports=n.p+"0e1f0d971c548d9e4dafae8ad47e336f.js"},24607:(e,t,n)=>{e.exports=n.p+"a33defe272c7c273e24f2b7d07e1b55d.js"},57526:(e,t,n)=>{e.exports=n.p+"471e1edde7b0d0a074411863c1e21927.js"},71841:(e,t,n)=>{e.exports=n.p+"47a83c7d47f19b999a570201a667e789.js"},23529:(e,t,n)=>{e.exports=n.p+"79d6f436213e2d2e57cf25ad09cce5fd.js"},20830:(e,t,n)=>{e.exports=n.p+"caf96bd27a3feb0cc1e93bbe7c201006.js"},284:(e,t,n)=>{e.exports=n.p+"4ace28f0013341725e235b3aba9da1f5.js"},62423:(e,t,n)=>{e.exports=n.p+"99916f77cfc0b12071bf9b1f7f157927.js"},19167:(e,t,n)=>{e.exports=n.p+"77eb67b4cb33adf88e7498d5c1ee73bc.js"},8035:(e,t,n)=>{e.exports=n.p+"230c0c31d902ad1c84c266061dbf7651.js"},51626:(e,t,n)=>{e.exports=n.p+"ae22707304315382162e6869f1137be1.js"},3086:(e,t,n)=>{e.exports=n.p+"39dc11a588c3ffc16ceda05df70a13bb.js"},15993:(e,t,n)=>{e.exports=n.p+"b68801d2cb433e43ca05cb62893a34be.js"},91320:(e,t,n)=>{e.exports=n.p+"967f19e2c6a1030c7dda3872af0655e2.js"},76658:(e,t,n)=>{e.exports=n.p+"1ae03c1415fc080f6345de82998890ee.js"},63504:(e,t,n)=>{e.exports=n.p+"948239f502be5a9c3830962fca20b645.js"},8656:(e,t,n)=>{e.exports=n.p+"416b4e993d43e92ae81ca73a8beeb566.js"},34269:(e,t,n)=>{e.exports=n.p+"5d92050e4d49e0a83cd45c0249bcdd69.js"},30603:(e,t,n)=>{e.exports=n.p+"1df37979dc9b5afcf377b2f2c29ce870.js"},15976:(e,t,n)=>{e.exports=n.p+"35be7e81f3e75ca91c05d7d6474ffe7a.js"},73337:(e,t,n)=>{e.exports=n.p+"dac2a15feda3d7136a4448e63adb6eeb.js"},57783:(e,t,n)=>{e.exports=n.p+"0b2fb43b9c28ce56059fe671b77de116.js"},64149:(e,t,n)=>{e.exports=n.p+"29925a7945795fef3620c3bf30947605.js"},43943:(e,t,n)=>{e.exports=n.p+"b3688558a1cee156b5acfba04f1401a4.js"},89876:(e,t,n)=>{e.exports=n.p+"02247718c28d39292c963c71226e8cd7.js"},31812:(e,t,n)=>{e.exports=n.p+"12d0110980476e3f869a6deae95cc7fb.js"},51447:(e,t,n)=>{e.exports=n.p+"e4b5c126af531bc62b2efbab0606bb88.js"},45959:(e,t,n)=>{e.exports=n.p+"5bee4cb0b16c7f1470e4eaa6c3f9c5e4.js"},62112:(e,t,n)=>{e.exports=n.p+"55f3f7a501d348eb7af35928c5816857.js"},92122:(e,t,n)=>{e.exports=n.p+"876ff9e114857c02696293d335b4ae1a.js"},87631:(e,t,n)=>{e.exports=n.p+"25ecfb04f367d3bee35beabec47fc38d.js"},82703:(e,t,n)=>{e.exports=n.p+"d979211bf60161af239f587e7fbcc41d.js"},74912:(e,t,n)=>{e.exports=n.p+"9267b01489dc622174c79d66aabad75e.js"},46842:(e,t,n)=>{e.exports=n.p+"3c44dbf49ff0ceb629ab0d166cddd8da.js"},48978:(e,t,n)=>{e.exports=n.p+"323b9e3e8b115817cf6d07f50effcfe4.js"},19498:(e,t,n)=>{e.exports=n.p+"20a80f46074a22aa25782dbfc91563bf.js"},47838:(e,t,n)=>{e.exports=n.p+"90a9bbb6d378556d6fd011683f9d2a19.js"},31383:(e,t,n)=>{e.exports=n.p+"f4726cbc42d80e6035641c9776490f35.js"},86955:(e,t,n)=>{e.exports=n.p+"9c14e8b091b9cda1af1e301f30f590bb.js"},27526:(e,t,n)=>{e.exports=n.p+"d56fb5c656fc8415ba2a661bc27c10bf.js"},44887:(e,t,n)=>{e.exports=n.p+"f655a14dabae0424d9b9e1cc0f2ee138.js"},89209:(e,t,n)=>{e.exports=n.p+"5a76c98d29103de9690fbe8961b1ce12.js"},65675:(e,t,n)=>{e.exports=n.p+"bed3d80560f47548f118098497409f0a.js"},48731:(e,t,n)=>{e.exports=n.p+"2cf1a62fa399c2f158b70a1ed65f3ce0.js"},78385:(e,t,n)=>{e.exports=n.p+"0c5837fc60d68faaee3e1f2cb6a719d8.js"},89175:(e,t,n)=>{e.exports=n.p+"92e48a52deeb0d49e62e71b651ac94d4.js"},74784:(e,t,n)=>{e.exports=n.p+"5bb86040107e84d77c4fc67c0ea41d00.js"},83427:(e,t,n)=>{e.exports=n.p+"8df6f650cae24a33633e62725256b473.js"},71674:(e,t,n)=>{e.exports=n.p+"ca439a7330bff09434b2d2bad157a97b.js"},25249:(e,t,n)=>{e.exports=n.p+"ac8fdd27ce0e3f059072ff3ea7f712fb.js"},14594:(e,t,n)=>{e.exports=n.p+"97362a1a0bab1742ace71b77c9f2e6ba.js"},43194:(e,t,n)=>{e.exports=n.p+"1d71ee2847d7c66b32e345212edf3771.js"},11315:(e,t,n)=>{e.exports=n.p+"e2eeafb3a0656ae70463e381aa36884d.js"},57798:(e,t,n)=>{e.exports=n.p+"3cdbae3d3cdf964a6d6e8d443cbab354.js"},17274:(e,t,n)=>{e.exports=n.p+"b7b3de284b037d65b380a781dc10bf05.js"},25250:(e,t,n)=>{e.exports=n.p+"5f5de01d30333b334ea0aef6597e2c67.js"},68157:(e,t,n)=>{e.exports=n.p+"f2ef5891c9614095450e1a75c880e1eb.js"},57931:(e,t,n)=>{e.exports=n.p+"50db98db4e11993952cb187dab7bdd3b.js"},77278:(e,t,n)=>{e.exports=n.p+"8bdef070ee34261c730585b92c73bfc0.js"},59154:(e,t,n)=>{e.exports=n.p+"298d1f058e019c1015560abea42c3c9e.js"},52787:(e,t,n)=>{e.exports=n.p+"ef27ffb78c01096efef064bde49f36f9.js"},65505:(e,t,n)=>{e.exports=n.p+"6cddbb76b88ce81a67d49e045ddcfff4.js"},6102:(e,t,n)=>{e.exports=n.p+"3515506c991f5271604a663e8f6f6537.js"},95579:(e,t,n)=>{e.exports=n.p+"c7055eab568e32849603ca6004ce5c3c.js"},63956:(e,t,n)=>{e.exports=n.p+"8ffdb3c31fe43613ef5958523a4c8811.js"},94581:(e,t,n)=>{e.exports=n.p+"29e0b740060608b2ac4c6e4c1e7a495d.js"},20136:(e,t,n)=>{e.exports=n.p+"5ebfeb93125ffa76c121f4a983b53a4c.js"},15902:(e,t,n)=>{e.exports=n.p+"84a3a877521d307fee2e25dc10c566a3.js"},67518:(e,t,n)=>{e.exports=n.p+"6ba9367b5ba548b58b4c1a1b2610e278.js"},259:(e,t,n)=>{e.exports=n.p+"c3f7060087f63ef3e7c3718466eeed16.js"},94300:(e,t,n)=>{e.exports=n.p+"59bfb91526c1c5cca9069cc2c2f321ed.js"},55138:(e,t,n)=>{e.exports=n.p+"77aa50c577f2734a557b514ad2999c81.js"},68419:(e,t,n)=>{e.exports=n.p+"ae8f84901cf7dcae0f04e3c5a513b1d9.js"},78776:(e,t,n)=>{e.exports=n.p+"94edab2c469764c36c3168450158945d.js"},69894:(e,t,n)=>{e.exports=n.p+"ce7fbf867d7047a6f37abf943e18e145.js"},26725:(e,t,n)=>{e.exports=n.p+"fcf6e514f9e50a0313e06f5a673ea215.js"},78053:(e,t,n)=>{e.exports=n.p+"53f2fdf90295cff79396b0eb08f8cb12.js"},45098:(e,t,n)=>{e.exports=n.p+"3bbf99b06b6eed98e22bd05ecd23aa9d.js"},951:(e,t,n)=>{e.exports=n.p+"6fd07cd6edfd543d0169b1f2f3b85c69.js"},44587:(e,t,n)=>{e.exports=n.p+"d1577b72ca96cbc38c8acc9f6a6add9e.js"},7638:(e,t,n)=>{e.exports=n.p+"3c7a1cad8e96e4af87a4fbf3e29dd02c.js"},71899:(e,t,n)=>{e.exports=n.p+"43db4f2b7eb08dbb8e7dbc132c999aa6.js"},76830:(e,t,n)=>{e.exports=n.p+"237044fac34e3703de2805836d76b0f7.js"},46853:(e,t,n)=>{e.exports=n.p+"36b9a7f762d660a872b00b0f35d64208.js"},98874:(e,t,n)=>{e.exports=n.p+"4484e281fe2c21b13bf10aec0c61960f.js"},29397:(e,t,n)=>{e.exports=n.p+"dada7ea4318abc5e4b0bded876c80c5b.js"},83783:(e,t,n)=>{e.exports=n.p+"7f9756dc440b9054ef7be5c18e981489.js"},64881:(e,t,n)=>{e.exports=n.p+"3f5a168a938e08ceba33e3ecc557734b.js"},10731:(e,t,n)=>{e.exports=n.p+"1e330f5ced69669205b3a3fc06855880.js"},80962:(e,t,n)=>{e.exports=n.p+"6beb70f532b1694b2bd8652e8cf9d920.js"},29681:(e,t,n)=>{e.exports=n.p+"deef8cdfcda94a9b7c717fb2ef75d657.js"},29925:(e,t,n)=>{e.exports=n.p+"c8118346c4cc4c9980d2cd8f89d6d498.js"},1647:(e,t,n)=>{e.exports=n.p+"bdebc3dc6f8b6acfb303346c09024830.js"},78561:(e,t,n)=>{e.exports=n.p+"18fad86424be355200fdfb8ac58acfc1.js"},1350:(e,t,n)=>{e.exports=n.p+"545a327c0c271e6496d3fbba8810c745.js"},19626:(e,t,n)=>{e.exports=n.p+"a9f5269d916ede39c13d7e6da1f3490d.js"},35843:(e,t,n)=>{e.exports=n.p+"9a3b2bcb995d70cc7f1251ea01f7f7ad.js"},92514:(e,t,n)=>{e.exports=n.p+"890673ec2ade737ba8dc086c27a15832.js"},78766:(e,t,n)=>{e.exports=n.p+"b2f17beb37e88a3a3a714db00a13b9b4.js"},33030:(e,t,n)=>{e.exports=n.p+"6ed29bac73c3e47ffbb7bdb3efccd2c2.js"},84837:(e,t,n)=>{e.exports=n.p+"d8cc35cc51ba4c0479c4944d97304f15.js"},80082:(e,t,n)=>{e.exports=n.p+"6f183309bd8c328ccd26b9e59949176c.js"},81053:(e,t,n)=>{e.exports=n.p+"aa8ed5452c1e96856e2f43990b850e4e.js"},52292:(e,t,n)=>{e.exports=n.p+"d49660017b954347fe7cc24f88182e84.js"},4523:(e,t,n)=>{e.exports=n.p+"d6ddfb035c91552f182b93d36f37bd83.js"},73214:(e,t,n)=>{e.exports=n.p+"d547d68a7dddccfa4f968e2e0097b689.js"},94921:(e,t,n)=>{e.exports=n.p+"b8f78ce9f07036935f95bb4fa6f6a0d7.js"},25924:(e,t,n)=>{e.exports=n.p+"a097ec0a88ad050ab617d5d2838e7271.js"},32493:(e,t,n)=>{e.exports=n.p+"b0e6a4801ab78970901c2c3173fa3044.js"},88794:(e,t,n)=>{e.exports=n.p+"e182f086b034818d7947960b528b24f7.js"},62006:(e,t,n)=>{e.exports=n.p+"a5f50331ceef8856a227f90ee98efe99.js"},63716:(e,t,n)=>{e.exports=n.p+"79807848432e353d25b5f6ba7f9d6be7.js"},4860:(e,t,n)=>{e.exports=n.p+"ad933e2dde52678164ee01e592075659.js"},34563:(e,t,n)=>{e.exports=n.p+"4b4261a45af76c5046915ad1992c2201.js"},43092:(e,t,n)=>{e.exports=n.p+"b28db978172597c7090eba9324d09126.js"},96640:(e,t,n)=>{e.exports=n.p+"70ce708daecc5bfa9c31091ffbfe4348.js"},116:(e,t,n)=>{e.exports=n.p+"971b454512e21a1bbc5957ea1ff5cd6d.js"},78147:(e,t,n)=>{e.exports=n.p+"6f4dcd9b39a70504e5cc2270f11611d3.js"},44090:(e,t,n)=>{e.exports=n.p+"8e9dcf094f4a920cd7570b900dcade14.js"},92211:(e,t,n)=>{e.exports=n.p+"9460057df9b997c74a6f49dbe4fc756c.js"},84749:(e,t,n)=>{e.exports=n.p+"c4e7515198e5db697627b1dd688fd99e.js"},31646:(e,t,n)=>{e.exports=n.p+"f064c7092c899f2916d7efeff8d0d4a7.js"},79785:(e,t,n)=>{e.exports=n.p+"56959d2f3b3e29fb203e0bbd5991e6e3.js"},9508:(e,t,n)=>{e.exports=n.p+"09317849e123412bcd7f356a2f8f27e1.js"},5040:(e,t,n)=>{e.exports=n.p+"8d6f901172e081378b3f71ced22bd27d.js"},11123:(e,t,n)=>{e.exports=n.p+"77815565a6459ac1bcee35a3f0c38fa2.js"},61532:(e,t,n)=>{e.exports=n.p+"c4dd1c9ded60399a5eeaa79d77d9b1f5.js"},1512:(e,t,n)=>{e.exports=n.p+"c9386b639cdad090cacb02b7b0afa85d.js"},36056:(e,t,n)=>{e.exports=n.p+"f7f23e84761c27b79313251321d9bbc8.js"},91017:(e,t,n)=>{e.exports=n.p+"bc36fdf63bba18a4d8d221d7d45fea20.js"},26268:(e,t,n)=>{e.exports=n.p+"cac63f1893f897a73135ffdb787f5939.js"},998:(e,t,n)=>{e.exports=n.p+"9413a25b5d8713f93e516564035efe18.js"},24875:(e,t,n)=>{e.exports=n.p+"5fec44c542bf68320528d6cb00d35fef.js"},953:(e,t,n)=>{e.exports=n.p+"13dff8322c66f47120e880a2f82f9bd8.js"},23976:(e,t,n)=>{e.exports=n.p+"4c5d3454ed7c01eb9a0509dbd20e2a28.js"},41805:(e,t,n)=>{e.exports=n.p+"ee953ef1fb8c52e9ee18b9e821acb870.js"},27761:(e,t,n)=>{e.exports=n.p+"ba6b031fe43127991c97cf1bbe718689.js"},73657:(e,t,n)=>{e.exports=n.p+"767f98f21e44e8b0a850efcd8a1f48b1.js"},31611:(e,t,n)=>{e.exports=n.p+"55ecab46828f78b38896f32d01bc38a4.js"},79995:(e,t,n)=>{e.exports=n.p+"3c544a6a5bb67d0b47467cc9767a2f09.js"},99927:(e,t,n)=>{e.exports=n.p+"93976d3253c624ab38535c9c11a03964.js"},82067:(e,t,n)=>{e.exports=n.p+"d7945210fd88487ec67520554b0314ec.js"},52304:(e,t,n)=>{e.exports=n.p+"dcce977bc807cb8f8aa7f908211202ce.js"},16303:(e,t,n)=>{e.exports=n.p+"916570993f1e76695881fa2f80ed8e97.js"},66841:(e,t,n)=>{e.exports=n.p+"0b5af5881dad080fc94d127455f52bff.js"},24594:(e,t,n)=>{e.exports=n.p+"95a397d972f2a7de8cdc04ca53685bd0.js"},94474:(e,t,n)=>{e.exports=n.p+"2d028eb3d0377b2db9cf435d512a9907.js"},7106:(e,t,n)=>{e.exports=n.p+"968df64a26e4d3f3f19fb5ee0375d1a2.js"},95712:(e,t,n)=>{e.exports=n.p+"95fcb791d45fdb23ce12d767bef27364.js"},48501:(e,t,n)=>{e.exports=n.p+"7c2e454bf4dd49d8858992b4c4d0fa79.js"},32110:(e,t,n)=>{e.exports=n.p+"d1e5d07127f4e0b7cfdc20b321e61ca8.js"},61454:(e,t,n)=>{e.exports=n.p+"475f58e4f9c874fda8dce9b1f9c8803f.js"},75e3:(e,t,n)=>{e.exports=n.p+"2f9794aee78306ed8938e9feddd93f94.js"},19592:(e,t,n)=>{e.exports=n.p+"04663680da9d3218eb0dc3291e16bc53.js"},58633:(e,t,n)=>{e.exports=n.p+"6d86eb3f75ae72f605962249a43f74db.js"},76024:(e,t,n)=>{e.exports=n.p+"86bbd732125e81000d416830e2af3373.js"},19247:(e,t,n)=>{e.exports=n.p+"94b311f7ebe0b6fc0ea21ef4054cc941.js"},53659:(e,t,n)=>{e.exports=n.p+"012befa304f9d3301612b7e61bbd8e9f.js"},51386:(e,t,n)=>{e.exports=n.p+"7e76d1c8b6d74d08657dc1f8adea23af.js"},54476:(e,t,n)=>{e.exports=n.p+"08f5f3425970e1a2cc69aca0af9e7916.js"},4340:(e,t,n)=>{e.exports=n.p+"7d8684362f8b3fbbda87b2843c6f1e08.js"},1195:(e,t,n)=>{e.exports=n.p+"e3fbd267b3f13eb265b667774cffe6a5.js"},19493:(e,t,n)=>{e.exports=n.p+"b8936d57747b1b4e14705ff5c1056d35.js"},87410:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=o[c]||0,h="".concat(c," ").concat(u);o[c]=u+1;var d=n(h),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:p,references:1})}s.push(h)}return s}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},51991:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},12434:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},33702:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},44766:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},81422:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},56328:(e,t,n)=>{"use strict";n.d(t,{rJ:()=>l});var r,i=n(87114),o=n(81672),s=n.n(o),a=["children","size"],l=s().forwardRef((function(e,t){var n=e.children,o=e.size,l=void 0===o?16:o,c=(0,i._)(e,a);return s().createElement(i.I,(0,i.a)({width:l,height:l,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},c),r||(r=s().createElement("path",{d:"M28 8h2V4a2.0021 2.0021 0 00-2-2H24V4h4zM17 2H21V4H17zM28 11H30V15H28zM28 18v4H24V10a2.0023 2.0023 0 00-2-2H10V4h4V2H10A2.0023 2.0023 0 008 4V8H4a2.0023 2.0023 0 00-2 2V28a2.0023 2.0023 0 002 2H22a2.0023 2.0023 0 002-2V24h4a2.0023 2.0023 0 002-2V18zM22 28H4V10H22z"})),n)}))},92039:(e,t,n)=>{"use strict";n.d(t,{ZN:()=>c});var r,i,o=n(87114),s=n(81672),a=n.n(s),l=["children","size"],c=a().forwardRef((function(e,t){var n=e.children,s=e.size,c=void 0===s?16:s,u=(0,o._)(e,l);return a().createElement(o.I,(0,o.a)({width:c,height:c,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},u),r||(r=a().createElement("path",{d:"M12 12H14V24H12zM18 12H20V24H18z"})),i||(i=a().createElement("path",{d:"M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"})),n)}))},72225:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchClobData:()=>b,fetchConceptNameByUuid:()=>p,fetchOpenMRSForm:()=>g,getConcept:()=>h,getLatestObs:()=>m,getLocationsByTag:()=>d,getPreviousEncounter:()=>f,saveEncounter:()=>u});var r=n(81132),i=n(35258),o=n(39682),s=n(98512);function a(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){a(o,r,i,s,l,"next",e)}function l(e){a(o,r,i,s,l,"throw",e)}s(void 0)}))}}var c=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function u(e,t,n){var i=n?"/ws/rest/v1/encounter/".concat(n,"?v=full"):"/ws/rest/v1/encounter?v=full";return(0,r.openmrsFetch)(i,{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function h(e,t){return(0,r.openmrsObservableFetch)("/ws/rest/v1/concept/".concat(e,"?v=").concat(t)).pipe((0,i.U)((function(e){return e.data})))}function d(e){return(0,r.openmrsObservableFetch)("/ws/rest/v1/location?tag=".concat(e,"&v=custom:(uuid,display)")).pipe((0,i.U)((function(e){return e.data.results})))}function f(e,t){var n="encounterType=".concat(t,"&patient=").concat(e);return(0,r.openmrsFetch)("/ws/rest/v1/encounter?".concat(n,"&limit=1&v=").concat(o.Ib)).then((function(e){var t=e.data;return t.results.length?t.results[0]:null}))}function p(e){return(0,r.openmrsFetch)("/ws/rest/v1/concept/".concat(e,"/name?limit=1")).then((function(e){var t=e.data;if(t.results.length)return t.results[t.results.length-1].display}))}function m(e,t,n){var i="patient=".concat(e,"&code=").concat(t).concat(n?"&encounter.type=".concat(n):"");return i+="&_sort=-_lastUpdated&_count=1",(0,r.openmrsFetch)("/ws/fhir2/R4/Observation?".concat(i)).then((function(e){var t,n=e.data;return(null===(t=n.entry)||void 0===t?void 0:t.length)?n.entry[0].resource:null}))}function g(e){return v.apply(this,arguments)}function v(){return(v=l((function(e){var t,n,i,o,a,l;return c(this,(function(c){switch(c.label){case 0:return e?(n=(0,s.K)(e)?{url:"/ws/rest/v1/form/".concat(e,"?v=full"),isUUID:!0}:{url:"/ws/rest/v1/form?q=".concat(e,"&v=full"),isUUID:!1},i=n.url,o=n.isUUID,[4,(0,r.openmrsFetch)(i)]):[2,null];case 1:return a=c.sent(),l=a.data,o?[2,l]:[2,(null===(t=l.results)||void 0===t?void 0:t.length)?l.results[0]:new Error("Form with ".concat(e," was not found"))]}}))}))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=l((function(e){var t,n;return c(this,(function(i){switch(i.label){case 0:return e&&(t=e.resources.find((function(e){return"JSON schema"===e.name})))?(n="/ws/rest/v1/clobdata/".concat(t.valueReference),[4,(0,r.openmrsFetch)(n)]):[2,null];case 1:return[2,i.sent().data]}}))}))).apply(this,arguments)}},39682:(e,t,n)=>{"use strict";n.d(t,{Ib:()=>o,Mf:()=>i,ks:()=>r,mk:()=>s,rX:()=>a});var r="cf82933b-3f3f-45e7-a5ab-5d31aaee3da3",i="488b58ff-64f5-4f8a-8979-fa79940b1594",o="custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),patient:(uuid,display),encounterProviders:(uuid,provider:(uuid,name)),obs:(uuid,obsDatetime,voided,groupMembers,formFieldNamespace,formFieldPath,concept:(uuid,name:(uuid,name)),value:(uuid,name:(uuid,name),names:(uuid,conceptNameType,name))))",s="ohri-forms-engine-store",a="patient-chart-workspace-header-slot"},8241:(e,t,n)=>{"use strict";n.d(t,{w9:()=>fm,Zn:()=>_r,xb:()=>Fn.xb});var r={};n.r(r),n.d(r,{attentionMarkers:()=>al,contentInitial:()=>tl,disable:()=>ll,document:()=>el,flow:()=>rl,flowInitial:()=>nl,insideSpan:()=>sl,string:()=>il,text:()=>ol});var i={};function o(e,t,n){var r,i,l=JSON.parse(JSON.stringify(t));return l.defaultPage=null===(i=null===(r=l.availableIntents)||void 0===r?void 0:r.find((function(t){return t.intent===((null==e?void 0:e.intent)||e)})))||void 0===i?void 0:i.defaultPage,l.markdown&&a(l.markdown,e),l.pages=l.pages||[],l.pages.forEach((function(t){var r,i;if(t.isSubform&&(null===(r=t.subform)||void 0===r?void 0:r.form)){var l,c,u=[],h=null===(l=t.subform.behaviours)||void 0===l?void 0:l.find((function(t){return t.intent==(null==e?void 0:e.intent)||e}));void 0===(null==h?void 0:h.readonly)&&null==(null==h?void 0:h.readonly)||u.push({name:"readonly",type:"field",value:null==h?void 0:h.readonly}),t.subform.form=o((null==h?void 0:h.subform_intent)||"*",null===(c=t.subform)||void 0===c?void 0:c.form,u)}var d=null===(i=t.behaviours)||void 0===i?void 0:i.find((function(t){return t.intent===((null==e?void 0:e.intent)||e)}));if(d)t.hide=null==d?void 0:d.hide,t.readonly=null==d?void 0:d.readonly;else{var f,p=null===(f=t.behaviours)||void 0===f?void 0:f.find((function(e){return"*"===e.intent}));t.hide=null==p?void 0:p.hide,t.readonly=null==p?void 0:p.readonly}t.markdown&&a(t.markdown,e),t.sections=t.sections||[],t.sections.forEach((function(t){var r,i=null===(r=t.behaviours)||void 0===r?void 0:r.find((function(t){return t.intent===(null==e?void 0:e.intent)||e}));if(i)t.hide=null==i?void 0:i.hide;else{var o,l,c=null===(o=t.behaviours)||void 0===o?void 0:o.find((function(e){return"*"===e.intent}));t.hide=null!==(l=null==c?void 0:c.hide)&&void 0!==l?l:t.hide}t.markdown&&a(t.markdown,e),t.questions=t.questions||[],t.questions.forEach((function(t){var r;t.behaviours&&(s(t,(null==e?void 0:e.intent)||e),null===(r=null==n?void 0:n.filter((function(e){return"all"==e.type||"field"==e.type})))||void 0===r||r.forEach((function(e){t[e.name]=e.value}))),t.questions&&t.questions.length&&t.questions.forEach((function(t){var r;s(t,(null==e?void 0:e.intent)||e),null===(r=null==n?void 0:n.filter((function(e){return"all"==e.type||"field"==e.type})))||void 0===r||r.forEach((function(e){t[e.name]=e.value}))}))}))}))})),l}function s(e,t){var n,r,i=null===(n=e.behaviours)||void 0===n?void 0:n.find((function(e){return e.intent===t})),o=null===(r=e.behaviours)||void 0===r?void 0:r.find((function(e){return"*"===e.intent}));if(i||o){null==i||delete i.intent,null==o||delete o.intent;var s=Object.assign(o||{},i||{}),a=s.defaultValue;null!=a&&(e.questionOptions.defaultValue=a,delete s.defaultValue),delete(e=Object.assign(e,s)).behaviours}}function a(e,t){var n,r,i=null===(n=e.behaviours)||void 0===n?void 0:n.find((function(e){return e.intent===t})),o=null===(r=e.behaviours)||void 0===r?void 0:r.find((function(e){return"*"===e.intent}));if(i&&o){delete i.intent,delete o.intent;var s=Object.assign(o,i);delete(e=Object.assign(e,s)).behaviours}else!i&&o&&(delete o.intent,delete(e=Object.assign(e,o)).behaviours)}n.r(i),n.d(i,{boolean:()=>lc,booleanish:()=>cc,commaOrSpaceSeparated:()=>pc,commaSeparated:()=>fc,number:()=>hc,overloadedBoolean:()=>uc,spaceSeparated:()=>dc}),n(17740);var l=n(81672),c=n.n(l),u=c().createContext(void 0),h=n(20687),d=n(2999),f=n.n(d),p=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===m}(e)}(e)},m="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function g(e,t){return!1!==t.clone&&t.isMergeableObject(e)?b((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function v(e,t,n){return e.concat(t).map((function(e){return g(e,n)}))}function b(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||v,n.isMergeableObject=n.isMergeableObject||p;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=g(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=b(e[i],t[i],n):r[i]=g(t[i],n)})),r}(e,t,n):g(t,n)}b.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return b(e,n,t)}),{})};const y=b;var w=n(60614);const _=function(e,t){return function(n){return e(t(n))}},A=_(Object.getPrototypeOf,Object);var x=n(16677),C=Function.prototype,S=Object.prototype,E=C.toString,k=S.hasOwnProperty,$=E.call(Object);const M=function(e){if(!(0,x.Z)(e)||"[object Object]"!=(0,w.Z)(e))return!1;var t=A(e);if(null===t)return!0;var n,r,i=k.call(t,"constructor")&&t.constructor;return"function"==typeof i&&(n=i,null!=(r=i)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):n instanceof r)&&E.call(i)==$},T=function(e,t){return e===t||e!=e&&t!=t},R=function(e,t){for(var n=e.length;n--;)if(T(e[n][0],t))return n;return-1};var L=Array.prototype.splice;function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}O.prototype.clear=function(){this.__data__=[],this.size=0},O.prototype.delete=function(e){var t=this.__data__,n=R(t,e);return!(n<0||(n==t.length-1?t.pop():L.call(t,n,1),--this.size,0))},O.prototype.get=function(e){var t=this.__data__,n=R(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return R(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,r=R(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const F=O;var I=n(79518);const D=function(e){if(!(0,I.Z)(e))return!1;var t=(0,w.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var j=n(24183);const P=j.Z["__core-js_shared__"];var U,B=(U=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"";var N=Function.prototype.toString;const H=function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var W=/^\[object .+?Constructor\]$/,V=Function.prototype,z=Object.prototype,G=V.toString,q=z.hasOwnProperty,K=RegExp("^"+G.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Z=function(e){return!(!(0,I.Z)(e)||(t=e,B&&B in t))&&(D(e)?K:W).test(H(e));var t},Y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Z(n)?n:void 0},X=Y(j.Z,"Map"),Q=Y(Object,"create");var J=Object.prototype.hasOwnProperty;var ee=Object.prototype.hasOwnProperty;function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}te.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},te.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return J.call(t,e)?t[e]:void 0},te.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:ee.call(t,e)},te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?"__lodash_hash_undefined__":t,this};const ne=te,re=function(e,t){var n,r,i,o=e.__data__;return("string"==(i=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(X||F),string:new ne}},ie.prototype.delete=function(e){var t=re(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return re(this,e).get(e)},ie.prototype.has=function(e){return re(this,e).has(e)},ie.prototype.set=function(e,t){var n=re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const oe=ie;function se(e){var t=this.__data__=new F(e);this.size=t.size}se.prototype.clear=function(){this.__data__=new F,this.size=0},se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n,r,i=this.__data__;if(n=i,null!=(r=F)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r){var o=i.__data__;if(!X||o.length<199)return o.push([e,t]),this.size=++i.size,this;i=this.__data__=new oe(o)}return i.set(e,t),this.size=i.size,this};const ae=se,le=function(){try{var e=Y(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ce=function(e,t,n){"__proto__"==t&&le?le(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var ue=Object.prototype.hasOwnProperty;const he=function(e,t,n){var r=e[t];ue.call(e,t)&&T(r,n)&&(void 0!==n||t in e)||ce(e,t,n)},de=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?ce(n,a,l):he(n,a,l)}return n};var fe=n(53981),pe=n(97780);var me="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=me&&"object"==typeof module&&module&&!module.nodeType&&module,ve=ge&&ge.exports===me?j.Z.Buffer:void 0;const be=(ve?ve.isBuffer:void 0)||function(){return!1};var ye=/^(?:0|[1-9]\d*)$/;const we=function(e,t){var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t},_e=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Ae={};Ae["[object Float32Array]"]=Ae["[object Float64Array]"]=Ae["[object Int8Array]"]=Ae["[object Int16Array]"]=Ae["[object Int32Array]"]=Ae["[object Uint8Array]"]=Ae["[object Uint8ClampedArray]"]=Ae["[object Uint16Array]"]=Ae["[object Uint32Array]"]=!0,Ae["[object Arguments]"]=Ae["[object Array]"]=Ae["[object ArrayBuffer]"]=Ae["[object Boolean]"]=Ae["[object DataView]"]=Ae["[object Date]"]=Ae["[object Error]"]=Ae["[object Function]"]=Ae["[object Map]"]=Ae["[object Number]"]=Ae["[object Object]"]=Ae["[object RegExp]"]=Ae["[object Set]"]=Ae["[object String]"]=Ae["[object WeakMap]"]=!1;const xe=function(e){return function(t){return e(t)}};var Ce=n(80585),Se="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ee=Se&&"object"==typeof module&&module&&!module.nodeType&&module,ke=Ee&&Ee.exports===Se&&Ce.Z.process;const $e=function(){try{return Ee&&Ee.require&&Ee.require("util").types||ke&&ke.binding&&ke.binding("util")}catch(e){}}();var Me=$e&&$e.isTypedArray;const Te=Me?xe(Me):function(e){return(0,x.Z)(e)&&_e(e.length)&&!!Ae[(0,w.Z)(e)]};var Re=Object.prototype.hasOwnProperty;const Le=function(e,t){var n=(0,pe.Z)(e),r=!n&&(0,fe.Z)(e),i=!n&&!r&&be(e),o=!n&&!r&&!i&&Te(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!Re.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||we(c,l))||a.push(c);return a};var Oe=Object.prototype;const Fe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)},Ie=_(Object.keys,Object);var De=Object.prototype.hasOwnProperty;const je=function(e){if(!Fe(e))return Ie(e);var t=[];for(var n in Object(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t},Pe=function(e){return null!=e&&_e(e.length)&&!D(e)},Ue=function(e){return Pe(e)?Le(e):je(e)};var Be=Object.prototype.hasOwnProperty;const Ne=function(e){if(!(0,I.Z)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Fe(e),n=[];for(var r in e)("constructor"!=r||!t&&Be.call(e,r))&&n.push(r);return n},He=function(e){return Pe(e)?Le(e,!0):Ne(e)};var We="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ve=We&&"object"==typeof module&&module&&!module.nodeType&&module,ze=Ve&&Ve.exports===We?j.Z.Buffer:void 0,Ge=ze?ze.allocUnsafe:void 0;const qe=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Ke=function(){return[]};var Ze=Object.prototype.propertyIsEnumerable,Ye=Object.getOwnPropertySymbols,Xe=Ye?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(Ye(e),(function(t){return Ze.call(e,t)})))}:Ke;const Qe=Xe;var Je=n(66255),et=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,Je.Z)(t,Qe(e)),e=A(e);return t}:Ke;const tt=et,nt=function(e,t,n){var r=t(e);return(0,pe.Z)(e)?r:(0,Je.Z)(r,n(e))},rt=function(e){return nt(e,Ue,Qe)},it=function(e){return nt(e,He,tt)},ot=Y(j.Z,"DataView"),st=Y(j.Z,"Promise"),at=Y(j.Z,"Set"),lt=Y(j.Z,"WeakMap");var ct="[object Map]",ut="[object Promise]",ht="[object Set]",dt="[object WeakMap]",ft="[object DataView]",pt=H(ot),mt=H(X),gt=H(st),vt=H(at),bt=H(lt),yt=w.Z;(ot&&yt(new ot(new ArrayBuffer(1)))!=ft||X&&yt(new X)!=ct||st&&yt(st.resolve())!=ut||at&&yt(new at)!=ht||lt&&yt(new lt)!=dt)&&(yt=function(e){var t=(0,w.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?H(n):"";if(r)switch(r){case pt:return ft;case mt:return ct;case gt:return ut;case vt:return ht;case bt:return dt}return t});const wt=yt;var _t=Object.prototype.hasOwnProperty;const At=j.Z.Uint8Array,xt=function(e){var t=new e.constructor(e.byteLength);return new At(t).set(new At(e)),t};var Ct=/\w*$/;var St=n(54408),Et=St.Z?St.Z.prototype:void 0,kt=Et?Et.valueOf:void 0;const $t=function(e,t,n){var r,i,o,s=e.constructor;switch(t){case"[object ArrayBuffer]":return xt(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var n=t?xt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?xt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(o=new(i=e).constructor(i.source,Ct.exec(i))).lastIndex=i.lastIndex,o;case"[object Symbol]":return r=e,kt?Object(kt.call(r)):{}}};var Mt=Object.create,Tt=function(){var e=function(){};return function(t){if(!(0,I.Z)(t))return{};if(Mt)return Mt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Rt=Tt;var Lt=$e&&$e.isMap;const Ot=Lt?xe(Lt):function(e){return(0,x.Z)(e)&&"[object Map]"==wt(e)};var Ft=$e&&$e.isSet;const It=Ft?xe(Ft):function(e){return(0,x.Z)(e)&&"[object Set]"==wt(e)};var Dt="[object Arguments]",jt="[object Function]",Pt={};Pt[Dt]=Pt["[object Array]"]=Pt["[object ArrayBuffer]"]=Pt["[object DataView]"]=Pt["[object Boolean]"]=Pt["[object Date]"]=Pt["[object Float32Array]"]=Pt["[object Float64Array]"]=Pt["[object Int8Array]"]=Pt["[object Int16Array]"]=Pt["[object Int32Array]"]=Pt["[object Map]"]=Pt["[object Number]"]=Pt["[object Object]"]=Pt["[object RegExp]"]=Pt["[object Set]"]=Pt["[object String]"]=Pt["[object Symbol]"]=Pt["[object Uint8Array]"]=Pt["[object Uint8ClampedArray]"]=Pt["[object Uint16Array]"]=Pt["[object Uint32Array]"]=!0,Pt["[object Error]"]=Pt[jt]=Pt["[object WeakMap]"]=!1;const Ut=function e(t,n,r,i,o,s){var a,l=1&n,c=2&n,u=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),void 0!==a)return a;if(!(0,I.Z)(t))return t;var h=(0,pe.Z)(t);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&_t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return qe(t,a)}else{var d=wt(t),f=d==jt||"[object GeneratorFunction]"==d;if(be(t))return function(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}(t,l);if("[object Object]"==d||d==Dt||f&&!o){if(a=c||f?{}:function(e){return"function"!=typeof e.constructor||Fe(e)?{}:Rt(A(e))}(t),!l)return c?function(e,t){return de(e,tt(e),t)}(t,function(e,t){return e&&de(t,He(t),e)}(a,t)):function(e,t){return de(e,Qe(e),t)}(t,function(e,t){return e&&de(t,Ue(t),e)}(a,t))}else{if(!Pt[d])return o?t:{};a=$t(t,d,l)}}s||(s=new ae);var p=s.get(t);if(p)return p;s.set(t,a),It(t)?t.forEach((function(i){a.add(e(i,n,r,i,t,s))})):Ot(t)&&t.forEach((function(i,o){a.set(o,e(i,n,r,o,t,s))}));var m=h?void 0:(u?c?it:rt:c?He:Ue)(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(m||t,(function(i,o){m&&(i=t[o=i]),he(a,o,e(i,n,r,o,t,s))})),a},Bt=function(e){return Ut(e,4)},Nt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var Ht=n(94842);function Wt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Wt.Cache||oe),n}Wt.Cache=oe;var Vt,zt,Gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/\\(\\)?/g,Kt=(Vt=Wt((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Gt,(function(e,n,r,i){t.push(r?i.replace(qt,"$1"):n||e)})),t}),(function(e){return 500===zt.size&&zt.clear(),e})),zt=Vt.cache,Vt);const Zt=Kt,Yt=function(e){if("string"==typeof e||(0,Ht.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Xt=St.Z?St.Z.prototype:void 0,Qt=Xt?Xt.toString:void 0;const Jt=function e(t){if("string"==typeof t)return t;if((0,pe.Z)(t))return Nt(t,e)+"";if((0,Ht.Z)(t))return Qt?Qt.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},en=function(e){return null==e?"":Jt(e)},tn=function(e){return(0,pe.Z)(e)?Nt(e,Yt):(0,Ht.Z)(e)?[e]:qe(Zt(en(e)))};n(49098);const nn=function(e){return Ut(e,5)};function rn(){return rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rn.apply(this,arguments)}function on(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function sn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var an=function(e){return Array.isArray(e)&&0===e.length},ln=function(e){return"function"==typeof e},cn=function(e){return null!==e&&"object"==typeof e},un=function(e){return String(Math.floor(Number(e)))===e},hn=function(e){return"[object String]"===Object.prototype.toString.call(e)},dn=function(e){return 0===l.Children.count(e)},fn=function(e){return cn(e)&&ln(e.then)};function pn(e,t,n,r){void 0===r&&(r=0);for(var i=tn(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function mn(e,t,n){for(var r=Bt(e),i=r,o=0,s=tn(t);o<s.length-1;o++){var a=s[o],l=pn(e,s.slice(0,o+1));if(l&&(cn(l)||Array.isArray(l)))i=i[a]=Bt(l);else{var c=s[o+1];i=i[a]=un(c)&&Number(c)>=0?[]:{}}}return(0===o?e:i)[s[o]]===n?e:(void 0===n?delete i[s[o]]:i[s[o]]=n,0===o&&void 0===n&&delete r[s[o]],r)}function gn(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i],a=e[s];cn(a)?n.get(a)||(n.set(a,!0),r[s]=Array.isArray(a)?[]:{},gn(a,t,n,r[s])):r[s]=t}return r}var vn=(0,l.createContext)(void 0);vn.displayName="FormikContext";var bn=vn.Provider;function yn(){var e=(0,l.useContext)(vn);return e}function wn(e,t){switch(t.type){case"SET_VALUES":return rn({},e,{values:t.payload});case"SET_TOUCHED":return rn({},e,{touched:t.payload});case"SET_ERRORS":return f()(e.errors,t.payload)?e:rn({},e,{errors:t.payload});case"SET_STATUS":return rn({},e,{status:t.payload});case"SET_ISSUBMITTING":return rn({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return rn({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return rn({},e,{values:mn(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return rn({},e,{touched:mn(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return rn({},e,{errors:mn(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return rn({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return rn({},e,{touched:gn(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return rn({},e,{isSubmitting:!1});default:return e}}vn.Consumer;var _n={},An={};function xn(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,o=e.validateOnMount,s=void 0!==o&&o,a=e.isInitialValid,c=e.enableReinitialize,u=void 0!==c&&c,h=e.onSubmit,d=on(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=rn({validateOnChange:n,validateOnBlur:i,validateOnMount:s,onSubmit:h},d),m=(0,l.useRef)(p.initialValues),g=(0,l.useRef)(p.initialErrors||_n),v=(0,l.useRef)(p.initialTouched||An),b=(0,l.useRef)(p.initialStatus),w=(0,l.useRef)(!1),_=(0,l.useRef)({});(0,l.useEffect)((function(){return w.current=!0,function(){w.current=!1}}),[]);var A=(0,l.useReducer)(wn,{values:p.initialValues,errors:p.initialErrors||_n,touched:p.initialTouched||An,status:p.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),x=A[0],C=A[1],S=(0,l.useCallback)((function(e,t){return new Promise((function(n,r){var i=p.validate(e,t);null==i?n(_n):fn(i)?i.then((function(e){n(e||_n)}),(function(e){r(e)})):n(i)}))}),[p.validate]),E=(0,l.useCallback)((function(e,t){var n=p.validationSchema,r=ln(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r={});var i=Sn(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e(_n)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return mn(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;pn(t,s.path)||(t=mn(t,s.path,s.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),k=(0,l.useCallback)((function(e,t){return new Promise((function(n){return n(_.current[e].validate(t))}))}),[]),$=(0,l.useCallback)((function(e){var t=Object.keys(_.current).filter((function(e){return ln(_.current[e].validate)})),n=t.length>0?t.map((function(t){return k(t,pn(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=mn(e,t[r],n)),e}),{})}))}),[k]),M=(0,l.useCallback)((function(e){return Promise.all([$(e),p.validationSchema?E(e):{},p.validate?S(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return y.all([t,n,r],{arrayMerge:En})}))}),[p.validate,p.validationSchema,$,S,E]),T=$n((function(e){return void 0===e&&(e=x.values),C({type:"SET_ISVALIDATING",payload:!0}),M(e).then((function(e){return w.current&&(C({type:"SET_ISVALIDATING",payload:!1}),C({type:"SET_ERRORS",payload:e})),e}))}));(0,l.useEffect)((function(){s&&!0===w.current&&f()(m.current,p.initialValues)&&T(m.current)}),[s,T]);var R=(0,l.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:g.current?g.current:p.initialErrors||{},r=e&&e.touched?e.touched:v.current?v.current:p.initialTouched||{},i=e&&e.status?e.status:b.current?b.current:p.initialStatus;m.current=t,g.current=n,v.current=r,b.current=i;var o=function(){C({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var s=p.onReset(x.values,Y);fn(s)?s.then(o):o()}else o()}),[p.initialErrors,p.initialStatus,p.initialTouched]);(0,l.useEffect)((function(){!0!==w.current||f()(m.current,p.initialValues)||(u&&(m.current=p.initialValues,R()),s&&T(m.current))}),[u,p.initialValues,R,s,T]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(g.current,p.initialErrors)&&(g.current=p.initialErrors||_n,C({type:"SET_ERRORS",payload:p.initialErrors||_n}))}),[u,p.initialErrors]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(v.current,p.initialTouched)&&(v.current=p.initialTouched||An,C({type:"SET_TOUCHED",payload:p.initialTouched||An}))}),[u,p.initialTouched]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(b.current,p.initialStatus)&&(b.current=p.initialStatus,C({type:"SET_STATUS",payload:p.initialStatus}))}),[u,p.initialStatus,p.initialTouched]);var L=$n((function(e){if(_.current[e]&&ln(_.current[e].validate)){var t=pn(x.values,e),n=_.current[e].validate(t);return fn(n)?(C({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),C({type:"SET_ISVALIDATING",payload:!1})}))):(C({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(C({type:"SET_ISVALIDATING",payload:!0}),E(x.values,e).then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),C({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),O=(0,l.useCallback)((function(e,t){var n=t.validate;_.current[e]={validate:n}}),[]),F=(0,l.useCallback)((function(e){delete _.current[e]}),[]),I=$n((function(e,t){return C({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?T(x.values):Promise.resolve()})),D=(0,l.useCallback)((function(e){C({type:"SET_ERRORS",payload:e})}),[]),j=$n((function(e,t){var r=ln(e)?e(x.values):e;return C({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?T(r):Promise.resolve()})),P=(0,l.useCallback)((function(e,t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),U=$n((function(e,t,r){return C({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?T(mn(x.values,e,t)):Promise.resolve()})),B=(0,l.useCallback)((function(e,t){var n,r=t,i=e;if(!hn(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,s=o.type,a=o.name,l=o.id,c=o.value,u=o.checked,h=(o.outerHTML,o.options),d=o.multiple;r=t||a||l,i=/number|range/.test(s)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(s)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,i=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,o).concat(r.slice(o+1)):r}(pn(x.values,r),u,c):h&&d?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(h):c}r&&U(r,i)}),[U,x.values]),N=$n((function(e){if(hn(e))return function(t){return B(t,e)};B(e)})),H=$n((function(e,t,n){return void 0===t&&(t=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?T(x.values):Promise.resolve()})),W=(0,l.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||r||i);H(o,!0)}),[H]),V=$n((function(e){if(hn(e))return function(t){return W(t,e)};W(e)})),z=(0,l.useCallback)((function(e){ln(e)?C({type:"SET_FORMIK_STATE",payload:e}):C({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),G=(0,l.useCallback)((function(e){C({type:"SET_STATUS",payload:e})}),[]),q=(0,l.useCallback)((function(e){C({type:"SET_ISSUBMITTING",payload:e})}),[]),K=$n((function(){return C({type:"SUBMIT_ATTEMPT"}),T().then((function(e){var t,n,r=(t=e,null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n);if(!r&&0===Object.keys(e).length){var i;try{if(void 0===(i=X()))return}catch(e){throw e}return Promise.resolve(i).then((function(e){return w.current&&C({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(w.current)throw C({type:"SUBMIT_FAILURE"}),e}))}if(w.current&&(C({type:"SUBMIT_FAILURE"}),r))throw e}))})),Z=$n((function(e){e&&e.preventDefault&&ln(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ln(e.stopPropagation)&&e.stopPropagation(),K().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:R,validateForm:T,validateField:L,setErrors:D,setFieldError:P,setFieldTouched:H,setFieldValue:U,setStatus:G,setSubmitting:q,setTouched:I,setValues:j,setFormikState:z,submitForm:K},X=$n((function(){return h(x.values,Y)})),Q=$n((function(e){e&&e.preventDefault&&ln(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ln(e.stopPropagation)&&e.stopPropagation(),R()})),J=(0,l.useCallback)((function(e){return{value:pn(x.values,e),error:pn(x.errors,e),touched:!!pn(x.touched,e),initialValue:pn(m.current,e),initialTouched:!!pn(v.current,e),initialError:pn(g.current,e)}}),[x.errors,x.touched,x.values]),ee=(0,l.useCallback)((function(e){return{setValue:function(t,n){return U(e,t,n)},setTouched:function(t,n){return H(e,t,n)},setError:function(t){return P(e,t)}}}),[U,H,P]),te=(0,l.useCallback)((function(e){var t=cn(e),n=t?e.name:e,r=pn(x.values,n),i={name:n,value:r,onChange:N,onBlur:V};if(t){var o=e.type,s=e.value,a=e.as,l=e.multiple;"checkbox"===o?void 0===s?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(s)),i.value=s):"radio"===o?(i.checked=r===s,i.value=s):"select"===a&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[V,N,x.values]),ne=(0,l.useMemo)((function(){return!f()(m.current,x.values)}),[m.current,x.values]),re=(0,l.useMemo)((function(){return void 0!==a?ne?x.errors&&0===Object.keys(x.errors).length:!1!==a&&ln(a)?a(p):a:x.errors&&0===Object.keys(x.errors).length}),[a,ne,x.errors,p]);return rn({},x,{initialValues:m.current,initialErrors:g.current,initialTouched:v.current,initialStatus:b.current,handleBlur:V,handleChange:N,handleReset:Q,handleSubmit:Z,resetForm:R,setErrors:D,setFormikState:z,setFieldTouched:H,setFieldValue:U,setFieldError:P,setStatus:G,setSubmitting:q,setTouched:I,setValues:j,submitForm:K,validateForm:T,validateField:L,isValid:re,dirty:ne,unregisterField:F,registerField:O,getFieldProps:te,getFieldMeta:J,getFieldHelpers:ee,validateOnBlur:i,validateOnChange:n,validateOnMount:s})}function Cn(e){var t=xn(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return(0,l.useImperativeHandle)(o,(function(){return t})),(0,l.createElement)(bn,{value:t},n?(0,l.createElement)(n,t):i?i(t):r?ln(r)?r(t):dn(r)?null:l.Children.only(r):null)}function Sn(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||M(e)?Sn(e):""!==e?e:void 0})):M(e[r])?t[r]=Sn(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function En(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?y(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=y(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var kn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;function $n(e){var t=(0,l.useRef)(e);return kn((function(){t.current=e})),(0,l.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Mn(e){var t=yn(),n=t.getFieldProps,r=t.getFieldMeta,i=t.getFieldHelpers,o=t.registerField,s=t.unregisterField,a=cn(e)?e:{name:e},c=a.name,u=a.validate;return(0,l.useEffect)((function(){return c&&o(c,{validate:u}),function(){c&&s(c)}}),[o,s,c,u]),[n(a),r(c),i(c)]}var Tn=(0,l.forwardRef)((function(e,t){var n=e.action,r=on(e,["action"]),i=null!=n?n:"#",o=yn(),s=o.handleReset,a=o.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:a,ref:t,onReset:s,action:i},r))}));Tn.displayName="Form";var Rn=function(e,t,n){var r=Ln(e);return r.splice(t,0,n),r},Ln=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(rn({},e,{length:t+1}))}return[]},On=function(e){var t,n,r=function(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)((function(n){var i="function"==typeof r?r:e,s="function"==typeof t?t:e,a=mn(n.values,o,e(pn(n.values,o))),l=r?i(pn(n.errors,o)):void 0,c=t?s(pn(n.touched,o)):void 0;return an(l)&&(l=void 0),an(c)&&(c=void 0),rn({},n,{values:a,errors:r?mn(n.errors,o,l):n.errors,touched:t?mn(n.touched,o,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Ln(t),[nn(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Ln(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Ln(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return Rn(n,e,t)}),(function(t){return Rn(t,e,null)}),(function(t){return Rn(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Ln(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(sn(n)),n.pop=n.pop.bind(sn(n)),n};n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!f()(pn(e.formik.values,e.name),pn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},i.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?Ln(n):[];return t||(t=r[e]),ln(r.splice)&&r.splice(e,1),r}),!0,!0),t},i.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},i.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,o=t.name,s=rn({},e,{form:on(t.formik,["validate","validationSchema"]),name:o});return n?(0,l.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):dn(i)?null:l.Children.only(i):null},r}(l.Component);On.defaultProps={validateOnChange:!0},l.Component,l.Component;var Fn=n(94064),In=n(98512),Dn=n(87410),jn=n.n(Dn),Pn=n(44766),Un=n.n(Pn),Bn=n(51991),Nn=n.n(Bn),Hn=n(33702),Wn=n.n(Hn),Vn=n(12434),zn=n.n(Vn),Gn=n(81422),qn=n.n(Gn),Kn=n(62416),Zn={};Zn.styleTagTransform=qn(),Zn.setAttributes=Wn(),Zn.insert=Nn().bind(null,"head"),Zn.domAPI=Un(),Zn.insertStyleElement=zn(),jn()(Kn.Z,Zn);const Yn=Kn.Z&&Kn.Z.locals?Kn.Z.locals:void 0;function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Jn=function(e){var t=e.question,n=e.onChange,r=e.handler,i=Qn(Mn("".concat(t.id,"-unspecified")),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=Qn((0,l.useState)(!1),2),p=f[0],m=f[1],g="view"==d.sessionMode,v=Qn((0,l.useState)([]),2),b=(v[0],v[1]),y=Qn((0,l.useState)([]),2),w=(y[0],y[1]);(0,l.useEffect)((function(){if(o.value){m(!0),t.submission={unspecified:!0,errors:[],warnings:[]};var e=null;switch(t.questionOptions.rendering){case"date":e="";break;case"checkbox":e=[]}a(t.id,e),t.value=null}else p&&!t.value&&(t.submission={unspecified:!1,errors:Fn.Ls.validate(t,null)})}),[o.value]),(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&b(t.submission.errors),t.submission.warnings&&w(t.submission.warnings))}),[t.submission]),(0,l.useEffect)((function(){t.value&&a("".concat(t.id,"-unspecified"),!1)}),[t.value]);var _=(0,l.useCallback)((function(e){a("".concat(t.id,"-unspecified"),e.target.checked),n(t.id,o.value,b,w),t.value=null==r?void 0:r.handleFieldSubmission(t,o.value,d)}),[]);return!t.isHidden&&!(0,In.o)(t.readonly)&&!g&&c().createElement("div",{className:Yn.unspecified},c().createElement(h.XZJ,{id:"".concat(t.id,"-unspecified"),labelText:"Unspecified",value:"Unspecified",onChange:_,checked:o.value,disabled:t.disabled}))},er=n(51430),tr=n(7358),nr={};nr.styleTagTransform=qn(),nr.setAttributes=Wn(),nr.insert=Nn().bind(null,"head"),nr.domAPI=Un(),nr.insertStyleElement=zn(),jn()(tr.Z,nr);const rr=tr.Z&&tr.Z.locals?tr.Z.locals:void 0;function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function or(e){var t=e.error;return c().createElement(h.Jn6,{ariaLabel:"closes notification",caption:"",hideCloseButton:!0,lowContrast:!0,onClose:function(){},onCloseButtonClick:function(){},statusIconDescription:"notification",subtitle:"Message: ".concat(t.message),title:"Error rendering field"})}function sr(e){return function(e){return"obs"==e.type&&!e.questionOptions.concept&&"fixed-value"!==e.questionOptions.rendering}(e)?(e.disabled=!0,fu("text")):fu(e.questionOptions.rendering)}function ar(e){return(0,In.o)(e.unspecified)&&"toggle"!=e.questionOptions.rendering&&"encounter-location"!=e.questionOptions.rendering}const lr=function(e){var t,n,r=e.fields,i=e.onFieldChange,o=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1];return(0,l.useEffect)((function(){Promise.all(r.map((function(e){var t;return null===(t=sr(e))||void 0===t?void 0:t.then((function(t){return{field:e,control:t.default}}))}))).then((function(e){a(e)}))}),[r]),c().createElement(er.SV,{FallbackComponent:or,onReset:function(){}},c().createElement("div",{className:rr.sectionContainer},s.filter((function(e){return!!e})).map((function(e,t){var n=e.control,r=e.field;if(n){var o=c().createElement(n,{question:r,onChange:i,key:t,handler:pu(r.type),useField:Mn});return ar(r)&&"group"!=r.questionOptions.rendering?c().createElement("div",{key:t},o,c().createElement(Jn,{question:r,onChange:i,handler:pu(r.type)})):c().createElement("div",{key:t},o)}}))))};var cr=n(87421),ur={};ur.styleTagTransform=qn(),ur.setAttributes=Wn(),ur.insert=Nn().bind(null,"head"),ur.domAPI=Un(),ur.insertStyleElement=zn(),jn()(cr.Z,ur);const hr=cr.Z&&cr.Z.locals?cr.Z.locals:void 0;function dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fr=function(e){var t,n,r=e.question,i=e.onChange,o=e.deleteControl,s=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dr(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=s[0],h=s[1];(0,l.useContext)(u).encounterContext,(0,l.useEffect)((function(){r.questions&&Promise.all(r.questions.map((function(e){var t;return null===(t=sr(e))||void 0===t?void 0:t.then((function(t){return{field:e,control:t.default}}))}))).then((function(e){h(e)}))}),[r.questions]);var d=a.filter((function(e){return!!e&&!e.field.isHidden})).map((function(e,t){var n=e.control,r=e.field;if(n){var o=c().createElement(n,{question:r,onChange:i,key:t,handler:pu(r.type)});return c().createElement("div",{className:"".concat(hr.flexColumn," ").concat(hr.obsGroupColumn," ")},ar(r)?c().createElement(c().Fragment,null,o,c().createElement(Jn,{question:r,onChange:i,handler:pu(r.type)})):o)}}));return d&&o&&d.push(o),c().createElement("div",{className:hr.flexRow},d)},pr=n(14305),mr=n.n(pr),gr=n(72225),vr=n(39682);function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yr(e,t){if(e){if("string"==typeof e)return br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?br(e,t):void 0}}function wr(e,t,n,r,i){var o=t.questions.map((function(e){return e.id}));n.filter((function(e){return o.includes(e.id)})).forEach((function(t){t.isParentHidden=e,"group"==t.questionOptions.rendering&&t.questions.forEach((function(t){t.isParentHidden=e})),Cr(t,r,i)}))}function _r(e,t,n){return"toggle"==e.questionOptions.rendering?e.questionOptions.defaultValue==vr.ks:function(e,t){var n;return["radio","checkbox","select","content-switcher"].includes(e.questionOptions.rendering)&&!(null===(n=e.questionOptions.answers)||void 0===n?void 0:n.find((function(e){return e.concept==t})))?[{resultType:"error",errCode:"invalid.defaultValue",message:"Value not found in coded answers list"}]:"date"!=e.questionOptions.rendering||mr()(t).isValid()?"number"==e.questionOptions.rendering&&isNaN(t)?[{resultType:"error",errCode:"invalid.defaultValue",message:"Invalid numerical value: '".concat(t,"'")}]:[]:[{resultType:"error",errCode:"invalid.defaultValue",message:"Invalid date value: '".concat(t,"'")}]}(e,e.questionOptions.defaultValue).length?void 0:(n.handleFieldSubmission(e,e.questionOptions.defaultValue,t),e.questionOptions.defaultValue)}function Ar(e){return(0,gr.fetchConceptNameByUuid)(e).then((function(t){return"Concept Name: ".concat(t," \n UUID: ").concat(e)}))}function xr(e,t,n){return"automatic"==e?"maximized"==n&&t.endsWith("desktop"):"single-line"==e}function Cr(e,t,n){if(((0,In.o)(e.isHidden)||(0,In.o)(e.isParentHidden))&&e.value){var r=Array.isArray(e.value);(r?e.value:[e.value]).filter((function(e){return!!e.uuid})).forEach((function(e){e.voided=!0,t.push(e)})),e.value=null,n(e.id,r?[]:null)}}function Sr(e){var t=mr()(e).toDate();try{var n=e.split("T")[1].split(":");t.setHours(parseInt(n[0]),parseInt(n[1]),0)}catch(e){console.error(e)}return t}function Er(e,t){if(null==e?void 0:e.includes(":")){var n=(o=e.split(":"),s=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(o,s)||yr(o,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],i=n[1];return null==t?void 0:t.find((function(e){var t;return null==e||null===(t=e.conceptMappings)||void 0===t?void 0:t.find((function(e){var t,n,o;return(null==e||null===(t=e.conceptReferenceTerm)||void 0===t||null===(n=t.conceptSource)||void 0===n?void 0:n.name.toUpperCase())===r.toUpperCase()&&(null==e||null===(o=e.conceptReferenceTerm)||void 0===o?void 0:o.code.toUpperCase())===i.toUpperCase()}))}))}var o,s;return null==t?void 0:t.find((function(t){return t.uuid===e}))}var kr=n(14018),$r={};$r.styleTagTransform=qn(),$r.setAttributes=Wn(),$r.insert=Nn().bind(null,"head"),$r.domAPI=Un(),$r.insertStyleElement=zn(),jn()(kr.Z,$r);const Mr=kr.Z&&kr.Z.locals?kr.Z.locals:void 0;var Tr=function(e){var t=e.value,n=e.tooltipText;return c().createElement("div",{className:Mr.label},c().createElement(h.IiX,{direction:"bottom",tabIndex:0,tooltipText:n},c().createElement("span",{className:"cds--label"},t)))},Rr=n(38388),Lr={};Lr.styleTagTransform=qn(),Lr.setAttributes=Wn(),Lr.insert=Nn().bind(null,"head"),Lr.domAPI=Un(),Lr.insertStyleElement=zn(),jn()(Rr.Z,Lr);const Or=Rr.Z&&Rr.Z.locals?Rr.Z.locals:void 0;var Fr=function(){return c().createElement("div",null,c().createElement("span",{className:Or.empty},"(Blank)"))},Ir=function(e){var t=e.value;return Array.isArray(t)?c().createElement(Dr,{valueArray:t}):c().createElement("span",{className:Or.value},t)},Dr=function(e){var t=e.valueArray;return c().createElement("ul",null,t.map((function(e){return c().createElement("li",{className:Or.item},e)})))},jr=n(93481),Pr={};Pr.styleTagTransform=qn(),Pr.setAttributes=Wn(),Pr.insert=Nn().bind(null,"head"),Pr.domAPI=Un(),Pr.insertStyleElement=zn(),jn()(jr.Z,Pr);const Ur=jr.Z&&jr.Z.locals?jr.Z.locals:void 0;var Br=function(e){var t=e.label,n=e.conceptName,r=e.value,i=e.isInline;return c().createElement("div",{className:Ur.readonly},i&&c().createElement("div",{className:Ur.formField},c().createElement(h.X2j,null,c().createElement(h.sgG,{lg:5,md:5},c().createElement(Tr,{value:t,tooltipText:n})),c().createElement(h.sgG,{className:Ur.value},(0,Fn.xb)(r)?c().createElement(Fr,null):c().createElement(Ir,{value:r})))),!i&&c().createElement("div",{className:Ur.formField},c().createElement(Tr,{value:t,tooltipText:n}),c().createElement("div",{className:Ur.value},r?c().createElement(Ir,{value:r}):c().createElement(Fr,null))))},Nr=n(14893),Hr={};Hr.styleTagTransform=qn(),Hr.setAttributes=Wn(),Hr.insert=Nn().bind(null,"head"),Hr.domAPI=Un(),Hr.insertStyleElement=zn(),jn()(Nr.Z,Hr);const Wr=Nr.Z&&Nr.Z.locals?Nr.Z.locals:void 0;function Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Gr=function(e){var t=e.question,n=e.onChange,r=e.handler,i=zr(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=zr((0,l.useState)([]),2),g=m[0],v=m[1],b=zr((0,l.useState)("Loading..."),2),y=b[0],w=b[1];(0,l.useEffect)((function(){var e,n;(null===(e=t.submission)||void 0===e?void 0:e.errors)&&v(null===(n=t.submission)||void 0===n?void 0:n.errors)}),[t]);var _=(0,l.useMemo)((function(){return t.questionOptions.answers.findIndex((function(e){return e.concept==o.value}))}),[o.value,t.questionOptions.answers]);(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){w(e)}))}),[y,t.questionOptions.concept]);var A=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:Wr.formField},c().createElement(Br,{label:t.label,value:o.value?null==r?void 0:r.getDisplayValue(t,o.value):o.value,conceptName:y,isInline:A})):!t.isHidden&&c().createElement("div",{className:Wr.textContainer},c().createElement(h.cwH,{legendText:t.label,className:g.length?Wr.errorLegend:""},c().createElement(h.GHR,{onChange:function(e){a(t.id,null==e?void 0:e.name),n(t.id,null==e?void 0:e.name,v,null),t.value=null==r?void 0:r.handleFieldSubmission(t,null==e?void 0:e.name,d)},selectedIndex:_,className:Wr.selectedOption},t.questionOptions.answers.map((function(e,n){return c().createElement(h.rsf,{className:_===n?Wr.switchOverrides:Wr.sansSwitchOverrides,name:e.concept||e.value,text:e.label,key:n,disabled:t.disabled})})))))},qr=n(63397),Kr=n(25581),Zr={};Zr.styleTagTransform=qn(),Zr.setAttributes=Wn(),Zr.insert=Nn().bind(null,"head"),Zr.domAPI=Un(),Zr.insertStyleElement=zn(),jn()(Kr.Z,Zr);const Yr=Kr.Z&&Kr.Z.locals?Kr.Z.locals:void 0;var Xr=function(e){var t=e.value,n=e.displayText,r=e.setValue,i=e.hideHeader,o=(0,qr.useTranslation)().t;return c().createElement("div",{className:Yr.formField},!i&&c().createElement("span",{className:"cds--label"},o("previousValue","Previous value")),c().createElement("div",{className:Yr.row},c().createElement(Ir,{value:n}),c().createElement(h.zxk,{className:Yr.reuseButton,kind:"ghost",onClick:function(e){e.preventDefault(),r(t)}},o("reuse","Reuse"))))},Qr=n(91850),Jr={};Jr.styleTagTransform=qn(),Jr.setAttributes=Wn(),Jr.insert=Nn().bind(null,"head"),Jr.domAPI=Un(),Jr.insertStyleElement=zn(),jn()(Qr.Z,Jr);const ei=Qr.Z&&Qr.Z.locals?Qr.Z.locals:void 0;function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ni(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ri(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ii=new Intl.DateTimeFormat(window.navigator.language);function oi(e,t){var n=e.toLocaleDateString(window.navigator.language);return"datetime"==t?"".concat(n," ").concat(e.toLocaleTimeString()):n}const si=function(e){var t,n,r=e.question,i=e.onChange,o=e.handler,s=ri(Mn(r.id),2),a=s[0],d=(s[1],c().useContext(u)),f=d.setFieldValue,p=d.encounterContext,m=d.layoutType,g=d.workspaceLayout,v=d.fields,b=ri((0,l.useState)([]),2),y=b[0],w=b[1],_=ri((0,l.useState)([]),2),A=_[0],x=_[1],C=ri((0,l.useState)("Loading..."),2),S=C[0],E=C[1],k=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[y]),$=ri((0,l.useState)(null),2),M=$[0],T=$[1],R=ri((0,l.useState)(""),2),L=R[0],O=R[1];(0,l.useEffect)((function(){r.submission&&(r.submission.errors&&w(r.submission.errors),r.submission.warnings&&x(r.submission.warnings))}),[r.submission]);var F=(0,l.useMemo)((function(){return!("view"!=p.sessionMode&&!(0,In.o)(r.readonly))&&xr(r.inlineRendering,m,g)}),[p.sessionMode,r.readonly,r.inlineRendering,m,g]),I=function(e){var t=ri(e,1)[0],n=ni(t,Date)?new Date(t.getTime()-6e4*t.getTimezoneOffset()):t;f(r.id,n),i(r.id,n,w,x),D(!1,!0),r.value=null==o?void 0:o.handleFieldSubmission(r,n,p)},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){var n=(null==p?void 0:p.previousEncounter)&&(null==o?void 0:o.getPreviousValue(r,null==p?void 0:p.previousEncounter,v));O(mr()(null==n?void 0:n.value).format("hh:mm"))}else{var s,l,c=e.target.value,u=a.value,h=c.split(":");u.setHours(null!==(s=h[0])&&void 0!==s?s:"00",null!==(l=h[1])&&void 0!==l?l:"00"),f(r.id,u),i(r.id,u,w,x),r.value=null==o?void 0:o.handleFieldSubmission(r,u,p),O(c)}},j=(0,l.useMemo)((function(){var e=ii.formatToParts(new Date);return{placeholder:e.map((function(e){switch(e.type){case"day":return"dd";case"month":return"mm";case"year":return"yyyy";default:return e.value}})).join(""),carbonDateformat:e.map((function(e){switch(e.type){case"day":return"d";case"month":return"m";case"year":return"Y";default:return e.value}})).join("")}}),[]),P=j.placeholder,U=j.carbonDateformat;return(0,l.useEffect)((function(){if((null==p?void 0:p.previousEncounter)&&!(0,In.o)(r.questionOptions.usePreviousValueDisabled)){var e=null==o?void 0:o.getPreviousValue(r,null==p?void 0:p.previousEncounter,v);if(!(0,Fn.xb)(null==e?void 0:e.value)){if("datetime"===(null==r?void 0:r.questionOptions.rendering)){var t=new Date(e.value);e={display:mr()(e.value).format("M/D/YYYY HH:mm"),value:[t]}}else e.display=ii.format(e.value),e.value=[e.value];T(e)}}}),[null==p?void 0:p.previousEncounter]),(0,l.useEffect)((function(){Ar(r.questionOptions.concept).then((function(e){E(e)}))}),[S]),(0,l.useEffect)((function(){if(!L&&a.value&&ni(a.value,Date)){var e=a.value.getHours()<10?"0".concat(a.value.getHours()):"".concat(a.value.getHours()),t=a.value.getMinutes()<10?"0".concat(a.value.getMinutes()):"".concat(a.value.getMinutes());O([e,t].join(":"))}}),[a.value,L]),"view"==p.sessionMode||(0,In.o)(r.readonly)?c().createElement(Br,{label:r.label,value:ni(a.value,Date)?oi(a.value,r.questionOptions.rendering):a.value,conceptName:S,isInline:F}):!r.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:"".concat(ei.formField," ").concat(ei.row," ").concat(ei.datetime)},c().createElement("div",null,c().createElement(h.Mtg,{datePickerType:"single",onChange:I,className:"".concat(ei.datePickerOverrides," ").concat(k?ei.errorLabel:""," ").concat(r.disabled||(0,In.o)(r.readonly)?ei.disabled:""),dateFormat:U},c().createElement(h.aj6,{id:r.id,placeholder:P,labelText:r.label,value:ni(a.value,Date)?a.value.toLocaleDateString(window.navigator.language):a.value,onChange:function(e){return I([mr()(e.target.value,"DD/MM/YYYY").toDate()])},disabled:r.disabled,invalid:!k&&y.length>0,invalidText:null===(t=y[0])||void 0===t?void 0:t.message,warn:A.length>0,warnText:null===(n=A[0])||void 0===n?void 0:n.message}))),"datetime"===(null==r?void 0:r.questionOptions.rendering)?c().createElement(h.jII,{className:ei.timePicker,id:r.id,labelText:"Time:",placeholder:"HH:MM",pattern:"(1[012]|[1-9]):[0-5][0-9])$",type:"time",disabled:!a.value,value:L||(ni(a.value,Date)?a.value.toLocaleDateString(window.navigator.language):a.value),onChange:D}):"",M&&c().createElement("div",{className:"".concat(ei.formField)},c().createElement(Xr,{value:M.value,displayText:M.display,setValue:I}))))};var ai=n(81132),li=n(25123),ci={};ci.styleTagTransform=qn(),ci.setAttributes=Wn(),ci.insert=Nn().bind(null,"head"),ci.domAPI=Un(),ci.insertStyleElement=zn(),jn()(li.Z,ci);const ui=li.Z&&li.Z.locals?li.Z.locals:void 0;function hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fi=function(e){var t=e.question,n=di(Mn(t.id),2),r=n[0],i=(n[1],(0,l.useContext)(u)),o=i.setEncounterLocation,s=i.setFieldValue,a=i.encounterContext,d=di((0,l.useState)([]),2),f=d[0],p=d[1],m=di((0,l.useState)("Loading..."),2),g=m[0],v=m[1];return(0,l.useEffect)((function(){t.questionOptions.locationTag&&(0,gr.getLocationsByTag)(t.questionOptions.locationTag.trim().split(" ").join("%20")).subscribe((function(e){return p(e)}),(function(e){return(0,ai.createErrorHandler)()}))}),[]),(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){v(e)}))}),[g]),"view"==a.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:ui.formField},c().createElement(Br,{label:t.label,value:r.value?r.value.display:r.value,conceptName:g,isInline:!0})):!t.isHidden&&c().createElement("div",{className:"".concat(ui.formInputField," ").concat(ui.multiselectOverride," ").concat(ui.flexRow)},c().createElement(h.Ltx,{id:t.id,titleText:t.label,label:"Choose location",items:f,itemToString:function(e){return e.display},selectedItem:r.value,onChange:function(e){var n=e.selectedItem;s(t.id,n),o(n)},disabled:t.disabled}))},pi=n(35508),mi={};mi.styleTagTransform=qn(),mi.setAttributes=Wn(),mi.insert=Nn().bind(null,"head"),mi.domAPI=Un(),mi.insertStyleElement=zn(),jn()(pi.Z,mi);const gi=pi.Z&&pi.Z.locals?pi.Z.locals:void 0;function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var yi=function(e){var t,n,r,i,o=e.question,s=e.onChange,a=e.handler,d=(0,qr.useTranslation)().t,f=bi(Mn(o.id),2),p=f[0],m=(f[1],c().useContext(u)),g=m.setFieldValue,v=m.encounterContext,b=m.layoutType,y=m.workspaceLayout,w=bi((0,l.useState)([]),2),_=w[0],A=w[1],x=bi((0,l.useState)([]),2),C=x[0],S=x[1],E=bi((0,l.useState)(0),2),k=E[0],$=E[1],M=bi((0,l.useState)(!1),2),T=M[0],R=M[1],L=bi((0,l.useState)("Loading..."),2),O=L[0],F=L[1],I=(0,l.useMemo)((function(){var e;return(null===(e=_[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[_]);(0,l.useEffect)((function(){(p.value&&0==p.value.length||!T&&o.value)&&$(k+1)}),[p.value]),(0,l.useEffect)((function(){o.submission&&(o.submission.errors&&A(o.submission.errors),o.submission.warnings&&S(o.submission.warnings))}),[o.submission]);var D=o.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e,t){return{id:"".concat(o.id,"-").concat(e.concept),concept:e.concept,label:e.label,key:t}})),j=[];D.forEach((function(e){var t;(null===(t=p.value)||void 0===t?void 0:t.includes(e.concept))&&j.push(e)})),(0,l.useEffect)((function(){Ar(o.questionOptions.concept).then((function(e){F(e)}))}),[O]);var P=(0,l.useMemo)((function(){return!("view"!=v.sessionMode&&!(0,In.o)(o.readonly))&&xr(o.inlineRendering,b,y)}),[v.sessionMode,o.readonly,o.inlineRendering,b,y]);return"view"==v.sessionMode||(0,In.o)(o.readonly)?c().createElement("div",{className:gi.formField},c().createElement(Br,{label:o.label,value:p.value?null==a?void 0:a.getDisplayValue(o,p.value):p.value,conceptName:O,isInline:P})):!o.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:I?"".concat(gi.multiselectOverride," ").concat(gi.errorLabel):"".concat(gi.multiselectOverride)},c().createElement(h._nR,{placeholder:d("filterItemsInMultiselect","Search..."),onChange:function(e){var t=e.selectedItems;R(!0);var n=t.map((function(e){return e.concept}));g(o.id,n),s(o.id,n,A,S),o.value=null==a?void 0:a.handleFieldSubmission(o,n,v)},id:o.label,items:D,initialSelectedItems:j,label:"",titleText:o.label,key:k,itemToString:function(e){return e?e.label:" "},disabled:o.disabled,invalid:!I&&_.length>0,invalidText:null===(t=_[0])||void 0===t?void 0:t.message,warn:C.length>0,warnText:null===(n=C[0])||void 0===n?void 0:n.message})),c().createElement("div",{className:gi.formField,style:{marginTop:"0.125rem"}},(null===(r=p.value)||void 0===r?void 0:r.length)?c().createElement(h.QI$,{className:gi.list},null===(i=null==a?void 0:a.getDisplayValue(o,p.value))||void 0===i?void 0:i.map((function(e){return e+", "}))):c().createElement(Fr,null)))},wi=n(9592),_i={};_i.styleTagTransform=qn(),_i.setAttributes=Wn(),_i.insert=Nn().bind(null,"head"),_i.domAPI=Un(),_i.insertStyleElement=zn(),jn()(wi.Z,_i);const Ai=wi.Z&&wi.Z.locals?wi.Z.locals:void 0;function xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ci(){return Ci=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ci.apply(this,arguments)}function Si(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return xi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ei=function(e){var t,n,r=e.question,i=e.onChange,o=e.handler,s=Si(Mn(r.id),2),a=s[0],d=(s[1],c().useContext(u)),f=d.setFieldValue,p=d.encounterContext,m=d.layoutType,g=d.workspaceLayout,v=d.fields,b=Si((0,l.useState)(),2),y=b[0],w=b[1],_=Si((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=Si((0,l.useState)([]),2),S=C[0],E=C[1],k=(0,l.useMemo)((function(){var e;return(null===(e=S[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[S]),$=Si((0,l.useState)([]),2),M=$[0],T=$[1],R=Si((0,l.useState)(null),2),L=R[0],O=R[1];(0,l.useEffect)((function(){r.submission&&(r.submission.errors&&E(r.submission.errors),r.submission.warnings&&T(r.submission.warnings))}),[r.submission]),a.onBlur=function(e){e&&e.target.value!=a.value&&(a.value=e.target.value,f(r.id,e.target.value)),a.value&&r.unspecified&&f("".concat(r.id,"-unspecified"),!1),y!==a.value&&(i(r.id,a.value,E,T),r.value=null==o?void 0:o.handleFieldSubmission(r,a.value,p))},(0,l.useEffect)((function(){if((null==p?void 0:p.previousEncounter)&&!(0,In.o)(r.questionOptions.usePreviousValueDisabled)){var e=null==o?void 0:o.getPreviousValue(r,null==p?void 0:p.previousEncounter,v);(0,Fn.xb)(null==e?void 0:e.value)||O(e)}}),[null==p?void 0:p.previousEncounter]),(0,l.useEffect)((function(){Ar(r.questionOptions.concept).then((function(e){x(e)}))}),[A]);var F=(0,l.useMemo)((function(){return!("view"!=p.sessionMode&&!(0,In.o)(r.readonly))&&xr(r.inlineRendering,m,g)}),[p.sessionMode,r.readonly,r.inlineRendering,m,g]);return"view"==p.sessionMode||(0,In.o)(r.readonly)?c().createElement("div",{className:Ai.formField},c().createElement(Br,{label:r.label,value:a.value?null==o?void 0:o.getDisplayValue(r,a.value):a.value,conceptName:A,isInline:F})):!r.isHidden&&c().createElement("div",{className:"".concat(Ai.numberInputWrapper," ").concat(Ai.row)},c().createElement("div",null,c().createElement(h.Y2U,Ci({},a,{id:r.id,invalid:!k&&S.length>0,invalidText:null===(t=S[0])||void 0===t?void 0:t.message,label:r.label,max:r.questionOptions.max||void 0,min:r.questionOptions.min||void 0,name:r.id,value:a.value||"",onFocus:function(){return w(a.value)},allowEmpty:!0,size:"lg",hideSteppers:!0,onWheel:function(e){return e.target.blur()},disabled:r.disabled,className:k?Ai.errorLabel:"",warn:M.length>0,warnText:null===(n=M[0])||void 0===n?void 0:n.message,step:"0.01"}))),L&&c().createElement("div",null,c().createElement(Xr,{value:L.value,displayText:L.display,setValue:function(e){f(r.id,e),a.value=e,a.onBlur(null)}})))};var ki=n(66168),$i={};$i.styleTagTransform=qn(),$i.setAttributes=Wn(),$i.insert=Nn().bind(null,"head"),$i.domAPI=Un(),$i.insertStyleElement=zn(),jn()(ki.Z,$i);const Mi=ki.Z&&ki.Z.locals?ki.Z.locals:void 0;function Ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ri(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ti(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Li=function(e){var t=e.question,n=e.onChange,r=e.handler,i=Ri(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=s.fields,g=Ri((0,l.useState)([]),2),v=g[0],b=g[1],y=Ri((0,l.useState)("Loading..."),2),w=y[0],_=y[1],A=(0,l.useMemo)((function(){var e;return(null===(e=v[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[v]),x=Ri((0,l.useState)(null),2),C=x[0],S=x[1],E=Ri((0,l.useState)("3.1rem"),2),k=(E[0],E[1]),$=Ri((0,l.useState)([]),2),M=$[0],T=$[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&b(t.submission.errors),t.submission.warnings&&T(t.submission.warnings))}),[t.submission]);var R=function(e){a(t.id,e),n(t.id,e,b,T),t.value=null==r?void 0:r.handleFieldSubmission(t,e,d)};(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){_(e)}))}),[w]),(0,l.useEffect)((function(){if((null==d?void 0:d.previousEncounter)&&!(0,In.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==r?void 0:r.getPreviousValue(t,null==d?void 0:d.previousEncounter,m);(0,Fn.xb)(null==e?void 0:e.value)||(S(e),k(t.questionOptions.answers.length>2?"3.1rem":"1.2rem"))}}),[null==d?void 0:d.previousEncounter]);var L=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:Mi.formField},c().createElement(Br,{label:t.label,value:o.value?null==r?void 0:r.getDisplayValue(t,o.value):o.value,conceptName:w,isInline:L})):!t.isHidden&&c().createElement("div",{className:Mi.row},c().createElement(h.cwH,{legendText:t.label,className:A?Mi.errorLegend:void 0,disabled:t.disabled,invalid:!A&&v.length>0},c().createElement(h.SYO,{defaultSelected:"default-selected",name:t.id,valueSelected:o.value,onChange:R,orientation:"vertical"},t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e,n){return c().createElement(h.EUY,{id:"".concat(t.id,"-").concat(e.label),labelText:e.label,value:e.concept,key:n})}))),!A&&(null==v?void 0:v.length)>0||M.length>0&&c().createElement("div",{className:v.length?Mi.errorLabel:M.length?Mi.warningLabel:""},c().createElement("div",{className:"cds--form-requirement"},v.length?v[0].message:M.length?M[0].message:null))),C?c().createElement(h.cwH,{legendText:null},c().createElement(Xr,{value:C.value,displayText:C.display,setValue:R})):null)};var Oi=n(1943),Fi={};Fi.styleTagTransform=qn(),Fi.setAttributes=Wn(),Fi.insert=Nn().bind(null,"head"),Fi.domAPI=Un(),Fi.insertStyleElement=zn(),jn()(Oi.Z,Fi);const Ii=Oi.Z&&Oi.Z.locals?Oi.Z.locals:void 0;function Di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ji(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Di(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Pi=function(e){var t=e.question,n=e.onChange,r=e.handler,i=ji(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=s.fields,g=ji(c().useState([]),2),v=(g[0],g[1]),b=ji((0,l.useState)([]),2),y=b[0],w=b[1],_=ji((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[y]),S=ji((0,l.useState)(null),2),E=S[0],k=S[1],$=ji((0,l.useState)([]),2),M=$[0],T=$[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&w(t.submission.errors),t.submission.warnings&&T(t.submission.warnings))}),[t.submission]);var R=function(e){a(t.id,e),n(t.id,e,w,T),t.value=null==r?void 0:r.handleFieldSubmission(t,e,d)};(0,l.useEffect)((function(){v(t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e){return e.value||e.concept})))}),[t.questionOptions.answers]),(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){x(e)}))}),[A]),(0,l.useEffect)((function(){if((null==d?void 0:d.previousEncounter)&&!(0,In.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==r?void 0:r.getPreviousValue(t,null==d?void 0:d.previousEncounter,m);(0,Fn.xb)(null==e?void 0:e.value)||k(e)}}),[null==d?void 0:d.previousEncounter]);var L=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement(Br,{label:t.label,value:o.value?null==r?void 0:r.getDisplayValue(t,o.value):o.value,conceptName:A,isInline:L}):!t.isHidden&&c().createElement("div",{className:"".concat(Ii.formInputField," ").concat(Ii.row)},c().createElement("div",{className:C?"".concat(Ii.errorLabel," ").concat(Ii.dropdown):Ii.dropdown},c().createElement(h.Ltx,{id:t.id,titleText:t.label,label:"Choose an option",items:t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e){return e.value||e.concept})),itemToString:function(e){var n=t.questionOptions.answers.find((function(t){return t.value?t.value==e:t.concept==e}));return null==n?void 0:n.label},selectedItem:o.value,onChange:function(e){var t=e.selectedItem;return R(t)},disabled:t.disabled,invalid:!C&&y.length>0,invalidText:y.length&&y[0].message,warn:M.length>0,warnText:M.length&&M[0].message})),E&&c().createElement("div",null,c().createElement(Xr,{value:E.value,displayText:E.display,setValue:R})))};var Ui=n(53162),Bi={};Bi.styleTagTransform=qn(),Bi.setAttributes=Wn(),Bi.insert=Nn().bind(null,"head"),Bi.domAPI=Un(),Bi.insertStyleElement=zn(),jn()(Ui.Z,Bi);const Ni=Ui.Z&&Ui.Z.locals?Ui.Z.locals:void 0;function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(){return Wi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wi.apply(this,arguments)}function Vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const zi=function(e){var t=e.question,n=e.onChange,r=e.handler,i=Vi(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=Vi((0,l.useState)(),2),g=m[0],v=m[1],b=Vi((0,l.useState)([]),2),y=b[0],w=b[1],_=Vi((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[y]),S=Vi((0,l.useState)([]),2),E=S[0],k=S[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&w(t.submission.errors),t.submission.warnings&&k(t.submission.warnings))}),[t.submission]),o.onBlur=function(){o.value&&t.unspecified&&a("".concat(t.id,"-unspecified"),!1),g!==o.value&&(n(t.id,o.value,w,k),t.value=null==r?void 0:r.handleFieldSubmission(t,o.value,d))},(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){x(e)}))}),[A]);var $=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:Ni.formField},c().createElement(Br,{label:t.label,value:o.value,conceptName:A,isInline:$})):!t.isHidden&&c().createElement("div",{className:Ni.formField},c().createElement("div",{className:C?"".concat(Ni.textInputOverrides," ").concat(Ni.errorLabel):Ni.textInputOverrides},c().createElement(h.Kx8,Wi({},o,{id:t.id,labelText:t.label,name:t.id,value:o.value||"",onFocus:function(){return v(o.value)},rows:t.questionOptions.rows||4,disabled:t.disabled,invalid:!C&&y.length>0,invalidText:y.length&&y[0].message,warn:E.length>0,warnText:E.length&&E[0].message}))))};var Gi=Object.prototype.hasOwnProperty;var qi=n(39891),Ki={};Ki.styleTagTransform=qn(),Ki.setAttributes=Wn(),Ki.insert=Nn().bind(null,"head"),Ki.domAPI=Un(),Ki.insertStyleElement=zn(),jn()(qi.Z,Ki);const Zi=qi.Z&&qi.Z.locals?qi.Z.locals:void 0;function Yi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xi(){return Xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xi.apply(this,arguments)}function Qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Yi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ji=function(e){var t=e.question,n=e.onChange,r=e.handler,i=Qi(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=s.fields,g=Qi((0,l.useState)(),2),v=g[0],b=g[1],y=Qi((0,l.useState)([]),2),w=y[0],_=y[1],A=Qi((0,l.useState)([]),2),x=A[0],C=A[1],S=Qi((0,l.useState)("Loading..."),2),E=S[0],k=S[1],$=(0,l.useMemo)((function(){var e;return(null===(e=w[0])||void 0===e?void 0:e.errCode)==Fn.Tv}),[w]),M=Qi((0,l.useState)(null),2),T=M[0],R=M[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&_(t.submission.errors),t.submission.warnings&&C(t.submission.warnings))}),[t.submission]),(0,l.useEffect)((function(){if((null==d?void 0:d.previousEncounter)&&!(0,In.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==r?void 0:r.getPreviousValue(t,null==d?void 0:d.previousEncounter,m);(function(e){if(null==e)return!0;if(Pe(e)&&((0,pe.Z)(e)||"string"==typeof e||"function"==typeof e.splice||be(e)||Te(e)||(0,fe.Z)(e)))return!e.length;var t=wt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Fe(e))return!je(e).length;for(var n in e)if(Gi.call(e,n))return!1;return!0})(null==e?void 0:e.value)||R(e)}}),[null==d?void 0:d.previousEncounter]),o.onBlur=function(){o.value&&t.unspecified&&a("".concat(t.id,"-unspecified"),!1),v!==o.value&&(n(t.id,o.value,_,C),t.value=null==r?void 0:r.handleFieldSubmission(t,o.value,d))},(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){k(e)}))}),[E]);var L=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:Zi.formField},c().createElement(Br,{label:t.label,value:o.value,conceptName:E,isInline:L})):!t.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:"".concat(Zi.formField," ").concat(Zi.row)},c().createElement("div",{className:$?"".concat(Zi.textInputOverrides," ").concat(Zi.errorLabel):Zi.textInputOverrides},c().createElement(h.oil,Xi({},o,{id:t.id,labelText:t.label,name:t.id,value:o.value||"",onFocus:function(){return b(o.value)},disabled:t.disabled,invalid:!$&&w.length>0,invalidText:w.length&&w[0].message,warn:x.length>0,warnText:x.length&&x[0].message,onInvalid:function(e){return e.preventDefault()},maxLength:t.questionOptions.max||h.oil.maxLength}))),T&&c().createElement("div",null,c().createElement(Xr,{value:T.value,displayText:T.display,setValue:function(e){a(t.id,e),o.value=e,o.onBlur(null)}}))))};var eo=n(44491),to={};to.styleTagTransform=qn(),to.setAttributes=Wn(),to.insert=Nn().bind(null,"head"),to.domAPI=Un(),to.insertStyleElement=zn(),jn()(eo.Z,to);const no=eo.Z&&eo.Z.locals?eo.Z.locals:void 0;function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function io(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ro(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const oo=function(e){var t=e.question,n=e.onChange,r=e.handler,i=io(Mn(t.id),2),o=i[0],s=(i[1],c().useContext(u)),a=s.setFieldValue,d=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,m=io((0,l.useState)("Loading..."),2),g=m[0],v=m[1];(0,l.useEffect)((function(){var e;t.value||"enter"!=d.sessionMode||(t.value=null==r?void 0:r.handleFieldSubmission(t,null!==(e=o.value)&&void 0!==e&&e,d))}),[]),(0,l.useEffect)((function(){Ar(t.questionOptions.concept).then((function(e){v(e)}))}),[g]);var b=(0,l.useMemo)((function(){return!("view"!=d.sessionMode&&!(0,In.o)(t.readonly))&&xr(t.inlineRendering,f,p)}),[d.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==d.sessionMode||(0,In.o)(t.readonly)?c().createElement("div",{className:no.formField},c().createElement(Br,{label:t.label,value:(0,Fn.xb)(o.value)?o.value:null==r?void 0:r.getDisplayValue(t,o.value),conceptName:g,isInline:b})):!t.isHidden&&c().createElement("div",{className:no.formField},c().createElement(h.ZDl,{labelText:t.label,id:t.id,labelA:t.questionOptions.toggleOptions.labelFalse,labelB:t.questionOptions.toggleOptions.labelTrue,onToggle:function(e){a(t.id,e),n(t.id,e,null,null),t.value=null==r?void 0:r.handleFieldSubmission(t,e,d)},toggled:!!o.value,disabled:t.disabled}))};var so=n(92039),ao=n(52100),lo=n(13801),co=n(36475),uo={};uo.styleTagTransform=qn(),uo.setAttributes=Wn(),uo.insert=Nn().bind(null,"head"),uo.domAPI=Un(),uo.insertStyleElement=zn(),jn()(co.Z,uo);const ho=co.Z&&co.Z.locals?co.Z.locals:void 0;function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function po(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||go(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mo(e){return function(e){if(Array.isArray(e))return fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||go(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function go(e,t){if(e){if("string"==typeof e)return fo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,t):void 0}}var vo=function(e,t,n){return mo(new Set(n)).forEach((function(n){e.match(n)&&(e=e.replace(new RegExp(n,"g"),"".concat(n,"-").concat(t)))})),e},bo=function(e){var t,n,r=e.question,i=e.onChange,o=(0,qr.useTranslation)().t,s=po((0,l.useState)([r]),2),a=s[0],d=s[1],f=c().useContext(u),p=f.fields,m=f.encounterContext,g=f.obsGroupsToVoid,v=yn(),b=v.values,y=v.setValues,w=po((0,l.useState)(1),2),_=w[0],A=w[1];(0,l.useEffect)((function(){if(m.encounter&&!_){var e,t=null===(e=r.value)||void 0===e?void 0:e.uuid,n=m.encounter.obs.filter((function(e){return e.concept.uuid===r.questionOptions.concept&&e.uuid!=t})),i=_;n.forEach((function(e){x(i+=1,e)})),A(i)}}),[b]),(0,l.useEffect)((function(){a[0]=r,d(mo(a))}),[r]);var x=function(e,t){var n=[],i=e,o=nn(r);o.value=t,o.id="".concat(o.id,"-").concat(i),o.questions.forEach((function(e){n.push(e.id)})),o.questions.forEach((function(e){var r;e.id="".concat(e.id,"-").concat(i),e.groupId=o.id,e.value=null;var s=t?function(e,t){var n,r=e.questionOptions.rendering,i=t.groupMembers.filter((function(t){return t.concept.uuid==e.questionOptions.concept}));return i.length?(e.value=i[0],"radio"!=r&&"content-switcher"!=r||(0,gr.getConcept)(e.questionOptions.concept,"custom:(uuid,display,datatype:(uuid,display,name))").subscribe((function(t){"Boolean"==t.datatype.name&&(e.value.value=i[0].value.uuid)})),"string"==typeof i[0].value||"number"==typeof i[0].value?"date"==e.questionOptions.rendering?mr()(i[0].value).toDate():i[0].value:"checkbox"==e.questionOptions.rendering?(e.value=i,e.value.map((function(e){return e.value.uuid}))):"toggle"==e.questionOptions.rendering?(e.value.value=i[0].value.uuid,i[0].value==vr.ks):null===(n=i[0].value)||void 0===n?void 0:n.uuid):""}(e,t):null;if(b["".concat(e.id)]=s||("checkbox"==e.questionOptions.rendering?[]:""),e.hide&&e.hide.hideWhenExpression){var a=vo(e.hide.hideWhenExpression,i,n);e.hide.hideWhenExpression=a,e.isHidden=(0,lo.j3)(a,{value:e,type:"field"},p,b,{mode:m.sessionMode,patient:m.patient})}if(e.validators&&e.validators.length>0){var l=!0,c=!1,u=void 0;try{for(var h,d=e.validators[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){var f=h.value;"js_expression"===f.type&&(f.failsWhenExpression=vo(f.failsWhenExpression,i,n))}}catch(e){c=!0,u=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw u}}}if(null===(r=e.questionOptions.calculate)||void 0===r?void 0:r.calculateExpression){var g,v=vo(null===(g=e.questionOptions.calculate)||void 0===g?void 0:g.calculateExpression,i,n),y=(0,lo.j3)(v,{value:e,type:"field"},p,b,{mode:m.sessionMode,patient:m.patient});(0,Fn.xb)(y)||(b[e.id]=y,pu(e.type).handleFieldSubmission(e,y,m))}p.push(e)})),y(b),p.push(o),a.push(o),d(a)},C=a.map((function(e,t){var n=a.length>1?c().createElement("div",null,c().createElement("div",{className:ho.removeButton},c().createElement(h.zxk,{renderIcon:function(){return c().createElement(so.ZN,{size:16})},kind:"danger--tertiary",onClick:function(){return function(e){e.value&&e.value.uuid&&(e.value.voided=!0,delete e.value.value,g.push(e.value)),d(a.filter((function(t){return t.id!==e.id}))),[e.id].concat(mo(e.questions.map((function(e){return e.id})))).forEach((function(e){var t=p.findIndex((function(t){return t.id===e}));p.splice(t,1),delete b[e]})),A(_-1)}(e)},hasIconOnly:!0}))):null;return c().createElement(c().Fragment,null,0!==t&&c().createElement("div",null,c().createElement("hr",{className:ho.separator})),c().createElement("div",{className:ho.obsGroupContainer},c().createElement(fr,{question:e,onChange:i,handler:pu("obsGroup"),deleteControl:n})))}));return"view"!=m.sessionMode&&C.push(c().createElement("div",null,function(e,t){var n=Number(e);return!(!Number.isNaN(n)&&n>0)||t<n}(null===(t=r.questionOptions.repeatOptions)||void 0===t?void 0:t.limit,_)&&c().createElement(h.zxk,{renderIcon:function(){return c().createElement(ao.mm,{size:16})},className:ho.repeatButton,kind:"tertiary",onClick:function(){var e=_+1;x(e,null),A(e)}},c().createElement("span",null,(null===(n=r.questionOptions.repeatOptions)||void 0===n?void 0:n.addText)||"".concat(o("add","Add")))))),!r.isHidden&&c().createElement("div",{className:ho.container},c().createElement(h.cwH,{legendText:r.label,className:ho.boldLegend},C))},yo=[],wo={handleFieldSubmission:function(e,t,n){if("checkbox"==e.questionOptions.rendering)return xo(e,t,n);if("toggle"==e.questionOptions.rendering)return _o(t,n,e);if(e.value)"edit"!=n.sessionMode||t?t?(e.questionOptions.rendering.startsWith("date")?e.value.value=mr()(t).format("YYYY-MM-DD HH:mm"):e.value.value=t,e.value.voided=!1):e.value=void 0:e.value.voided=!0;else{if(e.questionOptions.rendering.startsWith("date"))return e.value=_o(mr()(t).format("YYYY-MM-DD HH:mm"),n,e),e.value;e.value=_o(t,n,e)}return e.value},getInitialValue:function(e,t,n){var r=Ao(e.obs,yo,t),i=t.questionOptions.rendering,o=null,s=null;if(r&&t.groupId)return"";if(!r&&t.groupId&&(o=n.find((function(e){return e.id==t.groupId})),(s=Ao(e.obs,null,o))&&(yo.push(s.uuid),o.value=s,s.groupMembers&&(r=Ao(s.groupMembers,yo,t)))),r){var a;if(yo.push(r.uuid),t.value=JSON.parse(JSON.stringify(r)),"radio"!=i&&"content-switcher"!=i||(0,gr.getConcept)(t.questionOptions.concept,"custom:(uuid,display,datatype:(uuid,display,name))").subscribe((function(e){"Boolean"==e.datatype.name&&(t.value.value=r.value.uuid)})),"string"==typeof r.value||"number"==typeof r.value){if(t.questionOptions.rendering.startsWith("date")){var l=Sr(t.value.value);return t.value.value=mr()(l).format("YYYY-MM-DD HH:mm"),l}return r.value}return"checkbox"==t.questionOptions.rendering?(t.value=e.obs.filter((function(e){return e.concept.uuid==t.questionOptions.concept})),!t.value.length&&t.groupId&&(t.value=s.groupMembers.filter((function(e){return e.concept.uuid==t.questionOptions.concept}))),t.value.map((function(e){return e.value.uuid}))):"toggle"==t.questionOptions.rendering?(t.value.value=r.value.uuid,r.value==vr.ks):"fixed-value"==i?t.fixedValue:null===(a=r.value)||void 0===a?void 0:a.uuid}return""},getDisplayValue:function(e,t){var n,r=e.questionOptions.rendering;if(!e.value)return null;if("checkbox"==e.questionOptions.rendering)return t.map((function(t){var n;return null===(n=e.questionOptions.answers.find((function(e){return e.concept==t})))||void 0===n?void 0:n.label}));if("content-switcher"==r||"select"==r||"toggle"==r){var i,o="object"==typeof e.value.value?e.value.value.uuid:e.value.value;return null===(i=e.questionOptions.answers.find((function(e){return e.concept==o})))||void 0===i?void 0:i.label}return"radio"==r?null===(n=e.questionOptions.answers.find((function(e){return e.concept==t})))||void 0===n?void 0:n.label:t},getPreviousValue:function(e,t,n){var r=Ao(t.obs,yo,e),i=e.questionOptions.rendering,o=null,s=null;if(r&&e.groupId)return"";if(!r&&e.groupId&&(o=n.find((function(t){return t.id==e.groupId})),(s=Ao(t.obs,yo,o))&&(yo.push(s.uuid),s.groupMembers&&(r=Ao(s.groupMembers,yo,e)))),r){var a,l;if(yo.push(r.uuid),"string"==typeof r.value||"number"==typeof r.value){if("date"==i||"datetime"==i){var c=Sr("".concat(r.value));return{value:c,display:mr()(c).format("YYYY-MM-DD HH:mm")}}return{value:r.value,display:r.value}}return{value:null===(a=r.value)||void 0===a?void 0:a.uuid,display:null===(l=e.questionOptions.answers.find((function(e){var t;return e.concept==(null===(t=r.value)||void 0===t?void 0:t.uuid)})))||void 0===l?void 0:l.label}}return null}},_o=function(e,t,n){var r;return{person:null===(r=t.patient)||void 0===r?void 0:r.id,obsDatetime:t.encounterDate,concept:n.questionOptions.concept,location:t.location,order:null,groupMembers:[],voided:!1,formFieldNamespace:"ohri-forms",formFieldPath:"ohri-forms-".concat(n.id),value:e}},Ao=function(e,t,n){var r=e.find((function(e){return e.formFieldPath=="ohri-forms-".concat(n.id)}));if(!r){var i=e.filter((function(e){return e.concept.uuid==n.questionOptions.concept}));return(null==t?void 0:t.length)?i.filter((function(e){return!t.includes(e.uuid)}))[0]:i[0]}return r},xo=function(e,t,n){return e.value||(e.value=[]),t.forEach((function(t){var r=e.value.find((function(e){return"string"==typeof e.value?e.value==t:e.value.uuid==t}));r&&r.voided?r.voided=!1:r||e.value.push(_o(t,n,e))})),e.questionOptions.answers.filter((function(e){return!t.some((function(t){return t==e.concept}))})).forEach((function(t){var r=e.value.filter((function(e){return"string"==typeof e.value?e.value==t.concept:e.value.uuid==t.concept}));r.length&&r.forEach((function(r){"edit"==n.sessionMode&&r.uuid?r.voided=!0:e.value=e.value.filter((function(e){return e.value!==t.concept}))}))})),e.value};const Co=function(e){var t=e.question,n=e.handler,r=c().useContext(u),i=r.encounterContext,o=r.isFieldInitializationComplete;return(0,l.useEffect)((function(){var e,r,s;t.value&&"string"==typeof t.value&&o||(0,I.Z)(t.value)&&(e=t.fixedValue,r=t.value,!((0,I.Z)(r.value)?(null===(s=r.value)||void 0===s?void 0:s.uuid)==e:r.value==e))?(delete t.value,n.handleFieldSubmission(t,t.fixedValue,i)):!(0,In.o)(t.isHidden)&&(0,Fn.xb)(t.value)&&n.handleFieldSubmission(t,t.fixedValue,i)}),[t.value,o,t.isHidden]),c().createElement(c().Fragment,null)};var So=n(574);function Eo(e){return e&&"object"==typeof e?"position"in e||"type"in e?$o(e.position):"start"in e||"end"in e?$o(e):"line"in e||"column"in e?ko(e):"":""}function ko(e){return Mo(e&&e.line)+":"+Mo(e&&e.column)}function $o(e){return ko(e&&e.start)+"-"+ko(e&&e.end)}function Mo(e){return e&&"number"==typeof e?e:1}function To(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ro(e,t,n){return Ro=To()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Fo(i,n.prototype),i},Ro.apply(null,arguments)}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(e)}function Oo(e,t){return!t||"object"!==Io(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fo(e,t){return Fo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fo(e,t)}var Io=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Do(e){var t="function"==typeof Map?new Map:void 0;return Do=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ro(e,arguments,Lo(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Fo(r,e)},Do(e)}var jo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fo(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Lo(t);if(n){var i=Lo(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Oo(this,e)});function i(e,t,n){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var s=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};if(o=r.call(this),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){var l=n.indexOf(":");-1===l?s[1]=n:(s[0]=n.slice(0,l),s[1]=n.slice(l+1))}return t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),o.name=Eo(t)||"1:1",o.message="object"==typeof e?e.message:e,o.stack="","object"==typeof e&&e.stack&&(o.stack=e.stack),o.reason=o.message,o.fatal,o.line=a.start.line,o.column=a.start.column,o.position=a,o.source=s[0],o.ruleId=s[1],o.file,o.actual,o.expected,o.url,o.note,o}return i}(Do(Error));jo.prototype.file="",jo.prototype.name="",jo.prototype.reason="",jo.prototype.message="",jo.prototype.stack="",jo.prototype.fatal=null,jo.prototype.column=null,jo.prototype.line=null,jo.prototype.source=null,jo.prototype.ruleId=null,jo.prototype.position=null;var Po=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Vo(e);var n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";for(var s=-1,a=t.length-1;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(i=o):(a=-1,i=s));return r===i?i=s:i<0&&(i=e.length),e.slice(r,i)},Uo=function(e){if(Vo(e),0===e.length)return".";for(var t,n=-1,r=e.length;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},Bo=function(e){Vo(e);for(var t,n=e.length,r=-1,i=0,o=-1,s=0;n--;){var a=e.charCodeAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){i=n+1;break}}return o<0||r<0||0===s||1===s&&o===r-1&&o===i+1?"":e.slice(o,r)},No=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=-1;++i<t.length;)Vo(t[i]),t[i]&&(r=void 0===r?t[i]:r+"/"+t[i]);return void 0===r?".":Wo(r)},Ho="/";function Wo(e){Vo(e);var t=47===e.charCodeAt(0),n=function(e,t){for(var n,r,i="",o=0,s=-1,a=0,l=-1;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),s=l,a=0;continue}}else if(i.length>0){i="",o=0,s=l,a=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(s+1,l):i=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function Vo(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var zo=function(){return"/"};function Go(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function qo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ko(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Zo=["history","path","basename","stem","extname","dirname"],Yo=function(){function e(t){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=t?"string"==typeof t||So(t)?{value:t}:Go(t)?{path:t}:t:{},this.data={},this.messages=[],this.history=[],this.cwd=zo(),this.value,this.stored,this.result,this.map;for(var i,o=-1;++o<Zo.length;){var s=Zo[o];s in n&&void 0!==n[s]&&(this[s]="history"===s?function(e){if(Array.isArray(e))return qo(e)}(r=n[s])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return qo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qo(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():n[s])}for(i in n)Zo.includes(i)||(this[i]=n[i])}var t,n;return t=e,n=[{key:"path",get:function(){return this.history[this.history.length-1]},set:function(e){Go(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Go(e)){var t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){var n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return function(e){if(""!==e.hostname){var t=new TypeError('File URL host must be "localhost" or empty on darwin');throw t.code="ERR_INVALID_FILE_URL_HOST",t}for(var n=e.pathname,r=-1;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i){var o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}(e)}(e)),Qo(e,"path"),this.path!==e&&this.history.push(e)}},{key:"dirname",get:function(){return"string"==typeof this.path?Uo(this.path):void 0},set:function(e){Jo(this.basename,"dirname"),this.path=No(e||"",this.basename)}},{key:"basename",get:function(){return"string"==typeof this.path?Po(this.path):void 0},set:function(e){Qo(e,"basename"),Xo(e,"basename"),this.path=No(this.dirname||"",e)}},{key:"extname",get:function(){return"string"==typeof this.path?Bo(this.path):void 0},set:function(e){if(Xo(e,"extname"),Jo(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=No(this.dirname,this.stem+(e||""))}},{key:"stem",get:function(){return"string"==typeof this.path?Po(this.path,this.extname):void 0},set:function(e){Qo(e,"stem"),Xo(e,"stem"),this.path=No(this.dirname||"",e+(this.extname||""))}},{key:"toString",value:function(e){return(this.value||"").toString(e)}},{key:"message",value:function(e,t,n){var r=new jo(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}},{key:"info",value:function(e,t,n){var r=this.message(e,t,n);return r.fatal=null,r}},{key:"fail",value:function(e,t,n){var r=this.message(e,t,n);throw r.fatal=!0,r}}],n&&Ko(t.prototype,n),e}();function Xo(e,t){if(e&&e.includes(Ho))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ho+"`")}function Qo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Jo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function es(e){if(e)throw e}var ts=n(75812);function ns(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function is(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function os(e){return function(e){if(Array.isArray(e))return rs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return rs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rs(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ss(e,t){var n,r=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];n||(n=!0,t.apply(void 0,[e].concat(os(i))))},i=function(e){r(null,e)};return function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];var a,l=e.length>o.length;l&&o.push(r);try{a=e.apply(this,o)}catch(e){var c=e;if(l&&n)throw c;return r(c)}l||(is(a,Promise)?a.then(i,r):is(a,Error)?r(a):i(a))}}function as(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ls(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function cs(e){return function(e){if(Array.isArray(e))return e}(e)||ls(e)||hs(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function us(e){return function(e){if(Array.isArray(e))return as(e)}(e)||ls(e)||hs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hs(e,t){if(e){if("string"==typeof e)return as(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?as(e,t):void 0}}var ds=function e(){var t,n,r,i=function(){for(var t=e(),n=-1;++n<s.length;){var r;(r=t).use.apply(r,us(s[n]))}return t.data(ts(!0,{},a)),t},o=(n=[],r={run:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=-1,o=t.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);function s(e){for(var r=arguments.length,a=new Array(r>1?r-1:0),l=1;l<r;l++)a[l-1]=arguments[l];var c=n[++i],u=-1;if(e)o(e);else{for(;++u<t.length;)null!==a[u]&&void 0!==a[u]||(a[u]=t[u]);t=a,c?ss(c,s).apply(this,os(a)):o.apply(void 0,[null].concat(os(a)))}}s.apply(void 0,[null].concat(os(t)))},use:function(e){if("function"!=typeof e)throw new TypeError("Expected `middelware` to be a function, not "+e);return n.push(e),r}},r),s=[],a={},l=-1;return i.data=function(e,n){return"string"==typeof e?2===arguments.length?(vs("data",t),a[e]=n,i):fs.call(a,e)&&a[e]||null:e?(vs("data",t),a=e,i):a},i.Parser=void 0,i.Compiler=void 0,i.freeze=function(){if(t)return i;for(;++l<s.length;){var e,n=cs(s[l]),r=n[0],a=n.slice(1);if(!1!==a[0]){!0===a[0]&&(a[0]=void 0);var c=(e=r).call.apply(e,[i].concat(us(a)));"function"==typeof c&&o.use(c)}}return t=!0,l=Number.POSITIVE_INFINITY,i},i.attachers=s,i.use=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var l;if(vs("use",t),null==e);else if("function"==typeof e)d.apply(void 0,[e].concat(us(r)));else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?h(e):u(e)}return l&&(a.settings=Object.assign(a.settings||{},l)),i;function c(e){if("function"==typeof e)d(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){var t=cs(e),n=t[0],r=t.slice(1);d.apply(void 0,[n].concat(us(r)))}else u(e)}}function u(e){h(e.plugins),e.settings&&(l=Object.assign(l||{},e.settings))}function h(e){var t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)c(e[t])}}function d(e,t){for(var n,r=-1;++r<s.length;)if(s[r][0]===e){n=s[r];break}n?(ns(n[1])&&ns(t)&&(t=ts(!0,n[1],t)),n[1]=t):s.push(Array.prototype.slice.call(arguments))}},i.parse=function(e){i.freeze();var t=ws(e),n=i.Parser;return ms("parse",n),ps(n,"parse")?new n(String(t),t).parse():n(String(t),t)},i.stringify=function(e,t){i.freeze();var n=ws(t),r=i.Compiler;return gs("stringify",r),bs(e),ps(r,"compile")?new r(e,n).compile():r(e,n)},i.run=function(e,t,n){if(bs(e),i.freeze(),n||"function"!=typeof t||(n=t,t=void 0),!n)return new Promise(r);function r(r,i){o.run(e,ws(t),(function(t,o,s){o=o||e,t?i(t):r?r(o):n(null,o,s)}))}r(null,n)},i.runSync=function(e,t){var n,r;return i.run(e,t,(function(e,t){es(e),n=t,r=!0})),ys("runSync","run",r),n},i.process=function(e,t){if(i.freeze(),ms("process",i.Parser),gs("process",i.Compiler),!t)return new Promise(n);function n(n,r){var o=ws(e);function s(e,i){e||!i?r(e):n?n(i):t(null,i)}i.run(i.parse(o),o,(function(e,t,n){if(!e&&t&&n){var r=i.stringify(t,n);null==r||("string"==typeof(o=r)||So(o)?n.value=r:n.result=r),s(e,n)}else s(e);var o}))}n(null,t)},i.processSync=function(e){var t;i.freeze(),ms("processSync",i.Parser),gs("processSync",i.Compiler);var n=ws(e);return i.process(n,(function(e){t=!0,es(e)})),ys("processSync","process",t),n},i}().freeze(),fs={}.hasOwnProperty;function ps(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)if(fs.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function ms(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function gs(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function vs(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bs(e){if(!ns(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ys(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ws(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Yo(e)}function _s(e,t){var n=(t||{}).includeImageAlt;return As(e,void 0===n||n)}function As(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&xs(e.children,t)||Array.isArray(e)&&xs(e,t))||""}function xs(e,t){for(var n=[],r=-1;++r<e.length;)n[r]=As(e[r],t);return n.join("")}function Cs(e,t,n,r){var i,o=e.length,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),[].splice.apply(e,i);else for(n&&[].splice.apply(e,[t,n]);s<r.length;)(i=r.slice(s,s+1e4)).unshift(t,0),[].splice.apply(e,i),s+=1e4,t+=1e4}function Ss(e,t){return e.length>0?(Cs(e,e.length,0,t),e):t}var Es={}.hasOwnProperty;function ks(e){for(var t={},n=-1;++n<e.length;)$s(t,e[n]);return t}function $s(e,t){var n;for(n in t){var r=(Es.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],o=void 0;for(o in i){Es.call(r,o)||(r[o]=[]);var s=i[o];Ms(r[o],Array.isArray(s)?s:s?[s]:[])}}}function Ms(e,t){for(var n=-1,r=[];++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Cs(e,0,0,r)}var Ts=Hs(/[A-Za-z]/),Rs=Hs(/\d/),Ls=Hs(/[\dA-Fa-f]/),Os=Hs(/[\dA-Za-z]/),Fs=Hs(/[!-/:-@[-`{-~]/),Is=Hs(/[#-'*+\--9=?A-Z^-~]/);function Ds(e){return null!==e&&(e<32||127===e)}function js(e){return null!==e&&(e<0||32===e)}function Ps(e){return null!==e&&e<-2}function Us(e){return-2===e||-1===e||32===e}var Bs=Hs(/\s/),Ns=Hs(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function Hs(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function Ws(e,t,n,r){var i=r?r-1:Number.POSITIVE_INFINITY,o=0;return function(r){return Us(r)?(e.enter(n),s(r)):t(r)};function s(r){return Us(r)&&o++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Vs={tokenize:function(e){var t,n=function(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,i(n)},r=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ws(e,r,"linePrefix");e.consume(t)}),(function(t){return e.enter("paragraph"),n(t)}));return r;function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ps(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}},zs={tokenize:function(e){var t,n,r,i=function(t){if(v<g.length){var n=g[v];return m.containerState=n[1],e.attempt(n[0].continuation,o,s)(t)}return s(t)},o=function(e){if(v++,m.containerState._closeFlow){m.containerState._closeFlow=void 0,t&&p();for(var n,r=m.events.length,o=r;o--;)if("exit"===m.events[o][0]&&"chunkFlow"===m.events[o][1].type){n=m.events[o][1].end;break}f(v);for(var a=r;a<m.events.length;)m.events[a][1].end=Object.assign({},n),a++;return Cs(m.events,o+1,0,m.events.slice(r)),m.events.length=a,s(e)}return i(e)},s=function(n){if(v===g.length){if(!t)return c(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);m.interrupt=Boolean(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return m.containerState={},e.check(Gs,a,l)(n)},a=function(e){return t&&p(),f(v),c(e)},l=function(e){return m.parser.lazy[m.now().line]=v!==g.length,r=m.now().offset,h(e)},c=function(t){return m.containerState={},e.attempt(Gs,u,h)(t)},u=function(e){return v++,g.push([m.currentConstruct,m.containerState]),c(e)},h=function(r){return null===r?(t&&p(),f(0),void e.consume(r)):(t=t||m.parser.flow(m.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),b(r))},d=function(e,i){var o=m.sliceStream(e);if(i&&o.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(o),m.parser.lazy[e.start.line]){for(var s=t.events.length;s--;)if(t.events[s][1].start.offset<r&&(!t.events[s][1].end||t.events[s][1].end.offset>r))return;for(var a,l,c=m.events.length,u=c;u--;)if("exit"===m.events[u][0]&&"chunkFlow"===m.events[u][1].type){if(a){l=m.events[u][1].end;break}a=!0}for(f(v),s=c;s<m.events.length;)m.events[s][1].end=Object.assign({},l),s++;Cs(m.events,u+1,0,m.events.slice(c)),m.events.length=s}},f=function(t){for(var n=g.length;n-- >t;){var r=g[n];m.containerState=r[1],r[0].exit.call(m,e)}g.length=t},p=function(){t.write([null]),n=void 0,t=void 0,m.containerState._closeFlow=void 0},m=this,g=[],v=0;return i;function b(t){return null===t?(d(e.exit("chunkFlow"),!0),f(0),void e.consume(t)):Ps(t)?(e.consume(t),d(e.exit("chunkFlow")),v=0,m.interrupt=void 0,i):(e.consume(t),b)}}},Gs={tokenize:function(e,t,n){return Ws(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},qs={tokenize:function(e,t,n){return Ws(e,(function(e){return null===e||Ps(e)?t(e):n(e)}),"linePrefix")},partial:!0};function Ks(e){for(var t,n,r,i,o,s,a,l={},c=-1;++c<e.length;){for(;c in l;)c=l[c];if(t=e[c],c&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[c-1][1].type&&((r=0)<(s=t[1]._tokenizer.events).length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,Zs(e,c)),c=l[c],a=!0);else if(t[1]._container){for(r=c,n=void 0;r--&&("lineEnding"===(i=e[r])[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(n&&(e[n][1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);n&&(t[1].end=Object.assign({},e[n][1].start),(o=e.slice(n,c)).unshift(t),Cs(e,n,c-n+1,o))}}return!a}function Zs(e,t){for(var n,r,i=e[t][1],o=e[t][2],s=t-1,a=[],l=i._tokenizer||o.parser[i.contentType](i.start),c=l.events,u=[],h={},d=-1,f=i,p=0,m=0,g=[m];f;){for(;e[++s][1]!==f;);a.push(s),f._tokenizer||(n=o.sliceStream(f),f.next||n.push(null),r&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=f,f=f.next}for(f=i;++d<c.length;)"exit"===c[d][0]&&"enter"===c[d-1][0]&&c[d][1].type===c[d-1][1].type&&c[d][1].start.line!==c[d][1].end.line&&(m=d+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){var v=c.slice(g[d],g[d+1]),b=a.pop();u.unshift([b,b+v.length-1]),Cs(e,b,2,v)}for(d=-1;++d<u.length;)h[p+u[d][0]]=p+u[d][1],p+=u[d][1]-u[d][0]-1;return h}var Ys={tokenize:function(e,t){var n,r=function(n){return e.exit("chunkContent"),e.exit("content"),t(n)},i=function(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o};return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?r(t):Ps(t)?e.check(Xs,i,r)(t):(e.consume(t),o)}},resolve:function(e){return Ks(e),e}},Xs={tokenize:function(e,t,n){var r=function(r){if(null===r||Ps(r))return n(r);var o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)},i=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ws(e,r,"linePrefix")}},partial:!0},Qs={tokenize:function(e){var t=function(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n.currentConstruct=void 0,r;e.consume(t)},n=this,r=e.attempt(qs,(function(t){if(null!==t)return e.enter("lineEndingBlank"),e.consume(t),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r;e.consume(t)}),e.attempt(this.parser.constructs.flowInitial,t,Ws(e,e.attempt(this.parser.constructs.flow,t,e.attempt(Ys,t)),"linePrefix")));return r}},Js={resolveAll:ra()},ea=na("string"),ta=na("text");function na(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;var t=r[e],i=-1;if(t)for(;++i<t.length;){var o=t[i];if(!o.previous||o.previous.call(n,n.previous))return!0}return!1}},resolveAll:ra("text"===e?ia:void 0)}}function ra(e){return function(t,n){for(var r,i=-1;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function ia(e,t){for(var n=0;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){for(var r=e[n-1][1],i=t.sliceStream(r),o=i.length,s=-1,a=0,l=void 0;o--;){var c=i[o];if("string"==typeof c){for(s=c.length;32===c.charCodeAt(s-1);)a++,s--;if(s)break;s=-1}else if(-2===c)l=!0,a++;else if(-1!==c){o++;break}}if(a){var u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function oa(e,t,n){for(var r=[],i=-1;++i<e.length;){var o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aa(e){return function(e){if(Array.isArray(e))return sa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function la(e,t,n){var r=function(e){return function(e,t){var n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;return r===o?n=[e[r].slice(i,s)]:(n=e.slice(r,o),i>-1&&(n[0]=n[0].slice(i)),s>0&&n.push(e[o].slice(0,s))),n}(p,e)},i=function(){return Object.assign({},h)},o=function(e){b=b(e)},s=function(e,t){t.restore()},a=function(e,t){return function(n,r,i){var o,s,a,l,u;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):(u=n,function(e){var t=null!==e&&u[e],n=null!==e&&u.null;return h(aa(Array.isArray(t)?t:t?[t]:[]).concat(aa(Array.isArray(n)?n:n?[n]:[])))(e)});function h(e){return o=e,s=0,0===e.length?i:d(e[s])}function d(e){return function(n){return l=c(),a=e,e.partial||(v.currentConstruct=e),e.name&&v.parser.constructs.disable.null.includes(e.name)?p():e.tokenize.call(t?Object.assign(Object.create(v),t):v,g,f,p)(n)}}function f(t){return e(a,l),r}function p(e){return l.restore(),++s<o.length?d(o[s]):i}}},l=function(e,t){e.resolveAll&&!f.includes(e)&&f.push(e),e.resolve&&Cs(v.events,t,v.events.length-t,e.resolve(v.events.slice(t),v)),e.resolveTo&&(v.events=e.resolveTo(v.events,v))},c=function(){var e=i(),t=v.previous,n=v.currentConstruct,r=v.events.length,o=Array.from(m);return{restore:function(){h=e,v.previous=t,v.currentConstruct=n,v.events.length=r,m=o,u()},from:r}},u=function(){h.line in d&&h.column<2&&(h.column=d[h.line],h.offset+=d[h.line]-1)},h=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),d={},f=[],p=[],m=[],g={consume:function(e){Ps(e)?(h.line++,h.column=1,h.offset+=-3===e?2:1,u()):-1!==e&&(h.column++,h.offset++),h._bufferIndex<0?h._index++:(h._bufferIndex++,h._bufferIndex===p[h._index].length&&(h._bufferIndex=-1,h._index++)),v.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=i(),v.events.push(["enter",n,v]),m.push(n),n},exit:function(e){var t=m.pop();return t.end=i(),v.events.push(["exit",t,v]),t},attempt:a((function(e,t){l(e,t.from)})),check:a(s),interrupt:a(s,{interrupt:!0})},v={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:r,sliceSerialize:function(e,t){return function(e,t){for(var n,r=-1,i=[];++r<e.length;){var o=e[r],s=void 0;if("string"==typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&n)continue;s=" ";break;default:s=String.fromCharCode(o)}n=-2===o,i.push(s)}return i.join("")}(r(e),t)},now:i,defineSkip:function(e){d[e.line]=e.column,u()},write:function(e){return p=Ss(p,e),function(){for(var e;h._index<p.length;){var t=p[h._index];if("string"==typeof t)for(e=h._index,h._bufferIndex<0&&(h._bufferIndex=0);h._index===e&&h._bufferIndex<t.length;)o(t.charCodeAt(h._bufferIndex));else o(t)}}(),null!==p[p.length-1]?[]:(l(t,0),v.events=oa(f,v.events,v),v.events)}},b=t.tokenize.call(v,g);return t.resolveAll&&f.push(t),v}var ca={name:"thematicBreak",tokenize:function(e,t,n){var r,i=0;return function(t){return e.enter("thematicBreak"),r=t,o(t)};function o(a){return a===r?(e.enter("thematicBreakSequence"),s(a)):Us(a)?Ws(e,o,"whitespace")(a):i<3||null!==a&&!Ps(a)?n(a):(e.exit("thematicBreak"),t(a))}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),o(t))}}},ua={name:"list",tokenize:function(e,t,n){var r=function(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||t,e.check(qs,a.interrupt?n:i,e.attempt(ha,s,o))},i=function(e){return a.containerState.initialBlankLine=!0,c++,s(e)},o=function(t){return Us(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),s):n(t)},s=function(n){return a.containerState.size=c+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)},a=this,l=a.events[a.events.length-1],c=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,u=0;return function(t){var i=a.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!a.containerState.marker||t===a.containerState.marker:Rs(t)){if(a.containerState.type||(a.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(ca,n,r)(t):r(t);if(!a.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(t)}return n(t)};function h(t){return Rs(t)&&++u<10?(e.consume(t),h):(!a.interrupt||u<2)&&(a.containerState.marker?t===a.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),r(t)):n(t)}},continuation:{tokenize:function(e,t,n){var r=function(r){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ws(e,e.attempt(ua,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)},i=this;return i.containerState._closeFlow=void 0,e.check(qs,(function(n){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ws(e,t,"listItemIndent",i.containerState.size+1)(n)}),(function(n){return i.containerState.furtherBlankLines||!Us(n)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(n)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(da,t,r)(n))}))}},exit:function(e){e.exit(this.containerState.type)}},ha={tokenize:function(e,t,n){var r=this;return Ws(e,(function(e){var i=r.events[r.events.length-1];return!Us(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},da={tokenize:function(e,t,n){var r=this;return Ws(e,(function(e){var i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0},fa={name:"blockQuote",tokenize:function(e,t,n){var r=function(n){return Us(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))},i=this;return function(t){if(62===t){var o=i.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),r}return n(t)}},continuation:{tokenize:function(e,t,n){return Ws(e,e.attempt(fa,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};function pa(e,t,n,r,i,o,s,a,l){var c=function(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))},u=function(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)},h=function(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)},d=l||Number.POSITIVE_INFINITY,f=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),c):null===t||41===t||Ds(t)?n(t):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(t))};function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),c(t)):null===t||60===t||Ps(t)?n(t):(e.consume(t),92===t?u:p)}function m(i){return 40===i?++f>d?n(i):(e.consume(i),m):41===i?f--?(e.consume(i),m):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(i)):null===i||js(i)?f?n(i):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(i)):Ds(i)?n(i):(e.consume(i),92===i?h:m)}}function ma(e,t,n,r,i,o){var s,a=function(t){return 91===t||92===t||93===t?(e.consume(t),c++,h):h(t)},l=this,c=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(a){return null===a||91===a||93===a&&!s||94===a&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs||c>999?n(a):93===a?(e.exit(o),e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):Ps(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),h(a))}function h(t){return null===t||91===t||93===t||Ps(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s=s||!Us(t),92===t?a:h)}}function ga(e,t,n,r,i,o){var s,a=function(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),c(n))},l=function(t){return t===s||92===t?(e.consume(t),u):u(t)};return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a};function c(t){return t===s?(e.exit(o),a(s)):null===t?n(t):Ps(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ws(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===s||null===t||Ps(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}}function va(e,t){var n;return function r(i){return Ps(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Us(i)?Ws(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function ba(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ya={name:"definition",tokenize:function(e,t,n){var r,i=function(t){return r=ba(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),va(e,pa(e,e.attempt(wa,Ws(e,o,"whitespace"),Ws(e,o,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)},o=function(i){return null===i||Ps(i)?(e.exit("definition"),s.parser.defined.includes(r)||s.parser.defined.push(r),t(i)):n(i)},s=this;return function(t){return e.enter("definition"),ma.call(s,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}}},wa={tokenize:function(e,t,n){var r=function(t){return 34===t||39===t||40===t?ga(e,Ws(e,i,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)},i=function(e){return null===e||Ps(e)?t(e):n(e)};return function(t){return js(t)?va(e,r)(t):n(t)}},partial:!0},_a={name:"codeIndented",tokenize:function(e,t,n){var r=function(e){var t=o.events[o.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?s(e):n(e)},i=function(n){return e.exit("codeIndented"),t(n)},o=this;return function(t){return e.enter("codeIndented"),Ws(e,r,"linePrefix",5)(t)};function s(t){return null===t?i(t):Ps(t)?e.attempt(Aa,s,i)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||Ps(t)?(e.exit("codeFlowValue"),s(t)):(e.consume(t),a)}}},Aa={tokenize:function(e,t,n){var r=function(e){var r=i.events[i.events.length-1];return r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(e):Ps(e)?o(e):n(e)},i=this;return o;function o(t){return i.parser.lazy[i.now().line]?n(t):Ps(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Ws(e,r,"linePrefix",5)(t)}},partial:!0},xa={name:"headingAtx",tokenize:function(e,t,n){var r=this,i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(a){return 35===a&&i++<6?(e.consume(a),o):null===a||js(a)?(e.exit("atxHeadingSequence"),r.interrupt?t(a):s(a)):n(a)}function s(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Ps(n)?(e.exit("atxHeading"),t(n)):Us(n)?Ws(e,s,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),s(t))}function l(t){return null===t||35===t||js(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),l)}},resolve:function(e,t){var n,r,i=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&Cs(e,o,i-o+1,[["enter",n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},t],["enter",r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},t],["exit",r,t],["exit",n,t]]),e}},Ca={name:"setextUnderline",tokenize:function(e,t,n){for(var r,i,o=function(r){return null===r||Ps(r)?(e.exit("setextHeadingLine"),t(r)):n(r)},s=this,a=s.events.length;a--;)if("lineEnding"!==s.events[a][1].type&&"linePrefix"!==s.events[a][1].type&&"content"!==s.events[a][1].type){i="paragraph"===s.events[a][1].type;break}return function(t){return s.parser.lazy[s.now().line]||!s.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),r=t,l(t))};function l(t){return t===r?(e.consume(t),l):(e.exit("setextHeadingLineSequence"),Ws(e,o,"lineSuffix")(t))}},resolveTo:function(e,t){for(var n,r,i,o=e.length;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);var s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}},Sa=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ea=["pre","script","style","textarea"],ka={name:"htmlFlow",tokenize:function(e,t,n){var r,i,o,s,a,l=function(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),h):63===s?(e.consume(s),r=3,_.interrupt?t:I):Ts(s)?(e.consume(s),o=String.fromCharCode(s),i=!0,x):n(s)},c=function(i){return 45===i?(e.consume(i),r=2,u):91===i?(e.consume(i),r=5,o="CDATA[",s=0,A):Ts(i)?(e.consume(i),r=4,_.interrupt?t:I):n(i)},u=function(r){return 45===r?(e.consume(r),_.interrupt?t:I):n(r)},h=function(t){return Ts(t)?(e.consume(t),o=String.fromCharCode(t),x):n(t)},d=function(r){return 62===r?(e.consume(r),_.interrupt?t:L):n(r)},f=function(e){return 47===e||62===e||Us(e)?S(e):n(e)},p=function(t){return 62===t?(e.consume(t),R):n(t)},m=function(t){return e.exit("htmlFlowData"),O(t)},g=function(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return _.parser.lazy[_.now().line]?n(e):t(e)}},v=function(t){return 45===t?(e.consume(t),I):L(t)},b=function(t){return 47===t?(e.consume(t),o="",F):L(t)},y=function(t){return 93===t?(e.consume(t),I):L(t)},w=function(n){return e.exit("htmlFlow"),t(n)},_=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l};function A(r){return r===o.charCodeAt(s++)?(e.consume(r),s===o.length?_.interrupt?t:L:A):n(r)}function x(s){return null===s||47===s||62===s||js(s)?47!==s&&i&&Ea.includes(o.toLowerCase())?(r=1,_.interrupt?t(s):L(s)):Sa.includes(o.toLowerCase())?(r=6,47===s?(e.consume(s),d):_.interrupt?t(s):L(s)):(r=7,_.interrupt&&!_.parser.lazy[_.now().line]?n(s):i?S(s):C(s)):45===s||Os(s)?(e.consume(s),o+=String.fromCharCode(s),x):n(s)}function C(t){return Us(t)?(e.consume(t),C):p(t)}function S(t){return 47===t?(e.consume(t),p):58===t||95===t||Ts(t)?(e.consume(t),E):Us(t)?(e.consume(t),S):p(t)}function E(t){return 45===t||46===t||58===t||95===t||Os(t)?(e.consume(t),E):k(t)}function k(t){return 61===t?(e.consume(t),$):Us(t)?(e.consume(t),k):S(t)}function $(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,M):Us(t)?(e.consume(t),$):(a=null,T(t))}function M(t){return null===t||Ps(t)?n(t):t===a?(e.consume(t),f):(e.consume(t),M)}function T(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||js(t)?k(t):(e.consume(t),T)}function R(t){return Us(t)?(e.consume(t),R):null===t||Ps(t)?L(t):n(t)}function L(t){return 45===t&&2===r?(e.consume(t),v):60===t&&1===r?(e.consume(t),b):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),I):93===t&&5===r?(e.consume(t),y):!Ps(t)||6!==r&&7!==r?null===t||Ps(t)?m(t):(e.consume(t),L):e.check($a,D,m)(t)}function O(t){return null===t?w(t):Ps(t)?e.attempt({tokenize:g,partial:!0},O,w)(t):(e.enter("htmlFlowData"),L(t))}function F(t){return 62===t&&Ea.includes(o.toLowerCase())?(e.consume(t),D):Ts(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),F):L(t)}function I(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),I):L(t)}function D(t){return null===t||Ps(t)?(e.exit("htmlFlowData"),w(t)):(e.consume(t),D)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},$a={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(qs,t,n)}},partial:!0},Ma={name:"codeFenced",tokenize:function(e,t,n){var r,i=function(t){return null===t||Ps(t)?s(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(t))},o=function(t){return null===t||Ps(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(t))},s=function(n){return e.exit("codeFencedFence"),l.interrupt?t(n):v(n)},a=function(n){return e.exit("codeFenced"),t(n)},l=this,c={tokenize:function(e,t,n){var i=0;return Ws(e,(function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)}),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(t){return t===r?(e.consume(t),i++,o):i<f?n(t):(e.exit("codeFencedFenceSequence"),Ws(e,s,"whitespace")(t))}function s(r){return null===r||Ps(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},u={tokenize:function(e,t,n){var r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},h=this.events[this.events.length-1],d=h&&"linePrefix"===h[1].type?h[2].sliceSerialize(h[1],!0).length:0,f=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),r=t,p(t)};function p(t){return t===r?(e.consume(t),f++,p):(e.exit("codeFencedFenceSequence"),f<3?n(t):Ws(e,i,"whitespace")(t))}function m(t){return null===t||js(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ws(e,o,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),m)}function g(t){return null===t||Ps(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===r?n(t):(e.consume(t),g)}function v(t){return null===t?a(t):Ps(t)?e.attempt(u,e.attempt(c,a,d?Ws(e,v,"linePrefix",d+1):v),a)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||Ps(t)?(e.exit("codeFlowValue"),v(t)):(e.consume(t),b)}},concrete:!0},Ta=document.createElement("i");function Ra(e){var t="&"+e+";";Ta.innerHTML=t;var n=Ta.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}var La={name:"characterReference",tokenize:function(e,t,n){var r,i,o=function(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=Os,c(t))},s=function(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=Ls,c):(e.enter("characterReferenceValue"),r=7,i=Rs,c(t))},a=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function c(o){var s;return 59===o&&l?(s=e.exit("characterReferenceValue"),i!==Os||Ra(a.sliceSerialize(s))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)):i(o)&&l++<r?(e.consume(o),c):n(o)}}},Oa={name:"characterEscape",tokenize:function(e,t,n){var r=function(r){return Fs(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)};return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r}}},Fa={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ws(e,t,"linePrefix")}}},Ia={name:"labelEnd",tokenize:function(e,t,n){for(var r,i,o=function(n){return 40===n?e.attempt(Da,t,i?t:s)(n):91===n?e.attempt(ja,t,i?e.attempt(Pa,t,s):s)(n):i?t(n):s(n)},s=function(e){return r._balanced=!0,n(e)},a=this,l=a.events.length;l--;)if(("labelImage"===a.events[l][1].type||"labelLink"===a.events[l][1].type)&&!a.events[l][1]._balanced){r=a.events[l][1];break}return function(t){return r?r._inactive?s(t):(i=a.parser.defined.includes(ba(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o):n(t)}},resolveTo:function(e,t){for(var n,r,i,o,s=e.length,a=0;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=s);var l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+a+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=Ss(o=[["enter",l,t],["enter",c,t]],e.slice(r+1,r+a+3)),o=Ss(o,[["enter",u,t]]),o=Ss(o,oa(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),o=Ss(o,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),o=Ss(o,e.slice(i+1)),o=Ss(o,[["exit",l,t]]),Cs(e,r,e.length,o),e},resolveAll:function(e){for(var t,n=-1;++n<e.length;)"labelImage"!==(t=e[n][1]).type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},Da={tokenize:function(e,t,n){var r=function(t){return 41===t?s(t):pa(e,i,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)},i=function(t){return js(t)?va(e,o)(t):s(t)},o=function(t){return 34===t||39===t||40===t?ga(e,va(e,s),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)},s=function(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)};return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),va(e,r)}}},ja={tokenize:function(e,t,n){var r=function(e){return i.parser.defined.includes(ba(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(e):n(e)},i=this;return function(t){return ma.call(i,e,r,n,"reference","referenceMarker","referenceString")(t)}}},Pa={tokenize:function(e,t,n){var r=function(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)};return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r}}},Ua={name:"labelStartImage",tokenize:function(e,t,n){var r=function(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)},i=function(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?n(e):t(e)},o=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),r}},resolveAll:Ia.resolveAll};function Ba(e){return null===e||js(e)||Bs(e)?1:Ns(e)?2:void 0}var Na={name:"attention",tokenize:function(e,t){var n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Ba(i);return function(t){return e.enter("attentionSequence"),n=t,s(t)};function s(a){if(a===n)return e.consume(a),s;var l=e.exit("attentionSequence"),c=Ba(a),u=!c||2===c&&o||r.includes(a),h=!o||2===o&&c||r.includes(i);return l._open=Boolean(42===n?u:u&&(o||!h)),l._close=Boolean(42===n?h:h&&(c||!u)),t(a)}},resolveAll:function(e,t){for(var n,r,i,o,s,a,l,c,u=-1;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;var h=Object.assign({},e[n][1].end),d=Object.assign({},e[u][1].start);Ha(h,-a),Ha(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:d},i={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ss(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ss(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=Ss(l,oa(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ss(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ss(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Cs(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function Ha(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wa,Va={name:"autolink",tokenize:function(e,t,n){var r=function(t){return Ts(t)?(e.consume(t),i):Is(t)?h(t):n(t)},i=function(e){return 43===e||45===e||46===e||Os(e)?c(e):h(e)},o=function(e){return Os(e)?s(e):n(e)},s=function(t){return 46===t?(e.consume(t),l=0,o):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",a(t)):d(t)},a=function(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t},l=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function c(t){return 58===t?(e.consume(t),u):(43===t||45===t||46===t||Os(t))&&l++<32?(e.consume(t),c):h(t)}function u(t){return 62===t?(e.exit("autolinkProtocol"),a(t)):null===t||32===t||60===t||Ds(t)?n(t):(e.consume(t),u)}function h(t){return 64===t?(e.consume(t),l=0,o):Is(t)?(e.consume(t),h):n(t)}function d(t){return(45===t||Os(t))&&l++<63?(e.consume(t),45===t?d:s):n(t)}}},za={name:"htmlText",tokenize:function(e,t,n){var r,i,o,s,a=function(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),m):63===t?(e.consume(t),E):Ts(t)?(e.consume(t),M):n(t)},l=function(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i="CDATA[",o=0,A):Ts(t)?(e.consume(t),S):n(t)},c=function(t){return 45===t?(e.consume(t),u):n(t)},u=function(t){return null===t||62===t?n(t):45===t?(e.consume(t),h):_(t)},h=function(e){return null===e||62===e?n(e):_(e)},d=function(t){return 45===t?(e.consume(t),y):_(t)},f=function(t){return 93===t?(e.consume(t),C):x(t)},p=function(e){return 62===e?y(e):E(e)},m=function(t){return Ts(t)?(e.consume(t),k):n(t)},g=function(e){return 62===e||47===e||js(e)?T(e):n(e)},v=function(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ws(e,b,"linePrefix",w.parser.constructs.disable.null.includes("codeIndented")?void 0:4)},b=function(t){return e.enter("htmlTextData"),s(t)},y=function(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)},w=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function _(t){return null===t?n(t):45===t?(e.consume(t),d):Ps(t)?(s=_,v(t)):(e.consume(t),_)}function A(t){return t===i.charCodeAt(o++)?(e.consume(t),o===i.length?x:A):n(t)}function x(t){return null===t?n(t):93===t?(e.consume(t),f):Ps(t)?(s=x,v(t)):(e.consume(t),x)}function C(t){return 62===t?y(t):93===t?(e.consume(t),C):x(t)}function S(t){return null===t||62===t?y(t):Ps(t)?(s=S,v(t)):(e.consume(t),S)}function E(t){return null===t?n(t):63===t?(e.consume(t),p):Ps(t)?(s=E,v(t)):(e.consume(t),E)}function k(t){return 45===t||Os(t)?(e.consume(t),k):$(t)}function $(t){return Ps(t)?(s=$,v(t)):Us(t)?(e.consume(t),$):y(t)}function M(t){return 45===t||Os(t)?(e.consume(t),M):47===t||62===t||js(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),y):58===t||95===t||Ts(t)?(e.consume(t),R):Ps(t)?(s=T,v(t)):Us(t)?(e.consume(t),T):y(t)}function R(t){return 45===t||46===t||58===t||95===t||Os(t)?(e.consume(t),R):L(t)}function L(t){return 61===t?(e.consume(t),O):Ps(t)?(s=L,v(t)):Us(t)?(e.consume(t),L):T(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,F):Ps(t)?(s=O,v(t)):Us(t)?(e.consume(t),O):(e.consume(t),r=void 0,I)}function F(t){return t===r?(e.consume(t),g):null===t?n(t):Ps(t)?(s=F,v(t)):(e.consume(t),F)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||js(t)?T(t):(e.consume(t),I)}}},Ga={name:"labelStartLink",tokenize:function(e,t,n){var r=function(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)},i=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),r}},resolveAll:Ia.resolveAll},qa={name:"hardBreakEscape",tokenize:function(e,t,n){var r=function(r){return Ps(r)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(r)):n(r)};return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),r}}},Ka={name:"codeText",tokenize:function(e,t,n){var r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):Ps(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Ps(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}},resolve:function(e){var t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Za(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ya,Xa,Qa,Ja,el=(Za(Wa={},42,ua),Za(Wa,43,ua),Za(Wa,45,ua),Za(Wa,48,ua),Za(Wa,49,ua),Za(Wa,50,ua),Za(Wa,51,ua),Za(Wa,52,ua),Za(Wa,53,ua),Za(Wa,54,ua),Za(Wa,55,ua),Za(Wa,56,ua),Za(Wa,57,ua),Za(Wa,62,fa),Wa),tl=Za({},91,ya),nl=(Za(Ya={},-2,_a),Za(Ya,-1,_a),Za(Ya,32,_a),Ya),rl=(Za(Xa={},35,xa),Za(Xa,42,ca),Za(Xa,45,[Ca,ca]),Za(Xa,60,ka),Za(Xa,61,Ca),Za(Xa,95,ca),Za(Xa,96,Ma),Za(Xa,126,Ma),Xa),il=(Za(Qa={},38,La),Za(Qa,92,Oa),Qa),ol=(Za(Ja={},-5,Fa),Za(Ja,-4,Fa),Za(Ja,-3,Fa),Za(Ja,33,Ua),Za(Ja,38,La),Za(Ja,42,Na),Za(Ja,60,[Va,za]),Za(Ja,91,Ga),Za(Ja,92,[qa,Oa]),Za(Ja,93,Ia),Za(Ja,95,Na),Za(Ja,96,Ka),Ja),sl={null:[Na,Js]},al={null:[42,95]},ll={null:[]},cl=/[\0\t\n\r]/g;function ul(e,t){var n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}var hl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dl(e){return e.replace(hl,fl)}function fl(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){var r=n.charCodeAt(1),i=120===r||88===r;return ul(n.slice(i?2:1),i?16:10)}return Ra(n)||e}function pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ml(e){return function(e){if(Array.isArray(e))return pl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pl(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gl={}.hasOwnProperty;function vl(e,t){for(var n=-1;++n<t.length;){var r=t[n];Array.isArray(r)?vl(e,r):bl(e,r)}return e}function bl(e,t){var n;for(n in t)if(gl.call(t,n)){var r="canContainEols"===n||"transforms"===n,i=(gl.call(e,n)?e[n]:void 0)||(e[n]=r?[]:{}),o=t[n];o&&(r?e[n]=ml(i).concat(ml(o)):Object.assign(i,o))}}function yl(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Eo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Eo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Eo({start:t.start,end:t.end})+") is still open")}const wl=function(e){var t=this;Object.assign(this,{Parser:function(n){var i=t.data("settings");return function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=function(e){for(var t={type:"root",children:[]},s=[],c=[],d={stack:[t],tokenStack:s,config:le,enter:l,exit:u,buffer:a,resume:h,setData:r,getData:i},f=-1;++f<e.length;)if("listOrdered"===e[f][1].type||"listUnordered"===e[f][1].type)if("enter"===e[f][0])c.push(f);else{var p=c.pop();f=n(e,p,f)}for(f=-1;++f<e.length;){var m=le[e[f][0]];gl.call(m,e[f][1].type)&&m[e[f][1].type].call(Object.assign({sliceSerialize:e[f][2].sliceSerialize},d),e[f][1])}if(s.length>0){var g=s[s.length-1];(g[1]||yl).call(d,void 0,g[0])}for(t.position={start:o(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:o(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<le.transforms.length;)t=le.transforms[f](t)||t;return t},n=function(e,t,n){for(var r,i,o,s,a=t-1,l=-1,c=!1;++a<=n;){var u=e[a];if("listUnordered"===u[1].type||"listOrdered"===u[1].type||"blockQuote"===u[1].type?("enter"===u[0]?l++:l--,s=void 0):"lineEndingBlank"===u[1].type?"enter"===u[0]&&(!r||s||l||o||(o=a),s=void 0):"linePrefix"===u[1].type||"listItemValue"===u[1].type||"listItemMarker"===u[1].type||"listItemPrefix"===u[1].type||"listItemPrefixWhitespace"===u[1].type||(s=void 0),!l&&"enter"===u[0]&&"listItemPrefix"===u[1].type||-1===l&&"exit"===u[0]&&("listUnordered"===u[1].type||"listOrdered"===u[1].type)){if(r){var h=a;for(i=void 0;h--;){var d=e[h];if("lineEnding"===d[1].type||"lineEndingBlank"===d[1].type){if("exit"===d[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),d[1].type="lineEnding",i=h}else if("linePrefix"!==d[1].type&&"blockQuotePrefix"!==d[1].type&&"blockQuotePrefixWhitespace"!==d[1].type&&"blockQuoteMarker"!==d[1].type&&"listItemIndent"!==d[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:u[1].end),e.splice(i||a,0,["exit",r,u[2]]),a++,n++}"listItemPrefix"===u[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},u[1].start)},e.splice(a,0,["enter",r,u[2]]),a++,n++,o=void 0,s=!0)}}return e[t][1]._spread=c,n},r=function(e,t){ce[e]=t},i=function(e){return ce[e]},o=function(e){return{line:e.line,column:e.column,offset:e.offset}},s=function(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}},a=function(){this.stack.push({type:"fragment",children:[]})},l=function(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:o(t.start)},e},c=function(e){return function(t){e&&e.call(this,t),u.call(this,t)}},u=function(e,t){var n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Eo({start:e.start,end:e.end})+"): it’s not open");return r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||yl).call(this,e,r[0])),n.position.end=o(e.end),n},h=function(){return _s(this.stack.pop())},d=function(){r("expectingFirstListItemValue",!0)},f=function(e){i("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),r("expectingFirstListItemValue"))},p=function(){var e=this.resume();this.stack[this.stack.length-1].lang=e},m=function(){var e=this.resume();this.stack[this.stack.length-1].meta=e},g=function(){i("flowCodeInside")||(this.buffer(),r("flowCodeInside",!0))},v=function(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r("flowCodeInside")},b=function(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")},y=function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ba(this.sliceSerialize(e)).toLowerCase()},w=function(){var e=this.resume();this.stack[this.stack.length-1].title=e},_=function(){var e=this.resume();this.stack[this.stack.length-1].url=e},A=function(e){var t=this.stack[this.stack.length-1];if(!t.depth){var n=this.sliceSerialize(e).length;t.depth=n}},x=function(){r("setextHeadingSlurpLineEnding",!0)},C=function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},S=function(){r("setextHeadingSlurpLineEnding")},E=function(e){var t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type||((n=se()).position={start:o(e.start)},t.children.push(n)),this.stack.push(n)},k=function(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=o(e.end)},$=function(e){var t=this.stack[this.stack.length-1];if(i("atHardBreak"))return t.children[t.children.length-1].position.end=o(e.end),void r("atHardBreak");!i("setextHeadingSlurpLineEnding")&&le.canContainEols.includes(t.type)&&(E.call(this,e),k.call(this,e))},M=function(){r("atHardBreak",!0)},T=function(){var e=this.resume();this.stack[this.stack.length-1].value=e},R=function(){var e=this.resume();this.stack[this.stack.length-1].value=e},L=function(){var e=this.resume();this.stack[this.stack.length-1].value=e},O=function(){var e=this.stack[this.stack.length-1];i("inReference")?(e.type+="Reference",e.referenceType=i("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),r("referenceType")},F=function(){var e=this.stack[this.stack.length-1];i("inReference")?(e.type+="Reference",e.referenceType=i("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),r("referenceType")},I=function(e){var t=this.stack[this.stack.length-2],n=this.sliceSerialize(e);t.label=dl(n),t.identifier=ba(n).toLowerCase()},D=function(){var e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];r("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},j=function(){var e=this.resume();this.stack[this.stack.length-1].url=e},P=function(){var e=this.resume();this.stack[this.stack.length-1].title=e},U=function(){r("inReference")},B=function(){r("referenceType","collapsed")},N=function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ba(this.sliceSerialize(e)).toLowerCase(),r("referenceType","full")},H=function(e){r("characterReferenceType",e.type)},W=function(e){var t,n=this.sliceSerialize(e),s=i("characterReferenceType");s?(t=ul(n,"characterReferenceMarkerNumeric"===s?10:16),r("characterReferenceType")):t=Ra(n);var a=this.stack.pop();a.value+=t,a.position.end=o(e.end)},V=function(e){k.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},z=function(e){k.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},G=function(){return{type:"blockquote",children:[]}},q=function(){return{type:"code",lang:null,meta:null,value:""}},K=function(){return{type:"inlineCode",value:""}},Z=function(){return{type:"definition",identifier:"",label:null,title:null,url:""}},Y=function(){return{type:"emphasis",children:[]}},X=function(){return{type:"heading",depth:void 0,children:[]}},Q=function(){return{type:"break"}},J=function(){return{type:"html",value:""}},ee=function(){return{type:"image",title:null,url:"",alt:null}},te=function(){return{type:"link",title:null,url:"",children:[]}},ne=function(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}},re=function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}},ie=function(){return{type:"paragraph",children:[]}},oe=function(){return{type:"strong",children:[]}},se=function(){return{type:"text",value:""}},ae=function(){return{type:"thematicBreak"}},le=vl({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:s(X),blockQuote:s(G),characterEscape:E,characterReference:E,codeFenced:s(q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(q,a),codeText:s(K,a),codeTextData:E,data:E,codeFlowValue:E,definition:s(Z),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Y),hardBreakEscape:s(Q),hardBreakTrailing:s(Q),htmlFlow:s(J,a),htmlFlowData:E,htmlText:s(J,a),htmlTextData:E,image:s(ee),label:a,link:s(te),listItem:s(re),listItemValue:f,listOrdered:s(ne,d),listUnordered:s(ne),paragraph:s(ie),reference:B,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(X),strong:s(oe),thematicBreak:s(ae)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:z,autolinkProtocol:V,blockQuote:c(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:W,codeFenced:c(v),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:c(b),codeText:c(L),codeTextData:k,data:k,definition:c(),definitionDestinationString:_,definitionLabelString:y,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(T),htmlFlowData:k,htmlText:c(R),htmlTextData:k,image:c(F),label:D,labelText:I,lineEnding:$,link:c(O),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:N,resourceDestinationString:j,resourceTitleString:P,resource:U,setextHeading:c(S),setextHeadingLineSequence:C,setextHeadingText:x,strong:c(),thematicBreak:c()}},e.mdastExtensions||[]),ce={};return t}(n)(function(e){for(;!Ks(e););return e}(function(){var e=function(e){return function(n){return la(t,e,n)}},t={defined:[],lazy:{},constructs:ks([r].concat((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).extensions||[])),content:e(Vs),document:e(zs),flow:e(Qs),string:e(ea),text:e(ta)};return t}(n).document().write((o=1,s="",a=!0,function(e,t,n){var r,l,c,u,h,d=[];for(e=s+e.toString(t),c=0,s="",a&&(65279===e.charCodeAt(0)&&c++,a=void 0);c<e.length;){if(cl.lastIndex=c,u=(r=cl.exec(e))&&void 0!==r.index?r.index:e.length,h=e.charCodeAt(u),!r){s=e.slice(c);break}if(10===h&&c===u&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),c<u&&(d.push(e.slice(c,u)),o+=u-c),h){case 0:d.push(65533),o++;break;case 9:for(l=4*Math.ceil(o/4),d.push(-2);o++<l;)d.push(-1);break;case 10:d.push(-4),o=1;break;default:i=!0,o=1}c=u+1}return n&&(i&&d.push(-5),s&&d.push(s),d.push(null)),d})(e,t,!0))));var i,o,s,a}(n,Object.assign({},i,e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}})};var _l=function(e,t,n){var r={type:String(e)};return null!=n||"string"!=typeof t&&!Array.isArray(t)?Object.assign(r,t):n=t,Array.isArray(n)?r.children=n:null!=n&&(r.value=String(n)),r};function Al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xl(e){return function(e){if(Array.isArray(e))return Al(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Al(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Al(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Cl=function(e){if(null==e)return El;if("string"==typeof e)return t=e,Sl((function(e){return e&&e.type===t}));var t;if("object"==typeof e)return Array.isArray(e)?function(e){for(var t=[],n=-1;++n<e.length;)t[n]=Cl(e[n]);return Sl((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=-1;++i<t.length;){var o;if((o=t[i]).call.apply(o,[this].concat(xl(n))))return!0}return!1}))}(e):function(e){return Sl((function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}))}(e);if("function"==typeof e)return Sl(e);throw new Error("Expected function, string, or object as test")};function Sl(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return Boolean((i=e).call.apply(i,[this].concat(xl(n))))}}function El(){return!0}var kl=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);var i=Cl(t),o=r?-1:1;!function e(s,a,l){var c,u="object"==typeof s&&null!==s?s:{};return"string"==typeof u.type&&(c="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(h,"name",{value:"node ("+u.type+(c?"<"+c+">":"")+")"})),h;function h(){var c,u,h,d=[];if((!t||i(s,a,l[l.length-1]||null))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(n(s,l)),!1===d[0]))return d;if(s.children&&"skip"!==d[0])for(u=(r?s.children.length:-1)+o,h=l.concat(s);u>-1&&u<s.children.length;){if(!1===(c=e(s.children[u],u,h)())[0])return c;u="number"==typeof c[1]?c[1]:u+o}return d}}(e,null,[])()}(e,t,(function(e,t){var r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)},$l=Tl("start"),Ml=Tl("end");function Tl(e){return function(t){var n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}var Rl={}.hasOwnProperty;function Ll(e){return String(e||"").toUpperCase()}function Ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Il={}.hasOwnProperty;function Dl(e,t){var n=t.data||{};return"value"in t&&!(Il.call(n,"hName")||Il.call(n,"hProperties")||Il.call(n,"hChildren"))?e.augment(t,_l("text",t.value)):e(t,"div",Ul(e,t))}function jl(e,t,n){var r,i=t&&t.type;if(!i)throw new Error("Expected node, got `"+t+"`");return("function"==typeof(r=Il.call(e.handlers,i)?e.handlers[i]:e.passThrough&&e.passThrough.includes(i)?Pl:e.unknownHandler)?r:Dl)(e,t,n)}function Pl(e,t){return"children"in t?(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Fl(e,t,n[t])}))}return e}({},t),r=null!=(r={children:Ul(e,t)})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n):t;var n,r}function Ul(e,t){var n,r=[];if("children"in t)for(var i=t.children,o=-1;++o<i.length;){var s=jl(e,i[o],t);if(s){if(o&&"break"===i[o-1].type&&(Array.isArray(s)||"text"!==s.type||(s.value=s.value.replace(/^\s+/,"")),!Array.isArray(s)&&"element"===s.type)){var a=s.children[0];a&&"text"===a.type&&(a.value=a.value.replace(/^\s+/,""))}var l;Array.isArray(s)?(l=r).push.apply(l,function(e){if(Array.isArray(e))return Ol(e)}(n=s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ol(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ol(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):r.push(s)}}return r}function Bl(e,t){return e(t,"hr")}function Nl(e,t){var n=[],r=-1;for(t&&n.push(_l("text","\n"));++r<e.length;)r&&n.push(_l("text","\n")),n.push(e[r]);return t&&e.length>0&&n.push(_l("text","\n")),n}function Hl(e,t){var n={},r=t.ordered?"ol":"ul",i=Ul(e,t),o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<i.length;){var s=i[o];if("element"===s.type&&"li"===s.tagName&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,r,n,Nl(i,!0))}function Wl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vl(e,t){var n=e.footnoteOrder,r=String(t.identifier),i=n.indexOf(r),o=String(-1===i?n.push(r):i+1);return e(t,"a",{href:"#fn"+o,className:["footnote-ref"],id:"fnref"+o,role:"doc-noteref"},[e(t.position,"sup",[_l("text",o)])])}var zl=n(92690);function Gl(e,t){var n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return _l("text","!["+t.alt+r);var i=Ul(e,t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift(_l("text","["));var s=i[i.length-1];return s&&"text"===s.type?s.value+=r:i.push(_l("text",r)),i}function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kl(e){var t=e.spread;return null==t?e.children.length>1:t}var Zl={blockquote:function(e,t){return e(t,"blockquote",Nl(Ul(e,t),!0))},break:function(e,t){return[e(t,"br"),_l("text","\n")]},code:function(e,t){var n=t.value?t.value+"\n":"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={};r&&(i.className=["language-"+r]);var o=e(t,"code",i,[_l("text",n)]);return t.meta&&(o.data={meta:t.meta}),e(t.position,"pre",[o])},delete:function(e,t){return e(t,"del",Ul(e,t))},emphasis:function(e,t){return e(t,"em",Ul(e,t))},footnoteReference:Vl,footnote:function(e,t){for(var n=e.footnoteById,r=e.footnoteOrder,i=1;i in n;)i++;var o=String(i);return r.push(o),n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},Vl(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){return e(t,"h"+t.depth,Ul(e,t))},html:function(e,t){return e.dangerous?e.augment(t,_l("raw",t.value)):null},imageReference:function(e,t){var n=e.definition(t.identifier);if(!n)return Gl(e,t);var r={src:zl(n.url||""),alt:t.alt};return null!==n.title&&void 0!==n.title&&(r.title=n.title),e(t,"img",r)},image:function(e,t){var n={src:zl(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"img",n)},inlineCode:function(e,t){return e(t,"code",[_l("text",t.value.replace(/\r?\n|\r/g," "))])},linkReference:function(e,t){var n=e.definition(t.identifier);if(!n)return Gl(e,t);var r={href:zl(n.url||"")};return null!==n.title&&void 0!==n.title&&(r.title=n.title),e(t,"a",r,Ul(e,t))},link:function(e,t){var n={href:zl(t.url)};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"a",n,Ul(e,t))},listItem:function(e,t,n){var r,i,o=Ul(e,t),s=n?function(e){for(var t=e.spread,n=e.children,r=-1;!t&&++r<n.length;)t=Kl(n[r]);return Boolean(t)}(n):Kl(t),a={},l=[];"boolean"==typeof t.checked&&(o[0]&&"element"===o[0].type&&"p"===o[0].tagName?r=o[0]:(r=e(null,"p",[]),o.unshift(r)),r.children.length>0&&r.children.unshift(_l("text"," ")),r.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),a.className=["task-list-item"]);for(var c=-1;++c<o.length;){var u,h=o[c];(s||0!==c||"element"!==h.type||"p"!==h.tagName)&&l.push(_l("text","\n")),"element"!==h.type||"p"!==h.tagName||s?l.push(h):(u=l).push.apply(u,function(e){if(Array.isArray(e))return ql(e)}(i=h.children)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return ql(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ql(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}var d=o[o.length-1];return!d||!s&&"tagName"in d&&"p"===d.tagName||l.push(_l("text","\n")),e(t,"li",a,l)},list:Hl,paragraph:function(e,t){return e(t,"p",Ul(e,t))},root:function(e,t){return e.augment(t,_l("root",Nl(Ul(e,t))))},strong:function(e,t){return e(t,"strong",Ul(e,t))},table:function(e,t){for(var n=t.children,r=-1,i=t.align||[],o=[];++r<n.length;){for(var s=n[r].children,a=0===r?"th":"td",l=t.align?i.length:s.length,c=[];l--;){var u=s[l];c[l]=e(u,a,{align:i[l]},u?Ul(e,u):[])}o[r]=e(n[r],"tr",Nl(c,!0))}return e(t,"table",Nl([e(o[0].position,"thead",Nl([o[0]],!0))].concat(o[1]?e({start:$l(o[1]),end:Ml(o[o.length-1])},"tbody",Nl(o.slice(1),!0)):[]),!0))},text:function(e,t){return e.augment(t,_l("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))},thematicBreak:Bl,toml:Yl,yaml:Yl,definition:Yl,footnoteDefinition:Yl};function Yl(){return null}function Xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ql(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xl(e,t,n[t])}))}return e}var Jl={}.hasOwnProperty;function ec(e,t){var n=function(e,t){var n=function(e,t){if(e&&"data"in e&&e.data){var n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=Ql({},t.properties,n.hProperties)),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){var r="type"in e?e:{position:e};(i=r)&&i.position&&i.position.start&&i.position.start.line&&i.position.start.column&&i.position.end&&i.position.end.line&&i.position.end.column&&(t.position={start:$l(r),end:Ml(r)})}var i;return t},r=function(e,t,r,i){return Array.isArray(r)&&(i=r,r={}),n(e,{type:"element",tagName:t,properties:r||{},children:i||[]})},i=t||{},o=i.allowDangerousHtml||!1,s={};return r.dangerous=o,r.definition=function(e){var t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return kl(e,"definition",(function(e){var n=Ll(e.identifier);n&&!Rl.call(t,n)&&(t[n]=e)})),function(e){var n=Ll(e);return n&&Rl.call(t,n)?t[n]:null}}(e),r.footnoteById=s,r.footnoteOrder=[],r.augment=n,r.handlers=Ql({},Zl,i.handlers),r.unknownHandler=i.unknownHandler,r.passThrough=i.passThrough,kl(e,"footnoteDefinition",(function(e){var t=String(e.identifier).toUpperCase();Jl.call(s,t)||(s[t]=e)})),r}(e,t),r=jl(n,e,null),i=function(e){for(var t=e.footnoteById,n=e.footnoteOrder,r=-1,i=[];++r<n.length;){var o=t[n[r].toUpperCase()];if(o){var s=String(r+1),a=function(e){if(Array.isArray(e))return Wl(e)}(u=o.children)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,t){if(e){if("string"==typeof e)return Wl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wl(e,t):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l={type:"link",url:"#fnref"+s,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"↩"}]},c=a[a.length-1];c&&"paragraph"===c.type?c.children.push(l):a.push(l),i.push({type:"listItem",data:{hProperties:{id:"fn"+s,role:"doc-endnote"}},children:a,position:o.position})}}var u;return 0===i.length?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},Nl([Bl(e),Hl(e,{type:"list",ordered:!0,children:i})],!0))}(n);return i&&r.children.push(_l("text","\n"),i),Array.isArray(r)?{type:"root",children:r}:r}const tc=function(e,t){return e&&"run"in e?function(e,t){return function(n,r,i){e.run(ec(n,t),r,(function(e){i(e)}))}}(e,t):function(e){return function(t){return ec(t,e)}}(e)};var nc=n(95304),rc=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.property=t,this.normal=n,r&&(this.space=r)};function ic(e,t){for(var n={},r={},i=-1;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new rc(n,r,t)}function oc(e){return e.toLowerCase()}rc.prototype.property={},rc.prototype.normal={},rc.prototype.space=null;var sc=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.property=t,this.attribute=n};sc.prototype.space=null,sc.prototype.boolean=!1,sc.prototype.booleanish=!1,sc.prototype.overloadedBoolean=!1,sc.prototype.number=!1,sc.prototype.commaSeparated=!1,sc.prototype.spaceSeparated=!1,sc.prototype.commaOrSpaceSeparated=!1,sc.prototype.mustUseProperty=!1,sc.prototype.defined=!1;var ac=0,lc=mc(),cc=mc(),uc=mc(),hc=mc(),dc=mc(),fc=mc(),pc=mc();function mc(){return Math.pow(2,++ac)}function gc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vc(e)}function bc(e,t){return!t||"object"!==wc(t)&&"function"!=typeof t?gc(e):t}function yc(e,t){return yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},yc(e,t)}var wc=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var _c=Object.keys(i),Ac=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yc(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=vc(t);if(n){var i=vc(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return bc(this,e)});function o(e,t,n,s){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var l=-1;if(xc(gc(a=r.call(this,e,t)),"space",s),"number"==typeof n)for(;++l<_c.length;){var c=_c[l];xc(gc(a),_c[l],(n&i[c])===i[c])}return a}return o}(sc);function xc(e,t,n){n&&(e[t]=n)}Ac.prototype.defined=!0;var Cc={}.hasOwnProperty;function Sc(e){var t,n={},r={};for(t in e.properties)if(Cc.call(e.properties,t)){var i=e.properties[t],o=new Ac(t,e.transform(e.attributes||{},t),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(o.mustUseProperty=!0),n[t]=o,r[oc(t)]=t,r[oc(o.attribute)]=t}return new rc(n,r,e.space)}var Ec=Sc({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),kc=Sc({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function $c(e,t){return t in e?e[t]:t}function Mc(e,t){return $c(e,t.toLowerCase())}var Tc=Sc({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Mc,properties:{xmlns:null,xmlnsXLink:null}}),Rc=Sc({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:cc,ariaAutoComplete:null,ariaBusy:cc,ariaChecked:cc,ariaColCount:hc,ariaColIndex:hc,ariaColSpan:hc,ariaControls:dc,ariaCurrent:null,ariaDescribedBy:dc,ariaDetails:null,ariaDisabled:cc,ariaDropEffect:dc,ariaErrorMessage:null,ariaExpanded:cc,ariaFlowTo:dc,ariaGrabbed:cc,ariaHasPopup:null,ariaHidden:cc,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dc,ariaLevel:hc,ariaLive:null,ariaModal:cc,ariaMultiLine:cc,ariaMultiSelectable:cc,ariaOrientation:null,ariaOwns:dc,ariaPlaceholder:null,ariaPosInSet:hc,ariaPressed:cc,ariaReadOnly:cc,ariaRelevant:null,ariaRequired:cc,ariaRoleDescription:dc,ariaRowCount:hc,ariaRowIndex:hc,ariaRowSpan:hc,ariaSelected:cc,ariaSetSize:hc,ariaSort:null,ariaValueMax:hc,ariaValueMin:hc,ariaValueNow:hc,ariaValueText:null,role:null}}),Lc=Sc({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Mc,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fc,acceptCharset:dc,accessKey:dc,action:null,allow:null,allowFullScreen:lc,allowPaymentRequest:lc,allowUserMedia:lc,alt:null,as:null,async:lc,autoCapitalize:null,autoComplete:dc,autoFocus:lc,autoPlay:lc,capture:lc,charSet:null,checked:lc,cite:null,className:dc,cols:hc,colSpan:null,content:null,contentEditable:cc,controls:lc,controlsList:dc,coords:hc|fc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lc,defer:lc,dir:null,dirName:null,disabled:lc,download:uc,draggable:cc,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lc,formTarget:null,headers:dc,height:hc,hidden:lc,high:hc,href:null,hrefLang:null,htmlFor:dc,httpEquiv:dc,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:lc,itemId:null,itemProp:dc,itemRef:dc,itemScope:lc,itemType:dc,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lc,low:hc,manifest:null,max:null,maxLength:hc,media:null,method:null,min:null,minLength:hc,multiple:lc,muted:lc,name:null,nonce:null,noModule:lc,noValidate:lc,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:lc,optimum:hc,pattern:null,ping:dc,placeholder:null,playsInline:lc,poster:null,preload:null,readOnly:lc,referrerPolicy:null,rel:dc,required:lc,reversed:lc,rows:hc,rowSpan:hc,sandbox:dc,scope:null,scoped:lc,seamless:lc,selected:lc,shape:null,size:hc,sizes:null,slot:null,span:hc,spellCheck:cc,src:null,srcDoc:null,srcLang:null,srcSet:null,start:hc,step:null,style:null,tabIndex:hc,target:null,title:null,translate:null,type:null,typeMustMatch:lc,useMap:null,value:cc,width:hc,wrap:null,align:null,aLink:null,archive:dc,axis:null,background:null,bgColor:null,border:hc,borderColor:null,bottomMargin:hc,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lc,declare:lc,event:null,face:null,frame:null,frameBorder:null,hSpace:hc,leftMargin:hc,link:null,longDesc:null,lowSrc:null,marginHeight:hc,marginWidth:hc,noResize:lc,noHref:lc,noShade:lc,noWrap:lc,object:null,profile:null,prompt:null,rev:null,rightMargin:hc,rules:null,scheme:null,scrolling:cc,standby:null,summary:null,text:null,topMargin:hc,valueType:null,version:null,vAlign:null,vLink:null,vSpace:hc,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:lc,disableRemotePlayback:lc,prefix:null,property:null,results:hc,security:null,unselectable:null}}),Oc=Sc({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:$c,properties:{about:pc,accentHeight:hc,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:hc,amplitude:hc,arabicForm:null,ascent:hc,attributeName:null,attributeType:null,azimuth:hc,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:hc,by:null,calcMode:null,capHeight:hc,className:dc,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:hc,diffuseConstant:hc,direction:null,display:null,dur:null,divisor:hc,dominantBaseline:null,download:lc,dx:null,dy:null,edgeMode:null,editable:null,elevation:hc,enableBackground:null,end:null,event:null,exponent:hc,externalResourcesRequired:null,fill:null,fillOpacity:hc,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fc,g2:fc,glyphName:fc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:hc,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:hc,horizOriginX:hc,horizOriginY:hc,id:null,ideographic:hc,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:hc,k:hc,k1:hc,k2:hc,k3:hc,k4:hc,kernelMatrix:pc,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:hc,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:hc,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:hc,overlineThickness:hc,paintOrder:null,panose1:null,path:null,pathLength:hc,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dc,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:hc,pointsAtY:hc,pointsAtZ:hc,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pc,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pc,rev:pc,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pc,requiredFeatures:pc,requiredFonts:pc,requiredFormats:pc,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:hc,specularExponent:hc,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:hc,strikethroughThickness:hc,string:null,stroke:null,strokeDashArray:pc,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:hc,strokeOpacity:hc,strokeWidth:null,style:null,surfaceScale:hc,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pc,tabIndex:hc,tableValues:null,target:null,targetX:hc,targetY:hc,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pc,to:null,transform:null,u1:null,u2:null,underlinePosition:hc,underlineThickness:hc,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:hc,values:null,vAlphabetic:hc,vMathematical:hc,vectorEffect:null,vHanging:hc,vIdeographic:hc,version:null,vertAdvY:hc,vertOriginX:hc,vertOriginY:hc,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:hc,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Fc=ic([kc,Ec,Tc,Rc,Lc],"html"),Ic=ic([kc,Ec,Tc,Rc,Oc],"svg");function Dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jc(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return function(t){kl(t,"element",(function(t,n,r){var i,o,s,a=r;if(e.allowedElements?i=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(i=e.disallowedElements.includes(t.tagName)),!i&&e.allowElement&&"number"==typeof n&&(i=!e.allowElement(t,n,a)),i&&"number"==typeof n)return e.unwrapDisallowed&&t.children?(o=a.children).splice.apply(o,[n,1].concat(function(e){if(Array.isArray(e))return Dc(e)}(s=t.children)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return Dc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dc(e,t):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):a.children.splice(n,1),n}))}}var Pc=["http","https","mailto","tel"],Uc=n(32815),Bc=/^data[-\w.:]+$/i,Nc=/-[a-z]/g,Hc=/[A-Z]/g;function Wc(e){return"-"+e.toLowerCase()}function Vc(e){return e.charAt(1).toUpperCase()}var zc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};function Gc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qc=n(56376),Kc={}.hasOwnProperty,Zc=new Set(["table","thead","tbody","tfoot","tr"]);function Yc(e,t){for(var n,r,i,o=[],s=-1;++s<t.children.length;)"element"===(n=t.children[s]).type?o.push(Xc(e,n,s,t)):"text"===n.type?"element"===t.type&&Zc.has(t.tagName)&&(i=void 0,"string"==typeof(i=(r=n)&&"object"==typeof r&&"text"===r.type?r.value||"":r)&&""===i.replace(/[ \t\n\f\r]/g,""))||o.push(n.value):"raw"!==n.type||e.options.skipHtml||o.push(n.value);return o}function Xc(e,t,n,r){var i,o=e.options,s=e.schema,a=t.tagName,c={},u=s;if("html"===s.space&&"svg"===a&&(u=Ic,e.schema=u),t.properties)for(i in t.properties)Kc.call(t.properties,i)&&Jc(c,i,t.properties[i],e);"ol"!==a&&"ul"!==a||e.listDepth++;var h=Yc(e,t);"ol"!==a&&"ul"!==a||e.listDepth--,e.schema=s;var d,f=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=o.components&&Kc.call(o.components,a)?o.components[a]:a,m="string"==typeof p||p===l.Fragment;if(!Uc.isValidElementType(p))throw new TypeError("Component for name `".concat(a,"` not defined or is not renderable"));if(c.key=[a,f.start.line,f.start.column,n].join("-"),"a"===a&&o.linkTarget&&(c.target="function"==typeof o.linkTarget?o.linkTarget(String(c.href||""),t.children,"string"==typeof c.title?c.title:null):o.linkTarget),"a"===a&&o.transformLinkUri&&(c.href=o.transformLinkUri(String(c.href||""),t.children,"string"==typeof c.title?c.title:null)),m||"code"!==a||"element"!==r.type||"pre"===r.tagName||(c.inline=!0),m||"h1"!==a&&"h2"!==a&&"h3"!==a&&"h4"!==a&&"h5"!==a&&"h6"!==a||(c.level=Number.parseInt(a.charAt(1),10)),"img"===a&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),"string"==typeof c.title?c.title:null)),!m&&"li"===a&&"element"===r.type){var g=function(e){for(var t=-1;++t<e.children.length;){var n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);c.checked=g&&g.properties?Boolean(g.properties.checked):null,c.index=Qc(r,t),c.ordered="ol"===r.tagName}return m||"ol"!==a&&"ul"!==a||(c.ordered="ol"===a,c.depth=e.listDepth),"td"!==a&&"th"!==a||(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),m||(c.isHeader="th"===a)),m||"tr"!==a||"element"!==r.type||(c.isHeader=Boolean("thead"===r.tagName)),o.sourcePos&&(c["data-sourcepos"]=[(d=f).start.line,":",d.start.column,"-",d.end.line,":",d.end.column].map((function(e){return String(e)})).join("")),!m&&o.rawSourcePos&&(c.sourcePosition=t.position),!m&&o.includeElementIndex&&(c.index=Qc(r,t),c.siblingCount=Qc(r)),m||(c.node=t),h.length>0?l.createElement(p,c,h):l.createElement(p,c)}function Qc(e,t){for(var n=-1,r=0;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function Jc(e,t,n,r){var i,o,s,a=function(e,t){var n=oc(t),r=t,i=sc;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Bc.test(t)){if("-"===t.charAt(4)){var o=t.slice(5).replace(Nc,Vc);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{var s=t.slice(4);if(!Nc.test(s)){var a=s.replace(Hc,Wc);"-"!==a.charAt(0)&&(a="-"+a),t="data"+a}}i=Ac}return new i(r,t)}(r.schema,t),l=n;null!=l&&l==l&&(Array.isArray(l)&&(l=a.commaSeparated?(s={},(""===(i=l)[i.length-1]?(o=i,function(e){if(Array.isArray(e))return Gc(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return Gc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gc(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([""]):i).join((s.padRight?" ":"")+","+(!1===s.padLeft?"":" ")).trim()):function(e){return e.join(" ").trim()}(l)),"style"===a.property&&"string"==typeof l&&(l=function(e){var t={};try{qc(e,(function(e,n){var r="-ms-"===e.slice(0,4)?"ms-".concat(e.slice(4)):e;t[r.replace(/-([a-z])/g,eu)]=n}))}catch(e){}return t}(l)),a.space&&a.property?e[Kc.call(zc,a.property)?zc[a.property]:a.property]=l:a.attribute&&(e[a.attribute]=l))}function eu(e,t){return t.toUpperCase()}var tu={}.hasOwnProperty,nu={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ru(e){for(var t in nu)if(tu.call(nu,t)&&tu.call(e,t)){var n=nu[t];console.warn("[react-markdown] Warning: please ".concat(n.to?"use `".concat(n.to,"` instead of"):"remove"," `").concat(t,"` (see <").concat("https://github.com/remarkjs/react-markdown/blob/main/changelog.md","#").concat(n.id,"> for more info)")),delete nu[t]}var r=ds().use(wl).use(e.remarkPlugins||e.plugins||[]).use(tc,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(jc,e),i=new Yo;"string"==typeof e.children?i.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));var o=r.runSync(r.parse(i),i);if("root"!==o.type)throw new TypeError("Expected a `root` node");var s=l.createElement(l.Fragment,{},Yc({options:e,schema:Fc,listDepth:0},o));return e.className&&(s=l.createElement("div",{className:e.className},s)),s}ru.defaultProps={transformLinkUri:function(e){var t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;var r=t.indexOf(":");if(-1===r)return t;for(var i=-1;++i<Pc.length;){var o=Pc[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return-1!==(i=t.indexOf("?"))&&r>i||-1!==(i=t.indexOf("#"))&&r>i?t:"javascript:void(0)"}},ru.propTypes={children:nc.string,className:nc.string,allowElement:nc.func,allowedElements:nc.arrayOf(nc.string),disallowedElements:nc.arrayOf(nc.string),unwrapDisallowed:nc.bool,remarkPlugins:nc.arrayOf(nc.oneOfType([nc.object,nc.func,nc.arrayOf(nc.oneOfType([nc.object,nc.func]))])),rehypePlugins:nc.arrayOf(nc.oneOfType([nc.object,nc.func,nc.arrayOf(nc.oneOfType([nc.object,nc.func]))])),sourcePos:nc.bool,rawSourcePos:nc.bool,skipHtml:nc.bool,includeElementIndex:nc.bool,transformLinkUri:nc.oneOfType([nc.func,nc.bool]),linkTarget:nc.oneOfType([nc.func,nc.string]),transformImageUri:nc.func,components:nc.object};const iu=function(e){var t=e.question;return!t.isHidden&&c().createElement(ru,{children:t.value.join("\n")})};var ou={validate:function(e,t,n){var r=new Date,i=t?[]:Fn.Ls.validate(e,t);return i.length?i:t&&!(0,In.o)(null==n?void 0:n.allowFutureDates)&&t.getTime()>r.getTime()?[{resultType:"error",errCode:"value.invalid",message:"Future dates not allowed"}]:[]}};function su(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var au={validate:function(e,t,n){return n.expressionContext.myValue=t,Object.keys(n).filter((function(e){return"failsWhenExpression"==e||"warnsWhenExpression"==e})).flatMap((function(r){var i,o,s="failsWhenExpression"==r;return(0,lo.j3)(n[r],{value:e,type:"field"},n.fields,(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){su(e,t,n[t])}))}return e}({},n.values),o=null!=(o=su({},e.id,t))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})),i),n.expressionContext)?[{resultType:s?"error":"warning",errCode:s?"value.invalid":null,message:n.message?n.message:s?"Invalid value":"Field has warnings"}]:[]}))}},lu=n(31581);const cu=function(e){var t=e.question,n=(0,l.useContext)(u),r=n.encounterContext,i=n.isSubmitting,o=(0,l.useMemo)((function(){return new lu.BehaviorSubject({isSubmitting:!1})}),[]),s=(0,l.useMemo)((function(){return{patientUuid:r.patient.id,submissionNotifier:o}}),[r.patient.id,o]);return(0,l.useEffect)((function(){t.questionOptions.extensionSlotName&&t.questionOptions.extensionId&&(0,ai.attach)(t.questionOptions.extensionSlotName,t.questionOptions.extensionId)}),[]),(0,l.useEffect)((function(){o.next({isSubmitting:i})}),[i,o]),c().createElement(c().Fragment,null,t.questionOptions.extensionSlotName&&c().createElement(ai.ExtensionSlot,{extensionSlotName:t.questionOptions.extensionSlotName,state:s}))};var uu=[{id:"OHRIText",loadControl:function(){return Promise.resolve({default:Ji})},type:"text",alias:""},{id:"OHRIRadio",loadControl:function(){return Promise.resolve({default:Li})},type:"radio",alias:""},{id:"OHRIDate",loadControl:function(){return Promise.resolve({default:si})},type:"date",alias:""},{id:"OHRINumber",loadControl:function(){return Promise.resolve({default:Ei})},type:"number",alias:"numeric"},{id:"OHRIMultiSelect",loadControl:function(){return Promise.resolve({default:yi})},type:"checkbox",alias:"multiCheckbox"},{id:"OHRIContentSwitcher",loadControl:function(){return Promise.resolve({default:Gr})},type:"content-switcher",alias:""},{id:"OHRIEncounterLocationPicker",loadControl:function(){return Promise.resolve({default:fi})},type:"encounter-location",alias:""},{id:"OHRIDropdown",loadControl:function(){return Promise.resolve({default:Pi})},type:"select",alias:""},{id:"OHRITextArea",loadControl:function(){return Promise.resolve({default:zi})},type:"textarea",alias:""},{id:"OHRIToggle",loadControl:function(){return Promise.resolve({default:oo})},type:"toggle",alias:""},{id:"OHRIObsGroup",loadControl:function(){return Promise.resolve({default:fr})},type:"group",alias:""},{id:"OHRIRepeat",loadControl:function(){return Promise.resolve({default:bo})},type:"repeating",alias:""},{id:"OHRIFixedValue",loadControl:function(){return Promise.resolve({default:Co})},type:"fixed-value",alias:""},{id:"OHRIMarkdown",loadControl:function(){return Promise.resolve({default:iu})},type:"markdown",alias:""},{id:"OHRIExtensionParcel",loadControl:function(){return Promise.resolve({default:cu})},type:"extension-widget",alias:""},{id:"OHRIDateTime",loadControl:function(){return Promise.resolve({default:si})},type:"datetime",alias:""}],hu=[{id:"ObsSubmissionHandler",component:wo,type:"obs"},{id:"ObsGroupHandler",component:wo,type:"obsGroup"},{id:"EncounterLocationSubmissionHandler",component:{handleFieldSubmission:function(e,t,n){return null},getInitialValue:function(e,t){return{display:e.location.name,uuid:e.location.uuid}},getDisplayValue:function(e,t){return t.display}},type:"encounterLocation"},{id:"EncounterDatetimeHandler",component:{handleFieldSubmission:function(e,t,n){return n.setEncounterDate(t),t},getInitialValue:function(e,t,n){return new Date},getDisplayValue:function(e,t){return e.value?e.value:null},getPreviousValue:function(e,t){return null}},type:"encounterDatetime"}],du=[{id:"OHRIBaseValidator",component:Fn.Ls},{id:"date",component:ou},{id:"js_expression",component:au}],fu=function(e){var t,n,r=null===(t=uu.find((function(t){return t.type==e||(null==t?void 0:t.alias)==e})))||void 0===t?void 0:t.loadControl;return r||(r=null===(n=mu().customControls.find((function(t){return t.type==e||(null==t?void 0:t.alias)==e})))||void 0===n?void 0:n.loadControl),null==r?void 0:r()};function pu(e){var t;return null===(t=hu.find((function(t){return t.type==e})))||void 0===t?void 0:t.component}function mu(){return(0,ai.getGlobalStore)(vr.mk,{customControls:[],postSubmissionActions:[]}).getState()}function gu(e){var t;return(null===(t=du.find((function(t){return t.id==e})))||void 0===t?void 0:t.component)||du[0].component}function vu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bu(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function yu(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){bu(o,r,i,s,a,"next",e)}function a(e){bu(o,r,i,s,a,"throw",e)}s(void 0)}))}}function wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||Au(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Au(e,t){if(e){if("string"==typeof e)return vu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vu(e,t):void 0}}var xu=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function Cu(e,t,n,r){var i=_u((0,l.useState)(null),2),o=i[0],s=i[1],a=_u((0,l.useState)(function(e,t){return e||t?e&&t?new Error("InvalidArgumentsErr: Both formUuid and formJson cannot be provided at the same time."):void 0:new Error("InvalidArgumentsErr: Neither formUuid nor formJson was provided")}(e,t)),2),c=a[0],u=a[1];return(0,l.useEffect)((function(){Su(e,t,r).then((function(e){var t,r;s((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wu(e,t,n[t])}))}return e}({},e),r=null!=(r={encounter:n})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})),t))})).catch((function(e){console.error(e),u(new Error("Error loading form JSON: "+e.message))}))}),[r,e,t,n]),{formJson:o,isLoading:!o,formError:c}}function Su(e,t,n){return Eu.apply(this,arguments)}function Eu(){return(Eu=yu((function(e,t,n){var r,i,o,s;return xu(this,(function(a){switch(a.label){case 0:return[4,(0,gr.fetchOpenMRSForm)(e)];case 1:return r=a.sent(),[4,(0,gr.fetchClobData)(r)];case 2:return i=a.sent(),[4,$u(ku(o=null!=i?i:t),n)];case 3:return s=a.sent(),Tu(o,s),[2,Ru(o,n)]}}))}))).apply(this,arguments)}function ku(e){return e.pages.filter((function(e){var t;return e.isSubform&&!e.subform.form&&(null===(t=e.subform)||void 0===t?void 0:t.name)})).map((function(e){var t;return null===(t=e.subform)||void 0===t?void 0:t.name}))}function $u(e,t){return Mu.apply(this,arguments)}function Mu(){return(Mu=yu((function(e,t){return xu(this,(function(n){return[2,Promise.all(e.map((function(e){return Su(e,null,t)})))]}))}))).apply(this,arguments)}function Tu(e,t){t.forEach((function(t){var n=e.pages.find((function(e){var n;return(null===(n=e.subform)||void 0===n?void 0:n.name)===t.name}));n&&(n.subform.form=t)}))}function Ru(e,t){var n=function(e){return"string"==typeof e?JSON.parse(e):JSON.parse(JSON.stringify(e))}(e);return function(e,t){for(var n=e.pages.length-1;n>=0;n--){var r,i,o,s=e.pages[n];if((0,In.o)(s.isSubform)&&!(0,In.o)(s.isHidden)&&(null===(r=s.subform)||void 0===r||null===(i=r.form)||void 0===i?void 0:i.encounterType)===e.encounterType)s.subform.form.pages.filter((function(e){return!(0,In.o)(e.isSubform)})),(o=e.pages).splice.apply(o,[n,1].concat(function(e){if(Array.isArray(e))return vu(e)}(a=Ru(s.subform.form,t).pages)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Au(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}var a}(n,t),function(e){e.encounter&&"string"==typeof e.encounter&&!e.encounterType&&(e.encounterType=e.encounter,delete e.encounter)}(n),t?o(t,n):n}var Lu=n(45907),Ou=n(25459),Fu=Object.prototype.hasOwnProperty;const Iu=function(e,t){return null!=e&&Fu.call(e,t)};var Du=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ju=/^\w*$/;const Pu=function(e,t){if((0,pe.Z)(e))return!1;var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,Ht.Z)(e))||ju.test(e)||!Du.test(e)||null!=t&&e in Object(t)},Uu=function(e,t){return(0,pe.Z)(e)?e:Pu(e,t)?[e]:Zt(en(e))},Bu=function(e,t,n){for(var r=-1,i=(t=Uu(t,e)).length,o=!1;++r<i;){var s=Yt(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&_e(i)&&we(s,i)&&((0,pe.Z)(e)||(0,fe.Z)(e))},Nu=function(e,t){return null!=e&&Bu(e,t,Iu)},Hu=function(e,t){return Ut(e,5,t="function"==typeof t?t:void 0)},Wu=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Vu=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var zu=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Gu=function(e){return zu.test(e)};var qu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ku="[^\ud800-\udfff]",Zu="(?:\ud83c[\udde6-\uddff]){2}",Yu="[\ud800-\udbff][\udc00-\udfff]",Xu="(?:"+qu+"|\ud83c[\udffb-\udfff])?",Qu="[\\ufe0e\\ufe0f]?",Ju=Qu+Xu+"(?:\\u200d(?:"+[Ku,Zu,Yu].join("|")+")"+Qu+Xu+")*",eh="(?:"+[Ku+qu+"?",qu,Zu,Yu,"[\ud800-\udfff]"].join("|")+")",th=RegExp("\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|"+eh+Ju,"g");const nh=function(e){return Gu(e)?function(e){return e.match(th)||[]}(e):function(e){return e.split("")}(e)},rh=function(e){return null==e?[]:function(e,t){return Nt(t,(function(t){return e[t]}))}(e,Ue(e))};var ih=St.Z?St.Z.iterator:void 0;const oh=function(e){if(!e)return[];if(Pe(e))return function(e){return"string"==typeof e||!(0,pe.Z)(e)&&(0,x.Z)(e)&&"[object String]"==(0,w.Z)(e)}(e)?nh(e):qe(e);if(ih&&e[ih])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ih]());var t=wt(e);return("[object Map]"==t?Wu:"[object Set]"==t?Vu:rh)(e)};var sh=Object.prototype.toString,ah=Error.prototype.toString,lh=RegExp.prototype.toString,ch="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},uh=/^Symbol\((.*)\)(.*)$/;function hh(e,t){if(void 0===t&&(t=!1),null==e||!0===e||!1===e)return""+e;var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;if("number"===r)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===r)return t?'"'+e+'"':e;if("function"===r)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===r)return ch.call(e).replace(uh,"Symbol($1)");var i,o,s=sh.call(e).slice(8,-1);return"Date"===s?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===s||(i=e,null!=(o=Error)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](i):i instanceof o)?"["+ah.call(e)+"]":"RegExp"===s?lh.call(e):null}function dh(e,t){var n=hh(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var r=hh(this[e],t);return null!==r?r:n}),2)}var fh="${path} is invalid",ph="${path} is a required field",mh="${path} must be one of the following values: ${values}",gh="${path} must not be one of the following values: ${values}",vh=function(e){var t=e.path,n=e.type,r=e.value,i=e.originalValue,o=null!=i&&i!==r,s=t+" must be a `"+n+"` type, but the final value was: `"+dh(r,!0)+"`"+(o?" (cast from the value `"+dh(i,!0)+"`).":".");return null===r&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s},bh="${path} must be defined",yh="${path} must be exactly ${length} characters",wh="${path} must be at least ${min} characters",_h="${path} must be at most ${max} characters",Ah='${path} must match the following: "${regex}"',xh="${path} must be a valid email",Ch="${path} must be a valid URL",Sh="${path} must be a valid UUID",Eh="${path} must be a trimmed string",kh="${path} must be a lowercase string",$h="${path} must be a upper case string",Mh="${path} must be greater than or equal to ${min}",Th="${path} must be less than or equal to ${max}",Rh="${path} must be less than ${less}",Lh="${path} must be greater than ${more}",Oh="${path} must be a positive number",Fh="${path} must be a negative number",Ih="${path} must be an integer",Dh="${path} field must be later than ${min}",jh="${path} field must be at earlier than ${max}",Ph="${path} field has unspecified keys: ${unknown}",Uh="${path} field must have at least ${min} items",Bh="${path} field must have less than or equal to ${max} items";function Nh(e){return e&&e.__isYupSchema__}var Hh=function(){var e=function(e,t){if(this.refs=e,"function"!=typeof t){if(!Nu(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var n=t.is,r=t.then,i=t.otherwise,o="function"==typeof n?n:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every((function(e){return e===n}))};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var s=t.pop(),a=t.pop(),l=o.apply(void 0,t)?r:i;if(l)return"function"==typeof l?l(a):a.concat(l.resolve(s))}}else this.fn=t};return e.prototype.resolve=function(e,t){var n=this.refs.map((function(e){return e.getValue(t)})),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!Nh(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)},e}();const Wh=Hh;var Vh=n(68187),zh=n(41590),Gh=/\$\{\s*(\w+)\s*\}/g,qh=function(e){return function(t){return e.replace(Gh,(function(e,n){return dh(t[n])}))}};function Kh(e,t,n,r){var i=this;this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){i.errors=i.errors.concat(e.errors||e),e.inner&&(i.inner=i.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Kh)}Kh.prototype=Object.create(Error.prototype),Kh.prototype.constructor=Kh,Kh.isError=function(e){return e&&"ValidationError"===e.name},Kh.formatError=function(e,t){"string"==typeof e&&(e=qh(e));var n=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?n:n(t)};var Zh=function(e){return e?zh.SynchronousPromise:Promise};function Yh(e,t){return e?null:function(e){return t.push(e),e.value}}function Xh(e){var t,n,r,i=e.endEarly,o=(0,Vh.Z)(e,["endEarly"]);return i?(t=o.validations,n=o.value,r=o.sync,Zh(r).all(t).catch((function(e){throw"ValidationError"===e.name&&(e.value=n),e})).then((function(){return n}))):function(e){var t=e.validations,n=e.value,r=e.path,i=e.sync,o=e.errors,s=e.sort;return o=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)}(o),function(e,t){var n=Zh(t);return n.all(e.map((function(e){return n.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}(t,i).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var n=t.value;if(!Kh.isError(n))throw n;return e.concat(n)}),[]);if(s&&t.sort(s),(o=t.concat(o)).length)throw new Kh(o,n,r);return n}))}(o)}var Qh=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function Jh(e,t){for(var n in t)if(Nu(t,n)){var r=t[n],i=e[n];if(void 0===i)e[n]=r;else{if(i===r)continue;Nh(i)?Nh(r)&&(e[n]=r.concat(i)):Qh(i)?Qh(r)&&(e[n]=Jh(i,r)):Array.isArray(i)&&Array.isArray(r)&&(e[n]=r.concat(i))}}return e}const ed=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[td?s:++r];if(!1===t(i[a],a,i))break}return e};var td;const nd=function(e,t){return e&&ed(e,t,Ue)};function rd(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}rd.prototype.add=rd.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},rd.prototype.has=function(e){return this.__data__.has(e)};const id=rd,od=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},sd=function(e,t){return e.has(t)},ad=function(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=2&n?new id:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var p=e[h],m=t[h];if(r)var g=s?r(m,p,h,t,e,o):r(p,m,h,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!od(t,(function(e,t){if(!sd(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){d=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d};var ld=St.Z?St.Z.prototype:void 0,cd=ld?ld.valueOf:void 0;function ud(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var hd=Object.prototype.hasOwnProperty;var dd="[object Arguments]",fd="[object Array]",pd="[object Object]",md=Object.prototype.hasOwnProperty;const gd=function(e,t,n,r,i,o){var s=(0,pe.Z)(e),a=(0,pe.Z)(t),l=s?fd:wt(e),c=a?fd:wt(t),u=(l=l==dd?pd:l)==pd,h=(c=c==dd?pd:c)==pd,d=l==c;if(d&&be(e)){if(!be(t))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new ae),s||Te(e)?ad(e,t,n,r,i,o):function(e,t,n,r,i,o,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new At(e),new At(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return T(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Wu;case"[object Set]":var l=1&r;if(a||(a=Vu),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var u=ad(a(e),a(t),r,i,o,s);return s.delete(e),u;case"[object Symbol]":if(cd)return cd.call(e)==cd.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var f=u&&md.call(e,"__wrapped__"),p=h&&md.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new ae),i(m,g,n,r,o)}}return!!d&&(o||(o=new ae),function(e,t,n,r,i,o){var s=1&n,a=rt(e),l=a.length;if(l!=rt(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:hd.call(t,u)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++c<l;){var m=e[u=a[c]],g=t[u];if(r)var v=s?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&ud(b,b)&&"function"==typeof y&&ud(y,y)||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))},vd=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,x.Z)(t)&&!(0,x.Z)(n)?t!=t&&n!=n:gd(t,n,r,i,e,o))},bd=function(e){return e==e&&!(0,I.Z)(e)},yd=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},wd=function(e){var t=function(e){for(var t=Ue(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,bd(i)]}return t}(e);return 1==t.length&&t[0][2]?yd(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var l=(a=n[i])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var h=new ae;if(r)var d=r(c,u,l,e,t,h);if(!(void 0===d?vd(u,c,3,r,h):d))return!1}}return!0}(n,e,t)}},_d=function(e,t){for(var n=0,r=(t=Uu(t,e)).length;null!=e&&n<r;)e=e[Yt(t[n++])];return n&&n==r?e:void 0},Ad=function(e,t){return null!=e&&t in Object(e)},xd=function(e,t){return Pu(e)&&bd(t)?yd(Yt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:_d(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&Bu(e,t,Ad)}(n,e):vd(t,r,3)}},Cd=function(e){return e},Sd=function(e){return Pu(e)?(t=Yt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return _d(t,e)}}(e);var t},Ed=function(e){return"function"==typeof e?e:null==e?Cd:"object"==typeof e?(0,pe.Z)(e)?xd(e[0],e[1]):wd(e):Sd(e)},kd=function(e,t){var n={};return t=Ed(t),nd(e,(function(e,r,i){ce(n,r,t(e,r,i))})),n};var $d=n(60731),Md=function(){var e=function(e,t){if(void 0===t&&(t={}),"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue;var n=this.isContext?"$":this.isValue?".":"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,$d.getter)(this.path,!0),this.map=t.map},t=e.prototype;return t.getValue=function(e){var t=this.isContext?e.context:this.isValue?e.value:e.parent;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t},t.cast=function(e,t){return this.getValue((0,Lu.Z)({},t,{value:e}))},t.resolve=function(){return this},t.describe=function(){return{type:"ref",key:this.key}},t.toString=function(){return"Ref("+this.key+")"},e.isRef=function(e){return e&&e.__isYupRef},e}();Md.prototype.__isYupRef=!0;var Td=Kh.formatError;function Rd(e){var t=function(e){var t=e.value,s=e.path,a=e.label,l=e.options,c=e.originalValue,u=e.sync,h=(0,Vh.Z)(e,["value","path","label","options","originalValue","sync"]),d=l.parent,f=function(e){return Md.isRef(e)?e.getValue({value:t,parent:d,context:l.context}):e},p=function(e){var t=e.value,n=e.label,r=e.resolve,i=e.originalValue,o=(0,Vh.Z)(e,["value","label","resolve","originalValue"]);return function(e){var s=void 0===e?{}:e,a=s.path,l=void 0===a?o.path:a,c=s.message,u=void 0===c?o.message:c,h=s.type,d=void 0===h?o.name:h,f=s.params;return f=(0,Lu.Z)({path:l,value:t,originalValue:i,label:n},function(e,t,n){return kd((0,Lu.Z)({},e,t),n)}(o.params,f,r)),(0,Lu.Z)(new Kh(Td(u,f),t,l,d),{params:f})}}({message:r,path:s,value:t,originalValue:c,params:o,label:a,resolve:f,name:n}),m=(0,Lu.Z)({path:s,parent:d,type:n,createError:p,resolve:f,options:l},h);return function(e,t,n,r){var i,o=e.call(t,n);if(!r)return Promise.resolve(o);if((i=o)&&"function"==typeof i.then&&"function"==typeof i.catch)throw new Error('Validation test of type: "'+t.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return zh.SynchronousPromise.resolve(o)}(i,m,t,u).then((function(e){if(Kh.isError(e))throw e;if(!e)throw p()}))},n=e.name,r=e.message,i=e.test,o=e.params;return t.OPTIONS=e,t}function Ld(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Od(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fd=function(){var e=function(){this.list=new Set,this.refs=new Map},t=e.prototype;return t.describe=function(){for(var e,t=[],n=Ld(this.list);!(e=n()).done;){var r=e.value;t.push(r)}for(var i,o=Ld(this.refs);!(i=o()).done;){var s=i.value[1];t.push(s.describe())}return t},t.toArray=function(){return oh(this.list).concat(oh(this.refs.values()))},t.add=function(e){Md.isRef(e)?this.refs.set(e.key,e):this.list.add(e)},t.delete=function(e){Md.isRef(e)?this.refs.delete(e.key):this.list.delete(e)},t.has=function(e,t){if(this.list.has(e))return!0;for(var n,r=this.refs.values();!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1},t.clone=function(){var t=new e;return t.list=new Set(this.list),t.refs=new Map(this.refs),t},t.merge=function(e,t){var n=this.clone();return e.list.forEach((function(e){return n.add(e)})),e.refs.forEach((function(e){return n.add(e)})),t.list.forEach((function(e){return n.delete(e)})),t.refs.forEach((function(e){return n.delete(e)})),n},(0,Ou.Z)(e,[{key:"size",get:function(){return this.list.size+this.refs.size}}]),e}();function Id(e){var t,n=this;if(void 0===e&&(e={}),this,!(null!=(t=Id)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](this):this instanceof t))return new Id;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new Fd,this._blacklist=new Fd,this.tests=[],this.transforms=[],this.withMutation((function(){n.typeError(vh)})),Nu(e,"default")&&(this._defaultDefault=e.default),this.type=e.type||"mixed",this._type=e.type||"mixed"}for(var Dd=Id.prototype={__isYupSchema__:!0,constructor:Id,clone:function(){var e=this;return this._mutate?this:Hu(this,(function(t){if(Nh(t)&&t!==e)return t}))},label:function(e){var t=this.clone();return t._label=e,t},meta:function(e){if(0===arguments.length)return this._meta;var t=this.clone();return t._meta=(0,Lu.Z)(t._meta||{},e),t},withMutation:function(e){var t=this._mutate;this._mutate=!0;var n=e(this);return this._mutate=t,n},concat:function(e){if(!e||e===this)return this;if(e._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+e._type);var t=Jh(e.clone(),this);return Nu(e,"_default")&&(t._default=e._default),t.tests=this.tests,t._exclusive=this._exclusive,t._whitelist=this._whitelist.merge(e._whitelist,e._blacklist),t._blacklist=this._blacklist.merge(e._blacklist,e._whitelist),t.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),t},isType:function(e){return!(!this._nullable||null!==e)||!this._typeCheck||this._typeCheck(e)},resolve:function(e){var t=this;if(t._conditions.length){var n=t._conditions;(t=t.clone())._conditions=[],t=(t=n.reduce((function(t,n){return n.resolve(t,e)}),t)).resolve(e)}return t},cast:function(e,t){void 0===t&&(t={});var n=this.resolve((0,Lu.Z)({},t,{value:e})),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){var i=dh(e),o=dh(r);throw new TypeError("The value of "+(t.path||"field")+' could not be cast to a value that satisfies the schema type: "'+n._type+'". \n\nattempted value: '+i+" \n"+(o!==i?"result of cast: "+o:""))}return r},_cast:function(e){var t=this,n=void 0===e?e:this.transforms.reduce((function(n,r){return r.call(t,n,e)}),e);return void 0===n&&Nu(this,"_default")&&(n=this.default()),n},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=e,i=null!=t.originalValue?t.originalValue:e,o=this._option("strict",t),s=this._option("abortEarly",t),a=t.sync,l=t.path,c=this._label;o||(r=this._cast(r,(0,Lu.Z)({assert:!1},t)));var u={value:r,path:l,schema:this,options:t,label:c,originalValue:i,sync:a};t.from&&(u.from=t.from);var h=[];return this._typeError&&h.push(this._typeError(u)),this._whitelistError&&h.push(this._whitelistError(u)),this._blacklistError&&h.push(this._blacklistError(u)),Xh({validations:h,endEarly:s,value:r,path:l,sync:a}).then((function(e){return Xh({path:l,sync:a,value:e,endEarly:s,validations:n.tests.map((function(e){return e(u)}))})}))},validate:function(e,t){return void 0===t&&(t={}),this.resolve((0,Lu.Z)({},t,{value:e}))._validate(e,t)},validateSync:function(e,t){var n,r;if(void 0===t&&(t={}),this.resolve((0,Lu.Z)({},t,{value:e}))._validate(e,(0,Lu.Z)({},t,{sync:!0})).then((function(e){return n=e})).catch((function(e){return r=e})),r)throw r;return n},isValid:function(e,t){return this.validate(e,t).then((function(){return!0})).catch((function(e){if("ValidationError"===e.name)return!1;throw e}))},isValidSync:function(e,t){try{return this.validateSync(e,t),!0}catch(e){if("ValidationError"===e.name)return!1;throw e}},getDefault:function(e){return void 0===e&&(e={}),this.resolve(e).default()},default:function(e){if(0===arguments.length){var t=Nu(this,"_default")?this._default:this._defaultDefault;return"function"==typeof t?t.call(this):Hu(t)}var n=this.clone();return n._default=e,n},strict:function(e){void 0===e&&(e=!0);var t=this.clone();return t._options.strict=e,t},_isPresent:function(e){return null!=e},required:function(e){return void 0===e&&(e=ph),this.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})},notRequired:function(){var e=this.clone();return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e},nullable:function(e){void 0===e&&(e=!0);var t=this.clone();return t._nullable=e,t},transform:function(e){var t=this.clone();return t.transforms.push(e),t},test:function(){var e;if(void 0===(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=fh),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=Rd(e),r=e.exclusive||e.name&&!0===t._exclusive[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t._exclusive[e.name]=!!e.exclusive,t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t},when:function(e,t){1===arguments.length&&(t=e,e=".");var n=this.clone(),r=[].concat(e).map((function(e){return new Md(e)}));return r.forEach((function(e){e.isSibling&&n._deps.push(e.key)})),n._conditions.push(new Wh(r,t)),n},typeError:function(e){var t=this.clone();return t._typeError=Rd({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t},oneOf:function(e,t){void 0===t&&(t=mh);var n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Rd({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},notOneOf:function(e,t){void 0===t&&(t=gh);var n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Rd({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},strip:function(e){void 0===e&&(e=!0);var t=this.clone();return t._strip=e,t},_option:function(e,t){return Nu(t,e)?t[e]:this._options[e]},describe:function(){var e=this.clone(),t={type:e._type,meta:e._meta,label:e._label,tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))};return e._whitelist.size&&(t.oneOf=e._whitelist.describe()),e._blacklist.size&&(t.notOneOf=e._blacklist.describe()),t},defined:function(e){return void 0===e&&(e=bh),this.nullable().test({message:e,name:"defined",exclusive:!0,test:function(e){return void 0!==e}})}},jd=function(){var e=Ud[Pd];Dd[e+"At"]=function(t,n,r){void 0===r&&(r={});var i=function(e,t,n,r){var i,o,s;return void 0===r&&(r=n),t?((0,$d.forEach)(t,(function(a,l,c){var u=l?function(e){return e.substr(0,e.length-1).substr(1)}(a):a;if((e=e.resolve({context:r,parent:i,value:n})).innerType){var h=c?parseInt(u,10):0;if(n&&h>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: "+a+", in the path: "+t+". because there is no value at that index. ");i=n,n=n&&n[h],e=e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error("The schema does not contain the path: "+t+". (failed at: "+s+' which is a type: "'+e._type+'")');i=n,n=n&&n[u],e=e.fields[u]}o=u,s=l?"["+a+"]":"."+a})),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}(this,t,n,r.context),o=i.parent,s=i.parentPath;return i.schema[e](o&&o[s],(0,Lu.Z)({},r,{parent:o,path:t}))}},Pd=0,Ud=["validate","validateSync"];Pd<Ud.length;Pd++)jd();for(var Bd=0,Nd=["equals","is"];Bd<Nd.length;Bd++)Dd[Nd[Bd]]=Dd.oneOf;for(var Hd=0,Wd=["not","nope"];Hd<Wd.length;Hd++)Dd[Wd[Hd]]=Dd.notOneOf;function Vd(e,t,n){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),(0,Lu.Z)(e.prototype,n)}function zd(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Gd(e){return null==e}function qd(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}Dd.optional=Dd.notRequired,Vd((function e(){var t=this;if(!zd(this,e))return new e;Id.call(this,{type:"boolean"}),this.withMutation((function(){t.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(e))return!0;if(/^(false|0)$/i.test(e))return!1}return e}))}))}),Id,{_typeCheck:function(e){return zd(e,Boolean)&&(e=e.valueOf()),"boolean"==typeof e}});var Kd=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,Zd=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Yd=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Xd=function(e){return Gd(e)||e===e.trim()};function Qd(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}Vd((function e(){var t=this;if(!qd(this,e))return new e;Id.call(this,{type:"string"}),this.withMutation((function(){t.transform((function(e){return this.isType(e)?e:null!=e&&e.toString?e.toString():e}))}))}),Id,{_typeCheck:function(e){return qd(e,String)&&(e=e.valueOf()),"string"==typeof e},_isPresent:function(e){return Id.prototype._isPresent.call(this,e)&&e.length>0},length:function(e,t){return void 0===t&&(t=yh),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return Gd(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=wh),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Gd(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=_h),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return Gd(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var n,r,i=!1;return t&&("object"==typeof t?(i=t.excludeEmptyString,n=t.message,r=t.name):n=t),this.test({name:r||"matches",message:n||Ah,params:{regex:e},test:function(t){return Gd(t)||""===t&&i||-1!==t.search(e)}})},email:function(e){return void 0===e&&(e=xh),this.matches(Kd,{name:"email",message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=Ch),this.matches(Zd,{name:"url",message:e,excludeEmptyString:!0})},uuid:function(e){return void 0===e&&(e=Sh),this.matches(Yd,{name:"uuid",message:e,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=Eh),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:Xd})},lowercase:function(e){return void 0===e&&(e=kh),this.transform((function(e){return Gd(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return Gd(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=$h),this.transform((function(e){return Gd(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return Gd(e)||e===e.toUpperCase()}})}}),Vd((function e(){var t=this;if(!Qd(this,e))return new e;Id.call(this,{type:"number"}),this.withMutation((function(){t.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}),Id,{_typeCheck:function(e){return Qd(e,Number)&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=Mh),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Gd(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=Th),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return Gd(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=Rh),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return Gd(t)||t<this.resolve(e)}})},moreThan:function(e,t){return void 0===t&&(t=Lh),this.test({message:t,name:"min",exclusive:!0,params:{more:e},test:function(t){return Gd(t)||t>this.resolve(e)}})},positive:function(e){return void 0===e&&(e=Oh),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=Fh),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=Ih),this.test({name:"integer",message:e,test:function(e){return Gd(e)||Number.isInteger(e)}})},truncate:function(){return this.transform((function(e){return Gd(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return Gd(t)?t:Math[e](t)}))}});var Jd=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/,ef=new Date("");function tf(e,t){return t||(t=e.slice(0)),e.raw=t,e}Vd((function e(){var t,n=this;if(this,!(null!=(t=e)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](this):this instanceof t))return new e;Id.call(this,{type:"date"}),this.withMutation((function(){n.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=Jd.exec(e)){for(var o,s=0;o=r[s];++s)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?ef:new Date(e))}))}))}),Id,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=Dh);var n=e;if(!Md.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return Gd(e)||e>=this.resolve(n)}})},max:function(e,t){void 0===t&&(t=jh);var n=e;if(!Md.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return Gd(e)||e<=this.resolve(n)}})}});const nf=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var rf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,of=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var sf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var af=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var lf="a-z\\xdf-\\xf6\\xf8-\\xff",cf="A-Z\\xc0-\\xd6\\xd8-\\xde",uf="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hf="["+uf+"]",df="\\d+",ff="["+lf+"]",pf="[^\ud800-\udfff"+uf+df+"\\u2700-\\u27bf"+lf+cf+"]",mf="(?:\ud83c[\udde6-\uddff]){2}",gf="[\ud800-\udbff][\udc00-\udfff]",vf="["+cf+"]",bf="(?:"+ff+"|"+pf+")",yf="(?:"+vf+"|"+pf+")",wf="(?:['’](?:d|ll|m|re|s|t|ve))?",_f="(?:['’](?:D|LL|M|RE|S|T|VE))?",Af="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",xf="[\\ufe0e\\ufe0f]?",Cf=xf+Af+"(?:\\u200d(?:"+["[^\ud800-\udfff]",mf,gf].join("|")+")"+xf+Af+")*",Sf="(?:"+["[\\u2700-\\u27bf]",mf,gf].join("|")+")"+Cf,Ef=RegExp([vf+"?"+ff+"+"+wf+"(?="+[hf,vf,"$"].join("|")+")",yf+"+"+_f+"(?="+[hf,vf+bf,"$"].join("|")+")",vf+"?"+bf+"+"+wf,vf+"+"+_f,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",df,Sf].join("|"),"g");const kf=function(e,t,n){return e=en(e),void 0===(t=n?void 0:t)?function(e){return af.test(e)}(e)?function(e){return e.match(Ef)||[]}(e):function(e){return e.match(sf)||[]}(e):e.match(t)||[]};var $f=RegExp("['’]","g");const Mf=function(e){return function(t){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(kf(function(e){return(e=en(e))&&e.replace(rf,nf).replace(of,"")}(t).replace($f,"")),e,"")}};var Tf=Mf((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));const Rf=Tf,Lf=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)},Of=(Ff="toUpperCase",function(e){e=en(e);var t=Gu(e)?nh(e):void 0,n=t?t[0]:e.charAt(0),r=t?Lf(t,1).join(""):e.slice(1);return n[Ff]()+r});var Ff;var If=Mf((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return Of(en(e).toLowerCase())}(t):t)}));const Df=If;var jf=n(22709),Pf=n.n(jf);function Uf(e,t){var n=function(e,n){var o=(0,$d.split)(e)[0];~i.indexOf(o)||i.push(o),~t.indexOf(n+"-"+o)||r.push([n,o])};void 0===t&&(t=[]);var r=[],i=[];for(var o in e)if(Nu(e,o)){var s=e[o];~i.indexOf(o)||i.push(o),Md.isRef(s)&&s.isSibling?n(s.path,o):Nh(s)&&s._deps&&s._deps.forEach((function(e){return n(e,o)}))}return Pf().array(i,r).reverse()}function Bf(e,t){var n=1/0;return e.some((function(e,r){if(-1!==t.path.indexOf(e))return n=r,!0})),n}function Nf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=e.reduce((function(e,t){var r=n.shift();return e+(null==r?"":r)+t}));return i.replace(/^\./,"")}function Hf(){var e=tf(["",'["','"]']);return Hf=function(){return e},e}function Wf(){var e=tf(["",".",""]);return Wf=function(){return e},e}function Vf(){var e=tf(["",".",""]);return Vf=function(){return e},e}var zf=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function Gf(e){var t,n=this;if(this,!(null!=(t=Gf)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](this):this instanceof t))return new Gf(e);Id.call(this,{type:"object",default:function(){var e=this;if(this._nodes.length){var t={};return this._nodes.forEach((function(n){t[n]=e.fields[n].default?e.fields[n].default():void 0})),t}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){n.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&n.shape(e)}))}function qf(){var e=tf(["","[","]"]);return qf=function(){return e},e}function Kf(){var e=tf(["","[","]"]);return Kf=function(){return e},e}Vd(Gf,Id,{_typeCheck:function(e){return zf(e)||"function"==typeof e},_cast:function(e,t){var n=this;void 0===t&&(t={});var r=Id.prototype._cast.call(this,e,t);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var i=this.fields,o=!0===this._option("stripUnknown",t),s=this._nodes.concat(Object.keys(r).filter((function(e){return-1===n._nodes.indexOf(e)}))),a={},l=(0,Lu.Z)({},t,{parent:a,__validating:t.__validating||!1}),c=!1;return s.forEach((function(e){var n=i[e],s=Nu(r,e);if(n){var u,h=n._options&&n._options.strict;if(l.path=Nf(Vf(),t.path,e),l.value=r[e],!0===(n=n.resolve(l))._strip)return void(c=c||e in r);void 0!==(u=t.__validating&&h?r[e]:n.cast(r[e],l))&&(a[e]=u)}else s&&!o&&(a[e]=r[e]);a[e]!==r[e]&&(c=!0)})),c?a:r},_validate:function(e,t){var n,r,i=this;void 0===t&&(t={});var o=t.sync,s=[],a=null!=t.originalValue?t.originalValue:e,l=[{schema:this,value:a}].concat(t.from||[]);return n=this._option("abortEarly",t),r=this._option("recursive",t),t=(0,Lu.Z)({},t,{__validating:!0,originalValue:a,from:l}),Id.prototype._validate.call(this,e,t).catch(Yh(n,s)).then((function(e){if(!r||!zf(e)){if(s.length)throw s[0];return e}l=a?[].concat(l):[{schema:i,value:a||e}].concat(t.from||[]),a=a||e;var c,u,h=i._nodes.map((function(n){var r=-1===n.indexOf(".")?Nf(Wf(),t.path,n):Nf(Hf(),t.path,n),s=i.fields[n],c=(0,Lu.Z)({},t,{path:r,from:l,parent:e,originalValue:a[n]});return s&&s.validate?(c.strict=!0,s.validate(e[n],c)):function(e){return e?zh.SynchronousPromise:Promise}(o).resolve(!0)}));return Xh({sync:o,validations:h,value:e,errors:s,endEarly:n,path:t.path,sort:(c=i.fields,u=Object.keys(c),function(e,t){return Bf(u,e)-Bf(u,t)})})}))},concat:function(e){var t=Id.prototype.concat.call(this,e);return t._nodes=Uf(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var n=this.clone(),r=(0,Lu.Z)(n.fields,e);if(n.fields=r,t.length){Array.isArray(t[0])||(t=[t]);var i=t.map((function(e){return e[0]+"-"+e[1]}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=Uf(r,n._excludedEdges),n},from:function(e,t,n){var r=(0,$d.getter)(e,!0);return this.transform((function(i){if(null==i)return i;var o=i;return Nu(i,e)&&(o=(0,Lu.Z)({},i),n||delete o[e],o[t]=r(i)),o}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=Ph),"string"==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){if(null==t)return!0;var n=function(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n._options.stripUnknown=e,n},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Ph),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&function(e,t){var n={};return t=Ed(t),nd(e,(function(e,r,i){ce(n,t(e,r,i),e)})),n}(t,(function(t,n){return e(n)}))}))},camelCase:function(){return this.transformKeys(Df)},snakeCase:function(){return this.transformKeys(Rf)},constantCase:function(){return this.transformKeys((function(e){return Rf(e).toUpperCase()}))},describe:function(){var e=Id.prototype.describe.call(this);return e.fields=kd(this.fields,(function(e){return e.describe()})),e}}),Vd((function e(t){var n,r=this;if(this,!(null!=(n=e)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](this):this instanceof n))return new e(t);Id.call(this,{type:"array"}),this._subType=void 0,this.innerType=void 0,this.withMutation((function(){r.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),t&&r.of(t)}))}),Id,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var n=this,r=Id.prototype._cast.call(this,e,t);if(!this._typeCheck(r)||!this.innerType)return r;var i=!1,o=r.map((function(e,r){var o=n.innerType.cast(e,(0,Lu.Z)({},t,{path:Nf(Kf(),t.path,r)}));return o!==e&&(i=!0),o}));return i?o:r},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=[],i=t.sync,o=t.path,s=this.innerType,a=this._option("abortEarly",t),l=this._option("recursive",t),c=null!=t.originalValue?t.originalValue:e;return Id.prototype._validate.call(this,e,t).catch(Yh(a,r)).then((function(e){if(!l||!s||!n._typeCheck(e)){if(r.length)throw r[0];return e}c=c||e;for(var u=new Array(e.length),h=0;h<e.length;h++){var d=e[h],f=Nf(qf(),t.path,h),p=(0,Lu.Z)({},t,{path:f,strict:!0,parent:e,index:h,originalValue:c[h]});u[h]=!s.validate||s.validate(d,p)}return Xh({sync:i,path:o,value:e,errors:r,endEarly:a,validations:u})}))},_isPresent:function(e){return Id.prototype._isPresent.call(this,e)&&e.length>0},of:function(e){var t=this.clone();if(!1!==e&&!Nh(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+dh(e));return t._subType=e,t.innerType=e,t},min:function(e,t){return t=t||Uh,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Gd(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||Bh,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return Gd(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t,n){return e._typeCheck(t)?t:null==n?[]:[].concat(n)}))},compact:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=Id.prototype.describe.call(this);return this.innerType&&(e.innerType=this.innerType.describe()),e}});var Zf=function(){var e=function(e){this._resolve=function(t,n){var r=e(t,n);if(!Nh(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(n)}},t=e.prototype;return t.resolve=function(e){return this._resolve(e.value,e)},t.cast=function(e,t){return this._resolve(e,t).cast(e,t)},t.validate=function(e,t){return this._resolve(e,t).validate(e,t)},t.validateSync=function(e,t){return this._resolve(e,t).validateSync(e,t)},t.validateAt=function(e,t,n){return this._resolve(t,n).validateAt(e,t,n)},t.validateSyncAt=function(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)},e}();Zf.prototype.__isYupSchema__=!0;var Yf=n(88054),Xf=!("undefined"==typeof window||!window.document||!window.document.createElement),Qf=void 0;function Jf(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function ep(e){this.target=e,this.events={}}ep.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},ep.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},ep.prototype.add=function(e,t,n){var r=this,i=this.getEventHandlers(e,n);Jf(i),0===i.nextHandlers.length&&(i.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,i.handleEvent,n)),i.nextHandlers.push(t);var o=!0;return function(){if(o){o=!1,Jf(i);var s=i.nextHandlers.indexOf(t);i.nextHandlers.splice(s,1),0===i.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,i.handleEvent,n),i.handleEvent=void 0)}}};var tp="__consolidated_events_handlers__";function np(e,t,n,r){e[tp]||(e[tp]=new ep(e));var i=function(e){if(e)return void 0===Qf&&(Qf=function(){if(!Xf)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(e){}return e}()),Qf?e:!!e.capture}(r);return e[tp].add(t,n,i)}var rp=n(8218);function ip(e,t){var n,r=(n=e,!isNaN(parseFloat(n))&&isFinite(n)?parseFloat(n):"px"===n.slice(-2)?parseFloat(n.slice(0,-2)):void 0);if("number"==typeof r)return r;var i=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof i?i*t:void 0}var op,sp="above",ap="inside",lp="below",cp="invisible";function up(e){return"string"==typeof e.type}var hp=[];function dp(e){hp.push(e),op||(op=setTimeout((function(){var e;for(op=null;e=hp.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var n=hp.indexOf(e);-1!==n&&(hp.splice(n,1),!hp.length&&op&&(clearTimeout(op),op=null))}}}var fp="undefined"!=typeof window,pp=function(e){var t=function(t){var n;return(n=e.call(this,t)||this).refElement=function(e){n._ref=e},n};(0,Yf.Z)(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this;fp&&(this.cancelOnNextTick=dp((function(){e.cancelOnNextTick=null;var t=e.props,n=t.children;t.debug,function(e,t){if(e&&!up(e)&&!t)throw new Error("<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=np(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=np(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},r.componentDidUpdate=function(){var e=this;fp&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=dp((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},r.componentWillUnmount=function(){fp&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},r._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,r=e.scrollableAncestor;if(r)return function(e){return"window"===e?n.g.window:e}(r);for(var i=this._ref;i.parentNode;){if((i=i.parentNode)===document.body)return window;var o=window.getComputedStyle(i),s=(t?o.getPropertyValue("overflow-x"):o.getPropertyValue("overflow-y"))||o.getPropertyValue("overflow");if("auto"===s||"scroll"===s||"overlay"===s)return i}return window},r._handleScroll=function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?cp:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?ap:e.viewportBottom<e.waypointTop?lp:e.waypointTop<e.viewportTop?sp:cp}(t),r=this._previousPosition,i=this.props,o=(i.debug,i.onPositionChange),s=i.onEnter,a=i.onLeave,l=i.fireOnRapidScroll;if(this._previousPosition=n,r!==n){var c={currentPosition:n,previousPosition:r,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom};o.call(this,c),n===ap?s.call(this,c):r===ap&&a.call(this,c),l&&(r===lp&&n===sp||r===sp&&n===lp)&&(s.call(this,{currentPosition:ap,previousPosition:r,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}),a.call(this,{currentPosition:n,previousPosition:ap,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}))}}},r._getBounds=function(){var e,t,n=this.props,r=n.horizontal,i=(n.debug,this._ref.getBoundingClientRect()),o=i.left,s=i.top,a=i.right,l=i.bottom,c=r?o:s,u=r?a:l;this.scrollableAncestor===window?(e=r?window.innerWidth:window.innerHeight,t=0):(e=r?this.scrollableAncestor.offsetWidth:this.scrollableAncestor.offsetHeight,t=r?this.scrollableAncestor.getBoundingClientRect().left:this.scrollableAncestor.getBoundingClientRect().top);var h=this.props,d=h.bottomOffset;return{waypointTop:c,waypointBottom:u,viewportTop:t+ip(h.topOffset,e),viewportBottom:t+e-ip(d,e)}},r.render=function(){var e=this,t=this.props.children;return t?up(t)||(0,rp.isForwardRef)(t)?c().cloneElement(t,{ref:function(n){e.refElement(n),t.ref&&("function"==typeof t.ref?t.ref(n):t.ref.current=n)}}):c().cloneElement(t,{innerRef:this.refElement}):c().createElement("span",{ref:this.refElement,style:{fontSize:0}})},t}(c().PureComponent);pp.above=sp,pp.below=lp,pp.inside=ap,pp.invisible=cp,pp.defaultProps={debug:!1,scrollableAncestor:void 0,children:void 0,topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){},onLeave:function(){},onPositionChange:function(){},fireOnRapidScroll:!0},pp.displayName="Waypoint";var mp=n(3210),gp={};gp.styleTagTransform=qn(),gp.setAttributes=Wn(),gp.insert=Nn().bind(null,"head"),gp.domAPI=Un(),gp.insertStyleElement=zn(),jn()(mp.Z,gp);const vp=mp.Z&&mp.Z.locals?mp.Z.locals:void 0,bp=function(e){var t=e.page,n=e.onFieldChange,r=e.setSelectedPage,i=e.isFormExpanded,o=(0,l.useMemo)((function(){return t.label.replace(/\s/g,"")}),[t.label]),s=t.sections.filter((function(e){var t=e.questions.some((function(e){return!(0,In.o)(e.isHidden)}));return!(0,In.o)(e.isHidden)&&t}));return c().createElement(pp,{onEnter:function(){return r(o)},topOffset:"50%",bottomOffset:"60%"},c().createElement("div",{id:o,className:vp.pageContent},c().createElement("div",{className:vp.pageHeader},c().createElement("p",{className:vp.pageTitle},t.label)),c().createElement(h.UQy,null,s.map((function(e){return c().createElement(h.Qdk,{title:e.label,open:void 0!==i?i:(0,In.o)(e.isExpanded),className:vp.sectionContent,key:"section-".concat(e.id)},c().createElement("div",{className:vp.formSection},c().createElement(lr,{fields:e.questions.filter((function(e){return!(0,In.o)(e.isHidden)})),onFieldChange:n})))})))))};function yp(e){var t=e.effect;return(0,l.useEffect)((function(){return null==t?void 0:t()}),[t]),null}function wp(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.getElementById(e);null==n||n.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t&&(null==n||n.focus())}var _p=n(80291);function Ap(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xp(e,t,n[t])}))}return e}function Sp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ap(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ap(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ep=n(2062);function kp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$p(e,t,n[t])}))}return e}function Tp(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Rp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||Op(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lp(e){return function(e){if(Array.isArray(e))return kp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Op(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Op(e,t){if(e){if("string"==typeof e)return kp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kp(e,t):void 0}}var Fp=function(e){var t,n,r,i,o,s=e.formJson,a=e.patient,h=e.formSessionDate,d=e.provider,f=e.location,p=e.visit,m=e.values,g=e.isFormExpanded,v=e.sessionMode,b=e.scrollablePages,y=e.workspaceLayout,w=e.setScrollablePages,_=e.setPagesWithErrors,A=e.setIsLoadingFormDependencies,x=e.setFieldValue,C=e.setSelectedPage,S=e.handlers,E=e.allInitialValues,k=e.setAllInitialValues,$=e.isSubmitting,M=Rp((0,l.useState)([]),2),T=M[0],R=M[1],L=Rp((0,l.useState)(null),2),O=L[0],F=L[1],I=Rp((0,l.useState)(h),2),D=I[0],j=I[1],P=function(e){var t,n=e.encounter,r=(t=e.encounter)&&"object"==typeof t?t:null,i=n&&!r?"/ws/rest/v1/encounter/".concat(n,"?v=").concat(vr.Ib):null,o=(0,_p.ZP)(i,ai.openmrsFetch),s=o.data,a=o.error;return{encounter:r||(null==s?void 0:s.data),error:a,isLoading:!!i&&!s}}(s),U=P.encounter,B=P.isLoading,N=Rp((0,l.useState)(null),2),H=N[0],W=N[1],V=Rp((0,l.useState)(!0),2),z=V[0],G=V[1],q=Rp((0,l.useState)(s),2),K=q[0],Z=q[1],Y=Rp((0,l.useState)([]),2),X=Y[0],Q=Y[1],J=Rp((0,l.useState)(!1),2),ee=J[0],te=J[1],ne=Rp((0,l.useState)([]),2),re=ne[0],ie=ne[1],oe=(0,ai.useLayoutType)(),se=(0,l.useMemo)((function(){return{patient:a,encounter:U,previousEncounter:H,location:f,sessionMode:v||((null==K?void 0:K.encounter)?"edit":"enter"),encounterDate:h,form:K,visit:p,setEncounterDate:j}}),[U,null==K?void 0:K.encounter,f,a,H,v]),ae=(t=(0,Ep.Z)("/ws/rest/v1/encounterrole?v=custom:(uuid,display,name)",ai.openmrsFetch),n=t.data,r=t.error,i=t.isLoading,o=null==n?void 0:n.data.results.find((function(e){return"Clinician"===e.name})),o?{encounterRole:o,error:r,isLoading:i}:{encounterRole:null==n?void 0:n.data.results[0],error:r,isLoading:i}).encounterRole,le=Rp((0,l.useMemo)((function(){var e,t=[],n=new Set;return null===(e=K.pages)||void 0===e||e.forEach((function(e){var n;return null===(n=e.sections)||void 0===n?void 0:n.forEach((function(n){var r;null===(r=n.questions)||void 0===r||r.forEach((function(r){var i,o,s,a,l,c;n.inlineRendering=(0,Fn.xb)(n.inlineRendering)?null:n.inlineRendering,e.inlineRendering=(0,Fn.xb)(e.inlineRendering)?null:e.inlineRendering,K.inlineRendering=(0,Fn.xb)(K.inlineRendering)?null:K.inlineRendering,r.inlineRendering=null!==(o=null!==(i=n.inlineRendering)&&void 0!==i?i:e.inlineRendering)&&void 0!==o?o:K.inlineRendering,s=r,a=n.readonly,l=e.readonly,c=K.readonly,(0,Fn.xb)(s.readonly)&&(s.readonly=!(0,Fn.xb)(a)||!(0,Fn.xb)(l)||c),"fixed-value"!=r.questionOptions.rendering||r.fixedValue||(r.fixedValue=r.value),t.push(r),"obsGroup"==r.type&&r.questions.forEach((function(e){e.groupId=r.id,t.push(e)}))}))}))})),t.forEach((function(e){var t,r;(null===(t=e.questionOptions)||void 0===t?void 0:t.concept)&&n.add(e.questionOptions.concept),(null===(r=e.questionOptions)||void 0===r?void 0:r.answers)&&e.questionOptions.answers.forEach((function(e){e.concept&&n.add(e.concept)}))})),[t,n]}),[]),2),ce=le[0],ue=le[1],he=function(e,t,n){var r=Sp((0,l.useState)({}),2),i=r[0],o=r[1],s=Sp((0,l.useState)(!1),2),a=s[0],c=s[1],u=Sp((0,l.useState)({}),2),h=u[0],d=u[1];return(0,l.useEffect)((function(){var t=Object.keys(i);Promise.all(t.map((function(e){return i[e]}))).then((function(r){t.forEach((function(t,i){var o=(0,Fn.xb)(r[i])?"":r[i];h[t]=o;var s=e.find((function(e){return e.id===t}));try{pu(s.type).handleFieldSubmission(s,o,n)}catch(e){console.error(e)}})),d(Cp({},h))}))}),[i]),(0,l.useEffect)((function(){if(t)e.forEach((function(r){var i=pu(r.type),o=null==i?void 0:i.getInitialValue(t,r,e);(0,Fn.xb)(o)&&!(0,Fn.xb)(r.questionOptions.defaultValue)&&(o=_r(r,n,i)),h[r.id]=null==o?"":o,r.unspecified&&(h["".concat(r.id,"-unspecified")]=!o)})),c(!0);else{var r={checkbox:[],toggle:!1,default:""};e.forEach((function(t){var o=null;t.questionOptions.calculate&&!i[t.id]&&(i[t.id]=(0,lo.oC)(t.questionOptions.calculate.calculateExpression,{value:t,type:"field"},e,h,{mode:n.sessionMode,patient:n.patient})),(0,Fn.xb)(t.questionOptions.defaultValue)||(o=_r(t,n,pu(t.type))),(0,Fn.xb)(o)?h[t.id]=null!=r[t.questionOptions.rendering]?r[t.questionOptions.rendering]:r.default:h[t.id]=o,t.unspecified&&(h["".concat(t.id,"-unspecified")]=!1)})),o(Cp({},i))}d(Cp({},h))}),[t]),{initialValues:h,isFieldEncounterBindingComplete:a}}(ce,U,se),de=he.initialValues,fe=he.isFieldEncounterBindingComplete,pe=function(e){var t=(0,Ep.Z)("/ws/rest/v1/concept?references=".concat(Array.from(e).join(","),"&v=").concat("custom:(uuid,display,conceptMappings:(conceptReferenceTerm:(conceptSource:(name),code)))"),ai.openmrsFetch),n=t.data,r=t.error,i=t.isLoading;return{concepts:null==n?void 0:n.data.results,error:r,isLoading:i}}(ue).concepts,me=(0,l.useCallback)((function(){return s.pages.forEach((function(e){e.isSubform||b.add(e)})),function(){s.pages.forEach((function(e){e.isSubform||b.delete(e)}))}}),[b,s]);(0,l.useEffect)((function(){!O&&f&&F(f),U&&!O&&F(U.location)}),[f,U]),(0,l.useEffect)((function(){var e;de&&Object.keys(de).length&&(R(ce.map((function(e){var t,n,r,i;e.hide?ge({value:e,type:"field"},ce,de):e.isHidden=!1,null===(t=e.questionOptions.answers)||void 0===t||t.filter((function(e){var t;return!(0,Fn.xb)(null===(t=e.hide)||void 0===t?void 0:t.hideWhenExpression)})).forEach((function(t){t.isHidden=(0,lo.j3)(t.hide.hideWhenExpression,{value:e,type:"field"},ce,de,{mode:v,patient:a})})),"string"==typeof e.readonly&&(null===(r=null===(n=e.readonly)||void 0===n?void 0:n.split(" "))||void 0===r?void 0:r.length)>1&&(e.readonlyExpression=e.readonly,e.readonly=(0,lo.j3)(e.readonly,{value:e,type:"field"},ce,de,{mode:v,patient:a}));var o=null===(i=e.questionOptions.repeatOptions)||void 0===i?void 0:i.limitExpression;"repeating"!==e.questionOptions.rendering||(0,Fn.xb)(o)||(e.questionOptions.repeatOptions.limit=(0,lo.j3)(o,{value:e,type:"field"},ce,de,{mode:v,patient:a}));var s=Er(e.questionOptions.concept,pe);return e.questionOptions.concept=s?s.uuid:e.questionOptions.concept,e.label=e.label?e.label:null==s?void 0:s.display,e.questionOptions.answers&&(e.questionOptions.answers=e.questionOptions.answers.map((function(e){var t=Er(e.concept,pe);return Tp(Mp({},e),{concept:t?t.uuid:e.concept,label:e.label?e.label:null==t?void 0:t.display})}))),e}))),null==K||null===(e=K.pages)||void 0===e||e.forEach((function(e){var t;e.hide?ge({value:e,type:"page"},ce,de):e.isHidden=!1,null==e||null===(t=e.sections)||void 0===t||t.forEach((function(e){e.hide?ge({value:e,type:"section"},ce,de):e.isHidden=!1}))})),Z(K),k(Mp({},E,de)),("enter"==v||fe)&&te(!0))}),[de,pe]),(0,l.useEffect)((function(){var e;"enter"!=v||(0,In.o)(null===(e=s.formOptions)||void 0===e?void 0:e.usePreviousValueDisabled)?G(!1):(0,gr.getPreviousEncounter)(null==a?void 0:a.id,null==s?void 0:s.encounterType).then((function(e){W(e),G(!1)}))}),[v]),(0,l.useEffect)((function(){B||z||A(!1)}),[B,z]);var ge=function(e,t,n){var r,i,o,s,l=e.value,c=e.type,u=(0,lo.j3)(null===(r=l.hide)||void 0===r?void 0:r.hideWhenExpression,e,t,n,{mode:v,patient:a});e.value.isHidden=u,"field"==c&&(null===(i=e.value)||void 0===i||null===(o=i.questions)||void 0===o?void 0:o.length)&&(null===(s=e.value)||void 0===s||s.questions.forEach((function(e){e.isHidden=u}))),"page"==c&&l.sections.forEach((function(e){e.isParentHidden=u,wr(u,e,t,X,x)})),"section"==c&&wr(u,l,t,X,x)},ve=(0,l.useCallback)((function(e,t){Array.isArray(t)?t.forEach((function(t){(0,Fn.xb)(t.groupMembers)?delete t.groupMembers:t.groupMembers.forEach((function(e){(0,Fn.xb)(e.groupMembers)&&delete e.groupMembers})),e.push(t)})):((0,Fn.xb)(t.groupMembers)?delete t.groupMembers:t.groupMembers.forEach((function(e){(0,Fn.xb)(e.groupMembers)&&delete e.groupMembers})),e.push(t))}),[]);(0,l.useEffect)((function(){if(null==re?void 0:re.length)switch(_((t=re,n=[],e=b,r=function(e){if(Array.isArray(e))return br(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),(null==t?void 0:t.length)&&t.forEach((function(e){r.forEach((function(t){t.sections.find((function(t){return t.questions.find((function(t){return t===e}))}))&&!n.includes(t.label)&&n.push(t.label)}))})),n)),re[0].questionOptions.rendering){case"date":wp(re[0].id,!1);break;case"radio":wp("".concat(re[0].id,"-").concat(re[0].questionOptions.answers[0].label),!0);break;case"checkbox":wp("".concat(re[0].label,"-input"),!0);break;default:wp(re[0].id,!0)}else _([]);var e,t,n,r}),[re]);var be=(0,l.useCallback)((function(e){var t=[],n=!1;return T.filter((function(e){return!(e.isParentHidden||e.disabled||e.isHidden||(0,In.o)(e.readonly))})).filter((function(e){var t;return 1!=(null===(t=e.submission)||void 0===t?void 0:t.unspecified)})).forEach((function(r){var i,o=null!==(i=Fn.Ls.validate(r,e[r.id]).filter((function(e){return"error"==e.resultType})))&&void 0!==i?i:[];if(o.length)return t.push(r),r.submission=Tp(Mp({},r.submission),{errors:o}),void(n=!0)})),ie(Lp(t)),!n}),[T]),ye=function(e,t,n,r){var i,o=T.find((function(t){return t.id==e})),s=Array.isArray(o.validators)?[{type:"OHRIBaseValidator"}].concat(Lp(o.validators)):[{type:"OHRIBaseValidator"}],l={expressionContext:{mode:v},values:Tp(Mp({},m),$p({},e,t)),fields:T},c=[],u=[],h=!0,d=!1,f=void 0;try{for(var p,g=s[Symbol.iterator]();!(h=(p=g.next()).done);h=!0){var b,y,w,_=p.value,A=(null===(w=gu(_.type))||void 0===w?void 0:w.validate(o,t,Mp({},l,_)))||[];(b=c).push.apply(b,Lp(A.filter((function(e){return"error"==e.resultType})))),(y=u).push.apply(y,Lp(A.filter((function(e){return"warning"==e.resultType}))))}}catch(e){d=!0,f=e}finally{try{h||null==g.return||g.return()}finally{if(d)throw f}}null==n||n(c),null==r||r(u),ie(c.length?function(e){return Lp(e).concat([o])}:function(e){return e.filter((function(e){return e!==o}))}),"toggle"==o.questionOptions.rendering&&(t=t?vr.ks:vr.Mf),o.fieldDependants&&o.fieldDependants.forEach((function(n){var r,i,o,s,l,c=T.find((function(e){return e.id==n}));!c.isHidden&&(null===(r=c.questionOptions.calculate)||void 0===r?void 0:r.calculateExpression)&&(0,lo.oC)(c.questionOptions.calculate.calculateExpression,{value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t)),{mode:v,patient:a}).then((function(e){e=(0,Fn.xb)(e)?"":e,m[c.id]=e,x(c.id,e),pu(c.type).handleFieldSubmission(c,e,se)})),c.hide&&(ge({value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t))),Cr(c,X,x)),null===(i=null==c?void 0:c.questionOptions.answers)||void 0===i||i.filter((function(e){var t;return!(0,Fn.xb)(null===(t=e.hide)||void 0===t?void 0:t.hideWhenExpression)})).forEach((function(n){var r;n.isHidden=(0,lo.j3)(null===(r=n.hide)||void 0===r?void 0:r.hideWhenExpression,{value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t)),{mode:v,patient:a})})),!c.isHidden&&c.readonlyExpression&&(c.readonly=(0,lo.j3)(c.readonlyExpression,{value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t)),{mode:v,patient:a})),"repeating"!==c.questionOptions.rendering||(0,Fn.xb)(null===(o=c.questionOptions.repeatOptions)||void 0===o?void 0:o.limitExpression)||(c.questionOptions.repeatOptions.limit=(0,lo.j3)(null===(s=c.questionOptions.repeatOptions)||void 0===s?void 0:s.limitExpression,{value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t)),{mode:v,patient:a}),(0,lo.j3)(null===(l=c.questionOptions.repeatOptions)||void 0===l?void 0:l.limitExpression,{value:c,type:"field"},T,Tp(Mp({},m),$p({},e,t)),{mode:v,patient:a}));var u=Lp(T),h=u.findIndex((function(e){return e.id==n}));u[h]=c,R(u)})),o.sectionDependants&&o.sectionDependants.forEach((function(n){for(var r=0;r<K.pages.length;r++){var i=K.pages[r].sections.find((function(e,t){return e.label==n}));if(i){ge({value:i,type:"section"},T,Tp(Mp({},m),$p({},e,t))),(0,In.o)(i.isHidden)&&i.questions.forEach((function(e){e.isParentHidden=!0,Cr(e,X,x)}));break}}})),o.pageDependants&&(null===(i=o.pageDependants)||void 0===i||i.forEach((function(n){var r=K.pages.find((function(e){return e.label==n}));ge({value:r,type:"page"},T,Tp(Mp({},m),$p({},e,t))),(0,In.o)(r.isHidden)&&r.sections.forEach((function(e){e.questions.forEach((function(e){e.isParentHidden=!0,Cr(e,X,x)}))}));var i=K,o=i.pages.findIndex((function(e){return e.label==n}));i[o]=r,Z(i)})))};return"view"!==v&&S.set(K.name,{validate:be,submit:function(e){var t,n,r=[];T.filter((function(e){return e.value||"obsGroup"==e.type})).filter((function(e){return!(e.isParentHidden||e.isHidden||"obs"!=e.type&&"obsGroup"!=e.type)})).filter((function(e){return!e.groupId})).forEach((function(e){if("obsGroup"==e.type){var t,n={person:null==a?void 0:a.id,obsDatetime:D,concept:e.questionOptions.concept,location:O,order:null,groupMembers:[],uuid:null==e||null===(t=e.value)||void 0===t?void 0:t.uuid,voided:!1},i=!1;e.questions.forEach((function(e){var t;e.value&&(i=!0,Array.isArray(e.value)?(t=n.groupMembers).push.apply(t,Lp(e.value)):n.groupMembers.push(e.value))})),i&&ve(r,n)}else ve(r,e.value)})),X.forEach((function(e){return ve(r,e)}));var i,o,l={};U?(Object.assign(l,U),l.location=O.uuid,-1===l.encounterProviders.findIndex((function(e){return e.provider.uuid==d}))&&(l.encounterProviders=Lp(l.encounterProviders).concat([{provider:d,encounterRole:null==ae?void 0:ae.uuid}]),l.form={uuid:null==se||null===(i=se.form)||void 0===i?void 0:i.uuid},l.visit={uuid:null==p?void 0:p.uuid}),l.obs=r):l={patient:a.id,encounterDatetime:D,location:O.uuid,encounterType:s.encounterType,encounterProviders:[{provider:d,encounterRole:null==ae?void 0:ae.uuid}],obs:r,form:{uuid:null==se||null===(o=se.form)||void 0===o?void 0:o.uuid},visit:null==p?void 0:p.uuid};if((null===(t=l.obs)||void 0===t?void 0:t.length)||(null===(n=l.orders)||void 0===n?void 0:n.length)){var c=new AbortController;return(0,gr.saveEncounter)(c,l,null==U?void 0:U.uuid)}}}),c().createElement(u.Provider,{value:{values:m,setFieldValue:x,setEncounterLocation:F,setObsGroupsToVoid:Q,obsGroupsToVoid:X,fields:T,encounterContext:se,layoutType:oe,workspaceLayout:y,isFieldInitializationComplete:ee,isSubmitting:$}},c().createElement(yp,{effect:me}),K.pages.map((function(e,t){var n,r,i,o=e.sections.every((function(e){return e.isHidden}))||e.sections.every((function(e){return e.questions.every((function(e){return e.isHidden}))}))||(0,In.o)(e.isHidden);return!e.isSubform&&o?null:(0,In.o)(e.isSubform)&&(null===(n=e.subform)||void 0===n?void 0:n.form)?"enter"==v||(null===(r=e.subform)||void 0===r?void 0:r.form.encounter)?c().createElement(Fp,{key:t,formJson:null===(i=e.subform)||void 0===i?void 0:i.form,patient:a,formSessionDate:D,provider:d,location:f,visit:p,values:m,isFormExpanded:g,sessionMode:v,scrollablePages:b,setAllInitialValues:k,allInitialValues:E,setScrollablePages:w,setPagesWithErrors:_,setFieldValue:x,setSelectedPage:C,handlers:S,workspaceLayout:y,setIsLoadingFormDependencies:A,isSubmitting:!0}):null:c().createElement(bp,{page:e,onFieldChange:ye,setSelectedPage:C,isFormExpanded:g,key:t})})))},Ip=n(59428),Dp={};Dp.styleTagTransform=qn(),Dp.setAttributes=Wn(),Dp.insert=Nn().bind(null,"head"),Dp.domAPI=Un(),Dp.insertStyleElement=zn(),jn()(Ip.Z,Dp);const jp=Ip.Z&&Ip.Z.locals?Ip.Z.locals:void 0;var Pp=function(e){var t=e.patient,n=e.hideActionsOverflow;return c().createElement("div",{className:jp.patientBannerContainer},c().createElement(ai.ExtensionSlot,{extensionSlotName:"patient-header-slot",state:{patient:t,patientUuid:t.id,hideActionsOverflow:n}}))};function Up(e,t){e&&(console.error(e),(0,ai.showToast)({description:e.message,title:t("errorDescriptionTitle","Error"),kind:"error",critical:!0,millis:7e3}))}function Bp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Np(e){var t,n,r=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Bp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bp(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1];return(0,l.useEffect)((function(){var t=[];e&&e.map((function(e){var n;null===(n=function(e){var t,n=null===(t=mu().postSubmissionActions.find((function(t){return t.id==e})))||void 0===t?void 0:t.load;return n?n():(console.error("No loader found for PostSubmissionAction registration of id: ".concat(e)),null)}(e))||void 0===n||n.then((function(e){return t.push(e.default)}))})),o(t)}),[e]),i}function Hp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wp={female:"F",male:"M",other:"O",unknown:"U"},Vp=n(53540),zp={};zp.styleTagTransform=qn(),zp.setAttributes=Wn(),zp.insert=Nn().bind(null,"head"),zp.domAPI=Un(),zp.insertStyleElement=zn(),jn()(Vp.Z,zp);const Gp=Vp.Z&&Vp.Z.locals?Vp.Z.locals:void 0,qp=function(){return c().createElement("div",{className:Gp.linearActivity},c().createElement("div",{className:Gp.indeterminate}))};var Kp=n(19714),Zp={};Zp.styleTagTransform=qn(),Zp.setAttributes=Wn(),Zp.insert=Nn().bind(null,"head"),Zp.domAPI=Un(),Zp.insertStyleElement=zn(),jn()(Kp.Z,Zp);const Yp=Kp.Z&&Kp.Z.locals?Kp.Z.locals:void 0,Xp=function(){return c().createElement("div",{className:Yp.centerLoadingSVG},c().createElement(h.gbz,{description:"Active loading indicator",withOverlay:!1,small:!0}))};var Qp=n(39855),Jp={};Jp.styleTagTransform=qn(),Jp.setAttributes=Wn(),Jp.insert=Nn().bind(null,"head"),Jp.domAPI=Un(),Jp.insertStyleElement=zn(),jn()(Qp.Z,Jp);const em=Qp.Z&&Qp.Z.locals?Qp.Z.locals:void 0;function tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nm(e){return function(e){if(Array.isArray(e))return tm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rm(e,t){if(e){if("string"==typeof e)return tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tm(e,t):void 0}}const im=function(e){var t,n,r=e.isFormSubmitting,i=e.pagesWithErrors,o=e.scrollablePages,s=e.selectedPage,a=e.mode,u=e.onCancel,d=e.handleClose,f=e.values,p=e.setValues,m=e.allowUnspecifiedAll,g=e.defaultPage,v=(t=(0,l.useState)(s),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||rm(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=(v[0],v[1]);(0,l.useEffect)((function(){g&&nm(o).find((function(e){var t=e.label,n=e.isHidden;return t===g&&!n}))&&wp(y(g))}),[g,o]);var y=function(e){return e.replace(/\s/g,"")},w=(0,l.useMemo)((function(){return Object.keys(f).filter((function(e){return e.endsWith("-unspecified")})).map((function(e){return e.split("-unspecified")[0]})).filter((function(e){return(0,Fn.xb)(f[e])})).map((function(e){return"".concat(e,"-unspecified")}))}),[f]),_=(0,l.useCallback)((function(e){e?w.forEach((function(e){f[e]=!0})):w.forEach((function(e){f[e]=!1})),p(f)}),[w]);return c().createElement("div",{className:em.sidebar},nm(o).map((function(e,t){return!e.isHidden&&c().createElement("div",{"aria-hidden":"true",className:y(e.label)===s&&i.includes(e.label)?em.sidebarSectionErrorActive:y(e.label)===s?em.sidebarSectionActive:i.includes(e.label)?em.sidebarSectionError:em.sidebarSection,key:t,onClick:function(){return n=(t=e.label).replace(/\s/g,""),b(t),void wp(n);var t,n}},c().createElement("div",{className:em.sidebarSectionLink},e.label))})),"view"!==a&&c().createElement("hr",{className:em.sideBarHorizontalLine}),c().createElement("div",{className:em.sidenavActions},m&&"view"!==a&&c().createElement("div",{style:{marginBottom:".6rem"}},c().createElement(h.ZDl,{labelText:"",id:"auto-unspecifier",labelA:"Unspecify All",labelB:"Revert",onToggle:_})),"view"!=a&&c().createElement(h.zxk,{style:{marginBottom:"0.625rem",width:"11rem"},type:"submit",disabled:r},"Save"),c().createElement(h.zxk,{style:{width:"11rem",marginTop:"view"==a?"1.5rem":"0"},kind:"tertiary",onClick:function(){u&&u(),d&&d()}},"view"==a?"Close":"Cancel")))},om=function(e){var t=e.onClose,n=e.onShowWarningModal,r=e.t;return c().createElement(h.lpG,{preventCloseOnClickOutside:!0,open:!0,onClose:function(){return n(!1)}},c().createElement(h.xBx,{title:r("discardChanges","Discard changes?")}),c().createElement(h.fef,null,c().createElement("p",null,r("discardWarningText","The changes you made to this form have not been saved. Are you sure you want to discard them?"))),c().createElement(h.mzw,null,c().createElement(h.zxk,{kind:"secondary",onClick:function(){return n(!1)}},r("cancel","Cancel")),c().createElement(h.zxk,{kind:"danger",onClick:t},r("confirm","Confirm"))))};var sm=n(83937),am={};am.styleTagTransform=qn(),am.setAttributes=Wn(),am.insert=Nn().bind(null,"head"),am.domAPI=Un(),am.insertStyleElement=zn(),jn()(sm.Z,am);const lm=sm.Z&&sm.Z.locals?sm.Z.locals:void 0;function cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function um(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function hm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||dm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dm(e,t){if(e){if("string"==typeof e)return cm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cm(e,t):void 0}}const fm=function(e){var t,r=e.formJson,i=e.formUUID,o=e.patientUUID,s=e.encounterUUID,a=e.visit,u=e.mode,d=e.onSubmit,f=e.onCancel,p=e.handleClose,m=e.formSessionIntent,g=e.meta,v=e.encounterUuid,b=(0,ai.useSession)(),y=(null==b||null===(t=b.currentProvider)||void 0===t?void 0:t.uuid)?b.currentProvider.uuid:null,w=!b||s||v?null:null==b?void 0:b.sessionLocation,_=function(e){var t,n,r,i,o=(0,ai.usePatient)(e),s=o.patient,a=o.isLoading,l=o.error;return s&&!a&&(s.age=(n=new Date(null==s?void 0:s.birthDate),i=(r=new Date).getFullYear()-n.getFullYear(),r.getMonth()<n.getMonth()||r.getMonth()===n.getMonth()&&r.getDate()<n.getDate()?i-1:i),s.sex=null!==(t=Wp[s.gender])&&void 0!==t?t:"U"),{patient:s,isLoadingPatient:a,patientError:l}}(o),A=_.patient,x=_.isLoadingPatient,C=_.patientError,S=Cu(i,r,s||v,m),E=S.formJson,k=S.isLoading,$=S.formError,M=(0,qr.useTranslation)().t,T=(0,l.useMemo)((function(){return new Date}),[]),R=new Map,L=(0,l.useRef)(null),O=function(e){var t,n,r=(t=(0,l.useState)("minimized"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Hp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hp(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1];return(0,l.useLayoutEffect)((function(){var t,n=function(){var t,n,r=null===(t=e.current)||void 0===t||null===(n=t.parentElement)||void 0===n?void 0:n.offsetWidth;r&&o(r>1023?"maximized":"minimized")};n();var r=new ResizeObserver((function(e){n()}));return r.observe(null===(t=e.current)||void 0===t?void 0:t.parentElement),function(){r.disconnect()}}),[e]),i}(L),F=hm((0,l.useState)({}),2),I=F[0],D=F[1],j=hm((0,l.useState)(new Set),2),P=j[0],U=j[1],B=hm((0,l.useState)(""),2),N=B[0],H=B[1],W=hm((0,l.useState)(void 0),2),V=W[0],z=W[1],G=hm((0,l.useState)(!0),2),q=G[0],K=G[1],Z=hm((0,l.useState)(!1),2),Y=Z[0],X=Z[1],Q=hm((0,l.useState)([]),2),J=Q[0],ee=Q[1],te=hm((0,l.useState)(!1),2),ne=te[0],re=te[1],ie=hm((0,l.useState)(!1),2),oe=ie[0],se=ie[1],ae=Np(null==E?void 0:E.postSubmissionActions),le=u||(s||v?"edit":"enter"),ce=(0,l.useMemo)((function(){return"minimized"!==O&&P.size>0}),[O,P.size]);(0,l.useEffect)((function(){var e={name:"ohri-form-header-toggle-ext",moduleName:(null==g?void 0:g.moduleName)||"@openmrs/esm-ohri-app",slot:vr.rX,load:(0,ai.getAsyncLifecycle)((function(){return n.e(537).then(n.bind(n,57537))}),{featureName:"ohri-form-header-toggle",moduleName:(null==g?void 0:g.moduleName)||"@openmrs/esm-ohri-app"}),meta:{handleCollapse:function(e){z(e)}}};return(0,ai.registerExtension)(e),(0,ai.attach)(vr.rX,e.name),function(){(0,ai.detach)(vr.rX,e.name)}}),[null==g?void 0:g.moduleName]),(0,l.useEffect)((function(){return function(){yo=[]}}),[]),(0,l.useEffect)((function(){Up($,M)}),[$,M]),(0,l.useEffect)((function(){Up(C,M)}),[C,M]);var ue=function(e){var t,n,r,i=!0;if(R.forEach((function(t){var n;(null==t||null===(n=t.validate)||void 0===n?void 0:n.call(t,e))||(i=!1)})),i){X(!0);var o=(r=R,function(e){if(Array.isArray(e))return cm(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||dm(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var n,r=hm(t,2),i=(r[0],r[1]);return null==i||null===(n=i.submit)||void 0===n?void 0:n.call(i,e)}));Promise.all(o).then((t=function(e){return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(t){switch(t.label){case 0:return"edit"===u?(0,ai.showToast)({description:M("updatedRecordDescription","The patient encounter was updated"),title:M("updatedRecord","Record updated"),kind:"success",critical:!0}):(0,ai.showToast)({description:M("createdRecordDescription","A new encounter was created"),title:M("createdRecord","Record created"),kind:"success",critical:!0}),ae?[4,Promise.all(ae.map((function(t){t.applyAction({patient:A,sessionMode:le,encounters:e.map((function(e){return e.data}))})})))]:[3,2];case 1:t.sent(),t.label=2;case 2:return null==d||d(),[2]}}))},n=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(e){um(o,r,i,s,a,"next",e)}function a(e){um(o,r,i,s,a,"throw",e)}s(void 0)}))},function(e){return n.apply(this,arguments)})).catch((function(e){var t=function(e){var t,n,r,i,o,s=null==e||null===(t=e.responseBody)||void 0===t||null===(n=t.error)||void 0===n?void 0:n.fieldErrors;return s?Object.values(s).flatMap((function(e){return e.map((function(e){return e.message}))})):[null!==(o=null==e||null===(r=e.responseBody)||void 0===r||null===(i=r.error)||void 0===i?void 0:i.message)&&void 0!==o?o:null==e?void 0:e.message]}(e);(0,ai.showToast)({description:M("errorDescription",t.join(", ")),title:M("errorDescriptionTitle","Error on saving form"),kind:"error",critical:!0})})).finally((function(){X(!1)}))}};return c().createElement(Cn,{enableReinitialize:!0,initialValues:I,validationSchema:Gf({}),onSubmit:function(e,t){var n=t.setSubmitting;ue(e),n(!1)}},(function(e){return re(e.dirty),c().createElement(Tn,{className:"cds--form no-padding ".concat(lm.ohriForm),ref:L},x||k?c().createElement(Xp,null):c().createElement("div",{className:lm.ohriFormContainer},oe?c().createElement(om,{onClose:p,onShowWarningModal:se,t:M}):null,q&&c().createElement("div",{className:lm.loader},c().createElement(qp,null)),c().createElement("div",{className:lm.ohriFormBody},ce&&c().createElement(im,{isFormSubmitting:Y,pagesWithErrors:J,scrollablePages:P,selectedPage:N,mode:u,onCancel:f,handleClose:p,values:e.values,setValues:e.setValues,allowUnspecifiedAll:r.allowUnspecifiedAll,defaultPage:r.defaultPage}),c().createElement("div",{className:lm.formContent},"minimized"!=O&&(null==A?void 0:A.id)&&c().createElement(Pp,{patient:A,hideActionsOverflow:!0}),E.markdown&&c().createElement("div",{className:lm.markdownContainer},c().createElement(ru,{children:E.markdown.join("\n")})),c().createElement("div",{className:"".concat(lm.formContentBody,"\n ").concat("minimized"===O?"".concat(lm.minifiedFormContentBody):"","\n ")},c().createElement(Fp,{formJson:E,patient:A,formSessionDate:T,provider:y,location:w,visit:a,values:e.values,isFormExpanded:V,sessionMode:le,scrollablePages:P,setAllInitialValues:D,allInitialValues:I,setScrollablePages:U,setPagesWithErrors:ee,setIsLoadingFormDependencies:K,setFieldValue:e.setFieldValue,setSelectedPage:H,handlers:R,workspaceLayout:O,isSubmitting:Y})),"minimized"===O&&c().createElement(h.uVA,{className:lm.minifiedButtons},c().createElement(h.zxk,{kind:"secondary",onClick:function(){ne?se(!0):(f&&f(),p&&p())}},"view"===u?"Close":"Cancel"),c().createElement(h.zxk,{type:"submit",disabled:"view"===u||Y},Y?c().createElement(h.lSo,{description:M("submitting","Submitting")+"..."}):c().createElement("span",null,M("save","Save"))))))))}))}},98512:(e,t,n)=>{"use strict";function r(e){return"boolean"==typeof e?e:"string"==typeof e?"true"==e:!!e}function i(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)}n.d(t,{K:()=>i,o:()=>r})},31188:(e,t,n)=>{"use strict";n.d(t,{L:()=>c,Y:()=>u});var r=n(14305),i=n.n(r),o=n(71809),s=n.n(o),a=n(94064),l=n(72225);i().extend(s());var c=function(){function e(t,n,r,o,s){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.node=null,this.patient=null,this.allFields=[],this.allFieldValues={},this.allFieldsKeys=[],this.api=l,this.isEmpty=a.xb,this.includes=function(e,t){return null==e?void 0:e.includes(t)},this.isDateBefore=function(e,t,n){var r=t;return"string"==typeof t&&(r=n?i()(t,n,!0).toDate():i()(t,"YYYY-MM-DD",!0).toDate()),(null==e?void 0:e.getTime())<r.getTime()},this.isDateAfter=function(e,t,n,r){var o=new Date(0);switch(e=i()(e,"YYYY-MM-DD",!0).toDate(),t=i()(t,"YYYY-MM-DD",!0).toDate(),r){case"months":o=new Date(t.setMonth(t.getMonth()+n));break;case"weeks":o=c.addWeeksToDate(t,n);break;case"days":o=c.addDaysToDate(t,n);break;case"years":o=new Date(t.setFullYear(t.getFullYear()+n))}return e.getTime()>o.getTime()},this.addWeeksToDate=function(e,t){return e.setDate(e.getDate()+7*t),e},this.addDaysToDate=function(e,t){return e.setDate(e.getDate()+t),e},this.useFieldValue=function(e){return c.allFieldsKeys.includes(e)?c.allFieldValues[e]:null},this.calcBMI=function(e,t){var n;return e&&t&&(n=(t/(e/100*e/100)).toFixed(1)),e&&t?parseFloat(n):null},this.calcEDD=function(e){var t={};return e&&(t=new Date(e.getTime()+24192e6)),e?t:null},this.calcMonthsOnART=function(e){var t,n,r=new Date,i=Math.round((r.getTime()-(null===(t=e.getTime)||void 0===t?void 0:t.call(e)))/864e5);return e&&i>=30&&(n=Math.floor(i/30)),e?n:null},this.calcViralLoadStatus=function(e){var t;return e&&(t=e>50?"a6768be6-c08e-464d-8f53-5f4229508e54":"5d5e42cc-acc4-4069-b3a8-7163e0db5d96"),e?t:null},this.calcNextVisitDate=function(e,t){var n={};return e&&t&&(n=new Date(e.getTime()+24*t*60*60*1e3)),e&&t?n:null},this.calcTreatmentEndDate=function(e,t,n){var r={},i=30+t;return e&&t&&"160429AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"==n&&(r=new Date(e.getTime()+24*i*60*60*1e3)),e&&t&&"160429AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"==n?r:null},this.calcAgeBasedOnDate=function(e){return(e?new Date(e).getFullYear():(new Date).getFullYear())-new Date(c.patient.birthDate).getFullYear()},this.calcBSA=function(e,t){var n;return e&&t&&(n=Math.sqrt(e*t/3600).toFixed(2)),e&&t?parseFloat(n):null},this.arrayContains=function(e,t){if(Array.isArray(t)){if(0===t.length)return!0;for(var n=!0,r=0;r<t.length;r++){var i=t[r];-1===e.indexOf(i)&&(n=!1)}return n}return-1!==e.indexOf(t)},this.arrayContainsAny=function(e,t){if(Array.isArray(t)){if(0===t.length)return!0;for(var n=!1,r=0;r<t.length;r++){var i=t[r];-1!==e.indexOf(i)&&(n=!0)}return n}return-1!==e.indexOf(t)},this.formatDate=function(e,t,n){if(t=t||"yyyy-MM-dd",n=n||"+0300",r=e,!(null!=(i=Date)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](r):r instanceof i)&&null==(e=new Date(e)))throw new Error("DateFormatException: value passed is not a valid date");var r,i;return e},this.extractRepeatingGroupValues=function(e,t){return t.map((function(t){return t[e]}))},this.calcTimeDifference=function(e,t){var n,r=i()();return e&&("d"==t&&(n=Math.abs(Math.round(r.diff(e,"day",!0)))),"w"==t&&(n=Math.abs(Math.round(r.diff(e,"week",!0)))),"m"==t&&(n=Math.abs(Math.round(r.diff(e,"month",!0)))),"y"==t&&(n=Math.abs(Math.round(r.diff(e,"year",!0))))),""==n?"0":n},this.allFields=r,this.allFieldValues=o,this.allFieldsKeys=s,this.node=t,this.patient=n}var t=e.prototype;return t.today=function(){return new Date},t.calcGravida=function(e,t){var n=0;return e===parseInt(e)&&(n=e+1),t===parseInt(t)&&(n=t+1),t===parseInt(t)&&parseInt(e),n},e}();function u(e,t){if(e&&t)switch(e.type){case"page":t.pageDependants||(t.pageDependants=new Set),t.pageDependants.add(e.value.label);break;case"section":t.sectionDependants||(t.sectionDependants=new Set),t.sectionDependants.add(e.value.label);break;default:t.fieldDependants||(t.fieldDependants=new Set),t.fieldDependants.add(e.value.id)}}},46985:(e,t,n)=>{"use strict";n.d(t,{BJ:()=>o,QP:()=>u,un:()=>s});var r=n(39682),i=n(31188);function o(e){for(var t=[],n="",r=!1,i=0,o=0;o<e.length;o++){var s=e.charAt(o);"'"!==s&&'"'!==s||(r?r=!1:0===i&&(r=!0)),r?n+=s:("("===s?i++:")"===s&&i--,0!==i||" "!==s&&"\t"!==s&&"\n"!==s?n+=s:n.length>0&&(t.push(n),n=""))}return n.length>0&&t.push(n),t}function s(e,t,n){var r=[];return n.forEach((function(n){if(l(n)){var i=n;a(n).forEach((function(n){var r=h(n,e);r&&(i=c(r,t[r.id],i))})),r.push(i)}else{var o=h(n,e);o?r.push(c(o,t[o.id],n)):r.push(n)}})),r.join(" ")}function a(e){for(var t,n=[],r=/(?:\w+|'(?:\\'|[^'\n])*')(?=[,\)]|\s*(?=\)))/g;t=r.exec(e);)n.push(t[0].replace(/\\'/g,"'").replace(/(^'|'$)/g,""));return n}function l(e){return/[()]/.test(e)}function c(e,t,n){return n.includes("useFieldValue('".concat(e.id,"')"))?n:(n=n.replace(new RegExp("['\"]".concat(e.id,"['\"]"),"g"),e.id),"toggle"==e.questionOptions.rendering&&"boolean"==typeof t?n.replace(e.id,"".concat("'".concat(t?r.ks:r.Mf,"'"))):n.replace(e.id,"fieldValues.".concat(e.id)))}function u(e,t,n){t.forEach((function(t){l(t)?a(t).forEach((function(t){(0,i.Y)(e,h(t,n))})):(0,i.Y)(e,h(t,n))}))}function h(e,t){return/^'+|'+$/.test(e)&&(e=e.replace(/^'|'$/g,"")),t.find((function(t){return t.id===e}))}},13801:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j3:()=>evaluateExpression,oC:()=>evaluateAsyncExpression});var _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(31188),_expression_parser__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(46985);function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _arrayWithHoles(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){asyncGeneratorStep(o,r,i,s,a,"next",e)}function a(e){asyncGeneratorStep(o,r,i,s,a,"throw",e)}s(void 0)}))}}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}var __generator=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function evaluateExpression(expression,node,fields,fieldValues,context){if(!(null==expression?void 0:expression.trim()))return null;var allFieldsKeys=fields.map((function(e){return e.id})),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression.trim());(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.QP)(node,parts,fields);var mode=context.mode,myValue=context.myValue,patient=context.patient,_ref=patient&&"sex"in patient&&"age"in patient?patient:{sex:void 0,age:void 0},sex=_ref.sex,age=_ref.age;"field"===node.type&&void 0===myValue&&(myValue=fieldValues[node.value.id]);var _ref=new _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__.L(node,patient,fields,fieldValues,allFieldsKeys),isEmpty=_ref.isEmpty,today=_ref.today,includes=_ref.includes,isDateBefore=_ref.isDateBefore,isDateAfter=_ref.isDateAfter,addWeeksToDate=_ref.addWeeksToDate,addDaysToDate=_ref.addDaysToDate,useFieldValue=_ref.useFieldValue,calcBMI=_ref.calcBMI,calcEDD=_ref.calcEDD,calcMonthsOnART=_ref.calcMonthsOnART,calcViralLoadStatus=_ref.calcViralLoadStatus,calcNextVisitDate=_ref.calcNextVisitDate,calcTreatmentEndDate=_ref.calcTreatmentEndDate,calcAgeBasedOnDate=_ref.calcAgeBasedOnDate,calcBSA=_ref.calcBSA,arrayContains=_ref.arrayContains,arrayContainsAny=_ref.arrayContainsAny,formatDate=_ref.formatDate,extractRepeatingGroupValues=_ref.extractRepeatingGroupValues,calcGravida=_ref.calcGravida,calcTimeDifference=_ref.calcTimeDifference;expression=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.un)(fields,fieldValues,parts);try{return eval(expression)}catch(e){console.error("Error: ".concat(e," \n\n failing expression: ").concat(expression))}return null}function evaluateAsyncExpression(e,t,n,r,i){return _evaluateAsyncExpression.apply(this,arguments)}function _evaluateAsyncExpression(){return _evaluateAsyncExpression=_asyncToGenerator((function(expression,node,fields,fieldValues,context){var allFieldsKeys,parts,mode,myValue,patient,_ref,sex,age,_ref,api,isEmpty,today,includes,isDateBefore,isDateAfter,addWeeksToDate,addDaysToDate,useFieldValue,calcBMI,calcEDD,calcMonthsOnART,calcViralLoadStatus,calcNextVisitDate,calcTreatmentEndDate,calcAgeBasedOnDate,calcBSA,arrayContains,arrayContainsAny,formatDate,extractRepeatingGroupValues,calcGravida,calcTimeDifference,lazyFragments,temporaryObjectsMap,fragments;return __generator(this,(function(_state){switch(_state.label){case 0:return(null==expression?void 0:expression.trim())?(allFieldsKeys=fields.map((function(e){return e.id})),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression.trim()),(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.QP)(node,parts,fields),mode=context.mode,myValue=context.myValue,patient=context.patient,_ref=patient&&"sex"in patient&&"age"in patient?patient:{sex:void 0,age:void 0},sex=_ref.sex,age=_ref.age,"field"===node.type&&void 0===myValue&&(myValue=fieldValues[node.value.id]),_ref=new _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__.L(node,patient,fields,fieldValues,allFieldsKeys),api=_ref.api,isEmpty=_ref.isEmpty,today=_ref.today,includes=_ref.includes,isDateBefore=_ref.isDateBefore,isDateAfter=_ref.isDateAfter,addWeeksToDate=_ref.addWeeksToDate,addDaysToDate=_ref.addDaysToDate,useFieldValue=_ref.useFieldValue,calcBMI=_ref.calcBMI,calcEDD=_ref.calcEDD,calcMonthsOnART=_ref.calcMonthsOnART,calcViralLoadStatus=_ref.calcViralLoadStatus,calcNextVisitDate=_ref.calcNextVisitDate,calcTreatmentEndDate=_ref.calcTreatmentEndDate,calcAgeBasedOnDate=_ref.calcAgeBasedOnDate,calcBSA=_ref.calcBSA,arrayContains=_ref.arrayContains,arrayContainsAny=_ref.arrayContainsAny,formatDate=_ref.formatDate,extractRepeatingGroupValues=_ref.extractRepeatingGroupValues,calcGravida=_ref.calcGravida,calcTimeDifference=_ref.calcTimeDifference,expression=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.un)(fields,fieldValues,parts),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression),lazyFragments=[],parts.forEach((function(e,t){if(t%2==0&&e.startsWith("resolve(")){var n=_slicedToArray(checkReferenceToResolvedFragment(e),1)[0];lazyFragments.push({expression:n,index:t})}})),temporaryObjectsMap={},[4,Promise.all(lazyFragments.map((function(param){var _$expression=param.expression;return eval(_$expression)})))]):[2,null];case 1:fragments=_state.sent(),lazyFragments.forEach((function(e,t){if("object"==typeof fragments[t]){var n="obj_".concat(t);temporaryObjectsMap[n]=fragments[t],expression=expression.replace(e.expression,"temporaryObjectsMap.".concat(n))}else expression=expression.replace(e.expression,"string"==typeof fragments[t]?"'".concat(fragments[t],"'"):fragments[t])}));try{return[2,eval(expression)]}catch(e){console.error("Error: ".concat(e," \n\n failing expression: ").concat(expression))}return[2,null]}}))})),_evaluateAsyncExpression.apply(this,arguments)}function resolve(e){return Promise.resolve(e)}function checkReferenceToResolvedFragment(e){var t=e.match(/resolve\((.*)\)/)||[],n=t.length?e.substring(e.indexOf(t[0])+t[0].length):"";return[t[0]||"",n]}},94064:(e,t,n)=>{"use strict";n.d(t,{Ls:()=>s,Tv:()=>i,xb:()=>a});var r=n(98512),i="field.required",o="field.outOfBound",s={validate:function(e,t){var n,s;if(null===(n=e.submission)||void 0===n?void 0:n.unspecified)return[];if(((0,r.o)(e.required)||(0,r.o)(e.unspecified))&&a(t))return l(i,"Field is mandatory");if("text"===e.questionOptions.rendering)return null!==(s=function(e,t,n){var r=Number(e),i=Number(t);if("number"==typeof n&&!Number.isNaN(n)){if(r&&i&&n>=r&&n<=i)return[];if(r&&n<r)return l(o,"Length should be at least ".concat(r," characters"));if(i&&n>i)return l(o,"Length should not exceed ".concat(i," characters"));if(i&&r&&n<r&&n>i)return l(o,"Length should be between ".concat(r," and ").concat(i," characters"))}}(e.questionOptions.minLength,e.questionOptions.maxLength,t.length))&&void 0!==s?s:[];if("number"===e.questionOptions.rendering){var c=Number(e.questionOptions.min),u=Number(e.questionOptions.max);return a(t)||Number.isNaN(c)&&Number.isNaN(u)?[]:function(e,t,n){return!Number.isNaN(e)&&n<e?[{resultType:"error",errCode:o,message:"Value must be greater than ".concat(e)}]:!Number.isNaN(t)&&n>t?[{resultType:"error",errCode:o,message:"Value must be lower than ".concat(t)}]:[]}(c,u,t)}return[]}};function a(e){return null==e||""===e||"string"==typeof e&&!(null==e?void 0:e.trim())||!(!Array.isArray(e)||e.length)}function l(e,t){return[{resultType:"error",errCode:e,message:t}]}},2084:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=o()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i},s.apply(null,arguments)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function l(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}n.d(t,{RQ:()=>O,WK:()=>j,X3:()=>I,Zn:()=>T,aU:()=>u,cP:()=>_,fp:()=>A,kG:()=>R,lX:()=>v});var u,h=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},f(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(u||(u={}));var m,g="popstate";function v(e){return void 0===e&&(e={}),function(e,t,n,r){var i=function(){h=u.Pop,d&&d({action:h,location:f.location})};void 0===r&&(r={});var o=r.window,s=void 0===o?document.defaultView:o,a=r.v5Compat,l=void 0!==a&&a,c=s.history,h=u.Pop,d=null,f={get action(){return h},get location(){return e(s,c)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(g,i),d=e,function(){s.removeEventListener(g,i),d=null}},createHref:function(e){return t(s,e)},encodeLocation:function(e){var t=function(e){var t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"==typeof e?e:w(e);return new URL(n,t)}(w(e));return p({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){h=u.Push;var r=y(f.location,e,t);n&&n(r,e);var i=b(r),o=f.createHref(r);try{c.pushState(i,"",o)}catch(e){s.location.assign(o)}l&&d&&d({action:h,location:f.location})},replace:function(e,t){h=u.Replace;var r=y(f.location,e,t);n&&n(r,e);var i=b(r),o=f.createHref(r);c.replaceState(i,"",o),l&&d&&d({action:h,location:f.location})},go:function(e){return c.go(e)}};return f}((function(e,t){var n=e.location;return y("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:w(t)}),null,e)}function b(e){return{usr:e.state,key:e.key}}function y(e,t,n,r){return void 0===n&&(n=null),p({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?_(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function w(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,s=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n}function _(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function A(e,t,n){void 0===n&&(n="/");var r=T(("string"==typeof t?_(t):t).pathname||"/",n);if(null==r)return null;var i=x(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,s=0;null==o&&s<i.length;++s)o=k(i[s],M(r));return o}function x(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach((function(e,i){var o={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(R(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));var s=O([r,o.relativePath]),a=n.concat(o);e.children&&e.children.length>0&&(R(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),x(e.children,t,a,s)),(null!=e.path||e.index)&&t.push({path:s,score:E(s,e.index),routesMeta:a})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={}));var C=/^:\w+$/,S=function(e){return"*"===e};function E(e,t){var n=e.split("/"),r=n.length;return n.some(S)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!S(e)})).reduce((function(e,t){return e+(C.test(t)?3:""===t?1:10)}),r)}function k(e,t){for(var n=e.routesMeta,r={},i="/",o=[],s=0;s<n.length;++s){var a=n[s],l=s===n.length-1,c="/"===i?t:t.slice(i.length)||"/",u=$({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!u)return null;Object.assign(r,u.params);var h=a.route;o.push({params:r,pathname:O([i,u.pathname]),pathnameBase:F(O([i,u.pathnameBase])),route:h}),"/"!==u.pathnameBase&&(i=O([i,u.pathnameBase]))}return o}function $(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n,r,i=(n=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),L("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(function(e,t){return r.push(t),"([^\\/]+)"}));return e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(n,r)||d(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],s=i[1],a=t.match(o);if(!a)return null;var l=a[0],c=l.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:s.reduce((function(e,t,n){if("*"===t){var r=u[n]||"";c=l.slice(0,l.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return L(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(u[n]||"",t),e}),{}),pathname:l,pathnameBase:c,pattern:e}}function M(e){try{return decodeURI(e)}catch(t){return L(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function T(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function R(e,t){if(!1===e||null==e)throw new Error(t)}function L(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}var O=function(e){return e.join("/").replace(/\/\/+/g,"/")},F=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=a(t);if(n){var i=a(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return l(this,e)});function o(){return i(this,o),r.apply(this,arguments)}return o}(f(Error)),D=function e(t,n,r){i(this,e),this.status=t,this.statusText=n||"",this.data=r};function j(e){return t=e,null!=(n=D)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n;var t,n}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;var P,U=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(function(e){if(Array.isArray(e))return r(e)}(P=U)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(P)||d(P)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))},31489:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,r){"string"==typeof e?(2==arguments.length&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,r=function(e,t,n){if("string"==typeof t){var r=s(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(null==c&&i.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},i=function(e,t){var n=r("",e,t);return null==n&&i.original?i.original.apply(this,arguments):n},o=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return o(e,n[0])+"!"+o(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},s=function(e,n){n=o(e,n);var i=t.modules[n];if(!i){if("function"==typeof(i=t.payloads[n])){var s={},a={id:n,uri:"",exports:s,packaged:!0};s=i((function(e,t){return r(n,e,t)}),s,a)||a.exports,t.modules[n]=s,delete t.payloads[n]}i=t.modules[n]=s||i}return i};n=e,"ace"&&(e.ace||(e.ace={}),n=e.ace),n.define&&n.define.packaged||(t.original=n.define,n.define=t,n.define.packaged=!0),n.require&&n.require.packaged||(i.original=n.require,n.require=i,n.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){var r=function(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})};String.prototype.startsWith||r(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||r(String.prototype,"endsWith",(function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t})),String.prototype.repeat||r(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||r(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];null!=r&&Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||r(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}})),Array.prototype.findIndex||r(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}})),Array.prototype.includes||r(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||r(Array.prototype,"fill",(function(e){for(var t=this,n=t.length>>>0,r=arguments[1],i=r>>0,o=i<0?Math.max(n+i,0):Math.min(i,n),s=arguments[2],a=void 0===s?n:s>>0,l=a<0?Math.max(n+a,0):Math.min(a,n);o<l;)t[o]=e,o++;return t})),Array.of||r(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var r in n={},t)n[r]=e(t[r]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r="object"==typeof navigator?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),o=r.userAgent||"",s=r.appName||"";t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r,i=function(){var e=a;a=null,e&&e.forEach((function(e){o(e[0],e[1])}))},o=function(e,n,o){if("undefined"!=typeof document){if(a)if(o)i();else if(!1===o)return a.push([e,n]);if(!r){var s=o;o&&o.getRootNode&&(s=o.getRootNode())&&s!=o||(s=document);var l=s.ownerDocument||s;if(n&&t.hasCssString(n,s))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),s==l&&(s=t.getDocumentHead(l)),s.insertBefore(c,s.firstChild)}}},s=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s<t.length;s++){var a=e(t[s],n,r);a&&o.push(a)}return o}var l=document.createElement(t[0]),c=t[1],u=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(u=2),s=u;s<t.length;s++)e(t[s],l,r);return 2==u&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?r&&(r[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var a=[];if(t.useStrictCSP=function(e){r=e,0==e?i():a||(a=[])},t.importCssString=o,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(r);var s=n.offsetWidth;i.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=r.clientWidth),o.removeChild(r),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!s.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,s.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),s.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,(function r(){n.off(e,r),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);-1!=o&&i.splice(o,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var r=function(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)},i=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))},o=e("./oop"),s=e("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return r('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){o.implement(this,s),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)})),o.implement(e,a),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},this.warn=r,this.reportError=i}).call(l.prototype),t.AppConfig=l})),ace.define("ace/theme/textmate.css",["require","exports","module"],(function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate.css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var r=e("./lib/lang"),i=(e("./lib/oop"),e("./lib/net")),o=e("./lib/dom"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(a.hasOwnProperty(e))a[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&o.useStrictCSP(t)},t.all=function(){return r.copyObject(a)},t.$modes={},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==r&&(t=r=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,r){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return r&&r(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,r){t._emit("load.module",{name:n,module:r});var i=t.$loading[n];t.$loading[n]=null,i.forEach((function(e){e&&e(r)}))}))};if(!t.get("packaged"))return a();i.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.13.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,r){"use strict";var i=function(t){if(a&&a.document){s.set("packaged",t||e.packaged||r.packaged||a.define&&n.amdD.packaged);for(var i={},l="",c=document.currentScript||document._currentScript,u=(c&&c.ownerDocument||document).getElementsByTagName("script"),h=0;h<u.length;h++){var d=u[h],f=d.src||d.getAttribute("src");if(f){for(var p=d.attributes,m=0,g=p.length;m<g;m++){var v=p[m];0===v.name.indexOf("data-ace-")&&(i[o(v.name.replace(/^data-ace-/,""))]=v.value)}var b=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(l=b[1])}}for(var y in l&&(i.base=i.base||l,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base,i)void 0!==i[y]&&s.set(y,i[y])}},o=function(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))};e("./lib/fixoldbrowsers");var s=e("./config");s.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var a=function(){return this||"undefined"!=typeof window&&window}();r.exports=function(t){s.init=i,t.require=e,t.define=n.amdD},i(!0)})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),i=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,i=function(){return null==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r},o=function(e,t,n){this.elem=e,this.type=t,this.callback=n},s=function(e,t,n){var r=p(t);if(!c.isMac&&u){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),u.altGr){if(3==(3&r))return;u.altGr=0}if(18===n||17===n){var i="location"in t?t.location:t.keyLocation;17===n&&1===i?1==u[n]&&(h=t.timeStamp):18===n&&3===r&&2===i&&t.timeStamp-h<50&&(u.altGr=!0)}}if(n in l.MODIFIER_KEYS&&(n=-1),r||13!==n||3!==(i="location"in t?t.location:t.keyLocation)||(e(t,r,-n),!t.defaultPrevented)){if(c.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in l.FUNCTION_KEYS||n in l.PRINTABLE_KEYS)&&e(t,r,n)}},a=function(){u=Object.create(null)},l=e("./keys"),c=e("./useragent"),u=null,h=0;o.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,i()),r&&r.$toDestroy.push(new o(e,t,n))},f=t.removeListener=function(e,t,n){e.removeEventListener(t,n,i())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||c.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),f(r,"mousemove",t),f(r,"mouseup",i),f(r,"dragstart",i)}return d(r,"mousemove",t),d(r,"mouseup",i),d(r,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",(function(e){var n=e.deltaX||0,r=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*r;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*r;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*r}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,i,o){var s,a,l,u=function(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,c.isIE){var o=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;l&&!o||(h=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[h-1]||600),1==h&&(s=e.clientX,a=e.clientY)}if(e._clicks=h,r[i]("mousedown",e),h>4)h=0;else if(h>1)return r[i](f[h],e)},h=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",u,o)}))};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};if(t.getModifierString=function(e){return l.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){if(c.isOldGecko||c.isOpera&&!("KeyboardEvent"in window)){var i=null;d(e,"keydown",(function(e){i=e.keyCode}),r),d(e,"keypress",(function(e){return s(n,e,i)}),r)}else{var o=null;d(e,"keydown",(function(e){u[e.keyCode]=(u[e.keyCode]||0)+1;var t=s(n,e,e.keyCode);return o=e.defaultPrevented,t}),r),d(e,"keypress",(function(e){o&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),o=null)}),r),d(e,"keyup",(function(e){u[e.keyCode]=null}),r),u||(a(),d(window,"focus",a))}},"object"==typeof window&&window.postMessage&&!c.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(o){o.data==r&&(t.stopPropagation(o),f(n,"message",i),e())};d(n,"message",i),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else this.end.row<e&&(n={row:e,column:0});if(this.start.row>t)var i={row:t+1,column:0};else this.start.row<e&&(i={row:e,column:0});return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var i={row:e,column:t};else var o={row:e,column:t};return r.fromPoints(i||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=i.isChrome<18,c=i.isIE,u=i.isChrome>63,h=400,d=e("../lib/keys"),f=d.KEY_MODS,p=i.isIOS,m=p?/\s/:/\n/,g=i.isMobile;t.TextInput=function(e,t){var n=function(){S=!0,b.blur(),b.focus(),S=!1},v=function(){clearTimeout(N),N=setTimeout((function(){x&&(b.style.cssText=x,x=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)},b=o.createElement("textarea");b.className="ace_text-input",b.setAttribute("wrap","off"),b.setAttribute("autocorrect","off"),b.setAttribute("autocapitalize","off"),b.setAttribute("spellcheck",!1),b.style.opacity="0",e.insertBefore(b,e.firstChild);var y=!1,w=!1,_=!1,A=!1,x="";g||(b.style.fontSize="1px");var C=!1,S=!1,E="",k=0,$=0,M=0;try{var T=document.activeElement===b}catch(e){}r.addListener(b,"blur",(function(e){S||(t.onBlur(e),T=!1)}),t),r.addListener(b,"focus",(function(e){if(!S){if(T=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(R):R()}}),t),this.$focusScroll=!1,this.focus=function(){if(x||u||"browser"==this.$focusScroll)return b.focus({preventScroll:!0});var e=b.style.top;b.style.position="fixed",b.style.top="0px";try{var t=0!=b.getBoundingClientRect().top}catch(e){return}var n=[];if(t)for(var r=b.parentElement;r&&1==r.nodeType;)n.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;b.focus({preventScroll:!0}),t&&n.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){b.style.position="","0px"==b.style.top&&(b.style.top=e)}),0)},this.blur=function(){b.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,n=e&&e.command&&e.command.name;if("insertstring"!=n){var r=n&&(e.docChanged||e.selectionChanged);_&&r&&(E=b.value="",W()),R()}}));var R=p?function(e){if(T&&(!y||e)&&!A){e||(e="");var n="\n ab"+e+"cde fg\n";n!=b.value&&(b.value=E=n);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==k&&$==r||b.setSelectionRange(4,r),k=4,$=r}}:function(){if(!_&&!A&&(T||O)){_=!0;var e=0,n=0,r="";if(t.session){var i=t.selection,o=i.getRange(),s=i.cursor.row;if(e=o.start.column,n=o.end.column,r=t.session.getLine(s),o.start.row!=s){var a=t.session.getLine(s-1);e=o.start.row<s-1?0:e,n+=a.length+1,r=a+"\n"+r}else if(o.end.row!=s){var l=t.session.getLine(s+1);n=o.end.row>s+1?l.length:n,n+=r.length+1,r=r+"\n"+l}else g&&s>0&&(r="\n"+r,n+=1,e+=1);r.length>h&&(e<h&&n<h?r=r.slice(0,h):(r="\n",e==n?e=n=0:(e=0,n=1)))}var c=r+"\n\n";if(c!=E&&(b.value=E=c,k=$=c.length),O&&(k=b.selectionStart,$=b.selectionEnd),$!=n||k!=e||b.selectionEnd!=$)try{b.setSelectionRange(e,n),k=e,$=n}catch(e){}_=!1}};this.resetSelection=R,T&&t.onFocus();var L=null;this.setInputHandler=function(e){L=e},this.getInputHandler=function(){return L};var O=!1,F=function(e,n){if(O&&(O=!1),w)return R(),e&&t.onPaste(e),w=!1,"";for(var r=b.selectionStart,o=b.selectionEnd,s=k,a=E.length-$,l=e,c=e.length-r,u=e.length-o,h=0;s>0&&E[h]==e[h];)h++,s--;for(l=l.slice(h),h=1;a>0&&E.length-h>k-1&&E[E.length-h]==e[e.length-h];)h++,a--;c-=h-1,u-=h-1;var d=l.length-h+1;if(d<0&&(s=-d,d=0),l=l.slice(0,d),!(n||l||c||s||a||u))return"";A=!0;var f=!1;return i.isAndroid&&". "==l&&(l=" ",f=!0),l&&!s&&!a&&!c&&!u||C?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:u}),A=!1,E=e,k=r,$=o,M=u,f?"\n":l},I=function(e){if(_)return H();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var n=b.value,r=F(n,!0);(n.length>500||m.test(r)||g&&k<1&&k==$)&&R()},D=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!l){var i=c||n?"Text":"text/plain";try{return t?!1!==r.setData(i,t):r.getData(i)}catch(e){if(!n)return D(e,t,!0)}}},j=function(e,n){var i=t.getCopyText();if(!i)return r.preventDefault(e);D(e,i)?(p&&(R(i),y=i,setTimeout((function(){y=!1}),10)),n?t.onCut():t.onCopy(),r.preventDefault(e)):(y=!0,b.value=i,b.select(),setTimeout((function(){y=!1,R(),n?t.onCut():t.onCopy()})))},P=function(e){j(e,!0)},U=function(e){j(e,!1)},B=function(e){var n=D(e);a.pasteCancelled()||("string"==typeof n?(n&&t.onPaste(n,e),i.isIE&&setTimeout(R),r.preventDefault(e)):(b.value="",w=!0))};r.addCommandKeyListener(b,t.onCommandKey.bind(t),t),r.addListener(b,"select",(function(e){_||(y?y=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=E.length&&e.value===E&&E&&e.selectionEnd!==$}(b)?(t.selectAll(),R()):g&&b.selectionStart!=k&&R())}),t),r.addListener(b,"input",I,t),r.addListener(b,"cut",P,t),r.addListener(b,"copy",U,t),r.addListener(b,"paste",B,t),"oncut"in b&&"oncopy"in b&&"onpaste"in b||r.addListener(e,"keydown",(function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:U(e);break;case 86:B(e);break;case 88:P(e)}}),t);var N,H=function(){if(_&&t.onCompositionUpdate&&!t.$readOnly){if(C)return n();if(_.useTextareaForIME)t.onCompositionUpdate(b.value);else{var e=b.value;F(e),_.markerRange&&(_.context&&(_.markerRange.start.column=_.selectionStart=_.context.compositionStartOffset),_.markerRange.end.column=_.markerRange.start.column+$-_.selectionStart+M)}}},W=function(e){t.onCompositionEnd&&!t.$readOnly&&(_=!1,t.onCompositionEnd(),t.off("mousedown",n),e&&I())},V=s.delayedCall(H,50).schedule.bind(null,null);r.addListener(b,"compositionstart",(function(e){if(!_&&t.onCompositionStart&&!t.$readOnly&&(_={},!C)){e.data&&(_.useTextareaForIME=!1),setTimeout(H,0),t._signal("compositionStart"),t.on("mousedown",n);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,_.markerRange=r,_.selectionStart=k,t.onCompositionStart(_),_.useTextareaForIME?(E=b.value="",k=0,$=0):(b.msGetInputContext&&(_.context=b.msGetInputContext()),b.getInputContext&&(_.context=b.getInputContext()))}}),t),r.addListener(b,"compositionupdate",H,t),r.addListener(b,"keyup",(function(e){27==e.keyCode&&b.value.length<b.selectionStart&&(_||(E=b.value),k=$=-1,R()),V()}),t),r.addListener(b,"keydown",V,t),r.addListener(b,"compositionend",W,t),this.getElement=function(){return b},this.setCommandMode=function(e){C=e,b.readOnly=!1},this.setReadOnly=function(e){C||(b.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){O=!0,R(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){x||(x=b.style.cssText),b.style.cssText=(n?"z-index:100000;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+$)*t.renderer.characterWidth*.5+"px;";var s=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-b.clientHeight-2,h=function(e){o.translate(b,e.clientX-c-2,Math.min(e.clientY-l-2,u))};h(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(N),i.isWin&&r.capture(t.container,h,v))},this.onContextMenuClose=v;var z=function(e){t.textInput.onContextMenu(e),v()};r.addListener(b,"mouseup",z,t),r.addListener(b,"mousedown",(function(e){e.preventDefault(),v()}),t),r.addListener(t.renderer.scroller,"contextmenu",z,t),r.addListener(b,"contextmenu",z,t),p&&function(e,t,n){var r=null,i=!1;n.addEventListener("keydown",(function(e){r&&clearTimeout(r),i=!0}),!0),n.addEventListener("keyup",(function(e){r=setTimeout((function(){i=!1}),100)}),!0);var o=function(e){if(document.activeElement===n&&!(i||_||t.$mouseHandler.isMousePressed||y)){var r=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==r?s=d.up:1==r?s=d.home:o>$&&"\n"==E[o]?s=d.end:r<k&&" "==E[r-1]?(s=d.left,a=f.option):r<k||r==k&&$!=k&&r==o?s=d.left:o>$&&E.slice(0,o).split("\n").length>2?s=d.down:o>$&&" "==E[o-1]?(s=d.right,a=f.option):(o>$||o==$&&$!=k&&r==o)&&(s=d.right),r!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}k=r,$=o,R("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,b),this.destroy=function(){b.parentElement&&b.parentElement.removeChild(b)}},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=function(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")},i=function(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}},o=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();return 0!==i?((r.getSelectionRange().isEmpty()||1==i)&&r.selection.moveToPosition(n),void(2==i&&(r.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==s&&1==a)r=o.end,t=o.start;else{var l=i(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,s=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;return a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=r:r-n.allowed<550&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0),n.t=r,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";var r=function(e){this.isOpen=!1,this.$element=null,this.$parentNode=e},i=(e("./lib/oop"),e("./lib/dom")),o="ace_tooltip";(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=function(e){a.call(this,e)},i=e("../lib/dom"),o=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;o.inherits(r,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(r.prototype),t.GutterHandler=function(e){var t,n,o,a=e.editor,l=a.renderer.$gutterLayer,c=new r(a.container);function u(){t&&(t=clearTimeout(t)),o&&(c.hide(),o=null,a._signal("hideGutterTooltip",c),a.off("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(r){var s=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(s,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&h(r),n=r,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=l.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return u()}if(o!=r){o=r.text.join("<br/>"),c.setHtml(o);var d=r.className;if(d&&c.setClassName(d.trim()),c.show(),a._signal("showGutterTooltip",c),a.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var f=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}}():u()}),50))})),s.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=function(e){var t=e.editor,n=o.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var r,h,d,f,p,m,g,v,b,y,w,_=t.container,A=0;function x(){var e=m;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,s=!n||e.column!=n.column;!y||o||s?(t.moveCursorToPosition(e),y=r,w={x:h,y:d}):i(w.x,w.y,h,d)>u?y=null:r-y>=c&&(t.renderer.scrollCursorIntoView(),y=null)})(m=t.renderer.screenToTextCoordinates(h,d),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:h-s.left,right:s.right-h},y:{top:d-s.top,bottom:s.bottom-d}},c=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),f={row:e.row,column:e.column};c/o<=2&&(f.column+=a.x.left<a.x.right?-3:2),u/i<=1&&(f.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=f.row,m=e.column!=f.column,g=!n||e.row!=n.row;p||m&&!g?b?r-b>=l&&t.renderer.scrollCursorIntoView(f):b=r:b=null}(m,e)}function C(){p=t.selection.toOrientedRange(),r=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),x(),f=setInterval(x,20),A=0,s.addListener(document,"mousemove",k)}function S(){clearInterval(f),t.session.removeMarker(r),r=null,t.selection.fromOrientedRange(p),t.isFocused()&&!v&&t.$resetCursorStyle(),p=null,m=null,A=0,b=null,y=null,s.removeListener(document,"mousemove",k)}this.onDragStart=function(e){if(this.cancelDrag||!_.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}p=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),i.clearData(),i.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(_.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;g||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return h=e.clientX,d=e.clientY,r||C(),A++,e.dataTransfer.dropEffect=g=M(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return h=e.clientX,d=e.clientY,r||(C(),A++),null!==E&&(E=null),e.dataTransfer.dropEffect=g=M(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--A<=0&&r)return S(),g=null,s.preventDefault(e)},this.onDrop=function(e){if(m){var n=e.dataTransfer;if(v)switch(g){case"move":p=p.contains(m.row,m.column)?{start:m,end:m}:t.moveText(p,m);break;case"copy":p=t.moveText(p,m,!0)}else{var r=n.getData("Text");p={start:m,end:t.session.insert(m,r)},t.focus(),g=null}return S(),s.preventDefault(e)}},s.addListener(_,"dragstart",this.onDragStart.bind(e),t),s.addListener(_,"dragend",this.onDragEnd.bind(e),t),s.addListener(_,"dragenter",this.onDragEnter.bind(e),t),s.addListener(_,"dragover",this.onDragOver.bind(e),t),s.addListener(_,"dragleave",this.onDragLeave.bind(e),t),s.addListener(_,"drop",this.onDrop.bind(e),t);var E=null;function k(){null==E&&(E=setTimeout((function(){null!=E&&r&&S()}),20))}function $(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function M(e){var t=["copy","copymove","all","uninitialized"],n=a.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}},i=function(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))},o=e("../lib/dom"),s=e("../lib/event"),a=e("../lib/useragent"),l=200,c=200,u=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;a.isIE&&"dragReady"==this.state&&i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;"unselectable"in i&&(i.unselectable="on"),t.getDragDelay()?(a.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(r.prototype),t.DragdropHandler=r})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,f,p=function(){var e,n,r;f||(e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var i,s,a=r.target.getAttribute("action");if("more"==a||!n)return n=!n,i=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void f.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),f.firstChild);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()},f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var i=t.selection.cursor,s=t.renderer.textToScreenCoordinates(i.row,i.column),a=t.renderer.textToScreenCoordinates(0,0).pageX,l=t.renderer.scrollLeft,c=t.container.getBoundingClientRect();f.style.top=s.pageY-c.top-3+"px",s.pageX-c.left<c.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=a+l-c.left+"px"),f.style.display="",f.firstChild.style.display="none",t.on("input",_)},m=function(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(h.row,h.column);!e.isEmpty()&&n||(t.selection.moveToPosition(h),t.selection.selectWord()),g="wait",p()},g="scroll",v=0,b=0,y=0,w=0;function _(e){f&&(f.style.display="none"),t.off("input",_)}i.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),i.addListener(e,"touchstart",(function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var p=i[0],_=p.clientX,A=p.clientY;Math.abs(n-_)+Math.abs(s-A)>o&&(a=-1),n=e.clientX=_,s=e.clientY=A,y=w=0;var x=new r(e,t);if(h=x.getDocumentPosition(),f-a<500&&1==i.length&&!v)b++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=b>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{b=0;var C=t.selection.cursor,S=t.selection.isEmpty()?C:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(C,!0),k=t.renderer.$cursorLayer.getPixelPosition(S,!0),$=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,R=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientX<$.left)return void(g="zoom");var L=R(e.clientX-$.left-E.left+T,e.clientY-$.top-E.top+M),O=R(e.clientX-$.left-k.left+T,e.clientY-$.top-k.top+M);L<3.5&&O<3.5&&(g=L>O?"cursor":"anchor"),g=O<3.5?"anchor":L<3.5?"cursor":"scroll",c=setTimeout(m,450)}a=f}),t),i.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==g?(g="",v=0):c?(t.selection.moveToPosition(h),v=0,p()):"scroll"==g?(v+=60,u=setInterval((function(){v--<=0&&(clearInterval(u),u=null),Math.abs(y)<.01&&(y=0),Math.abs(w)<.01&&(w=0),v<20&&(y*=.9),v<20&&(w*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*y,10*w),e==t.session.getScrollTop()&&(v=0)}),10),_()):p(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==g)){var o=i[0],a=n-o.clientX,u=s-o.clientY;if("wait"==g){if(!(a*a+u*u>4))return e.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==g){var f=new r(e,t);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(y=a/d,w=u/d),t._emit("mousewheel",f),f.propagationStopped||(y=w=0)}else{var p=new r(e,t).getDocumentPosition();"cursor"==g?t.selection.moveCursorToPosition(p):"anchor"==g&&t.selection.setSelectionAnchor(p.row,p.column),t.renderer.scrollCursorIntoView(p),e.preventDefault()}}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))},a=e.renderer.getMouseEventTarget();r.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;r.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(a,"mousedown",n,e),r.addListener(u,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),e)};(function(){this.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(e){if(e){if(i.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",h),clearInterval(d),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var h=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=r.capture(this.editor.container,l,c);var d=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),i=e.session,o=i.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?i.removeFold(o):i.expandFold(o),t.stop());var s=t.domEvent&&t.domEvent.target;s&&r.hasCssClass(s,"ace_inline_button")&&r.hasCssClass(s,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var s=r.getFoldAt(n,r.getLine(n).length,1);s?r.removeFold(s):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n){if(!(a<e))if(1!=e||s!=f||c)for(var r,i,o,l,u=n.length,h=0;h<u;){if(t[h]>=e){for(r=h+1;r<u&&t[r]>=e;)r++;for(i=h,o=r-1;i<o;i++,o--)l=n[i],n[i]=n[o],n[o]=l;h=r}h++}else n.reverse()},i=function(e,t,n,r){var i,o,a,h,d=t[r];switch(d){case p:case m:l=!1;case b:case v:return d;case g:return l?v:g;case _:return l=!0,m;case A:return b;case x:return r<1||r+1>=t.length||(i=n[r-1])!=g&&i!=v||(o=t[r+1])!=g&&o!=v?b:(l&&(o=v),o==i?o:b);case C:return(i=r>0?n[r-1]:y)==g&&r+1<t.length&&t[r+1]==g?g:b;case S:if(r>0&&n[r-1]==g)return g;if(l)return b;for(h=r+1,a=t.length;h<a&&t[h]==S;)h++;return h<a&&t[h]==g?g:b;case E:for(a=t.length,h=r+1;h<a&&t[h]==E;)h++;if(h<a){var f=e[r],O=f>=1425&&f<=2303||64286==f;if(i=t[h],O&&(i==m||i==_))return m}return r<1||(i=t[r-1])==y?b:n[r-1];case y:return l=!1,c=!0,s;case w:return u=!0,b;case k:case $:case T:case R:case M:l=!1;case L:return b}},o=function(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?p:O[t]:5==n?/[\u0591-\u05f4]/.test(e)?m:p:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?E:/[\u0660-\u0669\u066b-\u066c]/.test(e)?v:1642==t?S:/[\u06f0-\u06f9]/.test(e)?g:_:32==n&&t<=8287?F[255&t]:254==n&&t>=65136?_:b},s=0,a=0,l=!1,c=!1,u=!1,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=1,p=0,m=1,g=2,v=3,b=4,y=5,w=6,_=7,A=8,x=9,C=10,S=11,E=12,k=13,$=14,M=15,T=16,R=17,L=18,O=[L,L,L,L,L,L,L,L,L,w,y,w,A,y,L,L,L,L,L,L,L,L,L,L,L,L,L,L,y,y,y,w,A,b,b,S,S,S,b,b,b,b,b,C,x,C,x,x,g,g,g,g,g,g,g,g,g,g,x,b,b,b,b,b,b,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,b,b,b,b,b,b,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,b,b,b,b,L,L,L,L,L,L,y,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,x,b,S,S,S,S,b,b,b,b,p,b,b,L,b,b,S,S,g,g,b,p,b,b,b,g,p,b,b,b,b,b],F=[A,A,A,A,A,A,A,A,A,A,A,L,L,L,p,m,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,A,y,k,$,M,T,R,x,S,S,S,S,S,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,x,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,A];t.L=p,t.R=m,t.EN=g,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,p){if(e.length<2)return{};var g=e.split(""),x=new Array(g.length),C=new Array(g.length),S=[];s=p?f:0,function(e,t,n,r){var f=s?d:h,p=null,m=null,g=null,v=0,b=null,_=-1,x=null,C=null,S=[];if(!r)for(x=0,r=[];x<n;x++)r[x]=o(e[x]);for(a=s,l=!1,c=!1,u=!1,C=0;C<n;C++){if(p=v,S[C]=m=i(e,r,S,C),b=240&(v=f[p][m]),v&=15,t[C]=g=f[v][5],b>0)if(16==b){for(x=_;x<C;x++)t[x]=1;_=-1}else _=-1;if(f[v][6])-1==_&&(_=C);else if(_>-1){for(x=_;x<C;x++)t[x]=g;_=-1}r[C]==y&&(t[C]=0),a|=g}if(u)for(x=0;x<n;x++)if(r[x]==w){t[x]=s;for(var E=x-1;E>=0&&r[E]==A;E--)t[E]=s}}(g,S,g.length,n);for(var E=0;E<x.length;x[E]=E,E++);for(r(2,S,x),r(1,S,x),E=0;E<x.length-1;E++)n[E]===v?S[E]=t.AN:S[E]===m&&(n[E]>_&&n[E]<k||n[E]===b||n[E]===L)?S[E]=t.ON_R:E>0&&"ل"===g[E-1]&&/\u0622|\u0623|\u0625|\u0627/.test(g[E])&&(S[E-1]=S[E]=t.R_H,E++);for(g[g.length-1]===t.DOT&&(S[g.length-1]=t.B),""===g[0]&&(S[0]=t.RLE),E=0;E<x.length;E++)C[E]=S[x[E]];return{logicalFromVisual:x,bidiLevels:C}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=o(e.charAt(r)),n||t[r]!=m&&t[r]!=_&&t[r]!=v||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("./lib/bidiutil"),i=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t]),t==o.length&&(this.line+=this.showInvisibles?n:r.DOT))}else this.line+=this.showInvisibles?n:r.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,i.stringRepeat(r.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!=0&&i++;for(var a=0;a<i;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&e>t&&o[i]%2==0&&(s+=this.charWidths[o[i]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f<i.length;f++)d=r.logicalFromVisual[f],n=i[f],(c=d>=a&&d<l)&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&f===i.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var p=0;p<o.length;p++)o[p].left+=this.rtlLineOffset;return o},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,i=this.bidiMap.bidiLevels,o=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!=0&&i[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2==0&&i[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2==0||!this.isRtlDir&&0===r&&i[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!=0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new s(r,0,n,this.session.getLine(n).length):new s(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=i[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var s=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),o=2e3,s=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,s=this.matchMappings[t]={defaultToken:"text"},a="g",l=[],c=0;c<n.length;c++){var u=n[c];if(u.defaultToken&&(s.defaultToken=u.defaultToken),u.caseInsensitive&&-1===a.indexOf("i")&&(a+="i"),u.unicode&&-1===a.indexOf("u")&&(a+="u"),null!=u.regex){r(u.regex,RegExp)&&(u.regex=u.regex.toString().slice(1,-1));var h=u.regex,d=new RegExp("(?:("+h+")|(.))").exec("a").length-2;Array.isArray(u.token)?1==u.token.length||1==d?u.token=u.token[0]:d-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:d-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(u.onMatch=d>1?this.$applyToken:u.token),d>1&&(/\\\d/.test(u.regex)?h=u.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,h=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||l.push(u)),s[o]=c,o+=d,i.push(h),u.onMatch||(u.onMatch=null)}}i.length||(s[0]=0,i.push("$")),l.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,s,a,l){return r?r="]"!=a:a?r=!0:s?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e})),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var r=t||"start",i=this.states[r];i||(r="start",i=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var f=s.defaultToken,p=null,m=l[0],g=a.lastIndex;if(g-m.length>u){var v=e.substring(u,g-m.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){f=(p=i[s[b]]).onMatch?p.onMatch(m,r,n,e):p.token,p.next&&(r="string"==typeof p.next?p.next:p.next(r,n),(i=this.states[r])||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),s=this.matchMappings[r],u=g,(a=this.regExps[r]).lastIndex=g),p.consumeLineEnd&&(u=g);break}if(m)if("string"==typeof f)p&&!1===p.merge||d.type!==f?(d.type&&c.push(d),d={type:f,value:m}):d.value+=m;else if(f)for(d.type&&c.push(d),d={type:null,value:""},b=0;b<f.length;b++)c.push(f[b]);if(u==e.length)break;if(u=g,h++>o){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=500),type:"overflow"};r="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=i.reportError}).call(s.prototype),t.Tokenizer=s})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,o){var s="function"==typeof e?(new e).getRules():e;if(i)for(var a=0;a<i.length;a++)i[a]=t+i[a];else for(var l in i=[],s)i.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,r=this.$rules;Object.keys(r).forEach((function i(o){var s=r[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),r[h]&&(h+=n++)),r[h]=u,l.next=h,i(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];var f="string"==typeof l?l:l.include;if(f&&(c=Array.isArray(f)?f.map((function(e){return r[e]})):r[f]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter((function(e){return!e.next}))),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var o=e[t].split(r||"|"),s=o.length;s--;){var a=o[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),i[a]=t}}),this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(r.prototype),t.Behaviour=r})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range,i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},p=function(e){this.add("braces","insertion",(function(t,n,i,o,s){var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(i);var u=i.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&i.getWrapBehavioursEnabled())return f(u,h,"{","}");if(p.isSaneInsertion(i,o))return/[\]\}\)]/.test(c[l.column])||i.inMultiSelectMode||e&&e.braces?(p.recordAutoInsert(i,o,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(i,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(i),"}"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&p.isAutoInsertedClosing(l,c,s))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(i);var m="";if(p.isMaybeInsertedClosing(l,c)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var g=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var v=this.$getIndent(o.getLine(g.row))}else{if(!m)return void p.clearMaybeInsertedClosing();v=this.$getIndent(c)}var b=v+o.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}p.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,r,i){if("("==i){d(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){d(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1)&&null!==r.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(d(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(e,t,n,r,i){if("["==i){d(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){d(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1)&&null!==r.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(d(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;d(n);var s=i,a=n.getSelectionRange(),l=r.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=r.doc.getLine(c.row),p=u.substring(c.column-1,c.column),m=u.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),w=!v||/string|escape/.test(v.type);if(m==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var _=r.$mode.tokenRe;_.lastIndex=0;var A=_.test(p);_.lastIndex=0;var x=_.test(p);if(A||x)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var C=u[c.column-2];if(p==s&&(C==s||_.test(C)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h,s=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==s))return i.end.column++,i}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(p,o),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,o=[],s=0;s<r.length;s+=2)o.push(i+=r[s]),r[s+1]&&o.push(45,i+=r[s+1]);t.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../config"),i=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),l=e("../lib/lang"),c=e("../token_iterator").TokenIterator,u=e("../range").Range,h=function(){this.HighlightRules=o};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=function(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)},o=t.doc,s=!0,a=!0,c=1/0,u=t.getTabSize(),h=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(g=this.lineCommentStart.map(l.escapeRegExp).join("|"),p=this.lineCommentStart[0]):(g=l.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart),g=new RegExp("^(\\s*)(?:"+g+") ?"),h=t.getUseSoftTabs(),y=function(e,t){var n=e.match(g);if(n){var r=n[1].length,i=n[0].length;f(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}};var d=p+" ",f=(b=function(e,t){s&&!/\S/.test(e)||(f(e,c,c)?o.insertInLine({row:t,column:c},d):o.insertInLine({row:t,column:c},p))},w=function(e,t){return g.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%u!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return u>2?r%u!=u-1:r%u==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,m=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(p)+")"),v=new RegExp("(?:"+l.escapeRegExp(m)+")\\s*$"),b=function(e,t){w(e,t)||s&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},m),o.insertInLine({row:t,column:c},p))},y=function(e,t){var n;(n=e.match(v))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&o.removeInLine(t,n[1].length,n[0].length)},w=function(e,n){if(g.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}var _=1/0;i((function(e,t){var n=e.search(/\S/);-1!==n?(n<c&&(c=n),a&&!w(e,t)&&(a=!1)):_>e.length&&(_=e.length)})),c==1/0&&(c=_,s=!1,a=!1),h&&c%u!=0&&(c=Math.floor(c/u)*u),i(a?y:b)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,s,a=(m=new c(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(i.start))){var f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;h=new u(f,p,f,p+i.start.length);break}a=m.stepBackward()}var m;for(a=(m=new c(t,r.row,r.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(i.end))){f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g,d=new u(f,p,f,p+i.end.length);break}a=m.stepForward()}d&&t.remove(d),h&&(t.remove(h),o=h.start.row,s=-i.start.length)}else s=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,o=r.$modes[i];o||(r.$modes[i]=o=new n),r.$modes[t]||(r.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],r=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var i=r[2][r[2].length-1];if(s=this.$modes[i])return s[e].apply(s,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=r.split(this.$embeds[o]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[o]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var i=t[r],o=0,s=i.length;o<s;o++)if("string"==typeof i[o].token)/keyword|support|storage/.test(i[o].token)&&n.push(i[o].regex);else if("object"==typeof i[o].token)for(var a=0,l=i[o].token.length;a<l;a++)/keyword|support|storage/.test(i[o].token[a])&&(r=i[o].regex.match(/\(.+?\)/g)[a],n.push(r.substr(1,r.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(h.prototype),t.Mode=h})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var s=[r,1].concat(t.lines);e.splice.apply(e,s),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var a=t.end.column,l=t.end.row;r===l?e[r]=o.substring(0,i)+o.substring(a):e.splice(r,l-r+1,o.substring(0,i)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){var e=function(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r};r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),s=(i?1:-1)*(t.end.column-t.start.column),a=t.start,l=i?a:t.end;return e(n,a,r)?{row:n.row,column:n.column}:e(l,n,!r)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,l=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new l(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return null==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,s=r?t+1:t,l=r?0:this.getLine(s).length,c=new a(i,o,s,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return r(e,a)||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,o=e.start.column,s=0,a=0;s<r;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(i+s,o),end:this.pos(i+a,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=i+s,e.start.column=o,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:e+n[o-1].length+r}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)i+=n[s].length+r;return i+e.column}}).call(c.prototype),t.Document=c})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,o=t;n.lines[t];)t++;var s=i.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),r=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&((u=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(e){return new i(c,e.offset,c,e.offset+e.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var d=u[h].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)},i=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(i=(r=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,r.start.row,r.start.column,o,a)&&e(r.placeholder,r.start.row,r.start.column,o)||0===i)return;a=!r.sameRow,o=r.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(-1==(r=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var s=(i=this.folds).indexOf(r);for(0===s&&(this.start.column+=n);s<i.length;s++){if((r=i[s]).start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(i),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(a,o.length-a);var c=new r(s,o);return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,i=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=r,this.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(e,s.end);if(!(a>0)){var l=r(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],o=1;o<n.length;o++){e=i,i=n[o];var s=r(e.end,i.start);s<0||(0!=s||e.isEmpty()||i.isEmpty())&&(r(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(o,1),t.push(i),i=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],s=r;s<i;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,o=this.ranges,s=0,a=o.length;s<a&&!((u=o[s]).end.row>=r);s++);if("insert"==e.action){for(var l=i-r,c=-t.column+n.column;s<a&&!((u=o[s]).start.row>r);s++)if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=r-i,c=t.column-n.column;s<a&&!((u=o[s]).start.row>i);s++)u.end.row<i&&(r<u.end.row||r==u.end.row&&t.column<u.end.column)?(u.end.row=r,u.end.column=t.column):u.end.row==i?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>i&&(u.end.row+=l),u.start.row<i&&(r<u.start.row||r==u.start.row&&t.column<u.start.column)?(u.start.row=r,u.start.column=t.column):u.start.row==i?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>i&&(u.start.row+=l);if(0!=l&&s<a)for(;s<a;s++){var u;(u=o[s]).start.row+=l,u.end.row+=l}}}).call(i.prototype),t.RangeList=i})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var r=function(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)},i=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},o=e("../range_list").RangeList,s=e("../lib/oop"),a=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(a,o),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new a(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,r(t.start,n),r(t.end,n);for(var i=e.start.row,o=e.start.column,s=0,a=-1;s<this.subFolds.length&&1==(a=this.subFolds[s].range.compare(i,o));s++);var l=this.subFolds[s],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}i=e.range.end.row,o=e.range.end.column;var u=s;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(i,o));u++);0==a&&u++;for(var h=this.subFolds.splice(s,u-s,e),d=0==a?h.length-1:h.length,f=c;f<d;f++)e.addSubFold(h[f]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){i(e.start,t),i(e.end,t)}(e,this.start)}}.call(a.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("./fold_line").FoldLine,s=e("./fold").Fold,a=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var s=i[o].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return i[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var s=r[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=r[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var i,o,s={end:{column:0}},a=0;a<r.folds.length;a++){var l=(o=r.folds[a]).range.compareEnd(e,t);if(-1==l){i=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return i||(i=this.getLine(o.start.row).substring(s.end.column)),-1==n?i.substring(0,t-s.end.column):1==n?i.substring(t-s.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?r-=t-a:r=0);break}s>=e&&(r-=a>=e?s-a:s-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,a=!1;r(e,s)?n=e:(n=new s(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var l=n.start.row,c=n.start.column,u=n.end.row,h=n.end.column,d=this.getFoldAt(l,c,1),f=this.getFoldAt(u,h,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(l,c)&&this.removeFold(d),f&&!f.range.isEnd(u,h)&&this.removeFold(f);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var m=0;m<i.length;m++){var g=i[m];if(u==g.start.row){g.addFold(n),a=!0;break}if(l==g.end.row){if(g.addFold(n),a=!0,!n.sameRow){var v=i[m+1];if(v&&v.start.row==u){g.merge(v);break}}break}if(u<=g.start.row)break}return a||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<r)){if(t==r){if(n<i)return;a=Math.max(i,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,r){var i,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,r):(i=this.doc.getLine(e)).substring(r||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new o(e,n)}))},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var o=this.getFoldsInRange(r);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var r=new a(this,e,t),o=r.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start");var l=new RegExp(s),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new a(this,e,t),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(e,t,n,r){null==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var o=e=e||0;o<t;o++)if(null==i[o]&&(i[o]=this.getFoldWidget(o)),"start"==i[o]&&(!r||r(o))){var s=this.getFoldWidgetRange(o);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r<n.length;r++){var i=n[r];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var s=this.getFoldWidgetRange(i);if(r||(r=s),s&&s.end.row>=e)break}i--}return{range:-1!==i&&s,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=i.fromPoints(e,a),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=i.fromPoints(a,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(r);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(r)),!s)return null;var a=new i(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new i(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=r?e.stepBackward():e.stepForward())&&("/>"===t.value?r=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,o=t.value,s=0,a=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(r=t.value))if("<"===n.value)s++;else if("</"===n.value&&--s<0){e.stepBackward();var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(!(t=e.stepForward())||">"!==t.value)return;var f=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else o===r&&"/>"===t.value&&--s<0&&(f=d=h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new i(l.end.row,l.end.column,l.end.row,l.end.column+1))}}while(t&&s>=0);if(a&&u&&h&&f&&l&&d)return{openTag:new i(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new i(h.start.row,h.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new i(s,a,s,l);e.stepForward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(r===t.value)if("<"===n.value){if(++o>0){var d=new i(s,a,s,l),f=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===t.value){for(var m=0,g=n;g;){if(-1!==g.type.indexOf("tag-name")&&g.value===r){o--;break}if("<"===g.value)break;g=e.stepBackward(),m++}for(var v=0;v<m;v++)e.stepForward()}}while(n&&o<=0);return f&&p&&c&&h&&d&&u?{openTag:new i(f.start.row,f.start.column,p.end.row,p.end.column),closeTag:new i(c.start.row,c.start.column,h.end.row,h.end.column),openTagName:d,closeTagName:u}:void 0}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,h=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++p.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((new c).getTokenizer(),this);var n=this;this.bgTokenizer.on("update",(function(e){n._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(t),s._signal("session",this),this.destroyed=!1};p.$uid=0,function(){var e=function(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)};r.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),i=0;if(null==t){var o=r.length-1;i=this.getLine(e).length}else for(o=0;o<r.length&&!((i+=r[o].value.length)>=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new u(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else i=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var s=t;s<n.length&&n.charAt(s).match(i);)s++;return new u(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=s.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]),void(t&&t());this.$modeId=r,s.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(void 0!==r.on){var i=this.onReloadTokenizer.bind(this);r.on("update",i)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){for(var n,r,i=function(e){return t?"insert"!==e.action:"insert"===e.action},o=0;o<e.length;o++){var s=e[o];s.start&&(n?i(s)?(r=s.start,-1==n.compare(r.row,r.column)&&n.setStart(r),r=s.end,1==n.compare(r.row,r.column)&&n.setEnd(r)):(r=s.start,-1==n.compare(r.row,r.column)&&(n=u.fromPoints(s.start,s.start))):n=i(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return n},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,r),i.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var s=0;s<r&&" "==o.charAt(s);++s);s<r&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var r=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else e=this.$clipRowToDocument(e),r=(t=this.$clipRowToDocument(t))-e+1;var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,a),s.length&&this.addFolds(s),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,s=i.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,r.column-i.column),m.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==m&&(h.merge(m),m=h),u=c.indexOf(m)+1}for(;u<c.length;u++)(m=c[u]).start.row>=i.row&&m.shiftRow(-a);s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;if(f.splice.apply(f,d),c=this.$foldData,u=0,m=this.getFoldLine(o)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(a),m.addRemoveChars(s,0,i.column-r.column)):-1==p&&(m.addRemoveChars(o,0,i.column-r.column),m.shiftRow(a)),u=c.indexOf(m)+1}for(;u<c.length;u++){var m;(m=c[u]).start.row>=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,r.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,r){var i,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=e;for(r=Math.min(r,s.length-1);u<=r;)(o=this.getFoldLine(u,o))?(i=[],o.walk(function(e,r,o,a){var l;if(null!=e){(l=this.$getDisplayTokens(e,i.length))[0]=t;for(var c=1;c<l.length;c++)l[c]=n}else l=this.$getDisplayTokens(s[r].substring(a,o),i.length);i=i.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(i,c,a),u=o.end.row+1):(i=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(i,c,a),u++)};var t=3,n=4;this.$computeWrapSplits=function(e,r,i){var o=function(t){for(var n=t-l,r=l;r<t;r++){var o=e[r];12!==o&&2!==o||(n-=1)}s.length||(f=function(){var t=0;if(0===d)return t;if(h)for(var n=0;n<e.length;n++){var r=e[n];if(10==r)t+=1;else{if(11!=r){if(12==r)continue;break}t+=i}}return u&&!1!==h&&(t+=i),Math.min(t,d)}(),s.indent=f),c+=n,s.push(c),l=t};if(0==e.length)return[];for(var s=[],a=e.length,l=0,c=0,u=this.$wrapAsCode,h=this.$indentedSoftWrap,d=r<=Math.max(2*i,8)||!1===h?0:Math.floor(r/2),f=0;a-l>r-f;){var p=l+r-f;if(e[p-1]>=10&&e[p]>=10)o(p);else if(e[p]!=t&&e[p]!=n){for(var m=Math.max(p-(r-(r>>2)),l-1);p>m&&e[p]<t;)p--;if(u){for(;p>m&&e[p]<t;)p--;for(;p>m&&9==e[p];)p--}else for(;p>m&&e[p]<10;)p--;p>m?o(++p):(2==e[p=l+r]&&p--,o(p-f))}else{for(;p!=l-1&&e[p]!=t;p--);if(p>l){o(p);continue}for(p=l+r;p<e.length&&e[p]==n;p++);if(p==e.length)break;o(p)}}return s},this.$getDisplayTokens=function(t,n){var r,i=[];n=n||0;for(var o=0;o<t.length;o++){var s=t.charCodeAt(o);if(9==s){r=this.getScreenTabSize(i.length+n),i.push(11);for(var a=1;a<r;a++)i.push(12)}else 32==s?i.push(10):s>39&&s<48||s>57&&s<64?i.push(9):s>=4352&&e(s)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(t,n,r){if(0==n)return[0,0];var i,o;for(null==n&&(n=1/0),r=r||0,o=0;o<t.length&&(9==(i=t.charCodeAt(o))?r+=this.getScreenTabSize(r):i>=4352&&e(i)?r+=2:r+=1,!(r>n));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var f=this.getLength()-1,p=this.getNextFoldLine(o),m=p?p.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>m&&(o=p.end.row+1,m=(p=this.getNextFoldLine(o,p))?p.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(p&&p.start.row<=o)r=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=e||o>f)return{row:f,column:this.getLine(f).length};r=this.getLine(o),p=null}var g=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(i=b[v],v>0&&b.length&&(g=b.indent,s=b[v-1]||b[b.length-1],r=r.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&s>=i&&(s=i-1),p?p.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a<e;){if(a>=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,e,t),o=d.start.row):(p=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;p.length>=g[v];)i++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,++r>i&&(r=t.end.row+1,i=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];var i,o;for(n||(n=1/0),r=r||0,o=0;o<t.length&&!((r+="\t"===(i=t.charAt(o))?this.getScreenTabSize(r):e.getCharacterWidth(i))>n);o++);return[r,o]})},this.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=e}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./lib/oop"),s=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,i,o){return r=new s(e,n,i,o),!(n==o&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start)&&(r=null,1))})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue e;var f=r[h],p=r[h+c-1],m=f.length-f.match(a[0])[0].length,g=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>m||(o.push(l=new s(h,m,h+c-1,g)),c>2&&(h=h+c-2))}}else for(var v=0;v<r.length;v++){var b=i.getMatchOffsets(r[v],a);for(d=0;d<b.length;d++){var y=b[d];o.push(new s(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,_=n.end.column;for(v=0,d=o.length-1;v<d&&o[v].start.column<w&&0==o[v].start.row;)v++;for(var A=n.end.row-n.start.row;v<d&&o[d].end.column>_&&o[d].end.row==A;)d--;for(o=o.slice(v,d+1),v=0,d=o.length;v<d;v++)o[v].start.row+=n.start.row,o[v].end.row+=n.start.row}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=r.exec(e);if(!i||i[0].length!=e.length)return null;if(t=e.replace(r,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(r(e.needle,RegExp))return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var o=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var s=new RegExp(n,o)}catch(e){s=!1}return e.re=s},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(e){return!1}return r},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=1==t.backwards,i=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[r?"end":"start"]:e.selection.getRange()),s.start&&(s=s[i!=r?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(r)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,i,o){var s=r?t-u+1:t;if(!(s<0||s+u>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!r&&l<i||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(r&&h>i))return!!o(s,l,s+u-1,h)||void 0}}};else h=r?function(t,r,i){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>r)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(i(t,h,t,h+(c=a[u])))return!0}}:function(t,r,i){var o,s,a=e.getLine(t);for(n.lastIndex=r;s=n.exec(a);){var l=s[0].length;if(i(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=function(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0},i=function(e,t){r.call(this,e,t),this.$singleCommand=!1},o=e("../lib/keys"),s=e("../lib/useragent"),a=o.KEY_MODS;i.prototype=r.prototype,function(){var e=function(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)};this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=e(n));var s=o[t];for(i=0;i<s.length;i++){var a=s[i];if(e(a)>r)break}s.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=o[n];if(o.FUNCTION_KEYS[r])n=o.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;i|=a}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=a[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,t.MultiHashHandler=i})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};r.inherits(s,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=function(e,t){return{win:e,mac:t}},i=e("../lib/lang"),o=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:r("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:r("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:r("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:r("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:r("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:r("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:r("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:r("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:r("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:r("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:r("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:r("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:r(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:r("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:r("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,r.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row===t&&r[o].end.column===n||i.push(new s(r[o].end.row,r[o].end.column,t,n))),0===o?0===r[o].start.row&&0===r[o].start.column||i.push(new s(0,0,r[o].start.row,r[o].start.column)):i.push(new s(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:r("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:r(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/lang"),l=e("./lib/useragent"),c=e("./keyboard/textinput").TextInput,u=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,f=e("./edit_session").EditSession,p=e("./search").Search,m=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,b=e("./commands/default_commands").commands,y=e("./config"),w=e("./token_iterator").TokenIterator,_=e("./clipboard"),A=function(e,t,n){this.$toDestroy=[];var r=e.getContainerElement();this.container=r,this.renderer=e,this.id="editor"+ ++A.$uid,this.commands=new v(l.isMac?"mac":"win",b),"object"==typeof document&&(this.textInput=new c(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new u(this),new h(this)),this.keyBinding=new d(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new f("")),y.resetOptions(this),n&&this.setOptions(n),y._signal("editor",this)};A.$uid=0,function(){o.implement(this,g),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,i);if(!o){var s=new w(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==m.comparePoints(o[0].end,o[1].start)?o=[m.fromPoints(o[0].start,o[1].end)]:0==m.comparePoints(o[0].start,o[1].end)&&(o=[m.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new m(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=i.substring(n-1,r+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),i=0;i<r.length;i++){var o=r[i];i&&r[i-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var s={text:e};return this._signal("copy",s),_.lineMode=!!n&&s.text,s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===_.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){r.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=!(2!=i.length||i[0]&&i[1]);if(i.length!=o.length||s)return this.commands.exec("insertstring",this,t);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||r.remove(l),r.insert(l.start,i[a])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=new m.fromPoints(i,i)).end.column+=e.length,this.session.remove(s));else{var s=this.getSelectionRange();i=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(i.row);if(i.column>a.search(/\S|$/)){var l=a.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,u=n.getState(i.row),h=(a=n.getLine(i.row),r.checkOutdent(u,a,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new m(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new m(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(u,a.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}h&&r.autoOutdent(u,n,i.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var i=this.getSelectionRange();e=i.start.row,t=i.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=r.getNextLineIndent(l,c,h)),o=n.getLine(d),u!==(s=r.$getIndent(o))&&(s.length>0&&(a=new m(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),r.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new m(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new m(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return u=this.$getSelectedRows(),void e.indentRows(u.first,u.last,"\t")}var r=e.getLine(t.start.row),i=t.start,o=e.getTabSize(),s=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=o-s%o,c=a.stringRepeat(" ",l);else{for(l=s%o;" "==r[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var i=new m(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new m(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-r-1;o<0&&(o=0);var s=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach((function(t,i){l=s+t.length,o>=s&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+r),c.selection.selectTo(e,l+r)),s=l}));for(var u,h=this.$toggleWordPairs,d=0;d<h.length;d++)for(var f=h[d],p=0;p<=1;p++){var m=+!p,g=n.match(new RegExp("^\\s?_?("+a.escapeRegExp(f[p])+")\\s?$","i"));g&&n.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(g[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(a.escapeRegExp(f[p]),"i"),(function(e){var t=f[m];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+f[m].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(u),u="")}},this.findLinkAt=function(e,t){var n,r,o=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),s=t;s<0&&(s=0);var a,l=0,c=0;try{for(var u=i(o),h=u.next();!h.done;h=u.next()){var d=h.value;if(c=l+d.length,s>=l&&s<=c&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var s=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,f=n.last;++u<c;){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(t&&p.first!=f)break;if(!t&&p.first>f+1)break;f=p.last}for(u--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new w(this.session,n.row,n.column),i=r.getCurrentToken(),o=0;i&&-1!==i.type.indexOf("tag-name")&&(i=r.stepBackward());var s=i||r.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h<s.value.length&&!c;h++)if(d[s.value[h]])switch(l=d[s.value[h]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[h]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===i.value&&o>1?u[s.value]++:"</"===i.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(i=s,o++,s=r.stepForward(),h=0)}while(s&&!c);if(a){var f,p;if("bracket"===a)(f=this.session.getBracketRange(n))||(p=(f=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+h-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+h-1)).start,(t||p.row===n.row&&Math.abs(p.column-n.column)<2)&&(f=this.session.getBracketRange(p)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(0===(f=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?p=(f=g.closeTag).start:(f=g.openTag,p=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?f.end:f.start))}p=p||f.start}(p=f&&f.cursor||p)&&(e?f&&t?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||r(e,RegExp)?t.needle=e:"object"==typeof e&&o.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",(function(){r=!0})),s=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(r=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(i.style.top=a+"px",i.style.left=o.left+"px",i.style.height=s.lineHeight+"px",i.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;y.loadModule("./ext/prompt",(function(i){i.prompt(r,e,t,n)}))}}.call(A.prototype),y.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),s.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),s.addCssClass(this.container,"ace_hasPlaceholder");var t=s.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var x={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=A})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(e){return{row:e.row,column:e.column}},i=function(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column},o=function(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(p(t.start,e.end)>=0)l(t,e,-1);else{if(!(p(t.start,e.start)<=0))return null;l(e,t,1)}else if(n&&!r)if(p(t.start,e.end)>=0)l(t,e,-1);else{if(!(p(t.end,e.start)<=0))return null;l(e,t,-1)}else if(!n&&r)if(p(t.start,e.start)>=0)l(t,e,1);else{if(!(p(t.start,e.start)<=0))return null;l(e,t,1)}else if(!n&&!r)if(p(t.start,e.start)>=0)l(t,e,1);else{if(!(p(t.end,e.start)<=0))return null;l(e,t,-1)}return[t,e]},s=function(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!o(e[n],t[r])){for(;n<e.length;){for(;r--;)o(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]},a=function(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)p(e.start,t.start)<0?l(t,e,1):l(e,t,1);else if(n&&!r)p(e.start,t.end)>=0?l(e,t,-1):(p(e.start,t.start)<=0||l(e,f.fromPoints(t.start,e.start),-1),l(t,e,1));else if(!n&&r)p(t.start,e.end)>=0?l(t,e,-1):(p(t.start,e.start)<=0||l(t,f.fromPoints(e.start,t.start),-1),l(e,t,1));else if(!n&&!r)if(p(t.start,e.end)>=0)l(t,e,-1);else{var i,o;if(!(p(t.end,e.start)<=0))return p(e.start,t.start)<0&&(i=e,e=u(e,t.start)),p(e.end,t.end)>0&&(o=u(e,t.end)),c(t.end,e.start,e.end,-1),o&&!i&&(e.lines=o.lines,e.start=o.start,e.end=o.end,o=e),[t,i,o].filter(Boolean);l(e,t,-1)}return[t,e]},l=function(e,t,n){c(e.start,t.start,t.end,n),c(e.end,t.start,t.end,n)},c=function(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)},u=function(e,t){var n=e.lines,i=e.end;e.end=r(t);var o=e.end.row-e.start.row,s=n.splice(o,n.length),a=o?t.column:t.column-e.start.column;return n.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:r(t),end:i,lines:s,action:e.action}},h=function(e,t){t=function(e){return{start:r(e.start),end:r(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],o=0;o<i.length;o++){var s=i[o],l=a(s,t);t=l[0],2!=l.length&&(l[2]?(i.splice(o+1,1,l[1],l[2]),o++):l[1]||(i.splice(o,1),o--))}i.length||e.splice(n,1)}return e},d=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var r=this.$undoStack.length;r>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,i=0,o=n.length;o--;){var s=n[o][0];if(s.id<t&&!r&&(r=o+1),s.id<=e){i=o+1;break}}return n.slice(i,r)},this.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},this.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},this.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=s(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),i=null;return r&&(i=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i}},this.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)h(e,r[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},this.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?m(e):m(this.$undoStack)+"\n---\n"+m(this.$redoStack)}}).call(d.prototype);var f=e("./range").Range,p=f.comparePoints;function m(e){if(e=e||this,Array.isArray(e))return e.map(m).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(i).join("\n"):i(e.value)),e.start&&(t+=i(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}f.comparePoints,t.UndoManager=d})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){r.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,n,i){var o=this.cellCache.pop();if(!o){var s=r.createElement("div");i&&i(s),this.element.appendChild(s),o={element:s,text:"",row:e}}return o.row=e,o}}).call(i.prototype),t.Lines=i})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(e,t,n){"use strict";var r=function(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");return e.appendChild(n),e},i=e("../lib/dom"),o=e("../lib/oop"),s=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,l=e("./lines").Lines,c=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1};(function(){o.implement(this,a),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var o=n.text;o=o?s.escapeHTML(o):n.html||"",-1===i.text.indexOf(o)&&i.text.push(o);var a=n.type,l=n.className;l?i.className=l:"error"==a?i.className=" ace_error":"warning"==a&&" ace_error"!=i.className?i.className=" ace_warning":"info"!=a||i.className||(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},this.update=function(e){this.config=e;var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var o=t.getNextFoldLine(n),s=o?o.start.row:1/0,a=null,l=-1,c=n;;){if(c>s&&(c=o.end.row+1,s=(o=t.getNextFoldLine(c,o))?o.start.row:1/0),c>i){for(;this.$lines.getLength()>l+1;)this.$lines.pop();break}(a=this.$lines.get(++l))?a.row=c:(a=this.$lines.createCell(c,e,this.session,r),this.$lines.push(a)),this.$renderCell(a,e,o,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session,r);this.$renderCell(l,e,s,o),i.push(l),o++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,h=s.$decorations,d=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[r]&&(m+=u[r]),h[r]&&(m+=h[r]),this.$annotations[r]&&(m+=this.$annotations[r].className),o.className!=m&&(o.className=m),f){var g=f[r];null==g&&(g=f[r]=s.getFoldWidget(r))}if(g){m="ace_fold-widget ace_"+g,"start"==g&&r==p&&r<n.end.row?m+=" ace_closed":m+=" ace_open",l.className!=m&&(l.className=m);var v=t.lineHeight+"px";i.setStyle(l.style,"height",v),i.setStyle(l.style,"display","inline-block")}else l&&i.setStyle(l.style,"display","none");var b=(d?d.getText(s,r):r+c).toString();return b!==a.data&&(a.data=b),i.setStyle(e.element.style,"height",this.$lines.computeLineHeight(r,t,s)+"px"),i.setStyle(e.element.style,"top",this.$lines.computeLineTop(r,t,s)+"px"),e.text=b,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(c.prototype),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),s=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,s,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,o){for(var s=this.session,a=t.start.row,l=t.end.row,c=a,u=0,h=0,d=s.getScreenLastRowColumn(c),f=new r(c,t.start.column,c,h);c<=l;c++)f.start.row=f.end.row=c,f.start.column=c==a?t.start.column:s.getRowWrapIndent(c),f.end.column=d,u=h,h=d,d=c+1<l?s.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,f,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(u<h?2:0)|(h>d?4:0)|(c==l?8:0)),i,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,s=r.lineHeight,a=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(i||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",r,null,i)}else{a=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(i||""))}if(!((s=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){a=this.$getTop(t.start.row+1,r);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(i||""))}},this.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var s=r.lineHeight,a=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var s=r.lineHeight,a=this.$getTop(t.start.row,r),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+e.width+(i||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){r.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.MAX_CHUNK_LENGTH=250,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(r)):t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,i="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):a;(r=this.dom.createElement("span")).className=i+s,r.textContent=a,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className=i+l,r.textContent=c,this.$tabStrings["\t"]=r}},this.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<r;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(r)){r=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=r,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>i);){var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;s<this.$lines.cells.length;){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var r=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderTokenInChunks=function(e,t,n,r){for(var i,o=0;o<r.length;o+=this.MAX_CHUNK_LENGTH){var s=r.substring(o,o+this.MAX_CHUNK_LENGTH),a={type:n.type,value:s};i=this.$renderToken(e,t+o,a,s)}return i},this.$renderToken=function(e,t,n,r){for(var i,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;i=a.exec(r);){var u=i[1],h=i[2],d=i[3],f=i[4],p=i[5];if(s.showSpaces||!h){var m=c!=i.index?r.slice(c,i.index):"";if(c=i.index+i[0].length,m&&l.appendChild(this.dom.createTextNode(m,this.element)),u){var g=s.session.getScreenTabSize(t+i.index);l.appendChild(s.$tabStrings[g].cloneNode(!0)),t+=g-1}else h?s.showSpaces?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(s.SPACE_CHAR,h.length),l.appendChild(v)):l.appendChild(this.com.createTextNode(h,this.element)):d?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(v)):f?(t+=1,(v=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",v.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(v)):p&&(t+=1,(v=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",v.className="ace_cjk",v.textContent=p,l.appendChild(v))}}l.appendChild(this.dom.createTextNode(c?r.slice(c):r,this.element));var v=this.dom.createElement("span");if(!this.$textToken[n.type]){var b="ace_"+n.type.replace(/\./g," ace_");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=b}return v.appendChild(l),e.appendChild(v),t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o<i;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if("\t"==t[0]){for(o=0;o<r;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},this.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight)for(var i=this.session.$bracketHighlight.ranges,o=0;o<i.length;o++)if(t.row!==i[o].start.row){this.$highlightIndentGuideMarker.end=i[o].start.row,t.row>i[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o<e.length;o++){var s=e[o],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=o,a<=n))break}this.$renderHighlightIndentGuide()}}},this.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t].element.childNodes;if(n.length>0)for(var r=0;r<n.length;r++)if(n[r].classList&&n[r].classList.contains("ace_indent-guide-active")){n[r].classList.remove("ace_indent-guide-active");break}}},this.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element.childNodes;if(n){var r=n[t-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},this.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(n=e.length-1;n>=0;n--)if(r=e[n],this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,n){var r=0,i=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(r=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;r-=h.length}if(r+h.length<s)a=this.$renderTokenInChunks(l,a,u,h),r+=h.length;else{for(;r+h.length>=s;)a=this.$renderTokenInChunks(l,a,u,h.substring(0,s-r)),h=h.substring(s-r),r=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++i]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,a=this.$renderTokenInChunks(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var i=t[r],o=i.value;if(0!=r||!this.displayIndentGuides||(o=this.renderIndentGuide(e,o))){if(n+o.length>this.MAX_LINE_LENGTH)return void this.$renderOverflowMessage(e,n,i,o);n=this.$renderTokenInChunks(e,n,i,o)}}},this.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderTokenInChunks(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"<hide>":"<click to see more...>",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);o&&o.length?(this.$renderWrappedLine(e,r,o),i=e.lastChild):(i=e,this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r))}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[],i=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?r.push({type:"fold",value:e}):(a&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,++i==e.length)return;for(o!=t&&((s=e[i].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),r.push({type:e[i].type,value:s}),o=t+s.length,i+=1);o<n&&i<e.length;){var s;(s=e[i].value).length+o>n?r.push({type:e[i].type,value:s.substring(0,n-o)}):r.push(e[i]),o+=s.length,i+=1}}(i,s,o))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var o=t.length;n<o;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[i++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(r.setStyle(l,"display","block"),r.translate(a,s.left,s.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var u=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=u,t.VScrollBar=c,t.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;i.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=i.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){r.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};r.inherits(l,a),function(){this.classSuffix="-v",r.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientY,i=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){r=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==r){var e=n.scrollTopFromThumbTop(s+r-i);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};r.inherits(c,a),function(){this.classSuffix="-h",r.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientX,i=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){r=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==r){var e=n.scrollLeftFromThumbLeft(s+r-i);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,h=t.FontMetrics=function(e,t){this.charCount=t||250,this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",this.charCount),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t=(e=e||this.$measureNode).getBoundingClientRect(),n={height:t.height,width:t.width/this.charCount};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,this.charCount),this.$main.getBoundingClientRect().width/this.charCount},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){var n=function(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]},r=function(e,t){return[e[0]-t[0],e[1]-t[1]]},i=function(e,t){return[e[0]+t[0],e[1]+t[1]]},o=function(e,t){return[e*t[0],e*t[1]]},s=function(e){var t=e.getBoundingClientRect();return[t.left,t.top]};e&&(e=o(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(r(h,l),r(h,c),r(i(l,c),i(h,a))),f=o(1+d[0],r(l,a)),p=o(1+d[1],r(c,a));if(t){var m=t,g=d[0]*m[0]/u+d[1]*m[1]/u+1,v=i(o(m[0],f),o(m[1],p));return i(o(1/g/u,v),a)}var b=r(e,a),y=n(r(f,o(d[0],b)),r(p,o(d[1],b)),b);return o(u,y)}}).call(h.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,n){n.exports='/*\nstyles = []\nfor (var i = 1; i < 16; i++) {\n styles.push(".ace_br" + i + "{" + (\n ["top-left", "top-right", "bottom-right", "bottom-left"]\n ).map(function(x, j) {\n return i & (1<<j) ? "border-" + x + "-radius: 3px;" : "" \n }).filter(Boolean).join(" ") + "}")\n}\nstyles.join("\\n")\n*/\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left {\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n}\n\n.ace_gutter-cell {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=r.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){i.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight);var n=this.canvas.getContext("2d"),r=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),r){var i={info:1,warning:2,error:3};r.forEach((function(e){e.priority=i[e.type]||null})),r=r.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;s<r.length;s++){var a=r[s].row,l=this.compensateFoldRows(a,o),c=Math.round((a-l)*this.lineHeight*this.heightRatio),u=Math.round((a-l)*this.lineHeight*this.heightRatio),h=Math.round(((a-l)*this.lineHeight+this.lineHeight)*this.heightRatio);if(h-u<this.minDecorationHeight){var d=(u+h)/2|0;d<this.halfMinDecorationHeight?d=this.halfMinDecorationHeight:d+this.halfMinDecorationHeight>this.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(d-this.halfMinDecorationHeight),h=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[r[s].type]||null,n.fillRect(0,c,this.canvasWidth,h-u)}}var f=this.renderer.session.selection.getCursor();f&&(l=this.compensateFoldRows(f.row,o),c=Math.round((f.row-l)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2))},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var r=0;r<t.length;r++)e>t[r].start.row&&e<t[r].end.row?n+=e-t[r].start.row:e>=t[r].end.row&&(n+=t[r].end.row-t[r].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),b=e("./layer/decorators").Decorator,y=e("./lib/useragent"),w=y.isIE;i.importCssString(v,"ace_editor.css",!1);var _=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new l(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container,this.$textLayer.MAX_CHUNK_LENGTH),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!y.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(r&&(e||s.height!=r)&&(s.height=r,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!r,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,o=n.top,s=n.left;o-=r.offset;var a=t&&t.useTextareaForIME?this.lineHeight:w?0:1;if(o<0||o>r.height-a)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",a+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),f=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+p,m=this.scrollTop-f*y;var _=0;return(this.layerConfig.width!=i||s)&&(_=this.CHANGE_H_SCROLL),(s||d)&&(_|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),_},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n,r,i=0,o=this.STEPS,s=[];for(i=0;i<o;++i)s.push((n=i/this.STEPS,r=e,(t-e)*(Math.pow(n-1,3)+1)+r));return s},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=function(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,t&&t()},r=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=r){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0])==r)return}var s=i.$calcSteps(e,r);this.$scrollAnimation={from:e,to:r,steps:s},clearInterval(this.$timer),i.session.setScrollTop(s.shift()),i.session.$scrollTop=r,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(s.length?(i.session.setScrollTop(s.shift()),i.session.$scrollTop=r):null!=r?(i.session.$scrollTop=-1,i.session.setScrollTop(r),r=null):n()):clearInterval(i.$timer);n()}),10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=i.getTokens(n);if(null==r)s.push(o);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(r<=(a+=c.value.length)){var u=c.value.length-(a-r),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:d});break}}this.updateLines(n,n)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(e,t){var n=function(n){if(r.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");n.$id&&(r.$themeId=n.$id),i.importCssString(n.cssText,n.cssClass,r.container),r.theme&&i.removeCssClass(r.container,r.theme.cssClass);var o="padding"in n?n.padding:"padding"in(r.theme||{})?4:r.$padding;r.$padding&&o!=r.$padding&&r.setPadding(o),r.$theme=n.cssClass,r.theme=n,i.addCssClass(r.container,n.cssClass),i.setCssClass(r.container,"ace_dark",n.isDark),r.$size&&(r.$size.width=0,r.$updateSizeAsync()),r._dispatchEvent("themeLoaded",{theme:n}),t&&t()},r=this;if(this.$themeId=e,r._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var s=e||this.$options.theme.initialValue;o.loadModule(["theme",s],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){i.importCssString(v,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""},this.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))}}).call(_.prototype),o.defineOptions(_.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),t.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var r=function(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)},i=e("../lib/oop"),o=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config"),l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,s),this.$createWorkerFromOldConfig=function(t,n,i,o,s){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=r(o),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var r=null,i=!1,o=Object.create(s),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(h):h())}});u.setEmitSync=function(e){i=e};var h=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&o._signal(e.event,e.data)};return o.postMessage=function(e){u.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](o);c.length;)h()})),u},t.WorkerClient=l,t.createWorker=r})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,r,i,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o},this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var r=function(e,t){return e.row==t.row&&e.column==t.column},i=e("../lib/event"),o=e("../lib/useragent");t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&o.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h=e.editor,d=h.selection,f=h.inMultiSelectMode,p=e.getDocumentPosition(),m=d.getCursor(),g=e.inSelection()||d.isEmpty()&&r(p,m),v=e.x,b=e.y,y=h.session,w=h.renderer.pixelToScreenCoordinates(v,b),_=w;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!f&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&o.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!f&&g)return;if(!f){var A=d.toOrientedRange();h.addSelectionMarker(A)}var x=d.rangeList.rangeAtPoint(p);h.inVirtualSelectionMode=!0,s&&(x=null,A=d.ranges[0]||A,h.removeSelectionMarker(A)),h.once("mouseup",(function(){var e=d.toOrientedRange();x&&e.isEmpty()&&r(x.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(A.cursor):A&&(h.removeSelectionMarker(A),d.addRange(A)),d.addRange(e)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var C;e.stop(),h.inVirtualSelectionMode=!0;var S=[],E=function(){var e=h.renderer.pixelToScreenCoordinates(v,b),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);r(_,e)&&r(t,d.lead)||(_=e,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(S),S=d.rectangularRangeBlock(_,w),h.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=h.$mouseHandler.$clickSelection.clone()),S.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};f&&!l?d.toSingleRange():!f&&l&&(C=d.toOrientedRange(),h.addSelectionMarker(C)),s?w=y.documentToScreenPosition(d.lead):d.moveToPosition(p),_={row:-1,column:-1};var k=E;i.capture(h.container,(function(e){v=e.clientX,b=e.clientY}),(function(e){E(),clearInterval($),h.removeSelectionMarkers(S),S.length||(S=[d.toOrientedRange()]),C&&(h.removeSelectionMarker(C),d.toSingleRange(C));for(var t=0;t<S.length;t++)d.addRange(S[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null}));var $=setInterval((function(){k()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=function(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",l),e.commands.addCommands(h.defaultCommands),i(e))},i=function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;c.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),c.addListener(t,"keyup",r,e),c.addListener(t,"blur",r,e)}function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}},o=e("./range_list").RangeList,s=e("./range").Range,a=e("./selection").Selection,l=e("./mouse/multi_select_handler").onMouseDown,c=e("./lib/event"),u=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=new(0,e("./search").Search),f=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var r=e[n],i=r.start.row,o=r.end.row;if(i===o)t.push(r.clone());else{for(t.push(new s(i,r.start.column,i,this.session.getLine(i).length));++i<o;)t.push(this.getLineRange(i,!0));t.push(new s(o,0,o,r.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column<t.column;if(i)var o=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else o=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,h,d,f=e.row<t.row;if(f)var p=e.row,m=t.row;else p=t.row,m=e.row;o<0&&(o=0),p<0&&(p=0),p==m&&(n=!0);for(var g=p;g<=m;g++){var v=s.fromPoints(this.session.screenToDocumentPosition(g,o,l),this.session.screenToDocumentPosition(g,a,c));if(v.isEmpty()){if(u&&(d=u,(h=v.end).row==d.row&&h.column==d.column))break;u=v.end}v.cursor=i?v.start:v.end,r.push(v)}if(f&&r.reverse(),!n){for(var b=r.length-1;r[b].isEmpty()&&b>0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var w=b;w>=y;w--)r[w].isEmpty()&&r.splice(w,1)}return r}}.call(a.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,o=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,u=(i?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new a(s);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(o)for(;f>0&&u[f].start.row==u[f-1].end.row;)f--;d.fromOrientedRange(u[f]),d.index=f,this.selection=s.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),d.toOrientedRange(u[f])}d.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var s=i.length;s--;)o.addRange(i[s],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,i=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(i.column=this.selection.$desiredColumn);var o,a=this.session.screenToDocumentPosition(i.row+e,i.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(r?(o=s.fromPoints(a,c)).cursor=o.start:(o=s.fromPoints(c,a)).cursor=o.end,o.desiredColumn=i.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(o),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;)if((a=r[i]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}n.mergeOverlappingRanges();var s=[];for(i=r.length;i--;){var a=r[i];s.unshift(t.getTextRange(a))}for(e<0?s.unshift(s.pop()):s.push(s.shift()),i=r.length;i--;)o=(a=r[i]).clone(),t.replace(a,s[i]),a.start.row=o.start.row,a.start.column=o.start.column;n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=r.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var o=r.getTextRange(i),s=function(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=-1==n,d.find(e)}(r,o,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,i=n.filter((function(e){if(e.cursor.row==r)return!0;r=e.cursor.row}));if(n.length&&i.length!=n.length-1){i.forEach((function(e){t.substractPoint(e.cursor)}));var o=0,a=1/0,l=n.map((function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>o&&(o=n.column),r<a&&(a=r),r}));n.forEach((function(t,n){var r=t.cursor,i=o-r.column,c=l[n]-a;i>c?e.insert(r,u.stringRepeat(" ",i-c)):e.remove(new s(r.row,r.column,r.row,r.column-i+c)),t.start.column=t.end.column=o,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),h=c.start.row,d=c.end.row,f=h==d;if(f){var p,m=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<m);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(h,d);g=this.$reAlignText(g,f),this.session.insert({row:h,column:0},g.join("\n")+"\n"),f||(c.start.column=0,c.end.column=g[g.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){var n,r,i,o=function(e){return u.stringRepeat(" ",e)},s=function(e){return e[2]?o(n)+e[2]+o(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]},a=!0,l=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(l=!1),n!=t[1].length&&(a=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]})).map(t?s:a?l?function(e){return e[2]?o(n+r-e[2].length)+e[2]+o(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:s:function(e){return e[2]?o(n)+e[2]+o(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(p.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=r,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){r(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",l)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",l))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),s=o.search(i);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(i);if(-1!=h){if(h<=s){var d=e.getTokenAt(t,0);if(!d||"string"!==d.type)break}u=t}}if(u>c){var f=e.getLine(u).length;return new r(c,a,u,f)}}},this.openingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),r.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,r.fromPoints(a,s)}}).call(i.prototype)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=function(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)},i=e("./lib/dom");(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,s="add"==e.action,a=i+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[i]?n[o].hidden=s:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var o=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/r.characterWidth));var a=s.h/r.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<i&&(i=s.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=i;s<=o;s++){var a=r[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,s=n(t,e[o]);if(s>0)r=o+1;else{if(!(s<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var s=r[i];if(s&&n){if(s.row===t){do{s=r[i+=n]}while(s&&s.row===t);if(!s)return r.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=r[i+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},f=d.el.appendChild(i.createElement("div")),p=d.el.appendChild(i.createElement("div"));p.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("<br>"),f.appendChild(i.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},i.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),o=e("./lib/event"),s=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var s=e;if(!(e=document.getElementById(s)))throw new Error("ace.edit can't find div #"+s)}if(e&&e.env&&r(e.env.editor,a))return e.env.editor;var l="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;l=c.value,e=i.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(l=e.textContent,e.innerHTML="");var h=t.createEditSession(l),d=new a(new u(e),h,n),f={document:h,editor:d,onResize:d.resize.bind(d,null)};return c&&(f.textarea=c),o.addListener(window,"resize",f.onResize),d.on("destroy",(function(){o.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=s,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))},6655:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var r=function(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t},i=e("./lib/dom"),o=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),l=e("./range").Range,c=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,d=e("./clipboard"),f={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return d.getText&&d.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:r.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:r.bind(null,{year:"2-digit"}),CURRENT_MONTH:r.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:r.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:r.bind(null,{month:"short"}),CURRENT_DATE:r.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:r.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:r.bind(null,{weekday:"short"}),CURRENT_HOUR:r.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:r.bind(null,{minute:"2-digit"}),CURRENT_SECOND:r.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){o.implement(this,s),this.getTokenizer=function(){return p.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){var e=function(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]},t=function(e){return"(?:[^\\\\"+e+"]|\\\\.)"},n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return p.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return("}"==r&&n.length||-1!="`$\\".indexOf(r))&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1));return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=r,[r[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return"}"==r&&n.length||-1!="`$\\".indexOf(r)?e=r:"n"==r?e="\n":"t"==r?e="\t":-1!="ulULE".indexOf(r)&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return"function"==typeof r&&(r=this.variables[t](e,t,n)),null==r?"":r},this.variables=f,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(i,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(o,n),r="E",i=0;i<t.length;i++){var a=t[i];if("object"==typeof a)if(t[i]="",a.changeCase&&a.local){var l=t[i+1];l&&"string"==typeof l&&("u"==a.changeCase?t[i]=l[0].toUpperCase():t[i]=l[0].toLowerCase(),t[i+1]=l.substr(1))}else a.changeCase&&(r=a.changeCase);else"U"==r?t[i]=a.toUpperCase():"L"==r&&(t[i]=a.toLowerCase())}return s.variables.__=e,t.join("")}));return a},this.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},this.resolveVariables=function(e,t){for(var n=function(t){var n=e.indexOf(t,s+1);-1!=n&&(s=n)},r=[],i="",o=!0,s=0;s<e.length;s++){var a=e[s];if("string"!=typeof a){if(a){if(o=!1,a.fmtString){var l=e.indexOf(a,s+1);-1==l&&(l=e.length),a.fmt=e.slice(s+1,l),s=l}if(a.text){var c=this.getVariableValue(t,a.text,i)+"";a.fmtString&&(c=this.tmStrFormat(c,a,t)),a.formatFunction&&(c=this.tmFormatFunction(c,a,t)),c&&!a.ifEnd?(r.push(c),n(a)):!c&&a.ifEnd&&n(a.ifEnd)}else a.elseEnd?n(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&r.push(a)}}else r.push(a),"\n"==a?(o=!0,i=""):o&&(i=/^\t*/.exec(a)[0],o=/\S/.test(a))}return r},this.insertSnippetForSelection=function(e,t){var n=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if("object"==typeof r){if(c[r.tabstopId])continue;r=t[e.lastIndexOf(r,n-1)]||{tabstopId:r.tabstopId}}t[n]=r}return t},r=e.getCursorPosition(),i=e.session.getLine(r.row),o=e.session.getTabString(),s=i.match(/^\s*/)[0];r.column<s.length&&(s=s.slice(0,r.column)),t=t.replace(/\r/g,"");var a=this.tokenizeTmSnippet(t);a=(a=this.resolveVariables(a,e)).map((function(e){return"\n"==e?e+s:"string"==typeof e?e.replace(/\t/g,o):e}));var l=[];a.forEach((function(e,t){if("object"==typeof e){var n=e.tabstopId,r=l[n];if(r||((r=l[n]=[]).index=n,r.value="",r.parents={}),-1===r.indexOf(e)){e.choices&&!r.choices&&(r.choices=e.choices),r.push(e);var i=a.indexOf(e,t+1);if(-1!==i){var o=a.slice(t+1,i);o.some((function(e){return"object"==typeof e}))&&!r.value?r.value=o:!o.length||r.value&&"string"==typeof r.value||(r.value=o.join(""))}}}})),l.forEach((function(e){e.length=0}));for(var c={},u=0;u<a.length;u++){var h=a[u];if("object"==typeof h){var d=h.tabstopId,f=l[d],p=a.indexOf(h,u+1);if(c[d])c[d]===h&&(delete c[d],Object.keys(c).forEach((function(e){f.parents[e]=!0})));else{c[d]=h;var g=f.value;"string"!=typeof g?g=n(g):h.fmt&&(g=this.tmStrFormat(g,h,e)),a.splice.apply(a,[u+1,Math.max(0,p-u)].concat(g,h)),-1===f.indexOf(h)&&f.push(h)}}}var v=0,b=0,y="";a.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(b=t[t.length-1].length,v+=t.length-1):b+=e.length,y+=e}else e&&(e.start?e.end={row:v,column:b}:e.start={row:v,column:b})}));var w=e.getSelectionRange(),_=e.session.replace(w,y),A=new m(e),x=e.inVirtualSelectionMode&&e.selection.index;A.addTabstops(l,w.start,_,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);"object"==typeof r&&(r=r[0]),r.substring&&("js-"==r.substring(0,3)?t="javascript":"css-"==r.substring(0,4)?t="css":"php-"==r.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n,r=e.getCursorPosition(),i=e.session.getLine(r.row),o=i.substring(0,r.column),s=i.substr(r.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(r.row,r.column-n.replaceBefore.length,r.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(n))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=function(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""},r=function(e,t,r){return e=n(e),t=n(t),r?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)},i=function(e){e.scope||(e.scope=t||"_"),t=e.scope,o[t]||(o[t]=[],s[t]={});var n=s[t];if(e.name){var i=n[e.name];i&&l.unregister(i),n[e.name]=e}o[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=a.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=r(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=r(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))},o=this.snippetMap,s=this.snippetNameMap,l=this;e||(e=[]),Array.isArray(e)?e.forEach(i):Object.keys(e).forEach((function(t){i(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=function(e){var n=i[e.scope||t];if(n&&n[e.name]){delete n[e.name];var o=r[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}},r=this.snippetMap,i=this.snippetNameMap;e.content?n(e):Array.isArray(e)&&e.forEach(n)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],r={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{r=JSON.parse(t[1]),n.push(r)}catch(e){}if(t[4])r.content=t[4].replace(/^\t/gm,""),n.push(r),r={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;r.guard=a.exec(s)[1],r.trigger=a.exec(s)[1],r.endTrigger=a.exec(s)[1],r.endGuard=a.exec(s)[1]}else"snippet"==o?(r.tabTrigger=s.match(/^\S*/)[0],r.name||(r.name=s)):o&&(r[o]=s)}}return n},this.getSnippetByName=function(e,t){var n,r=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var i=r[t];return i&&(n=i[e]),!!n}),this),n}}).call(p.prototype);var m=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},r=n.parents||{},i=(this.tabstops||[]).slice(),o=0;o<i.length;o++){var s=i[o],a=s==n||r[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(e.end,l);u=u<0?-u-1:u-1;for(var h=s.rangeList.ranges.slice(c,u),d=0;d<h.length;d++)this.removeRange(h[d])}s.rangeList.$onChange(e)}var f=this.editor.session;this.$inChange||!t||1!=f.getLength()||f.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,r=n.getTextRange(e.firstNonLinked),i=0;i<e.length;i++){var o=e[i];if(o.linked){var s=o.original,a=t.snippetManager.tmStrFormat(r,s,this.editor);n.replace(o,a)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),r=0;r<this.ranges.length;r++)if(!this.ranges[r].linked){var i=this.ranges[r].contains(e.row,e.column),o=n||this.ranges[r].contains(t.row,t.column);if(i&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var r=this.editor.multiSelect;r.toSingleRange(n);for(var i=0;i<t.length;i++)t.hasLinkedRanges&&t[i].linked||r.addRange(t[i].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(e,t,n){var r=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=l.fromPoints(n,n);v(i.start,t),v(i.end,t),e[0]=[i],e[0].index=0}var o=[this.index+1,0],s=this.ranges;e.forEach((function(e,n){for(var i=this.$openTabstops[n]||e,a=0;a<e.length;a++){var u=e[a],h=l.fromPoints(u.start,u.end||u.start);g(h.start,t),g(h.end,t),h.original=u,h.tabstop=i,s.push(h),i!=e?i.unshift(h):i[a]=h,u.fmtString||i.firstNonLinked&&r?(h.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=h)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(o.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i),i.rangeList=i.rangeList||new c,i.rangeList.$bias=0,i.rangeList.addList(i)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new u,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}).call(m.prototype);var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new p;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,o=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new r(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}","autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=new c(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r,i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),h.start.row=h.end.row=t.row,e.stop()}));var u=new o(-1,0,-1,1/0),h=new o(-1,0,-1,1/0);h.id=n.session.addMarker(h,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(r){if(r.x!=e.x||r.y!=e.y){(r=e).scrollTop=n.renderer.scrollTop;var t=r.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),f(t))}}else r=e})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var e=r.getDocumentPosition().row;u.id||n.setRow(e),f(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow];r!==t.selectedNode&&t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=r,r&&l.addCssClass(r,"ace_selected")}));var d=function(){f(-1)},f=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",d),n.on("hide",d),n.on("changeSelection",d),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=function(e,t){e&&i.push({type:(r.className||"")+(t||""),value:e})},r=n.data[e],i=[];if(!r)return i;"string"==typeof r&&(r={value:r});for(var o=r.caption||r.value||r.name,s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(r.matchMask&1<<u||u==a.length)){var h=a.slice(c,u);c=u;var d=s.indexOf(h,l);if(-1==d)continue;t(o.slice(l,d),""),l=d+h.length,t(o.slice(d,l),"completion-highlight")}return t(o.slice(l,o.length),""),r.meta&&i.push({type:"completion-meta",value:r.meta}),r.message&&i.push({type:"completion-message",value:r.message}),i},p.$updateOnChange=i,p.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return h.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),h.start.row!=e&&(n.selection.clearSelection(),h.start.row=h.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,i){var o=this.container,s=window.innerHeight,a=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,u=e.top+this.$borderSize;u>s/2&&!i&&u+t+c>s?(l.$maxPixelHeight=u-2*this.$borderSize,o.style.top="",o.style.bottom=s-u+"px",n.isTopdown=!1):(u+=t,l.$maxPixelHeight=s-u-.2*t,o.style.top=u+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var h=e.left;h+o.offsetWidth>a&&(h=a-o.offsetWidth),o.style.left=h+"px",this._signal("show"),r=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=c})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,i=e.length;0===i&&n();for(var o=0;o<i;o++)t(e[o],(function(e,t){++r===i&&n(e,t)}))};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;for(var i=[],o=t-1;o>=0&&n.test(e[o]);o--)i.push(e[o]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;for(var i=[],o=t;o<e.length&&n.test(e[o]);o++)i.push(e[o]);return i},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),r=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(r,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(r,n.column)}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],(function(e,t,n){"use strict";var r=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,o=e("./autocomplete/util"),s=e("./lib/lang"),a=e("./lib/dom"),l=e("./snippets").snippetManager,c=e("./config"),u=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new i(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var r=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var i=r.layerConfig.lineHeight,o=r.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();o.top+=s.top-r.layerConfig.offset,o.left+=s.left-e.renderer.scrollLeft,o.left+=r.gutterWidth,this.popup.show(o,i)}this.changeTimer.cancel()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t==n||t.parentNode==i||r||t==this.tooltipNode||e.relatedTarget==n||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){this.popup.goTo(e)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;var n=this.completions;if(this.editor.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(!n)return!1;if(n.filterText)for(var r,i=this.editor.selection.getAllRanges(),o=0;r=i[o];o++)r.start.column-=n.filterText.length,this.editor.session.remove(r);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.completions==n&&this.detach(),this.editor.endOperation()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=o.getCompletionPrefix(e);this.base=n.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var s=[],a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,n,r,i,(function(n,r){!n&&r&&(s=s.concat(r)),t(null,{prefix:o.getCompletionPrefix(e),matches:s,finished:0==--a})}))})),!0},this.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},this.updateCompletions=function(e,t){if(e&&this.base&&this.completions){var n=this.editor.getCursorPosition(),r=this.editor.session.getTextRange({start:this.base,end:n});if(r==this.completions.filterText)return;return this.completions.setFilter(r),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=r||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,r,e):this.detach()}if(t&&t.matches)return n=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new h(t.matches),this.openPopup(this.editor,"",e);var i=this.gatherCompletionsId,o=function(e){if(e.finished)return this.detach()}.bind(this),s=function(t){var n=t.prefix,r=t.matches;this.completions=new h(r),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(n);var i=this.completions.filtered;return i.length&&(1!=i.length||i[0].value!=n||i[0].snippet)?this.autoInsert&&1==i.length&&t.finished?this.insertMatch(i[0]):void this.openPopup(this.editor,n,e):o(t)}.bind(this),a=!0,l=null;if(this.gatherCompletions(this.editor,function(e,t){var n=t.prefix,r=t&&t.matches;if(!r||!r.length)return o(t);0===n.indexOf(t.prefix)&&i==this.gatherCompletionsId&&(a?l=t:s(t))}.bind(this)),a=!1,l){var c=l;l=null,s(c)}},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(e){return e.getDocTooltip&&(r=e.getDocTooltip(n)),r})),r||"string"==typeof n||(r=n),"string"==typeof r&&(r={docText:r}),r&&(r.docHTML||r.docText)?void this.showDocTooltip(r):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,r=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,t.style.display="block",window.innerWidth-r.right<320?r.left<320?n.isTopdown?(t.style.top=r.bottom+"px",t.style.left=r.left+"px",t.style.right="",t.style.bottom=""):(t.style.top=n.container.offsetTop-t.offsetHeight+"px",t.style.left=r.left+"px",t.style.right="",t.style.bottom=""):(t.style.right=window.innerWidth-r.left+"px",t.style.left=""):(t.style.left=r.right+1+"px",t.style.right="")},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},this.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&this.editor.completer,this.popup=null}}).call(u.prototype),u.for=function(e){return e.completer||(c.get("sharedPopups")?(u.$shared||(u.$sharedInstance=new u),e.completer=u.$sharedInstance):(e.completer=new u,e.once("destroy",(function(e,t){t.completer.destroy()})))),e.completer},u.startCommand={name:"startAutocomplete",exec:function(e,t){var n=u.for(e);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var h=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.caption||o.value||o.snippet;if(a){var l,c,u=-1,h=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var f=a.toLowerCase().indexOf(i);if(f>-1)d=f;else for(var p=0;p<t.length;p++){var m=a.indexOf(i[p],u+1),g=a.indexOf(r[p],u+1);if((l=m>=0&&(g<0||m<g)?m:g)<0)continue e;(c=l-u-1)>0&&(-1===u&&(d+=10),d+=c,h|=1<<p),u=l}}o.matchMask=h,o.exactMatch=d?0:1,o.$score=(o.score||0)-d,n.push(o)}}return n}}).call(h.prototype),t.Autocomplete=u,t.FilteredList=h})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,o,s){var a=function(e,t){var n=function(e,t){return e.getTextRange(r.fromPoints({row:0,column:0},t)).split(i).length-1}(e,t),o=e.getValue().split(i),s=Object.create(null),a=o[n];return o.forEach((function(e,t){if(e&&e!==a){var r=Math.abs(n-t),i=o.length-r;s[e]?s[e]=Math.max(i,s[e]):s[e]=i}})),s}(t,n);s(null,Object.keys(a).map((function(e){return{caption:e,value:e,score:a[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,o=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),l=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var o=e.session.getState(n.row);i(null,t.$mode.getCompletions(o,t,n,r))}},u={getCompletions:function(e,t,n,i,o){var s=[],a=t.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=r.getActiveScopes(e);var l=r.snippetMap,c=[];s.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&c.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"⇥ ":"snippet",type:"snippet"})}}),this),o(null,c)},getDocTooltip:function(e){var t,n;"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,r,i){return n[t]=i||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))}},h=[u,l,c];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var d={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){p(t.session.$mode)},p=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(r.files||(r.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(p))},m=function(e,t){t&&e&&!r.files[e]&&(r.files[e]={},o.loadModule(t,(function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))})))},g=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&a.getCompletionPrefix(t)&&!n){var r=i.for(t);r.autoInsert=!1,r.showPopup(t)}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",g)):this.commands.removeListener("afterExec",g)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(d),this.off("changeMode",f))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},21947:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),o=e("./editor").Editor,s=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,l=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new s(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var r=this.$editors.some((function(t){return t.session===e}));return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var r=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=r+"px",e.container.style.top="0px",e.container.style.left=i*r+"px",e.container.style.height=n+"px",e.resize();else{var o=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}}).call(l.prototype),t.Split=l})),ace.define("ace/ext/split",["require","exports","module","ace/split"],(function(e,t,n){"use strict";n.exports=e("../split")})),ace.require(["ace/ext/split"],(function(t){e&&(e.exports=t)}))},87430:(e,t,n)=>{ace.config.setModuleUrl("ace/ext/beautify",n(2953)),ace.config.setModuleUrl("ace/ext/code_lens",n(65542)),ace.config.setModuleUrl("ace/ext/elastic_tabstops_lite",n(37220)),ace.config.setModuleUrl("ace/ext/emmet",n(7138)),ace.config.setModuleUrl("ace/ext/error_marker",n(52835)),ace.config.setModuleUrl("ace/ext/hardwrap",n(99756)),ace.config.setModuleUrl("ace/ext/keyboard_menu",n(78831)),ace.config.setModuleUrl("ace/ext/language_tools",n(10795)),ace.config.setModuleUrl("ace/ext/linking",n(43336)),ace.config.setModuleUrl("ace/ext/modelist",n(45706)),ace.config.setModuleUrl("ace/ext/options",n(17029)),ace.config.setModuleUrl("ace/ext/prompt",n(61607)),ace.config.setModuleUrl("ace/ext/rtl",n(43341)),ace.config.setModuleUrl("ace/ext/searchbox",n(91221)),ace.config.setModuleUrl("ace/ext/settings_menu",n(95567)),ace.config.setModuleUrl("ace/ext/spellcheck",n(36529)),ace.config.setModuleUrl("ace/ext/split",n(91786)),ace.config.setModuleUrl("ace/ext/static_highlight",n(34180)),ace.config.setModuleUrl("ace/ext/statusbar",n(19138)),ace.config.setModuleUrl("ace/ext/textarea",n(23824)),ace.config.setModuleUrl("ace/ext/themelist",n(35930)),ace.config.setModuleUrl("ace/ext/whitespace",n(86498)),ace.config.setModuleUrl("ace/keyboard/emacs",n(33431)),ace.config.setModuleUrl("ace/keyboard/sublime",n(33925)),ace.config.setModuleUrl("ace/keyboard/vim",n(15544)),ace.config.setModuleUrl("ace/keyboard/vscode",n(7566)),ace.config.setModuleUrl("ace/mode/abap",n(65733)),ace.config.setModuleUrl("ace/mode/abc",n(7284)),ace.config.setModuleUrl("ace/mode/actionscript",n(7384)),ace.config.setModuleUrl("ace/mode/ada",n(37479)),ace.config.setModuleUrl("ace/mode/alda",n(83823)),ace.config.setModuleUrl("ace/mode/apache_conf",n(36567)),ace.config.setModuleUrl("ace/mode/apex",n(34169)),ace.config.setModuleUrl("ace/mode/applescript",n(65105)),ace.config.setModuleUrl("ace/mode/aql",n(57381)),ace.config.setModuleUrl("ace/mode/asciidoc",n(20948)),ace.config.setModuleUrl("ace/mode/asl",n(27815)),ace.config.setModuleUrl("ace/mode/assembly_x86",n(31409)),ace.config.setModuleUrl("ace/mode/autohotkey",n(51751)),ace.config.setModuleUrl("ace/mode/batchfile",n(71727)),ace.config.setModuleUrl("ace/mode/bibtex",n(90437)),ace.config.setModuleUrl("ace/mode/c9search",n(62353)),ace.config.setModuleUrl("ace/mode/c_cpp",n(48699)),ace.config.setModuleUrl("ace/mode/cirru",n(11437)),ace.config.setModuleUrl("ace/mode/clojure",n(80987)),ace.config.setModuleUrl("ace/mode/cobol",n(75661)),ace.config.setModuleUrl("ace/mode/coffee",n(22204)),ace.config.setModuleUrl("ace/mode/coldfusion",n(78023)),ace.config.setModuleUrl("ace/mode/crystal",n(94747)),ace.config.setModuleUrl("ace/mode/csharp",n(94763)),ace.config.setModuleUrl("ace/mode/csound_document",n(11845)),ace.config.setModuleUrl("ace/mode/csound_orchestra",n(43084)),ace.config.setModuleUrl("ace/mode/csound_score",n(93019)),ace.config.setModuleUrl("ace/mode/csp",n(91451)),ace.config.setModuleUrl("ace/mode/css",n(73039)),ace.config.setModuleUrl("ace/mode/curly",n(53204)),ace.config.setModuleUrl("ace/mode/d",n(32793)),ace.config.setModuleUrl("ace/mode/dart",n(81037)),ace.config.setModuleUrl("ace/mode/diff",n(32489)),ace.config.setModuleUrl("ace/mode/django",n(86916)),ace.config.setModuleUrl("ace/mode/dockerfile",n(66124)),ace.config.setModuleUrl("ace/mode/dot",n(85097)),ace.config.setModuleUrl("ace/mode/drools",n(46961)),ace.config.setModuleUrl("ace/mode/edifact",n(91111)),ace.config.setModuleUrl("ace/mode/eiffel",n(78847)),ace.config.setModuleUrl("ace/mode/ejs",n(88247)),ace.config.setModuleUrl("ace/mode/elixir",n(84627)),ace.config.setModuleUrl("ace/mode/elm",n(68857)),ace.config.setModuleUrl("ace/mode/erlang",n(89738)),ace.config.setModuleUrl("ace/mode/forth",n(54311)),ace.config.setModuleUrl("ace/mode/fortran",n(23351)),ace.config.setModuleUrl("ace/mode/fsharp",n(43309)),ace.config.setModuleUrl("ace/mode/fsl",n(28877)),ace.config.setModuleUrl("ace/mode/ftl",n(22881)),ace.config.setModuleUrl("ace/mode/gcode",n(31246)),ace.config.setModuleUrl("ace/mode/gherkin",n(38039)),ace.config.setModuleUrl("ace/mode/gitignore",n(62345)),ace.config.setModuleUrl("ace/mode/glsl",n(93720)),ace.config.setModuleUrl("ace/mode/gobstones",n(15002)),ace.config.setModuleUrl("ace/mode/golang",n(10263)),ace.config.setModuleUrl("ace/mode/graphqlschema",n(46784)),ace.config.setModuleUrl("ace/mode/groovy",n(56908)),ace.config.setModuleUrl("ace/mode/haml",n(95323)),ace.config.setModuleUrl("ace/mode/handlebars",n(87733)),ace.config.setModuleUrl("ace/mode/haskell",n(17954)),ace.config.setModuleUrl("ace/mode/haskell_cabal",n(39716)),ace.config.setModuleUrl("ace/mode/haxe",n(33192)),ace.config.setModuleUrl("ace/mode/hjson",n(44483)),ace.config.setModuleUrl("ace/mode/html",n(65440)),ace.config.setModuleUrl("ace/mode/html_elixir",n(40412)),ace.config.setModuleUrl("ace/mode/html_ruby",n(75155)),ace.config.setModuleUrl("ace/mode/ini",n(69229)),ace.config.setModuleUrl("ace/mode/io",n(49385)),ace.config.setModuleUrl("ace/mode/ion",n(10285)),ace.config.setModuleUrl("ace/mode/jack",n(4482)),ace.config.setModuleUrl("ace/mode/jade",n(98887)),ace.config.setModuleUrl("ace/mode/java",n(47623)),ace.config.setModuleUrl("ace/mode/javascript",n(26862)),ace.config.setModuleUrl("ace/mode/jexl",n(17586)),ace.config.setModuleUrl("ace/mode/json",n(36034)),ace.config.setModuleUrl("ace/mode/json5",n(60211)),ace.config.setModuleUrl("ace/mode/jsoniq",n(48756)),ace.config.setModuleUrl("ace/mode/jsp",n(86522)),ace.config.setModuleUrl("ace/mode/jssm",n(45483)),ace.config.setModuleUrl("ace/mode/jsx",n(58819)),ace.config.setModuleUrl("ace/mode/julia",n(91032)),ace.config.setModuleUrl("ace/mode/kotlin",n(86969)),ace.config.setModuleUrl("ace/mode/latex",n(44134)),ace.config.setModuleUrl("ace/mode/latte",n(93955)),ace.config.setModuleUrl("ace/mode/less",n(61527)),ace.config.setModuleUrl("ace/mode/liquid",n(3519)),ace.config.setModuleUrl("ace/mode/lisp",n(43442)),ace.config.setModuleUrl("ace/mode/livescript",n(71533)),ace.config.setModuleUrl("ace/mode/logiql",n(13941)),ace.config.setModuleUrl("ace/mode/logtalk",n(92538)),ace.config.setModuleUrl("ace/mode/lsl",n(46902)),ace.config.setModuleUrl("ace/mode/lua",n(89356)),ace.config.setModuleUrl("ace/mode/luapage",n(61794)),ace.config.setModuleUrl("ace/mode/lucene",n(93808)),ace.config.setModuleUrl("ace/mode/makefile",n(61919)),ace.config.setModuleUrl("ace/mode/markdown",n(3146)),ace.config.setModuleUrl("ace/mode/mask",n(18160)),ace.config.setModuleUrl("ace/mode/matlab",n(36901)),ace.config.setModuleUrl("ace/mode/maze",n(97621)),ace.config.setModuleUrl("ace/mode/mediawiki",n(25368)),ace.config.setModuleUrl("ace/mode/mel",n(99438)),ace.config.setModuleUrl("ace/mode/mips",n(40075)),ace.config.setModuleUrl("ace/mode/mixal",n(77010)),ace.config.setModuleUrl("ace/mode/mushcode",n(59635)),ace.config.setModuleUrl("ace/mode/mysql",n(29948)),ace.config.setModuleUrl("ace/mode/nginx",n(20035)),ace.config.setModuleUrl("ace/mode/nim",n(7155)),ace.config.setModuleUrl("ace/mode/nix",n(34236)),ace.config.setModuleUrl("ace/mode/nsis",n(72336)),ace.config.setModuleUrl("ace/mode/nunjucks",n(14357)),ace.config.setModuleUrl("ace/mode/objectivec",n(99840)),ace.config.setModuleUrl("ace/mode/ocaml",n(50373)),ace.config.setModuleUrl("ace/mode/partiql",n(882)),ace.config.setModuleUrl("ace/mode/pascal",n(86782)),ace.config.setModuleUrl("ace/mode/perl",n(75047)),ace.config.setModuleUrl("ace/mode/pgsql",n(2379)),ace.config.setModuleUrl("ace/mode/php",n(28900)),ace.config.setModuleUrl("ace/mode/php_laravel_blade",n(19418)),ace.config.setModuleUrl("ace/mode/pig",n(23447)),ace.config.setModuleUrl("ace/mode/plain_text",n(64863)),ace.config.setModuleUrl("ace/mode/powershell",n(33871)),ace.config.setModuleUrl("ace/mode/praat",n(14969)),ace.config.setModuleUrl("ace/mode/prisma",n(50345)),ace.config.setModuleUrl("ace/mode/prolog",n(29129)),ace.config.setModuleUrl("ace/mode/properties",n(57733)),ace.config.setModuleUrl("ace/mode/protobuf",n(56501)),ace.config.setModuleUrl("ace/mode/puppet",n(63878)),ace.config.setModuleUrl("ace/mode/python",n(84686)),ace.config.setModuleUrl("ace/mode/qml",n(70308)),ace.config.setModuleUrl("ace/mode/r",n(65760)),ace.config.setModuleUrl("ace/mode/raku",n(49412)),ace.config.setModuleUrl("ace/mode/razor",n(99671)),ace.config.setModuleUrl("ace/mode/rdoc",n(15113)),ace.config.setModuleUrl("ace/mode/red",n(46496)),ace.config.setModuleUrl("ace/mode/redshift",n(18759)),ace.config.setModuleUrl("ace/mode/rhtml",n(55749)),ace.config.setModuleUrl("ace/mode/robot",n(80992)),ace.config.setModuleUrl("ace/mode/rst",n(71020)),ace.config.setModuleUrl("ace/mode/ruby",n(40737)),ace.config.setModuleUrl("ace/mode/rust",n(27133)),ace.config.setModuleUrl("ace/mode/sac",n(49075)),ace.config.setModuleUrl("ace/mode/sass",n(60157)),ace.config.setModuleUrl("ace/mode/scad",n(1853)),ace.config.setModuleUrl("ace/mode/scala",n(97339)),ace.config.setModuleUrl("ace/mode/scheme",n(25068)),ace.config.setModuleUrl("ace/mode/scrypt",n(23812)),ace.config.setModuleUrl("ace/mode/scss",n(61488)),ace.config.setModuleUrl("ace/mode/sh",n(30464)),ace.config.setModuleUrl("ace/mode/sjs",n(12397)),ace.config.setModuleUrl("ace/mode/slim",n(28731)),ace.config.setModuleUrl("ace/mode/smarty",n(641)),ace.config.setModuleUrl("ace/mode/smithy",n(4635)),ace.config.setModuleUrl("ace/mode/snippets",n(54007)),ace.config.setModuleUrl("ace/mode/soy_template",n(41960)),ace.config.setModuleUrl("ace/mode/space",n(32423)),ace.config.setModuleUrl("ace/mode/sparql",n(70194)),ace.config.setModuleUrl("ace/mode/sql",n(68629)),ace.config.setModuleUrl("ace/mode/sqlserver",n(15639)),ace.config.setModuleUrl("ace/mode/stylus",n(39054)),ace.config.setModuleUrl("ace/mode/svg",n(4351)),ace.config.setModuleUrl("ace/mode/swift",n(97862)),ace.config.setModuleUrl("ace/mode/tcl",n(46009)),ace.config.setModuleUrl("ace/mode/terraform",n(47778)),ace.config.setModuleUrl("ace/mode/tex",n(12820)),ace.config.setModuleUrl("ace/mode/text",n(58376)),ace.config.setModuleUrl("ace/mode/textile",n(44508)),ace.config.setModuleUrl("ace/mode/toml",n(45189)),ace.config.setModuleUrl("ace/mode/tsx",n(62714)),ace.config.setModuleUrl("ace/mode/turtle",n(60480)),ace.config.setModuleUrl("ace/mode/twig",n(48198)),ace.config.setModuleUrl("ace/mode/typescript",n(6902)),ace.config.setModuleUrl("ace/mode/vala",n(27007)),ace.config.setModuleUrl("ace/mode/vbscript",n(50758)),ace.config.setModuleUrl("ace/mode/velocity",n(15322)),ace.config.setModuleUrl("ace/mode/verilog",n(69660)),ace.config.setModuleUrl("ace/mode/vhdl",n(84035)),ace.config.setModuleUrl("ace/mode/visualforce",n(30437)),ace.config.setModuleUrl("ace/mode/wollok",n(840)),ace.config.setModuleUrl("ace/mode/xml",n(82943)),ace.config.setModuleUrl("ace/mode/xquery",n(98816)),ace.config.setModuleUrl("ace/mode/yaml",n(37611)),ace.config.setModuleUrl("ace/mode/zeek",n(97997)),ace.config.setModuleUrl("ace/theme/ambiance",n(32493)),ace.config.setModuleUrl("ace/theme/chaos",n(88794)),ace.config.setModuleUrl("ace/theme/chrome",n(62006)),ace.config.setModuleUrl("ace/theme/cloud9_day",n(63716)),ace.config.setModuleUrl("ace/theme/cloud9_night",n(4860)),ace.config.setModuleUrl("ace/theme/cloud9_night_low_color",n(34563)),ace.config.setModuleUrl("ace/theme/clouds",n(43092)),ace.config.setModuleUrl("ace/theme/clouds_midnight",n(96640)),ace.config.setModuleUrl("ace/theme/cobalt",n(116)),ace.config.setModuleUrl("ace/theme/crimson_editor",n(78147)),ace.config.setModuleUrl("ace/theme/dawn",n(44090)),ace.config.setModuleUrl("ace/theme/dracula",n(92211)),ace.config.setModuleUrl("ace/theme/dreamweaver",n(84749)),ace.config.setModuleUrl("ace/theme/eclipse",n(31646)),ace.config.setModuleUrl("ace/theme/github",n(79785)),ace.config.setModuleUrl("ace/theme/gob",n(9508)),ace.config.setModuleUrl("ace/theme/gruvbox",n(5040)),ace.config.setModuleUrl("ace/theme/gruvbox_dark_hard",n(11123)),ace.config.setModuleUrl("ace/theme/gruvbox_light_hard",n(61532)),ace.config.setModuleUrl("ace/theme/idle_fingers",n(1512)),ace.config.setModuleUrl("ace/theme/iplastic",n(36056)),ace.config.setModuleUrl("ace/theme/katzenmilch",n(91017)),ace.config.setModuleUrl("ace/theme/kr_theme",n(26268)),ace.config.setModuleUrl("ace/theme/kuroir",n(998)),ace.config.setModuleUrl("ace/theme/merbivore",n(24875)),ace.config.setModuleUrl("ace/theme/merbivore_soft",n(953)),ace.config.setModuleUrl("ace/theme/mono_industrial",n(23976)),ace.config.setModuleUrl("ace/theme/monokai",n(41805)),ace.config.setModuleUrl("ace/theme/nord_dark",n(27761)),ace.config.setModuleUrl("ace/theme/one_dark",n(73657)),ace.config.setModuleUrl("ace/theme/pastel_on_dark",n(31611)),ace.config.setModuleUrl("ace/theme/solarized_dark",n(79995)),ace.config.setModuleUrl("ace/theme/solarized_light",n(99927)),ace.config.setModuleUrl("ace/theme/sqlserver",n(82067)),ace.config.setModuleUrl("ace/theme/terminal",n(52304)),ace.config.setModuleUrl("ace/theme/textmate",n(16303)),ace.config.setModuleUrl("ace/theme/tomorrow",n(66841)),ace.config.setModuleUrl("ace/theme/tomorrow_night",n(24594)),ace.config.setModuleUrl("ace/theme/tomorrow_night_blue",n(94474)),ace.config.setModuleUrl("ace/theme/tomorrow_night_bright",n(7106)),ace.config.setModuleUrl("ace/theme/tomorrow_night_eighties",n(95712)),ace.config.setModuleUrl("ace/theme/twilight",n(48501)),ace.config.setModuleUrl("ace/theme/vibrant_ink",n(32110)),ace.config.setModuleUrl("ace/theme/xcode",n(61454)),ace.config.setModuleUrl("ace/mode/base_worker",n(75e3)),ace.config.setModuleUrl("ace/mode/coffee_worker",n(19592)),ace.config.setModuleUrl("ace/mode/css_worker",n(58633)),ace.config.setModuleUrl("ace/mode/html_worker",n(76024)),ace.config.setModuleUrl("ace/mode/javascript_worker",n(19247)),ace.config.setModuleUrl("ace/mode/json_worker",n(53659)),ace.config.setModuleUrl("ace/mode/lua_worker",n(51386)),ace.config.setModuleUrl("ace/mode/php_worker",n(54476)),ace.config.setModuleUrl("ace/mode/xml_worker",n(4340)),ace.config.setModuleUrl("ace/mode/xquery_worker",n(1195)),ace.config.setModuleUrl("ace/mode/yaml_worker",n(19493)),ace.config.setModuleUrl("ace/snippets/abap",n(30702)),ace.config.setModuleUrl("ace/snippets/abc",n(28531)),ace.config.setModuleUrl("ace/snippets/actionscript",n(1066)),ace.config.setModuleUrl("ace/snippets/ada",n(65509)),ace.config.setModuleUrl("ace/snippets/alda",n(26207)),ace.config.setModuleUrl("ace/snippets/apache_conf",n(96043)),ace.config.setModuleUrl("ace/snippets/apex",n(20280)),ace.config.setModuleUrl("ace/snippets/applescript",n(17290)),ace.config.setModuleUrl("ace/snippets/aql",n(60340)),ace.config.setModuleUrl("ace/snippets/asciidoc",n(92428)),ace.config.setModuleUrl("ace/snippets/asl",n(19449)),ace.config.setModuleUrl("ace/snippets/assembly_x86",n(33945)),ace.config.setModuleUrl("ace/snippets/autohotkey",n(32064)),ace.config.setModuleUrl("ace/snippets/batchfile",n(79105)),ace.config.setModuleUrl("ace/snippets/bibtex",n(84444)),ace.config.setModuleUrl("ace/snippets/c9search",n(40948)),ace.config.setModuleUrl("ace/snippets/c_cpp",n(6333)),ace.config.setModuleUrl("ace/snippets/cirru",n(92427)),ace.config.setModuleUrl("ace/snippets/clojure",n(23290)),ace.config.setModuleUrl("ace/snippets/cobol",n(47531)),ace.config.setModuleUrl("ace/snippets/coffee",n(20109)),ace.config.setModuleUrl("ace/snippets/coldfusion",n(91833)),ace.config.setModuleUrl("ace/snippets/crystal",n(66676)),ace.config.setModuleUrl("ace/snippets/csharp",n(85924)),ace.config.setModuleUrl("ace/snippets/csound_document",n(93219)),ace.config.setModuleUrl("ace/snippets/csound_orchestra",n(28158)),ace.config.setModuleUrl("ace/snippets/csound_score",n(18156)),ace.config.setModuleUrl("ace/snippets/csp",n(33284)),ace.config.setModuleUrl("ace/snippets/css",n(55116)),ace.config.setModuleUrl("ace/snippets/curly",n(21738)),ace.config.setModuleUrl("ace/snippets/d",n(49244)),ace.config.setModuleUrl("ace/snippets/dart",n(13083)),ace.config.setModuleUrl("ace/snippets/diff",n(77707)),ace.config.setModuleUrl("ace/snippets/django",n(19077)),ace.config.setModuleUrl("ace/snippets/dockerfile",n(5801)),ace.config.setModuleUrl("ace/snippets/dot",n(70477)),ace.config.setModuleUrl("ace/snippets/drools",n(81373)),ace.config.setModuleUrl("ace/snippets/edifact",n(69056)),ace.config.setModuleUrl("ace/snippets/eiffel",n(38973)),ace.config.setModuleUrl("ace/snippets/ejs",n(82889)),ace.config.setModuleUrl("ace/snippets/elixir",n(83998)),ace.config.setModuleUrl("ace/snippets/elm",n(45922)),ace.config.setModuleUrl("ace/snippets/erlang",n(58518)),ace.config.setModuleUrl("ace/snippets/forth",n(26048)),ace.config.setModuleUrl("ace/snippets/fortran",n(49237)),ace.config.setModuleUrl("ace/snippets/fsharp",n(81755)),ace.config.setModuleUrl("ace/snippets/fsl",n(50139)),ace.config.setModuleUrl("ace/snippets/ftl",n(87943)),ace.config.setModuleUrl("ace/snippets/gcode",n(35131)),ace.config.setModuleUrl("ace/snippets/gherkin",n(17750)),ace.config.setModuleUrl("ace/snippets/gitignore",n(58096)),ace.config.setModuleUrl("ace/snippets/glsl",n(36769)),ace.config.setModuleUrl("ace/snippets/gobstones",n(20396)),ace.config.setModuleUrl("ace/snippets/golang",n(15517)),ace.config.setModuleUrl("ace/snippets/graphqlschema",n(73043)),ace.config.setModuleUrl("ace/snippets/groovy",n(93614)),ace.config.setModuleUrl("ace/snippets/haml",n(90171)),ace.config.setModuleUrl("ace/snippets/handlebars",n(38650)),ace.config.setModuleUrl("ace/snippets/haskell",n(37871)),ace.config.setModuleUrl("ace/snippets/haskell_cabal",n(45942)),ace.config.setModuleUrl("ace/snippets/haxe",n(76041)),ace.config.setModuleUrl("ace/snippets/hjson",n(86491)),ace.config.setModuleUrl("ace/snippets/html",n(86270)),ace.config.setModuleUrl("ace/snippets/html_elixir",n(5876)),ace.config.setModuleUrl("ace/snippets/html_ruby",n(95686)),ace.config.setModuleUrl("ace/snippets/ini",n(36042)),ace.config.setModuleUrl("ace/snippets/io",n(66652)),ace.config.setModuleUrl("ace/snippets/ion",n(95345)),ace.config.setModuleUrl("ace/snippets/jack",n(54968)),ace.config.setModuleUrl("ace/snippets/jade",n(58541)),ace.config.setModuleUrl("ace/snippets/java",n(37087)),ace.config.setModuleUrl("ace/snippets/javascript",n(50391)),ace.config.setModuleUrl("ace/snippets/jexl",n(23159)),ace.config.setModuleUrl("ace/snippets/json",n(22951)),ace.config.setModuleUrl("ace/snippets/json5",n(24607)),ace.config.setModuleUrl("ace/snippets/jsoniq",n(57526)),ace.config.setModuleUrl("ace/snippets/jsp",n(71841)),ace.config.setModuleUrl("ace/snippets/jssm",n(23529)),ace.config.setModuleUrl("ace/snippets/jsx",n(20830)),ace.config.setModuleUrl("ace/snippets/julia",n(284)),ace.config.setModuleUrl("ace/snippets/kotlin",n(62423)),ace.config.setModuleUrl("ace/snippets/latex",n(19167)),ace.config.setModuleUrl("ace/snippets/latte",n(8035)),ace.config.setModuleUrl("ace/snippets/less",n(51626)),ace.config.setModuleUrl("ace/snippets/liquid",n(3086)),ace.config.setModuleUrl("ace/snippets/lisp",n(15993)),ace.config.setModuleUrl("ace/snippets/livescript",n(91320)),ace.config.setModuleUrl("ace/snippets/logiql",n(76658)),ace.config.setModuleUrl("ace/snippets/logtalk",n(63504)),ace.config.setModuleUrl("ace/snippets/lsl",n(8656)),ace.config.setModuleUrl("ace/snippets/lua",n(34269)),ace.config.setModuleUrl("ace/snippets/luapage",n(30603)),ace.config.setModuleUrl("ace/snippets/lucene",n(15976)),ace.config.setModuleUrl("ace/snippets/makefile",n(73337)),ace.config.setModuleUrl("ace/snippets/markdown",n(57783)),ace.config.setModuleUrl("ace/snippets/mask",n(64149)),ace.config.setModuleUrl("ace/snippets/matlab",n(43943)),ace.config.setModuleUrl("ace/snippets/maze",n(89876)),ace.config.setModuleUrl("ace/snippets/mediawiki",n(31812)),ace.config.setModuleUrl("ace/snippets/mel",n(51447)),ace.config.setModuleUrl("ace/snippets/mips",n(45959)),ace.config.setModuleUrl("ace/snippets/mixal",n(62112)),ace.config.setModuleUrl("ace/snippets/mushcode",n(92122)),ace.config.setModuleUrl("ace/snippets/mysql",n(87631)),ace.config.setModuleUrl("ace/snippets/nginx",n(82703)),ace.config.setModuleUrl("ace/snippets/nim",n(74912)),ace.config.setModuleUrl("ace/snippets/nix",n(46842)),ace.config.setModuleUrl("ace/snippets/nsis",n(48978)),ace.config.setModuleUrl("ace/snippets/nunjucks",n(19498)),ace.config.setModuleUrl("ace/snippets/objectivec",n(47838)),ace.config.setModuleUrl("ace/snippets/ocaml",n(31383)),ace.config.setModuleUrl("ace/snippets/partiql",n(86955)),ace.config.setModuleUrl("ace/snippets/pascal",n(27526)),ace.config.setModuleUrl("ace/snippets/perl",n(44887)),ace.config.setModuleUrl("ace/snippets/pgsql",n(89209)),ace.config.setModuleUrl("ace/snippets/php",n(65675)),ace.config.setModuleUrl("ace/snippets/php_laravel_blade",n(48731)),ace.config.setModuleUrl("ace/snippets/pig",n(78385)),ace.config.setModuleUrl("ace/snippets/plain_text",n(89175)),ace.config.setModuleUrl("ace/snippets/powershell",n(74784)),ace.config.setModuleUrl("ace/snippets/praat",n(83427)),ace.config.setModuleUrl("ace/snippets/prisma",n(71674)),ace.config.setModuleUrl("ace/snippets/prolog",n(25249)),ace.config.setModuleUrl("ace/snippets/properties",n(14594)),ace.config.setModuleUrl("ace/snippets/protobuf",n(43194)),ace.config.setModuleUrl("ace/snippets/puppet",n(11315)),ace.config.setModuleUrl("ace/snippets/python",n(57798)),ace.config.setModuleUrl("ace/snippets/qml",n(17274)),ace.config.setModuleUrl("ace/snippets/r",n(25250)),ace.config.setModuleUrl("ace/snippets/raku",n(68157)),ace.config.setModuleUrl("ace/snippets/razor",n(57931)),ace.config.setModuleUrl("ace/snippets/rdoc",n(77278)),ace.config.setModuleUrl("ace/snippets/red",n(59154)),ace.config.setModuleUrl("ace/snippets/redshift",n(52787)),ace.config.setModuleUrl("ace/snippets/rhtml",n(65505)),ace.config.setModuleUrl("ace/snippets/robot",n(6102)),ace.config.setModuleUrl("ace/snippets/rst",n(95579)),ace.config.setModuleUrl("ace/snippets/ruby",n(63956)),ace.config.setModuleUrl("ace/snippets/rust",n(94581)),ace.config.setModuleUrl("ace/snippets/sac",n(20136)),ace.config.setModuleUrl("ace/snippets/sass",n(15902)),ace.config.setModuleUrl("ace/snippets/scad",n(67518)),ace.config.setModuleUrl("ace/snippets/scala",n(259)),ace.config.setModuleUrl("ace/snippets/scheme",n(94300)),ace.config.setModuleUrl("ace/snippets/scrypt",n(55138)),ace.config.setModuleUrl("ace/snippets/scss",n(68419)),ace.config.setModuleUrl("ace/snippets/sh",n(78776)),ace.config.setModuleUrl("ace/snippets/sjs",n(69894)),ace.config.setModuleUrl("ace/snippets/slim",n(26725)),ace.config.setModuleUrl("ace/snippets/smarty",n(78053)),ace.config.setModuleUrl("ace/snippets/smithy",n(45098)),ace.config.setModuleUrl("ace/snippets/snippets",n(951)),ace.config.setModuleUrl("ace/snippets/soy_template",n(44587)),ace.config.setModuleUrl("ace/snippets/space",n(7638)),ace.config.setModuleUrl("ace/snippets/sparql",n(71899)),ace.config.setModuleUrl("ace/snippets/sql",n(76830)),ace.config.setModuleUrl("ace/snippets/sqlserver",n(46853)),ace.config.setModuleUrl("ace/snippets/stylus",n(98874)),ace.config.setModuleUrl("ace/snippets/svg",n(29397)),ace.config.setModuleUrl("ace/snippets/swift",n(83783)),ace.config.setModuleUrl("ace/snippets/tcl",n(64881)),ace.config.setModuleUrl("ace/snippets/terraform",n(10731)),ace.config.setModuleUrl("ace/snippets/tex",n(80962)),ace.config.setModuleUrl("ace/snippets/text",n(29681)),ace.config.setModuleUrl("ace/snippets/textile",n(29925)),ace.config.setModuleUrl("ace/snippets/toml",n(1647)),ace.config.setModuleUrl("ace/snippets/tsx",n(78561)),ace.config.setModuleUrl("ace/snippets/turtle",n(1350)),ace.config.setModuleUrl("ace/snippets/twig",n(19626)),ace.config.setModuleUrl("ace/snippets/typescript",n(35843)),ace.config.setModuleUrl("ace/snippets/vala",n(92514)),ace.config.setModuleUrl("ace/snippets/vbscript",n(78766)),ace.config.setModuleUrl("ace/snippets/velocity",n(33030)),ace.config.setModuleUrl("ace/snippets/verilog",n(84837)),ace.config.setModuleUrl("ace/snippets/vhdl",n(80082)),ace.config.setModuleUrl("ace/snippets/visualforce",n(81053)),ace.config.setModuleUrl("ace/snippets/wollok",n(52292)),ace.config.setModuleUrl("ace/snippets/xml",n(4523)),ace.config.setModuleUrl("ace/snippets/xquery",n(73214)),ace.config.setModuleUrl("ace/snippets/yaml",n(94921)),ace.config.setModuleUrl("ace/snippets/zeek",n(25924))},23238:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&s[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},74263:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(i," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},14305:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",l="week",c="month",u="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,c),o=n-i<0,s=t.clone().add(r+(o?-1:1),c);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:a,D:d,h:s,m:o,s:i,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",w={};w[y]=g;var _=function(e){return t(e,S)},A=function e(t,n,r){var i;if(!t)return y;if("string"==typeof t){var o=t.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=t.split("-");if(!i&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},C=b;C.l=A,C.i=_,C.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){var g=function(e){this.$L=A(e.locale,null,!0),this.parse(e)},v=g.prototype;return v.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(C.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var i=n.match(p);if(i){var o=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return C},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return x(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<x(e)},v.$g=function(e,t,n){return C.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!C.u(t)||t,u=C.p(e),f=function(e,t){var i=C.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(a)},p=function(e,t){return C.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case h:return r?f(1,0):f(31,11);case c:return r?f(1,g):f(0,g+1);case l:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(r?v-w:v+(6-w),g);case a:case d:return p(b+"Hours",0);case s:return p(b+"Minutes",1);case o:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=C.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[a]=u+"Date",n[d]=u+"Date",n[c]=u+"Month",n[h]=u+"FullYear",n[s]=u+"Hours",n[o]=u+"Minutes",n[i]=u+"Seconds",n[r]=u+"Milliseconds",n)[l],p=l===a?this.$D+(t-this.$W):t;if(l===c||l===h){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[C.p(e)]()},v.add=function(t,r){var u,d=this;t=Number(t);var f=C.p(r),p=function(e){var n=x(d);return C.w(n.date(n.date()+Math.round(e*t)),d)};if(f===c)return this.set(c,this.$M+t);if(f===h)return this.set(h,this.$y+t);if(f===a)return p(1);if(f===l)return p(7);var m=(u={},u[o]=e,u[s]=n,u[i]=1e3,u)[f]||1,g=this.$d.getTime()+t*m;return C.w(g,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),o=this.$H,s=this.$m,a=this.$M,l=n.weekdays,c=n.months,u=function(e,n,i,o){return e&&(e[n]||e(t,r))||i[n].slice(0,o)},h=function(e){return C.s(o%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:C.s(a+1,2,"0"),MMM:u(n.monthsShort,a,c,3),MMMM:u(c,a),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:C.s(o,2,"0"),h:h(1),hh:h(2),a:d(o,s,!0),A:d(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(e,t){return t||p[e]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(t,r,d){var f,p=C.p(r),m=x(t),g=(m.utcOffset()-this.utcOffset())*e,v=this-m,b=C.m(this,m);return b=(f={},f[h]=b/12,f[c]=b,f[u]=b/3,f[l]=(v-g)/6048e5,f[a]=(v-g)/864e5,f[s]=v/n,f[o]=v/e,f[i]=v/1e3,f)[p]||v,d?b:C.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=A(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return C.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),E=S.prototype;return x.prototype=E,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,S,x),e.$i=!0),x},x.locale=A,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=w[y],x.Ls=w,x.p={},x}()},71809:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,o=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,l=2592e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:a,months:l,days:o,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},h=function(e){return t=e,null!=(n=b)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n;var t,n},d=function(e,t,n){return new b(e,n,t.$l)},f=function(e){return t.p(e)+"s"},p=function(e){return e<0},m=function(e){return p(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},v=function(e,t){return e?p(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){var p=function(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(c);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this},g=p.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/a),e%=a,this.$d.months=m(e/l),e%=l,this.$d.days=m(e/o),e%=o,this.$d.hours=m(e/i),e%=i,this.$d.minutes=m(e/r),e%=r,this.$d.seconds=m(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,"D"),i=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3);var a=v(s,"S"),l=e.negative||t.negative||r.negative||i.negative||o.negative||a.negative,c=i.format||o.format||a.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+r.format+c+i.format+o.format+a.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(s,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[f(e)]},g.get=function(e){var t=this.$ms,n=f(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?m(t/u[n]):this.$d[n],0===t?0:t},g.add=function(e,t,n){var r;return r=t?e*u[f(t)]:h(e)?e.$ms:d(e,this).$ms,d(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return d(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}();return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){var n=i.locale();return d(e,{$l:n},t)},i.isDuration=h;var o=r.prototype.add,s=r.prototype.subtract;r.prototype.add=function(e,t){return h(e)&&(e=e.asMilliseconds()),o.bind(this)(e,t)},r.prototype.subtract=function(e,t){return h(e)&&(e=e.asMilliseconds()),s.bind(this)(e,t)}}}()},75874:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var s=r,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var u=this.diff_compute_(e,n,s,o);return l&&u.unshift(new t.Diff(0,l)),c&&u.push(new t.Diff(0,c)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,r,i,o){var s;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var a=e.length>r.length?e:r,l=e.length>r.length?r:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>r.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,r)];var u=this.diff_halfMatch_(e,r);if(u){var h=u[0],d=u[1],f=u[2],p=u[3],m=u[4],g=this.diff_main(h,f,i,o),v=this.diff_main(d,p,i,o);return g.concat([new t.Diff(0,m)],v)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var s=o.lineArray,a=this.diff_main(e,r,!1,i);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,u=0,h="",d="";l<a.length;){switch(a[l][0]){case 1:u++,d+=a[l][1];break;case n:c++,h+=a[l][1];break;case 0:if(c>=1&&u>=1){a.splice(l-c-u,c+u),l=l-c-u;for(var f=this.diff_main(h,d,!1,i),p=f.length-1;p>=0;p--)a.splice(l,0,f[p]);l+=f.length}u=0,c=0,h="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,s=r.length,a=Math.ceil((o+s)/2),l=a,c=2*a,u=new Array(c),h=new Array(c),d=0;d<c;d++)u[d]=-1,h[d]=-1;u[l+1]=0,h[l+1]=0;for(var f=o-s,p=f%2!=0,m=0,g=0,v=0,b=0,y=0;y<a&&!((new Date).getTime()>i);y++){for(var w=-y+m;w<=y-g;w+=2){for(var _=l+w,A=(k=w==-y||w!=y&&u[_-1]<u[_+1]?u[_+1]:u[_-1]+1)-w;k<o&&A<s&&e.charAt(k)==r.charAt(A);)k++,A++;if(u[_]=k,k>o)g+=2;else if(A>s)m+=2;else if(p&&(S=l+f-w)>=0&&S<c&&-1!=h[S]&&k>=(C=o-h[S]))return this.diff_bisectSplit_(e,r,k,A,i)}for(var x=-y+v;x<=y-b;x+=2){for(var C,S=l+x,E=(C=x==-y||x!=y&&h[S-1]<h[S+1]?h[S+1]:h[S-1]+1)-x;C<o&&E<s&&e.charAt(o-C-1)==r.charAt(s-E-1);)C++,E++;if(h[S]=C,C>o)b+=2;else if(E>s)v+=2;else if(!p){var k;if((_=l+f-x)>=0&&_<c&&-1!=u[_])if(A=l+(k=u[_])-_,k>=(C=o-C))return this.diff_bisectSplit_(e,r,k,A,i)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),c=this.diff_main(o,s,!1,i),u=this.diff_main(a,l,!1,i);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=function(e){for(var t="",n=0,s=-1,a=r.length;s<e.length-1;){-1==(s=e.indexOf("\n",n))&&(s=e.length-1);var l=e.substring(n,s+1);(i.hasOwnProperty?i.hasOwnProperty(l):void 0!==i[l])?t+=String.fromCharCode(i[l]):(a==o&&(l=e.substring(n),s=e.length),t+=String.fromCharCode(a),i[l]=a,r[a++]=l),n=s+1}return t},r=[],i={};r[0]="";var o=4e4,s=n(e);return o=65535,{chars1:s,chars2:n(t),lineArray:r}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,s=1;;){var a=e.substring(i-s),l=t.indexOf(a);if(-1==l)return o;s+=l,0!=l&&e.substring(i-s)!=t.substring(0,s)||(o=s,s++)}},t.prototype.diff_halfMatch_=function(e,t){var n=function(e,t,n){for(var r,i,o,s,a=e.substring(n,n+Math.floor(e.length/4)),l=-1,c="";-1!=(l=t.indexOf(a,l+1));){var h=u.diff_commonPrefix(e.substring(n),t.substring(l)),d=u.diff_commonSuffix(e.substring(0,n),t.substring(0,l));c.length<d+h&&(c=t.substring(l-d,l)+t.substring(l,l+h),r=e.substring(0,n-d),i=e.substring(n+h),o=t.substring(0,l-d),s=t.substring(l+h))}return 2*c.length>=e.length?[r,i,o,s,c]:null};if(this.Diff_Timeout<=0)return null;var r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(r.length<4||2*i.length<r.length)return null;var o,s,a,l,c,u=this,h=n(r,i,Math.ceil(r.length/4)),d=n(r,i,Math.ceil(r.length/2));return h||d?(o=d?h&&h[4].length>d[4].length?h:d:h,e.length>t.length?(s=o[0],a=o[1],l=o[2],c=o[3]):(l=o[0],c=o[1],s=o[2],a=o[3]),[s,a,l,c,o[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,s=null,a=0,l=0,c=0,u=0,h=0;a<e.length;)0==e[a][0]?(i[o++]=a,l=u,c=h,u=0,h=0,s=e[a][1]):(1==e[a][0]?u+=e[a][1].length:h+=e[a][1].length,s&&s.length<=Math.max(l,c)&&s.length<=Math.max(u,h)&&(e.splice(i[o-1],0,new t.Diff(n,s)),e[i[o-1]+1][0]=1,o--,a=--o>0?i[o-1]:-1,l=0,c=0,u=0,h=0,s=null,r=!0)),a++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==n&&1==e[a][0]){var d=e[a-1][1],f=e[a][1],p=this.diff_commonOverlap_(d,f),m=this.diff_commonOverlap_(f,d);p>=m?(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,p))),e[a-1][1]=d.substring(0,d.length-p),e[a+1][1]=f.substring(p),a++):(m>=d.length/2||m>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,m))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-m),e[a+1][0]=n,e[a+1][1]=d.substring(m),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){for(var n=function(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),s=i.match(t.nonAlphaNumericRegex_),a=o&&r.match(t.whitespaceRegex_),l=s&&i.match(t.whitespaceRegex_),c=a&&r.match(t.linebreakRegex_),u=l&&i.match(t.linebreakRegex_),h=c&&e.match(t.blanklineEndRegex_),d=u&&n.match(t.blanklineStartRegex_);return h||d?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0},r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],a=this.diff_commonSuffix(i,o);if(a){var l=o.substring(o.length-a);i=i.substring(0,i.length-a),o=l+o.substring(0,o.length-a),s=l+s}for(var c=i,u=o,h=s,d=n(i,o)+n(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var f=n(i,o)+n(o,s);f>=d&&(d=f,c=i,u=o,h=s)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=u,h?e[r+1][1]=h:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,s=null,a=0,l=!1,c=!1,u=!1,h=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(u||h)?(i[o++]=a,l=u,c=h,s=e[a][1]):(o=0,s=null),u=h=!1):(e[a][0]==n?h=!0:u=!0,s&&(l&&c&&u&&h||s.length<this.Diff_EditCost/2&&l+c+u+h==3)&&(e.splice(i[o-1],0,new t.Diff(n,s)),e[i[o-1]+1][0]=1,o--,s=null,l&&c?(u=h=!0,o=0):(a=--o>0?i[o-1]:-1,u=h=!1),r=!0)),a++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,s=0,a="",l="";i<e.length;)switch(e[i][0]){case 1:s++,l+=e[i][1],i++;break;case n:o++,a+=e[i][1],i++;break;case 0:o+s>1?(0!==o&&0!==s&&(0!==(r=this.diff_commonPrefix(l,a))&&(i-o-s>0&&0==e[i-o-s-1][0]?e[i-o-s-1][1]+=l.substring(0,r):(e.splice(0,0,new t.Diff(0,l.substring(0,r))),i++),l=l.substring(r),a=a.substring(r)),0!==(r=this.diff_commonSuffix(l,a))&&(e[i][1]=l.substring(l.length-r)+e[i][1],l=l.substring(0,l.length-r),a=a.substring(0,a.length-r))),i-=o+s,e.splice(i,o+s),a.length&&(e.splice(i,0,new t.Diff(n,a)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var r,i=0,o=0,s=0,a=0;for(r=0;r<e.length&&(1!==e[r][0]&&(i+=e[r][1].length),e[r][0]!==n&&(o+=e[r][1].length),!(i>t));r++)s=i,a=o;return e.length!=r&&e[r][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=/</g,o=/>/g,s=/\n/g,a=0;a<e.length;a++){var l=e[a][0],c=e[a][1].replace(r,"&").replace(i,"<").replace(o,">").replace(s,"¶<br>");switch(l){case 1:t[a]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[a]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[a]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],r=0;r<e.length;r++)e[r][0]!==n&&(t[r]=e[r][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,r=0,i=0,o=0;o<e.length;o++){var s=e[o][0],a=e[o][1];switch(s){case 1:r+=a.length;break;case n:i+=a.length;break;case 0:t+=Math.max(r,i),r=0,i=0}}return t+Math.max(r,i)},t.prototype.diff_toDelta=function(e){for(var t=[],r=0;r<e.length;r++)switch(e[r][0]){case 1:t[r]="+"+encodeURI(e[r][1]);break;case n:t[r]="-"+e[r][1].length;break;case 0:t[r]="="+e[r][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,r){for(var i=[],o=0,s=0,a=r.split(/\t/g),l=0;l<a.length;l++){var c=a[l].substring(1);switch(a[l].charAt(0)){case"+":try{i[o++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var u=parseInt(c,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+c);var h=e.substring(s,s+=u);"="==a[l].charAt(0)?i[o++]=new t.Diff(0,h):i[o++]=new t.Diff(n,h);break;default:if(a[l])throw new Error("Invalid diff operation in diff_fromDelta: "+a[l])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return i},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){var r=function(e,r){var i=e/t.length,s=Math.abs(n-r);return o.Match_Distance?i+s/o.Match_Distance:s?1:i};if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),o=this,s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(r(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(r(0,a),s)));var l,c,u=1<<t.length-1;a=-1;for(var h,d=t.length+e.length,f=0;f<t.length;f++){for(l=0,c=d;l<c;)r(f,n+c)<=s?l=c:d=c,c=Math.floor((d-l)/2+l);d=c;var p=Math.max(1,n-c+1),m=Math.min(n+c,e.length)+t.length,g=Array(m+2);g[m+1]=(1<<f)-1;for(var v=m;v>=p;v--){var b=i[e.charAt(v-1)];if(g[v]=0===f?(g[v+1]<<1|1)&b:(g[v+1]<<1|1)&b|(h[v+1]|h[v])<<1|1|h[v+1],g[v]&u){var y=r(f,v-1);if(y<=s){if(s=y,!((a=v-1)>n))break;p=Math.max(1,2*n-a)}}}if(r(f+1,n)>s)break;h=g}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var r=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=n.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new t.Diff(0,o));var s=n.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new t.Diff(0,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},t.prototype.patch_make=function(e,r,i){var o,s;if("string"==typeof e&&"string"==typeof r&&void 0===i)o=e,(s=this.diff_main(o,r,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)s=e,o=this.diff_text1(s);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,s=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,s=i}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,u=0,h=0,d=o,f=o,p=0;p<s.length;p++){var m=s[p][0],g=s[p][1];switch(c||0===m||(l.start1=u,l.start2=h),m){case 1:l.diffs[c++]=s[p],l.length2+=g.length,f=f.substring(0,h)+g+f.substring(h);break;case n:l.length1+=g.length,l.diffs[c++]=s[p],f=f.substring(0,h)+f.substring(h+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&s.length!=p+1?(l.diffs[c++]=s[p],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=f,u=h)}1!==m&&(u+=g.length),m!==n&&(h+=g.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=new t.patch_obj;o.diffs=[];for(var s=0;s<i.diffs.length;s++)o.diffs[s]=new t.Diff(i.diffs[s][0],i.diffs[s][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,n[r]=o}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var r=this.patch_addPadding(e);t=r+t+r,this.patch_splitMax(e);for(var i=0,o=[],s=0;s<e.length;s++){var a,l,c=e[s].start2+i,u=this.diff_text1(e[s].diffs),h=-1;if(u.length>this.Match_MaxBits?-1!=(a=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(h=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||a>=h)&&(a=-1):a=this.match_main(t,u,c),-1==a)o[s]=!1,i-=e[s].length2-e[s].length1;else if(o[s]=!0,i=a-c,u==(l=-1==h?t.substring(a,a+u.length):t.substring(a,h+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+u.length);else{var d=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(d)/u.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,p=0,m=0;m<e[s].diffs.length;m++){var g=e[s].diffs[m];0!==g[0]&&(f=this.diff_xIndex(d,p)),1===g[0]?t=t.substring(0,a+f)+g[1]+t.substring(a+f):g[0]===n&&(t=t.substring(0,a+f)+t.substring(a+this.diff_xIndex(d,p+g[1].length))),g[0]!==n&&(p+=g[1].length)}}}}return[t=t.substring(r.length,t.length-r.length),o]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r="",i=1;i<=n;i++)r+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var o=e[0],s=o.diffs;if(0==s.length||0!=s[0][0])s.unshift(new t.Diff(0,r)),o.start1-=n,o.start2-=n,o.length1+=n,o.length2+=n;else if(n>s[0][1].length){var a=n-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}return 0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0]?(s.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n):n>s[s.length-1][1].length&&(a=n-s[s.length-1][1].length,s[s.length-1][1]+=r.substring(0,a),o.length1+=a,o.length2+=a),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=r)){var o=e[i];e.splice(i--,1);for(var s=o.start1,a=o.start2,l="";0!==o.diffs.length;){var c=new t.patch_obj,u=!0;for(c.start1=s-l.length,c.start2=a-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==o.diffs.length&&c.length1<r-this.Patch_Margin;){var h=o.diffs[0][0],d=o.diffs[0][1];1===h?(c.length2+=d.length,a+=d.length,c.diffs.push(o.diffs.shift()),u=!1):h===n&&1==c.diffs.length&&0==c.diffs[0][0]&&d.length>2*r?(c.length1+=d.length,s+=d.length,u=!1,c.diffs.push(new t.Diff(h,d)),o.diffs.shift()):(d=d.substring(0,r-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===h?(c.length2+=d.length,a+=d.length):u=!1,c.diffs.push(new t.Diff(h,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),u||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var r=[];if(!e)return r;for(var i=e.split("\n"),o=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<i.length;){var a=i[o].match(s);if(!a)throw new Error("Invalid patch string: "+i[o]);var l=new t.patch_obj;for(r.push(l),l.start1=parseInt(a[1],10),""===a[2]?(l.start1--,l.length1=1):"0"==a[2]?l.length1=0:(l.start1--,l.length1=parseInt(a[2],10)),l.start2=parseInt(a[3],10),""===a[4]?(l.start2--,l.length2=1):"0"==a[4]?l.length2=0:(l.start2--,l.length2=parseInt(a[4],10)),o++;o<i.length;){var c=i[o].charAt(0);try{var u=decodeURI(i[o].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+u)}if("-"==c)l.diffs.push(new t.Diff(n,u));else if("+"==c)l.diffs.push(new t.Diff(1,u));else if(" "==c)l.diffs.push(new t.Diff(0,u));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+u)}o++}}return r},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[r+1]=e+encodeURI(this.diffs[r][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},75812:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=l(h,n),h!==(i=l(t,n))&&(p&&i&&(s(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},a(h,{name:n,newValue:e(p,u,i)})):void 0!==i&&a(h,{name:n,newValue:i}));return h}},49098:(e,t,n)=>{"use strict";var r=n(45193),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var s=u(n);h&&(s=s.concat(h(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var v=s[g];if(!(o[v]||r&&r[v]||m&&m[v]||a&&a[v])){var b=d(n,v);try{c(t,v,b)}catch(e){}}}}return t}},87872:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){var h=function(e){var t=e.match(n);t&&(w+=t.length);var r=e.lastIndexOf("\n");_=~r?e.length-r:_+e.length},d=function(){var e={line:w,column:_};return function(t){return t.position=new f(e),g(),t}},f=function(e){this.start=e,this.end={line:w,column:_},this.source=l.source},p=function(t){var n=new Error(l.source+":"+w+":"+_+": "+t);if(n.reason=t,n.filename=l.source,n.line=w,n.column=_,n.source=e,!l.silent)throw n;A.push(n)},m=function(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}},g=function(){m(r)},v=function(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e},b=function(){var t=d();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return p("End of comment missing");var r=e.slice(2,n-2);return _+=2,h(r),e=e.slice(n),_+=2,t({type:"comment",comment:r})}},y=function(){var e=d(),n=m(i);if(n){if(b(),!m(o))return p("property missing ':'");var r=m(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return m(a),l}};if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var w=1,_=1;f.prototype.content=e;var A=[];return g(),function(){var e,t=[];for(v(t);e=y();)!1!==e&&(t.push(e),v(t));return t}()}},574:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},59471:(e,t,n)=>{var r,i=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o="__lodash_hash_undefined__",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,p=d||f||Function("return this")(),m=Array.prototype,g=Function.prototype,v=Object.prototype,b=p["__core-js_shared__"],y=(r=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",w=g.toString,_=v.hasOwnProperty,A=v.toString,x=RegExp("^"+w.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=p.Symbol,S=m.splice,E=I(p,"Map"),k=I(Object,"create"),$=C?C.prototype:void 0,M=$?$.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function F(e,t){var n,r,o=e.__data__;return("string"==(r=void 0===(n=t)?"undefined":i(n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!B(e)||y&&y in e)return!1;var t=function(e){var t=B(e)?A.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?x:h;return t.test(function(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}T.prototype.clear=function(){this.__data__=k?k(null):{}},T.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},T.prototype.get=function(e){var t=this.__data__;if(k){var n=t[e];return n===o?void 0:n}return _.call(t,e)?t[e]:void 0},T.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:_.call(t,e)},T.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?o:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=O(t,e);return!(n<0||(n==t.length-1?t.pop():S.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=O(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return O(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=O(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new T,map:new(E||R),string:new T}},L.prototype.delete=function(e){return F(this,e).delete(e)},L.prototype.get=function(e){return F(this,e).get(e)},L.prototype.has=function(e){return F(this,e).has(e)},L.prototype.set=function(e,t){return F(this,e).set(e,t),this};var D=P((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(N(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(u,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function P(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(P.Cache||L),n}P.Cache=L;var U=Array.isArray;function B(e){var t=void 0===e?"undefined":i(e);return!!e&&("object"==t||"function"==t)}function N(e){return"symbol"==(void 0===e?"undefined":i(e))||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==A.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=function(e,t){if(U(e))return!1;var n=void 0===e?"undefined":i(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!N(e))||a.test(e)||!s.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:U(n=t)?n:D(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[j(t[r++])];return r&&r==o?e:void 0}(e,t);return void 0===r?n:r}},92690:e=>{"use strict";var t={};function n(e,r,i){var o,s,a,l,c,u="";for("string"!=typeof r&&(i=r,r=n.defaultChars),void 0===i&&(i=!0),c=function(e){var n,r,i=t[e];if(i)return i;for(i=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?i.push(r):i.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)i[e.charCodeAt(n)]=e[n];return i}(r),o=0,s=e.length;o<s;o++)if(a=e.charCodeAt(o),i&&37===a&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(a<128)u+=c[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},60731:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,a=new t(512),l=new t(512),c=new t(512);function u(e){return a.get(e)||a.set(e,h(e).map((function(e){return e.replace(s,"$2")})))}function h(e){return e.match(n)||[""]}function d(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function f(e){return!d(e)&&(function(e){return e.match(i)&&!e.match(r)}(e)||function(e){return o.test(e)}(e))}e.exports={Cache:t,split:h,normalizePath:u,setter:function(e){var t=u(e);return l.get(e)||l.set(e,(function(e,n){for(var r=0,i=t.length,o=e;r<i-1;){var s=t[r];if("__proto__"===s||"constructor"===s||"prototype"===s)return e;o=o[t[r++]]}o[t[r]]=n}))},getter:function(e,t){var n=u(e);return c.get(e)||c.set(e,(function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(d(t)||r.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,i,o,s,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(f(r)&&(r='"'+r+'"'),o=!(s=d(r))&&/^\d+$/.test(r),t.call(n,r,s,o,i,e))}(Array.isArray(e)?e:h(e),t,n)}}},86957:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){var n,i;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(i=Array)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?!!i[Symbol.hasInstance](n):n instanceof i)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){var n=function(){this.constructor=e};if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(31489),a=n(95304),l=n(81672),c=n(87284),u=n(44510),h=(0,u.getAceInstance)(),d=function(e){var t=function(t){var n=e.call(this,t)||this;return u.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=u.debounce,n};return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.onValidate,o=t.mode,s=t.focus,a=t.theme,l=t.fontSize,c=t.value,d=t.defaultValue,f=t.showGutter,p=t.wrapEnabled,m=t.showPrintMargin,g=t.scrollMargin,v=void 0===g?[0,0,0,0]:g,b=t.keyboardHandler,y=t.onLoad,w=t.commands,_=t.annotations,A=t.markers,x=t.placeholder;this.editor=h.edit(this.refEditor),r&&r(h);for(var C=Object.keys(this.props.editorProps),S=0;S<C.length;S++)this.editor[C[S]]=this.props.editorProps[C[S]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(v[0],v[1],v[2],v[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof o?"ace/mode/".concat(o):o),a&&""!==a&&this.editor.setTheme("ace/theme/".concat(a)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),this.editor.getSession().setValue(d||c||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(m),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),x&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",(function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)})),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(_||[]),A&&A.length>0&&this.handleMarkers(A);var E=this.editor.$options;u.editorOptions.forEach((function(t){E.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(w)&&w.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),n&&(this.refEditor.className+=" "+n),y&&y(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r<u.editorOptions.length;r++){var i=u.editorOptions[r];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+n.className+" "+o.join(" ")}var s=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(s){this.silent=!0;var a=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(a),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!s&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&this.editor.getSession().removeMarker(n[r].id);for(var r in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(r)&&"ace_active-line"!==n[r].clazz&&"ace_selected-word"!==n[r].clazz&&this.editor.getSession().removeMarker(n[r].id);e.forEach((function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,a=e.className,l=e.type,c=e.inFront,u=void 0!==c&&c,h=new s.Range(n,r,i,o);t.editor.getSession().addMarker(h,a,l,u)}))},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,i=e.style,s=o({width:n,height:r},i);return l.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=d},22963:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){var n,i;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(i=Array)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?!!i[Symbol.hasInstance](n):n instanceof i)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){var n=function(){this.constructor=e};if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(95304),s=n(81672),a=n(95055),l=n(75874),c=function(e){var t=function(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n};return i(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var r=e.diff_main(t,n);e.diff_cleanupSemantic(r);var i=this.generateDiffedLines(r);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach((function(e){var r=e[0],i=e[1],o=i.split("\n").length-1;if(0!==i.length){var s=i[0],a=i[i.length-1],l=0;switch(r){case 0:n.left+=o,n.right+=o;break;case-1:"\n"===s&&(n.left++,o--),0===(l=o)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===a&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=o;break;case 1:"\n"===s&&(n.right++,o--),0===(l=o)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===a&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=o;break;default:throw new Error("Diff type was not defined.")}}})),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},r=0;r<e.left.length;r++){var i={startRow:e.left[r].startLine-1,endRow:e.left[r].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(r=0;r<e.right.length;r++)i={startRow:e.right[r].startLine-1,endRow:e.right[r].endLine,type:"text",className:"codeMarker"},n.right.push(i);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return s.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:o.number,editorProps:o.object,enableBasicAutocompletion:o.bool,enableLiveAutocompletion:o.bool,focus:o.bool,fontSize:o.number,height:o.string,highlightActiveLine:o.bool,maxLines:o.number,minLines:o.number,mode:o.string,name:o.string,className:o.string,onLoad:o.func,onPaste:o.func,onScroll:o.func,onChange:o.func,orientation:o.string,readOnly:o.bool,scrollMargin:o.array,setOptions:o.object,showGutter:o.bool,showPrintMargin:o.bool,splits:o.number,style:o.object,tabSize:o.number,theme:o.string,value:o.array,width:o.string,wrapEnabled:o.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(s.Component);t.default=c},44510:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(n.g.window={},e=n(31489),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(31489),e},t.debounce=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,i)}),t)}}},53516:(e,t,n)=>{"use strict";var r=n(86957);n(22963).default,n(95055).default,t.ZP=r.default},95055:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){var n,i;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(i=Array)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?!!i[Symbol.hasInstance](n):n instanceof i)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){var n=function(){this.constructor=e};if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(44510),a=(0,s.getAceInstance)(),l=n(31489),c=n(21947),u=n(95304),h=n(81672),d=n(87284),f=n(59471),p=function(e){var t=function(t){var n=e.call(this,t)||this;return s.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=s.debounce,n};return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.mode,o=t.focus,l=t.theme,u=t.fontSize,h=t.value,d=t.defaultValue,p=t.cursorStart,m=t.showGutter,g=t.wrapEnabled,v=t.showPrintMargin,b=t.scrollMargin,y=void 0===b?[0,0,0,0]:b,w=t.keyboardHandler,_=t.onLoad,A=t.commands,x=t.annotations,C=t.markers,S=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),r&&r(a);var E=Object.keys(this.props.editorProps),k=new c.Split(this.editor.container,"ace/theme/".concat(l),S);this.editor.env.split=k,this.splitEditor=k.getEditor(0),this.split=k,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var $=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),k.forEach((function(t,n){for(var r=0;r<E.length;r++)t[E[r]]=e.props.editorProps[E[r]];var o=f(d,n),c=f(h,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(i)),t.setFontSize(u),t.renderer.setShowGutter(m),t.getSession().setUseWrapMode(g),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===o?c:o,p);var b=f(x,n,[]),_=f(C,n,[]);for(t.getSession().setAnnotations(b),_&&_.length>0&&e.handleMarkers(_,t),r=0;r<s.editorOptions.length;r++){var S=s.editorOptions[r];$.hasOwnProperty(S)?t.setOption(S,e.props[S]):e.props[S]&&console.warn("ReaceAce: editor option ".concat(S," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(A)&&A.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),w&&t.setKeyboardHandler("ace/keyboard/"+w)})),n&&(this.refEditor.className+=" "+n),o&&this.splitEditor.focus();var M=this.editor.env.split;M.setOrientation("below"===this.props.orientation?M.BELOW:M.BESIDE),M.resize(!0),_&&_(M)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,i=this.editor.env.split;if(r.splits!==n.splits&&i.setSplits(r.splits),r.orientation!==n.orientation&&i.setOrientation("below"===r.orientation?i.BELOW:i.BESIDE),i.forEach((function(e,i){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var o=0;o<s.editorOptions.length;o++){var a=s.editorOptions[o];r[a]!==n[a]&&e.setOption(a,r[a])}d(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=f(r.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=f(r.annotations,i,[]),h=f(n.annotations,i,[]);d(u,h)||e.getSession().setAnnotations(u);var p=f(r.markers,i,[]),m=f(n.markers,i,[]);!d(p,m)&&Array.isArray(p)&&t.handleMarkers(p,e)})),r.className!==n.className){var o=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+r.className+" "+o.join(" ")}r.theme!==n.theme&&i.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach((function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,h=new l.Range(n,r,i,o);t.getSession().addMarker(h,s,a,u)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,i=e.style,s=o({width:n,height:r},i);return h.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(h.Component);t.default=p},51430:(e,t,n)=>{"use strict";n.d(t,{SV:()=>g});var r=n(81672);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?o(e):t}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}f({},"ErrorBoundary",(function(){return g})),f({},"ErrorBoundaryContext",(function(){return p}));var p=(0,r.createContext)(null),m={didCatch:!1,error:null},g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(v,e);var t,n,i,d,f,g=(d=v,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(d);if(f){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function v(){var e;return s(this,v),l(o(e=g.apply(this,arguments)),"state",m),l(o(e),"resetErrorBoundary",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i,o,s=e.state,a=s.error;null!==a&&(null===(o=(i=e.props).onReset)||void 0===o||o.call(i,{args:n,reason:"imperative-api"}),e.setState(m))})),e}return t=v,n=[{key:"componentDidCatch",value:function(e,t){var n,r;null===(r=(n=this.props).onError)||void 0===r||r.call(n,e,t)}},{key:"componentDidUpdate",value:function(e,t){var n,r,i=this.state.didCatch,o=this.props.resetKeys;i&&null!==t.error&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((function(e,n){return!Object.is(e,t[n])}))}(e.resetKeys,o)&&(null===(r=(n=this.props).onReset)||void 0===r||r.call(n,{next:o,prev:e.resetKeys,reason:"keys"}),this.setState(m))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.fallbackRender,i=e.FallbackComponent,o=e.fallback,s=this.state,a=s.didCatch,l=s.error,c=t;if(a){var u={error:l,resetErrorBoundary:this.resetErrorBoundary};if((0,r.isValidElement)(o))c=o;else if("function"==typeof n)c=n(u);else{if(!i)throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");c=(0,r.createElement)(i,u)}}return(0,r.createElement)(p.Provider,{value:{didCatch:a,error:l,resetErrorBoundary:this.resetErrorBoundary}},c)}}],i=[{key:"getDerivedStateFromError",value:function(e){return{didCatch:!0,error:e}}}],n&&a(t.prototype,n),i&&a(t,i),v}(r.Component);function v(){var e=(0,r.useContext)(p);!function(e){if(null==e||"boolean"!=typeof e.didCatch||"function"!=typeof e.resetErrorBoundary)throw new Error("ErrorBoundaryContext not found")}(e);var t,n,o=(t=(0,r.useState)({error:null,hasError:!1}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1],l=(0,r.useMemo)((function(){return{resetBoundary:function(){null==e||e.resetErrorBoundary(),a({error:null,hasError:!1})},showBoundary:function(e){return a({error:e,hasError:!0})}}}),[null==e?void 0:e.resetErrorBoundary]);if(s.hasError)throw s.error;return l}function b(e,t){var n=(0,r.forwardRef)((function(n,i){return(0,r.createElement)(g,t,(0,r.createElement)(e,(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},n),s=null!=(s={ref:i})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(s)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(s)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(s,e))})),o)));var o,s})),i=e.displayName||e.name||"Unknown";return n.displayName="withErrorBoundary(".concat(i,")"),n}f({},"useErrorBoundary",(function(){return v})),f({},"withErrorBoundary",(function(){return b}))},2999:e=>{"use strict";function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var n=Array.isArray,r=Object.keys,i=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;function s(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var l,c,u,h=n(e),d=n(a);if(h&&d){if((c=e.length)!=a.length)return!1;for(l=c;0!=l--;)if(!s(e[l],a[l]))return!1;return!0}if(h!=d)return!1;var f=t(e,Date),p=t(a,Date);if(f!=p)return!1;if(f&&p)return e.getTime()==a.getTime();var m=t(e,RegExp),g=t(a,RegExp);if(m!=g)return!1;if(m&&g)return e.toString()==a.toString();var v=r(e);if((c=v.length)!==r(a).length)return!1;for(l=c;0!=l--;)if(!i.call(a,v[l]))return!1;if(o&&t(e,Element)&&t(a,Element))return e===a;for(l=c;0!=l--;)if(!("_owner"===(u=v[l])&&e.$$typeof||s(e[u],a[u])))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return s(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},14062:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,o=60108,s=60114,a=60109,l=60110,c=60112,u=60113,h=60120,d=60115,f=60116,p=60121,m=60122,g=60117,v=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var y=Symbol.for;n=y("react.element"),r=y("react.portal"),i=y("react.fragment"),o=y("react.strict_mode"),s=y("react.profiler"),a=y("react.provider"),l=y("react.context"),c=y("react.forward_ref"),u=y("react.suspense"),h=y("react.suspense_list"),d=y("react.memo"),f=y("react.lazy"),p=y("react.block"),m=y("react.server.block"),g=y("react.fundamental"),v=y("react.debug_trace_mode"),b=y("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case s:case o:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case c:case f:case d:case a:return e;default:return t}}case r:return t}}}var _=a,A=n,x=c,C=i,S=f,E=d,k=r,$=s,M=o,T=u;t.ContextConsumer=l,t.ContextProvider=_,t.Element=A,t.ForwardRef=x,t.Fragment=C,t.Lazy=S,t.Memo=E,t.Portal=k,t.Profiler=$,t.StrictMode=M,t.Suspense=T,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===c},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===f},t.isMemo=function(e){return w(e)===d},t.isPortal=function(e){return w(e)===r},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===u},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===v||e===o||e===u||e===h||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===p||e[0]===m)},t.typeOf=w},32815:(e,t,n)=>{"use strict";e.exports=n(14062)},68903:(e,t,n)=>{"use strict";n.d(t,{VK:()=>u});var r,i,o=n(81672),s=n(14727),a=n(2084);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){var t=e.basename,n=e.children,r=e.window,i=o.useRef();null==i.current&&(i.current=(0,a.lX)({window:r,v5Compat:!0}));var l=i.current,u=c(o.useState({action:l.action,location:l.location}),2),h=u[0],d=u[1];return o.useLayoutEffect((function(){return l.listen(d)}),[l]),o.createElement(s.F0,{basename:t,children:n,location:h.location,navigationType:h.action,navigator:l})}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(r||(r={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(i||(i={}))},14727:(e,t,n)=>{"use strict";n.d(t,{AW:()=>I,F0:()=>D,UO:()=>$,Z5:()=>j});var r=n(2084),i=n(81672);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function l(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function c(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}var h=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}var p="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},m=i.useState,g=i.useEffect,v=i.useLayoutEffect,b=i.useDebugValue;function y(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!p(n,r)}catch(e){return!0}}"undefined"==typeof window||void 0===window.document||window.document.createElement;var w=("useSyncExternalStore"in i&&function(e){e.useSyncExternalStore}(i),i.createContext(null)),_=i.createContext(null),A=i.createContext(null),x=i.createContext(null),C=i.createContext(null),S=i.createContext({outlet:null,matches:[]}),E=i.createContext(null);function k(){return null!=i.useContext(C)}function $(){var e=i.useContext(S).matches,t=e[e.length-1];return t?t.params:{}}function M(){var e=function(){var e,t=i.useContext(E),n=function(e){var t=i.useContext(A);return t||(0,r.kG)(!1),t}(R.UseRouteError),o=i.useContext(S),s=o.matches[o.matches.length-1];return t||(o||(0,r.kG)(!1),!s.route.id&&(0,r.kG)(!1),null==(e=n.errors)?void 0:e[s.route.id])}(),t=(0,r.WK)(e)?e.status+" "+e.statusText:l(e,Error)?e.message:JSON.stringify(e),n=l(e,Error)?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unhandled Thrown Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:s},n):null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"errorElement")," props on ",i.createElement("code",{style:a},"<Route>")))}var T,R,L,O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(d,e);var t,n,r,o,l,h=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=a(t);if(n){var i=a(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=h.call(this,e)).state={location:e.location,error:e.error},t}return r=d,l=[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}],(o=[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?i.createElement(E.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}])&&s(r.prototype,o),l&&s(r,l),d}(i.Component);function F(e){var t=e.routeContext,n=e.match,r=e.children,o=i.useContext(w);return o&&n.route.errorElement&&(o._deepestRenderedBoundaryId=n.route.id),i.createElement(S.Provider,{value:t},r)}function I(e){(0,r.kG)(!1)}function D(e){var t=e.basename,n=void 0===t?"/":t,o=e.children,s=void 0===o?null:o,a=e.location,l=e.navigationType,c=void 0===l?r.aU.Pop:l,u=e.navigator,h=e.static,d=void 0!==h&&h;k()&&(0,r.kG)(!1);var f=n.replace(/^\/*/,"/"),p=i.useMemo((function(){return{basename:f,navigator:u,static:d}}),[f,u,d]);"string"==typeof a&&(a=(0,r.cP)(a));var m=a.pathname,g=void 0===m?"/":m,v=a.search,b=void 0===v?"":v,y=a.hash,w=void 0===y?"":y,_=a.state,A=void 0===_?null:_,S=a.key,E=void 0===S?"default":S,$=i.useMemo((function(){var e=(0,r.Zn)(g,f);return null==e?null:{pathname:e,search:b,hash:w,state:A,key:E}}),[f,g,b,w,A,E]);return null==$?null:i.createElement(x.Provider,{value:p},i.createElement(C.Provider,{children:s,value:{location:$,navigationType:c}}))}function j(e){var t=e.children,n=e.location,o=i.useContext(_);return function(e,t){k()||(0,r.kG)(!1);var n,o=i.useContext(A),s=i.useContext(S).matches,a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/"),u=(a&&a.route,k()||(0,r.kG)(!1),i.useContext(C).location);if(t){var h,d="string"==typeof t?(0,r.cP)(t):t;"/"===c||(null==(h=d.pathname)?void 0:h.startsWith(c))||(0,r.kG)(!1),n=d}else n=u;var p=n.pathname||"/",m="/"===c?p:p.slice(c.length)||"/",g=(0,r.fp)(e,{pathname:m}),v=function(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var o=e,s=null==n?void 0:n.errors;if(null!=s){var a=o.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));a>=0||(0,r.kG)(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((function(e,r,a){var l=r.route.id?null==s?void 0:s[r.route.id]:null,c=n?r.route.errorElement||i.createElement(M,null):null,u=function(){return i.createElement(F,{match:r,routeContext:{outlet:e,matches:t.concat(o.slice(0,a+1))}},l?c:void 0!==r.route.element?r.route.element:e)};return n&&(r.route.errorElement||0===a)?i.createElement(O,{location:n.location,component:c,error:l,children:u()}):u()}),null)}(g&&g.map((function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:(0,r.RQ)([c,e.pathname]),pathnameBase:"/"===e.pathnameBase?c:(0,r.RQ)([c,e.pathnameBase])})})),s,o||void 0);return t&&v?i.createElement(C.Provider,{value:{location:f({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:r.aU.Pop}},v):v}(o&&!t?o.router.routes:P(t),n)}!function(e){e.UseRevalidator="useRevalidator"}(T||(T={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(R||(R={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(L||(L={}));new Promise((function(){}));function P(e,t){void 0===t&&(t=[]);var n=[];return i.Children.forEach(e,(function(e,s){if(i.isValidElement(e))if(e.type!==i.Fragment){e.type!==I&&(0,r.kG)(!1),e.props.index&&e.props.children&&(0,r.kG)(!1);var a=(c=t,function(e){if(Array.isArray(e))return o(e)}(c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||d(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([s]),l={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(l.children=P(e.props.children,a)),n.push(l)}else n.push.apply(n,P(e.props.children,t));var c})),n}i.Component},92929:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isForwardRef=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case s:case o:case h:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case p:case f:case a:return e;default:return t}}case r:return t}}}(e)===u}},8218:(e,t,n)=>{"use strict";e.exports=n(92929)},58108:(e,t,n)=>{function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=Symbol("SemVer ANY"),s=function(){"use strict";function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=a(n),i(t,e)){if(t.loose===!!n.loose)return t;t=t.value}d("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===o?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}var t,n,s;return t=e,s=[{key:"ANY",get:function(){return o}}],(n=[{key:"parse",value:function(e){var t=this.options.loose?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=o}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(d("Comparator.test",e,this.options.loose),this.semver===o||e===o)return!0;if("string"==typeof e)try{e=new f(e,this.options)}catch(e){return!1}return h(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!i(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new p(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new p(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),s=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),l=h(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=h(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||o||s&&a||l||c}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s;var a=n(30288),l=n(79133),c=l.re,u=l.t,h=n(88572),d=n(77857),f=n(94738),p=n(68611)},68611:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var s=function(){"use strict";function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=l(n),o(t,e))return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(o(t,c))return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split("||").map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));if(this.set.length>1){var i=this.set[0];if(this.set=this.set.filter((function(e){return!b(e[0])})),0===this.set.length)this.set=[i];else if(this.set.length>1){var s=!0,a=!1,u=void 0;try{for(var h,d=this.set[Symbol.iterator]();!(s=(h=d.next()).done);s=!0){var f=h.value;if(1===f.length&&y(f[0])){this.set=[f];break}}}catch(e){a=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(a)throw u}}}}this.format()}var t,n;return t=e,(n=[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this;e=e.trim();var n=Object.keys(this.options).join(","),i="parseRange:".concat(n,":").concat(e),o=a.get(i);if(o)return o;var s=this.options.loose,l=s?f[p.HYPHENRANGELOOSE]:f[p.HYPHENRANGE];e=e.replace(l,R(this.options.includePrerelease)),u("hyphen replace",e),e=e.replace(f[p.COMPARATORTRIM],m),u("comparator trim",e);var h=(e=(e=(e=e.replace(f[p.TILDETRIM],g)).replace(f[p.CARETTRIM],v)).split(/\s+/).join(" ")).split(" ").map((function(e){return _(e,t.options)})).join(" ").split(/\s+/).map((function(e){return T(e,t.options)}));s&&(h=h.filter((function(e){return u("loose invalid filter",e,t.options),!!e.match(f[p.COMPARATORLOOSE])}))),u("range list",h);var d=new Map,y=h.map((function(e){return new c(e,t.options)})),w=!0,A=!1,x=void 0;try{for(var C,S=y[Symbol.iterator]();!(w=(C=S.next()).done);w=!0){var E=C.value;if(b(E))return[E];d.set(E.value,E)}}catch(e){A=!0,x=e}finally{try{w||null==S.return||S.return()}finally{if(A)throw x}}d.size>1&&d.has("")&&d.delete("");var k,$=function(e){if(Array.isArray(e))return r(e)}(k=d.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(k)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(k)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return a.set(i,$),$}},{key:"intersects",value:function(t,n){if(!o(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return w(e,n)&&t.set.some((function(t){return w(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new h(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(L(this.set[t],e,this.options))return!0;return!1}}])&&i(t.prototype,n),e}();e.exports=s;var a=new(n(36425))({max:1e3}),l=n(30288),c=n(58108),u=n(77857),h=n(94738),d=n(79133),f=d.re,p=d.t,m=d.comparatorTrimReplace,g=d.tildeTrimReplace,v=d.caretTrimReplace,b=function(e){return"<0.0.0-0"===e.value},y=function(e){return""===e.value},w=function(e,t){for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every((function(e){return i.intersects(e,t)})),i=r.pop();return n},_=function(e,t){return u("comp",e,t),e=S(e,t),u("caret",e),e=x(e,t),u("tildes",e),e=k(e,t),u("xrange",e),e=M(e,t),u("stars",e),e},A=function(e){return!e||"x"===e.toLowerCase()||"*"===e},x=function(e,t){return e.trim().split(/\s+/).map((function(e){return C(e,t)})).join(" ")},C=function(e,t){var n=t.loose?f[p.TILDELOOSE]:f[p.TILDE];return e.replace(n,(function(t,n,r,i,o){var s;return u("tilde",e,t,n,r,i,o),A(n)?s="":A(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):A(i)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(u("replaceTilde pr",o),s=">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),u("tilde return",s),s}))},S=function(e,t){return e.trim().split(/\s+/).map((function(e){return E(e,t)})).join(" ")},E=function(e,t){u("caret",e,t);var n=t.loose?f[p.CARETLOOSE]:f[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,i,o,s){var a;return u("caret",e,t,n,i,o,s),A(n)?a="":A(i)?a=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):A(o)?a="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(u("replaceCaret pr",s),a="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(+n+1,".0.0-0")):(u("no pr"),a="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o," <").concat(+n+1,".0.0-0")),u("caret return",a),a}))},k=function(e,t){return u("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return $(e,t)})).join(" ")},$=function(e,t){e=e.trim();var n=t.loose?f[p.XRANGELOOSE]:f[p.XRANGE];return e.replace(n,(function(n,r,i,o,s,a){u("xRange",e,n,r,i,o,s,a);var l=A(i),c=l||A(o),h=c||A(s),d=h;return"="===r&&d&&(r=""),a=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(c&&(o=0),s=0,">"===r?(r=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),"<"===r&&(a="-0"),n="".concat(r+i,".").concat(o,".").concat(s).concat(a)):c?n=">=".concat(i,".0.0").concat(a," <").concat(+i+1,".0.0-0"):h&&(n=">=".concat(i,".").concat(o,".0").concat(a," <").concat(i,".").concat(+o+1,".0-0")),u("xRange return",n),n}))},M=function(e,t){return u("replaceStars",e,t),e.trim().replace(f[p.STAR],"")},T=function(e,t){return u("replaceGTE0",e,t),e.trim().replace(f[t.includePrerelease?p.GTE0PRE:p.GTE0],"")},R=function(e){return function(t,n,r,i,o,s,a,l,c,u,h,d,f){return n=A(r)?"":A(i)?">=".concat(r,".0.0").concat(e?"-0":""):A(o)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):s?">=".concat(n):">=".concat(n).concat(e?"-0":""),l=A(c)?"":A(u)?"<".concat(+c+1,".0.0-0"):A(h)?"<".concat(c,".").concat(+u+1,".0-0"):d?"<=".concat(c,".").concat(u,".").concat(h,"-").concat(d):e?"<".concat(c,".").concat(u,".").concat(+h+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()}},L=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(u(e[i].semver),e[i].semver!==c.ANY&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}},94738:(e,t,n)=>{function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=n(77857),s=n(86679),a=s.MAX_LENGTH,l=s.MAX_SAFE_INTEGER,c=n(79133),u=c.re,h=c.t,d=n(30288),f=n(61767).compareIdentifiers,p=function(){"use strict";function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=d(n),i(t,e)){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>a)throw new TypeError("version is longer than ".concat(a," characters"));o("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?u[h.LOOSE]:u[h.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw new TypeError("Invalid major version");if(this.minor>l||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>l||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<l)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}var t,n;return t=e,(n=[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(o("SemVer.compare",this.version,this.options,t),!i(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return i(t,e)||(t=new e(t,this.options)),f(this.major,t.major)||f(this.minor,t.minor)||f(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(i(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],s=t.prerelease[n];if(o("prerelease compare",n,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return f(r,s)}while(++n)}},{key:"compareBuild",value:function(t){i(t,e)||(t=new e(t,this.options));var n=0;do{var r=this.build[n],s=t.build[n];if(o("prerelease compare",n,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return f(r,s)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(0===f(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}])&&r(t.prototype,n),e}();e.exports=p},44818:(e,t,n)=>{var r=n(25712);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},88572:(e,t,n)=>{var r=n(81176),i=n(43805),o=n(39632),s=n(84842),a=n(92561),l=n(42730);e.exports=function(e,t,n,c){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return i(e,n,c);case">":return o(e,n,c);case">=":return s(e,n,c);case"<":return a(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError("Invalid operator: ".concat(t))}}},44593:(e,t,n)=>{var r=n(94738),i=n(25712),o=n(79133),s=o.re,a=o.t;e.exports=function(e,t){if(n=e,null!=(o=r)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](n):n instanceof o)return e;var n,o;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var l=null;if((t=t||{}).rtl){for(var c;(c=s[a.COERCERTL].exec(e))&&(!l||l.index+l[0].length!==e.length);)l&&c.index+c[0].length===l.index+l[0].length||(l=c),s[a.COERCERTL].lastIndex=c.index+c[1].length+c[2].length;s[a.COERCERTL].lastIndex=-1}else l=e.match(s[a.COERCE]);return null===l?null:i("".concat(l[2],".").concat(l[3]||"0",".").concat(l[4]||"0"),t)}},86181:(e,t,n)=>{var r=n(94738);e.exports=function(e,t,n){var i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},3062:(e,t,n)=>{var r=n(98469);e.exports=function(e,t){return r(e,t,!0)}},98469:(e,t,n)=>{var r=n(94738);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},90410:(e,t,n)=>{var r=n(25712),i=n(81176);e.exports=function(e,t){if(i(e,t))return null;var n=r(e),o=r(t),s=n.prerelease.length||o.prerelease.length,a=s?"pre":"",l=s?"prerelease":"";for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==o[c])return a+c;return l}},81176:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return 0===r(e,t,n)}},39632:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return r(e,t,n)>0}},84842:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return r(e,t,n)>=0}},40678:(e,t,n)=>{var r=n(94738);e.exports=function(e,t,n,i){"string"==typeof n&&(i=n,n=void 0);try{return new r((o=e,s=r,(null!=s&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](o):o instanceof s)?e.version:e),n).inc(t,i).version}catch(e){return null}var o,s}},92561:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return r(e,t,n)<0}},42730:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return r(e,t,n)<=0}},82299:(e,t,n)=>{var r=n(94738);e.exports=function(e,t){return new r(e,t).major}},70705:(e,t,n)=>{var r=n(94738);e.exports=function(e,t){return new r(e,t).minor}},43805:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return 0!==r(e,t,n)}},25712:(e,t,n)=>{var r=n(86679).MAX_LENGTH,i=n(79133),o=i.re,s=i.t,a=n(94738),l=n(30288);e.exports=function(e,t){if(t=l(t),n=e,null!=(i=a)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](n):n instanceof i)return e;var n,i;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[s.LOOSE]:o[s.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},76287:(e,t,n)=>{var r=n(94738);e.exports=function(e,t){return new r(e,t).patch}},40855:(e,t,n)=>{var r=n(25712);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},13814:(e,t,n)=>{var r=n(98469);e.exports=function(e,t,n){return r(t,e,n)}},23493:(e,t,n)=>{var r=n(86181);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},24002:(e,t,n)=>{var r=n(68611);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},48363:(e,t,n)=>{var r=n(86181);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},96391:(e,t,n)=>{var r=n(25712);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},17740:(e,t,n)=>{var r=n(79133),i=n(86679),o=n(94738),s=n(61767),a=n(25712),l=n(96391),c=n(44818),u=n(40678),h=n(90410),d=n(82299),f=n(70705),p=n(76287),m=n(40855),g=n(98469),v=n(13814),b=n(3062),y=n(86181),w=n(48363),_=n(23493),A=n(39632),x=n(92561),C=n(81176),S=n(43805),E=n(84842),k=n(42730),$=n(88572),M=n(44593),T=n(58108),R=n(68611),L=n(24002),O=n(24133),F=n(60764),I=n(25795),D=n(50708),j=n(23695),P=n(14726),U=n(86751),B=n(13037),N=n(84887),H=n(48171),W=n(4247);e.exports={parse:a,valid:l,clean:c,inc:u,diff:h,major:d,minor:f,patch:p,prerelease:m,compare:g,rcompare:v,compareLoose:b,compareBuild:y,sort:w,rsort:_,gt:A,lt:x,eq:C,neq:S,gte:E,lte:k,cmp:$,coerce:M,Comparator:T,Range:R,satisfies:L,toComparators:O,maxSatisfying:F,minSatisfying:I,minVersion:D,validRange:j,outside:P,gtr:U,ltr:B,intersects:N,simplifyRange:H,subset:W,SemVer:o,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},86679:e=>{var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},77857:e=>{function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var r,i="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(r=console).error.apply(r,["SEMVER"].concat(n(t)))}:function(){};e.exports=i},61767:e=>{var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},30288:e=>{var t=["includePrerelease","loose","rtl"];e.exports=function(e){return e?"object"!=typeof e?{loose:!0}:t.filter((function(t){return e[t]})).reduce((function(e,t){return e[t]=!0,e}),{}):{}}},79133:(e,t,n)=>{var r=n(86679).MAX_SAFE_COMPONENT_LENGTH,i=n(77857),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={},l=0,c=function(e,t,n){var r=l++;i(e,r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(s[a.NUMERICIDENTIFIER],")\\.")+"(".concat(s[a.NUMERICIDENTIFIER],")\\.")+"(".concat(s[a.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(s[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(s[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(s[a.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(s[a.NUMERICIDENTIFIER],"|").concat(s[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(s[a.NUMERICIDENTIFIERLOOSE],"|").concat(s[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(s[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(s[a.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(s[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(s[a.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(s[a.BUILDIDENTIFIER],"(?:\\.").concat(s[a.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(s[a.MAINVERSION]).concat(s[a.PRERELEASE],"?").concat(s[a.BUILD],"?")),c("FULL","^".concat(s[a.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(s[a.MAINVERSIONLOOSE]).concat(s[a.PRERELEASELOOSE],"?").concat(s[a.BUILD],"?")),c("LOOSE","^".concat(s[a.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(s[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(s[a.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(s[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(s[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(s[a.XRANGEIDENTIFIER],")")+"(?:".concat(s[a.PRERELEASE],")?").concat(s[a.BUILD],"?")+")?)?"),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(s[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(s[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(s[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(s[a.PRERELEASELOOSE],")?").concat(s[a.BUILD],"?")+")?)?"),c("XRANGE","^".concat(s[a.GTLT],"\\s*").concat(s[a.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(s[a.GTLT],"\\s*").concat(s[a.XRANGEPLAINLOOSE],"$")),c("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(r,"})")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:$|[^\\d])"),c("COERCERTL",s[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(s[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(s[a.LONETILDE]).concat(s[a.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(s[a.LONETILDE]).concat(s[a.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(s[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(s[a.LONECARET]).concat(s[a.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(s[a.LONECARET]).concat(s[a.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(s[a.GTLT],"\\s*(").concat(s[a.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(s[a.GTLT],"\\s*(").concat(s[a.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(s[a.GTLT],"\\s*(").concat(s[a.LOOSEPLAIN],"|").concat(s[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(s[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(s[a.XRANGEPLAIN],")")+"\\s*$"),c("HYPHENRANGELOOSE","^\\s*(".concat(s[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(s[a.XRANGEPLAINLOOSE],")")+"\\s*$"),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},36425:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(24378),s=Symbol("max"),a=Symbol("length"),l=Symbol("lengthCalculator"),c=Symbol("allowStale"),u=Symbol("maxAge"),h=Symbol("dispose"),d=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),m=Symbol("updateAgeOnGet"),g=function(){return 1},v=function(){function e(t){if(r(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[s]=t.max||1/0;var n=t.length||g;if(this[l]="function"!=typeof n?g:n,this[c]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[h]=t.dispose,this[d]=t.noDisposeOnSet||!1,this[m]=t.updateAgeOnGet||!1,this.reset()}var t,n;return t=e,(n=[{key:"max",get:function(){return this[s]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||1/0,w(this)}},{key:"allowStale",get:function(){return this[c]},set:function(e){this[c]=!!e}},{key:"maxAge",get:function(){return this[u]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,w(this)}},{key:"lengthCalculator",get:function(){return this[l]},set:function(e){var t=this;"function"!=typeof e&&(e=g),e!==this[l]&&(this[l]=e,this[a]=0,this[f].forEach((function(e){e.length=t[l](e.value,e.key),t[a]+=e.length}))),w(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var n=this[f].tail;null!==n;){var r=n.prev;x(this,e,n,t),n=r}}},{key:"forEach",value:function(e,t){t=t||this;for(var n=this[f].head;null!==n;){var r=n.next;x(this,e,n,t),n=r}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[h]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[h](t.key,t.value)})),this[p]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!y(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[l](t,e);if(this[p].has(e)){if(i>this[s])return _(this,this[p].get(e)),!1;var o=this[p].get(e).value;return this[h]&&(this[d]||this[h](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),w(this),!0}var c=new A(e,t,i,r,n);return c.length>this[s]?(this[h]&&this[h](e,t),!1):(this[a]+=c.length,this[f].unshift(c),this[p].set(e,this[f].head),w(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1;var t=this[p].get(e).value;return!y(this,t)}},{key:"get",value:function(e){return b(this,e,!0)}},{key:"peek",value:function(e){return b(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(_(this,e),e.value):null}},{key:"del",value:function(e){_(this,this[p].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var e=this;this[p].forEach((function(t,n){return b(e,n,!1)}))}}])&&i(t.prototype,n),e}(),b=function(e,t,n){var r=e[p].get(t);if(r){var i=r.value;if(y(e,i)){if(_(e,r),!e[c])return}else n&&(e[m]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return i.value}},y=function(e,t){if(!t||!t.maxAge&&!e[u])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},w=function(e){if(e[a]>e[s])for(var t=e[f].tail;e[a]>e[s]&&null!==t;){var n=t.prev;_(e,t),t=n}},_=function(e,t){if(t){var n=t.value;e[h]&&e[h](n.key,n.value),e[a]-=n.length,e[p].delete(n.key),e[f].removeNode(t)}},A=function e(t,n,i,o,s){r(this,e),this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=s||0},x=function(e,t,n,r){var i=n.value;y(e,i)&&(_(e,n),e[c]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=v},86751:(e,t,n)=>{var r=n(14726);e.exports=function(e,t,n){return r(e,t,">",n)}},84887:(e,t,n)=>{var r=n(68611);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},13037:(e,t,n)=>{var r=n(14726);e.exports=function(e,t,n){return r(e,t,"<",n)}},60764:(e,t,n)=>{var r=n(94738),i=n(68611);e.exports=function(e,t,n){var o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(o&&-1!==s.compare(e)||(s=new r(o=e,n)))})),o}},25795:(e,t,n)=>{var r=n(94738),i=n(68611);e.exports=function(e,t,n){var o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(o&&1!==s.compare(e)||(s=new r(o=e,n)))})),o}},50708:(e,t,n)=>{var r=n(94738),i=n(68611),o=n(39632);e.exports=function(e,t){var n=function(t){var n=e.set[t],i=null;n.forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}})),!i||s&&!o(s,i)||(s=i)};e=new i(e,t);var s=new r("0.0.0");if(e.test(s))return s;if(s=new r("0.0.0-0"),e.test(s))return s;s=null;for(var a=0;a<e.set.length;++a)n(a);return s&&e.test(s)?s:null}},14726:(e,t,n)=>{var r=n(94738),i=n(58108),o=i.ANY,s=n(68611),a=n(24002),l=n(39632),c=n(92561),u=n(42730),h=n(84842);e.exports=function(e,t,n,d){var f,p,m,g,v,b,y=function(n){var r=t.set[n],s=null,a=null;return r.forEach((function(e){e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,f(e.semver,s.semver,d)?s=e:m(e.semver,a.semver,d)&&(a=e)})),s.operator===g||s.operator===v?{v:!1}:a.operator&&a.operator!==g||!p(e,a.semver)?a.operator===v&&m(e,a.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,d),t=new s(t,d),n){case">":f=l,p=u,m=c,g=">",v=">=";break;case"<":f=c,p=h,m=l,g="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(var w=0;w<t.set.length;++w){var _=y(w);if("object"==((b=_)&&"undefined"!=typeof Symbol&&b.constructor===Symbol?"symbol":typeof b))return _.v}return!0}},48171:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=n(24002),o=n(98469);e.exports=function(e,t,n){var s=[],a=null,l=null,c=e.sort((function(e,t){return o(e,t,n)})),u=!0,h=!1,d=void 0;try{for(var f,p=c[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var m=f.value;i(m,t,n)?(l=m,a||(a=m)):(l&&s.push([a,l]),l=null,a=null)}}catch(e){h=!0,d=e}finally{try{u||null==p.return||p.return()}finally{if(h)throw d}}a&&s.push([a,null]);var g,v,b=[],y=!0,w=!1,_=void 0;try{for(var A,x=s[Symbol.iterator]();!(y=(A=x.next()).done);y=!0){var C=(g=A.value,v=2,function(e){if(Array.isArray(e))return e}(g)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(g,v)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(g,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),S=C[0],E=C[1];S===E?b.push(S):E||S!==c[0]?E?S===c[0]?b.push("<=".concat(E)):b.push("".concat(S," - ").concat(E)):b.push(">=".concat(S)):b.push("*")}}catch(e){w=!0,_=e}finally{try{y||null==x.return||x.return()}finally{if(w)throw _}}var k=b.join(" || "),$="string"==typeof t.raw?t.raw:String(t);return k.length<$.length?k:t}},4247:(e,t,n)=>{var r=n(68611),i=n(58108),o=i.ANY,s=n(24002),a=n(98469),l=function(e,t,n){if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}var r,l,h,d=new Set,f=!0,p=!1,m=void 0;try{for(var g,v=e[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var b=g.value;">"===b.operator||">="===b.operator?r=c(r,b,n):"<"===b.operator||"<="===b.operator?l=u(l,b,n):d.add(b.semver)}}catch(e){p=!0,m=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw m}}if(d.size>1)return null;if(r&&l){if((h=a(r.semver,l.semver,n))>0)return null;if(0===h&&(">="!==r.operator||"<="!==l.operator))return null}var y,w,_,A,x=!0,C=!1,S=void 0;try{for(var E,k=d[Symbol.iterator]();!(x=(E=k.next()).done);x=!0){var $=E.value;if(r&&!s($,String(r),n))return null;if(l&&!s($,String(l),n))return null;var M=!0,T=!1,R=void 0;try{for(var L,O=t[Symbol.iterator]();!(M=(L=O.next()).done);M=!0){var F=L.value;if(!s($,String(F),n))return!1}}catch(e){T=!0,R=e}finally{try{M||null==O.return||O.return()}finally{if(T)throw R}}return!0}}catch(e){C=!0,S=e}finally{try{x||null==k.return||k.return()}finally{if(C)throw S}}var I=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver,D=!(!r||n.includePrerelease||!r.semver.prerelease.length)&&r.semver;I&&1===I.prerelease.length&&"<"===l.operator&&0===I.prerelease[0]&&(I=!1);var j=!0,P=!1,U=void 0;try{for(var B,N=t[Symbol.iterator]();!(j=(B=N.next()).done);j=!0){var H=B.value;if(A=A||">"===H.operator||">="===H.operator,_=_||"<"===H.operator||"<="===H.operator,r)if(D&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===D.major&&H.semver.minor===D.minor&&H.semver.patch===D.patch&&(D=!1),">"===H.operator||">="===H.operator){if((y=c(r,H,n))===H&&y!==r)return!1}else if(">="===r.operator&&!s(r.semver,String(H),n))return!1;if(l)if(I&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===I.major&&H.semver.minor===I.minor&&H.semver.patch===I.patch&&(I=!1),"<"===H.operator||"<="===H.operator){if((w=u(l,H,n))===H&&w!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(H),n))return!1;if(!H.operator&&(l||r)&&0!==h)return!1}}catch(e){P=!0,U=e}finally{try{j||null==N.return||N.return()}finally{if(P)throw U}}return!(r&&_&&!l&&0!==h||l&&A&&!r&&0!==h||D||I)},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new r(e,n),t=new r(t,n);var i=!1,o=!0,s=!1,a=void 0;try{e:for(var c,u=e.set[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var h=c.value,d=!0,f=!1,p=void 0;try{for(var m,g=t.set[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){var v=m.value,b=l(h,v,n);if(i=i||null!==b,b)continue e}}catch(e){f=!0,p=e}finally{try{d||null==g.return||g.return()}finally{if(f)throw p}}if(i)return!1}}catch(e){s=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(s)throw a}}return!0}},24133:(e,t,n)=>{var r=n(68611);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},23695:(e,t,n)=>{var r=n(68611);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},56376:(e,t,n)=>{var r=n(87872);e.exports=function(e,t){var n,i=null;if(!e||"string"!=typeof e)return i;for(var o,s,a=r(e),l="function"==typeof t,c=0,u=a.length;c<u;c++)o=(n=a[c]).property,s=n.value,l?t(o,s,n):s&&(i||(i={}),i[o]=s);return i}},41590:e=>{"use strict";function t(e){return Array.prototype.slice.apply(e)}var n="pending",r="resolved",i="rejected";function o(e){this.status=n,this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function s(e){return e&&"function"==typeof e.then}function a(e){return e}function l(e){return"undefined"!=typeof window&&"AggregateError"in window?new window.AggregateError(e):{errors:e}}if(o.prototype={then:function(e,t){var n=o.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var r=t(this._error);return s(r)?(this._chainPromiseData(r,n),n):o.resolve(r)._setParent(this)}catch(e){return o.reject(e)._setParent(this)}return o.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return o.resolve(this._data)._setParent(this);var t=o.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=function(t,r){if(!n){n=!0,e||(e=a);var i=e(t);return s(i)?i.then((function(){if(r)throw r;return t})):t}},n=!1;return this.then((function(e){return t(e)})).catch((function(e){return t(null,e)}))},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var n={promise:t.promise,children:t.promise._findAncestry()};e.push(n)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,n=this;n;)e(n)&&(t=n),n=n._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),n=this;t.forEach((function(t){if(t.catchFn)try{var r=t.catchFn(e);n._handleUserFunctionResult(r,t.promise)}catch(e){t.promise.reject(e)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(s(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,n=this;e.forEach((function(e){if(e.nextFn)try{var r=e.nextFn(t);n._handleUserFunctionResult(r,e.promise)}catch(t){n._handleResolutionError(t,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(t){e=t}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){s(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status=r,this._paused||this._runResolutions()},_setRejected:function(){this.status=i,this._paused||this._runRejections()},_isPending:function(){return this.status===n},_isResolved:function(){return this.status===r},_isRejected:function(){return this.status===i}},o.resolve=function(e){return new o((function(t,n){s(e)?e.then((function(e){t(e)})).catch((function(e){n(e)})):t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.unresolved=function(){return new o((function(e,t){this.resolve=e,this.reject=t}))},o.all=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t,n){var r=[],i=0,s=!1;e.forEach((function(a,l){o.resolve(a).then((function(n){r[l]=n,(i+=1)===e.length&&t(r)})).catch((function(e){!function(e){s||(s=!0,n(e))}(e)}))}))})):o.resolve([])},o.any=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t,n){var r=[],i=0,s=!1;e.forEach((function(a,c){o.resolve(a).then((function(e){s||(s=!0,t(e))})).catch((function(t){r[c]=t,(i+=1)===e.length&&n(l(r))}))}))})):o.reject(l([]))},o.allSettled=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t){var n=[],r=0,i=function(){(r+=1)===e.length&&t(n)};e.forEach((function(e,t){o.resolve(e).then((function(e){n[t]={status:"fulfilled",value:e},i()})).catch((function(e){n[t]={status:"rejected",reason:e},i()}))}))})):o.resolve([])},Promise===o)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var c=Promise;o.installGlobally=function(e){if(Promise===o)return e;var n=function(e){if(void 0===e||e.__patched)return e;var n=e;return e=function(){n.apply(this,t(arguments))},e.__patched=!0,e}(e);return Promise=o,n},o.uninstallGlobally=function(){Promise===o&&(Promise=c)},e.exports={SynchronousPromise:o}},22709:e=>{function t(e,t){var n=e.length,r=new Array(n),i={},o=n,s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));o--;)i[o]||l(e[o],o,new Set);return r;function l(e,t,o){if(o.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var u=s.get(e)||new Set;if(t=(u=Array.from(u)).length){o.add(e);do{var h=u[--t];l(h,a.get(h),o)}while(t);o.delete(e)}r[--n]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},33508:(e,t,n)=>{"use strict";var r=n(81672),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),s((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},14152:(e,t,n)=>{"use strict";e.exports=n(33508)},11069:function(e){"use strict";var t=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};e.exports=function(e){e.prototype[Symbol.iterator]=function(){var e;return t(this,(function(t){switch(t.label){case 0:e=this.head,t.label=1;case 1:return e?[4,e.value]:[3,4];case 2:t.sent(),t.label=3;case 3:return e=e.next,[3,1];case 4:return[2]}}))}}},24378:(e,t,n)=>{"use strict";function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function i(e){var t=this;if(r(t,i)||(t=new i),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t,n){var r=t===e.head?new l(n,null,t,e):new l(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function s(e,t){e.tail=new l(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new l(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function l(e,t,n,i){if(!r(this,l))return new l(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=i,i.Node=l,i.create=i,i.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},i.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},i.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},i.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},i.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},i.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},i.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},i.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},i.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},i.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},i.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},i.prototype.map=function(e,t){t=t||this;for(var n=new i,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},i.prototype.mapReverse=function(e,t){t=t||this;for(var n=new i,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},i.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},i.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},i.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},i.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},i.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;for(;null!==o&&r<t;r++,o=o.next)n.push(o.value);return n},i.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)n.push(o.value);return n},i.prototype.splice=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,a=this.head;null!==a&&s<e;s++)a=a.next;var l=[];for(s=0;a&&s<t;s++)l.push(a.value),a=this.removeNode(a);for(null===a&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev),s=0;s<r.length;s++)a=o(this,a,r[s]);return l},i.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(11069)(i)}catch(e){}},25459:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:()=>i})},54408:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(24183).Z.Symbol},66255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},60614:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(54408),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r.Z?r.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}(e):function(e){return l.call(e)}(e)}},80585:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},24183:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(80585),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},56532:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(79518),i=n(24183);const o=function(){return i.Z.Date.now()};var s=/\s/;var a=/^\s+/;const l=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}(e)+1).replace(a,""):e};var c=n(94842),u=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,d=/^0o[0-7]+$/i,f=parseInt;const p=function(e){if("number"==typeof e)return e;if((0,c.Z)(e))return NaN;if((0,r.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,r.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var n=h.test(e);return n||d.test(e)?f(e.slice(2),n?2:8):u.test(e)?NaN:+e};var m=Math.max,g=Math.min;const v=function(e,t,n){var i,s,a,l,c,u,h=function(t){var n=i,r=s;return i=s=void 0,y=t,l=e.apply(r,n)},d=function(e){return y=e,c=setTimeout(x,t),w?h(e):l},f=function(e){var n=e-u;return void 0===u||n>=t||n<0||_&&e-y>=a},v=function(e){return c=void 0,A&&i?h(e):(i=s=void 0,l)},b=function(){var e=o(),n=f(e);if(i=arguments,s=this,u=e,n){if(void 0===c)return d(u);if(_)return clearTimeout(c),c=setTimeout(x,t),h(u)}return void 0===c&&(c=setTimeout(x,t)),l},y=0,w=!1,_=!1,A=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function x(){var e=o();if(f(e))return v(e);c=setTimeout(x,function(e){var n=t-(e-u);return _?g(n,a-(e-y)):n}(e))}return t=p(t)||0,(0,r.Z)(n)&&(w=!!n.leading,a=(_="maxWait"in n)?m(p(n.maxWait)||0,t):a,A="trailing"in n?!!n.trailing:A),b.cancel=function(){void 0!==c&&clearTimeout(c),y=0,i=u=s=c=void 0},b.flush=function(){return void 0===c?l:v(o())},b}},53751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(66255),i=n(54408),o=n(53981),s=n(97780),a=i.Z?i.Z.isConcatSpreadable:void 0;const l=function(e){return(0,s.Z)(e)||(0,o.Z)(e)||!!(a&&e&&e[a])},c=function e(t,n,i,o,s){var a=-1,c=t.length;for(i||(i=l),s||(s=[]);++a<c;){var u=t[a];n>0&&i(u)?n>1?e(u,n-1,i,o,s):(0,r.Z)(s,u):o||(s[s.length]=u)}return s},u=function(e){return null!=e&&e.length?c(e,1/0):[]}},53981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(60614),i=n(16677);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&a.call(e,"callee")&&!l.call(e,"callee")}},97780:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},79518:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)}},16677:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},94842:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(60614),i=n(16677);const o=function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e);var t}},24996:(e,t,n)=>{"use strict";n.d(t,{$l:()=>w,BN:()=>q,DY:()=>m,J$:()=>re,JN:()=>k,LI:()=>B,PM:()=>x,W6:()=>P,i_:()=>y,ko:()=>ue,kw:()=>U,mf:()=>A,o8:()=>_,qC:()=>W,s6:()=>ce,sj:()=>G,u3:()=>z,u_:()=>ee,w6:()=>j,xD:()=>he});var r=n(81672);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function a(e){o(s,r,i,a,l,"next",e)}function l(e){o(s,r,i,a,l,"throw",e)}a(void 0)}))}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}var p=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},m=new WeakMap,g={},v={},b=function(){},y=b(),w=Object,_=function(e){return e===y},A=function(e){return"function"==typeof e},x=function(e,t){return l({},e,t)},C="undefined",S=("undefined"==typeof window?"undefined":d(window))!=C,E=("undefined"==typeof document?"undefined":d(document))!=C,k=function(e,t){var n=m.get(e);return[function(){return e.get(t)||g},function(r){if(!_(t)){var i=e.get(t);t in v||(v[t]=i),n[5](t,x(i,r),i||g)}},n[6],function(){return!_(t)&&t in v?v[t]:e.get(t)||g}]},$=new WeakMap,M=0,T=function(e){var t,n,r=void 0===e?"undefined":d(e),i=e&&e.constructor,o=i==Date;if(w(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=$.get(e))return t;if(t=++M+"~",$.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=T(e[n])+",";$.set(e,t)}if(i==w){t="#";for(var s=w.keys(e).sort();!_(n=s.pop());)_(e[n])||(t+=n+":"+T(e[n])+",");$.set(e,t)}}return t},R=!0,L=u(S&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[b,b],2),O=L[0],F=L[1],I={isOnline:function(){return R},isVisible:function(){var e=E&&document.visibilityState;return _(e)||"hidden"!==e}},D={initFocus:function(e){return E&&document.addEventListener("visibilitychange",e),O("focus",e),function(){E&&document.removeEventListener("visibilitychange",e),F("focus",e)}},initReconnect:function(e){var t=function(){R=!0,e()},n=function(){R=!1};return O("online",t),O("offline",n),function(){F("online",t),F("offline",n)}}},j=!r.useId,P=!S||"Deno"in window,U=function(e){return S&&d(window.requestAnimationFrame)!=C?window.requestAnimationFrame(e):setTimeout(e,1)},B=P?r.useEffect:r.useLayoutEffect,N="undefined"!=typeof navigator&&navigator.connection,H=!P&&N&&(["slow-2g","2g"].includes(N.effectiveType)||N.saveData),W=function(e){if(A(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?T(e):"",t]},V=0,z=function(){return++V},G={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:2,ERROR_REVALIDATE_EVENT:3};function q(){return K.apply(this,arguments)}function K(){return K=s((function(){var e,t,n,r,i,o,a,l,c,h,d,f,g,v,b,w,C,S,E,$,M=arguments;function T(e){return R.apply(this,arguments)}function R(){return R=s((function(e){var n,r,o,s,l,c,d,w,x,C,S,E,$,M,T,R,L,O,F,I;return p(this,(function(p){switch(p.label){case 0:if(n=u(W(e),1),!(r=n[0]))return[2];if(o=u(k(i,r),2),s=o[0],l=o[1],c=u(m.get(i),3),d=c[0],w=c[1],x=c[2],C=d[r],S=function(){return g&&(delete x[r],C&&C[0])?C[0](2).then((function(){return s().data})):s().data},t.length<3)return[2,S()];if(E=a,M=z(),w[r]=[M,0],T=!_(f),R=s(),L=R.data,O=R._c,F=_(O)?L:O,T&&(f=A(f)?f(F):f,l({data:f,_c:F})),A(E))try{E=E(F)}catch(e){$=e}return E&&A(E.then)?[4,E.catch((function(e){$=e}))]:[3,2];case 1:if(E=p.sent(),M!==w[r][0]){if($)throw $;return[2,E]}$&&T&&v($)&&(h=!0,l({data:E=F,_c:y})),p.label=2;case 2:return h&&($||(A(h)&&(E=h(E,F)),l({data:E,_c:y}))),w[r][1]=z(),[4,S()];case 3:if(I=p.sent(),l({_c:y}),$){if(b)throw $;return[2]}return[2,h?I:E]}}))})),R.apply(this,arguments)}return p(this,(function(s){for(e=M.length,t=new Array(e),n=0;n<e;n++)t[n]=M[n];if(r=u(t,4),i=r[0],o=r[1],a=r[2],l=r[3],c=x({populateCache:!0,throwOnError:!0},"boolean"==typeof l?{revalidate:l}:l||{}),h=c.populateCache,d=c.rollbackOnError,f=c.optimisticData,g=!1!==c.revalidate,v=function(e){return"function"==typeof d?d(e):!1!==d},b=c.throwOnError,A(o)){for(w=o,C=[],S=i.keys(),E=S.next();!E.done;E=S.next())$=E.value,!/^\$(inf|sub)\$/.test($)&&w(i.get($)._k)&&C.push($);return[2,Promise.all(C.map(T))]}return[2,T(o)]}))})),K.apply(this,arguments)}var Z=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Y=function(e,t){if(!m.has(e)){var n=x(D,t),r={},i=q.bind(y,e),o=b,s={},a=function(e,t){var n=s[e]||[];return s[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},l=function(t,n,r){e.set(t,n);var i=s[t];if(i){var o=!0,a=!1,l=void 0;try{for(var c,u=i[Symbol.iterator]();!(o=(c=u.next()).done);o=!0)(0,c.value)(n,r)}catch(e){a=!0,l=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw l}}}},c=function(){if(!m.has(e)&&(m.set(e,[r,{},{},{},i,l,a]),!P)){var t=n.initFocus(setTimeout.bind(y,Z.bind(y,r,0))),s=n.initReconnect(setTimeout.bind(y,Z.bind(y,r,1)));o=function(){t&&t(),s&&s(),m.delete(e)}}};return c(),[e,i,c,o]}return[e,m.get(e)[4]]},X=u(Y(new Map),2),Q=X[0],J=X[1],ee=x({onLoadingSlow:b,onSuccess:b,onError:b,onErrorRetry:function(e,t,n,r,i){var o=n.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!_(o)&&s>o||setTimeout(r,a,i)},onDiscarded:b,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:H?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:H?5e3:3e3,compare:function(e,t){return T(e)==T(t)},isPaused:function(){return!1},cache:Q,mutate:J,fallback:{}},I),te=function(e,t){var n=x(e,t);if(t){var r=e.use,i=e.fallback,o=t.use,s=t.fallback;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=x(i,s))}return n},ne=(0,r.createContext)({}),re=function(e){var t=e.value,n=(0,r.useContext)(ne),i=A(t),o=(0,r.useMemo)((function(){return i?t(n):t}),[i,n,t]),s=(0,r.useMemo)((function(){return i?o:te(n,o)}),[i,n,o]),a=o&&o.provider,l=(0,r.useRef)(y);a&&!l.current&&(l.current=Y(a(s.cache||Q),o));var c=l.current;return c&&(s.cache=c[0],s.mutate=c[1]),B((function(){if(c)return c[2]&&c[2](),c[3]}),[]),(0,r.createElement)(ne.Provider,x(e,{value:s}))},ie=S&&window.__SWR_DEVTOOLS_USE__,oe=ie?window.__SWR_DEVTOOLS_USE__:[],se=function(e){return A(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},ae=function(){return x(ee,(0,r.useContext)(ne))},le=oe.concat((function(e){return function(t,n,r){var i=n&&function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=W(t)[0],s=u(m.get(Q),4),a=s[3],l=a[o];return l?(delete a[o],l):n.apply(void 0,h(r))};return e(t,i,r)}})),ce=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=ae(),o=u(se(n),3),s=o[0],a=o[1],l=o[2],c=te(i,l),h=e,d=c.use,f=(d||[]).concat(le),p=f.length;p--;)h=f[p](h);return h(s,a||c.fetcher||null,c)}},ue=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},he=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=u(se(r),3),s=o[0],a=o[1],h=o[2],d=(h.use||[]).concat(t);return e(s,a,c(l({},h),{use:d}))}};ie&&(window.__SWR_DEVTOOLS_REACT__=r)},80291:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>f});var r=n(81672),i=n(14152),o=n(24996);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}var d={dedupe:!0},f=(o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_}),(0,o.s6)((function(e,t,n){var s,h,f=n.cache,p=n.compare,m=n.suspense,g=n.fallbackData,v=n.revalidateOnMount,b=n.revalidateIfStale,y=n.refreshInterval,w=n.refreshWhenHidden,_=n.refreshWhenOffline,A=n.keepPreviousData,x=c(o.DY.get(f),3),C=x[0],S=x[1],E=x[2],k=c((0,o.qC)(e),2),$=k[0],M=k[1],T=(0,r.useRef)(!1),R=(0,r.useRef)(!1),L=(0,r.useRef)($),O=(0,r.useRef)(t),F=(0,r.useRef)(n),I=function(){return F.current},D=function(){return I().isVisible()&&I().isOnline()},j=c((0,o.JN)(f,$),4),P=j[0],U=j[1],B=j[2],N=j[3],H=(0,r.useRef)({}).current,W=(0,o.o8)(g)?n.fallback[$]:g,V=function(e,t){var n=!0;for(var r in H){var i=r;"data"===i?p(t[i],e[i])||(0,o.o8)(e[i])&&p(t[i],J)||(n=!1):t[i]!==e[i]&&(n=!1)}return n},z=(0,r.useMemo)((function(){var e=!!$&&!!t&&((0,o.o8)(v)?!I().isPaused()&&!m&&(!!(0,o.o8)(b)||b):v),n=function(t){var n=(0,o.PM)(t);return delete n._k,e?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({isValidating:!0,isLoading:!0},n):n},r=P(),i=N(),s=n(r),a=r===i?s:n(i),c=s;return[function(){var e=n(P());return V(e,c)?c:c=e},function(){return a}]}),[f,$]),G=(0,i.useSyncExternalStore)((0,r.useCallback)((function(e){return B($,(function(t,n){V(n,t)||e()}))}),[f,$]),z[0],z[1]),q=!T.current,K=C[$]&&C[$].length>0,Z=G.data,Y=(0,o.o8)(Z)?W:Z,X=G.error,Q=(0,r.useRef)(Y),J=A?(0,o.o8)(Z)?Q.current:Z:Y,ee=!(K&&!(0,o.o8)(X))&&(q&&!(0,o.o8)(v)?v:!I().isPaused()&&(m?!(0,o.o8)(Y)&&b:(0,o.o8)(Y)||b)),te=!!($&&t&&q&&ee),ne=(0,o.o8)(G.isValidating)?te:G.isValidating,re=(0,o.o8)(G.isLoading)?te:G.isLoading,ie=(0,r.useCallback)((s=function(e){var t,r,i,s,a,l,u,h,d,f,m,g,v,b,y,w,_;return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(A){switch(A.label){case 0:if(t=O.current,!$||!t||R.current||I().isPaused())return[2,!1];s=!0,a=e||{},l=!E[$]||!a.dedupe,u=function(){return o.w6?!R.current&&$===L.current&&T.current:$===L.current},h={isValidating:!1,isLoading:!1},d=function(){U(h)},f=function(){var e=E[$];e&&e[1]===i&&delete E[$]},m={isValidating:!0},(0,o.o8)(P().data)&&(m.isLoading=!0),A.label=1;case 1:return A.trys.push([1,3,,4]),l&&(U(m),n.loadingTimeout&&(0,o.o8)(P().data)&&setTimeout((function(){s&&u()&&I().onLoadingSlow($,n)}),n.loadingTimeout),E[$]=[t(M),(0,o.u3)()]),g=c(E[$],2),r=g[0],i=g[1],[4,r];case 2:return r=A.sent(),l&&setTimeout(f,n.dedupingInterval),E[$]&&E[$][1]===i?(h.error=o.i_,v=S[$],!(0,o.o8)(v)&&(i<=v[0]||i<=v[1]||0===v[1])?(d(),l&&u()&&I().onDiscarded($),[2,!1]):(b=P().data,h.data=p(b,r)?b:r,l&&u()&&I().onSuccess(r,$,n),[3,4])):(l&&u()&&I().onDiscarded($),[2,!1]);case 3:return y=A.sent(),f(),w=I(),_=w.shouldRetryOnError,w.isPaused()||(h.error=y,l&&u()&&(w.onError(y,$,w),(!0===_||(0,o.mf)(_)&&_(y))&&D()&&w.onErrorRetry(y,$,w,(function(e){var t=C[$];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(a.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,d(),[2,!0]}}))},h=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=s.apply(e,t);function o(e){a(i,n,r,o,l,"next",e)}function l(e){a(i,n,r,o,l,"throw",e)}o(void 0)}))},function(e){return h.apply(this,arguments)}),[$,f]),oe=(0,r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.BN.apply(void 0,[f,L.current].concat(u(t)))}),[]);if((0,o.LI)((function(){O.current=t,F.current=n,(0,o.o8)(Z)||(Q.current=Z)})),(0,o.LI)((function(){if($){var e=ie.bind(o.i_,d),t=0,n=(0,o.ko)($,C,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n==o.sj.FOCUS_EVENT){var i=Date.now();I().revalidateOnFocus&&i>t&&D()&&(t=i+I().focusThrottleInterval,e())}else if(n==o.sj.RECONNECT_EVENT)I().revalidateOnReconnect&&D()&&e();else{if(n==o.sj.MUTATE_EVENT)return ie();if(n==o.sj.ERROR_REVALIDATE_EVENT)return ie(r)}}));return R.current=!1,L.current=$,T.current=!0,U({_k:M}),ee&&((0,o.o8)(Y)||o.W6?e():(0,o.kw)(e)),function(){R.current=!0,n()}}}),[$]),(0,o.LI)((function(){var e,t=function(){var t=(0,o.mf)(y)?y(Y):y;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){P().error||!w&&!I().isVisible()||!_&&!I().isOnline()?t():ie(d).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[y,w,_,$]),(0,r.useDebugValue)(J),m&&(0,o.o8)(Y)&&$){if(!o.w6&&o.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw O.current=t,F.current=n,R.current=!1,(0,o.o8)(X)?ie(d):X}return{mutate:oe,get data(){return H.data=!0,J},get error(){return H.error=!0,X},get isValidating(){return H.isValidating=!0,ne},get isLoading(){return H.isLoading=!0,re}}})))},2062:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(80291),i=(0,n(24996).xD)(r.ZP,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}}))}}]);
|