@epcare/esm-report-builder 0.1.1-pre.15
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/.eslintignore +5 -0
- package/.eslintrc.js +19 -0
- package/.github/workflows/main.yml +162 -0
- package/.prettierrc +8 -0
- package/LICENSE +401 -0
- package/README.md +317 -0
- package/dist/0081d5d3d536cb23.js +1 -0
- package/dist/02acc4469a2fe2e4.woff2 +0 -0
- package/dist/081587ca0db8e63f.woff2 +0 -0
- package/dist/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist/090b2bc014d24ea4.woff2 +0 -0
- package/dist/09de5db63ef7b579.js +1 -0
- package/dist/0ae92bcea615e948.woff2 +0 -0
- package/dist/0be8520d8945b3b7.woff2 +0 -0
- package/dist/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist/0edb77cd19e43550.js +1 -0
- package/dist/14869ac5d1830304.woff2 +0 -0
- package/dist/14aaceff85fc8b28.woff2 +0 -0
- package/dist/14c3abea79fc1389.js +1 -0
- package/dist/155a4ac079785bfd.js +1 -0
- package/dist/155a4ac079785bfd.js.map +1 -0
- package/dist/16f443eed01776ca.woff2 +0 -0
- package/dist/183bae0e53a22182.woff2 +0 -0
- package/dist/19c8f94ccd6289f5.woff2 +0 -0
- package/dist/1ae86565eab7451c.woff2 +0 -0
- package/dist/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist/1f266d3619b30f16.woff2 +0 -0
- package/dist/1f8c5a4087a524fd.woff2 +0 -0
- package/dist/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist/22a32bd51591301b.js +1 -0
- package/dist/273c72d90e432a3d.js +1 -0
- package/dist/295dd01a1fbfee6d.woff2 +0 -0
- package/dist/29cbe6827c3f03ef.js +1 -0
- package/dist/2f686985e26e7107.woff2 +0 -0
- package/dist/315eff729e4ccbd9.woff2 +0 -0
- package/dist/368d16e3259bf207.woff2 +0 -0
- package/dist/36c49aa341a7079a.woff2 +0 -0
- package/dist/36e1e0430475edee.woff2 +0 -0
- package/dist/374c3ee36d9e040a.js +1 -0
- package/dist/377971e519bf3f4a.js +2 -0
- package/dist/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist/377971e519bf3f4a.js.map +1 -0
- package/dist/3b0ea8395009dcf3.js +2 -0
- package/dist/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist/3b0ea8395009dcf3.js.map +1 -0
- package/dist/3bc19662b8630ee9.woff2 +0 -0
- package/dist/3f645f473b3f8fba.woff2 +0 -0
- package/dist/41320d8930d23b36.js +1 -0
- package/dist/4218ac9901b9d36d.woff2 +0 -0
- package/dist/4659f3ca46d928b5.js +1 -0
- package/dist/4659f3ca46d928b5.js.map +1 -0
- package/dist/4680ba68412e4da9.woff2 +0 -0
- package/dist/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist/4aabceefe5a2494a.js +1 -0
- package/dist/4c188cbaefba58cd.js +1 -0
- package/dist/4e11b8a7c445255f.woff2 +0 -0
- package/dist/537ddd61c5c1fce2.woff2 +0 -0
- package/dist/54f5eee3a7989556.js +1 -0
- package/dist/55c9107b50dd747c.js +1 -0
- package/dist/56c4118c0907f151.woff2 +0 -0
- package/dist/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist/5c6586155f0d278a.woff2 +0 -0
- package/dist/5e50c92017029ca3.js +1 -0
- package/dist/5e50c92017029ca3.js.map +1 -0
- package/dist/600aca7295d8bcb7.js +2 -0
- package/dist/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist/600aca7295d8bcb7.js.map +1 -0
- package/dist/60ec587649ba812a.woff2 +0 -0
- package/dist/64cf08a5ac3266d8.js +1 -0
- package/dist/652f476a8a1603d3.js +2 -0
- package/dist/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist/652f476a8a1603d3.js.map +1 -0
- package/dist/65e6511e035870e1.woff2 +0 -0
- package/dist/661425f6798cd16a.woff2 +0 -0
- package/dist/66b864fe213caf46.woff2 +0 -0
- package/dist/680eb791e6266590.js +2 -0
- package/dist/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist/680eb791e6266590.js.map +1 -0
- package/dist/69d087d970ee9455.woff2 +0 -0
- package/dist/69e3aa4276b4cb4b.js +1 -0
- package/dist/6a88f03fc4e7c3da.js +1 -0
- package/dist/6c6c45e66ff54281.woff2 +0 -0
- package/dist/6d9009857c6df878.js +1 -0
- package/dist/6ebe7cea59ed2853.js +1 -0
- package/dist/6f3181849e740935.js +1 -0
- package/dist/6f3181849e740935.js.map +1 -0
- package/dist/7073a7323e92bd11.woff2 +0 -0
- package/dist/70ac433ae2a89a89.js +1 -0
- package/dist/70ee4ee625ac0ec1.js +1 -0
- package/dist/718c6cc31274ab1a.woff2 +0 -0
- package/dist/727696c3934d0966.js +1 -0
- package/dist/727763c0f0df59dc.js +1 -0
- package/dist/727763c0f0df59dc.js.map +1 -0
- package/dist/72cdbedfe04be9f9.woff2 +0 -0
- package/dist/7509c9f56fe9e532.woff2 +0 -0
- package/dist/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist/77b48bc05299ecca.woff2 +0 -0
- package/dist/7a0a0215c248c73d.woff2 +0 -0
- package/dist/7c0d0c5180de8729.js +1 -0
- package/dist/7f00bebb24e40167.woff2 +0 -0
- package/dist/802c6176541eeed7.woff2 +0 -0
- package/dist/8080081b3379c637.woff2 +0 -0
- package/dist/81cfdaeaa0bbca1f.js +1 -0
- package/dist/8605507b7a8487c4.woff2 +0 -0
- package/dist/893a160d06428365.js +1 -0
- package/dist/893a160d06428365.js.map +1 -0
- package/dist/8a83d654702f6534.woff2 +0 -0
- package/dist/8fe71173a13fe571.woff2 +0 -0
- package/dist/94aa912dcac90114.js +1 -0
- package/dist/9624cec0f9bdd81e.woff2 +0 -0
- package/dist/98a3af55a1698171.woff2 +0 -0
- package/dist/99823aaebba56f46.js +1 -0
- package/dist/9ba85996af74c5ce.woff2 +0 -0
- package/dist/9ddb22faa35006e7.woff2 +0 -0
- package/dist/a167fb2799dd741b.woff2 +0 -0
- package/dist/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist/a246c73905a31c93.woff2 +0 -0
- package/dist/a325099b0a580ce2.js +2 -0
- package/dist/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist/a325099b0a580ce2.js.map +1 -0
- package/dist/a401aa7939cb6e6f.woff2 +0 -0
- package/dist/a40fef67997d3b2c.js +1 -0
- package/dist/a62897b000a24b86.js +1 -0
- package/dist/a6ed036f17a1ea29.woff2 +0 -0
- package/dist/a77bac4877483a0a.js +1 -0
- package/dist/a9f25ca430709a1a.woff2 +0 -0
- package/dist/aa0dfbdd569b1c24.js +2 -0
- package/dist/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist/aa0dfbdd569b1c24.js.map +1 -0
- package/dist/ab0f637d6cff12e4.js +1 -0
- package/dist/afa9121a49e95351.woff2 +0 -0
- package/dist/afcda12d9f805543.woff2 +0 -0
- package/dist/b09ded85a7da77f1.woff2 +0 -0
- package/dist/b10dbe5318a91a12.js +1 -0
- package/dist/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist/b4a074bf828bb757.woff2 +0 -0
- package/dist/b7f447da43f6e596.woff2 +0 -0
- package/dist/bcca84a524572d10.woff2 +0 -0
- package/dist/be093e052a6d50eb.js +1 -0
- package/dist/be4d1f97b11d087c.woff2 +0 -0
- package/dist/bec14780d81164de.woff2 +0 -0
- package/dist/c31657fe213c1b5e.js +1 -0
- package/dist/c49ef726d3f0420b.js +1 -0
- package/dist/c553f7e0199c5084.woff2 +0 -0
- package/dist/c94ac2fdc1ff1418.js +1 -0
- package/dist/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist/cbbb57b397433964.js +2 -0
- package/dist/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist/cbbb57b397433964.js.map +1 -0
- package/dist/d188f7f036ac5779.woff2 +0 -0
- package/dist/d1aa59bd9c702dc4.js +2 -0
- package/dist/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist/d1aa59bd9c702dc4.js.map +1 -0
- package/dist/d265d81c58525ae4.woff2 +0 -0
- package/dist/d5942cd81663e136.woff2 +0 -0
- package/dist/d66b8ff73d95cabb.woff2 +0 -0
- package/dist/d84bac6d07672dd2.js +1 -0
- package/dist/d84bac6d07672dd2.js.map +1 -0
- package/dist/d88899ef0fd16719.woff2 +0 -0
- package/dist/d92b5ecf31fc187b.js +1 -0
- package/dist/d9a5d958e69e058d.woff2 +0 -0
- package/dist/dac90d495be353a0.woff2 +0 -0
- package/dist/db0550511978dc47.js +1 -0
- package/dist/dd8ce598529c3fab.woff2 +0 -0
- package/dist/de013f1be25103fa.woff2 +0 -0
- package/dist/df222fceeffca849.woff2 +0 -0
- package/dist/df22bda08ec7964c.js +1 -0
- package/dist/e05b7f902b02a251.js +1 -0
- package/dist/e05b7f902b02a251.js.map +1 -0
- package/dist/e465f1481f0d2e1c.js +1 -0
- package/dist/e62b00b9199c1ac9.woff2 +0 -0
- package/dist/e696cef1407b2610.woff2 +0 -0
- package/dist/eb42de5422d9af00.js +1 -0
- package/dist/eed48feba743e21c.woff2 +0 -0
- package/dist/f135ef54213f8975.js +1 -0
- package/dist/f260e50923d4283b.js +1 -0
- package/dist/f543c88feb236d11.woff2 +0 -0
- package/dist/f591b0079faa93fe.woff2 +0 -0
- package/dist/f6ed27923769ad1d.woff2 +0 -0
- package/dist/f8d066e92ea157c6.js +1 -0
- package/dist/fae042506530c1e6.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/fbebeb4336e67012.woff2 +0 -0
- package/dist/fd574df77d31a5eb.js +1 -0
- package/dist/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist/index.html +9 -0
- package/dist/logo-512.png +0 -0
- package/dist/logo.svg +30 -0
- package/dist/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist/openmrs.c3adea28ef850516.js +1 -0
- package/dist/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist/service-worker.js +1 -0
- package/dist/service-worker.js.map +1 -0
- package/dist-build-23687264126/0081d5d3d536cb23.js +1 -0
- package/dist-build-23687264126/02acc4469a2fe2e4.woff2 +0 -0
- package/dist-build-23687264126/081587ca0db8e63f.woff2 +0 -0
- package/dist-build-23687264126/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist-build-23687264126/090b2bc014d24ea4.woff2 +0 -0
- package/dist-build-23687264126/09de5db63ef7b579.js +1 -0
- package/dist-build-23687264126/0ae92bcea615e948.woff2 +0 -0
- package/dist-build-23687264126/0be8520d8945b3b7.woff2 +0 -0
- package/dist-build-23687264126/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist-build-23687264126/0edb77cd19e43550.js +1 -0
- package/dist-build-23687264126/14869ac5d1830304.woff2 +0 -0
- package/dist-build-23687264126/14aaceff85fc8b28.woff2 +0 -0
- package/dist-build-23687264126/14c3abea79fc1389.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js.map +1 -0
- package/dist-build-23687264126/16f443eed01776ca.woff2 +0 -0
- package/dist-build-23687264126/183bae0e53a22182.woff2 +0 -0
- package/dist-build-23687264126/19c8f94ccd6289f5.woff2 +0 -0
- package/dist-build-23687264126/1ae86565eab7451c.woff2 +0 -0
- package/dist-build-23687264126/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist-build-23687264126/1f266d3619b30f16.woff2 +0 -0
- package/dist-build-23687264126/1f8c5a4087a524fd.woff2 +0 -0
- package/dist-build-23687264126/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist-build-23687264126/22a32bd51591301b.js +1 -0
- package/dist-build-23687264126/273c72d90e432a3d.js +1 -0
- package/dist-build-23687264126/295dd01a1fbfee6d.woff2 +0 -0
- package/dist-build-23687264126/29cbe6827c3f03ef.js +1 -0
- package/dist-build-23687264126/2f686985e26e7107.woff2 +0 -0
- package/dist-build-23687264126/315eff729e4ccbd9.woff2 +0 -0
- package/dist-build-23687264126/368d16e3259bf207.woff2 +0 -0
- package/dist-build-23687264126/36c49aa341a7079a.woff2 +0 -0
- package/dist-build-23687264126/36e1e0430475edee.woff2 +0 -0
- package/dist-build-23687264126/374c3ee36d9e040a.js +1 -0
- package/dist-build-23687264126/377971e519bf3f4a.js +2 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.map +1 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js +2 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.map +1 -0
- package/dist-build-23687264126/3bc19662b8630ee9.woff2 +0 -0
- package/dist-build-23687264126/3f645f473b3f8fba.woff2 +0 -0
- package/dist-build-23687264126/41320d8930d23b36.js +1 -0
- package/dist-build-23687264126/4218ac9901b9d36d.woff2 +0 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js +1 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js.map +1 -0
- package/dist-build-23687264126/4680ba68412e4da9.woff2 +0 -0
- package/dist-build-23687264126/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist-build-23687264126/4aabceefe5a2494a.js +1 -0
- package/dist-build-23687264126/4c188cbaefba58cd.js +1 -0
- package/dist-build-23687264126/4e11b8a7c445255f.woff2 +0 -0
- package/dist-build-23687264126/537ddd61c5c1fce2.woff2 +0 -0
- package/dist-build-23687264126/54f5eee3a7989556.js +1 -0
- package/dist-build-23687264126/55c9107b50dd747c.js +1 -0
- package/dist-build-23687264126/56c4118c0907f151.woff2 +0 -0
- package/dist-build-23687264126/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist-build-23687264126/5c6586155f0d278a.woff2 +0 -0
- package/dist-build-23687264126/5e50c92017029ca3.js +1 -0
- package/dist-build-23687264126/5e50c92017029ca3.js.map +1 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js +2 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.map +1 -0
- package/dist-build-23687264126/60ec587649ba812a.woff2 +0 -0
- package/dist-build-23687264126/64cf08a5ac3266d8.js +1 -0
- package/dist-build-23687264126/652f476a8a1603d3.js +2 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.map +1 -0
- package/dist-build-23687264126/65e6511e035870e1.woff2 +0 -0
- package/dist-build-23687264126/661425f6798cd16a.woff2 +0 -0
- package/dist-build-23687264126/66b864fe213caf46.woff2 +0 -0
- package/dist-build-23687264126/680eb791e6266590.js +2 -0
- package/dist-build-23687264126/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist-build-23687264126/680eb791e6266590.js.map +1 -0
- package/dist-build-23687264126/69d087d970ee9455.woff2 +0 -0
- package/dist-build-23687264126/69e3aa4276b4cb4b.js +1 -0
- package/dist-build-23687264126/6a88f03fc4e7c3da.js +1 -0
- package/dist-build-23687264126/6c6c45e66ff54281.woff2 +0 -0
- package/dist-build-23687264126/6d9009857c6df878.js +1 -0
- package/dist-build-23687264126/6ebe7cea59ed2853.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js.map +1 -0
- package/dist-build-23687264126/7073a7323e92bd11.woff2 +0 -0
- package/dist-build-23687264126/70ac433ae2a89a89.js +1 -0
- package/dist-build-23687264126/70ee4ee625ac0ec1.js +1 -0
- package/dist-build-23687264126/718c6cc31274ab1a.woff2 +0 -0
- package/dist-build-23687264126/727696c3934d0966.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js.map +1 -0
- package/dist-build-23687264126/72cdbedfe04be9f9.woff2 +0 -0
- package/dist-build-23687264126/7509c9f56fe9e532.woff2 +0 -0
- package/dist-build-23687264126/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist-build-23687264126/77b48bc05299ecca.woff2 +0 -0
- package/dist-build-23687264126/7a0a0215c248c73d.woff2 +0 -0
- package/dist-build-23687264126/7c0d0c5180de8729.js +1 -0
- package/dist-build-23687264126/7f00bebb24e40167.woff2 +0 -0
- package/dist-build-23687264126/802c6176541eeed7.woff2 +0 -0
- package/dist-build-23687264126/8080081b3379c637.woff2 +0 -0
- package/dist-build-23687264126/81cfdaeaa0bbca1f.js +1 -0
- package/dist-build-23687264126/8605507b7a8487c4.woff2 +0 -0
- package/dist-build-23687264126/893a160d06428365.js +1 -0
- package/dist-build-23687264126/893a160d06428365.js.map +1 -0
- package/dist-build-23687264126/8a83d654702f6534.woff2 +0 -0
- package/dist-build-23687264126/8fe71173a13fe571.woff2 +0 -0
- package/dist-build-23687264126/94aa912dcac90114.js +1 -0
- package/dist-build-23687264126/9624cec0f9bdd81e.woff2 +0 -0
- package/dist-build-23687264126/98a3af55a1698171.woff2 +0 -0
- package/dist-build-23687264126/99823aaebba56f46.js +1 -0
- package/dist-build-23687264126/9ba85996af74c5ce.woff2 +0 -0
- package/dist-build-23687264126/9ddb22faa35006e7.woff2 +0 -0
- package/dist-build-23687264126/a167fb2799dd741b.woff2 +0 -0
- package/dist-build-23687264126/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist-build-23687264126/a246c73905a31c93.woff2 +0 -0
- package/dist-build-23687264126/a325099b0a580ce2.js +2 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.map +1 -0
- package/dist-build-23687264126/a401aa7939cb6e6f.woff2 +0 -0
- package/dist-build-23687264126/a40fef67997d3b2c.js +1 -0
- package/dist-build-23687264126/a62897b000a24b86.js +1 -0
- package/dist-build-23687264126/a6ed036f17a1ea29.woff2 +0 -0
- package/dist-build-23687264126/a77bac4877483a0a.js +1 -0
- package/dist-build-23687264126/a9f25ca430709a1a.woff2 +0 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js +2 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.map +1 -0
- package/dist-build-23687264126/ab0f637d6cff12e4.js +1 -0
- package/dist-build-23687264126/afa9121a49e95351.woff2 +0 -0
- package/dist-build-23687264126/afcda12d9f805543.woff2 +0 -0
- package/dist-build-23687264126/b09ded85a7da77f1.woff2 +0 -0
- package/dist-build-23687264126/b10dbe5318a91a12.js +1 -0
- package/dist-build-23687264126/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist-build-23687264126/b4a074bf828bb757.woff2 +0 -0
- package/dist-build-23687264126/b7f447da43f6e596.woff2 +0 -0
- package/dist-build-23687264126/bcca84a524572d10.woff2 +0 -0
- package/dist-build-23687264126/be093e052a6d50eb.js +1 -0
- package/dist-build-23687264126/be4d1f97b11d087c.woff2 +0 -0
- package/dist-build-23687264126/bec14780d81164de.woff2 +0 -0
- package/dist-build-23687264126/c31657fe213c1b5e.js +1 -0
- package/dist-build-23687264126/c49ef726d3f0420b.js +1 -0
- package/dist-build-23687264126/c553f7e0199c5084.woff2 +0 -0
- package/dist-build-23687264126/c94ac2fdc1ff1418.js +1 -0
- package/dist-build-23687264126/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist-build-23687264126/cbbb57b397433964.js +2 -0
- package/dist-build-23687264126/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/cbbb57b397433964.js.map +1 -0
- package/dist-build-23687264126/d188f7f036ac5779.woff2 +0 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js +2 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.map +1 -0
- package/dist-build-23687264126/d265d81c58525ae4.woff2 +0 -0
- package/dist-build-23687264126/d5942cd81663e136.woff2 +0 -0
- package/dist-build-23687264126/d66b8ff73d95cabb.woff2 +0 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js +1 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js.map +1 -0
- package/dist-build-23687264126/d88899ef0fd16719.woff2 +0 -0
- package/dist-build-23687264126/d92b5ecf31fc187b.js +1 -0
- package/dist-build-23687264126/d9a5d958e69e058d.woff2 +0 -0
- package/dist-build-23687264126/dac90d495be353a0.woff2 +0 -0
- package/dist-build-23687264126/db0550511978dc47.js +1 -0
- package/dist-build-23687264126/dd8ce598529c3fab.woff2 +0 -0
- package/dist-build-23687264126/de013f1be25103fa.woff2 +0 -0
- package/dist-build-23687264126/df222fceeffca849.woff2 +0 -0
- package/dist-build-23687264126/df22bda08ec7964c.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js.map +1 -0
- package/dist-build-23687264126/e465f1481f0d2e1c.js +1 -0
- package/dist-build-23687264126/e62b00b9199c1ac9.woff2 +0 -0
- package/dist-build-23687264126/e696cef1407b2610.woff2 +0 -0
- package/dist-build-23687264126/eb42de5422d9af00.js +1 -0
- package/dist-build-23687264126/eed48feba743e21c.woff2 +0 -0
- package/dist-build-23687264126/f135ef54213f8975.js +1 -0
- package/dist-build-23687264126/f260e50923d4283b.js +1 -0
- package/dist-build-23687264126/f543c88feb236d11.woff2 +0 -0
- package/dist-build-23687264126/f591b0079faa93fe.woff2 +0 -0
- package/dist-build-23687264126/f6ed27923769ad1d.woff2 +0 -0
- package/dist-build-23687264126/f8d066e92ea157c6.js +1 -0
- package/dist-build-23687264126/fae042506530c1e6.js +1 -0
- package/dist-build-23687264126/favicon.ico +0 -0
- package/dist-build-23687264126/fbebeb4336e67012.woff2 +0 -0
- package/dist-build-23687264126/fd574df77d31a5eb.js +1 -0
- package/dist-build-23687264126/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist-build-23687264126/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist-build-23687264126/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist-build-23687264126/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist-build-23687264126/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist-build-23687264126/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist-build-23687264126/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist-build-23687264126/index.html +9 -0
- package/dist-build-23687264126/logo-512.png +0 -0
- package/dist-build-23687264126/logo.svg +30 -0
- package/dist-build-23687264126/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist-build-23687264126/service-worker.js +1 -0
- package/dist-build-23687264126/service-worker.js.map +1 -0
- package/e2e/core/env.ts +5 -0
- package/e2e/core/global-setup.ts +34 -0
- package/e2e/core/test.ts +21 -0
- package/e2e/pages/app-shell.page.ts +34 -0
- package/e2e/pages/etl-sources.page.ts +35 -0
- package/e2e/pages/report-sections.page.ts +20 -0
- package/e2e/pages/section-preview.modal.ts +29 -0
- package/e2e/specs/etl-sources.spec.ts +51 -0
- package/e2e/specs/navigation.spec.ts +13 -0
- package/e2e/specs/section-preview-validation.spec.ts +38 -0
- package/e2e/specs/section-preview.spec.ts +94 -0
- package/e2e/tsconfig.json +11 -0
- package/example.env +5 -0
- package/jest.config.js +28 -0
- package/package.json +82 -0
- package/playwright.config.ts +28 -0
- package/src/admin-card-link.extension.module.scss +55 -0
- package/src/admin-card-link.extension.tsx +24 -0
- package/src/components/admin/admin-page.component.tsx +31 -0
- package/src/components/admin/age-categories-page.component.tsx +109 -0
- package/src/components/admin/age-groups-page.component.tsx +146 -0
- package/src/components/admin/etl-sources-page.component.tsx +344 -0
- package/src/components/admin/report-categories-page.component.tsx +256 -0
- package/src/components/admin/report-library-page.component.tsx +540 -0
- package/src/components/ai-support/ai-assist-button.component.tsx +30 -0
- package/src/components/ai-support/ai-assist-modal.component.tsx +81 -0
- package/src/components/ai-support/ai.service.ts +21 -0
- package/src/components/ai-support/ai.types.ts +12 -0
- package/src/components/app-shell/report-builder-shell.component.tsx +120 -0
- package/src/components/app-shell/report-builder-shell.scss +15 -0
- package/src/components/data-themes/data-theme-form.component.tsx +59 -0
- package/src/components/data-themes/data-theme-modal.component.tsx +349 -0
- package/src/components/data-themes/data-themes-page.component.tsx +132 -0
- package/src/components/data-themes/data-themes-table.component.tsx +91 -0
- package/src/components/data-themes/icon-registry.ts +35 -0
- package/src/components/data-themes/sections/data-theme-basics.section.tsx +63 -0
- package/src/components/data-themes/sections/data-theme-condition-columns.section.tsx +397 -0
- package/src/components/data-themes/sections/data-theme-fields-editor.section.tsx +125 -0
- package/src/components/data-themes/sections/data-theme-metadata.section.tsx +245 -0
- package/src/components/data-themes/sections/data-theme-preview.section.tsx +115 -0
- package/src/components/data-themes/sections/data-theme-source.section.tsx +184 -0
- package/src/components/indicators/README.md +24 -0
- package/src/components/indicators/base-indicator-basic-fields.component.tsx +18 -0
- package/src/components/indicators/base-indicator-basics.section.tsx +54 -0
- package/src/components/indicators/base-indicator-countby.section.tsx +25 -0
- package/src/components/indicators/base-indicator-criteria.section.tsx +83 -0
- package/src/components/indicators/base-indicator-details-form.component.tsx +80 -0
- package/src/components/indicators/base-indicator-theme-unit-fields.component.tsx +39 -0
- package/src/components/indicators/create-base-indicator-modal.component.tsx +501 -0
- package/src/components/indicators/create-composite-base-indicator-modal.component.tsx +297 -0
- package/src/components/indicators/create-final-indicator-modal.component.tsx +260 -0
- package/src/components/indicators/diagnosis-filters-form.component.tsx +101 -0
- package/src/components/indicators/disaggregation-panel.component.tsx +93 -0
- package/src/components/indicators/handler/concept-search-multiselect.component.tsx +153 -0
- package/src/components/indicators/handler/question-answer-concept-search.component.tsx +336 -0
- package/src/components/indicators/indicator-status-tag.component.tsx +9 -0
- package/src/components/indicators/indicators-page.component.tsx +481 -0
- package/src/components/indicators/indicators-page.scss +121 -0
- package/src/components/indicators/indicators-table.component.tsx +166 -0
- package/src/components/indicators/preview-table.component.tsx +31 -0
- package/src/components/indicators/sections/composite-indicator-basics.section.tsx +36 -0
- package/src/components/indicators/sections/composite-indicator-picker.section.tsx +161 -0
- package/src/components/indicators/sections/composite-indicator-sql-preview.section.tsx +31 -0
- package/src/components/indicators/sections/final-indicator-basics.section.tsx +46 -0
- package/src/components/indicators/sections/final-indicator-disaggregation.section.tsx +47 -0
- package/src/components/indicators/sections/final-indicator-picker.section.tsx +92 -0
- package/src/components/indicators/sections/final-indicator-preview.section.tsx +20 -0
- package/src/components/indicators/sections/final-indicator-results-preview.section.tsx +65 -0
- package/src/components/indicators/sections/indicator-basics.section.tsx +40 -0
- package/src/components/indicators/sections/indicator-conditions.section.tsx +194 -0
- package/src/components/indicators/sections/indicator-sql-preview.section.tsx +26 -0
- package/src/components/indicators/sections/indicator-theme.section.tsx +48 -0
- package/src/components/indicators/sql-preview.component.tsx +19 -0
- package/src/components/indicators/types/base-indicator-form.types.ts +17 -0
- package/src/components/indicators/types/base-indicator-theme.constants.ts +8 -0
- package/src/components/indicators/types/composite-indicator.types.ts +21 -0
- package/src/components/indicators/types/condition-ui.types.ts +11 -0
- package/src/components/indicators/types/data-theme-config.types.ts +88 -0
- package/src/components/indicators/types/indicator-types.ts +56 -0
- package/src/components/indicators/types/sql-builders.ts +43 -0
- package/src/components/indicators/utils/composite-indicator-sql.utils.ts +206 -0
- package/src/components/indicators/utils/concept-preload.utils.ts +21 -0
- package/src/components/indicators/utils/final-indicator-sql.utils.ts +124 -0
- package/src/components/indicators/utils/indicator-conditions-hydration.utils.ts +254 -0
- package/src/components/indicators/utils/indicator-sql.utils.ts +185 -0
- package/src/components/landing/landing-action-item.component.tsx +50 -0
- package/src/components/landing/landing-action-list.component.tsx +12 -0
- package/src/components/landing/landing-activity-list.component.tsx +47 -0
- package/src/components/landing/landing-footer-grid.component.tsx +45 -0
- package/src/components/landing/landing-hero.component.tsx +18 -0
- package/src/components/landing/landing-section-card.component.tsx +33 -0
- package/src/components/landing/report-builder-landing-page.component.tsx +103 -0
- package/src/components/landing/report-builder-landing-page.scss +131 -0
- package/src/components/report/dashboard/reports-table.component.tsx +145 -0
- package/src/components/report/definition/panels/properties-panel.component.tsx +38 -0
- package/src/components/report/definition/panels/report-structure-panel.component.tsx +61 -0
- package/src/components/report/definition/panels/selection-panel.component.tsx +58 -0
- package/src/components/report/definition/report-definition-editor.component.tsx +99 -0
- package/src/components/report/definition/report-definition.types.ts +66 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/report/design/panels/JsonPreviewPanel.scss +32 -0
- package/src/components/report/design/panels/JsonPreviewPanel.tsx +104 -0
- package/src/components/report/design/panels/mapping-preview-panel.component.tsx +82 -0
- package/src/components/report/design/panels/mapping-preview-panel.scss +55 -0
- package/src/components/report/design/panels/template-structure-panel.component.tsx +296 -0
- package/src/components/report/design/panels/template-structure-panel.scss +81 -0
- package/src/components/report/design/report-design-editor.component.tsx +894 -0
- package/src/components/report/design/report-design.types.ts +43 -0
- package/src/components/report/design/report-design.utils.ts +86 -0
- package/src/components/report/panels/report-detail.component.tsx +71 -0
- package/src/components/report/panels/report-panel-shell.component.tsx +60 -0
- package/src/components/report/report-dashboard.page.component.tsx +75 -0
- package/src/components/report/report-editor.page.component.tsx +466 -0
- package/src/components/report/report.routes.tsx +30 -0
- package/src/components/report-sections/create-report-section-modal.component.tsx +278 -0
- package/src/components/report-sections/hooks/useAgeCategories.ts +25 -0
- package/src/components/report-sections/hooks/useSectionEditorState.ts +306 -0
- package/src/components/report-sections/panels/Dhis2MappingPanel.tsx +157 -0
- package/src/components/report-sections/panels/DisaggregationPanel.tsx +97 -0
- package/src/components/report-sections/panels/IndicatorPickerPanel.tsx +143 -0
- package/src/components/report-sections/panels/SectionBasicsPanel.tsx +27 -0
- package/src/components/report-sections/report-section-preview-modal.component.tsx +418 -0
- package/src/components/report-sections/report-sections-page.component.tsx +313 -0
- package/src/components/report-sections/section-types.ts +55 -0
- package/src/components/report-sections/section-utils.ts +46 -0
- package/src/components/report-sections/sections-page.scss +79 -0
- package/src/components/run-reports/run-reports-page.component.tsx +23 -0
- package/src/components/shared/header/builder-header-actions.component.tsx +38 -0
- package/src/components/shared/header/header.component.tsx +85 -0
- package/src/components/shared/header/header.scss +150 -0
- package/src/components/shared/header/illustration.component.tsx +34 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.scss +32 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.tsx +104 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.component.tsx +82 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.scss +55 -0
- package/src/components/shared/preview/query-results-preview.component.tsx +204 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.component.tsx +296 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.scss +81 -0
- package/src/config-schema.ts +23 -0
- package/src/globals.d.ts +14 -0
- package/src/hooks/theme/useDataThemes.ts +28 -0
- package/src/hooks/theme/useMambaTableMeta.ts +34 -0
- package/src/hooks/theme/useMambaTables.ts +63 -0
- package/src/index.ts +23 -0
- package/src/resources/agegroup/agegroups.api.ts +58 -0
- package/src/resources/concepts/concept-mapper.ts +21 -0
- package/src/resources/concepts/concept-types.ts +31 -0
- package/src/resources/concepts/concepts.resource.ts +44 -0
- package/src/resources/concepts/useConceptSearch.ts +41 -0
- package/src/resources/etl-source/etl-source.api.ts +65 -0
- package/src/resources/indicator/indicators.api.ts +125 -0
- package/src/resources/openmrs-api.ts +24 -0
- package/src/resources/preview/sql-preview.api.ts +54 -0
- package/src/resources/report/reports.api.ts +117 -0
- package/src/resources/report-category/report-category.api.ts +41 -0
- package/src/resources/report-library/report-library.api.ts +63 -0
- package/src/resources/report-section/report-sections.api.ts +73 -0
- package/src/resources/report-section/section-preview.api.ts +21 -0
- package/src/resources/theme/data-theme.api.ts +88 -0
- package/src/resources/theme/mamba-schema.api.ts +31 -0
- package/src/resources/theme/mamba-table-meta.api.ts +45 -0
- package/src/root.component.tsx +20 -0
- package/src/routes/report-builder.routes.tsx +66 -0
- package/src/routes/report-builder.scss +56 -0
- package/src/routes.json +21 -0
- package/src/sample-template.ts +121 -0
- package/src/template-utils.ts +110 -0
- package/src/types/carbon-react-inert.d.ts +13 -0
- package/src/types/condition-operators.ts +49 -0
- package/src/types/theme/data-theme.types.ts +88 -0
- package/src/utils/html-entities.utils.ts +23 -0
- package/tools/setup-tests.ts +1 -0
- package/translations/en.json +4 -0
- package/tsconfig.json +43 -0
- package/webpack.config.js +14 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 652f476a8a1603d3.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkopenmrs=self.webpackChunkopenmrs||[]).push([[2468],{97408(e,t,n){"use strict";n.d(t,{B4:()=>l,D3:()=>u,jX:()=>i,jj:()=>a,sM:()=>c,uA:()=>s});var r=n(2098);const o={flags:function(){const e={};for(const t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){const n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()},i=(0,r.jf)("feature-flags",o);function s(e,t,n){i.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function u(){const e=i.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{const n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function a(e){return i.getState().flags[e].enabled}function c(e,t){i.subscribe(n=>{t(n.flags[e].enabled)})}function l(e,t){i.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}i.subscribe(e=>{for(const[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))})},48088(e,t,n){"use strict";n.d(t,{B4:()=>r.B4,D3:()=>r.D3,jX:()=>r.jX,jj:()=>r.jj,sM:()=>r.sM,uA:()=>r.uA});var r=n(97408)},2202(e,t,n){var r,o,i,s;i=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},"object"==((s=t)&&"undefined"!=typeof Symbol&&s.constructor===Symbol?"symbol":typeof s)?e.exports=i():void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)},3594(e,t){"use strict";function n(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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return o=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o},o.apply(null,arguments)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||s(e)||l(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 c(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function l(e,t){if(e){if("string"==typeof e)return n(e,t);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)?n(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 o(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},f(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function h(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.")}t.MM=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.delimiter,r=void 0===n?"/":n,o=t.end,i=void 0===o||o,s=t.sensitive,u=void 0!==s&&s,a=t.trailing,l=void 0===a||a,f=[],p=u?"":"i",h=[],d=!0,y=!1,b=void 0;try{for(var v,_=E(e,[])[Symbol.iterator]();!(d=(v=_.next()).done);d=!0){var g=v.value,x="object"===(void 0===g?"undefined":c(g))?g:w(g,t),O=!0,C=!1,D=void 0;try{for(var j,F=S(x.tokens,0,[])[Symbol.iterator]();!(O=(j=F.next()).done);O=!0){var P=j.value;h.push(A(P,r,f,x.originalPath))}}catch(e){C=!0,D=e}finally{try{O||null==F.return||F.return()}finally{if(C)throw D}}}}catch(e){y=!0,b=e}finally{try{d||null==_.return||_.return()}finally{if(y)throw b}}var B="^(?:".concat(h.join("|"),")");return l&&(B+="(?:".concat(m(r),"$)?")),B+=i?"$":"(?=".concat(m(r),"|$)"),{regexp:new RegExp(B,p),keys:f}};var d=function(e){return e},y=RegExp("^[$_\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376-\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E-\\u066F\\u0671-\\u06D3\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4-\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088F\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC-\\u09DD\\u09DF-\\u09E1\\u09F0-\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0-\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F-\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C-\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5C-\\u0C5D\\u0C60-\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDC-\\u0CDE\\u0CE0-\\u0CE1\\u0CF1-\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32-\\u0E33\\u0E40-\\u0E46\\u0E81-\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2-\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065-\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE-\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7DC\\uA7F1-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD-\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5-\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40-\\uFB41\\uFB43-\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}-\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10140}-\\u{10174}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{10300}-\\u{1031F}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{103A0}-\\u{103C3}\\u{103C8}-\\u{103CF}\\u{103D1}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{10570}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}-\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}-\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}-\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10860}-\\u{10876}\\u{10880}-\\u{1089E}\\u{108E0}-\\u{108F2}\\u{108F4}-\\u{108F5}\\u{10900}-\\u{10915}\\u{10920}-\\u{10939}\\u{10940}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BE}-\\u{109BF}\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A60}-\\u{10A7C}\\u{10A80}-\\u{10A9C}\\u{10AC0}-\\u{10AC7}\\u{10AC9}-\\u{10AE4}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B60}-\\u{10B72}\\u{10B80}-\\u{10B91}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10D00}-\\u{10D23}\\u{10D4A}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10E80}-\\u{10EA9}\\u{10EB0}-\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10F00}-\\u{10F1C}\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F70}-\\u{10F81}\\u{10FB0}-\\u{10FC4}\\u{10FE0}-\\u{10FF6}\\u{11003}-\\u{11037}\\u{11071}-\\u{11072}\\u{11075}\\u{11083}-\\u{110AF}\\u{110D0}-\\u{110E8}\\u{11103}-\\u{11126}\\u{11144}\\u{11147}\\u{11150}-\\u{11172}\\u{11176}\\u{11183}-\\u{111B2}\\u{111C1}-\\u{111C4}\\u{111DA}\\u{111DC}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122B}\\u{1123F}-\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A8}\\u{112B0}-\\u{112DE}\\u{11305}-\\u{1130C}\\u{1130F}-\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}-\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}\\u{11350}\\u{1135D}-\\u{11361}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}\\u{113D1}\\u{113D3}\\u{11400}-\\u{11434}\\u{11447}-\\u{1144A}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114AF}\\u{114C4}-\\u{114C5}\\u{114C7}\\u{11580}-\\u{115AE}\\u{115D8}-\\u{115DB}\\u{11600}-\\u{1162F}\\u{11644}\\u{11680}-\\u{116AA}\\u{116B8}\\u{11700}-\\u{1171A}\\u{11740}-\\u{11746}\\u{11800}-\\u{1182B}\\u{118A0}-\\u{118DF}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}-\\u{11916}\\u{11918}-\\u{1192F}\\u{1193F}\\u{11941}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D0}\\u{119E1}\\u{119E3}\\u{11A00}\\u{11A0B}-\\u{11A32}\\u{11A3A}\\u{11A50}\\u{11A5C}-\\u{11A89}\\u{11A9D}\\u{11AB0}-\\u{11AF8}\\u{11BC0}-\\u{11BE0}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2E}\\u{11C40}\\u{11C72}-\\u{11C8F}\\u{11D00}-\\u{11D06}\\u{11D08}-\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D60}-\\u{11D65}\\u{11D67}-\\u{11D68}\\u{11D6A}-\\u{11D89}\\u{11D98}\\u{11DB0}-\\u{11DDB}\\u{11EE0}-\\u{11EF2}\\u{11F02}\\u{11F04}-\\u{11F10}\\u{11F12}-\\u{11F33}\\u{11FB0}\\u{12000}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF0}\\u{13000}-\\u{1342F}\\u{13441}-\\u{13446}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A70}-\\u{16ABE}\\u{16AD0}-\\u{16AED}\\u{16B00}-\\u{16B2F}\\u{16B40}-\\u{16B43}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D6C}\\u{16E40}-\\u{16E7F}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F50}\\u{16F93}-\\u{16F9F}\\u{16FE0}-\\u{16FE1}\\u{16FE3}\\u{16FF2}-\\u{16FF6}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}-\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}-\\u{1D49F}\\u{1D4A2}\\u{1D4A5}-\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E030}-\\u{1E06D}\\u{1E100}-\\u{1E12C}\\u{1E137}-\\u{1E13D}\\u{1E14E}\\u{1E290}-\\u{1E2AD}\\u{1E2C0}-\\u{1E2EB}\\u{1E4D0}-\\u{1E4EB}\\u{1E5D0}-\\u{1E5ED}\\u{1E5F0}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6E2}\\u{1E6E4}-\\u{1E6E5}\\u{1E6E7}-\\u{1E6ED}\\u{1E6F0}-\\u{1E6F4}\\u{1E6FE}-\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}-\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1E800}-\\u{1E8C4}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}-\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}-\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}-\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}]$","u"),b=RegExp("^[$\\u200C\\u200D\\u0030-\\u0039\\u0041-\\u005A\\u005F\\u0061-\\u007A\\u00AA\\u00B5\\u00B7\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376-\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u0591-\\u05BD\\u05BF\\u05C1-\\u05C2\\u05C4-\\u05C5\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u07FD\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088F\\u0897-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7-\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC-\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47-\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F-\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47-\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C-\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82-\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3C-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55-\\u0C56\\u0C58-\\u0C5A\\u0C5C-\\u0C5D\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5-\\u0CD6\\u0CDC-\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2-\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81-\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18-\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1715\\u171F-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772-\\u1773\\u1780-\\u17D3\\u17D7\\u17DC-\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1ABF-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B4C\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CD0-\\u1CD2\\u1CD4-\\u1CFA\\u1D00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C-\\u200D\\u203F-\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7DC\\uA7F1-\\uA827\\uA82C\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABEA\\uABEC-\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40-\\uFB41\\uFB43-\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33-\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF65-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}-\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10140}-\\u{10174}\\u{101FD}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{102E0}\\u{10300}-\\u{1031F}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{1037A}\\u{10380}-\\u{1039D}\\u{103A0}-\\u{103C3}\\u{103C8}-\\u{103CF}\\u{103D1}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{10570}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}-\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}-\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}-\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10860}-\\u{10876}\\u{10880}-\\u{1089E}\\u{108E0}-\\u{108F2}\\u{108F4}-\\u{108F5}\\u{10900}-\\u{10915}\\u{10920}-\\u{10939}\\u{10940}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BE}-\\u{109BF}\\u{10A00}-\\u{10A03}\\u{10A05}-\\u{10A06}\\u{10A0C}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10A60}-\\u{10A7C}\\u{10A80}-\\u{10A9C}\\u{10AC0}-\\u{10AC7}\\u{10AC9}-\\u{10AE6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B60}-\\u{10B72}\\u{10B80}-\\u{10B91}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10D00}-\\u{10D27}\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D65}\\u{10D69}-\\u{10D6D}\\u{10D6F}-\\u{10D85}\\u{10E80}-\\u{10EA9}\\u{10EAB}-\\u{10EAC}\\u{10EB0}-\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10EFA}-\\u{10F1C}\\u{10F27}\\u{10F30}-\\u{10F50}\\u{10F70}-\\u{10F85}\\u{10FB0}-\\u{10FC4}\\u{10FE0}-\\u{10FF6}\\u{11000}-\\u{11046}\\u{11066}-\\u{11075}\\u{1107F}-\\u{110BA}\\u{110C2}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11100}-\\u{11134}\\u{11136}-\\u{1113F}\\u{11144}-\\u{11147}\\u{11150}-\\u{11173}\\u{11176}\\u{11180}-\\u{111C4}\\u{111C9}-\\u{111CC}\\u{111CE}-\\u{111DA}\\u{111DC}\\u{11200}-\\u{11211}\\u{11213}-\\u{11237}\\u{1123E}-\\u{11241}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A8}\\u{112B0}-\\u{112EA}\\u{112F0}-\\u{112F9}\\u{11300}-\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}-\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}-\\u{11333}\\u{11335}-\\u{11339}\\u{1133B}-\\u{11344}\\u{11347}-\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113C0}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}-\\u{113D3}\\u{113E1}-\\u{113E2}\\u{11400}-\\u{1144A}\\u{11450}-\\u{11459}\\u{1145E}-\\u{11461}\\u{11480}-\\u{114C5}\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B5}\\u{115B8}-\\u{115C0}\\u{115D8}-\\u{115DD}\\u{11600}-\\u{11640}\\u{11644}\\u{11650}-\\u{11659}\\u{11680}-\\u{116B8}\\u{116C0}-\\u{116C9}\\u{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171D}-\\u{1172B}\\u{11730}-\\u{11739}\\u{11740}-\\u{11746}\\u{11800}-\\u{1183A}\\u{118A0}-\\u{118E9}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}-\\u{11916}\\u{11918}-\\u{11935}\\u{11937}-\\u{11938}\\u{1193B}-\\u{11943}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D7}\\u{119DA}-\\u{119E1}\\u{119E3}-\\u{119E4}\\u{11A00}-\\u{11A3E}\\u{11A47}\\u{11A50}-\\u{11A99}\\u{11A9D}\\u{11AB0}-\\u{11AF8}\\u{11B60}-\\u{11B67}\\u{11BC0}-\\u{11BE0}\\u{11BF0}-\\u{11BF9}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C36}\\u{11C38}-\\u{11C40}\\u{11C50}-\\u{11C59}\\u{11C72}-\\u{11C8F}\\u{11C92}-\\u{11CA7}\\u{11CA9}-\\u{11CB6}\\u{11D00}-\\u{11D06}\\u{11D08}-\\u{11D09}\\u{11D0B}-\\u{11D36}\\u{11D3A}\\u{11D3C}-\\u{11D3D}\\u{11D3F}-\\u{11D47}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}-\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D90}-\\u{11D91}\\u{11D93}-\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11DB0}-\\u{11DDB}\\u{11DE0}-\\u{11DE9}\\u{11EE0}-\\u{11EF6}\\u{11F00}-\\u{11F10}\\u{11F12}-\\u{11F3A}\\u{11F3E}-\\u{11F42}\\u{11F50}-\\u{11F5A}\\u{11FB0}\\u{12000}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF0}\\u{13000}-\\u{1342F}\\u{13440}-\\u{13455}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{16139}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A70}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF0}-\\u{16AF4}\\u{16B00}-\\u{16B36}\\u{16B40}-\\u{16B43}\\u{16B50}-\\u{16B59}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D6C}\\u{16D70}-\\u{16D79}\\u{16E40}-\\u{16E7F}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F4F}-\\u{16F87}\\u{16F8F}-\\u{16F9F}\\u{16FE0}-\\u{16FE1}\\u{16FE3}-\\u{16FE4}\\u{16FF0}-\\u{16FF6}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}-\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1BC9D}-\\u{1BC9E}\\u{1CCF0}-\\u{1CCF9}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D165}-\\u{1D169}\\u{1D16D}-\\u{1D172}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}-\\u{1D49F}\\u{1D4A2}\\u{1D4A5}-\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1D7CE}-\\u{1D7FF}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}-\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E030}-\\u{1E06D}\\u{1E08F}\\u{1E100}-\\u{1E12C}\\u{1E130}-\\u{1E13D}\\u{1E140}-\\u{1E149}\\u{1E14E}\\u{1E290}-\\u{1E2AE}\\u{1E2C0}-\\u{1E2F9}\\u{1E4D0}-\\u{1E4F9}\\u{1E5D0}-\\u{1E5FA}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6F5}\\u{1E6FE}-\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}-\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1E800}-\\u{1E8C4}\\u{1E8D0}-\\u{1E8D6}\\u{1E900}-\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}-\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}-\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}-\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{1FBF0}-\\u{1FBF9}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}\\u{E0100}-\\u{E01EF}]$","u"),v={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function m(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}var _=function e(t,n){r(this,e),this.tokens=t,this.originalPath=n},g=function(e){function t(e,n){var o;r(this,t);var s=e;return n&&(s+=": ".concat(n)),(o=function(e,t,n){return t=i(t),function(e,t){return!t||"object"!==c(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}(e,p()?Reflect.construct(t,n||[],i(e).constructor):t.apply(e,n))}(this,t,[s+="; visit https://git.new/pathToRegexpError for info"])).originalPath=n,o}return 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)}(t,e),t}(f(TypeError));function w(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).encodePath,n=void 0===t?d:t,r=a(e),o=[],i=0,s=0;function u(){var t="";if(y.test(r[i]))do{t+=r[i++]}while(b.test(r[i]));else if('"'===r[i]){for(var n=i;i++<r.length;){if('"'===r[i]){i++,n=0;break}"\\"===r[i]&&i++,t+=r[i]}if(n)throw new g("Unterminated quote at index ".concat(n),e)}if(!t)throw new g("Missing parameter name at index ".concat(i),e);return t}for(;i<r.length;){var c=r[i],l=v[c];l?o.push({type:l,index:i++,value:c}):"\\"===c?o.push({type:"escape",index:i++,value:r[i++]}):":"===c?o.push({type:"param",index:i++,value:u()}):"*"===c?o.push({type:"wildcard",index:i++,value:u()}):o.push({type:"char",index:i++,value:c})}return o.push({type:"end",index:i,value:""}),new _(function t(r){for(var i=[];;){var u=o[s++];if(u.type===r)break;if("char"!==u.type&&"escape"!==u.type)if("param"!==u.type&&"wildcard"!==u.type){if("{"!==u.type)throw new g("Unexpected ".concat(u.type," at index ").concat(u.index,", expected ").concat(r),e);i.push({type:"group",tokens:t("}")})}else i.push({type:u.type,name:u.value});else{for(var a=u.value,c=o[s];"char"===c.type||"escape"===c.type;)a+=c.value,c=o[++s];i.push({type:"text",value:n(a)})}}return i}("end"),e)}function E(e,t){if(Array.isArray(e)){var n=!0,r=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)E(i.value,t)}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}}else t.push(e);return t}function S(e,t,n){var r,o,i,s,u,a,c,l;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(s,"next",{value:a(0)}),u(s,"throw",{value:a(1)}),u(s,"return",{value:a(2)}),"function"==typeof Symbol&&u(s,Symbol.iterator,{value:function(){return this}}),s;function a(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}(this,function(f){switch(f.label){case 0:return t!==e.length?[3,2]:[4,n];case 1:return[2,f.sent()];case 2:if("group"!==(r=e[t]).type)return[3,11];o=!0,i=!1,s=void 0,f.label=3;case 3:f.trys.push([3,8,9,10]),u=S(r.tokens,0,n.slice())[Symbol.iterator](),f.label=4;case 4:return(o=(a=u.next()).done)?[3,7]:(c=a.value,[5,h(S(e,t+1,c))]);case 5:f.sent(),f.label=6;case 6:return o=!0,[3,4];case 7:return[3,10];case 8:return l=f.sent(),i=!0,s=l,[3,10];case 9:try{o||null==u.return||u.return()}finally{if(i)throw s}return[7];case 10:return[3,12];case 11:n.push(r),f.label=12;case 12:return[5,h(S(e,t+1,n))];case 13:return f.sent(),[2]}})}function A(e,t,n,r){var o="",i="",s=!0,u=!0,a=!1,c=void 0;try{for(var l,f=e[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var p=l.value;if("text"!==p.type)if("param"!==p.type&&"wildcard"!==p.type);else{if(!s&&!i)throw new g('Missing text before "'.concat(p.name,'" ').concat(p.type),r);"param"===p.type?o+="(".concat(x(t,s?"":i),"+)"):o+="([\\s\\S]+)",n.push(p),i="",s=!1}else o+=m(p.value),i+=p.value,s||(s=p.value.includes(t))}}catch(e){a=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(a)throw c}}return o}function x(e,t){return t.length<2?e.length<2?"[^".concat(m(e+t),"]"):"(?:(?!".concat(m(e),")[^").concat(m(t),"])"):e.length<2?"(?:(?!".concat(m(t),")[^").concat(m(e),"])"):"(?:(?!".concat(m(t),"|").concat(m(e),")[\\s\\S])")}},63833(e,t,n){"use strict";var r=n(34845);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},87097(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(90544),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),s.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject);t.AsyncSubject=u},89215(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(6852),u=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.ObjectUnsubscribedError;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject);t.BehaviorSubject=u},58423(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(89767).Subscriber);t.InnerSubscriber=i},56566(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(42058),i=n(15642),s=n(55905);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var u=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return s.throwError(this.error);case"C":return o.empty()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();t.Notification=u},45164(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95890),o=n(97283),i=n(87793),s=n(54656),u=n(76879),a=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||u.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),u.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),r.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=c(t))(function(t,r){var o;o=n.subscribe(function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=c(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function c(e){if(e||(e=u.config.Promise||Promise),!e)throw new Error("no Promise impl found");return e}t.Observable=a},33383(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76879),o=n(92180);t.empty={closed:!0,next:function(e){},error:function(e){if(r.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},15592(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(89767).Subscriber);t.OuterSubscriber=i},90880(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(45800),u=n(90544),a=n(1878),c=n(6852),l=n(25948),f=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new p(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new c.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=u.Subscription.EMPTY:(this.observers.push(e),t=new l.SubjectSubscription(this,e)),o&&e.add(e=new a.ObserveOnSubscriber(e,o)),n)for(var s=0;s<i&&!e.closed;s++)e.next(r[s]);else for(s=0;s<i&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||s.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(e-r[i].time<n);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&r.splice(0,i),r},t}(i.Subject);t.ReplaySubject=f;var p=function(e,t){this.time=e,this.value=t}},63880(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}();t.Scheduler=n},86461(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(45164),s=n(89767),u=n(90544),a=n(6852),c=n(25948),l=n(20964),f=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return o(t,e),t}(s.Subscriber);t.SubjectSubscriber=f;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[l.rxSubscriber]=function(){return new f(this)},t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new a.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),u.Subscription.EMPTY):this.isStopped?(e.complete(),u.Subscription.EMPTY):(this.observers.push(e),new c.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new h(e,t)},t}(i.Observable);t.Subject=p;var h=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):u.Subscription.EMPTY},t}(p);t.AnonymousSubject=h},25948(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(90544).Subscription);t.SubjectSubscription=i},89767(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}var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(27752),u=n(33383),a=n(90544),c=n(20964),l=n(76879),f=n(92180),p=function(e){function t(n,o,i){var s,a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=u.empty;break;case 1:if(!n){a.destination=u.empty;break}if("object"==(void 0===n?"undefined":(s=n)&&"undefined"!=typeof Symbol&&s.constructor===Symbol?"symbol":typeof s)){r(n,t)?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new h(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new h(a,n,o,i)}return a}return i(t,e),t.prototype[c.rxSubscriber]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(a.Subscription);t.Subscriber=p;var h=function(e){function t(t,n,r,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var c=a;return s.isFunction(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==u.empty&&(c=Object.create(n),s.isFunction(c.unsubscribe)&&a.add(c.unsubscribe.bind(c)),c.unsubscribe=a.unsubscribe.bind(a))),a._context=c,a._next=i,a._error=r,a._complete=o,a}return i(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=l.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):f.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;f.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),l.config.useDeprecatedSynchronousErrorHandling)throw e;f.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!l.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return l.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(f.hostReportError(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(p);t.SafeSubscriber=h},90544(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}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4559),i=n(30287),s=n(27752),u=n(58854),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,a=n._parentOrParents,l=n._ctorUnsubscribe,f=n._unsubscribe,p=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(a,e))a.remove(this);else if(null!==a)for(var h=0;h<a.length;++h)a[h].remove(this);if(s.isFunction(f)){l&&(this._unsubscribe=void 0);try{f.call(this)}catch(e){t=r(e,u.UnsubscriptionError)?c(e.errors):[e]}}if(o.isArray(p)){h=-1;for(var d=p.length;++h<d;){var y=p[h];if(i.isObject(y))try{y.unsubscribe()}catch(e){t=t||[],r(e,u.UnsubscriptionError)?t=t.concat(c(e.errors)):t.push(e)}}}if(t)throw new u.UnsubscriptionError(t)}},e.prototype.add=function(t){var n,o=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n){case"function":o=new e(t);case"object":if(o===this||o.closed||"function"!=typeof o.unsubscribe)return o;if(this.closed)return o.unsubscribe(),o;if(!r(o,e)){var i=o;(o=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var s=o._parentOrParents;if(null===s)o._parentOrParents=this;else if(r(s,e)){if(s===this)return o;o._parentOrParents=[s,this]}else{if(-1!==s.indexOf(this))return o;s.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[o]:u.push(o),o},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function c(e){return e.reduce(function(e,t){return e.concat(r(t,u.UnsubscriptionError)?t.errors:t)},[])}t.Subscription=a},76879(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=e},get useDeprecatedSynchronousErrorHandling(){return n}}},26837(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}var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(89767),u=n(45164),a=n(24327),c=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(s.Subscriber);t.SimpleInnerSubscriber=c;var l=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(s.Subscriber);t.ComplexInnerSubscriber=l;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(s.Subscriber);t.SimpleOuterSubscriber=f;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e,t,n,r){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(s.Subscriber);t.ComplexOuterSubscriber=p,t.innerSubscribe=function(e,t){if(!t.closed){if(r(e,u.Observable))return e.subscribe(t);var n;try{n=a.subscribeTo(e)(t)}catch(e){t.error(e)}return n}}},32336(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i,s=n(86461),u=n(45164),a=n(89767),c=n(90544),l=n(45403),f=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new c.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=c.Subscription.EMPTY)),e},t.prototype.refCount=function(){return l.refCount()(this)},t}(u.Observable);t.ConnectableObservable=f,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(i=f.prototype)._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}};var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(s.SubjectSubscriber);!function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}(a.Subscriber)},26963(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(45164),s=n(93262),u=n(17761),a=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=s.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=n,o.scheduler=r,(!u.isNumeric(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=s.asap),o}return o(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=s.asap),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(i.Observable);t.SubscribeOnObservable=a},20661(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(98775),s=n(4559),u=n(15592),a=n(45050),c=n(5550),l={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return i.isScheduler(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&s.isArray(e[0])&&(e=e[0]),c.fromArray(e,r).lift(new f(n))};var f=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=f;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(t,e),t.prototype._next=function(e){this.values.push(l),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(a.subscribeToResult(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,o=r[n],i=this.toRespond?o===l?--this.toRespond:this.toRespond:0;r[n]=t,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(u.OuterSubscriber);t.CombineLatestSubscriber=p},78303(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15642),o=n(61480);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(r.of.apply(void 0,e))}},16216(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(65959),i=n(42058);t.defer=function(e){return new r.Observable(function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?o.from(n):i.empty()).subscribe(t)})}},42058(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){return e?function(e){return new r.Observable(function(t){return e.schedule(function(){return t.complete()})})}(e):t.EMPTY}},65959(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(24327),i=n(13678);t.from=function(e,t){return t?i.scheduled(e,t):(n=e,(null!=(s=r.Observable)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)?e:new r.Observable(o.subscribeTo(e)));var n,s}},5550(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(17806),i=n(95367);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new r.Observable(o.subscribeToArray(e))}},50859(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(98775),i=n(42796),s=n(5550);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,u,a=Number.POSITIVE_INFINITY,c=null,l=e[e.length-1];return o.isScheduler(l)?(c=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(a=e.pop())):"number"==typeof l&&(a=e.pop()),null===c&&1===e.length&&(n=e[0],null!=(u=r.Observable)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](n):n instanceof u)?e[0]:i.mergeAll(a)(s.fromArray(e,c))}},15642(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(98775),o=n(5550),i=n(95367);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return r.isScheduler(n)?(e.pop(),i.scheduleArray(e,n)):o.fromArray(e)}},3166(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4559),s=n(5550),u=n(15592),a=n(45050);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!i.isArray(e[0]))return e[0];e=e[0]}return s.fromArray(e,void 0).lift(new c)};var c=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}();t.RaceOperator=c;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],o=a.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var o=this.subscriptions[r];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(u.OuterSubscriber);t.RaceSubscriber=l},55905(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return t?new r.Observable(function(n){return t.schedule(o,0,{error:e,subscriber:n})}):new r.Observable(function(t){return t.error(e)})}},16634(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(32551),i=n(17761),s=n(98775);function u(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}t.timer=function(e,t,n){void 0===e&&(e=0);var a=-1;return i.isNumeric(t)?a=Number(t)<1?1:Number(t):s.isScheduler(t)&&(n=t),s.isScheduler(n)||(n=o.async),new r.Observable(function(t){var r=i.isNumeric(e)?e:+e-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:t})})}},58836(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5550),s=n(4559),u=n(89767),a=n(97706),c=n(26837);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),i.fromArray(e,void 0).lift(new l(n))};var l=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.ZipOperator=l;var f=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;s.isArray(e)?t.push(new h(e)):"function"==typeof e[a.iterator]?t.push(new p(e[a.iterator]())):t.push(new d(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++)if("function"==typeof(s=e[r]).hasValue&&!s.hasValue())return;var o=!1,i=[];for(r=0;r<t;r++){var s,u=(s=e[r]).next();if(s.hasCompleted()&&(o=!0),u.done)return void n.complete();i.push(u.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(u.Subscriber);t.ZipSubscriber=f;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return Boolean(e&&e.done)},e}(),h=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[a.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),d=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[a.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return c.innerSubscribe(this.observable,new c.SimpleInnerSubscriber(this))},t}(c.SimpleOuterSubscriber)},93508(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.audit=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.durationSelector))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,n=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},92937(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32551),o=n(93508),i=n(16634);t.auditTime=function(e,t){return void 0===t&&(t=r.async),o.audit(function(){return i.timer(e,t)})}},25365(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.buffer=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingNotifier))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(r))),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},26026(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?a:u}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this,n=t.bufferSize,r=t.startBufferEvery,o=t.buffers,i=t.count;this.count++,i%r===0&&o.push([]);for(var s=o.length;s--;){var u=o[s];u.push(e),u.length===n&&(o.splice(s,1),this.destination.next(u))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(i.Subscriber)},31712(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(32551),s=n(89767),u=n(98775);t.bufferTime=function(e){var t=arguments.length,n=i.async;u.isScheduler(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return t>=3&&(o=arguments[2]),function(t){return t.lift(new a(e,r,o,n))}};var a=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),c=function(){this.buffer=[]},l=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var a={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=i.schedule(f,n,a))}else{var c={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(u.closeAction=i.schedule(h,n,c)),s.add(i.schedule(p,r,l))}return s}return o(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(e),s.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(f,n,r))}},t.prototype.openContext=function(){var e=new c;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,o=e.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(h,n,{subscriber:r,context:i})),this.schedule(e,t))}function h(e){var t=e.subscriber,n=e.context;t.closeContext(n)}},61629(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(90544),s=n(45050),u=n(15592);t.bufferToggle=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.closingSelector=r,o.contexts=[],o.add(s.subscribeToResult(o,n)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new i.Subscription,r={buffer:[],subscription:n};t.push(r);var o=s.subscribeToResult(this,e,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},t}(u.OuterSubscriber)},8453(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(90544),s=n(26837);t.bufferWhen=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.closingSelector))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{t=(0,this.closingSelector)()}catch(e){return this.error(e)}e=new i.Subscription,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(s.SimpleOuterSubscriber)},95684(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.catchError=function(e){return function(t){var n=new s(e),r=t.lift(n);return n.caught=r}};var s=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.selector,this.caught))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.selector=n,o.caught=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle();var r=new i.SimpleInnerSubscriber(this);this.add(r);var o=i.innerSubscribe(n,r);o!==r&&this.add(o)}},t}(i.SimpleOuterSubscriber)},99367(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20661);t.combineAll=function(e){return function(t){return t.lift(new r.CombineLatestOperator(e))}}},58957(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4559),o=n(20661),i=n(65959);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&r.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(n))}}},10359(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78303);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.concat.apply(void 0,[t].concat(e)))}}},61480(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42796);t.concatAll=function(){return r.mergeAll(1)}},24409(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8373);t.concatMap=function(e,t){return r.mergeMap(e,t,1)}},38136(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(24409);t.concatMapTo=function(e,t){return r.concatMap(function(){return e},t)}},95324(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.count=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.source))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},42656(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.debounce=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.durationSelector))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},81789(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(32551);t.debounceTime=function(e,t){return void 0===t&&(t=s.async),function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.dueTime,this.scheduler))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function c(e){e.debouncedNext()}},23408(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.defaultValue))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},80340(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(32551),s=n(29628),u=n(89767),a=n(56566);t.delay=function(e,t){void 0===t&&(t=i.async);var n=s.isDate(e)?+e-t.now():Math.abs(e);return function(e){return e.lift(new c(n,t))}};var c=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.delay,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,o=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new f(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(a.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(a.Notification.createComplete()),this.unsubscribe()},t}(u.Subscriber),f=function(e,t){this.time=e,this.notification=t}},9512(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(45164),u=n(15592),a=n(45050);t.delayWhen=function(e,t){return t?function(n){return new f(n,t).lift(new c(e))}:function(t){return t.lift(new c(e))}};var c=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.delayDurationSelector))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=a.subscribeToResult(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(u.OuterSubscriber),f=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(s.Observable),p=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},55835(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.dematerialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},2039(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.distinct=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.keySelector,this.flushes))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(e){return void n.error(e)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=u},18715(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.distinctUntilChanged=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.compare,this.keySelector))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(e){return this.destination.error(e)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},35406(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18715);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},60030(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89951),o=n(53789),i=n(35283),s=n(23408),u=n(80912);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(a){return a.pipe(o.filter(function(t,n){return n===e}),u.take(1),n?s.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},65050(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78303),o=n(15642);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return r.concat(t,o.of.apply(void 0,e))}}},43232(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.every=function(e,t){return function(n){return n.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.thisArg,this.source))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},63901(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.exhaust=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},83547(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(45273),s=n(65959),u=n(26837);t.exhaustMap=function e(t,n){return n?function(r){return r.pipe(e(function(e,r){return s.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new a(t))}};var a=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new u.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=u.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(u.SimpleOuterSubscriber)},15479(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.expand=function(e,t,n){return void 0===t&&(t=Number.POSITIVE_INFINITY),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=s;var u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,o=e.index;t.subscribeToProjection(n,r,o)},t.prototype._next=function(e){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(e);try{var o=(0,this.project)(e,r);if(this.scheduler){var i={subscriber:this,result:o,value:e,index:r};this.destination.add(this.scheduler.schedule(t.dispatch,0,i))}else this.subscribeToProjection(o,e,r)}catch(e){n.error(e)}}else this.buffer.push(e)}},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=u},53789(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.filter=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.thisArg))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(i.Subscriber)},26677(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(90544);t.finalize=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.callback))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new s.Subscription(n)),r}return o(t,e),t}(i.Subscriber)},41856(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.find=function(e,t){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(n){return n.lift(new s(e,n,!1,t))}};var s=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=s;var u=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=u},70186(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41856);t.findIndex=function(e,t){return function(n){return n.lift(new r.FindValueOperator(e,n,!0,t))}}},68425(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3861),o=n(53789),i=n(80912),s=n(23408),u=n(35283),a=n(57810);t.first=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?o.filter(function(t,n){return e(t,n,c)}):a.identity,i.take(1),n?s.defaultIfEmpty(t):u.throwIfEmpty(function(){return new r.EmptyError}))}}},23025(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(90544),u=n(45164),a=n(86461);t.groupBy=function(e,t,n,r){return function(o){return o.lift(new c(e,t,n,r))}};var c=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),l=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){return void this.error(e)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new a.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new p(t,o))}catch(e){return void this.error(e)}this.add(s.subscribe(new f(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),f=function(e){function t(t,n,r){var o=e.call(this,n)||this;return o.key=t,o.group=n,o.parent=r,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=r,o}return o(t,e),t.prototype._subscribe=function(e){var t=new s.Subscription,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new h(n)),t.add(r.subscribe(e)),t},t}(u.Observable);t.GroupedObservable=p;var h=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(s.Subscription)},61248(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.ignoreElements=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},87882(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.isEmpty=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},77463(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3861),o=n(53789),i=n(11200),s=n(35283),u=n(23408),a=n(57810);t.last=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?o.filter(function(t,n){return e(t,n,c)}):a.identity,i.takeLast(1),n?u.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},45273(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.map=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.thisArg))},e}();t.MapOperator=s;var u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.Subscriber)},87032(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.mapTo=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.value))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},29330(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(56566);t.materialize=function(){return function(e){return e.lift(new u)}};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(s.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(s.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(s.Notification.createComplete()),e.complete()},t}(i.Subscriber)},641(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85761);t.max=function(e){var t="function"==typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t};return r.reduce(t)}},71715(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50859);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.merge.apply(void 0,[t].concat(e)))}}},42796(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8373),o=n(57810);t.mergeAll=function(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),r.mergeMap(o.identity,e)}},8373(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(45273),s=n(65959),u=n(26837);function a(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(a(function(n,r){return s.from(e(n,r)).pipe(i.map(function(e,o){return t(n,e,r,o)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new c(e,n))})}t.mergeMap=a;var c=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project,this.concurrent))},e}();t.MergeMapOperator=c;var l=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new u.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=u.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(u.SimpleOuterSubscriber);t.MergeMapSubscriber=l,t.flatMap=a},96356(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8373);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},76054(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.mergeScan=function(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=s;var u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,e,t)}catch(e){return n.error(e)}this.active++,this._innerSub(r)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=i.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=u},12115(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85761);t.min=function(e){var t="function"==typeof e?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t};return r.reduce(t)}},55681(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32336);t.multicast=function(e,t){return function(n){var i;if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return n.lift(new o(i,t));var s=Object.create(n,r.connectableObservableDescriptor);return s.source=n,s.subjectFactory=i,s}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(e);return o.add(t.subscribe(r)),o},e}();t.MulticastOperator=o},1878(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(56566);t.observeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=u;var a=function(e){function t(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return o(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new c(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(s.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(s.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=a;var c=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=c},41524(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(65959),s=n(4559),u=n(26837);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&s.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new a(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n;return 1===e.length&&s.isArray(e[0])&&(e=e[0]),n=e.shift(),i.from(n).lift(new a(e))};var a=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.nextSources))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new u.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=u.innerSubscribe(e,t);r!==t&&n.add(r)}else this.destination.complete()},t}(u.SimpleOuterSubscriber)},51251(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.pairwise=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},93985(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43567),o=n(53789);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},42490(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45273);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(t){return r.map(function(e,t){return function(n){for(var r=n,o=0;o<t;o++){var i=null!=r?r[e[o]]:void 0;if(void 0===i)return;r=i}return r}}(e,n))(t)}}},84848(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86461),o=n(55681);t.publish=function(e){return e?o.multicast(function(){return new r.Subject},e):o.multicast(new r.Subject)}},50838(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89215),o=n(55681);t.publishBehavior=function(e){return function(t){return o.multicast(new r.BehaviorSubject(e))(t)}}},73920(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87097),o=n(55681);t.publishLast=function(){return function(e){return o.multicast(new r.AsyncSubject)(e)}}},6571(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90880),o=n(55681);t.publishReplay=function(e,t,n,i){n&&"function"!=typeof n&&(i=n);var s="function"==typeof n?n:void 0,u=new r.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return u},s)(e)}}},43798(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4559),o=n(3166);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&r.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},85761(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(81794),o=n(11200),i=n(23408),s=n(54656);t.reduce=function(e,t){return arguments.length>=2?function(n){return s.pipe(r.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(n)}:function(t){return s.pipe(r.scan(function(t,n,r){return e(t,n,r+1)}),o.takeLast(1))(t)}}},45403(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.refCount=function(){return function(e){return e.lift(new s(e))}};var s=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new u(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(i.Subscriber)},8092(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(42058);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?s.empty():e<0?t.lift(new u(-1,t)):t.lift(new u(e-1,t))}};var u=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.count,this.source))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},24976(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(26837);t.repeatWhen=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.notifier,t))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new i.Subject;try{t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))},t}(s.SimpleOuterSubscriber)},16965(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.count,this.source))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},34069(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(26837);t.retryWhen=function(e){return function(t){return t.lift(new u(e,t))}};var u=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.notifier,this.source))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new i.Subject;try{r=(0,this.notifier)(n)}catch(t){return e.prototype.error.call(this,t)}o=s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(s.SimpleOuterSubscriber)},37925(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.sample=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new u(e),r=t.subscribe(n);return r.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n))),r},e}(),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},87472(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(32551);t.sampleTime=function(e,t){return void 0===t&&(t=s.async),function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.period,this.scheduler))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(c,n,{subscriber:o,period:n})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function c(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}},81794(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.scan=function(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.accumulator,this.seed,this.hasSeed))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},44020(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.sequenceEqual=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=s;var u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new a(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,n=e._b,r=e.comparator;t.length>0&&n.length>0;){var o=t.shift(),i=n.shift(),s=!1;try{s=r?r(o,i):o===i}catch(e){this.destination.error(e)}s||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=u;var a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},92520(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(55681),o=n(45403),i=n(86461);function s(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(r.multicast(s)(e))}}},46659(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90880);t.shareReplay=function(e,t,n){var o,i;return o=e&&"object"==(void 0===e?"undefined":(i=e)&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,o=e.bufferSize,i=void 0===o?Number.POSITIVE_INFINITY:o,s=e.windowTime,u=void 0===s?Number.POSITIVE_INFINITY:s,a=e.refCount,c=e.scheduler,l=0,f=!1,p=!1;return function(e){var o;l++,!t||f?(f=!1,t=new r.ReplaySubject(i,u,c),o=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){f=!0,t.error(e)},complete:function(){p=!0,n=void 0,t.complete()}}),p&&(n=void 0)):o=t.subscribe(this),this.add(function(){l--,o.unsubscribe(),o=void 0,n&&!p&&a&&0===l&&(n.unsubscribe(),n=void 0,t=void 0)})}}(o))}}},87067(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(3861);t.single=function(e){return function(t){return t.lift(new u(e,t))}};var u=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.source))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new s.EmptyError)},t}(i.Subscriber)},94172(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.skip=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},81004(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(89951);t.skipLast=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new a(e,this._skipCount))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,o=this._ring,i=o[r];o[r]=e,this.destination.next(i)}},t}(i.Subscriber)},58362(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.skipUntil=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.notifier))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;r.hasValue=!1;var o=new i.SimpleInnerSubscriber(r);r.add(o),r.innerSubscription=o;var s=i.innerSubscribe(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},61535(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.skipWhile=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(e){this.destination.error(e)}},t}(i.Subscriber)},46779(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78303),o=n(98775);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return o.isScheduler(n)?(e.pop(),function(t){return r.concat(e,t,n)}):function(t){return r.concat(e,t)}}},70202(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26963);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new r.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},34436(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79453),o=n(57810);t.switchAll=function(){return r.switchMap(o.identity)}},79453(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(45273),s=n(65959),u=n(26837);t.switchMap=function e(t,n){return"function"==typeof n?function(r){return r.pipe(e(function(e,r){return s.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new a(t))}};var a=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var n=new u.SimpleInnerSubscriber(this),r=this.destination;r.add(n),this.innerSubscription=u.innerSubscribe(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(u.SimpleOuterSubscriber)},58268(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79453);t.switchMapTo=function(e,t){return t?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},80912(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(89951),u=n(42058);t.take=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=function(){function e(e){if(this.total=e,this.total<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.total))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},11200(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(89951),u=n(42058);t.takeLast=function(e){return function(t){return 0===e?u.empty():t.lift(new a(e))}};var a=function(){function e(e){if(this.total=e,this.total<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.total))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=t++%n;e.next(r[i])}e.complete()},t}(i.Subscriber)},40438(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.takeUntil=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new u(e),r=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n},e}(),u=function(e){function t(t){var n=e.call(this,t)||this;return n.seenValue=!1,n}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},8499(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.inclusive))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(e){return void n.error(e)}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;Boolean(t)?n.next(e):(this.inclusive&&n.next(e),n.complete())},t}(i.Subscriber)},60910(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(71904),u=n(27752);t.tap=function(e,t,n){return function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.nextOrObserver,this.error,this.complete))},e}(),c=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=s.noop,i._tapError=s.noop,i._tapComplete=s.noop,i._tapError=r||s.noop,i._tapComplete=o||s.noop,u.isFunction(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||s.noop,i._tapError=n.error||s.noop,i._tapComplete=n.complete||s.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(i.Subscriber)},40931(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(26837);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),function(t){return t.lift(new s(e,!!n.leading,!!n.trailing))}};var s=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.durationSelector,this.leading,this.trailing))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},20358(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(32551),u=n(40931);t.throttleTime=function(e,t,n){return void 0===t&&(t=s.async),void 0===n&&(n=u.defaultThrottleConfig),function(r){return r.lift(new a(e,t,n.leading,n.trailing))}};var a=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),c=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(l,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function l(e){e.subscriber.clearThrottle()}},35283(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3861),s=n(89767);t.throwIfEmpty=function(e){return void 0===e&&(e=c),function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.errorFactory))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(s.Subscriber);function c(){return new i.EmptyError}},55443(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32551),o=n(81794),i=n(16216),s=n(45273);t.timeInterval=function(e){return void 0===e&&(e=r.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}},{current:e.now(),value:void 0,last:void 0}),s.map(function(e){var t=e.current,n=e.last,r=e.value;return new u(r,t-n)}))})}};var u=function(e,t){this.value=e,this.interval=t};t.TimeInterval=u},94088(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32551),o=n(80171),i=n(33360),s=n(55905);t.timeout=function(e,t){return void 0===t&&(t=r.async),i.timeoutWith(e,s.throwError(new o.TimeoutError),t)}},33360(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(32551),s=n(29628),u=n(26837);t.timeoutWith=function(e,t,n){return void 0===n&&(n=i.async),function(r){var o=s.isDate(e),i=o?+e-n.now():Math.abs(e);return r.lift(new a(i,o,t,n))}};var a=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),c=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.scheduleTimeout(),s}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(u.innerSubscribe(t,new u.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(u.SimpleOuterSubscriber)},79671(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32551),o=n(45273);t.timestamp=function(e){return void 0===e&&(e=r.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},30309(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85761);function o(e,t,n){return 0===n?[t]:(e.push(t),e)}t.toArray=function(){return r.reduce(o,[])}},23187(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(26837);t.window=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new a(e),r=t.subscribe(n);return r.closed||n.add(s.innerSubscribe(this.windowBoundaries,new s.SimpleInnerSubscriber(n))),r},e}(),a=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new i.Subject,t.next(n.window),n}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new i.Subject;t.next(n)},t}(s.SimpleOuterSubscriber)},75904(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89767),s=n(86461);t.windowCount=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.windowSize,this.startWindowEvery))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=n,o.startWindowEvery=r,o.windows=[new s.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,u=0;u<i&&!this.closed;u++)o[u].next(e);var a=this.count-r+1;if(a>=0&&a%t===0&&!this.closed&&o.shift().complete(),++this.count%t===0&&!this.closed){var c=new s.Subject;o.push(c),n.next(c)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},64822(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(32551),u=n(89767),a=n(17761),c=n(98775);t.windowTime=function(e){var t=s.async,n=null,r=Number.POSITIVE_INFINITY;return c.isScheduler(arguments[3])&&(t=arguments[3]),c.isScheduler(arguments[2])?t=arguments[2]:a.isNumeric(arguments[2])&&(r=Number(arguments[2])),c.isScheduler(arguments[1])?t=arguments[1]:a.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(o){return o.lift(new l(e,n,r,t))}};var l=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.destination=t,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var u=s.openWindow();if(null!==r&&r>=0){var a={subscriber:s,window:u,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(y,n,a)),s.add(i.schedule(d,r,c))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(i.schedule(h,n,l))}return s}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var o=t[r];o.closed||(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new f;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(u.Subscriber);function h(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function d(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,o=e.windowCreationInterval,i=n.openWindow(),s=this,u={action:s,subscription:null},a={subscriber:n,window:i,context:u};u.subscription=r.schedule(y,t,a),s.add(u.subscription),s.schedule(e,o)}function y(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}},27895(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(90544),u=n(15592),a=n(45050);t.windowToggle=function(e,t){return function(n){return n.lift(new c(e,t))}};var c=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=a.subscribeToResult(o,n,n)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,o){if(e===this.openings){var u=void 0;try{u=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var c=new i.Subject,l=new s.Subscription,f={window:c,subscription:l};this.contexts.push(f);var p=a.subscribeToResult(this,u,f);p.closed?this.closeWindow(this.contexts.length-1):(p.context=f,l.add(p)),this.destination.next(c)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,o=n.subscription;t.splice(e,1),r.complete(),o.unsubscribe()}},t}(u.OuterSubscriber)},21291(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86461),s=n(15592),u=n(45050);t.windowWhen=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.closingSelector))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var n,r=this.window=new i.Subject;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(e){return this.destination.error(e),void this.window.error(e)}this.add(this.closingNotification=u.subscribeToResult(this,n))},t}(s.OuterSubscriber)},56428(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(15592),s=n(45050);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;"function"==typeof e[e.length-1]&&(n=e.pop());var r=e;return t.lift(new u(r,n))}};var u=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.observables,this.project))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=new Array(i);for(var u=0;u<i;u++)o.toRespond.push(u);for(u=0;u<i;u++){var a=n[u];o.add(s.subscribeToResult(o,a,void 0,u))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,n){this.values[n]=t;var r=this.toRespond;if(r.length>0){var o=r.indexOf(n);-1!==o&&r.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.OuterSubscriber)},56604(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58836);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.zip.apply(void 0,[t].concat(e)))}}},20981(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58836);t.zipAll=function(e){return function(t){return t.lift(new r.ZipOperator(e))}}},95367(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(90544);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=new o.Subscription,i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},65194(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(90544),i=n(97706);t.scheduleIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable(function(n){var r,s=new o.Subscription;return s.add(function(){r&&"function"==typeof r.return&&r.return()}),s.add(t.schedule(function(){r=e[i.iterator](),s.add(t.schedule(function(){if(!n.closed){var e,t;try{var o=r.next();e=o.value,t=o.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}}))})),s})}},26417(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(90544),i=n(87793);t.scheduleObservable=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){var o=e[i.observable]();r.add(o.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}},85991(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45164),o=n(90544);t.schedulePromise=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}},13678(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26417),o=n(85991),i=n(95367),s=n(65194),u=n(18878),a=n(23631),c=n(2872),l=n(71858);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return r.scheduleObservable(e,t);if(a.isPromise(e))return o.schedulePromise(e,t);if(c.isArrayLike(e))return i.scheduleArray(e,t);if(l.isIterable(e)||"string"==typeof e)return s.scheduleIterable(e,t)}throw new TypeError((null!==e&&(void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||e)+" is not observable");var n}},16665(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(90544).Subscription);t.Action=i},78540(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4159),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(i.Immediate.clearImmediate(n),t.scheduled=void 0)},t}(n(4941).AsyncAction);t.AsapAction=s},42965(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,o=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<o&&(e=n.shift()));if(this.active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(n(32790).AsyncScheduler);t.AsapScheduler=i},4941(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(n(16665).Action);t.AsyncAction=i},32790(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(63880),s=function(e){function t(n,r){void 0===r&&(r=i.Scheduler.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.Scheduler);t.AsyncScheduler=s},11570(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(4941).AsyncAction);t.QueueAction=i},41719(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){var n,o;return r=Object.setPrototypeOf||(n={__proto__:[]},(null!=(o=Array)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](n):n instanceof o)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(32790).AsyncScheduler);t.QueueScheduler=i},93262(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78540),o=n(42965);t.asapScheduler=new o.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},32551(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4941),o=n(32790);t.asyncScheduler=new o.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},45800(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11570),o=n(41719);t.queueScheduler=new o.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},97706(e,t){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=n,t.iterator=n(),t.$$iterator=t.iterator},87793(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},20964(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},89951(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}();t.ArgumentOutOfRangeError=n},3861(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}();t.EmptyError=n},4159(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=1,r=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return o[t]=!0,r.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},6852(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}();t.ObjectUnsubscribedError=n},80171(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();t.TimeoutError=n},58854(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}();t.UnsubscriptionError=n},95890(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}Object.defineProperty(t,"__esModule",{value:!0});var o=n(89767);t.canReportError=function(e){for(;e;){var t=e,n=t.closed,i=t.destination,s=t.isStopped;if(n||s)return!1;e=i&&r(i,o.Subscriber)?i:null}return!0}},92180(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},57810(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},4559(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},2872(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},29628(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return t=e,(null!=(n=Date)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n)&&!isNaN(+e);var t,n}},27752(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},18878(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87793);t.isInteropObservable=function(e){return e&&"function"==typeof e[r.observable]}},71858(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97706);t.isIterable=function(e){return e&&"function"==typeof e[r.iterator]}},17761(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4559);t.isNumeric=function(e){return!r.isArray(e)&&e-parseFloat(e)+1>=0}},30287(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t}},23631(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},98775(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},71904(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},43567(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}},54656(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57810);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},24327(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17806),o=n(39658),i=n(80141),s=n(20506),u=n(2872),a=n(23631),c=n(30287),l=n(97706),f=n(87793);t.subscribeTo=function(e){if(e&&"function"==typeof e[f.observable])return s.subscribeToObservable(e);if(u.isArrayLike(e))return r.subscribeToArray(e);if(a.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[l.iterator])return i.subscribeToIterable(e);var t=c.isObject(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},17806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}},80141(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97706);t.subscribeToIterable=function(e){return function(t){for(var n=e[r.iterator]();;){var o=void 0;try{o=n.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}}},20506(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87793);t.subscribeToObservable=function(e){return function(t){var n=e[r.observable]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}}},39658(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92180);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,r.hostReportError),t}}},45050(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58423),o=n(24327),i=n(45164);t.subscribeToResult=function(e,t,n,s,u){var a,c;if(void 0===u&&(u=new r.InnerSubscriber(e,n,s)),!u.closed)return a=t,(null!=(c=i.Observable)&&"undefined"!=typeof Symbol&&c[Symbol.hasInstance]?c[Symbol.hasInstance](a):a instanceof c)?t.subscribe(u):o.subscribeTo(t)(u)}},97283(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89767),o=n(20964),i=n(33383);t.toSubscriber=function(e,t,n){if(e){if(s=e,null!=(u=r.Subscriber)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}var s,u;return e||t||n?new r.Subscriber(e,t,n):new r.Subscriber(i.empty)}},7877(e,t,n){"use strict";n(93508).audit,n(92937).auditTime,n(25365).buffer,n(26026).bufferCount,n(31712).bufferTime,n(61629).bufferToggle,n(8453).bufferWhen,n(95684).catchError,n(99367).combineAll,n(58957).combineLatest,n(10359).concat,n(61480).concatAll,n(24409).concatMap,n(38136).concatMapTo,n(95324).count,n(42656).debounce,n(81789).debounceTime,n(23408).defaultIfEmpty,n(80340).delay,n(9512).delayWhen,n(55835).dematerialize,n(2039).distinct,n(18715).distinctUntilChanged,n(35406).distinctUntilKeyChanged,n(60030).elementAt,n(65050).endWith,n(43232).every,n(63901).exhaust,n(83547).exhaustMap,n(15479).expand,n(53789).filter,n(26677).finalize,n(41856).find,n(70186).findIndex,n(68425).first,n(23025).groupBy,n(61248).ignoreElements,n(87882).isEmpty,n(77463).last;var r=n(45273);t.Tj=r.map,n(87032).mapTo,n(29330).materialize,n(641).max,n(71715).merge,n(42796).mergeAll;var o=n(8373);o.mergeMap,o.flatMap,n(96356).mergeMapTo,n(76054).mergeScan,n(12115).min,n(55681).multicast,n(1878).observeOn,n(41524).onErrorResumeNext,n(51251).pairwise,n(93985).partition,n(42490).pluck,n(84848).publish,n(50838).publishBehavior,n(73920).publishLast,n(6571).publishReplay,n(43798).race,n(85761).reduce,n(8092).repeat,n(24976).repeatWhen,n(16965).retry,n(34069).retryWhen,n(45403).refCount,n(37925).sample,n(87472).sampleTime,n(81794).scan,n(44020).sequenceEqual,n(92520).share,n(46659).shareReplay,n(87067).single,n(94172).skip,n(81004).skipLast,n(58362).skipUntil,n(61535).skipWhile,n(46779).startWith,n(70202).subscribeOn,n(34436).switchAll,n(79453).switchMap,n(58268).switchMapTo;var i=n(80912);t.s=i.take,n(11200).takeLast,n(40438).takeUntil,n(8499).takeWhile,n(60910).tap,n(40931).throttle,n(20358).throttleTime,n(35283).throwIfEmpty,n(55443).timeInterval,n(94088).timeout,n(33360).timeoutWith,n(79671).timestamp,n(30309).toArray,n(23187).window,n(75904).windowCount,n(64822).windowTime,n(27895).windowToggle,n(21291).windowWhen,n(56428).withLatestFrom,n(56604).zip,n(20981).zipAll},58008(e,t,n){"use strict";var r=n(34227),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,u=r.useLayoutEffect,a=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return u(function(){o.value=n,o.getSnapshot=t,c(o)&&l({inst:o})},[e,n,t]),s(function(){return c(o)&&l({inst:o}),e(function(){c(o)&&l({inst:o})})},[e]),a(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},74627(e,t,n){"use strict";e.exports=n(58008)},79371(e,t,n){"use strict";n.d(t,{A:()=>c});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var o,i=new Uint8Array(16);function s(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}for(var u=[],a=0;a<256;++a)u.push((a+256).toString(16).slice(1));const c=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();var o=(e=e||{}).random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=o[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]}(o)}},74061(e,t,n){"use strict";n.d(t,{Ay:()=>Qn});const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,o=Object.keys,i=Array.isArray;function s(e,t){return"object"!=typeof t||o(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||r.Promise||(r.Promise=Promise);const u=Object.getPrototypeOf,a={}.hasOwnProperty;function c(e,t){return a.call(e,t)}function l(e,t){"function"==typeof t&&(t=t(u(e))),("undefined"==typeof Reflect?o:Reflect.ownKeys)(t).forEach(n=>{p(e,n,t[n])})}const f=Object.defineProperty;function p(e,t,n,r){f(e,t,s(n&&c(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function h(e){return{from:function(t){return e.prototype=Object.create(t.prototype),p(e.prototype,"constructor",e),{extend:l.bind(null,e.prototype)}}}}const d=Object.getOwnPropertyDescriptor;function y(e,t){let n;return d(e,t)||(n=u(e))&&y(n,t)}const b=[].slice;function v(e,t,n){return b.call(e,t,n)}function m(e,t){return t(e)}function _(e){if(!e)throw new Error("Assertion Failed")}function g(e){r.setImmediate?setImmediate(e):setTimeout(e,0)}function w(e,t){return e.reduce((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e},{})}function E(e,t){if("string"==typeof t&&c(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=E(e,t[r]);n.push(i)}return n}var s=t.indexOf(".");if(-1!==s){var u=e[t.substr(0,s)];return null==u?void 0:E(u,t.substr(s+1))}}function S(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){_("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)S(e,t[r],n[r])}else{var s=t.indexOf(".");if(-1!==s){var u=t.substr(0,s),a=t.substr(s+1);if(""===a)void 0===n?i(e)&&!isNaN(parseInt(u))?e.splice(u,1):delete e[u]:e[u]=n;else{var l=e[u];l&&c(e,u)||(l=e[u]={}),S(l,a,n)}}else void 0===n?i(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function A(e){var t={};for(var n in e)c(e,n)&&(t[n]=e[n]);return t}const x=[].concat;function O(e){return x.apply([],e)}const C="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(O([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>r[e]),D=C.map(e=>r[e]);w(C,e=>[e,!0]);let j=null;function F(e){j="undefined"!=typeof WeakMap&&new WeakMap;const t=P(e);return j=null,t}function P(e){if(!e||"object"!=typeof e)return e;let t=j&&j.get(e);if(t)return t;if(i(e)){t=[],j&&j.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(P(e[n]))}else if(D.indexOf(e.constructor)>=0)t=e;else{const n=u(e);for(var o in t=n===Object.prototype?{}:Object.create(n),j&&j.set(e,t),e)c(e,o)&&(t[o]=P(e[o]))}return t}const{toString:B}={};function I(e){return B.call(e).slice(8,-1)}const k="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",T="symbol"==typeof k?function(e){var t;return null!=e&&(t=e[k])&&t.apply(e)}:function(){return null},N={};function R(e){var t,n,r,o;if(1===arguments.length){if(i(e))return e.slice();if(this===N&&"string"==typeof e)return[e];if(o=T(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const M="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var U="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function V(e,t){U=e,L=t}var L=()=>!0;const $=!new Error("").stack;function K(){if($)try{throw K.arguments,new Error}catch(e){return e}return new Error}function W(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(L).map(e=>"\n"+e).join("")):""}var z=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],q=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(z),G={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Y(e,t){this._e=K(),this.name=e,this.message=t}function H(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function J(e,t,n,r){this._e=K(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=H(e,t)}function Q(e,t){this._e=K(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=H(e,t)}h(Y).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+W(this._e,2))}},toString:function(){return this.name+": "+this.message}}),h(J).from(Y),h(Q).from(Y);var X=q.reduce((e,t)=>(e[t]=t+"Error",e),{});const Z=Y;var ee=q.reduce((e,t)=>{var n=t+"Error";function r(e,r){this._e=K(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=G[t]||n,this.inner=null)}return h(r).from(Z),e[t]=r,e},{});ee.Syntax=SyntaxError,ee.Type=TypeError,ee.Range=RangeError;var te=z.reduce((e,t)=>(e[t+"Error"]=ee[t],e),{}),ne=q.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ee[t]),e),{});function re(){}function oe(e){return e}function ie(e,t){return null==e||e===oe?t:function(n){return t(e(n))}}function se(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ue(e,t){return e===re?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?se(r,this.onsuccess):r),o&&(this.onerror=this.onerror?se(o,this.onerror):o),void 0!==i?i:n}}function ae(e,t){return e===re?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?se(n,this.onsuccess):n),r&&(this.onerror=this.onerror?se(r,this.onerror):r)}}function ce(e,t){return e===re?t:function(n){var r=e.apply(this,arguments);s(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?se(o,this.onsuccess):o),i&&(this.onerror=this.onerror?se(i,this.onerror):i),void 0===r?void 0===u?void 0:u:s(r,u)}}function le(e,t){return e===re?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function fe(e,t){return e===re?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}ne.ModifyError=J,ne.DexieError=Y,ne.BulkError=Q;var pe={};const[he,de,ye]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,u(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,u(t),e]})(),be=de&&de.then,ve=he&&he.constructor,me=!!ye;var _e=!1,ge=ye?()=>{ye.then(Ke)}:r.setImmediate?setImmediate.bind(null,Ke):r.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{Ke(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ke,0)},we=function(e,t){Fe.push([e,t]),Se&&(ge(),Se=!1)},Ee=!0,Se=!0,Ae=[],xe=[],Oe=null,Ce=oe,De={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:dt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{dt(e[0],e[1])}catch(e){}})}},je=De,Fe=[],Pe=0,Be=[];function Ie(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=re,this._lib=!1;var t=this._PSD=je;if(U&&(this._stackHolder=K(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==pe)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Re(this,this._value))}this._state=null,this._value=null,++t.ref,Ne(this,e)}const ke={get:function(){var e=je,t=Ze;function n(n,r){var o=!e.global&&(e!==je||t!==Ze);const i=o&&!rt();var s=new Ie((t,s)=>{Ue(this,new Te(ft(n,e,o,i),ft(r,e,o,i),t,s,e))});return U&&$e(s,this),s}return n.prototype=pe,n},set:function(e){p(this,"then",e&&e.prototype===pe?ke:{get:function(){return e},set:ke.set})}};function Te(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Ne(e,t){try{t(t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&We();t&&"function"==typeof t.then?Ne(e,(e,n)=>{t instanceof Ie?t._then(e,n):t.then(e,n)}):(e._state=!0,e._value=t,Me(e)),n&&ze()}},Re.bind(null,e))}catch(t){Re(e,t)}}function Re(e,t){if(xe.push(t),null===e._state){var n=e._lib&&We();t=Ce(t),e._state=!1,e._value=t,U&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=y(t,"stack");t._promise=e,p(t,"stack",{get:()=>_e?n&&(n.get?n.get.apply(t):n.value):e.stack})}),function(e){Ae.some(t=>t._value===e._value)||Ae.push(e)}(e),Me(e),n&&ze()}}function Me(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)Ue(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Pe&&(++Pe,we(()=>{0==--Pe&&qe()},[]))}function Ue(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Pe,we(Ve,[n,e,t])}else e._listeners.push(t)}function Ve(e,t,n){try{Oe=t;var r,o=t._value;t._state?r=e(o):(xe.length&&(xe=[]),r=e(o),-1===xe.indexOf(o)&&function(e){for(var t=Ae.length;t;)if(Ae[--t]._value===e._value)return void Ae.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Oe=null,0==--Pe&&qe(),--n.psd.ref||n.psd.finalize()}}function Le(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,s=e._value;null!=s?(o=s.name||"Error",i=s.message||s,r=W(s,0)):(o=s,i=""),t.push(o+(i?": "+i:"")+r)}return U&&((r=W(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Le(e._prev,t,n)),t}function $e(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Ke(){We()&&ze()}function We(){var e=Ee;return Ee=!1,Se=!1,e}function ze(){var e,t,n;do{for(;Fe.length>0;)for(e=Fe,Fe=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Fe.length>0);Ee=!0,Se=!0}function qe(){var e=Ae;Ae=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=Be.slice(0),n=t.length;n;)t[--n]()}function Ge(e){return new Ie(pe,!1,e)}function Ye(e,t){var n=je;return function(){var r=We(),o=je;try{return ut(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ut(o,!1),r&&ze()}}}l(Ie.prototype,{then:ke,_then:function(e,t){Ue(this,new Te(null,null,e,t,je))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):Ge(e)):this.then(null,e=>e&&e.name===t?n(e):Ge(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Ge(t)))},stack:{get:function(){if(this._stack)return this._stack;try{_e=!0;var e=Le(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{_e=!1}}},timeout:function(e,t){return e<1/0?new Ie((n,r)=>{var o=setTimeout(()=>r(new ee.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&p(Ie.prototype,Symbol.toStringTag,"Dexie.Promise"),De.env=at(),l(Ie,{all:function(){var e=R.apply(null,arguments).map(ot);return new Ie(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((o,i)=>Ie.resolve(o).then(n=>{e[i]=n,--r||t(e)},n))})},resolve:e=>{if(e instanceof Ie)return e;if(e&&"function"==typeof e.then)return new Ie((t,n)=>{e.then(t,n)});var t=new Ie(pe,!0,e);return $e(t,Oe),t},reject:Ge,race:function(){var e=R.apply(null,arguments).map(ot);return new Ie((t,n)=>{e.map(e=>Ie.resolve(e).then(t,n))})},PSD:{get:()=>je,set:e=>je=e},totalEchoes:{get:()=>Ze},newPSD:tt,usePSD:ct,scheduler:{get:()=>we,set:e=>{we=e}},rejectionMapper:{get:()=>Ce,set:e=>{Ce=e}},follow:(e,t)=>new Ie((n,r)=>tt((t,n)=>{var r=je;r.unhandleds=[],r.onunhandled=n,r.finalize=se(function(){!function(e){Be.push(function t(){e(),Be.splice(Be.indexOf(t),1)}),++Pe,we(()=>{0==--Pe&&qe()},[])}(()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])})},r.finalize),e()},t,n,r))}),ve&&(ve.allSettled&&p(Ie,"allSettled",function(){const e=R.apply(null,arguments).map(ot);return new Ie(t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach((e,o)=>Ie.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--n||t(r)))})}),ve.any&&"undefined"!=typeof AggregateError&&p(Ie,"any",function(){const e=R.apply(null,arguments).map(ot);return new Ie((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach((e,i)=>Ie.resolve(e).then(e=>t(e),e=>{o[i]=e,--r||n(new AggregateError(o))}))})}));const He={awaits:0,echoes:0,id:0};var Je=0,Qe=[],Xe=0,Ze=0,et=0;function tt(e,t,n,r){var o=je,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++et;var u=De.env;i.env=me?{Promise:Ie,PromiseProp:{value:Ie,configurable:!0,writable:!0},all:Ie.all,race:Ie.race,allSettled:Ie.allSettled,any:Ie.any,resolve:Ie.resolve,reject:Ie.reject,nthen:pt(u.nthen,i),gthen:pt(u.gthen,i)}:{},t&&s(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=ct(i,e,n,r);return 0===i.ref&&i.finalize(),a}function nt(){return He.id||(He.id=++Je),++He.awaits,He.echoes+=100,He.id}function rt(){return!!He.awaits&&(0==--He.awaits&&(He.id=0),He.echoes=100*He.awaits,!0)}function ot(e){return He.echoes&&e&&e.constructor===ve?(nt(),e.then(e=>(rt(),e),e=>(rt(),yt(e)))):e}function it(e){++Ze,He.echoes&&0!=--He.echoes||(He.echoes=He.id=0),Qe.push(je),ut(e,!0)}function st(){var e=Qe[Qe.length-1];Qe.pop(),ut(e,!1)}function ut(e,t){var n=je;if((t?!He.echoes||Xe++&&e===je:!Xe||--Xe&&e===je)||lt(t?it.bind(null,e):st),e!==je&&(je=e,n===De&&(De.env=at()),me)){var o=De.env.Promise,i=e.env;de.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(r,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function at(){var e=r.Promise;return me?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(r,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:de.then,gthen:e.prototype.then}:{}}function ct(e,t,n,r,o){var i=je;try{return ut(e,!0),t(n,r,o)}finally{ut(i,!1)}}function lt(e){be.call(he,e)}function ft(e,t,n,r){return"function"!=typeof e?e:function(){var o=je;n&&nt(),ut(t,!0);try{return e.apply(this,arguments)}finally{ut(o,!1),r&<(rt)}}}function pt(e,t){return function(n,r){return e.call(this,ft(n,t),ft(r,t))}}-1===(""+be).indexOf("[native code]")&&(nt=rt=re);const ht="unhandledrejection";function dt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var o,i={promise:t,reason:e};if(r.document&&document.createEvent?((o=document.createEvent("Event")).initEvent(ht,!0,!0),s(o,i)):r.CustomEvent&&s(o=new CustomEvent(ht,{detail:i}),i),o&&r.dispatchEvent&&(dispatchEvent(o),!r.PromiseRejectionEvent&&r.onunhandledrejection))try{r.onunhandledrejection(o)}catch(e){}U&&o&&!o.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var yt=Ie.reject;function bt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||je.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===X.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>bt(e,t,n,r))):yt(o)}return o._promise(t,(e,t)=>tt(()=>(je.trans=o,r(e,t,o)))).then(e=>o._completion.then(()=>e))}if(e._state.openComplete)return yt(new ee.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return yt(new ee.DatabaseClosed);e.open().catch(re)}return e._state.dbReadyPromise.then(()=>bt(e,t,n,r))}const vt="3.2.7",mt=String.fromCharCode(65535),_t=-1/0,gt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",wt="String expected.",Et=[],St="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),At=St,xt=St,Ot=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),Ct="__dbnames",Dt="readonly",jt="readwrite";function Ft(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Pt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Bt(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=F(t))[e],t)}class It{_trans(e,t,n){const r=this._tx||je.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new ee.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const s=We();try{return r&&r.db===this.db?r===je.trans?r._promise(e,i,n):tt(()=>r._promise(e,i,n),{trans:r,transless:je.transless||je}):bt(this.db,e,[this.name],i)}finally{s&&ze()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(i(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=o(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(n&&this.db._maxKey!==mt){const r=n.keyPath.slice(0,t.length);return this.where(r).equals(r.map(t=>e[t]))}!n&&U&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,s=this.db._deps.indexedDB;function u(e,t){try{return 0===s.cmp(e,t)}catch(e){return!1}}const[a,c]=t.reduce(([t,n],o)=>{const s=r[o],a=e[o];return[t||s,t||!s?Ft(n,s&&s.multi?e=>{const t=E(e,o);return i(t)&&t.some(e=>u(a,e))}:e=>u(a,E(e,o))):n]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(c):n?this.filter(c):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,i(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(c(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){s(this,e)})}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Bt(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?Ie.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{S(e,r,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||i(e))return this.where(":id").equals(e).modify(t);{const n=E(e,this.schema.primKey.keyPath);if(void 0===n)return yt(new ee.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?o(t).forEach(n=>{S(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Bt(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?Ie.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{S(e,r,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?Ie.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:Pt})).then(e=>e.numFailures?Ie.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ee.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ee.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let u=i&&n?e.map(Bt(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:u,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Q(`${this.name}.bulkAdd(): ${e} of ${s} operations failed`,r)})})}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ee.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ee.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let u=i&&n?e.map(Bt(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:u,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Q(`${this.name}.bulkPut(): ${e} of ${s} operations failed`,r)})})}bulkDelete(e){const t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Q(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)})}}function kt(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=u;for(var r=1,s=arguments.length;r<s;++r)u(arguments[r]);return n;function u(e,r,s){if("object"!=typeof e){var a;r||(r=le),s||(s=re);var c={subscribers:[],fire:s,subscribe:function(e){-1===c.subscribers.indexOf(e)&&(c.subscribers.push(e),c.fire=r(c.fire,e))},unsubscribe:function(e){c.subscribers=c.subscribers.filter(function(t){return t!==e}),c.fire=c.subscribers.reduce(r,s)}};return t[e]=n[e]=c,c}o(a=e).forEach(function(e){var t=a[e];if(i(t))u(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new ee.InvalidArgument("Invalid event config");var n=u(e,oe,function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){g(function(){e.apply(null,t)})})})}})}}function Tt(e,t){return h(t).from({prototype:e}),t}function Nt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Rt(e,t){e.filter=Ft(e.filter,t)}function Mt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Ft(r(),t()):t,e.justLimit=n&&!r}function Ut(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ee.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Vt(e,t,n){const r=Ut(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Lt(e,t,n,r){const o=e.replayFilter?Ft(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},s=(e,n,r)=>{if(!o||o(n,r,e=>n.stop(e),e=>n.fail(e))){var s=n.primaryKey,u=""+s;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(s)),c(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(s,n),$t(Vt(e,r,n),e.algorithm,s,!e.keysOnly&&e.valueMapper)])}return $t(Vt(e,r,n),Ft(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function $t(e,t,n,r){var o=Ye(r?(e,t,o)=>n(r(e),t,o):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=re},t=>{e.fail(t),n=re})||o(e.value,e,e=>n=e),n()})})}function Kt(e,t){try{const n=Wt(e),r=Wt(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(zt(e),zt(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Kt(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Wt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=I(e);return"ArrayBuffer"===n?"binary":n}function zt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class qt{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,yt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,yt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Ft(t.algorithm,e)}_iterate(e,t){return Lt(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&s(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>Lt(t,e,n,t.table.core))}count(e){return this._read(e=>{const t=this._ctx,n=t.table.core;if(Nt(t,!0))return n.count({trans:e,query:{index:Ut(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var r=0;return Lt(t,()=>(++r,!1),e,n).then(()=>r)}).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var s="next"===this._ctx.dir?1:-1;function u(e,t){var n=i(e,o),r=i(t,o);return n<r?-s:n>r?s:0}return this.toArray(function(e){return e.sort(u)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&Nt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Ut(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{const n=[];return Lt(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Nt(t)?Mt(t,()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n(()=>{e.advance(t),t=0}),!1))}):Mt(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Mt(this._ctx,()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this}until(e,t){return Rt(this._ctx,function(n,r,o){return!e(n.value)||(r(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Rt(this._ctx,function(t){return e(t.value)}),t=this._ctx,n=e,t.isMatch=Ft(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Nt(t,!0)&&t.limit>0)return this._read(e=>{var n=Ut(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Rt(this._ctx,function(e){var t=e.primaryKey.toString(),r=c(n,t);return n[t]=!0,!r}),this}modify(e){var t=this._ctx;return this._write(n=>{var r;if("function"==typeof e)r=e;else{var i=o(e),s=i.length;r=function(t){for(var n=!1,r=0;r<s;++r){var o=i[r],u=e[o];E(t,o)!==u&&(S(t,o,u),n=!0)}return n}}const u=t.table.core,{outbound:a,extractKey:c}=u.schema.primaryKey,l=this.db._options.modifyChunkSize||200,f=[];let p=0;const h=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;p+=e-r;for(let e of o(n))f.push(n[e])};return this.clone().primaryKeys().then(o=>{const i=s=>{const f=Math.min(l,o.length-s);return u.getMany({trans:n,keys:o.slice(s,s+f),cache:"immutable"}).then(p=>{const h=[],y=[],b=a?[]:null,v=[];for(let e=0;e<f;++e){const t=p[e],n={value:F(t),primKey:o[s+e]};!1!==r.call(n,n.value,n)&&(null==n.value?v.push(o[s+e]):a||0===Kt(c(t),c(n.value))?(y.push(n.value),a&&b.push(o[s+e])):(v.push(o[s+e]),h.push(n.value)))}const m=Nt(t)&&t.limit===1/0&&("function"!=typeof e||e===Gt)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&u.mutate({trans:n,type:"add",values:h}).then(e=>{for(let t in e.failures)v.splice(parseInt(t),1);d(h.length,e)})).then(()=>(y.length>0||m&&"object"==typeof e)&&u.mutate({trans:n,type:"put",keys:b,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then(e=>d(y.length,e))).then(()=>(v.length>0||m&&e===Gt)&&u.mutate({trans:n,type:"delete",keys:v,criteria:m}).then(e=>d(v.length,e))).then(()=>o.length>s+f&&i(s+l))})};return i(0).then(()=>{if(f.length>0)throw new J("Error modifying one or more objects",f,p,h);return o.length})})})}delete(){var e=this._ctx,t=e.range;return Nt(e)&&(e.isPrimKey&&!xt||3===t.type)?this._write(n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then(t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then(({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new J("Could not delete some values",Object.keys(e).map(t=>e[t]),t-o);return t-o}))}):this.modify(Gt)}}const Gt=(e,t)=>t.value=null;function Yt(e,t){return e<t?-1:e===t?0:1}function Ht(e,t){return e>t?-1:e===t?0:1}function Jt(e,t,n){var r=e instanceof nn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Qt(e){return new e.Collection(e,()=>tn("")).limit(0)}function Xt(e,t,n,r,o,i){for(var s=Math.min(e.length,r.length),u=-1,a=0;a<s;++a){var c=t[a];if(c!==r[a])return o(e[a],n[a])<0?e.substr(0,a)+n[a]+n.substr(a+1):o(e[a],r[a])<0?e.substr(0,a)+r[a]+n.substr(a+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[a],c)<0&&(u=a)}return s<r.length&&"next"===i?e+n.substr(e.length):s<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)}function Zt(e,t,n,r){var o,i,s,u,a,c,l,f=n.length;if(!n.every(e=>"string"==typeof e))return Jt(e,wt);function p(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),s="next"===e?Yt:Ht;var t=n.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return s(e.lower,t.lower)});u=t.map(function(e){return e.upper}),a=t.map(function(e){return e.lower}),c=e,l="next"===e?"":r}p("next");var h=new e.Collection(e,()=>en(u[0],a[f-1]+r));h._ondirectionchange=function(e){p(e)};var d=0;return h._addAlgorithm(function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,a,d))return!0;for(var h=null,y=d;y<f;++y){var b=Xt(o,p,u[y],a[y],s,c);null===b&&null===h?d=y+1:(null===h||s(h,b)>0)&&(h=b)}return n(null!==h?function(){e.continue(h+l)}:r),!1}),h}function en(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function tn(e){return{type:1,lower:e,upper:e}}class nn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Qt(this):new this.Collection(this,()=>en(e,t,!n,!r))}catch(e){return Jt(this,gt)}}equals(e){return null==e?Jt(this,gt):new this.Collection(this,()=>tn(e))}above(e){return null==e?Jt(this,gt):new this.Collection(this,()=>en(e,void 0,!0))}aboveOrEqual(e){return null==e?Jt(this,gt):new this.Collection(this,()=>en(e,void 0,!1))}below(e){return null==e?Jt(this,gt):new this.Collection(this,()=>en(void 0,e,!1,!0))}belowOrEqual(e){return null==e?Jt(this,gt):new this.Collection(this,()=>en(void 0,e))}startsWith(e){return"string"!=typeof e?Jt(this,wt):this.between(e,e+mt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Zt(this,(e,t)=>0===e.indexOf(t[0]),[e],mt)}equalsIgnoreCase(e){return Zt(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=R.apply(N,arguments);return 0===e.length?Qt(this):Zt(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=R.apply(N,arguments);return 0===e.length?Qt(this):Zt(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,mt)}anyOf(){const e=R.apply(N,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Jt(this,gt)}if(0===e.length)return Qt(this);const n=new this.Collection(this,()=>en(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm((n,o,i)=>{const s=n.key;for(;t(s,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(s,e[r])||(o(()=>{n.continue(e[r])}),!1)}),n}notEqual(e){return this.inAnyRange([[_t,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=R.apply(N,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Jt(this,gt)}const t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[_t,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,s=this._max;if(0===e.length)return Qt(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0))return Jt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ee.InvalidArgument);const u=!t||!1!==t.includeLowers,a=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce(function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===o&&e.push(t),e},[]),c.sort(f)}catch(e){return Jt(this,gt)}let p=0;const h=a?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,d=u?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let y=h;const b=new this.Collection(this,()=>en(c[0][0],c[c.length-1][1],!u,!a));return b._ondirectionchange=e=>{"next"===e?(y=h,l=r):(y=d,l=o),c.sort(f)},b._addAlgorithm((e,t,n)=>{for(var o=e.key;y(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!h(e)&&!d(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t(()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])}),!1)}),b}startsWithAnyOf(){const e=R.apply(N,arguments);return e.every(e=>"string"==typeof e)?0===e.length?Qt(this):this.inAnyRange(e.map(e=>[e,e+mt])):Jt(this,"startsWithAnyOf() only works with strings")}}function rn(e){return Ye(function(t){return on(t),e(t.target.error),!1})}function on(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const sn="storagemutated",un="x-storagemutated-1",an=kt(null,sn);class cn{_lock(){return _(!je.global),++this._reculock,1!==this._reculock||je.global||(je.lockOwnerFor=this),this}_unlock(){if(_(!je.global),0==--this._reculock)for(je.global||(je.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ct(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&je.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(_(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ee.DatabaseClosed(n);case"MissingAPIError":throw new ee.MissingAPI(n.message,n);default:throw new ee.OpenFailed(n)}if(!this.active)throw new ee.TransactionInactive;return _(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Ye(t=>{on(t),this._reject(e.error)}),e.onabort=Ye(t=>{on(t),this.active&&this._reject(new ee.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=Ye(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&an.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return yt(new ee.ReadOnly("Transaction is readonly"));if(!this.active)return yt(new ee.TransactionInactive);if(this._locked())return new Ie((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},je])});if(n)return tt(()=>{var e=new Ie((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new Ie((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Ie.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Ie((e,r)=>{n.then(n=>t._waitingQueue.push(Ye(e.bind(null,n))),e=>t._waitingQueue.push(Ye(r.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ee.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(c(t,e))return t[e];const n=this.schema[e];if(!n)throw new ee.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function ln(e,t,n,r,o,i,s){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!s?"&":"")+(r?"*":"")+(o?"++":"")+fn(t)}}function fn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function pn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:w(n,e=>[e.name,e])}}let hn=e=>{try{return e.only([[]]),hn=()=>[[]],[[]]}catch(e){return hn=()=>mt,mt}};function dn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>E(t,e)}(e):t=>E(t,e)}function yn(e){return[].slice.call(e)}let bn=0;function vn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function mn(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:s}=function(e,t){const n=yn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map(e=>t.objectStore(e)).map(e=>{const{keyPath:t,autoIncrement:n}=e,r=i(t),o=null==t,s={},u={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:dn(t)},indexes:yn(e.indexNames).map(t=>e.index(t)).map(e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,u={name:t,compound:i(o),keyPath:o,unique:n,multiEntry:r,extractKey:dn(o)};return s[vn(o)]=u,u}),getIndexByKeyPath:e=>s[vn(e)]};return s[":id"]=u.primaryKey,null!=t&&(s[vn(t)]=u.primaryKey),u})},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),u=o.tables.map(e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:s}){return new Promise((u,a)=>{u=Ye(u);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const d=[],y=[];let b=0;const v=e=>{++b,on(e)};if("deleteRange"===n){if(4===s.type)return u({numFailures:b,failures:y,results:[],lastResult:void 0});3===s.type?d.push(h=c.clear()):d.push(h=c.delete(r(s)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)d.push(h=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),h.onerror=v;else for(let t=0;t<p;++t)d.push(h=c[n](e[t])),h.onerror=v}const m=e=>{const t=e.target.result;d.forEach((e,t)=>null!=e.error&&(y[t]=e.error)),u({numFailures:b,failures:y,results:"delete"===n?o:d.map(e=>e.result),lastResult:t})};h.onerror=e=>{v(e),m(e)},h.onsuccess=m})},getMany:({trans:e,keys:n})=>new Promise((r,o)=>{r=Ye(r);const i=e.objectStore(t),s=n.length,u=new Array(s);let a,c=0,l=0;const f=e=>{const t=e.target;u[t._pos]=t.result,++l===c&&r(u)},p=rn(o);for(let e=0;e<s;++e)null!=n[e]&&(a=i.get(n[e]),a._pos=e,a.onsuccess=f,a.onerror=p,++c);0===c&&r(u)}),get:({trans:e,key:n})=>new Promise((r,o)=>{r=Ye(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=rn(o)}),query:function(e){return n=>new Promise((o,i)=>{o=Ye(o);const{trans:s,values:u,limit:a,query:c}=n,l=a===1/0?void 0:a,{index:f,range:p}=c,h=s.objectStore(t),d=f.isPrimaryKey?h:h.index(f.name),y=r(p);if(0===a)return o({result:[]});if(e){const e=u?d.getAll(y,l):d.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=rn(i)}else{let e=0;const t=u||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(u?i.value:i.primaryKey),++e===a?o({result:n}):void i.continue()):o({result:n})},t.onerror=rn(i)}})}(s),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:s}){return new Promise((u,a)=>{u=Ye(u);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),h=i?s?"prevunique":"prev":s?"nextunique":"next",d=n||!("openKeyCursor"in p)?p.openCursor(r(l),h):p.openKeyCursor(r(l),h);d.onerror=rn(a),d.onsuccess=Ye(t=>{const n=d.result;if(!n)return void u(null);n.___id=++bn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),s=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Ye(a),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{const t=new Promise((e,t)=>{e=Ye(e),d.onerror=rn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}}),u=()=>{if(d.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Ye(e=>{d.onsuccess=u,u()}),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),t},u(n)},a)})},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise((e,s)=>{const u=n.objectStore(t),a=o.isPrimaryKey?u:u.index(o.name),c=r(i),l=c?a.count(c):a.count();l.onsuccess=Ye(t=>e(t.target.result)),l.onerror=rn(s)})}}}(e)),a={};return u.forEach(e=>a[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!a[e])throw new Error(`Table '${e}' not found`);return a[e]},MIN_KEY:-1/0,MAX_KEY:hn(t),schema:o}}function _n({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce((e,{create:t})=>({...e,...t(e)}),e)}(mn(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(t=>{const n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function gn({_novip:e},t,n,r){n.forEach(n=>{const o=r[n];t.forEach(t=>{const r=y(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?p(t,n,{get(){return this.table(n)},set(e){f(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))})})}function wn({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function En(e,t){return e._cfg.version-t._cfg.version}function Sn(e,t,n,r){const i=e._dbSchema,s=e._createTransaction("readwrite",e._storeNames,i);s.create(n),s._completion.catch(r);const u=s._reject.bind(s),a=je.transless||je;tt(()=>{je.trans=s,je.transless=a,0===t?(o(i).forEach(e=>{xn(n,e,i[e].primKey,i[e].indexes)}),_n(e,n),Ie.follow(()=>e.on.populate.fire(s)).catch(u)):function({_novip:e},t,n,r){const i=[],s=e._versions;let u=e._dbSchema=Cn(0,e.idbdb,r),a=!1;const c=s.filter(e=>e._cfg.version>=t);return c.forEach(s=>{i.push(()=>{const i=u,c=s._cfg.dbschema;Dn(e,i,r),Dn(e,c,r),u=e._dbSchema=c;const l=An(i,c);l.add.forEach(e=>{xn(r,e[0],e[1].primKey,e[1].indexes)}),l.change.forEach(e=>{if(e.recreate)throw new ee.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach(e=>On(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),On(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});const f=s._cfg.contentUpgrade;if(f&&s._cfg.version>t){_n(e,r),n._memoizedTables={},a=!0;let t=A(c);l.del.forEach(e=>{t[e]=i[e]}),wn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],o(t),t),n.schema=t;const s=M(f);let u;s&&nt();const p=Ie.follow(()=>{if(u=f(n),u&&s){var e=rt.bind(null,null);u.then(e,e)}});return u&&"function"==typeof u.then?Ie.resolve(u):p.then(()=>u)}}),i.push(t=>{a&&At||function(e,t){[].slice.call(t.db.objectStoreNames).forEach(n=>null==e[n]&&t.db.deleteObjectStore(n))}(s._cfg.dbschema,t),wn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),function e(){return i.length?Ie.resolve(i.shift()(n.idbtrans)).then(e):Ie.resolve()}().then(()=>{var e,t;t=r,o(e=u).forEach(n=>{t.db.objectStoreNames.contains(n)||xn(t,n,e[n].primKey,e[n].indexes)})})}(e,t,s,n).catch(u)})}function An(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!St)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let s;for(s in t)r[s]||e.del.push(s);for(s in r){const n=t[s],o=r[s];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function xn(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(e=>On(o,e)),o}function On(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Cn(e,t,n){const r={};return v(t.objectStoreNames,0).forEach(e=>{const t=n.objectStore(e);let o=t.keyPath;const i=ln(fn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),s=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var u=ln(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);s.push(u)}r[e]=pn(e,i,s)}),r}function Dn({_novip:e},t,n){const o=n.db.objectStoreNames;for(let r=0;r<o.length;++r){const i=o[r],s=n.objectStore(i);e._hasGetAll="getAll"in s;for(let e=0;e<s.indexNames.length;++e){const n=s.indexNames[e],r=s.index(n).keyPath,o="string"==typeof r?r:"["+v(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&r.WorkerGlobalScope&&r instanceof r.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class jn{_parseStoresSpec(e,t){o(e).forEach(n=>{if(null!==e[n]){var r=e[n].split(",").map((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ln(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),i(r),0===t)}),o=r.shift();if(o.multi)throw new ee.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new ee.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ee.Schema("Index must have a name and cannot be an empty string")}),t[n]=pn(n,o,r)}})}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?s(this._cfg.storesSource,e):e;const n=t._versions,r={};let i={};return n.forEach(e=>{s(r,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(r,i)}),t._dbSchema=i,wn(t,[t._allTables,t,t.Transaction.prototype]),gn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],o(i),i),t._storeNames=o(i),this}upgrade(e){return this._cfg.contentUpgrade=fe(this._cfg.contentUpgrade||re,e),this}}function Fn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Qn(Ct,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Pn(e){return e&&"function"==typeof e.databases}function Bn(e){return tt(function(){return je.letThrough=!0,e()})}function In(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function kn(e){var t=t=>e.next(t),n=o(t),r=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),s=o.value;return o.done?s:s&&"function"==typeof s.then?s.then(n,r):i(s)?Promise.all(s).then(n,r):n(s)}}return o(t)()}function Tn(e,t,n){var r=arguments.length;if(r<2)throw new ee.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,O(o),n]}function Nn(e,t,n,r,o){return Ie.resolve().then(()=>{const i=je.transless||je,s=e._createTransaction(t,n,e._dbSchema,r),u={trans:s,transless:i};if(r)s.idbtrans=r.idbtrans;else try{s.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===X.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Nn(e,t,n,null,o))):yt(r)}const a=M(o);let c;a&&nt();const l=Ie.follow(()=>{if(c=o.call(s,s),c)if(a){var e=rt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=kn(c))},u);return(c&&"function"==typeof c.then?Ie.resolve(c).then(e=>s.active?e:yt(new ee.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):l.then(()=>c)).then(e=>(r&&s._resolve(),s._completion.then(()=>e))).catch(e=>(s._reject(e),yt(e)))})}function Rn(e,t,n){const r=i(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Mn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function s(e,t,n){const r=vn(e),u=o[r]=o[r]||[],a=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:a,extractKey:dn(e),unique:!c&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),a>1&&s(2===a?e[0]:e.slice(0,a-1),t+1,n),u.sort((e,t)=>e.keyTail-t.keyTail),l}const u=s(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const e of r.indexes)s(e.keyPath,0,e);function a(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Rn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Rn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(e){const t=o[vn(e)];return t&&t[0]}},count:e=>n.count(a(e)),query:e=>n.query(a(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(a(t)).then(n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Rn(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Rn(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n)):n.openCursor(t)}};return c}}}};function Un(e,t,n,r){return n=n||{},r=r||"",o(e).forEach(o=>{if(c(t,o)){var i=e[o],s=t[o];if("object"==typeof i&&"object"==typeof s&&i&&s){const e=I(i);e!==I(s)?n[r+o]=t[o]:"Object"===e?Un(i,s,n,r+o+"."):i!==s&&(n[r+o]=t[o])}else i!==s&&(n[r+o]=t[o])}else n[r+o]=void 0}),o(t).forEach(o=>{c(e,o)||(n[r+o]=t[o])}),n}const Vn={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=je.trans,{deleting:i,creating:s,updating:u}=o.table(t).hook;switch(e.type){case"add":if(s.fire===re)break;return o._promise("readwrite",()=>a(e),!0);case"put":if(s.fire===re&&u.fire===re)break;return o._promise("readwrite",()=>a(e),!0);case"delete":if(i.fire===re)break;return o._promise("readwrite",()=>a(e),!0);case"deleteRange":if(i.fire===re)break;return o._promise("readwrite",()=>function(e){return l(e.trans,e.range,1e4)}(e),!0)}return n.mutate(e);function a(e){const t=je.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then(a=>{const l=o.map((n,o)=>{const l=a[o],f={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(f,n,l,t);else if("add"===e.type||void 0===l){const i=s.fire.call(f,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||S(e.values[o],r.keyPath,n))}else{const r=Un(l,e.values[o]),i=u.fire.call(f,r,n,l,t);if(i){const t=e.values[o];Object.keys(i).forEach(e=>{c(t,e)?t[e]=i[e]:S(t,e,i[e])})}}return f});return n.mutate(e).then(({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],s=l[r];null==i?s.onerror&&s.onerror(t[r]):s.onsuccess&&s.onsuccess("put"===e.type&&a[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}}).catch(e=>(l.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}function l(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then(({result:n})=>a({type:"delete",keys:n,trans:e}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:l(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))}}};return o}})};function Ln(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Kt(t.keys[o],e[i])&&(r.push(n?F(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const $n={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ln(e.keys,e.trans._cache,"clone"===e.cache);return t?Ie.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?F(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Kn(e){return!("from"in e)}const Wn=function(e,t){if(!this){const t=new Wn;return e&&"d"in e&&s(t,e),t}s(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function zn(e,t,n){const r=Kt(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Kn(e))return s(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Kt(n,e.from)<0)return o?zn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Yn(e);if(Kt(t,e.to)>0)return i?zn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Yn(e);Kt(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Kt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const u=!e.r;o&&!e.l&&qn(e,o),i&&u&&qn(e,i)}function qn(e,t){Kn(t)||function e(t,{from:n,to:r,l:o,r:i}){zn(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Gn(e){let t=Kn(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Kt(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Kt(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Yn(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Hn(n)}e.d=Hn(e)}function Hn({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}l(Wn.prototype,{add(e){return qn(this,e),this},addKey(e){return zn(this,e,e),this},addKeys(e){return e.forEach(e=>zn(this,e,e)),this},[k](){return Gn(this)}});const Jn={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Wn(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const s=e.table(r),{schema:u}=s,{primaryKey:a}=u,{extractKey:c,outbound:l}=a,f={...s,mutate:e=>{const o=e.trans,a=o.mutatedParts||(o.mutatedParts={}),c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Wn)},l=c(""),f=c(":dels"),{type:p}=e;let[h,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const y=e.trans._cache;return s.mutate(e).then(e=>{if(i(h)){"delete"!==p&&(h=e.results),l.addKeys(h);const t=Ln(h,y);t||"add"===p||f.addKeys(h),(t||d)&&function(e,t,n,r){t.indexes.forEach(function(t){const o=e(t.name||"");function s(e){return null!=e?t.extractKey(e):null}const u=e=>t.multiEntry&&i(e)?e.forEach(e=>o.addKey(e)):o.addKey(e);(n||r).forEach((e,t)=>{const o=n&&s(n[t]),i=r&&s(r[t]);0!==Kt(o,i)&&(null!=o&&u(o),null!=i&&u(i))})})}(c,u,t,d)}else if(h){const e={from:h.lower,to:h.upper};f.add(e),l.add(e)}else l.add(n),f.add(n),u.indexes.forEach(e=>c(e.name).add(n));return e})}},p=({query:{index:t,range:n}})=>{var r,o;return[t,new Wn(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},h={get:e=>[a,new Wn(e.key)],getMany:e=>[a,(new Wn).addKeys(e.keys)],count:p,query:p,openCursor:p};return o(h).forEach(e=>{f[e]=function(o){const{subscr:i}=je;if(i){const u=e=>{const n=`idb://${t}/${r}/${e}`;return i[n]||(i[n]=new Wn)},a=u(""),f=u(":dels"),[p,d]=h[e](o);if(u(p.name||"").add(d),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&l&&o.values&&s.query({...o,values:!1});return s[e].apply(this,arguments).then(n=>{if("query"===e){if(l&&o.values)return t.then(({result:e})=>(a.addKeys(e),n));const e=o.values?n.result.map(c):n.result;o.values?a.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,t=o.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(t&&a.addKey(e.primaryKey),e.value)}})}return n})}f.add(n)}}return s[e].apply(this,arguments)}}),f}}}};class Qn{constructor(e,t){this._middlewares={},this.verno=0;const n=Qn.dependencies;this._options=t={addons:Qn.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:re,dbReadyPromise:null,cancelOpen:re,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Ie(e=>{o.dbReadyResolve=e}),o.openCanceller=new Ie((e,t)=>{o.cancelOpen=t}),this._state=o,this.name=e,this.on=kt(this,"populate","blocked","versionchange","close",{ready:[fe,re]}),this.on.ready.subscribe=m(this.on.ready.subscribe,e=>(t,n)=>{Qn.vip(()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Ie.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)})}})}),this.Collection=(i=this,Tt(qt.prototype,function(e,t){this.db=i;let n=Pt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,s=o.table,u=s.hook.reading.fire;this._ctx={table:s,index:o.index,isPrimKey:!o.index||s.schema.primKey.keyPath&&o.index===s.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:u!==oe?u:null}})),this.Table=function(e){return Tt(It.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:kt(null,{creating:[ue,re],reading:[ie,oe],updating:[ce,re],deleting:[ae,re]})})}(this),this.Transaction=function(e){return Tt(cn.prototype,function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=kt(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Ie((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),yt(e)})})}(this),this.Version=function(e){return Tt(jn.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return Tt(nn.prototype,function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new ee.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=hn(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Et.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(Mn),this.use(Vn),this.use(Jn),this.use($n),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new ee.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ee.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(En),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||je.letThrough||this._vip)?e():new Ie((e,t)=>{if(this._state.openComplete)return t(new ee.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ee.DatabaseClosed);this.open().catch(re)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?yt(t.dbOpenError):e);U&&(t.openCanceller._stackHolder=K()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function i(){if(t.openCanceller!==r)throw new ee.DatabaseClosed("db.open() was cancelled")}let s=t.dbReadyResolve,u=null,a=!1;const c=()=>new Ie((r,s)=>{if(i(),!n)throw new ee.MissingAPI;const c=e.name,l=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!l)throw new ee.MissingAPI;l.onerror=rn(s),l.onblocked=Ye(e._fireOnBlocked),l.onupgradeneeded=Ye(r=>{if(u=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=on,u.abort(),l.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=Ye(()=>{s(new ee.NoSuchDatabase(`Database ${c} doesnt exist`))})}else{u.onerror=rn(s);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;a=o<1,e._novip.idbdb=l.result,Sn(e,o/10,u,s)}},s),l.onsuccess=Ye(()=>{u=null;const n=e._novip.idbdb=l.result,i=v(n.objectStoreNames);if(i.length>0)try{const r=n.transaction(1===(s=i).length?s[0]:s,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Cn(0,t,n);e._storeNames=v(t.objectStoreNames,0),gn(e,[e._allTables],o(r),r)}(e,n,r):(Dn(e,e._dbSchema,r),function(e,t){const n=An(Cn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some(e=>e.add.length||e.change.length))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),_n(e,r)}catch(e){}var s;Et.push(e),n.onversionchange=Ye(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),n.onclose=Ye(t=>{e.on("close").fire(t)}),a&&function({indexedDB:e,IDBKeyRange:t},n){!Pn(e)&&n!==Ct&&Fn(e,t).put({name:n}).catch(re)}(e._deps,c),r()},s)}).catch(e=>e&&"UnknownError"===e.name&&t.PR1398_maxLoop>0?(t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):Ie.reject(e));return Ie.race([r,("undefined"==typeof navigator?Ie.resolve():In()).then(c)]).then(()=>(i(),t.onReadyBeingFired=[],Ie.resolve(Bn(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(fe,re);return t.onReadyBeingFired=[],Ie.resolve(Bn(()=>r(e.vip))).then(n)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(n=>{t.dbOpenError=n;try{u&&u.abort()}catch(e){}return r===t.openCanceller&&e._close(),yt(n)}).finally(()=>{t.openComplete=!0,s()})}(this)}_close(){const e=this._state,t=Et.indexOf(this);if(t>=0&&Et.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Ie(t=>{e.dbReadyResolve=t}),e.openCanceller=new Ie((t,n)=>{e.cancelOpen=n})}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ee.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Ie((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Ye(()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Pn(e)&&n!==Ct&&Fn(e,t).delete(n).catch(re)}(this._deps,this.name),n()}),e.onerror=rn(r),e.onblocked=this._fireOnBlocked};if(e)throw new ee.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return o(this._allTables).map(e=>this._allTables[e])}transaction(){const e=Tn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=je.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,s;e=e.replace("!","").replace("?","");try{if(s=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===Dt)i=Dt;else{if("rw"!=e&&e!=jt)throw new ee.InvalidArgument("Invalid transaction mode: "+e);i=jt}if(r){if(r.mode===Dt&&i===jt){if(!o)throw new ee.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&s.forEach(e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new ee.SubTransaction("Table "+e+" not included in parent transaction.");r=null}}),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,(t,n)=>{n(e)}):yt(e)}const u=Nn.bind(null,this,i,s,r,n);return r?r._promise(i,u,"lock"):je.trans?ct(je.transless,()=>this._whenReady(u)):this._whenReady(u)}table(e){if(!c(this._allTables,e))throw new ee.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Xn="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Zn{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Xn](){return this}}function er(e,t){return o(t).forEach(n=>{qn(e[n]||(e[n]=new Wn),t[n])}),e}let tr;try{tr={indexedDB:r.indexedDB||r.mozIndexedDB||r.webkitIndexedDB||r.msIndexedDB,IDBKeyRange:r.IDBKeyRange||r.webkitIDBKeyRange}}catch(r){tr={indexedDB:null,IDBKeyRange:null}}const nr=Qn;function rr(e){let t=or;try{or=!0,an.storagemutated.fire(e)}finally{or=t}}l(nr,{...ne,delete:e=>new nr(e,{addons:[]}).delete(),exists:e=>new nr(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Pn(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==Ct)):Fn(e,t).toCollection().primaryKeys()}(nr.dependencies).then(e)}catch(e){return yt(new ee.MissingAPI)}},defineClass:()=>function(e){s(this,e)},ignoreTransaction:e=>je.trans?ct(je.transless,e):e(),vip:Bn,async:function(e){return function(){try{var t=kn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Ie.resolve(t)}catch(e){return yt(e)}}},spawn:function(e,t,n){try{var r=kn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Ie.resolve(r)}catch(e){return yt(e)}},currentTransaction:{get:()=>je.trans||null},waitFor:function(e,t){const n=Ie.resolve("function"==typeof e?nr.ignoreTransaction(e):e).timeout(t||6e4);return je.trans?je.trans.waitFor(n):n},Promise:Ie,debug:{get:()=>U,set:e=>{V(e,"dexie"===e?()=>!0:Ot)}},derive:h,extend:s,props:l,override:m,Events:kt,on:an,liveQuery:function(e){let t,n=!1;const r=new Zn(r=>{const i=M(e);let s=!1,u={},a={};const c={get closed(){return s},unsubscribe:()=>{s=!0,an.storagemutated.unsubscribe(h)}};r.start&&r.start(c);let l=!1,f=!1;function p(){return o(a).some(e=>u[e]&&function(e,t){const n=Gn(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Gn(e);let s=i.next(o.from),u=s.value;for(;!r.done&&!s.done;){if(Kt(u.from,o.to)<=0&&Kt(u.to,o.from)>=0)return!0;Kt(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(s=i.next(o.from)).value}return!1}(u[e],a[e]))}const h=e=>{er(u,e),p()&&d()},d=()=>{if(l||s)return;u={};const o={},y=function(t){i&&nt();const n=()=>tt(e,{subscr:t,trans:null}),r=je.trans?ct(je.transless,n):n();return i&&r.then(rt,rt),r}(o);f||(an(sn,h),f=!0),l=!0,Promise.resolve(y).then(e=>{n=!0,t=e,l=!1,s||(p()?d():(u={},a=o,r.next&&r.next(e)))},e=>{l=!1,n=!1,r.error&&r.error(e),c.unsubscribe()})};return d(),c});return r.hasValue=()=>n,r.getValue=()=>t,r},extendObservabilitySet:er,getByKeyPath:E,setByKeyPath:S,delByKeyPath:function(e,t){"string"==typeof t?S(e,t,void 0):"length"in t&&[].map.call(t,function(t){S(e,t,void 0)})},shallowClone:A,deepClone:F,getObjectDiff:Un,cmp:Kt,asap:g,minKey:_t,addons:[],connections:Et,errnames:X,dependencies:tr,semVer:vt,version:vt.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),nr.maxKey=hn(nr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(an(sn,e=>{if(!or){let t;St?(t=document.createEvent("CustomEvent"),t.initCustomEvent(un,!0,!0,e)):t=new CustomEvent(un,{detail:e}),or=!0,dispatchEvent(t),or=!1}}),addEventListener(un,({detail:e})=>{or||rr(e)}));let or=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel(un);"function"==typeof e.unref&&e.unref(),an(sn,t=>{or||e.postMessage(t)}),e.onmessage=e=>{e.data&&rr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){an(sn,e=>{try{or||("undefined"!=typeof localStorage&&localStorage.setItem(un,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:un,changedParts:e})))}catch(e){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",e=>{if(e.key===un){const t=JSON.parse(e.newValue);t&&rr(t.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===un&&rr(e.changedParts)})}Ie.rejectionMapper=function(e,t){if(!e||e instanceof Y||e instanceof TypeError||e instanceof SyntaxError||!e.name||!te[e.name])return e;var n=new te[e.name](t||e.message,e);return"stack"in e&&p(n,"stack",{get:function(){return this.inner.stack}}),n},V(U,Ot)},96999(e,t,n){"use strict";n.d(t,{Q:()=>i,h:()=>o});var r=n(3603);const o="${openmrsSpaBase}/login",i={redirectAuthFailure:{enabled:{_type:r.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:r.ZU.String,_default:o,_validators:[r.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:r.ZU.Array,_default:[401],_elements:{_type:r.ZU.Number,_validators:[r.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:r.ZU.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:r.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}},94006(e,t,n){"use strict";n.d(t,{g$:()=>d,HW:()=>l,xC:()=>b,Kx:()=>v,EW:()=>f,yH:()=>h,eA:()=>a,Gp:()=>m,E4:()=>p,Fi:()=>_,st:()=>y});var r=n(36693),o=n(2098);const i=function(e){return void 0===e};var s=n(87570),u=n(88156);const a=(0,o.Zd)("session",{loaded:!1,session:null});let c=0;function l(e={includeAuthStatus:!0}){return(c<Date.now()-6e4||!a.getState().loaded)&&h(),new s.Observable(t=>{const n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(a.getState()),a.subscribe(n)})}function f(){return(c<Date.now()-6e4||!a.getState().loaded)&&h(),a}function p(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function h(e,t){c=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),g((0,u.lo)(u.Ct,{headers:n}))}function d(){a.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function y(e,t){return void 0===t?!Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!i(t.privileges.find(t=>e===t.display)):Array.isArray(e)?e.every(e=>!i(t.privileges.find(t=>e===t.display))):(i(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!i(e.roles.find(e=>"System Developer"===e.display))}(t)}function b(){let e,t;return new Promise(n=>{const r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(a.getState()),e||(t=a.subscribe(r))})}function v(){return new Promise((e,t)=>{l().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function m(e,t){return g((0,u.lo)(u.Ct,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function _(e,t,n){return n||(n=new AbortController),await(0,u.lo)(`${u.Jj}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),h()}function g(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},a.setState(r),t(r)):(r={loaded:!1,session:null},a.setState(r),n(r))}).catch(e=>{(0,r.N)(`Failed to fetch new session information: ${e}`);const t={loaded:!1,session:null};a.setState(t),n(t)})})}a.subscribe(e=>{e.loaded&&e.session&&p(e.session)})},38552(e,t,n){"use strict";function r(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}n.d(t,{L:()=>r})},93012(e,t,n){"use strict";n.d(t,{$f:()=>s.$f,QE:()=>i.Q,g$:()=>r.g$,IU:()=>s.IU,HW:()=>r.HW,xC:()=>r.xC,Kx:()=>r.Kx,EW:()=>r.EW,L7:()=>o.L,Gm:()=>s.Gm,lo:()=>s.lo,ut:()=>s.ut,yH:()=>r.yH,Jj:()=>s.Jj,Ct:()=>s.Ct,eA:()=>r.eA,Gp:()=>r.Gp,E4:()=>r.E4,Fi:()=>r.Fi,Y0:()=>c,st:()=>r.st});var r=n(94006),o=n(38552),i=n(28364),s=n(88156),u=n(3603),a=n(96999);function c(){(0,u.T0)("@openmrs/esm-api",a.Q),(0,r.yH)()}},28364(e,t,n){"use strict";n.d(t,{Q:()=>r});const r={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},88156(e,t,n){"use strict";n.d(t,{$f:()=>y,Ct:()=>f,Gm:()=>p,IU:()=>l,Jj:()=>c,lo:()=>h,ut:()=>d});var r=n(87570),o=n(14156),i=n(3603),s=n(24959),u=n(96999);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}const c="/ws/rest/v1",l="/ws/fhir2/R4",f=`${c}/session`;function p(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function h(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=p(e);if(t.headers||(t.headers={}),(0,o.A)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(c)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(l)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then(async e=>{const t=e,{redirectAuthFailure:o,followRedirects:a}=await(0,i.zj)("@openmrs/esm-api");if(t.ok){if(204===t.status){if(a&&t.headers.has("location")){const e=t.headers.get("location");e&&(0,s.oo)({to:e})}return t.data=null,t}return t.clone().text().then(e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t})}if(n===p(f)&&403===t.status||o.enabled&&o.errors.includes(t.status)){(0,s.g4)();const e=o.url||t.headers.get("location")||u.h;return(0,s.oo)({to:e}),o.resolvePromise?Promise.resolve():new Promise(()=>{})}return t.clone().text().then(e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new y(n,t,o,r)},e=>{throw new y(n,t,null,r)})})}function d(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new r.Observable(r=>{let o=!1;return h(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class y extends Error{constructor(e,t,n,r){super(),a(this,"response",void 0),a(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}},3603(e,t,n){"use strict";n.d(t,{FL:()=>r.FL,G9:()=>o.G9,GI:()=>o.GI,GV:()=>r.GV,Gt:()=>r.Gt,H:()=>o.H,IS:()=>o.IS,Nc:()=>i.N,Nh:()=>r.Nh,Nz:()=>r.Nz,P0:()=>o.P0,Rt:()=>o.Rt,T0:()=>r.T0,UY:()=>o.UY,YP:()=>o.YP,ZU:()=>u.Z,g$:()=>o.g$,gU:()=>s.gU,hs:()=>o.hs,kl:()=>r.kl,ks:()=>r.ks,mq:()=>r.mq,qG:()=>s.qG,r4:()=>s.r4,tN:()=>o.tN,td:()=>r.td,vu:()=>o.vu,y$:()=>s.y$,yL:()=>s.yL,zj:()=>r.zj});var r=n(65768),o=n(79744),i=n(69689),s=n(53884),u=n(53586)},65768(e,t,n){"use strict";function r(e){return null!=e&&"object"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)&&!0===e["@@functional/placeholder"];var t}function o(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}function i(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return r(n)?t:o(function(t){return e(n,t)});default:return r(n)&&r(i)?t:r(n)?o(function(t){return e(t,i)}):r(i)?o(function(t){return e(n,t)}):e(n,i)}}}function s(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function u(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function a(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,{Nh:()=>Pe,T0:()=>ne,ks:()=>se,zj:()=>ae,td:()=>ce,mq:()=>le,Gt:()=>ue,kl:()=>oe,FL:()=>re,GV:()=>ie,Nz:()=>Be});const c="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var l=Object.prototype.toString,f=function(){return"[object Arguments]"===l.call(arguments)?function(e){return"[object Arguments]"===l.call(e)}:function(e){return a("callee",e)}}();const p=f;var h=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],y=function(){return arguments.propertyIsEnumerable("length")}(),b=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const v="function"!=typeof Object.keys||y?o(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=y&&p(e);for(t in e)!a(t,e)||o&&"length"===t||(r[r.length]=t);if(h)for(n=d.length-1;n>=0;)a(t=d[n],e)&&!b(r,t)&&(r[r.length]=t),n-=1;return r}):o(function(e){return Object(e)!==e?[]:Object.keys(e)}),m=o(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function _(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function g(e,t,n,r){var o=s(e);function i(e,t){return w(e,t,n.slice(),r.slice())}return!u(function(e,t){return!u(i,t,e)},s(t),o)}function w(e,t,n,r){if(c(e,t))return!0;var o,i,s=m(e);if(s!==m(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":_(e))!==(void 0===t?"undefined":_(t))||!c(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!c(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var u=n.length-1;u>=0;){if(n[u]===e)return r[u]===t;u-=1}switch(s){case"Map":return e.size===t.size&&g(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&g(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=v(e);if(l.length!==v(t).length)return!1;var f=n.concat([e]),p=r.concat([t]);for(u=l.length-1;u>=0;){var h=l[u];if(!a(h,t)||!w(t[h],e[h],f,p))return!1;u-=1}return!0}const E=i(function(e,t){return w(e,t,[],[])});function S(e){return function t(n,s,u){switch(arguments.length){case 0:return t;case 1:return r(n)?t:i(function(t,r){return e(n,t,r)});case 2:return r(n)&&r(s)?t:r(n)?i(function(t,n){return e(t,s,n)}):r(s)?i(function(t,r){return e(n,t,r)}):o(function(t){return e(n,s,t)});default:return r(n)&&r(s)&&r(u)?t:r(n)&&r(s)?i(function(t,n){return e(t,n,u)}):r(n)&&r(u)?i(function(t,n){return e(t,s,n)}):r(s)&&r(u)?i(function(t,r){return e(n,t,r)}):r(n)?o(function(t){return e(t,s,u)}):r(s)?o(function(t){return e(n,t,u)}):r(u)?o(function(t){return e(n,s,t)}):e(n,s,u)}}}function A(e){return"[object Object]"===Object.prototype.toString.call(e)}const x=S(function(e,t,n){var r,o={};for(r in n=n||{},t=t||{})a(r,t)&&(o[r]=a(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)a(r,n)&&!a(r,o)&&(o[r]=n[r]);return o}),O=S(function e(t,n,r){return x(function(n,r,o){return A(r)&&A(o)?e(t,r,o):t(n,r,o)},n,r)}),C=i(function(e,t){return O(function(e,t,n){return n},e,t)}),D=i(function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n});function j(e,t,n){if(n||(n=new F),i=void 0===(r=e)?"undefined":(o=r)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o,null==r||"object"!=i&&"function"!=i)return e;var r,o,i,s,u=function(r){var o=n.get(e);if(o)return o;for(var i in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t?j(e[i],!0,n):e[i]);return r};switch(m(e)){case"Object":return u(Object.create(Object.getPrototypeOf(e)));case"Array":return u(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return s=e,new RegExp(s.source,s.flags?s.flags:(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.sticky?"y":"")+(s.unicode?"u":"")+(s.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var F=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180){for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1)if((i=n[r])[0]===e)return i[1]}else{var o=this.hash(e);if(n=this.map[o])for(r=0;r<n.length;r+=1){var i;if((i=n[r])[0]===e)return i[1]}}},e}();const P=o(function(e){return null!=e&&"function"==typeof e.clone?e.clone():j(e,!0)}),B=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},I=o(function(e){return!!B(e)||!!e&&"object"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t});var k="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function T(e,t,n){return function(r,o,i){if(I(i))return e(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return t(r,o,i,"fantasy-land/reduce");if(null!=i[k])return n(r,o,i[k]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return t(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function N(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var R=i(function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,s){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,s,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,s,u,a){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,s,u,a,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,s,u,a,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,function(){return e.apply(t,arguments)})});const M=R;function U(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function V(e,t,n,r){return e["@@transducer/result"](n[r](M(e["@@transducer/step"],e),t))}const L=T(N,V,U);var $=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const K=S(function(e,t,n){return L("function"==typeof e?new $(e):e,t,n)});var W=n(53586),z=n(69689);const q=(0,z.N)(e=>Array.isArray(e),"must be an array"),G=(0,z.N)(e=>"boolean"==typeof e,"must be a boolean"),Y=(0,z.N)(e=>"number"==typeof e,"must be a number"),H=(0,z.N)(e=>"string"==typeof e,"must be a string"),J=(0,z.N)(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),Q=(0,z.N)(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string");var X=n(79744);const Z=[];function ee(){const e=X.Rt.getState(),t=X.H.getState(),n=X.hs.getState();!function(e,t){for(let n of Object.keys(e.schemas)){const r=(0,X.IS)(n);let o;o=e.moduleLoaded[n]?{translationOverridesLoaded:!0,loaded:!0,config:ve(n,e,t)}:{translationOverridesLoaded:!0,loaded:!1,config:me(n,e,t)},r.setState(o)}}(e,t),function(e,t){const n=X.tN.getState(),r=function(e,t){let n=pe(P(e.schemas));const r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]];for(let[e,t]of r)n=ge([n,he(e,t)]);return n}(e,t),o={config:r};E(n.config,o.config)||X.tN.setState(o)}(e,t),function(e,t){const n=function(e,t){const n=ge(ye(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});!function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))de(r,t,e)}(r);return Object.keys(r).reduce((e,t)=>({...e,...r[t]}),{})}(e,t),r=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{loaded:!0,config:t}])),o=(0,X.YP)(),i=o.getState(),s={slots:{...i.slots,...r}};E(i.slots,s.slots)||o.setState(s)}(e,t),function(e,t,n){const r={};for(let o of t.mountedExtensions){const t=fe(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]||(r[o.slotName]={}),r[o.slotName][o.extensionId]={config:t,loaded:!0}}const o=(0,X.GI)(),i=o.getState(),s={configs:r};E(i.configs,s.configs)||o.setState(s)}(e,n,t)}function te(){ee(),Z.push(X.Rt.subscribe(ee)),Z.push(X.H.subscribe(ee)),Z.push(X.hs.subscribe(ee))}function ne(e,t){be(e,t);const n=C(t,ke);X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function re(e){X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:ke}}))}function oe(e){X.Rt.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ie(e){X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:Ie}}))}function se(e,t){be(e,t);const n=C(t,ke);X.Rt.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function ue(e,t="provided"){X.Rt.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function ae(e){return new Promise(t=>{const n=(0,X.IS)(e);function r(e){if(e.loaded&&e.config){const n=D(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function ce(e,t,n){const r=[new Promise(t=>{const n=(0,X.IS)(e);function r(e){if(e.translationOverridesLoaded&&e.config){const n=e.config["Translation overrides"]??{};t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})];return t&&n&&r.push(new Promise(e=>{const r=(0,X.UY)(t,n);function o(t){if(t.loaded&&t.config){const n=t.config["Translation overrides"]??{};e(n),i&&i()}}o(r.getState());const i=r.subscribe(o)})),Promise.all(r)}function le(e,t,n){we(e,t,n);const r=Oe(e,t);return Se(e,r,n),r}function fe(e,t,n,r,o,i){const s=function(e){const[t]=e.split("#");return t}(r),u=o.schemas[s],a=u?s:t,c=ye(o,i),l=_e(e,c),f=l?.extensionSlots?.[n]?.configure?.[r]??{},p=ge([_e(a,c),f]),h=u??o.schemas[t];we(h,p,a);const d=Oe(h,p);return Se(h,d,a),delete d.extensionSlots,d}function pe(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:De(e)?Object.keys(e).reduce((t,n)=>(t[n]=pe(e[n]),t),{}):{}}function he(e,t){return De(e)?Object.keys(e).reduce((n,r)=>(n[r]=he(e[r],t),n),{}):{_value:e,_source:t}}function de(e,t,n){const r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&Fe(r,o+`' contains invalid keys '${i.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||Fe(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||Fe(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||Fe(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(De(e.configure)||Fe(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function ye(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function be(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter(e=>!e.startsWith("_"))){const i=n+(n&&".")+o,s=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!De(s)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}s.hasOwnProperty("_default")||be(e,s,i);const u=s._elements;if(Ce(u)&&be(e,u,i+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const a=s._type;a&&!Object.values(W.Z).includes(a)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(W.Z).join(", ")}. Received '${a}'`),Object.keys(s).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),u&&a&&![W.Z.Array,W.Z.Object].includes(a)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(a)}`)}}function ve(e,t,n){const r=t.schemas[e],o=_e(e,ye(t,n));we(r,o,e);const i=Oe(r,o);return Se(r,i,e),delete i.extensionSlots,i}function me(e,t,n){const r=_e(e,ye(t,n)),o=Oe(ke,r);return Se(ke,o,e),delete o.extensionSlots,o}function _e(e,t){return ge(t.map(({[e]:t})=>t).filter(e=>!!e))}function ge(e){return K(C)({},e)}function we(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e.hasOwnProperty(r)?Ee(s,o,i):"extensionSlots"===r&&""!==n||Fe(i,`Unknown config key '${i}' provided. Ignoring.`)}}function Ee(e,t,n){Ae(n,e._type,t),De(t)?e._type===W.Z.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ee(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||we(e,t,n):e._type===W.Z.Array&&function(e,t,n){if(Ae(n,W.Z.Array,t)){if(Ce(e._elements))for(let r=0;r<t.length;r++)Ee(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)Ae(`${n}[${r}]`,e._elements?._type,t[r])}}(e,t,n)}function Se(e,t,n=""){if(e)if(t!==e._default&&xe(n,e._validators,t),De(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e._type===W.Z.Object&&e._elements?Se(e._elements,o,i):Se(s,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)Se(e._elements,t[r],`${n}[${r}]`)}function Ae(e,t,n){return!t||xe(e,[{Array:q,Boolean:G,ConceptUuid:Q,Number:Y,Object:J,String:H,UUID:Q,PersonAttributeTypeUuid:Q,PatientIdentifierTypeUuid:Q}[t]],n)}function xe(e,t,n){let r=!0;if(t)try{for(let o of t){const t=o(n);"string"==typeof t&&(Fe(e,"object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`),r=!1)}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}return r}te();const Oe=(e,t)=>{const n=P(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&Ce(e))if(o._type===W.Z.Array&&Array.isArray(r)){const o=r.map(t=>Oe(e,t));n[t]=o}else if(o._type===W.Z.Object)for(let t of Object.keys(r))r[t]=Oe(e,r[t])}else if(De(o)){const e=r??{};De(e)&&(n[t]=Oe(o,e))}}return n};function Ce(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function De(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let je=new Set;function Fe(e,t){const n=`${e}:::${t}`;je||(je=new Set),je.has(n)||(console.error(t),je.add(n))}function Pe(e){e?je.forEach(t=>{t.startsWith(e)&&je.delete(t)}):je.clear()}function Be(){Z.forEach(e=>e()),Z.length=0,te()}const Ie={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:W.Z.Object,_default:{},_validators:[(0,z.N)(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)).join(", ")}.`)]}},ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:W.Z.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:W.Z.String,_default:void 0}},...Ie}},79744(e,t,n){"use strict";n.d(t,{G9:()=>l,GI:()=>p,H:()=>s,IS:()=>a,P0:()=>d,Rt:()=>i,UY:()=>h,YP:()=>c,g$:()=>y,hs:()=>u,tN:()=>b,vu:()=>f});var r=n(2098),o=n(74080);const i=(0,r.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),s=(0,r.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});s.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});const u=(0,r.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function a(e){return(0,r.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function c(){return(0,r.jf)("config-extension-slots",{slots:{}})}function l(e){return f(c().getState(),e)}function f(e,t){return e.slots[t]??{loaded:!1,config:{}}}function p(){return(0,r.jf)("config-extensions",{configs:{}})}function h(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");const n=p(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},setState(r,o=!1){n.setState(n=>{n.configs[e]||(n.configs[e]={});const i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n})},subscribe:e=>n.subscribe((t,n)=>{const i=r(t),s=r(n);(0,o.b)(i,s)||e(i,s)}),destroy(){}}}function d(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}function y(e,t,n){const r=e.configure?.[n];return r??null}const b=(0,r.Zd)("config-implementer-tools",{config:{}})},53586(e,t,n){"use strict";n.d(t,{Z:()=>r});var r=function(e){return e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",e}({})},69689(e,t,n){"use strict";function r(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}n.d(t,{N:()=>r})},53884(e,t,n){"use strict";n.d(t,{gU:()=>s,qG:()=>i,r4:()=>o,y$:()=>a,yL:()=>u});var r=n(69689);const o=(e,t)=>(0,r.N)(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),i=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return(0,r.N)(e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},s=i([]),u=e=>(0,r.N)(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),a={inRange:o,isUrl:s,isUrlWithTemplateParameters:i,oneOf:u}},84571(e,t,n){"use strict";n.d(t,{II:()=>a,N:()=>i,R:()=>f,SD:()=>c,ji:()=>u,r_:()=>l});var r=n(99848),o=n(2098);const i=(0,r.y)()(()=>({}));(0,o.CE)("openmrs-app-context",i);const s=Object();function u(e,t=s){i.setState(n=>{if(e in n)throw new Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===s?{}:t})})}function a(e){i.setState(t=>(e in t&&delete t[e],t))}function c(e,t=e=>e){const n=i.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function l(e,t){i.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function f(e,t){let n=c(e);return t(Object.freeze(Object.assign({},n))),i.subscribe(r=>{let o=e in r?r[e]:null;o!==n&&(n=o,t(Object.freeze(Object.assign({},o))))})}},48152(e,t,n){"use strict";n.d(t,{Bv:()=>s,KU:()=>i,SY:()=>a,Zu:()=>o,cD:()=>u});var r=n(93012);const o=`${r.Jj}/attachment`;function i(e,t){return(0,r.lo)(`${o}/${e}`,{signal:t.signal})}function s(e,t,n){return(0,r.lo)(`${o}?patient=${e}&includeEncounterless=${t}`,{signal:n.signal})}async function u(e,t){const n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),(0,r.lo)(`${o}`,{method:"POST",body:n})}function a(e,t){return(0,r.lo)(`${o}/${e}`,{method:"DELETE",signal:t.signal})}},11631(e,t,n){"use strict";n.d(t,{h:()=>i});var r=n(93012),o=n(60884);async function i(e,t,n=!0){if(e){let o=null;const[i,u]=await Promise.all([(0,r.lo)(`${r.IU}/Patient/${e}`,t).catch(e=>o=e),n?s(e):Promise.resolve(null)]);if(i.ok)return i.data;if(u)return u;if(o)throw o}return null}async function s(e){const t=(await(0,o.pb)("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}},71422(e,t,n){"use strict";function r(e,t){const n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function o(e,t){const n=e=>{const n="detail"in e&&null!==e.detail?e.detail:void 0;t(n)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}n.d(t,{$:()=>o,X:()=>r})},28934(e,t,n){"use strict";n.d(t,{$y:()=>i.$,BR:()=>a.BR,BX:()=>a.BX,Bv:()=>r.Bv,Cj:()=>a.Cj,DK:()=>a.DK,Ds:()=>a.Ds,E$:()=>s.E,KU:()=>r.KU,NH:()=>a.NH,Pu:()=>u.P,Qx:()=>u.Q,Rb:()=>a.Rb,SY:()=>r.SY,Vs:()=>s.V,X1:()=>i.X,Zu:()=>r.Zu,cD:()=>r.cD,dx:()=>a.dx,hG:()=>o.h,xL:()=>a.xL});var r=n(48152),o=n(11631),i=n(71422),s=n(90303),u=n(8862),a=n(27913)},90303(e,t,n){"use strict";n.d(t,{E:()=>i,V:()=>s});var r=n(93012),o=n(7877);function i(e){return{uuid:e.uuid,display:e.display}}function s(e=null,t=null){const n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);const s=n.toString(),u=`${r.Jj}/location${s?"?"+s:""}`;return(0,r.ut)(u).pipe((0,o.Tj)(e=>e.data.results.map(i))).pipe((0,o.s)(1))}},8862(e,t,n){"use strict";n.d(t,{P:()=>s,Q:()=>i});var r=n(93012),o=n(7877);function i(e){return{uuid:e.uuid,display:e.display,name:e.name}}function s(){return(0,r.ut)(`${r.Jj}/visittype`).pipe((0,o.Tj)(e=>e.data.results.map(i))).pipe((0,o.s)(1))}},27913(e,t,n){"use strict";n.d(t,{BR:()=>d,BX:()=>l,Cj:()=>u,DK:()=>y,Ds:()=>p,NH:()=>f,Rb:()=>a,dx:()=>s,xL:()=>h});var r=n(93012),o=n(2098),i=n(87570),s=function(e){return e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit",e}({}),u=function(e){return e.NOTSTARTED="notStarted",e.ONGOING="ongoing",e}({});const a="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",c=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function l(){return(0,o.jf)("visit",c)}function f(e,t){l().setState({patientUuid:e,manuallySetVisitUuid:t})}function p(e,t){return(0,r.lo)(`${r.Jj}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function h(e,t,n){return(0,r.lo)(`${r.Jj}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function d(e,t,n){const o=n??a;return(0,r.lo)(`${r.Jj}/visit?patient=${e}&v=${o}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}l().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});const y=new i.BehaviorSubject(null)},36693(e,t,n){"use strict";n.d(t,{J:()=>i,N:()=>o});var r=n(30252);function o(e){const t=s(e);setTimeout(()=>{throw t})}function i(){const e=Error();return t=>{s(t).stack+=`\nAsync stacktrace:\n${e.stack}`,o(t)}}function s(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,r.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,r.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},45697(e,t,n){"use strict";n.d(t,{wE:()=>w,_3:()=>h,eb:()=>y,Gz:()=>b,dX:()=>v,$F:()=>m,Sj:()=>_,uN:()=>g,mv:()=>d,PQ:()=>r.A});var r=n(55520),o="ArrowFunctionExpression",i={name:"arrow",init:function(e){function t(n){n&&(Object.values(n).forEach(function(e){var n;e&&"object"==(void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&t(e)}),"=>"===n.operator&&(n.type=o,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var r=this.gobbleBinaryOp();if("=>"===r){var i=this.gobbleBinaryExpression();return i||this.throwError("Expected expression after "+r),void(t.node={type:o,params:null,body:i})}}this.index=n}}),e.hooks.add("after-expression",function(e){t(e.node)})}};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}var u={name:"numbers",init:function(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8}function r(e,t){return 95===e||t.some(function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,u=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n,r)||function(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}}(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.")}()),i=o[0],u=o[1];return e>=i&&e<=u})}function o(t){var n=this,r=this.index,o="",i=function(){for(;e.isDecimalDigit(n.code)||95===n.code;)95===n.code?n.index++:o+=n.expr.charAt(n.index++)};i(),this.code===e.PERIOD_CODE&&(o+=this.expr.charAt(this.index++),i());var s=this.char;"e"!==s&&"E"!==s||(o+=this.expr.charAt(this.index++),"+"!==(s=this.char)&&"-"!==s||(o+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+o+this.char+")"));var u=this.code;if(e.isIdentifierStart(u))this.throwError("Variable names cannot start with a number ("+o+this.char+")");else if(u===e.PERIOD_CODE)return o.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:u,number:o},null,2))),void(this.index=r);t.node={type:e.LITERAL,value:parseFloat(o),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(i){if(48===this.code){var s=this.index,u=this.expr.charAt(this.index+1),a=t.call(this,u);if(!a)return;for(var c="";r(this.code,a);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0)))return this.index=s+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(c,n(u)),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)})}},a={name:"regex",init:function(e){e.hooks.add("gobble-token",function(t){if(47===this.code){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(47===this.code&&!r){for(var o=this.expr.slice(n,this.index),i="";++this.index<this.expr.length;){var s=this.code;if(!(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57))break;i+=this.char}var u=void 0;try{u=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:u,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}};function c(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 l(e){return function(e){if(Array.isArray(e))return c(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 c(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)?c(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 f={name:"jsepTemplateLiteral",init:function(e){function t(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(96===this.code){for(var n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",o="",i=!1,s=this.expr.length,u=function(){return n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:i})};this.index<s;){var a,c=this.expr.charAt(++this.index);if("`"===c)return this.index+=1,i=!0,u(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===c&&"{"===this.expr.charAt(this.index+1))this.index+=2,u(),o="",r="",(a=n.expressions).push.apply(a,l(this.gobbleExpressions(125))),125!==this.code&&this.throwError("unclosed ${");else if("\\"===c)switch(o+=c,c=this.expr.charAt(++this.index),o+=c,c){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}},p=n(7391);function h(e,t={}){return _(e,t,E)}async function d(e,t={}){return g(e,t,E)}function y(e,t={}){return _(e,t,S)}function b(e,t={}){return g(e,t,S)}function v(e,t={}){return _(e,t,A)}function m(e,t={}){return g(e,t,A)}function _(e,t={},n){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});const o=function(e){return C(e,p.z)}(t),i=x("string"==typeof e?(0,r.A)(e):e,o);if(n(i))return i;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function g(e,t={},n){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});const o=function(e){return C(e,p.f)}(t);return Promise.resolve(x("string"==typeof e?(0,r.A)(e):e,o)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function w(e){return(0,r.A)(e)}function E(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function S(e){return"boolean"==typeof e}function A(e){return"number"==typeof e}function x(e,t){switch(e.type){case"UnaryExpression":return function(e,t){const n=x(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw`Expression evaluator does not support operator '${e.operator}''`}}(e,t);case"BinaryExpression":return function(e,t){let n=x(e.left,t),r=x(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return n**r;case"==":return n==r;case"===":return n===r;case"!=":return n!=r;case"!==":return n!==r;case">":return n>r;case">=":return n>=r;case"<":return n<r;case"<=":return n<=r;case"in":return n in r;case"&&":return n&&r;case"||":return n||r;case"??":return n??r;default:throw`Expression evaluator does not support operator '${e.operator}' operator`}}(e,t);case"ConditionalExpression":return function(e,t){const n=x(e.test,t);return x(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){let n=e.arguments?.map(D(t)),r=x(e.callee,t);if(!r)throw`No function named ${P(e.callee)} is defined in this context`;if("function"!=typeof r)throw`${P(e.callee)} is not a function`;return r(...n)}(e,t);case"ArrowFunctionExpression":return function(e,t){const n=e.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[];return function(...r){if(r.length<n.length)throw`Required argument(s) ${n.slice(r.length,-1).join(", ")} were not provided`;const o=Object.fromEntries(n.reduce((e,t,n)=>{const o=r[n];return F(o)&&e.push([t,o]),e},[]));return x(e.body,t.addVariables(o))}.bind(t.thisObj??null)}(e,t);case"MemberExpression":return function(e,t){let n=x(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":{let n=O(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":{let n=O(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${n}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let r,o=n;if("string"==typeof n)o=String.prototype;else if("number"==typeof n)o=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type "+typeof n;switch(t.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":r=x(e.property,t);break;default:{const o=x(e.property,t);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};j(o),r=n[o]}}return"function"==typeof r?r.bind(n):r}(e,t);case"ArrayExpression":return function(e,t){return e.elements?.map(D(t))}(e,t);case"SequenceExpression":return function(e,t){const n=e.expressions.map(D(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';{let n=e.arguments?.map(D(t));switch(e.callee.name){case"Date":return new Date(...n);case"RegExp":return new RegExp(...n);default:throw`Cannot instantiate object of type ${e.callee.name}`}}}(e,t);case"Literal":return function(e){return j(e.value),e.value}(e);case"Identifier":return function(e,t){j(e.name);const n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){const t=n[e.name];return j(t),t}if(t.variables&&e.name in t.variables){const n=t.variables[e.name];return j(n),n}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){const n=e.expressions?.map(D(t))??[],r=e.quasis?.map(D(t))??[];return r.filter(e=>!e.tail).map(e=>e.value).join("")+n.join("")+r.filter(e=>e.tail).map(e=>e.value).join("")}(e,t);case"TemplateElement":return function(e){return{value:e.cooked,tail:e.tail}}(e);default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function O(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return O(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function C(e,t){const n={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}function D(e){return function(t){return null===t?null:x(t,e)}}function j(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function F(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||e instanceof RegExp)return!0;if("object"==typeof e){for(const t of Object.keys(e))if(!F(e[t]))return!1;return!0}if(Array.isArray(e))for(const t of e)if(!F(t))return!1;return!1}function P(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}r.A.plugins.register(i),r.A.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){var n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;for(var r=t.node;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),r.A.plugins.register(u),r.A.plugins.register(a),r.A.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),r.A.plugins.register(f),r.A.addBinaryOp("in",7),r.A.addBinaryOp("??",1)},7391(e,t,n){"use strict";n.d(t,{f:()=>o,z:()=>r});const r={Array,Boolean,Symbol,Infinity:1/0,NaN:NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},o={...r,Promise}},32465(e,t,n){"use strict";n.d(t,{ES:()=>g,FY:()=>F,K0:()=>A,No:()=>O,Tj:()=>E,VK:()=>S,Yo:()=>x,ap:()=>P,cL:()=>B,xg:()=>w,zx:()=>j});var r=n(93012),o=n(3603),i=n(45697),s=n(48088),u=n(30252),a=n(88678),c=n(39634),l=n(99416),f=n(22790),p=n(49246);const h=(0,p.a9)(),d=(0,p.zF)(),y=(0,o.YP)(),b=(0,o.GI)();function v(e,t,n,r,i){const s={},u=(0,a.s)(),l=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,a]of Object.entries(e.slots)){const{config:c}=(0,o.vu)(t,a.name),f=D(r,e,c,n,l,u,i.session);s[r]={moduleName:a.moduleName,assignedExtensions:f}}(0,c.A)(d.getState().slots,s)||d.setState({slots:s})}function m(){v(h.getState(),y.getState(),b.getState(),s.jX.getState(),r.eA.getState())}function _(e,t,n){return{moduleName:t,name:e,attachedIds:[],config:null,state:n}}function g(e){const[t]=e.split("#");return t}function w(e,t){const n=g(t);return e.extensions[n]}function E(e){return w(h.getState(),e)}h.subscribe(e=>{v(e,y.getState(),b.getState(),s.jX.getState(),r.eA.getState())}),y.subscribe(e=>{v(h.getState(),e,b.getState(),s.jX.getState(),r.eA.getState())}),b.subscribe(e=>{v(h.getState(),y.getState(),e,s.jX.getState(),r.eA.getState())}),s.jX.subscribe(e=>{v(h.getState(),y.getState(),b.getState(),e,r.eA.getState())}),r.eA.subscribe(e=>{v(h.getState(),y.getState(),b.getState(),s.jX.getState(),e)}),m(),(0,u.gj)(m);const S=e=>h.setState(t=>(t.extensions[e.name]={...e,instances:[]},t));function A(e,t){(0,p.DQ)(n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{..._(e),attachedIds:[t]}}}})}function x(e,t){(0,p.DQ)(n=>{const r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function O(e){(0,p.DQ)(t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function C(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function D(e,t,n,s,u,a,c){const p=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=h.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>{const r=C(e,o,i[g(e)]?.order,t),s=C(n,o,i[g(n)]?.order,t);return-1===s?-1:-1===r?1:r-s})}(n,t.slots[e].attachedIds),d=[],y=t.slots[e]?.state,b=y&&"object"==typeof y?{session:c,...y}:{session:c};for(let h of p){const{config:p}=(0,o.P0)(s,e,h),y=(0,o.g$)(n,e,h),v=(0,l.A)(p,y),m=g(h),_=t.extensions[m];if(_){const t=v?.["Display conditions"]?.privileges??_.privileges??[];if(t&&("string"==typeof t||Array.isArray(t)&&t.length>0)){if(!c?.user)continue;if(!(0,r.st)(t,c.user))continue}const n=v?.["Display conditions"]?.expression||_.displayExpression;if(void 0!==n&&"string"==typeof n&&n.trim().length>0)try{if(!(0,i.eb)(n,b))continue}catch(t){console.error(`Error while evaluating expression '${n}' for extension ${m} in slot ${e}`,t);continue}if(_.featureFlag&&!u.includes(_.featureFlag))continue;if(window.offlineEnabled&&!(0,f.E)(a,_.online,_.offline))continue;d.push({id:h,name:m,moduleName:_.moduleName,config:v,featureFlag:_.featureFlag,meta:_.meta,online:v?.["Display conditions"]?.online??_.online??!0,offline:v?.["Display conditions"]?.offline??_.offline??!1})}}return d}function j(e){const t=h.getState(),{config:n}=(0,o.G9)(e),i=b.getState(),u=s.jX.getState(),c=r.eA.getState(),l=(0,a.s)();return D(e,t,n,i,Object.entries(u.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),l,c.session)}const F=(e,t,n)=>h.setState(r=>{const o=r.slots[t]?.moduleName;if(o&&o!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${o}.`),r;if(o&&o==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e,state:n}}};const i=_(t,e,n);return{...r,slots:{...r.slots,[t]:{...i}}}});function P(e,t,n=!1){h.setState(r=>{const o=n?(0,l.A)(r.slots[e].state,t):t;return{...r,slots:{...r.slots,[e]:{...r.slots[e],state:o}}}})}const B=()=>d.setState(()=>({slots:{},extensions:{}}))},22790(e,t,n){"use strict";n.d(t,{E:()=>i,d:()=>o});var r=n(88678);function o(e=!0,t=!1){return i((0,r.s)(),e,t)}function i(e,t=!0,n=!1){return Boolean(e?t:n)}},94040(e,t,n){"use strict";n.d(t,{K0:()=>r.K0,dO:()=>o.d,Ef:()=>o.E,Yo:()=>r.Yo,No:()=>r.No,zx:()=>r.zx,a9:()=>C.a9,ES:()=>r.ES,Tj:()=>r.Tj,xg:()=>r.xg,zF:()=>C.zF,o1:()=>w,Fg:()=>c,YX:()=>E,Ml:()=>g,Q_:()=>v,Xb:()=>b,Gp:()=>i.Gp,VK:()=>r.VK,FY:()=>r.FY,Ju:()=>a,pm:()=>h,io:()=>d,rD:()=>S,Qb:()=>A,Uh:()=>x,wG:()=>O.w,cL:()=>r.cL,Vx:()=>i.Vx,sr:()=>i.sr,ap:()=>r.ap,DQ:()=>C.DQ,J_:()=>_});var r=n(32465),o=n(22790),i=n(93902),s=n(2098);const u=(0,s.Zd)("modalRegistry",{modals:{}});function a(e){u.setState(t=>(t.modals[e.name]=e,t))}function c(e){let t=u.getState().modals[e];if(!t){const n=(0,r.Tj)(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),a(t))}return t}var l=n(98892);const f=(0,s.Zd)("workspaceRegistrations",{workspaces:{}}),p=(0,s.Zd)("workspaceGroups",{workspaceGroups:{}});function h(e){f.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function d(e){p.setState(t=>{const n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}const y=new Set;function b(e){const t=f.getState().workspaces;if(t[e])return t[e];{const t=(0,r.Tj)(e);if(t)return y.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),y.add(e)),{name:t.name,title:m(t),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]};throw new Error(`No workspace named '${e}' has been registered.`)}}function v(e){const t=p.getState().workspaceGroups;if(t[e])return t[e];throw new Error(`No workspace group named '${e}' has been registered.`)}function m(e){const t=e?.meta?.title;return"string"==typeof t?t:t&&"object"==typeof t?(0,l.t)(e.moduleName,t.key,t.default):e.name}const _=(0,s.Zd)("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function g(e){const{registeredWorkspacesByName:t,registeredWindowsByName:n}=_.getState(),r=t[e];if(r){const t=n[r.window];if(t)return t;throw new Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw new Error(`No workspace found with name: ${e}`)}function w(e){const{registeredGroupsByName:t,registeredWindowsByName:n}=_.getState(),r=n[e];if(r){const n=t[r.group];if(n)return n;throw new Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw new Error(`No workspace window found with name: ${e}`)}function E(e){const{openedWindows:t}=_.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function S(e,t){if(0==t.length)return;const{registeredGroupsByName:n}=_.getState(),r={...n};for(const n of t){if(r[n.name])throw new Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}_.setState({registeredGroupsByName:r})}function A(e,t){if(0==t.length)return;const{registeredWindowsByName:n}=_.getState(),r={...n};for(const n of t){if(r[n.name])throw new Error(`Cannot register workspace window ${n.name} more than once`);const t={...n,moduleName:e};r[n.name]=t}_.setState({registeredWindowsByName:r})}function x(e,t){if(0==t.length)return;const{registeredWorkspacesByName:n}=_.getState(),r={...n};for(const n of t){if(r[n.name])throw new Error(`Cannot register workspace ${n.name} more than once`);const t={...n,moduleName:e};r[n.name]=t}_.setState({registeredWorkspacesByName:r})}var O=n(93875),C=n(49246)},93902(e,t,n){"use strict";n.d(t,{Gp:()=>r,Vx:()=>o,sr:()=>i});const r=(0,n(2098).Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function o({name:e,basePath:t,mode:n,componentContext:o,state:i}){r.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:o,state:i})}function i(e){r.getState().slotName===e&&r.setState(r.getInitialState(),!0)}},93875(e,t,n){"use strict";n.d(t,{w:()=>a});var r=n(5894),o=n(32465),i=n(22790),s=n(49246);let u=0;async function a(e,t,n,a,c=e=>e,l={}){const f=(0,o.ES)(a),p=(0,o.Tj)(a);let h=null;if(e){if(!p)throw Error(`Couldn't find extension '${f}' to attach to '${t}'`);const{meta:o,moduleName:d,online:y,offline:b,load:v}=p;if((0,i.d)(y,b)){(0,s.DQ)(r=>{const o={domElement:e,id:a,slotName:t,slotModuleName:n};return{...r,extensions:{...r.extensions,[f]:{...r.extensions[f],instances:[...r.extensions[f].instances,o]}}}});const i=await v(),p=u++;h=(0,r.mountRootParcel)(c({...i,name:`${t}/${f}-${p}`}),{...l,_meta:o,_extensionContext:{extensionId:a,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d},domElement:e})}}else console.warn(`Tried to render ${a} into ${t} but no DOM element was available.`);return h}},49246(e,t,n){"use strict";n.d(t,{DQ:()=>a,a9:()=>u,zF:()=>c});var r=n(39634),o=n(3603),i=n(2098);const s=(0,i.Zd)("extensionsInternal",{slots:{},extensions:{}}),u=()=>(0,i.jf)("extensionsInternal",{slots:{},extensions:{}});function a(e){const t=s.getState(),n=e(t);n!==t&&s.setState(n)}const c=()=>(0,i.jf)("extensions",{slots:{}});function l(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,r.A)(o.hs.getState().mountedExtensions,t)||o.hs.setState({mountedExtensions:t})}l(s.getState()),s.subscribe(l)},30252(e,t,n){"use strict";n.d(t,{$3:()=>b,FI:()=>d,LQ:()=>y,Vt:()=>v,Yt:()=>o,bJ:()=>m,bK:()=>_,dX:()=>g,ff:()=>c,gj:()=>i,ls:()=>w,pc:()=>a,sT:()=>s});const r="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(r,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};const t=t=>e(t.detail);return window.addEventListener(r,t),()=>window.removeEventListener(r,t)}function s(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}const u="openmrs:precache-static-dependencies";function a(e={}){window.dispatchEvent(new CustomEvent(u,{detail:e}))}function c(e){const t=t=>e(t.detail);return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}const l="openmrs:notification-shown",f="openmrs:actionable-notification-shown",p="openmrs:toast-shown",h="openmrs:snack-bar-shown";function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function m(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function _(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function g(e){const t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}function w(e){const t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}},922(e,t,n){"use strict";n.d(t,{MY:()=>u,lz:()=>a,vf:()=>s});var r=n(3594);const o=(0,n(2098).Zd)("breadcrumbs",[]);function i(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,r.MM)(e.matcher).regexp:(0,r.MM)(e.path).regexp}function s(e){return u([e])}function u(e){const t=[...a(),...e.map(e=>({matcher:i(e),settings:e}))];o.setState(t,!0)}function a(){return o.getState()}},69314(e,t,n){"use strict";n.d(t,{D:()=>i,q:()=>s});var r=n(922);function o(e,t){if(t)return function(e,t){const[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=o(e,n.join("/"));if(t)return t}}(e,t)}function i(e,t){if(e.length>0){const n=o(e,t);if(n){const t=[n];let r=o(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=o(e,r.settings.parent);return t.reverse()}}return[]}function s(e){return i((0,r.lz)(),e)}},54664(e,t,n){"use strict";n.d(t,{JK:()=>u,Wh:()=>s,g4:()=>c,tA:()=>a});var r=n(61287);const o="openmrs:history";function i(e){let t=JSON.parse(sessionStorage.getItem(o)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(o,JSON.stringify(t))}function s(){0===JSON.parse(sessionStorage.getItem(o)??"[]").length&&document.referrer&&i(document.referrer),window.addEventListener("single-spa:routing-event",e=>{const t=u();"replaceState"==e.detail.originalEvent?.singleSpaTrigger?(t[t.length-1]=window.location.href,sessionStorage.setItem(o,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?a({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&i(window.location.href)})}function u(){return JSON.parse(sessionStorage.getItem(o)??"[]")}function a({toUrl:e}){const t=u(),n=t.lastIndexOf(e);if(-1==n)throw new Error(`URL ${e} not found in history; cannot go back to it.`);{const e=t.slice(0,n+1);(0,r.o)({to:t[n]}),sessionStorage.setItem(o,JSON.stringify(e))}}function c(){sessionStorage.removeItem(o)}},24959(e,t,n){"use strict";n.d(t,{D_:()=>o.D,JG:()=>u.J,JK:()=>i.JK,MY:()=>r.MY,Wh:()=>i.Wh,g4:()=>i.g4,lz:()=>r.lz,oo:()=>s.o,qh:()=>o.q,tA:()=>i.tA,vf:()=>r.vf,zl:()=>u.z});var r=n(922),o=n(69314),i=n(54664),s=n(61287),u=n(66579)},66579(e,t,n){"use strict";function r(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return o(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function o(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}n.d(t,{J:()=>r,z:()=>o})},61287(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(5894),o=n(66579);function i({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),i=(0,o.J)(e,t).replace(window.location.origin,"");i.startsWith(n)?(0,r.navigateToUrl)(i):window.location.assign(i)}},81196(e,t,n){"use strict";n.d(t,{FE:()=>c,NU:()=>h,Td:()=>y,WA:()=>l,ff:()=>p,iD:()=>a,qb:()=>u,u1:()=>b,wn:()=>d,yD:()=>f});var r=n(93012),o=n(74061),i=n(92854);const s={};function u(){return Object.values(s)}function a(e){s[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),s[e.id]=e}async function c(e){const t=await v();return await l(t,e)}async function l(e,t){const n=t?{type:t,users:e}:{users:e},r=new i.i;return await r.dynamicOfflineData.where(n).toArray().catch(o.Ay.errnames.DatabaseClosed,()=>[])}async function f(e,t){const n=await v();return await p(n,e,t)}async function p(e,t,n){const r=new i.i,s=await r.dynamicOfflineData.get({type:t,identifier:n}).catch(o.Ay.errnames.DatabaseClosed,()=>{});s?s.users.includes(e)||await r.dynamicOfflineData.update(s.id,{users:[...s.users,e]}).catch(o.Ay.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(o.Ay.errnames.DatabaseClosed)}async function h(e,t){const n=await v();return await d(n,e,t)}async function d(e,t,n){const r=new i.i,s=await r.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(o.Ay.errnames.DatabaseClosed,()=>{});s&&(s.users.length>1?await r.dynamicOfflineData.update(s.id,{users:s.users.filter(t=>t!==e)}).catch(o.Ay.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(s.id).catch(o.Ay.errnames.DatabaseClosed))}async function y(e,t){const n=await c(e);await Promise.all(n.map(async e=>b(e.type,e.identifier,t)))}async function b(e,t,n){await f(e,t);const r=new i.i,s=await v(),a=await r.dynamicOfflineData.get({type:e,identifier:t}).catch(o.Ay.errnames.DatabaseClosed,()=>{}),c=u().filter(t=>t.type===e);if(!a)return;const l=await Promise.all(c.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(t){const n=t.message?.toString()??t.toString();return{id:e.id,error:n}}})),p=l.filter(e=>!e.error).map(e=>e.id),h=l.filter(e=>e.error).map(e=>e.id),d=l.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),y={syncedOn:new Date,syncedBy:s,succeededHandlers:p,erroredHandlers:h,errors:d};a.id&&await r.dynamicOfflineData.update(a.id,{syncState:y}).catch(o.Ay.errnames.DatabaseClosed)}async function v(){const e=(await(0,r.xC)()).uuid;if(!e)throw new Error("Using the dynamic offline data API requires a logged in user.");return e}},60884(e,t,n){"use strict";n.d(t,{AO:()=>u.AO,C$:()=>u.C$,FE:()=>l.FE,FO:()=>u.FO,Gj:()=>o.Gj,Gp:()=>u.Gp,Io:()=>u.Io,Iq:()=>u.Iq,JC:()=>o.JC,KG:()=>c.KG,LM:()=>u.LM,NU:()=>l.NU,Og:()=>s.Og,Rs:()=>r.R,Td:()=>l.Td,UH:()=>o.UH,WA:()=>l.WA,WK:()=>c.WK,Zr:()=>u.Zr,bO:()=>a.bO,cy:()=>u.cy,e:()=>f.e,ff:()=>l.ff,iD:()=>l.iD,jU:()=>a.jU,lY:()=>u.lY,ms:()=>i.m,nr:()=>s.nr,pb:()=>u.pb,qb:()=>l.qb,sA:()=>a.sA,sK:()=>c.sK,sZ:()=>r.s,u1:()=>l.u1,wJ:()=>s.wJ,wn:()=>l.wn,xN:()=>u.xN,xc:()=>u.xc,yD:()=>l.yD});var r=n(90684),o=n(46132),i=n(86991),s=n(24937),u=n(25297),a=n(33475),c=n(6744),l=n(81196),f=n(92854)},24937(e,t,n){"use strict";n.d(t,{Og:()=>s,nr:()=>u,wJ:()=>i});const r="openmrs3:offline-mode";let o="unavailable";function i(){return{current:o,notAvailable:"unavailable"===o,active:"on"===o}}function s(e){"unavailable"!==o&&"unavailable"!==e&&(localStorage.setItem(r,"on"===e?"active":"disabled"),o=e)}async function u(){await async function(){return await async function(){return new Promise(e=>{const t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}()||await async function(){return!window.indexedDB}()||await async function(){const e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}()}()||(o="active"===localStorage.getItem(r)?"on":"off"),navigator.onLine}},92854(e,t,n){"use strict";n.d(t,{e:()=>s,i:()=>i});var r=n(74061);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class i extends r.Ay{constructor(){super("EsmOffline"),o(this,"syncQueue",void 0),o(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function s(){return new i}},6744(e,t,n){"use strict";n.d(t,{KG:()=>u,WK:()=>s,sK:()=>a});var r=n(2098),o=n(81196);const i=(0,r.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function s(){return c(),i}function u(e,t){c(),(0,o.iD)({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??(new AbortController).signal})})}async function a(e){c(),await(0,o.u1)("patient",e)}function c(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}},46132(e,t,n){"use strict";n.d(t,{Gj:()=>o,JC:()=>i,UH:()=>r});const r="x-omrs-offline-response-body",o="x-omrs-offline-response-status",i="x-omrs-offline-caching-strategy"},86991(e,t,n){"use strict";n.d(t,{m:()=>o});var r=n(90684);async function o(e){const t=await(0,r.R)();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}},90684(e,t,n){"use strict";n.d(t,{R:()=>b,s:()=>y});try{self["workbox:window:6.6.0"]&&_()}catch(r){}function r(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])})}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 i(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 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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(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)}try{self["workbox:core:6.6.0"]&&_()}catch(r){}var s=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function u(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var a=function(e,t){this.type=e,Object.assign(this,t)};function c(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function l(){}var f={type:"SKIP_WAITING"};function p(e,t){if(!t)return e&&e.then?e.then(l):Promise.resolve()}var h=function(e){var t,n;function o(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new s,r.en=new s,r.on=new s,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!u(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,s={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(s.isUpdate=!0),r.dispatchEvent(new a(o,s)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new a("waiting",s))},200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new a("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return c(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new a("message",{data:t,originalEvent:e,ports:n,sw:o}))})},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,l=o.prototype;return l.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}(function(){if(!n&&"complete"!==document.readyState)return p(new Promise(function(e){return window.addEventListener("load",e)}))},function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),c(r.bn(),function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&u(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then(function(){r.dispatchEvent(new a("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn})})}catch(e){return Promise.reject(e)}},l.update=function(){try{return this.fn?p(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(e){try{return c(this.getSW(),function(t){return r(t,e)})}catch(e){return Promise.reject(e)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&r(this.fn.waiting,f)},l.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},l.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return c(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},(i=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(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)}}(o.prototype,i),o}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=i(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());let d;function y(e,t){if(void 0!==d)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),d;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");const n=new h(e,t);return d=n.register().then(()=>n.controlling.then(()=>n)),d}function b(){return d??Promise.resolve(void 0)}},25297(e,t,n){"use strict";n.d(t,{AO:()=>l,C$:()=>m,FO:()=>w,Gp:()=>_,Io:()=>y,Iq:()=>h,LM:()=>c,Zr:()=>d,cy:()=>S,lY:()=>E,pb:()=>v,xN:()=>g,xc:()=>b});var r=n(74061),o=n(93012),i=n(2098);const s=new(n(92854).i),u={},a=(0,i.Zd)("offline-synchronization",{});function c(){return a}async function l(){if(a.getState().synchronization)return;const e=await s.syncQueue.count(),t={},n=Object.entries(u),r=n.length,o={},i=new AbortController,c=()=>{const e=a.getState().synchronization;a.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{a.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<r&&n.length>0;e++)for(let e=n.length;e--;){const[r,s]=n[e],u=s.dependsOn.map(e=>t[e]);u.every(Boolean)&&(o[r]={},await Promise.all(u),t[r]=f(s,o,i,c),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{a.setState({synchronization:void 0})}}async function f({type:e,dependsOn:t,process:n},r,o,i){const u=[],a=[],c=await p();await s.syncQueue.where({type:e,userId:c}).each((e,t)=>{u.push([t.primaryKey,e.content,e.descriptor]),a.push(e.content)});for(let l=0;l<u.length;l++){const[f,p,{id:h,dependencies:d=[]}]=u[l];try{const i=await n(p,{abort:o,index:l,items:a,userId:c,dependencies:d.map(({id:e,type:n})=>t.includes(n)?r[n][e]:void 0)});void 0!==h&&(r[e][h]=i),await s.syncQueue.delete(f)}catch(e){await s.syncQueue.update(f,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function p(){const e=await(0,o.xC)();return e?.uuid||"*"}async function h(e,t,n,o){const i=o&&o.id;return void 0!==i&&await s.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===i).delete().catch(r.Ay.errnames.DatabaseClosed),await s.syncQueue.add({type:t,content:n,userId:e,descriptor:o||{},createdOn:new Date}).catch(r.Ay.errnames.DatabaseClosed,()=>-1)}async function d(e,t,n){const r=await p();return await h(r,e,t,n)}async function y(e,t){return(await b(e,t)).map(e=>e.content)}async function b(e,t){const n=t?{type:t,userId:e}:{userId:e};return await s.syncQueue.where(n).toArray().catch(r.Ay.errnames.DatabaseClosed,()=>[])}async function v(e){const t=await p();return await y(t,e)}async function m(e){const t=await p();return await b(t,e)}async function _(e){return await s.syncQueue.get(e).catch(r.Ay.errnames.DatabaseClosed,()=>{})}function g(e){return!!u[e]?.options.onBeginEditSyncItem}async function w(e){const t=await _(e);if(!t)throw new Error(`No sync item with the ID ${e} exists.`);const n=u[t.type]?.options.onBeginEditSyncItem;if(!n)throw new Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function E(e){await s.syncQueue.delete(e).catch(r.Ay.errnames.DatabaseClosed)}function S(e,t,n,r={}){u[e]={type:e,dependsOn:t,process:n,options:r}}},33475(e,t,n){"use strict";n.d(t,{bO:()=>s,jU:()=>o,sA:()=>i});var r=n(79371);const o="OFFLINE+";function i(){return o+(0,r.A)()}function s(e){return e.startsWith(o)}},82784(e,t,n){"use strict";n.d(t,{z:()=>r});const r=(0,n(34227).createContext)({moduleName:"",featureName:""})},66971(e,t,n){"use strict";n.d(t,{i:()=>i});var r=n(34227),o=n(24959);function i({to:e,templateParams:t,onBeforeNavigate:n,children:i,...s}){return(0,r.useEffect)(()=>{s.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${s.href}'`),s.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),r.createElement("a",{onClick:r=>function(e,t,n,r){0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),r?.(e),(0,o.oo)({to:t,templateParams:n})),0===e.button&&(e.ctrlKey||e.metaKey)&&r?.(e),0===e.button&&e.shiftKey&&r?.(e),1===e.button&&r?.(e)}(r,e,t,n),href:(0,o.JG)(e,t),...s},i)}},33949(e,t,n){"use strict";n.d(t,{Y:()=>s});var r=n(94040),o=n(34227),i=n(81632);const s=({state:e,children:t,...n})=>{const{extension:s}=(0,o.useContext)(i.zq),u=(0,o.useRef)(null),a=(0,o.useRef)(Promise.resolve()),c=(0,o.useCallback)(t=>{s?.extensionSlotName&&s.extensionSlotModuleName&&s.extensionSlotModuleName&&!u.current&&(0,r.wG)(t,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,e).then(e=>{u.current=e})},[]);return(0,o.useEffect)(()=>()=>{if(u&&u.current)switch(u.current.getStatus()){case"MOUNTING":u.current.mountPromise.then(()=>{"MOUNTED"===u.current?.getStatus()&&u.current.unmount()});break;case"MOUNTED":u.current.unmount();break;case"UPDATING":a.current&&a.current.then(()=>{"MOUNTED"===u.current?.getStatus()&&u.current.unmount()})}},[]),(0,o.useEffect)(()=>{u.current&&u.current.update&&"UNMOUNTING"!==u.current.getStatus()&&Promise.all([u.current.mountPromise,a.current]).then(()=>{"MOUNTED"===u?.current?.getStatus()&&u.current.update&&(a.current=u.current.update({...e}).catch(e=>{if(!(e instanceof Error&&e.message.includes("minified message #32")&&"MOUNTED"!==u.current?.getStatus()))throw e}))})},[e]),s?o.createElement("div",{ref:c,"data-extension-id":s?.extensionId,style:{position:"relative"},...n}):null}},29713(e,t,n){"use strict";n.d(t,{W:()=>a});var r=n(34227),o=n(82784),i=n(33949),s=n(15790);function u(e){return e}function a({name:e,extensionSlotName:t,select:n=u,children:a,state:c,style:l,...f}){if(a&&c)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");const p=e??t,h=(0,r.useRef)(null),{extensions:d,extensionSlotModuleName:y}=(0,s.b)(p,c),b=(0,r.useMemo)(()=>n(d),[n,d]),v=(0,r.useMemo)(()=>{if("function"==typeof a&&!r.isValidElement(a))return b.map(e=>a(e,c))},[a,b]);return r.createElement("div",{ref:h,"data-extension-slot-name":p,"data-extension-slot-module-name":y,style:{...l,position:"relative"},...f},p&&b?.map((e,t)=>r.createElement(o.z.Provider,{key:e.id,value:{moduleName:y,featureName:"",extension:{extensionId:e.id,extensionSlotName:p,extensionSlotModuleName:y}}},v?.[t]??("function"!=typeof a?a:null)??r.createElement(i.Y,{state:c}))))}},13397(e,t,n){"use strict";n.d(t,{p:()=>o});var r=n(40702);function o({namespace:e,value:t}){return(0,r.j)(e,t),null}},86492(e,t,n){"use strict";n.d(t,{f:()=>o});var r=n(34227);const o=({children:e,value:t,fallback:n})=>Boolean(t)?r.createElement(r.Fragment,null,e):n?r.createElement(r.Fragment,null,n):null},87291(e,t,n){"use strict";n.d(t,{q:()=>i});var r=n(93012),o=n(34227);const i=({privilege:e,fallback:t,children:n})=>{const[i,s]=(0,o.useState)(null);return(0,o.useEffect)(()=>{const e=(0,r.HW)({includeAuthStatus:!1}).subscribe(s);return()=>e.unsubscribe()},[]),i&&(0,r.st)(e,i)?o.createElement(o.Fragment,null,n):t?o.createElement(o.Fragment,null,t):null}},80346(e,t,n){"use strict";n.d(t,{JK:()=>u,g9:()=>c,ns:()=>a,sc:()=>l});var r=n(34227),o=n(63833),i=n(867),s=n(45104);function u(e,t){return(0,i.A)({React:r,ReactDOMClient:o,rootComponent:(0,s.F)(t)(e)})}function a(e,t){return()=>e().then(({default:e})=>u(e,t))}function c(e,t){return()=>Promise.resolve(u(e,t))}const l=a},81632(e,t,n){"use strict";n.d(t,{zq:()=>r.z,i_:()=>o.i,YY:()=>i.Y,W3:()=>s.W,p6:()=>c.p,fS:()=>l.f,qw:()=>Q.q,rr:()=>A.rr,sc:()=>u.sc,ns:()=>u.ns,mw:()=>k.m,JK:()=>u.JK,g9:()=>u.g9,xl:()=>T.x,F7:()=>a.F,Ie:()=>f.I,Us:()=>p.U,Tt:()=>h.T,CX:()=>d.C,_9:()=>y._,yJ:()=>b.y,UK:()=>v.U,zD:()=>m.z,Fx:()=>_.F,d7:()=>g.d,jn:()=>w.j,E4:()=>E.E,$B:()=>x,br:()=>O.b,Wq:()=>C.W,uL:()=>D.u,Gz:()=>j.G,u:()=>F.u,oq:()=>B.o,vL:()=>I.v,to:()=>k.t,CH:()=>P.C,qv:()=>T.q,if:()=>N.i,TA:()=>R.T,kH:()=>M.k,Wr:()=>U.W,Jm:()=>V.J,Bf:()=>L.B,iy:()=>$.i,Ed:()=>K.Ed,M3:()=>W.M,WQ:()=>z.W,WK:()=>q.W,tQ:()=>G.t,wJ:()=>Y.w,oU:()=>H.o,wV:()=>J.w,Pj:()=>A.Pj,mQ:()=>A.mQ,fq:()=>X.f,xH:()=>Z.x,wr:()=>ee.w});var r=n(82784),o=n(66971),i=n(33949),s=n(29713),u=n(80346),a=n(45104),c=n(13397),l=n(86492),f=n(68665),p=n(74769),h=n(91950),d=n(6705),y=n(60041),b=n(67233),v=n(8085),m=n(85950),_=n(34592),g=n(37892),w=n(40702),E=n(36173),S=n(94040),A=n(80406);const x=(0,A.rr)((0,S.a9)());var O=n(15790),C=n(91255),D=n(72945),j=n(12061),F=n(57515),P=n(98065),B=n(93997),I=n(18138),k=n(13102),T=n(16829),N=n(92685),R=n(53808),M=n(4511),U=n(67749),V=n(48754),L=n(72952),$=n(49399),K=n(83359),W=n(41079),z=n(28803),q=n(33927),G=n(7310),Y=n(84890),H=n(92225),J=n(99055),Q=n(87291),X=n(49692),Z=n(95812),ee=n(65515)},45104(e,t,n){"use strict";n.d(t,{F:()=>f});var r=n(34227),o=n(96455),i=n(71863),s=n(93012),u=n(82784);const a={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},c=new Map,l={errorRetryCount:3,fetcher:s.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof s.$f){const t=e.response.status;return t>=500||401===t||403===t||429===t}return!0},provider:()=>c};function f(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},a,e),n={...l,...t.swrConfig};return function(e){var s,a,c,l;return a=s=class extends r.Component{componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return r.createElement("div",null,"An error has occurred. Please try reloading the page.");{const s=r.createElement(r.Suspense,{fallback:null},r.createElement(i.BE,{value:n},r.createElement(u.z.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(o.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},r.createElement(e,this.props)))));return t.strictMode&&r.StrictMode?r.createElement(r.StrictMode,null,s):s}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},c="displayName",l=`OpenmrsReactComponent(${t.featureName})`,c in a?Object.defineProperty(a,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[c]=l,s}}},68665(e,t,n){"use strict";n.d(t,{A:()=>i,I:()=>o});var r=n(34227);function o(){const e=(0,r.useRef)();return e.current&&!e.current.signal.aborted||(e.current=new AbortController),(0,r.useEffect)(()=>{const t=e.current;return()=>t?.abort()},[]),e.current}const i=o},74769(e,t,n){"use strict";n.d(t,{U:()=>s});var r=n(34227),o=n(84571),i=n(74080);function s(e,t=e=>e??{}){const[n,s]=(0,r.useState)();return(0,r.useEffect)(()=>{if(null==e||""===e.replace(" ",""))throw new Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,r.useEffect)(()=>(0,o.R)(e,e=>{if(void 0!==e){const r=t?t(e):e??{};(0,i.b)(n,r)||s(r)}}),[]),n}},91950(e,t,n){"use strict";n.d(t,{T:()=>s});var r=n(34227),o=n(94040),i=n(39634);function s(e){const[t,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>(0,o.zF)().subscribe(r=>{const o=r.slots[e]?.assignedExtensions.map(e=>e.id)??[];(0,i.A)(o,t)||n(o)}),[]),t}},6705(e,t,n){"use strict";n.d(t,{C:()=>o});var r=n(72945);function o(e){const t=(0,r.u)(e);return t?.assignedExtensions??[]}},60041(e,t,n){"use strict";n.d(t,{_:()=>u});var r=n(34227),o=n(71863),i=n(93012),s=n(28934);function u(e,t){const{data:n,error:u,mutate:a,isLoading:c,isValidating:l}=(0,o.Ay)(`${s.Zu}?patient=${e}&includeEncounterless=${t}`,i.lo);return(0,r.useMemo)(()=>({isLoading:c,data:n?.data.results??[],error:u,mutate:a,isValidating:l}),[n,u,c,l,a])}},67233(e,t,n){"use strict";n.d(t,{y:()=>o});var r=n(34227);function o(e){(0,r.useEffect)(()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}},8085(e,t,n){"use strict";n.d(t,{U:()=>c});var r=n(34227),o=n(39634),i=n(3603),s=n(82784);const u={};function a(e){const t=(0,r.useMemo)(i.GI,[]),n=function(e,t){const[n,s]=(0,r.useState)(function(e,t){return t?()=>{const n=e.getState(),r=(0,i.P0)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t));return(0,r.useEffect)(()=>{if(t)return e.subscribe(e=>{const r=(0,i.P0)(e,t.extensionSlotName,t.extensionId);r.loaded&&r.config&&!(0,o.A)(r.config,n)&&s(r.config)})},[e,t,n]),n}(t,e);if(!n&&e){const n=`${e.extensionSlotName}-${e.extensionId}`;throw!u[n]&&t&&(u[n]=function(e,t){return new Promise(n=>{const r=e.subscribe(e=>{const o=(0,i.P0)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())})})}(t,e)),u[n]}return n||{}}function c(e){const{moduleName:t,extension:n}=(0,r.useContext)(s.z),o=e?.externalModuleName??t;if(!o&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');const c=function(e){const t=(0,r.useMemo)(()=>(0,i.IS)(e),[e]),n=e,o=function(e){const[t,n]=(0,r.useState)(function(e){return()=>{const t=e.getState();return t.loaded&&t.config?t.config:null}}(e));return(0,r.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!o)throw u[n]||(u[n]=function(e){return new Promise(t=>{const n=e.subscribe(e=>{e.loaded&&e.config&&(t(e.config),n())})})}(t)),u[n];return o}(o),l=a(n);return(0,r.useMemo)(()=>e?.externalModuleName&&o===e.externalModuleName?{...c}:{...c,...l},[o,e?.externalModuleName,c,l])}},85950(e,t,n){"use strict";n.d(t,{z:()=>r});const r=n(6705).C},34592(e,t,n){"use strict";n.d(t,{F:()=>s});var r=n(30252),o=n(88678),i=n(34227);function s(){let[e,t]=(0,i.useState)((0,o.s)());return(0,i.useEffect)(()=>(0,r.gj)(({online:e})=>t(e)),[]),e}},37892(e,t,n){"use strict";n.d(t,{d:()=>o});var r=n(34227);function o(e,t=300){const[n,o]=(0,r.useState)(e);return(0,r.useEffect)(()=>{const n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}},40702(e,t,n){"use strict";n.d(t,{j:()=>s});var r=n(34227),o=n(84571),i=n(74080);function s(e,t){const n=(0,r.useRef)(t??{}),s=(0,r.useRef)(t=>(0,o.r_)(e,t));return(0,r.useEffect)(()=>((0,o.ji)(e,t??{}),()=>{(0,o.II)(e)}),[e]),(0,r.useEffect)(()=>{let r=t??{};(0,i.b)(n.current,r)||((0,o.r_)(e,()=>r),n.current=r)},[t]),s.current}},36173(e,t,n){"use strict";n.d(t,{E:()=>u});var r=n(34227),o=n(78608),i=n(93012);const s=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function u(){const e=`${i.Jj}/emrapi/configuration?v=${s}`,t=(0,o.A)(e,i.lo);return(0,r.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}},15790(e,t,n){"use strict";n.d(t,{b:()=>u});var r=n(34227),o=n(94040),i=n(82784),s=n(6705);function u(e,t){const{moduleName:n}=(0,r.useContext)(i.z),u=(0,r.useRef)(!0);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)(()=>{(0,o.FY)(n,e,t),u.current=!1},[]),(0,r.useEffect)(()=>{u.current||(0,o.ap)(e,t)},[e,t]),{extensions:(0,s.C)(e),extensionSlotName:e,extensionSlotModuleName:n}}},91255(e,t,n){"use strict";n.d(t,{W:()=>i});var r=n(34227),o=n(6705);function i(e){const t=(0,o.C)(e);return(0,r.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}},72945(e,t,n){"use strict";n.d(t,{u:()=>i});var r=n(94040),o=n(80406);const i=e=>(0,o.Pj)((0,r.zF)(),t=>t.slots?.[e])},12061(e,t,n){"use strict";n.d(t,{G:()=>o});var r=n(94040);const o=(0,n(80406).rr)((0,r.zF)())},57515(e,t,n){"use strict";n.d(t,{u:()=>i});var r=n(80406),o=n(48088);function i(e){const{flags:t}=(0,r.Pj)(o.jX);return t[e]?.enabled??!1}},93997(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(13102),o=n(72952);function i(e,t={}){return(0,o.S)(e,(0,r.m)(),t)}},18138(e,t,n){"use strict";n.d(t,{v:()=>i});var r=n(13102),o=n(49399);function i(e,t={}){return(0,o.V)(e,(0,r.m)(),t)}},13102(e,t,n){"use strict";n.d(t,{m:()=>s,t:()=>i});var r=n(93012),o=n(83359);function i(e,t,n={}){return(0,o.px)(e,t,s(),n)}function s(){return{getPaginatedUrl:(e,t,n)=>{if(e){const o=new URL((0,r.Gm)(e.toString()),window.location.toString());return o.searchParams.set("_count",""+t),o.searchParams.set("_getpagesoffset",""+n),o.toString()}return null},getNextUrl:e=>{const t=e?.link?.find(e=>"next"==e.relation)?.url;if(t){const e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}return null},getTotalCount:e=>e?.total??Number.NaN,getCurrentPageSize:e=>e?.entry?.length??Number.NaN,getData:e=>e?.entry?.map(e=>e.resource)}}},98065(e,t,n){"use strict";n.d(t,{C:()=>o});var r=n(34227);function o(){const[,e]=(0,r.useState)(0);return(0,r.useCallback)(()=>{e(e=>e+1)},[])}},16829(e,t,n){"use strict";n.d(t,{q:()=>i,x:()=>s});var r=n(34227);function o(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function i(){const[e,t]=(0,r.useState)(o);return(0,r.useEffect)(()=>{const e=()=>{t(o())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}const s=e=>"small-desktop"===e||"large-desktop"===e},92685(e,t,n){"use strict";n.d(t,{i:()=>s});var r=n(34227),o=n(94040),i=n(82784);function s(e){const t=(0,r.useContext)(i.z);(0,r.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),(0,o.Vx)(e),()=>{(0,o.sr)(e.name)}),[t,e])}},53808(e,t,n){"use strict";n.d(t,{T:()=>i});var r=n(94040),o=n(80406);function i(){return(0,o.Pj)(r.Gp)}},4511(e,t,n){"use strict";n.d(t,{k:()=>i});var r=n(34227),o=n(28934);function i(e=null,t=null){const[n,i]=(0,r.useState)([]);return(0,r.useEffect)(()=>{const n=(0,o.Vs)(e,t).subscribe(e=>{i(e)},e=>{console.error(e)});return()=>n.unsubscribe()},[e,t]),n}},67749(e,t,n){"use strict";n.d(t,{W:()=>o});var r=n(34227);function o(e,t=!0){const n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{const r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}},48754(e,t,n){"use strict";n.d(t,{J:()=>o});var r=n(34227);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{const n=new IntersectionObserver(t=>{for(const n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}},72952(e,t,n){"use strict";n.d(t,{B:()=>s,S:()=>u});var r=n(34227),o=n(49399),i=n(83359);function s(e,t={}){return u(e,i.xy,t)}function u(e,t,n={}){const i=(0,o.V)(e,t,n),{hasMore:s,error:u,data:a,loadMore:c,isLoading:l,nextUri:f}=i;return(0,r.useEffect)(()=>{s&&!u&&c()},[s,f]),n.partialData?i:{...i,data:s||u?void 0:a,isLoading:l||s}}},49399(e,t,n){"use strict";n.d(t,{V:()=>a,i:()=>u});var r=n(93012),o=n(34227),i=n(40114),s=n(83359);function u(e,t={}){return a(e,s.xy,t)}function a(e,t,n={}){const{swrInfiniteConfig:s,immutable:u}=n,{getNextUrl:a,getTotalCount:c,getData:l}=t,f=n.fetcher??r.lo,p=(0,o.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:h,size:d,setSize:y,...b}=(0,i.Ay)(p,f,{...s,...u?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),v=a(h?.[h.length-1].data),m=null!=v,_=c(h?.[0]?.data);return{data:h?.flatMap(e=>l(e.data)),totalCount:_,hasMore:m,loadMore:()=>{y((h?.length??0)+1)},nextUri:v,...b}}},83359(e,t,n){"use strict";n.d(t,{Ed:()=>u,px:()=>c,xy:()=>a});var r=n(93012),o=n(34227),i=n(71863),s=n(78608);function u(e,t,n={}){return c(e,t,a,n)}const a={getPaginatedUrl:(e,t,n)=>{if(e){const o=new URL((0,r.Gm)(e.toString()),window.location.toString());return o.searchParams.set("limit",""+t),o.searchParams.set("startIndex",""+n),o.searchParams.set("totalCount","true"),o.toString()}return null},getNextUrl:e=>{const t=e?.links?.find(e=>"next"==e.rel)?.uri;if(t){const e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}return null},getTotalCount:e=>e?.totalCount??Number.NaN,getCurrentPageSize:e=>e?.results?.length??Number.NaN,getData:e=>e?.results};function c(e,t,n,u={}){const{getPaginatedUrl:a,getTotalCount:c,getCurrentPageSize:l,getData:f}=n,{immutable:p,swrConfig:h}=u,d=u.fetcher??r.lo,[y,b]=(0,o.useState)(1),v=(0,o.useRef)(Number.NaN),m=(0,o.useRef)(Number.NaN),_=t,g=(y-1)*t,w=(0,o.useMemo)(()=>a(e,_,g),[e,_,g]),E=p?s.A:i.Ay,{data:S,...A}=E(w,d,h);S?.data&&(v.current=c(S?.data),m.current=l(S?.data));const x=Math.ceil(v.current/t),O=(0,o.useCallback)(e=>{0<e&&e<=x?b(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,y,x]),C=(0,o.useCallback)(()=>{O(y+1)},[e,y,x]),D=(0,o.useCallback)(()=>{O(y-1)},[e,y,x]);return{data:f(S?.data),totalPages:x,totalCount:v.current,currentPage:y,currentPageSize:m,paginated:x>1,showNextButton:y<x,showPreviousButton:y>1,goTo:O,goToNext:C,goToPrevious:D,...A}}},41079(e,t,n){"use strict";n.d(t,{M:()=>u});var r=n(34227),o=n(71863),i=n(93012),s=n(68665);function u(e,t={}){const{abortController:n,fetchInit:u,url:a,swrConfig:c}=t,l=(0,s.A)(),f=(0,r.useMemo)(()=>u?.signal??n?.signal??l.signal,[n?.signal,u?.signal,l.signal]),p=(0,r.useCallback)(e=>{const t=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw new Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,a);return(0,i.lo)(t,{...u,signal:f})},[f,u,a]);return(0,o.Ay)(e,p,c)}},28803(e,t,n){"use strict";n.d(t,{W:()=>o});var r=n(34227);function o(e=[],t=10){const[n,o]=(0,r.useState)(1),i=(0,r.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]),s=(0,r.useMemo)(()=>{const r=(n-1)*t,o=(n+0)*t;return e.slice(r,o)},[e,n,t]),u=(0,r.useCallback)(e=>{o(Math.max(1,Math.min(i,e)))},[o,i]),a=(0,r.useCallback)(()=>{n<i&&o(n+1)},[n,i,o]),c=(0,r.useCallback)(()=>{n>1&&o(n-1)},[n,o]);return(0,r.useMemo)(()=>({results:s,totalPages:i,currentPage:n,paginated:e.length>t,showNextButton:n<i,showPreviousButton:n>1,goTo:u,goToNext:a,goToPrevious:c}),[s,i,e.length,t,n,u,a,c])}},33927(e,t,n){"use strict";n.d(t,{W:()=>o});var r=n(34227);function o(e,t,n,o){return{pageSizes:(0,r.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,r.useMemo)(()=>{let r=0;return r=e>t?t:e*n>t?e*(n-1)+o:e*n,r},[e,t,n,o])}}},7310(e,t,n){"use strict";n.d(t,{t:()=>u});var r=n(34227),o=n(71863),i=n(28934);function s(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function u(e){const[t,n]=(0,r.useState)(e??s()),{data:u,error:a,isValidating:c}=(0,o.Ay)(t?["patient",t]:null,()=>(0,i.hG)(t,{}));return(0,r.useEffect)(()=>{const e=()=>{const e=s();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,r.useMemo)(()=>({isLoading:c&&!a&&!u,patient:u,patientUuid:t,error:a}),[c,a,u,t])}},84890(e,t,n){"use strict";n.d(t,{w:()=>s});var r=n(34227),o=n(71863),i=n(93012);function s(){const e=`${i.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:s}=(0,o.Ay)(e,i.lo);return(0,r.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:s,error:n}),[t,n,s])}},92225(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(34227),o=n(81632);function i(e){const{extensions:t,extensionSlotModuleName:n}=(0,o.br)(e);return e?t.map(t=>({state:i})=>r.createElement(o.zq.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n}}},r.createElement(o.YY,{state:i}))):[]}},99055(e,t,n){"use strict";n.d(t,{w:()=>s});var r=n(93012),o=n(34227);let i;function s(){const e=(0,o.useRef)(),[t,n]=(0,o.useState)(null);let s=null;if(!t){if(i){const e=(0,r.EW)().getState();e.loaded&&(s=e.session)}else i=new Promise(t=>{const n=({loaded:n,session:r})=>{n&&(t(r),s=r,e.current&&(e.current(),e.current=void 0))};n((0,r.EW)().getState()),s||(e.current=(0,r.EW)().subscribe(n))});if(!s)throw i;n(s)}(0,o.useEffect)(()=>(e.current||(e.current=(0,r.EW)().subscribe(({loaded:e,session:t})=>{e&&(s=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);const u=t||s;if(!u)throw i?(console.warn("useSession is in an unexpected state. Attempting to recover."),i):Error("useSession is in an invalid state.");return u}},80406(e,t,n){"use strict";n.d(t,{Pj:()=>i,mQ:()=>s,rr:()=>u});var r=n(34227);function o(e,t){"function"==typeof t&&(t=t(e));const n={};for(const[r,o]of Object.entries(t)){const t=function(...t){e.setState(e=>o(e,...t))};n[r]=t}return n}function i(e,t=e=>e,n){const i=(0,r.useCallback)(t=>e.subscribe(t),[e]),s=(0,r.useCallback)(()=>t(e.getState()),[e,t]);return{...(0,r.useSyncExternalStore)(i,s,s),...(0,r.useMemo)(()=>n?o(e,n):{},[e,n])}}function s(e,t){return i(e,e=>e,t)}function u(e){return function(t){const n=(0,r.useCallback)(t=>e.subscribe(t),[]),i=(0,r.useCallback)(()=>e.getState(),[]);return{...(0,r.useSyncExternalStore)(n,i,i),...(0,r.useMemo)(()=>t?o(e,t):{},[t])}}}},49692(e,t,n){"use strict";n.d(t,{f:()=>l});var r=n(34227),o=n(71863),i=n(91343),s=n(2202),u=n(93012),a=n(28934),c=n(95812);function l(e,t=a.Rb){const{patientUuid:n,manuallySetVisitUuid:i,setVisitContext:s}=(0,c.x)(),l=e&&n==e?i:null,f=`?patient=${e}&v=${t}&includeInactive=false`,p=`/${l}?v=${t}`,{data:h,error:d,mutate:y,isValidating:b}=(0,o.Ay)(e?`${u.Jj}/visit${f}`:null,u.lo),{data:v,error:m,mutate:_,isValidating:g}=(0,o.Ay)(e&&l?`${u.Jj}/visit${p}`:null,u.lo),w=(0,r.useMemo)(()=>h?.data.results.find(e=>null===e.stopDatetime)??null,[h]),E=(0,r.useMemo)(()=>l&&v?v.data:null,[v,l]),S=(0,r.useRef)(null);(0,r.useEffect)(()=>{!b&&w&&n===e&&null===i&&s(w),g||(S.current&&E&&S.current.uuid===E.uuid&&!S.current.stopDatetime&&E.stopDatetime&&s(null),S.current=E)},[E,i,w,b,g,n]);const A=(0,r.useCallback)(()=>{y(),_()},[y,_]);(0,c.x)(A);const x=Boolean(!h||l&&!v),O=Boolean(l?m:d),C=x&&!O;return{error:d||m,mutate:A,isValidating:b||g,activeVisit:w,currentVisit:E,currentVisitIsRetrospective:Boolean(l),isLoading:C}}i.extend(s)},95812(e,t,n){"use strict";n.d(t,{x:()=>u});var r=n(34227),o=n(28934),i=n(80406);const s={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid},mutateVisit(e){for(const t of Object.values(e.mutateVisitCallbacks??{}))t();return{}}};function u(e){const t=(0,r.useId)();return(0,r.useEffect)(()=>{const n=(0,o.BX)();return e&&n.setState({mutateVisitCallbacks:{...n.getState().mutateVisitCallbacks,[t]:e}}),()=>{if(e){const e={...n.getState().mutateVisitCallbacks};delete e[t],n.setState({mutateVisitCallbacks:e})}}},[t,e]),(0,i.mQ)((0,o.BX)(),s)}},65515(e,t,n){"use strict";n.d(t,{w:()=>i});var r=n(28934),o=n(34227);function i(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)(()=>{const e=(0,r.Pu)().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}},2098(e,t,n){"use strict";n.d(t,{CE:()=>r.CE,Zd:()=>r.Zd,i7:()=>r.i7,jf:()=>r.jf});var r=n(41388)},41388(e,t,n){"use strict";n.d(t,{Zd:()=>u,jf:()=>c,CE:()=>a,i7:()=>l});var r=n(74080),o=n(99848);function i(){try{return"undefined"!=typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"undefined"!=typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}const s={};function u(e,t){const n=s[e];if(n)return n.active?i()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{const n=(0,o.y)()(()=>t);return s[e]={value:n,active:!0},n}}function a(e,t){const n=s[e];return n?(n.active?i()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(s[e]={value:t,active:!0},t)}function c(e,t){const n=s[e];if(!n){const n=(0,o.y)()(()=>t??{});return s[e]={value:n,active:!1},n}return n.value}function l(...e){const[t,n,o]=e,i=void 0===o?n:o,s=void 0===o?e=>e:n;let u=s(t.getState());return i(u),t.subscribe(e=>{const t=s(e);(0,r.b)(u,t)||(u=t,i(t))})}globalThis.setTimeout?.(()=>{"undefined"!=typeof window&&"development"===window.spaEnv&&(window.stores=s)},1e3)},98892(e,t,n){"use strict";n.d(t,{V:()=>u,t:()=>s});const r={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",closeWorkspaces2PromptTitle:"Close workspace(s)",closeWorkspaces2PromptBody:"You are about to close the following workspace(s), which might have unsaved changes:",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Closes actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",male:"Male",noResultsToDisplay:"No results to display",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var o=n(63621);const i=o.default.default||o.default;function s(e,t,n,r){return i.t(t,{ns:e,defaultValue:n,...r})}function u(e,t,n){return r[e]?s("core",e,t??r[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}i.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},88678(e,t,n){"use strict";function r(e){return!window.offlineEnabled||(e??navigator.onLine)}n.d(t,{s:()=>r})},74080(e,t,n){"use strict";function r(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>r})},55520(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 o(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)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}n.d(t,{A:()=>f});var u=function(){function e(){o(this,e)}return s(e,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}]),e}(),a=function(){function e(t){o(this,e),this.jsep=t,this.registered={}}return s(e,[{key:"register",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){if("object"!=(void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");var n;e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}]),e}(),c=function(){function e(t){o(this,e),this.expr=t,this.index=0}return s(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find(function(e){return e.call(n.context,n),n.node}),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,s,u,a,c;if(!(s=this.gobbleToken()))return s;if(!(n=this.gobbleBinaryOp()))return s;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=[s,i,u];n=this.gobbleBinaryOp();){if(0===(r=e.binaryPrecedence(n))){this.index-=n.length;break}i={value:n,prec:r,right_a:e.right_associative.has(n)},c=n;for(var l=function(e){return i.right_a&&e.right_a?r>e.prec:r<=e.prec};o.length>2&&l(o[o.length-2]);)u=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:u},o.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+c),o.push(i,t)}for(t=o[a=o.length-1];a>1;)t={type:e.BINARY_EXP,operator:o[a-1].value,left:o[a-2],right:t},a-=2;return t}},{key:"gobbleToken",value:function(){var t,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"))return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(r=(n=this.expr.substr(this.index,e.max_unop_len)).length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:i,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,n,r="";e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(r+=this.expr.charAt(this.index++),"+"!==(t=this.char)&&"-"!==t||(r+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return n=this.code,e.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(n===e.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(r),raw:r}}},{key:"gobbleStringLiteral",value:function(){for(var t="",n=this.index,r=this.expr.charAt(this.index++),o=!1;this.index<this.expr.length;){var i=this.expr.charAt(this.index++);if(i===r){o=!0;break}if("\\"===i)switch(i=this.expr.charAt(this.index++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=i}else t+=i}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:"gobbleArguments",value:function(t){for(var n=[],r=!1,o=0;this.index<this.expr.length;){this.gobbleSpaces();var i=this.code;if(i===t){r=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===e.COMMA_CODE){if(this.index++,++o!==n.length)if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var s=n.length;s<o;s++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{var u=this.gobbleExpression();u&&u.type!==e.COMPOUND||this.throwError("Expected comma"),n.push(u)}}return r||this.throwError("Expected "+String.fromCharCode(t)),n}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.4.0"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,n){return e.literals[t]=n,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t,n;return(t=Math).max.apply(t,[0].concat(function(e){if(Array.isArray(e))return r(e)}(n=Object.keys(e).map(function(e){return e.length}))||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 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}}(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.")}()))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}(),l=new u;Object.assign(c,{hooks:l,plugins:new a(c),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),c.max_unop_len=c.getMaxKeyLen(c.unary_ops),c.max_binop_len=c.getMaxKeyLen(c.binary_ops);var f=function(e){return new c(e).parse()},p=Object.getOwnPropertyNames(function e(){o(this,e)});Object.getOwnPropertyNames(c).filter(function(e){return!p.includes(e)&&void 0===f[e]}).forEach(function(e){f[e]=c[e]}),f.Jsep=c;f.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}})}})},76170(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},96160(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(76170),o=n(78834);const i=function(e,t,n){var i=t(e);return(0,o.A)(e)?i:(0,r.A)(i,n(e))}},4826(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(28070);const o=(0,n(60370).A)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,r.A)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},40829(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(96160),o=n(2234),i=n(77175);const s=function(e){return(0,r.A)(e,i.A,o.A)}},2234(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(75030),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const s=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(i(e),function(t){return o.call(e,t)}))}:r.A},78435(e,t,n){"use strict";n.d(t,{A:()=>S});var r=n(37966),o=n(37626);const i=(0,r.A)(o.A,"DataView");var s=n(73374);const u=(0,r.A)(o.A,"Promise"),a=(0,r.A)(o.A,"Set"),c=(0,r.A)(o.A,"WeakMap");var l=n(58129),f=n(42926),p="[object Map]",h="[object Promise]",d="[object Set]",y="[object WeakMap]",b="[object DataView]",v=(0,f.A)(i),m=(0,f.A)(s.A),_=(0,f.A)(u),g=(0,f.A)(a),w=(0,f.A)(c),E=l.A;(i&&E(new i(new ArrayBuffer(1)))!=b||s.A&&E(new s.A)!=p||u&&E(u.resolve())!=h||a&&E(new a)!=d||c&&E(new c)!=y)&&(E=function(e){var t=(0,l.A)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.A)(n):"";if(r)switch(r){case v:return b;case m:return p;case _:return h;case g:return d;case w:return y}return t});const S=E},39634(e,t,n){"use strict";n.d(t,{A:()=>F});var r=n(28713),o=n(90310);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o.A;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},i.prototype.has=function(e){return this.__data__.has(e)};const s=i,u=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},a=function(e,t,n,r,o,i){var a=1&n,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var h=-1,d=!0,y=2&n?new s:void 0;for(i.set(e,t),i.set(t,e);++h<c;){var b=e[h],v=t[h];if(r)var m=a?r(v,b,h,t,e,i):r(b,v,h,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(y){if(!u(t,function(e,t){if(s=t,!y.has(s)&&(b===e||o(b,e,n,r,i)))return y.push(t);var s})){d=!1;break}}else if(b!==v&&!o(b,v,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d};var c=n(64894),l=n(70515),f=n(82329);const p=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},h=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var d=c.A?c.A.prototype:void 0,y=d?d.valueOf:void 0;var b=n(40829);function v(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var m=Object.prototype.hasOwnProperty;var _=n(78435),g=n(78834),w=n(45637),E=n(37662),S="[object Arguments]",A="[object Array]",x="[object Object]",O=Object.prototype.hasOwnProperty;const C=function(e,t,n,o,i,s){var u=(0,g.A)(e),c=(0,g.A)(t),d=u?A:(0,_.A)(e),C=c?A:(0,_.A)(t),D=(d=d==S?x:d)==x,j=(C=C==S?x:C)==x,F=d==C;if(F&&(0,w.A)(e)){if(!(0,w.A)(t))return!1;u=!0,D=!1}if(F&&!D)return s||(s=new r.A),u||(0,E.A)(e)?a(e,t,n,o,i,s):function(e,t,n,r,o,i,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||!i(new l.A(e),new l.A(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.A)(+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 u=p;case"[object Set]":var c=1&r;if(u||(u=h),e.size!=t.size&&!c)return!1;var d=s.get(e);if(d)return d==t;r|=2,s.set(e,t);var b=a(u(e),u(t),r,o,i,s);return s.delete(e),b;case"[object Symbol]":if(y)return y.call(e)==y.call(t)}return!1}(e,t,d,n,o,i,s);if(!(1&n)){var P=D&&O.call(e,"__wrapped__"),B=j&&O.call(t,"__wrapped__");if(P||B){var I=P?e.value():e,k=B?t.value():t;return s||(s=new r.A),i(I,k,n,o,s)}}return!!F&&(s||(s=new r.A),function(e,t,n,r,o,i){var s=1&n,u=(0,b.A)(e),a=u.length;if(a!=(0,b.A)(t).length&&!s)return!1;for(var c=a;c--;){var l=u[c];if(!(s?l in t:m.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);for(var d=s;++c<a;){var y=e[l=u[c]],_=t[l];if(r)var g=s?r(_,y,l,t,e,i):r(y,_,l,e,t,i);if(!(void 0===g?y===_||o(y,_,n,r,i):g)){h=!1;break}d||(d="constructor"==l)}if(h&&!d){var w=e.constructor,E=t.constructor;w==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&v(w,w)&&"function"==typeof E&&v(E,E)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,o,i,s))};var D=n(63951);const j=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,D.A)(t)&&!(0,D.A)(n)?t!=t&&n!=n:C(t,n,r,o,e,i))},F=function(e,t){return j(e,t)}},77175(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(12922),o=n(4826),i=n(41837);const s=function(e){return(0,i.A)(e)?(0,r.A)(e):(0,o.A)(e)}},75030(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(){return[]}},867(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return(s="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":r(e)})(e)}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":r(e)})(e)}function c(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(a(n)));return function(){var e,r,o=n(t);if(e=o,!(null!=(r=HTMLElement)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](e):e instanceof r))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(a(o)));return o}}n.d(t,{A:()=>p,i:()=>l});var l=null;try{l=require("react").createContext()}catch(o){}var f={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function p(e){if("object"!==s(e))throw new Error("single-spa-react requires a configuration object");var t,n=i(i({},f),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!l&&n.React.createContext&&(l=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:h.bind(null,n),mount:d.bind(null,n),unmount:y.bind(null,n)};return n.parcelCanUpdate&&(r.update=b.bind(null,n)),r}function h(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function d(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=_(e,t,function(){n(this)}),i=c(e,t)(),s=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:v(e),renderType:m(e)});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function y(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():v(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function b(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=_(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=c(e,t)();v(e).render(r,i)}})}function v(e){return e.ReactDOMClient||e.ReactDOM}function m(e){return"function"==typeof e.renderType?e.renderType():e.renderType}function _(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=l?e.React.createElement(l.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,i(i({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}},71863(e,t,n){"use strict";n.d(t,{Ay:()=>c,BE:()=>a});var r=n(34227),o=n(74627),i=n(77308);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),u={dedupe:!0},a=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),c=(0,i.withArgs)((e,t,n)=>{const{cache:a,compare:c,suspense:l,fallbackData:f,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:d,refreshWhenHidden:y,refreshWhenOffline:b,keepPreviousData:v}=n,[m,_,g,w]=i.SWRGlobalState.get(a),[E,S]=(0,i.serialize)(e),A=(0,r.useRef)(!1),x=(0,r.useRef)(!1),O=(0,r.useRef)(E),C=(0,r.useRef)(t),D=(0,r.useRef)(n),j=()=>D.current,F=()=>j().isVisible()&&j().isOnline(),[P,B,I,k]=(0,i.createCacheHelper)(a,E),T=(0,r.useRef)({}).current,N=(0,i.isUndefined)(f)?n.fallback[E]:f,R=(e,t)=>{for(const n in T){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!c(q,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},M=(0,r.useMemo)(()=>{const e=!!E&&!!t&&((0,i.isUndefined)(p)?!j().isPaused()&&!l&&(!!(0,i.isUndefined)(h)||h):p),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=P(),o=k(),s=n(r),u=r===o?s:n(o);let a=s;return[()=>{const e=n(P());return R(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>u]},[a,E]),U=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>I(E,(t,n)=>{R(n,t)||e()}),[a,E]),M[0],M[1]),V=!A.current,L=m[E]&&m[E].length>0,$=U.data,K=(0,i.isUndefined)($)?N:$,W=U.error,z=(0,r.useRef)(K),q=v?(0,i.isUndefined)($)?z.current:$:K,G=!(L&&!(0,i.isUndefined)(W))&&(V&&!(0,i.isUndefined)(p)?p:!j().isPaused()&&(l?!(0,i.isUndefined)(K)&&h:(0,i.isUndefined)(K)||h)),Y=!!(E&&t&&V&&G),H=(0,i.isUndefined)(U.isValidating)?Y:U.isValidating,J=(0,i.isUndefined)(U.isLoading)?Y:U.isLoading,Q=(0,r.useCallback)(async e=>{const t=C.current;if(!E||!t||x.current||j().isPaused())return!1;let r,o,s=!0;const u=e||{},a=!g[E]||!u.dedupe,l=()=>i.IS_REACT_LEGACY?!x.current&&E===O.current&&A.current:E===O.current,f={isValidating:!1,isLoading:!1},p=()=>{B(f)},h=()=>{const e=g[E];e&&e[1]===o&&delete g[E]},d={isValidating:!0};(0,i.isUndefined)(P().data)&&(d.isLoading=!0);try{if(a&&(B(d),n.loadingTimeout&&(0,i.isUndefined)(P().data)&&setTimeout(()=>{s&&l()&&j().onLoadingSlow(E,n)},n.loadingTimeout),g[E]=[t(S),(0,i.getTimestamp)()]),[r,o]=g[E],r=await r,a&&setTimeout(h,n.dedupingInterval),!g[E]||g[E][1]!==o)return a&&l()&&j().onDiscarded(E),!1;f.error=i.UNDEFINED;const e=_[E];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return p(),a&&l()&&j().onDiscarded(E),!1;const u=P().data;f.data=c(u,r)?u:r,a&&l()&&j().onSuccess(r,E,n)}catch(e){h();const t=j(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,a&&l()&&(t.onError(e,E,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(j().revalidateOnFocus&&j().revalidateOnReconnect&&!F()||t.onErrorRetry(e,E,t,e=>{const t=m[E];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return s=!1,p(),!0},[E,a]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(a,O.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{C.current=t,D.current=n,(0,i.isUndefined)($)||(z.current=$)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!E)return;const e=Q.bind(i.UNDEFINED,u);let t=0;const n=(0,i.subscribeCallback)(E,m,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();j().revalidateOnFocus&&n>t&&F()&&(t=n+j().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)j().revalidateOnReconnect&&F()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Q();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return x.current=!1,O.current=E,A.current=!0,B({_k:S}),G&&((0,i.isUndefined)(K)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{x.current=!0,n()}},[E]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(d)?d(P().data):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!y&&!j().isVisible()||!b&&!j().isOnline()?t():Q(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[d,y,b,E]),(0,r.useDebugValue)(q),l&&(0,i.isUndefined)(K)&&E){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,D.current=n,x.current=!1;const e=w[E];if(!(0,i.isUndefined)(e)){const t=X(e);s(t)}if(!(0,i.isUndefined)(W))throw W;{const e=Q(u);(0,i.isUndefined)(q)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:X,get data(){return T.data=!0,q},get error(){return T.error=!0,W},get isValidating(){return T.isValidating=!0,H},get isLoading(){return T.isLoading=!0,J}}})},78608(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(34227),o=n(74627),i=n(77308);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),u={dedupe:!0};i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig});const a=(0,i.withArgs)((e,t,n)=>{const{cache:a,compare:c,suspense:l,fallbackData:f,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:d,refreshWhenHidden:y,refreshWhenOffline:b,keepPreviousData:v}=n,[m,_,g,w]=i.SWRGlobalState.get(a),[E,S]=(0,i.serialize)(e),A=(0,r.useRef)(!1),x=(0,r.useRef)(!1),O=(0,r.useRef)(E),C=(0,r.useRef)(t),D=(0,r.useRef)(n),j=()=>D.current,F=()=>j().isVisible()&&j().isOnline(),[P,B,I,k]=(0,i.createCacheHelper)(a,E),T=(0,r.useRef)({}).current,N=(0,i.isUndefined)(f)?n.fallback[E]:f,R=(e,t)=>{for(const n in T){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!c(q,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},M=(0,r.useMemo)(()=>{const e=!!E&&!!t&&((0,i.isUndefined)(p)?!j().isPaused()&&!l&&(!!(0,i.isUndefined)(h)||h):p),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=P(),o=k(),s=n(r),u=r===o?s:n(o);let a=s;return[()=>{const e=n(P());return R(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>u]},[a,E]),U=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>I(E,(t,n)=>{R(n,t)||e()}),[a,E]),M[0],M[1]),V=!A.current,L=m[E]&&m[E].length>0,$=U.data,K=(0,i.isUndefined)($)?N:$,W=U.error,z=(0,r.useRef)(K),q=v?(0,i.isUndefined)($)?z.current:$:K,G=!(L&&!(0,i.isUndefined)(W))&&(V&&!(0,i.isUndefined)(p)?p:!j().isPaused()&&(l?!(0,i.isUndefined)(K)&&h:(0,i.isUndefined)(K)||h)),Y=!!(E&&t&&V&&G),H=(0,i.isUndefined)(U.isValidating)?Y:U.isValidating,J=(0,i.isUndefined)(U.isLoading)?Y:U.isLoading,Q=(0,r.useCallback)(async e=>{const t=C.current;if(!E||!t||x.current||j().isPaused())return!1;let r,o,s=!0;const u=e||{},a=!g[E]||!u.dedupe,l=()=>i.IS_REACT_LEGACY?!x.current&&E===O.current&&A.current:E===O.current,f={isValidating:!1,isLoading:!1},p=()=>{B(f)},h=()=>{const e=g[E];e&&e[1]===o&&delete g[E]},d={isValidating:!0};(0,i.isUndefined)(P().data)&&(d.isLoading=!0);try{if(a&&(B(d),n.loadingTimeout&&(0,i.isUndefined)(P().data)&&setTimeout(()=>{s&&l()&&j().onLoadingSlow(E,n)},n.loadingTimeout),g[E]=[t(S),(0,i.getTimestamp)()]),[r,o]=g[E],r=await r,a&&setTimeout(h,n.dedupingInterval),!g[E]||g[E][1]!==o)return a&&l()&&j().onDiscarded(E),!1;f.error=i.UNDEFINED;const e=_[E];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return p(),a&&l()&&j().onDiscarded(E),!1;const u=P().data;f.data=c(u,r)?u:r,a&&l()&&j().onSuccess(r,E,n)}catch(e){h();const t=j(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,a&&l()&&(t.onError(e,E,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(j().revalidateOnFocus&&j().revalidateOnReconnect&&!F()||t.onErrorRetry(e,E,t,e=>{const t=m[E];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return s=!1,p(),!0},[E,a]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(a,O.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{C.current=t,D.current=n,(0,i.isUndefined)($)||(z.current=$)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!E)return;const e=Q.bind(i.UNDEFINED,u);let t=0;const n=(0,i.subscribeCallback)(E,m,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();j().revalidateOnFocus&&n>t&&F()&&(t=n+j().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)j().revalidateOnReconnect&&F()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Q();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return x.current=!1,O.current=E,A.current=!0,B({_k:S}),G&&((0,i.isUndefined)(K)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{x.current=!0,n()}},[E]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(d)?d(P().data):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!y&&!j().isVisible()||!b&&!j().isOnline()?t():Q(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[d,y,b,E]),(0,r.useDebugValue)(q),l&&(0,i.isUndefined)(K)&&E){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,D.current=n,x.current=!1;const e=w[E];if(!(0,i.isUndefined)(e)){const t=X(e);s(t)}if(!(0,i.isUndefined)(W))throw W;{const e=Q(u);(0,i.isUndefined)(q)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:X,get data(){return T.data=!0,q},get error(){return T.error=!0,W},get isValidating(){return T.isValidating=!0,H},get isLoading(){return T.isLoading=!0,J}}}),c=(0,i.withMiddleware)(a,e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))},40114(e,t,n){"use strict";n.d(t,{Ay:()=>l});var r=n(34227),o=n(74627),i=n(77308);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),u={dedupe:!0};i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig});const a=(0,i.withArgs)((e,t,n)=>{const{cache:a,compare:c,suspense:l,fallbackData:f,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:d,refreshWhenHidden:y,refreshWhenOffline:b,keepPreviousData:v}=n,[m,_,g,w]=i.SWRGlobalState.get(a),[E,S]=(0,i.serialize)(e),A=(0,r.useRef)(!1),x=(0,r.useRef)(!1),O=(0,r.useRef)(E),C=(0,r.useRef)(t),D=(0,r.useRef)(n),j=()=>D.current,F=()=>j().isVisible()&&j().isOnline(),[P,B,I,k]=(0,i.createCacheHelper)(a,E),T=(0,r.useRef)({}).current,N=(0,i.isUndefined)(f)?n.fallback[E]:f,R=(e,t)=>{for(const n in T){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!c(q,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},M=(0,r.useMemo)(()=>{const e=!!E&&!!t&&((0,i.isUndefined)(p)?!j().isPaused()&&!l&&(!!(0,i.isUndefined)(h)||h):p),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=P(),o=k(),s=n(r),u=r===o?s:n(o);let a=s;return[()=>{const e=n(P());return R(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>u]},[a,E]),U=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>I(E,(t,n)=>{R(n,t)||e()}),[a,E]),M[0],M[1]),V=!A.current,L=m[E]&&m[E].length>0,$=U.data,K=(0,i.isUndefined)($)?N:$,W=U.error,z=(0,r.useRef)(K),q=v?(0,i.isUndefined)($)?z.current:$:K,G=!(L&&!(0,i.isUndefined)(W))&&(V&&!(0,i.isUndefined)(p)?p:!j().isPaused()&&(l?!(0,i.isUndefined)(K)&&h:(0,i.isUndefined)(K)||h)),Y=!!(E&&t&&V&&G),H=(0,i.isUndefined)(U.isValidating)?Y:U.isValidating,J=(0,i.isUndefined)(U.isLoading)?Y:U.isLoading,Q=(0,r.useCallback)(async e=>{const t=C.current;if(!E||!t||x.current||j().isPaused())return!1;let r,o,s=!0;const u=e||{},a=!g[E]||!u.dedupe,l=()=>i.IS_REACT_LEGACY?!x.current&&E===O.current&&A.current:E===O.current,f={isValidating:!1,isLoading:!1},p=()=>{B(f)},h=()=>{const e=g[E];e&&e[1]===o&&delete g[E]},d={isValidating:!0};(0,i.isUndefined)(P().data)&&(d.isLoading=!0);try{if(a&&(B(d),n.loadingTimeout&&(0,i.isUndefined)(P().data)&&setTimeout(()=>{s&&l()&&j().onLoadingSlow(E,n)},n.loadingTimeout),g[E]=[t(S),(0,i.getTimestamp)()]),[r,o]=g[E],r=await r,a&&setTimeout(h,n.dedupingInterval),!g[E]||g[E][1]!==o)return a&&l()&&j().onDiscarded(E),!1;f.error=i.UNDEFINED;const e=_[E];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return p(),a&&l()&&j().onDiscarded(E),!1;const u=P().data;f.data=c(u,r)?u:r,a&&l()&&j().onSuccess(r,E,n)}catch(e){h();const t=j(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,a&&l()&&(t.onError(e,E,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(j().revalidateOnFocus&&j().revalidateOnReconnect&&!F()||t.onErrorRetry(e,E,t,e=>{const t=m[E];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return s=!1,p(),!0},[E,a]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(a,O.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{C.current=t,D.current=n,(0,i.isUndefined)($)||(z.current=$)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!E)return;const e=Q.bind(i.UNDEFINED,u);let t=0;const n=(0,i.subscribeCallback)(E,m,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();j().revalidateOnFocus&&n>t&&F()&&(t=n+j().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)j().revalidateOnReconnect&&F()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Q();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return x.current=!1,O.current=E,A.current=!0,B({_k:S}),G&&((0,i.isUndefined)(K)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{x.current=!0,n()}},[E]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(d)?d(P().data):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!y&&!j().isVisible()||!b&&!j().isOnline()?t():Q(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[d,y,b,E]),(0,r.useDebugValue)(q),l&&(0,i.isUndefined)(K)&&E){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,D.current=n,x.current=!1;const e=w[E];if(!(0,i.isUndefined)(e)){const t=X(e);s(t)}if(!(0,i.isUndefined)(W))throw W;{const e=Q(u);(0,i.isUndefined)(q)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:X,get data(){return T.data=!0,q},get error(){return T.error=!0,W},get isValidating(){return T.isValidating=!0,H},get isLoading(){return T.isLoading=!0,J}}}),c=Promise.resolve(),l=(0,i.withMiddleware)(a,e=>(t,n,s)=>{const u=(0,r.useRef)(!1),{cache:a,initialSize:l=1,revalidateAll:f=!1,persistSize:p=!1,revalidateFirstPage:h=!0,revalidateOnMount:d=!1,parallel:y=!1}=s,[,,,b]=i.SWRGlobalState.get(i.cache);let v;try{v=(e=>(0,i.serialize)(e?e(0,null):null)[0])(t),v&&(v=i.INFINITE_PREFIX+v)}catch(e){}const[m,_,g]=(0,i.createCacheHelper)(a,v),w=(0,r.useCallback)(()=>(0,i.isUndefined)(m()._l)?l:m()._l,[a,v,l]);(0,o.useSyncExternalStore)((0,r.useCallback)(e=>v?g(v,()=>{e()}):()=>{},[a,v]),w,w);const E=(0,r.useCallback)(()=>{const e=m()._l;return(0,i.isUndefined)(e)?l:e},[v,l]),S=(0,r.useRef)(E());(0,i.useIsomorphicLayoutEffect)(()=>{u.current?v&&_({_l:p?S.current:E()}):u.current=!0},[v,a]);const A=d&&!u.current,x=e(v,async e=>{const r=m()._i,o=m()._r;_({_r:i.UNDEFINED});const u=[],c=E(),[l]=(0,i.createCacheHelper)(a,e),p=l().data,d=[];let v=null;for(let e=0;e<c;++e){const[c,l]=(0,i.serialize)(t(e,y?null:v));if(!c)break;const[m,_]=(0,i.createCacheHelper)(a,c);let g=m().data;const w=f||r||(0,i.isUndefined)(g)||h&&!e&&!(0,i.isUndefined)(p)||A||p&&!(0,i.isUndefined)(p[e])&&!s.compare(p[e],g);if(n&&("function"==typeof o?o(g,l):w)){const t=async()=>{if(c in b){const e=b[c];delete b[c],g=await e}else g=await n(l);_({data:g,_k:l}),u[e]=g};y?d.push(t):await t()}else u[e]=g;y||(v=g)}return y&&await Promise.all(d.map(e=>e())),_({_i:i.UNDEFINED}),u},s),O=(0,r.useCallback)(function(e,t){const n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return v?(r&&((0,i.isUndefined)(e)?_({_i:!0,_r:n.revalidate}):_({_i:!1,_r:n.revalidate})),arguments.length?x.mutate(e,{...n,revalidate:r}):x.mutate()):c},[v,a]),C=(0,r.useCallback)(e=>{if(!v)return c;const[,n]=(0,i.createCacheHelper)(a,v);let r;if((0,i.isFunction)(e)?r=e(E()):"number"==typeof e&&(r=e),"number"!=typeof r)return c;n({_l:r}),S.current=r;const o=[],[s]=(0,i.createCacheHelper)(a,v);let u=null;for(let e=0;e<r;++e){const[n]=(0,i.serialize)(t(e,u)),[r]=(0,i.createCacheHelper)(a,n),c=n?r().data:i.UNDEFINED;if((0,i.isUndefined)(c))return O(s().data);o.push(c),u=c}return O(o)},[v,a,O,E]);return{size:E(),setSize:C,mutate:O,get data(){return x.data},get error(){return x.error},get isValidating(){return x.isValidating},get isLoading(){return x.isLoading}}})},99848(e,t,n){"use strict";n.d(t,{y:()=>o});const r=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,o,i);return i},o=e=>e?r(e):r}}]);
|