From ecca11dbb6a037dc573111a11df2d71d28fd5a0c Mon Sep 17 00:00:00 2001 From: echarp Date: Wed, 24 Apr 2019 21:11:49 +0200 Subject: [PATCH] Precompiled assets --- ...fest-ced68cb23fa25e8ac703dc8b85d6c920.json | 1 - ...092731b7e323cbf6695416790d5ee972d39d2ed.js | 66651 ---------------- ...731b7e323cbf6695416790d5ee972d39d2ed.js.gz | Bin 514832 -> 0 bytes ...10e5bd38cb3afae3405a752f5a50eee4e5dac4.css | 31 - ...5bd38cb3afae3405a752f5a50eee4e5dac4.css.gz | Bin 48061 -> 0 bytes 5 files changed, 66683 deletions(-) delete mode 100644 public/assets/.sprockets-manifest-ced68cb23fa25e8ac703dc8b85d6c920.json delete mode 100644 public/assets/application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js delete mode 100644 public/assets/application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js.gz delete mode 100644 public/assets/application-f904f304c0e31520de1348a95610e5bd38cb3afae3405a752f5a50eee4e5dac4.css delete mode 100644 public/assets/application-f904f304c0e31520de1348a95610e5bd38cb3afae3405a752f5a50eee4e5dac4.css.gz diff --git a/public/assets/.sprockets-manifest-ced68cb23fa25e8ac703dc8b85d6c920.json b/public/assets/.sprockets-manifest-ced68cb23fa25e8ac703dc8b85d6c920.json deleted file mode 100644 index 847a8b97..00000000 --- a/public/assets/.sprockets-manifest-ced68cb23fa25e8ac703dc8b85d6c920.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"active_admin-5c77f94f5d7cc920bb8cc169ecb08c8cc9c90855e82af6a210e2f726134f9b7f.css":{"logical_path":"active_admin.css","mtime":"2019-04-24T09:57:50+02:00","size":106205,"digest":"5c77f94f5d7cc920bb8cc169ecb08c8cc9c90855e82af6a210e2f726134f9b7f","integrity":"sha256-XHf5T118ySC7jMFp7LCMjMnJCFXoKvaiEOL3JhNPm38="},"active_admin/nested_menu_arrow-15084d93c65c1964d7077700ea748bd2d70cfa2d4c19707c58a9c64e232dd442.gif":{"logical_path":"active_admin/nested_menu_arrow.gif","mtime":"2018-12-20T12:04:32+01:00","size":70,"digest":"15084d93c65c1964d7077700ea748bd2d70cfa2d4c19707c58a9c64e232dd442","integrity":"sha256-FQhNk8ZcGWTXB3cA6nSL0tcM+i1MGXB8WKnGTiMt1EI="},"active_admin/nested_menu_arrow_dark-7c43b8e0a5f8823875f49a093c9d7a6b374f885b6f9cc248ae9cd7e6e9b29034.gif":{"logical_path":"active_admin/nested_menu_arrow_dark.gif","mtime":"2018-12-20T12:04:32+01:00","size":70,"digest":"7c43b8e0a5f8823875f49a093c9d7a6b374f885b6f9cc248ae9cd7e6e9b29034","integrity":"sha256-fEO44KX4gjh19JoJPJ16azdPiFtvnMJIrpzX5umykDQ="},"active_admin/orderable-29374dbb55b0012d78a37c614d573bb3474f0779849b478a147d0f1845ca6617.png":{"logical_path":"active_admin/orderable.png","mtime":"2018-12-20T12:04:32+01:00","size":220,"digest":"29374dbb55b0012d78a37c614d573bb3474f0779849b478a147d0f1845ca6617","integrity":"sha256-KTdNu1WwAS14o3xhTVc7s0dPB3mEm0eKFH0PGEXKZhc="},"active_admin/print-cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d35b11d8f99f6.css":{"logical_path":"active_admin/print.css","mtime":"2018-12-20T12:04:32+01:00","size":7086,"digest":"cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d35b11d8f99f6","integrity":"sha256-z5nL8n+5IGWp6s0o5vrUj6csra9uCRh5Do01sR2PmfY="},"active_admin-fb39ad579247fc31c9bf740b6e6e0675441c247d2c3d802a47182e53d7139872.js":{"logical_path":"active_admin.js","mtime":"2019-04-24T10:04:09+02:00","size":954780,"digest":"fb39ad579247fc31c9bf740b6e6e0675441c247d2c3d802a47182e53d7139872","integrity":"sha256-+zmtV5JH/DHJv3QLbm4GdUQcJH0sPYAqRxguU9cTmHI="},"tinymce-df95706398fbc0057225de6b0bc1a131dab80d0276e63a868d9982bcd74f2e33.js":{"logical_path":"tinymce.js","mtime":"2019-04-24T10:04:09+02:00","size":1036764,"digest":"df95706398fbc0057225de6b0bc1a131dab80d0276e63a868d9982bcd74f2e33","integrity":"sha256-35VwY5j7wAVyJd5rC8GhMdq4DQJ25jqGjZmCvNdPLjM="},"modernizr-654222debe8018b12f1993ceddff30dc163a7d5008d79869c399d6d167321f97.js":{"logical_path":"modernizr.js","mtime":"2018-03-12T11:54:27+01:00","size":51365,"digest":"654222debe8018b12f1993ceddff30dc163a7d5008d79869c399d6d167321f97","integrity":"sha256-ZUIi3r6AGLEvGZPO3f8w3BY6fVAI15hpw5nW0WcyH5c="},"font-awesome/fa-brands-400-bd4e21d8e25a889e979ac2367770c36863443b8e0f99feeaee09a62625b9cb13.eot":{"logical_path":"font-awesome/fa-brands-400.eot","mtime":"2019-04-19T14:21:01+02:00","size":129916,"digest":"bd4e21d8e25a889e979ac2367770c36863443b8e0f99feeaee09a62625b9cb13","integrity":"sha256-vU4h2OJaiJ6XmsI2d3DDaGNEO44Pmf7q7gmmJiW5yxM="},"font-awesome/fa-regular-400-4aa44a07b71f47067872c8f177f31babc0c609af2b384511353c89b1ca804458.eot":{"logical_path":"font-awesome/fa-regular-400.eot","mtime":"2019-04-19T14:21:01+02:00","size":34388,"digest":"4aa44a07b71f47067872c8f177f31babc0c609af2b384511353c89b1ca804458","integrity":"sha256-SqRKB7cfRwZ4csjxd/Mbq8DGCa8rOEURNTyJscqARFg="},"font-awesome/fa-solid-900-e153efe317e731e59eb8d6d1a568a811b8f7dd5df3823c327103be8e4a0047e4.eot":{"logical_path":"font-awesome/fa-solid-900.eot","mtime":"2019-04-19T14:21:01+02:00","size":186728,"digest":"e153efe317e731e59eb8d6d1a568a811b8f7dd5df3823c327103be8e4a0047e4","integrity":"sha256-4VPv4xfnMeWeuNbRpWioEbj33V3zgjwycQO+jkoAR+Q="},"font-awesome/fa-brands-400-e281f2a25598bf8b40a77f3c5228b51900788224e91dade3f4a0f8c383505f43.svg":{"logical_path":"font-awesome/fa-brands-400.svg","mtime":"2019-04-19T14:21:01+02:00","size":694583,"digest":"e281f2a25598bf8b40a77f3c5228b51900788224e91dade3f4a0f8c383505f43","integrity":"sha256-4oHyolWYv4tAp388Uii1GQB4giTpHa3j9KD4w4NQX0M="},"font-awesome/fa-regular-400-934530d864b6f03fad8e87b66daf829d17f0e7afbd74baead32a6a4157d584c2.svg":{"logical_path":"font-awesome/fa-regular-400.svg","mtime":"2019-04-19T14:21:01+02:00","size":144451,"digest":"934530d864b6f03fad8e87b66daf829d17f0e7afbd74baead32a6a4157d584c2","integrity":"sha256-k0Uw2GS28D+tjoe2ba+CnRfw56+9dLrq0ypqQVfVhMI="},"font-awesome/fa-solid-900-d5b212510d72b66bdb7feb22c611456621c3dd1a2e88cc42983d7d4c9ab79563.svg":{"logical_path":"font-awesome/fa-solid-900.svg","mtime":"2019-04-19T14:21:01+02:00","size":816926,"digest":"d5b212510d72b66bdb7feb22c611456621c3dd1a2e88cc42983d7d4c9ab79563","integrity":"sha256-1bISUQ1ytmvbf+sixhFFZiHD3RouiMxCmD19TJq3lWM="},"font-awesome/fa-brands-400-70726f98e0d98f543d5fde05a3a74bb131c5c67f5fbffcf4d41b7f68bca2b56b.ttf":{"logical_path":"font-awesome/fa-brands-400.ttf","mtime":"2019-04-19T14:21:01+02:00","size":129612,"digest":"70726f98e0d98f543d5fde05a3a74bb131c5c67f5fbffcf4d41b7f68bca2b56b","integrity":"sha256-cHJvmODZj1Q9X94Fo6dLsTHFxn9fv/z01Bt/aLyitWs="},"font-awesome/fa-regular-400-112491dccca97bf50ec7adff8d430dcba6d0b71e0a0b20386f814f3bf5bb94b5.ttf":{"logical_path":"font-awesome/fa-regular-400.ttf","mtime":"2019-04-19T14:21:01+02:00","size":34092,"digest":"112491dccca97bf50ec7adff8d430dcba6d0b71e0a0b20386f814f3bf5bb94b5","integrity":"sha256-ESSR3Mype/UOx63/jUMNy6bQtx4KCyA4b4FPO/W7lLU="},"font-awesome/fa-solid-900-7a58f741ff539af94798ff561c918e5841d7e6164e90cbe57befdec4a16f6a4e.ttf":{"logical_path":"font-awesome/fa-solid-900.ttf","mtime":"2019-04-19T14:21:01+02:00","size":186444,"digest":"7a58f741ff539af94798ff561c918e5841d7e6164e90cbe57befdec4a16f6a4e","integrity":"sha256-elj3Qf9TmvlHmP9WHJGOWEHX5hZOkMvle+/exKFvak4="},"font-awesome/fa-brands-400-17ce8b9d612897d1fefd5cd2096dbd83b82d05dd5d1f60421aca15c4ce2445ac.woff":{"logical_path":"font-awesome/fa-brands-400.woff","mtime":"2019-04-19T14:21:01+02:00","size":87688,"digest":"17ce8b9d612897d1fefd5cd2096dbd83b82d05dd5d1f60421aca15c4ce2445ac","integrity":"sha256-F86LnWEol9H+/VzSCW29g7gtBd1dH2BCGsoVxM4kRaw="},"font-awesome/fa-regular-400-2835b63ffc892d01aac2cc346969b501c845d9184f738589779ec176937e1f33.woff":{"logical_path":"font-awesome/fa-regular-400.woff","mtime":"2019-04-19T14:21:01+02:00","size":16804,"digest":"2835b63ffc892d01aac2cc346969b501c845d9184f738589779ec176937e1f33","integrity":"sha256-KDW2P/yJLQGqwsw0aWm1AchF2RhPc4WJd57BdpN+HzM="},"font-awesome/fa-solid-900-20464aebbff54cc17776497ce4112c3374a54b38f7ba5f58eec12174149d6742.woff":{"logical_path":"font-awesome/fa-solid-900.woff","mtime":"2019-04-19T14:21:01+02:00","size":96256,"digest":"20464aebbff54cc17776497ce4112c3374a54b38f7ba5f58eec12174149d6742","integrity":"sha256-IEZK67/1TMF3dkl85BEsM3SlSzj3ul9Y7sEhdBSdZ0I="},"font-awesome/fa-brands-400-dc64d7192f84497cacad5c10aef682562c24aa6124270f85fe247e223607f3ed.woff2":{"logical_path":"font-awesome/fa-brands-400.woff2","mtime":"2019-04-19T14:21:01+02:00","size":74768,"digest":"dc64d7192f84497cacad5c10aef682562c24aa6124270f85fe247e223607f3ed","integrity":"sha256-3GTXGS+ESXysrVwQrvaCViwkqmEkJw+F/iR+IjYH8+0="},"font-awesome/fa-regular-400-ccf4db1eeb68c96e05e74f8ebfa75cc60c3a0fed862dae6b0ad85d4e1b5b4e4f.woff2":{"logical_path":"font-awesome/fa-regular-400.woff2","mtime":"2019-04-19T14:21:01+02:00","size":13552,"digest":"ccf4db1eeb68c96e05e74f8ebfa75cc60c3a0fed862dae6b0ad85d4e1b5b4e4f","integrity":"sha256-zPTbHutoyW4F50+Ov6dcxgw6D+2GLa5rCthdThtbTk8="},"font-awesome/fa-solid-900-f18c486a80175cf02fee0e05c2b4acd86c04cdbaecec61c1ef91f920509b5efe.woff2":{"logical_path":"font-awesome/fa-solid-900.woff2","mtime":"2019-04-19T14:21:01+02:00","size":74256,"digest":"f18c486a80175cf02fee0e05c2b4acd86c04cdbaecec61c1ef91f920509b5efe","integrity":"sha256-8YxIaoAXXPAv7g4FwrSs2GwEzbrs7GHB75H5IFCbXv4="},"agendadescommuns-0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33.png":{"logical_path":"agendadescommuns.png","mtime":"2018-03-01T22:17:10+01:00","size":2760,"digest":"0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33","integrity":"sha256-ABe+9T9iYcs7+VLUt4DGQwc2lxSy4eLU659p39mGqzM="},"alert-762ace9479328243a44061346b64c4d6b997e963c68dfc6bddd9e4d241192906.png":{"logical_path":"alert.png","mtime":"2014-07-04T14:08:56+02:00","size":47876,"digest":"762ace9479328243a44061346b64c4d6b997e963c68dfc6bddd9e4d241192906","integrity":"sha256-dirOlHkygkOkQGE0a2TE1rmX6WPGjfxr3dnk0kEZKQY="},"baby_gnu_adl-463a81820aa2d4ffd8e7210dbce1a19ffcac67ef362aa7b092280c6f95c903fc.png":{"logical_path":"baby_gnu_adl.png","mtime":"2018-03-01T22:17:10+01:00","size":7411,"digest":"463a81820aa2d4ffd8e7210dbce1a19ffcac67ef362aa7b092280c6f95c903fc","integrity":"sha256-RjqBggqi1P/Y5yENvOGhn/ysZ+82KqewkigMb5XJA/w="},"baby_gnu_adl-97251005d3225cf1d58b8c497d6b7905dbc9560cc8acd50118fcce60d0a2679e.svg":{"logical_path":"baby_gnu_adl.svg","mtime":"2016-09-11T17:42:49+02:00","size":109635,"digest":"97251005d3225cf1d58b8c497d6b7905dbc9560cc8acd50118fcce60d0a2679e","integrity":"sha256-lyUQBdMiXPHVi4xJfWt5BdvJVgzIrNUBGPzOYNCiZ54="},"communs-0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33.png":{"logical_path":"communs.png","mtime":"2018-03-01T22:17:10+01:00","size":2760,"digest":"0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33","integrity":"sha256-ABe+9T9iYcs7+VLUt4DGQwc2lxSy4eLU659p39mGqzM="},"lef-small-93285d531af463f877951d63fe844a6e9600b782c2c81f78723b730072fa942e.png":{"logical_path":"lef-small.png","mtime":"2018-03-01T22:17:10+01:00","size":1059,"digest":"93285d531af463f877951d63fe844a6e9600b782c2c81f78723b730072fa942e","integrity":"sha256-kyhdUxr0Y/h3lR1j/oRKbpYAt4LCyB94cjtzAHL6lC4="},"lef-7e9152b909c78144ff44ca2254c06709333bef0b8d4985deb1361aba5c63c86d.png":{"logical_path":"lef.png","mtime":"2018-12-20T12:28:10+01:00","size":15783,"digest":"7e9152b909c78144ff44ca2254c06709333bef0b8d4985deb1361aba5c63c86d","integrity":"sha256-fpFSuQnHgUT/RMoiVMBnCTM77wuNSYXesTYaulxjyG0="},"linux-presentation-day-863b30562924505dd21841220861f83643d310e0b943a0e6a905462ddfac86f1.png":{"logical_path":"linux-presentation-day.png","mtime":"2019-04-19T16:45:03+02:00","size":9358,"digest":"863b30562924505dd21841220861f83643d310e0b943a0e6a905462ddfac86f1","integrity":"sha256-hjswVikkUF3SGEEiCGH4NkPTEOC5Q6DmqQVGLd+shvE="},"priorite-logiciel-libre-je-soutiens-april_2_m-6442e454e96ed45cc1ebc40673a6c50bd286b9c28ea6a8b58572e94f7d6459fc.png":{"logical_path":"priorite-logiciel-libre-je-soutiens-april_2_m.png","mtime":"2018-07-15T15:58:42+02:00","size":16952,"digest":"6442e454e96ed45cc1ebc40673a6c50bd286b9c28ea6a8b58572e94f7d6459fc","integrity":"sha256-ZELkVOlu1FzB68QGc6bFC9KGucKOpqi1hXLpT31kWfw="},"regions/CA-QC-70699e6a6e25c69040a3f1548b0afd829c4903ccca2760b6c10f49cc87d5d174.png":{"logical_path":"regions/CA-QC.png","mtime":"2018-03-01T22:18:39+01:00","size":469,"digest":"70699e6a6e25c69040a3f1548b0afd829c4903ccca2760b6c10f49cc87d5d174","integrity":"sha256-cGmeam4lxpBAo/FUiwr9gpxJA8zKJ2C2wQ9JzIfV0XQ="},"team-65c86021cf8a1154493664094aeafcbe3e5aa13dc675bb8ef34b220481db98fa.png":{"logical_path":"team.png","mtime":"2018-03-01T22:17:10+01:00","size":3586,"digest":"65c86021cf8a1154493664094aeafcbe3e5aa13dc675bb8ef34b220481db98fa","integrity":"sha256-ZchgIc+KEVRJNmQJSur8vj5aoT3GdbuO80siBIHbmPo="},"application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js":{"logical_path":"application.js","mtime":"2019-04-24T10:04:09+02:00","size":2210477,"digest":"132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed","integrity":"sha256-Ey7gPd8jv1Lata270JJzG34yPL9mlUFnkNXuly050u0="},"application-f904f304c0e31520de1348a95610e5bd38cb3afae3405a752f5a50eee4e5dac4.css":{"logical_path":"application.css","mtime":"2019-04-24T09:57:50+02:00","size":170408,"digest":"f904f304c0e31520de1348a95610e5bd38cb3afae3405a752f5a50eee4e5dac4","integrity":"sha256-+QTzBMDjFSDeE0ipVhDlvTjLOvrjQFp1L1pQ7uTl2sQ="},"flags/4x3/ad-f67c4e5a3f709ead53c04d9ff35614e6c67517c3d3289170f7a317390f661497.svg":{"logical_path":"flags/4x3/ad.svg","mtime":"2018-04-02T14:38:31+02:00","size":33972,"digest":"f67c4e5a3f709ead53c04d9ff35614e6c67517c3d3289170f7a317390f661497","integrity":"sha256-9nxOWj9wnq1TwE2f81YU5sZ1F8PTKJFw96MXOQ9mFJc="},"flags/1x1/ad-a315836ec2c9dcc11ef9bfd8b18aa7ccfc2d31435cbf46a2c31930836076e09c.svg":{"logical_path":"flags/1x1/ad.svg","mtime":"2018-04-02T14:38:31+02:00","size":32745,"digest":"a315836ec2c9dcc11ef9bfd8b18aa7ccfc2d31435cbf46a2c31930836076e09c","integrity":"sha256-oxWDbsLJ3MEe+b/YsYqnzPwtMUNcv0aiwxkwg2B24Jw="},"flags/4x3/ae-7a3b3dc0f50b5310014cfbcc8200a5f1ce568127bf43452e40e8158e0cff2d2e.svg":{"logical_path":"flags/4x3/ae.svg","mtime":"2018-04-02T14:38:31+02:00","size":257,"digest":"7a3b3dc0f50b5310014cfbcc8200a5f1ce568127bf43452e40e8158e0cff2d2e","integrity":"sha256-ejs9wPULUxABTPvMggCl8c5WgSe/Q0UuQOgVjgz/LS4="},"flags/1x1/ae-bcdd9a4da09598785f3e31db4ff431e22687b2ead18209a3e615600655068cd5.svg":{"logical_path":"flags/1x1/ae.svg","mtime":"2018-04-02T14:38:31+02:00","size":265,"digest":"bcdd9a4da09598785f3e31db4ff431e22687b2ead18209a3e615600655068cd5","integrity":"sha256-vN2aTaCVmHhfPjHbT/Qx4iaHsurRggmj5hVgBlUGjNU="},"flags/4x3/af-01601b521fa86582e32c39eed8c88480afec1f801b6de929b52ed7e49da47260.svg":{"logical_path":"flags/4x3/af.svg","mtime":"2018-04-02T14:38:31+02:00","size":21279,"digest":"01601b521fa86582e32c39eed8c88480afec1f801b6de929b52ed7e49da47260","integrity":"sha256-AWAbUh+oZYLjLDnu2MiEgK/sH4AbbekptS7X5J2kcmA="},"flags/1x1/af-6332cf754a5e2866db631923e1f7cfc52a0a554d32b97bcf19f8263819e4ca7d.svg":{"logical_path":"flags/1x1/af.svg","mtime":"2018-04-02T14:38:31+02:00","size":21145,"digest":"6332cf754a5e2866db631923e1f7cfc52a0a554d32b97bcf19f8263819e4ca7d","integrity":"sha256-YzLPdUpeKGbbYxkj4ffPxSoKVU0yuXvPGfgmOBnkyn0="},"flags/4x3/ag-cb6952d821bac7855231c2cb4d1c44f7c730f6b3621518ab20f30d2b9afe604b.svg":{"logical_path":"flags/4x3/ag.svg","mtime":"2018-04-02T14:38:31+02:00","size":748,"digest":"cb6952d821bac7855231c2cb4d1c44f7c730f6b3621518ab20f30d2b9afe604b","integrity":"sha256-y2lS2CG6x4VSMcLLTRxE98cw9rNiFRirIPMNK5r+YEs="},"flags/1x1/ag-14f7d9978487aaf4446b55167e85a711c48a13ff07edac175c172969a38650c4.svg":{"logical_path":"flags/1x1/ag.svg","mtime":"2018-04-02T14:38:31+02:00","size":764,"digest":"14f7d9978487aaf4446b55167e85a711c48a13ff07edac175c172969a38650c4","integrity":"sha256-FPfZl4SHqvREa1UWfoWnEcSKE/8H7awXXBcpaaOGUMQ="},"flags/4x3/ai-f07c6cc0646fdfa441b9a506e1d46e8dce0d97b37222292e9c6733c995dc89bc.svg":{"logical_path":"flags/4x3/ai.svg","mtime":"2018-04-02T14:38:31+02:00","size":42208,"digest":"f07c6cc0646fdfa441b9a506e1d46e8dce0d97b37222292e9c6733c995dc89bc","integrity":"sha256-8HxswGRv36RBuaUG4dRujc4Nl7NyIikunGczyZXcibw="},"flags/1x1/ai-95099e544de29bcea3ba735de535823f2e19aeb4043e82dbc1d9862f9262b810.svg":{"logical_path":"flags/1x1/ai.svg","mtime":"2018-04-02T14:38:31+02:00","size":47975,"digest":"95099e544de29bcea3ba735de535823f2e19aeb4043e82dbc1d9862f9262b810","integrity":"sha256-lQmeVE3im86junNd5TWCPy4ZrrQEPoLbwdmGL5JiuBA="},"flags/4x3/al-9b997f2720de861e1b0ccec8ddf42a2890795ebf50817f9223e1ceba712c9b03.svg":{"logical_path":"flags/4x3/al.svg","mtime":"2018-04-02T14:38:31+02:00","size":3221,"digest":"9b997f2720de861e1b0ccec8ddf42a2890795ebf50817f9223e1ceba712c9b03","integrity":"sha256-m5l/JyDehh4bDM7I3fQqKJB5Xr9QgX+SI+HOunEsmwM="},"flags/1x1/al-94852d2711fc23abf3423534b9edb950a0c6aabf1d2d98bf2643f3c7dadfac09.svg":{"logical_path":"flags/1x1/al.svg","mtime":"2018-04-02T14:38:31+02:00","size":3228,"digest":"94852d2711fc23abf3423534b9edb950a0c6aabf1d2d98bf2643f3c7dadfac09","integrity":"sha256-lIUtJxH8I6vzQjU0ue25UKDGqr8dLZi/JkPzx9rfrAk="},"flags/4x3/am-85a199ec21d1af74a256335ead0c1e38592bb603d8da81feda4678945e9e00e6.svg":{"logical_path":"flags/4x3/am.svg","mtime":"2018-04-02T14:38:31+02:00","size":226,"digest":"85a199ec21d1af74a256335ead0c1e38592bb603d8da81feda4678945e9e00e6","integrity":"sha256-haGZ7CHRr3SiVjNerQweOFkrtgPY2oH+2kZ4lF6eAOY="},"flags/1x1/am-869391b014ac299924d30777d72a4aba430752177290a90a1fc3255a7ad79ee7.svg":{"logical_path":"flags/1x1/am.svg","mtime":"2018-04-02T14:38:31+02:00","size":234,"digest":"869391b014ac299924d30777d72a4aba430752177290a90a1fc3255a7ad79ee7","integrity":"sha256-hpORsBSsKZkk0wd31ypKukMHUhdykKkKH8MlWnrXnuc="},"flags/4x3/ao-29224a61bf632826d530cda55d87c2615884bd2c2c3a322036ed468e34d85c75.svg":{"logical_path":"flags/4x3/ao.svg","mtime":"2018-04-02T14:38:31+02:00","size":1608,"digest":"29224a61bf632826d530cda55d87c2615884bd2c2c3a322036ed468e34d85c75","integrity":"sha256-KSJKYb9jKCbVMM2lXYfCYViEvSwsOjIgNu1GjjTYXHU="},"flags/1x1/ao-048eacbc862fe1868cf0ec73457b70a8b49a598c80dea049856f0e1fd6fec83e.svg":{"logical_path":"flags/1x1/ao.svg","mtime":"2018-04-02T14:38:31+02:00","size":1608,"digest":"048eacbc862fe1868cf0ec73457b70a8b49a598c80dea049856f0e1fd6fec83e","integrity":"sha256-BI6svIYv4YaM8OxzRXtwqLSaWYyA3qBJhW8OH9b+yD4="},"flags/4x3/aq-b401a776d2f1a7944170114f0aeeceab5e1d962df3de7ed1eff47d96824b73fd.svg":{"logical_path":"flags/4x3/aq.svg","mtime":"2018-04-02T14:38:31+02:00","size":2974,"digest":"b401a776d2f1a7944170114f0aeeceab5e1d962df3de7ed1eff47d96824b73fd","integrity":"sha256-tAGndtLxp5RBcBFPCu7Oq14dli3z3n7R7/R9loJLc/0="},"flags/1x1/aq-a8d7ce9bfb860b6e2b58608b50bf2cafc5220c77f6d049ab7770891f64334531.svg":{"logical_path":"flags/1x1/aq.svg","mtime":"2018-04-02T14:38:31+02:00","size":3183,"digest":"a8d7ce9bfb860b6e2b58608b50bf2cafc5220c77f6d049ab7770891f64334531","integrity":"sha256-qNfOm/uGC24rWGCLUL8sr8UiDHf20Emrd3CJH2QzRTE="},"flags/4x3/ar-bf73475bb707100874dec538ce4b7e1b5afc4ed67dc50a8a800ee519e51cc826.svg":{"logical_path":"flags/4x3/ar.svg","mtime":"2018-04-02T14:38:31+02:00","size":3430,"digest":"bf73475bb707100874dec538ce4b7e1b5afc4ed67dc50a8a800ee519e51cc826","integrity":"sha256-v3NHW7cHEAh03sU4zkt+G1r8TtZ9xQqKgA7lGeUcyCY="},"flags/1x1/ar-fc6582cc6d3ef0782805d8497ee77ab2d836c53422e91007e48f81a4a9fa2e60.svg":{"logical_path":"flags/1x1/ar.svg","mtime":"2018-04-02T14:38:31+02:00","size":3503,"digest":"fc6582cc6d3ef0782805d8497ee77ab2d836c53422e91007e48f81a4a9fa2e60","integrity":"sha256-/GWCzG0+8HgoBdhJfud6stg2xTQi6RAH5I+BpKn6LmA="},"flags/4x3/as-79d395190345206ea03475b67b44638e1111562411504b60646483c9c0b0f7d1.svg":{"logical_path":"flags/4x3/as.svg","mtime":"2018-04-02T14:38:31+02:00","size":8098,"digest":"79d395190345206ea03475b67b44638e1111562411504b60646483c9c0b0f7d1","integrity":"sha256-edOVGQNFIG6gNHW2e0RjjhERViQRUEtgZGSDycCw99E="},"flags/1x1/as-04f0db77c5d8610a55c69508b226a7c338924f8cf7d6577d5d6590e85ee57183.svg":{"logical_path":"flags/1x1/as.svg","mtime":"2018-04-02T14:38:31+02:00","size":7845,"digest":"04f0db77c5d8610a55c69508b226a7c338924f8cf7d6577d5d6590e85ee57183","integrity":"sha256-BPDbd8XYYQpVxpUIsianwziST4z31ld9XWWQ6F7lcYM="},"flags/4x3/at-3d197de8f1f0096a2b0d440b6fc7d80821585a6637e646c05487a87718bf6b5f.svg":{"logical_path":"flags/4x3/at.svg","mtime":"2018-04-02T14:38:31+02:00","size":243,"digest":"3d197de8f1f0096a2b0d440b6fc7d80821585a6637e646c05487a87718bf6b5f","integrity":"sha256-PRl96PHwCWorDUQLb8fYCCFYWmY35kbAVIeodxi/a18="},"flags/1x1/at-ec4db9aeac793827ac7c8e40c072a76f7675010058cc8c8dfd3a86bb5acfa6b8.svg":{"logical_path":"flags/1x1/at.svg","mtime":"2018-04-02T14:38:31+02:00","size":245,"digest":"ec4db9aeac793827ac7c8e40c072a76f7675010058cc8c8dfd3a86bb5acfa6b8","integrity":"sha256-7E25rqx5OCesfI5AwHKnb3Z1AQBYzIyN/TqGu1rPprg="},"flags/4x3/au-126fa2500a315287a5f847f4d958bb929f11da9b39f35912cc440c0fcffb8b12.svg":{"logical_path":"flags/4x3/au.svg","mtime":"2018-04-02T14:38:31+02:00","size":1335,"digest":"126fa2500a315287a5f847f4d958bb929f11da9b39f35912cc440c0fcffb8b12","integrity":"sha256-Em+iUAoxUoel+Ef02Vi7kp8R2ps581kSzEQMD8/7ixI="},"flags/1x1/au-bf990dcc957c9f74eb908e8ffa733f1731277bf6ec8b7301a6ea1ed92b59cc4b.svg":{"logical_path":"flags/1x1/au.svg","mtime":"2018-04-02T14:38:31+02:00","size":1320,"digest":"bf990dcc957c9f74eb908e8ffa733f1731277bf6ec8b7301a6ea1ed92b59cc4b","integrity":"sha256-v5kNzJV8n3TrkI6P+nM/FzEne/bsi3MBpuoe2StZzEs="},"flags/4x3/aw-4524643452423e95f3b0dbe6216b059a9e52126b34c73ae4b3c17b682f893aa6.svg":{"logical_path":"flags/4x3/aw.svg","mtime":"2018-04-02T14:38:31+02:00","size":9948,"digest":"4524643452423e95f3b0dbe6216b059a9e52126b34c73ae4b3c17b682f893aa6","integrity":"sha256-RSRkNFJCPpXzsNvmIWsFmp5SEms0xzrks8F7aC+JOqY="},"flags/1x1/aw-f7002bceef55486a442bf6bf433be0c60d0b15b2aa548b81c524c67ccf0565a8.svg":{"logical_path":"flags/1x1/aw.svg","mtime":"2018-04-02T14:38:31+02:00","size":12088,"digest":"f7002bceef55486a442bf6bf433be0c60d0b15b2aa548b81c524c67ccf0565a8","integrity":"sha256-9wArzu9VSGpEK/a/Qzvgxg0LFbKqVIuBxSTGfM8FZag="},"flags/4x3/ax-c297e0eb654ca62e58f5eb3abb70df9f245e4919490f29bd0f1d49c4fe052d90.svg":{"logical_path":"flags/4x3/ax.svg","mtime":"2018-04-02T14:38:31+02:00","size":556,"digest":"c297e0eb654ca62e58f5eb3abb70df9f245e4919490f29bd0f1d49c4fe052d90","integrity":"sha256-wpfg62VMpi5Y9es6u3DfnyReSRlJDym9Dx1JxP4FLZA="},"flags/1x1/ax-a1245689ecbf321c0a9e556bba17f3c9f2aeb8b1f63d14fcb591d76a87f12880.svg":{"logical_path":"flags/1x1/ax.svg","mtime":"2018-04-02T14:38:31+02:00","size":544,"digest":"a1245689ecbf321c0a9e556bba17f3c9f2aeb8b1f63d14fcb591d76a87f12880","integrity":"sha256-oSRWiey/MhwKnlVruhfzyfKuuLH2PRT8tZHXaofxKIA="},"flags/4x3/az-132e68d5e0386d3b9fa05b4288a0fd66f1414e2bc7af6b9d437b6935a7dfa00c.svg":{"logical_path":"flags/4x3/az.svg","mtime":"2018-04-02T14:38:31+02:00","size":515,"digest":"132e68d5e0386d3b9fa05b4288a0fd66f1414e2bc7af6b9d437b6935a7dfa00c","integrity":"sha256-Ey5o1eA4bTufoFtCiKD9ZvFBTivHr2udQ3tpNaffoAw="},"flags/1x1/az-3990c0526b933bd650285d821f2b93e432a73ba709869549b8ef75b051d3bd2d.svg":{"logical_path":"flags/1x1/az.svg","mtime":"2018-04-02T14:38:31+02:00","size":501,"digest":"3990c0526b933bd650285d821f2b93e432a73ba709869549b8ef75b051d3bd2d","integrity":"sha256-OZDAUmuTO9ZQKF2CHyuT5DKnO6cJhpVJuO91sFHTvS0="},"flags/4x3/ba-89dd0c1600d94741de7d667a487310193a0c48c4cf1a5159c3bf9dd37d65d2b5.svg":{"logical_path":"flags/4x3/ba.svg","mtime":"2018-04-02T14:38:31+02:00","size":1306,"digest":"89dd0c1600d94741de7d667a487310193a0c48c4cf1a5159c3bf9dd37d65d2b5","integrity":"sha256-id0MFgDZR0HefWZ6SHMQGToMSMTPGlFZw7+d031l0rU="},"flags/1x1/ba-2dbe90eb12b937f4a9ae8db95760930a3e318f4ce5829ac05e292ead698bae5a.svg":{"logical_path":"flags/1x1/ba.svg","mtime":"2018-04-02T14:38:31+02:00","size":1247,"digest":"2dbe90eb12b937f4a9ae8db95760930a3e318f4ce5829ac05e292ead698bae5a","integrity":"sha256-Lb6Q6xK5N/Spro25V2CTCj4xj0zlgprAXikurWmLrlo="},"flags/4x3/bb-16f8249ff958bfbc18fb1f23a5282000347bffdb5769ac620966185b1dcb57f6.svg":{"logical_path":"flags/4x3/bb.svg","mtime":"2018-04-02T14:38:31+02:00","size":613,"digest":"16f8249ff958bfbc18fb1f23a5282000347bffdb5769ac620966185b1dcb57f6","integrity":"sha256-Fvgkn/lYv7wY+x8jpSggADR7/9tXaaxiCWYYWx3LV/Y="},"flags/1x1/bb-fae92d8426196ae24ffa561aca72613fae651a5e9c0bcda63ecc877add05b060.svg":{"logical_path":"flags/1x1/bb.svg","mtime":"2018-04-02T14:38:31+02:00","size":616,"digest":"fae92d8426196ae24ffa561aca72613fae651a5e9c0bcda63ecc877add05b060","integrity":"sha256-+ukthCYZauJP+lYaynJhP65lGl6cC82mPsyHet0FsGA="},"flags/4x3/bd-8dac0547e73ee25a04148a3f0fd026a90e56c23b7e92921565d4263050ba77a6.svg":{"logical_path":"flags/4x3/bd.svg","mtime":"2018-04-02T14:38:31+02:00","size":193,"digest":"8dac0547e73ee25a04148a3f0fd026a90e56c23b7e92921565d4263050ba77a6","integrity":"sha256-jawFR+c+4loEFIo/D9AmqQ5Wwjt+kpIVZdQmMFC6d6Y="},"flags/1x1/bd-ecc3c3e87d4cc59c8350f2b4d7dca8f5cf46bdb26319db0ee80b744482af50c1.svg":{"logical_path":"flags/1x1/bd.svg","mtime":"2018-04-02T14:38:31+02:00","size":195,"digest":"ecc3c3e87d4cc59c8350f2b4d7dca8f5cf46bdb26319db0ee80b744482af50c1","integrity":"sha256-7MPD6H1MxZyDUPK019yo9c9GvbJjGdsO6At0RIKvUME="},"flags/4x3/be-a180ca68521188017bb5367f19e503d9599d6cbecd61bf054e59a57f58e648ae.svg":{"logical_path":"flags/4x3/be.svg","mtime":"2018-04-02T14:38:31+02:00","size":293,"digest":"a180ca68521188017bb5367f19e503d9599d6cbecd61bf054e59a57f58e648ae","integrity":"sha256-oYDKaFIRiAF7tTZ/GeUD2VmdbL7NYb8FTlmlf1jmSK4="},"flags/1x1/be-c8d4194137bd01955285b329dfdf996490d16c3116a92ce2f322e354b6d7494e.svg":{"logical_path":"flags/1x1/be.svg","mtime":"2018-04-02T14:38:31+02:00","size":293,"digest":"c8d4194137bd01955285b329dfdf996490d16c3116a92ce2f322e354b6d7494e","integrity":"sha256-yNQZQTe9AZVShbMp39+ZZJDRbDEWqSzi8yLjVLbXSU4="},"flags/4x3/bf-6b214936ef89f19133d4a84e99cdf0cfdb99d6409f2f373f6d18694423013313.svg":{"logical_path":"flags/4x3/bf.svg","mtime":"2018-04-02T14:38:31+02:00","size":360,"digest":"6b214936ef89f19133d4a84e99cdf0cfdb99d6409f2f373f6d18694423013313","integrity":"sha256-ayFJNu+J8ZEz1KhOmc3wz9uZ1kCfLzc/bRhpRCMBMxM="},"flags/1x1/bf-04c7d61aa314adab5a41bd79d77aa780c10136bb6b8f4c62423e61e23e3851ee.svg":{"logical_path":"flags/1x1/bf.svg","mtime":"2018-04-02T14:38:31+02:00","size":386,"digest":"04c7d61aa314adab5a41bd79d77aa780c10136bb6b8f4c62423e61e23e3851ee","integrity":"sha256-BMfWGqMUrataQb1513qngMEBNrtrj0xiQj5h4j44Ue4="},"flags/4x3/bg-dd3985ba746942b0e65bc52a280cc4d28fb24fd2c7d9e22ac9afd2d75ee7bfc4.svg":{"logical_path":"flags/4x3/bg.svg","mtime":"2018-04-02T14:38:31+02:00","size":289,"digest":"dd3985ba746942b0e65bc52a280cc4d28fb24fd2c7d9e22ac9afd2d75ee7bfc4","integrity":"sha256-3TmFunRpQrDmW8UqKAzE0o+yT9LH2eIqya/S117nv8Q="},"flags/1x1/bg-f59294a736d5bdc0f102b58d70dbe45d02bd92df822820bf95336840f75a0746.svg":{"logical_path":"flags/1x1/bg.svg","mtime":"2018-04-02T14:38:31+02:00","size":297,"digest":"f59294a736d5bdc0f102b58d70dbe45d02bd92df822820bf95336840f75a0746","integrity":"sha256-9ZKUpzbVvcDxArWNcNvkXQK9kt+CKCC/lTNoQPdaB0Y="},"flags/4x3/bh-7c82c4a6ba963172c6c1b4423f39a0ebe9c999449cc7dd87018917943db4735c.svg":{"logical_path":"flags/4x3/bh.svg","mtime":"2018-04-02T14:38:31+02:00","size":546,"digest":"7c82c4a6ba963172c6c1b4423f39a0ebe9c999449cc7dd87018917943db4735c","integrity":"sha256-fILEprqWMXLGwbRCPzmg6+nJmUScx92HAYkXlD20c1w="},"flags/1x1/bh-6893aac3e55c6480e9dac0c023ec2179f6c12a0da82a0bc2717134384c097e88.svg":{"logical_path":"flags/1x1/bh.svg","mtime":"2018-04-02T14:38:31+02:00","size":572,"digest":"6893aac3e55c6480e9dac0c023ec2179f6c12a0da82a0bc2717134384c097e88","integrity":"sha256-aJOqw+VcZIDp2sDAI+whefbBKg2oKgvCcXE0OEwJfog="},"flags/4x3/bi-4fcd0116f7f93c0564c6955806f3c3563d0ea7334ae406f29a897255845c923c.svg":{"logical_path":"flags/4x3/bi.svg","mtime":"2018-04-02T14:38:31+02:00","size":1074,"digest":"4fcd0116f7f93c0564c6955806f3c3563d0ea7334ae406f29a897255845c923c","integrity":"sha256-T80BFvf5PAVkxpVYBvPDVj0OpzNK5AbymolyVYRckjw="},"flags/1x1/bi-91c34eb431b26be67852782a0b93e1d7d577a925454d6c8cea00a0d872d2de8a.svg":{"logical_path":"flags/1x1/bi.svg","mtime":"2018-04-02T14:38:31+02:00","size":1048,"digest":"91c34eb431b26be67852782a0b93e1d7d577a925454d6c8cea00a0d872d2de8a","integrity":"sha256-kcNOtDGya+Z4UngqC5Ph19V3qSVFTWyM6gCg2HLS3oo="},"flags/4x3/bj-63bddb4268f5f8c2ed867041bcf058fb18fcd9d1e0799e01286fca2d5e961c7f.svg":{"logical_path":"flags/4x3/bj.svg","mtime":"2018-04-02T14:38:31+02:00","size":499,"digest":"63bddb4268f5f8c2ed867041bcf058fb18fcd9d1e0799e01286fca2d5e961c7f","integrity":"sha256-Y73bQmj1+MLthnBBvPBY+xj82dHgeZ4BKG/KLV6WHH8="},"flags/1x1/bj-e2606c5a8498c474a6b6708626b88108fcb73840344766566dc56f804279cdfc.svg":{"logical_path":"flags/1x1/bj.svg","mtime":"2018-04-02T14:38:31+02:00","size":502,"digest":"e2606c5a8498c474a6b6708626b88108fcb73840344766566dc56f804279cdfc","integrity":"sha256-4mBsWoSYxHSmtnCGJriBCPy3OEA0R2ZWbcVvgEJ5zfw="},"flags/4x3/bl-824a7265f48789d5e1ad5c5b0042a13a7d2d4357210e5bd8124fca19931e8c74.svg":{"logical_path":"flags/4x3/bl.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"824a7265f48789d5e1ad5c5b0042a13a7d2d4357210e5bd8124fca19931e8c74","integrity":"sha256-gkpyZfSHidXhrVxbAEKhOn0tQ1chDlvYEk/KGZMejHQ="},"flags/1x1/bl-ba6a7881b0ca72ac57aee4d823ae611ab4ad24a938ee9e01a7a4d5ae04cfccf6.svg":{"logical_path":"flags/1x1/bl.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"ba6a7881b0ca72ac57aee4d823ae611ab4ad24a938ee9e01a7a4d5ae04cfccf6","integrity":"sha256-ump4gbDKcqxXruTYI65hGrStJKk47p4Bp6TVrgTPzPY="},"flags/4x3/bm-2e2f09e5a4edf4b18afff581656f50b0b4c37783db29591ff00ca768f7f755bc.svg":{"logical_path":"flags/4x3/bm.svg","mtime":"2018-04-02T14:38:31+02:00","size":22650,"digest":"2e2f09e5a4edf4b18afff581656f50b0b4c37783db29591ff00ca768f7f755bc","integrity":"sha256-Li8J5aTt9LGK//WBZW9QsLTDd4PbKVkf8AynaPf3Vbw="},"flags/1x1/bm-f553f953f8784ea4d67a5197f5d808a67747eb8a1cb56990d6838e690090d2d6.svg":{"logical_path":"flags/1x1/bm.svg","mtime":"2018-04-02T14:38:31+02:00","size":22337,"digest":"f553f953f8784ea4d67a5197f5d808a67747eb8a1cb56990d6838e690090d2d6","integrity":"sha256-9VP5U/h4TqTWelGX9dgIpndH64octWmQ1oOOaQCQ0tY="},"flags/4x3/bn-bcf9967c12eb6397346cb5b960ae92efa41f314f780d09a3d7c81f5dacac4180.svg":{"logical_path":"flags/4x3/bn.svg","mtime":"2018-04-02T14:38:31+02:00","size":14387,"digest":"bcf9967c12eb6397346cb5b960ae92efa41f314f780d09a3d7c81f5dacac4180","integrity":"sha256-vPmWfBLrY5c0bLW5YK6S76QfMU94DQmj18gfXaysQYA="},"flags/1x1/bn-1d1aad3fe9fd33ce922eba33c9ae6047a5646349239c20d1bc7307ec6d19a043.svg":{"logical_path":"flags/1x1/bn.svg","mtime":"2018-04-02T14:38:31+02:00","size":14521,"digest":"1d1aad3fe9fd33ce922eba33c9ae6047a5646349239c20d1bc7307ec6d19a043","integrity":"sha256-HRqtP+n9M86SLrozya5gR6VkY0kjnCDRvHMH7G0ZoEM="},"flags/4x3/bo-fa423f2bb4ab6e8e9dd399ad73781ea8d9cbafd30f1b7ee0bcecfb9e7b75581e.svg":{"logical_path":"flags/4x3/bo.svg","mtime":"2018-04-02T14:38:31+02:00","size":118272,"digest":"fa423f2bb4ab6e8e9dd399ad73781ea8d9cbafd30f1b7ee0bcecfb9e7b75581e","integrity":"sha256-+kI/K7Srbo6d05mtc3geqNnLr9MPG37gvOz7nnt1WB4="},"flags/1x1/bo-f5faa29e40191e0c76070ac1a1d2a1f2b18e9cd358b8a77cefaed8efc49a265e.svg":{"logical_path":"flags/1x1/bo.svg","mtime":"2018-04-02T14:38:31+02:00","size":119850,"digest":"f5faa29e40191e0c76070ac1a1d2a1f2b18e9cd358b8a77cefaed8efc49a265e","integrity":"sha256-9fqinkAZHgx2BwrBodKh8rGOnNNYuKd8767Y78SaJl4="},"flags/4x3/bq-493c92ab19204c3ad319e6caba021df050132b99bd57a8f9b74131b78229c29e.svg":{"logical_path":"flags/4x3/bq.svg","mtime":"2018-04-02T14:38:31+02:00","size":227,"digest":"493c92ab19204c3ad319e6caba021df050132b99bd57a8f9b74131b78229c29e","integrity":"sha256-STySqxkgTDrTGebKugId8FATK5m9V6j5t0Ext4Ipwp4="},"flags/1x1/bq-6e30bbeabc2aa097f657a411984b3c23278a8fcce2fc016b1cd6d2262f672d33.svg":{"logical_path":"flags/1x1/bq.svg","mtime":"2018-04-02T14:38:31+02:00","size":231,"digest":"6e30bbeabc2aa097f657a411984b3c23278a8fcce2fc016b1cd6d2262f672d33","integrity":"sha256-bjC76rwqoJf2V6QRmEs8IyeKj8zi/AFrHNbSJi9nLTM="},"flags/4x3/br-cf3ba80ec2c9fd4d3c845c3a3c43a2b9d81cf90707a2918789e8b1f596833e01.svg":{"logical_path":"flags/4x3/br.svg","mtime":"2018-04-02T14:38:31+02:00","size":8244,"digest":"cf3ba80ec2c9fd4d3c845c3a3c43a2b9d81cf90707a2918789e8b1f596833e01","integrity":"sha256-zzuoDsLJ/U08hFw6PEOiudgc+QcHopGHieix9ZaDPgE="},"flags/1x1/br-7bf4e4b31650ac25f0bc6c86eb87491a7e5a8eac13acccfcbde44346c88728f6.svg":{"logical_path":"flags/1x1/br.svg","mtime":"2018-04-02T14:38:31+02:00","size":7852,"digest":"7bf4e4b31650ac25f0bc6c86eb87491a7e5a8eac13acccfcbde44346c88728f6","integrity":"sha256-e/TksxZQrCXwvGyG64dJGn5ajqwTrMz8veRDRsiHKPY="},"flags/4x3/bs-69f60b5fea96b67dd939e597099994921bb3dc3bcf31b8dee7cc45be2885c836.svg":{"logical_path":"flags/4x3/bs.svg","mtime":"2018-04-02T14:38:31+02:00","size":549,"digest":"69f60b5fea96b67dd939e597099994921bb3dc3bcf31b8dee7cc45be2885c836","integrity":"sha256-afYLX+qWtn3ZOeWXCZmUkhuz3DvPMbje58xFviiFyDY="},"flags/1x1/bs-f5d6acf7ef7a240dc09ac88710fd77fd3494501104392db74d5c540d482f2262.svg":{"logical_path":"flags/1x1/bs.svg","mtime":"2018-04-02T14:38:31+02:00","size":571,"digest":"f5d6acf7ef7a240dc09ac88710fd77fd3494501104392db74d5c540d482f2262","integrity":"sha256-9das9+96JA3AmsiHEP13/TSUUBEEOS23TVxUDUgvImI="},"flags/4x3/bt-6c20b0c00e12d5898be0239a0c66ce775debd0bd536de56a271859a0285a039e.svg":{"logical_path":"flags/4x3/bt.svg","mtime":"2018-04-02T14:38:31+02:00","size":25345,"digest":"6c20b0c00e12d5898be0239a0c66ce775debd0bd536de56a271859a0285a039e","integrity":"sha256-bCCwwA4S1YmL4COaDGbOd13r0L1TbeVqJxhZoChaA54="},"flags/1x1/bt-58de3ca9438811ef1920e2f84c4ba4ce32d01069f4d197ab5d577de6acbe0c85.svg":{"logical_path":"flags/1x1/bt.svg","mtime":"2018-04-02T14:38:31+02:00","size":25172,"digest":"58de3ca9438811ef1920e2f84c4ba4ce32d01069f4d197ab5d577de6acbe0c85","integrity":"sha256-WN48qUOIEe8ZIOL4TEukzjLQEGn00ZerXVd95qy+DIU="},"flags/4x3/bv-ff173190fc339b3cb8b6e8235bc5e373853d7127fd94cbc32ac737e839aeb586.svg":{"logical_path":"flags/4x3/bv.svg","mtime":"2018-04-02T14:38:31+02:00","size":582,"digest":"ff173190fc339b3cb8b6e8235bc5e373853d7127fd94cbc32ac737e839aeb586","integrity":"sha256-/xcxkPwzmzy4tugjW8Xjc4U9cSf9lMvDKsc36DmutYY="},"flags/1x1/bv-59616ff1a722959064c83927ca2e49c1fce42a9b18e91b9ecbb74f62527aff43.svg":{"logical_path":"flags/1x1/bv.svg","mtime":"2018-04-02T14:38:31+02:00","size":585,"digest":"59616ff1a722959064c83927ca2e49c1fce42a9b18e91b9ecbb74f62527aff43","integrity":"sha256-WWFv8acilZBkyDknyi5JwfzkKpsY6Ruey7dPYlJ6/0M="},"flags/4x3/bw-4bb1d3131b88c65b5decc67f7b44903e931bca2fcac841942591c599f0cbb850.svg":{"logical_path":"flags/4x3/bw.svg","mtime":"2018-04-02T14:38:31+02:00","size":255,"digest":"4bb1d3131b88c65b5decc67f7b44903e931bca2fcac841942591c599f0cbb850","integrity":"sha256-S7HTExuIxltd7MZ/e0SQPpMbyi/KyEGUJZHFmfDLuFA="},"flags/1x1/bw-e08f50c0836ca5858aed7b0526aed6fb630da8dc6b6b96bd9a476af599dc89d6.svg":{"logical_path":"flags/1x1/bw.svg","mtime":"2018-04-02T14:38:31+02:00","size":257,"digest":"e08f50c0836ca5858aed7b0526aed6fb630da8dc6b6b96bd9a476af599dc89d6","integrity":"sha256-4I9QwINspYWK7XsFJq7W+2MNqNxra5a9mkdq9ZncidY="},"flags/4x3/by-324ac96bfbe075781c664be3b9e2ac6b4d2a46dd2b418ca0920284f64394c7d4.svg":{"logical_path":"flags/4x3/by.svg","mtime":"2018-04-02T14:38:31+02:00","size":5998,"digest":"324ac96bfbe075781c664be3b9e2ac6b4d2a46dd2b418ca0920284f64394c7d4","integrity":"sha256-MkrJa/vgdXgcZkvjueKsa00qRt0rQYygkgKE9kOUx9Q="},"flags/1x1/by-37b80e8bf7e51fef99a8307d6dffb04ee164790ceeafef606d516ca333e9488a.svg":{"logical_path":"flags/1x1/by.svg","mtime":"2018-04-02T14:38:31+02:00","size":6105,"digest":"37b80e8bf7e51fef99a8307d6dffb04ee164790ceeafef606d516ca333e9488a","integrity":"sha256-N7gOi/flH++ZqDB9bf+wTuFkeQzur+9gbVFsozPpSIo="},"flags/4x3/bz-156fdc45f8c15c9520a1ea9fc0f395f294f02077408ea1938c222a37cfbb7f1d.svg":{"logical_path":"flags/4x3/bz.svg","mtime":"2018-04-02T14:38:31+02:00","size":46916,"digest":"156fdc45f8c15c9520a1ea9fc0f395f294f02077408ea1938c222a37cfbb7f1d","integrity":"sha256-FW/cRfjBXJUgoeqfwPOV8pTwIHdAjqGTjCIqN8+7fx0="},"flags/1x1/bz-24577d4e7b29b33ab3b1d37914c8479889baa7e8c8399c6d1c99faed31ab053a.svg":{"logical_path":"flags/1x1/bz.svg","mtime":"2018-04-02T14:38:31+02:00","size":47160,"digest":"24577d4e7b29b33ab3b1d37914c8479889baa7e8c8399c6d1c99faed31ab053a","integrity":"sha256-JFd9TnspszqzsdN5FMhHmIm6p+jIOZxtHJn67TGrBTo="},"flags/4x3/ca-0d57cab46d5dbb0012a5e4ae0a9efee3baee90d5d157950a6c5d67edf2daa58f.svg":{"logical_path":"flags/4x3/ca.svg","mtime":"2018-04-02T14:38:31+02:00","size":731,"digest":"0d57cab46d5dbb0012a5e4ae0a9efee3baee90d5d157950a6c5d67edf2daa58f","integrity":"sha256-DVfKtG1duwASpeSuCp7+47rukNXRV5UKbF1n7fLapY8="},"flags/1x1/ca-192a6fb0544e5a6f33a32149d62f1e7ac0a1d61c5c5afa57f3a42346ca8e8c90.svg":{"logical_path":"flags/1x1/ca.svg","mtime":"2018-04-02T14:38:31+02:00","size":712,"digest":"192a6fb0544e5a6f33a32149d62f1e7ac0a1d61c5c5afa57f3a42346ca8e8c90","integrity":"sha256-GSpvsFROWm8zoyFJ1i8eesCh1hxcWvpX86QjRsqOjJA="},"flags/4x3/cc-a35f2a9e10a28d6918ced65e0623b03bb2fbf1f20670b581bc0a409d33b4e843.svg":{"logical_path":"flags/4x3/cc.svg","mtime":"2018-04-02T14:38:31+02:00","size":3144,"digest":"a35f2a9e10a28d6918ced65e0623b03bb2fbf1f20670b581bc0a409d33b4e843","integrity":"sha256-o18qnhCijWkYztZeBiOwO7L78fIGcLWBvApAnTO06EM="},"flags/1x1/cc-d2025eefc9d30f724f3fcd95c0fd9f7938930ecb01af7e0cd6ee6553d7358eb6.svg":{"logical_path":"flags/1x1/cc.svg","mtime":"2018-04-02T14:38:31+02:00","size":3092,"digest":"d2025eefc9d30f724f3fcd95c0fd9f7938930ecb01af7e0cd6ee6553d7358eb6","integrity":"sha256-0gJe78nTD3JPP82VwP2feTiTDssBr34M1u5lU9c1jrY="},"flags/4x3/cd-5d2127c991b30522ae0a29d05facbc88728c050d7e333a60d614af1545459c5c.svg":{"logical_path":"flags/4x3/cd.svg","mtime":"2018-04-02T14:38:31+02:00","size":352,"digest":"5d2127c991b30522ae0a29d05facbc88728c050d7e333a60d614af1545459c5c","integrity":"sha256-XSEnyZGzBSKuCinQX6y8iHKMBQ1+Mzpg1hSvFUVFnFw="},"flags/1x1/cd-59dacf424d1c8c779db66c5b7f2a93a3c8f14976c2975ccfb07639676a1602e3.svg":{"logical_path":"flags/1x1/cd.svg","mtime":"2018-04-02T14:38:31+02:00","size":510,"digest":"59dacf424d1c8c779db66c5b7f2a93a3c8f14976c2975ccfb07639676a1602e3","integrity":"sha256-WdrPQk0cjHedtmxbfyqTo8jxSXbCl1zPsHY5Z2oWAuM="},"flags/4x3/cf-ac0aaffba354d848eba2501a402ee81dc96a56ad0acd3741ec9905e76c372e1e.svg":{"logical_path":"flags/4x3/cf.svg","mtime":"2018-04-02T14:38:31+02:00","size":689,"digest":"ac0aaffba354d848eba2501a402ee81dc96a56ad0acd3741ec9905e76c372e1e","integrity":"sha256-rAqv+6NU2EjrolAaQC7oHclqVq0KzTdB7JkF52w3Lh4="},"flags/1x1/cf-e637674faf7edcdad37182192d038448c157421ab0c69377d9b8e56ab2c0249d.svg":{"logical_path":"flags/1x1/cf.svg","mtime":"2018-04-02T14:38:31+02:00","size":635,"digest":"e637674faf7edcdad37182192d038448c157421ab0c69377d9b8e56ab2c0249d","integrity":"sha256-5jdnT69+3NrTcYIZLQOESMFXQhqwxpN32bjlarLAJJ0="},"flags/4x3/cg-3729f717c83c9df7d0543a1a5d4a506efe184bdfeb39f9260b4b63edf19d2538.svg":{"logical_path":"flags/4x3/cg.svg","mtime":"2018-04-02T14:38:31+02:00","size":484,"digest":"3729f717c83c9df7d0543a1a5d4a506efe184bdfeb39f9260b4b63edf19d2538","integrity":"sha256-Nyn3F8g8nffQVDoaXUpQbv4YS9/rOfkmC0tj7fGdJTg="},"flags/1x1/cg-8353ff1f251714b1b8905eec1722378426719955d0637d206d35d1dcfa68ddcf.svg":{"logical_path":"flags/1x1/cg.svg","mtime":"2018-04-02T14:38:31+02:00","size":472,"digest":"8353ff1f251714b1b8905eec1722378426719955d0637d206d35d1dcfa68ddcf","integrity":"sha256-g1P/HyUXFLG4kF7sFyI3hCZxmVXQY30gbTXR3Ppo3c8="},"flags/4x3/ch-6739edee6d1ef72c4ed97cfe723d3bb7f17e4df5390f3a4ae234f1ffdeece0cf.svg":{"logical_path":"flags/4x3/ch.svg","mtime":"2018-04-02T14:38:31+02:00","size":300,"digest":"6739edee6d1ef72c4ed97cfe723d3bb7f17e4df5390f3a4ae234f1ffdeece0cf","integrity":"sha256-Zznt7m0e9yxO2Xz+cj07t/F+TfU5DzpK4jTx/97s4M8="},"flags/1x1/ch-7c3dec465228981c57a90a3a7b3a6c42dd3e699230663e770b55008ce6d14208.svg":{"logical_path":"flags/1x1/ch.svg","mtime":"2018-04-02T14:38:31+02:00","size":298,"digest":"7c3dec465228981c57a90a3a7b3a6c42dd3e699230663e770b55008ce6d14208","integrity":"sha256-fD3sRlIomBxXqQo6ezpsQt0+aZIwZj53C1UAjObRQgg="},"flags/4x3/ci-3e076d13c9524149508c442f8f727424660124e3591280d8ae9bddf9d8272a1e.svg":{"logical_path":"flags/4x3/ci.svg","mtime":"2018-04-02T14:38:31+02:00","size":283,"digest":"3e076d13c9524149508c442f8f727424660124e3591280d8ae9bddf9d8272a1e","integrity":"sha256-PgdtE8lSQUlQjEQvj3J0JGYBJONZEoDYrpvd+dgnKh4="},"flags/1x1/ci-691a0a8577b7d555fc90dc7170adc9ec7571191cb3507c46c0e8516fd1778a91.svg":{"logical_path":"flags/1x1/ci.svg","mtime":"2018-04-02T14:38:31+02:00","size":286,"digest":"691a0a8577b7d555fc90dc7170adc9ec7571191cb3507c46c0e8516fd1778a91","integrity":"sha256-aRoKhXe31VX8kNxxcK3J7HVxGRyzUHxGwOhRb9F3ipE="},"flags/4x3/ck-9cff098e505afde9bf5166cb7b0c409178575633b913ce08c1c700d08c477db6.svg":{"logical_path":"flags/4x3/ck.svg","mtime":"2018-04-02T14:38:31+02:00","size":1887,"digest":"9cff098e505afde9bf5166cb7b0c409178575633b913ce08c1c700d08c477db6","integrity":"sha256-nP8JjlBa/em/UWbLewxAkXhXVjO5E84IwccA0IxHfbY="},"flags/1x1/ck-9c8dffa3bd5953d8a121780831f25b58738e67f3be71961894c56dfd25848c88.svg":{"logical_path":"flags/1x1/ck.svg","mtime":"2018-04-02T14:38:31+02:00","size":1846,"digest":"9c8dffa3bd5953d8a121780831f25b58738e67f3be71961894c56dfd25848c88","integrity":"sha256-nI3/o71ZU9ihIXgIMfJbWHOOZ/O+cZYYlMVt/SWEjIg="},"flags/4x3/cl-a4c57ec2bb9adcb67e1850256e5165227b764187d6941a38d95d0def5144699b.svg":{"logical_path":"flags/4x3/cl.svg","mtime":"2018-04-02T14:38:31+02:00","size":560,"digest":"a4c57ec2bb9adcb67e1850256e5165227b764187d6941a38d95d0def5144699b","integrity":"sha256-pMV+wrua3LZ+GFAlblFlInt2QYfWlBo42V0N71FEaZs="},"flags/1x1/cl-5a3e95cf63358e3911c97404818c2cddfd46414d8445e47d6976ee166c48926c.svg":{"logical_path":"flags/1x1/cl.svg","mtime":"2018-04-02T14:38:31+02:00","size":577,"digest":"5a3e95cf63358e3911c97404818c2cddfd46414d8445e47d6976ee166c48926c","integrity":"sha256-Wj6Vz2M1jjkRyXQEgYws3f1GQU2EReR9aXbuFmxIkmw="},"flags/4x3/cm-5dce9f36d92a61bdc0c482141bdb4f55bfcec0a2ecc745db643a7953e2e5a722.svg":{"logical_path":"flags/4x3/cm.svg","mtime":"2018-04-02T14:38:31+02:00","size":827,"digest":"5dce9f36d92a61bdc0c482141bdb4f55bfcec0a2ecc745db643a7953e2e5a722","integrity":"sha256-Xc6fNtkqYb3AxIIUG9tPVb/OwKLsx0XbZDp5U+LlpyI="},"flags/1x1/cm-d8d21f54c44df5df9edef227691384a4ad37c15ff57c8aa0dead684d19eac8cd.svg":{"logical_path":"flags/1x1/cm.svg","mtime":"2018-04-02T14:38:31+02:00","size":827,"digest":"d8d21f54c44df5df9edef227691384a4ad37c15ff57c8aa0dead684d19eac8cd","integrity":"sha256-2NIfVMRN9d+e3vInaROEpK03wV/1fIqg3q1oTRnqyM0="},"flags/4x3/cn-48ce1c2837bb806a6aaf8b7a9878b6d040c0d069a0ffca9a8a49e7a31aa30e7f.svg":{"logical_path":"flags/4x3/cn.svg","mtime":"2018-04-02T14:38:31+02:00","size":804,"digest":"48ce1c2837bb806a6aaf8b7a9878b6d040c0d069a0ffca9a8a49e7a31aa30e7f","integrity":"sha256-SM4cKDe7gGpqr4t6mHi20EDA0Gmg/8qaiknnoxqjDn8="},"flags/1x1/cn-e6be64c6c4a976e64d39bfe8a6ae4a5b1d38a6aa1b138ddcacf34a942dff50bc.svg":{"logical_path":"flags/1x1/cn.svg","mtime":"2018-04-02T14:38:31+02:00","size":746,"digest":"e6be64c6c4a976e64d39bfe8a6ae4a5b1d38a6aa1b138ddcacf34a942dff50bc","integrity":"sha256-5r5kxsSpduZNOb/opq5KWx04pqobE43crPNKlC3/ULw="},"flags/4x3/co-648d3ff596a0ecf3e85ac17c53abe1d7ca4759688e10a7a3a8b56f096ba6b6f7.svg":{"logical_path":"flags/4x3/co.svg","mtime":"2018-04-02T14:38:31+02:00","size":292,"digest":"648d3ff596a0ecf3e85ac17c53abe1d7ca4759688e10a7a3a8b56f096ba6b6f7","integrity":"sha256-ZI0/9Zag7PPoWsF8U6vh18pHWWiOEKejqLVvCWumtvc="},"flags/1x1/co-d3c16180c6bce630f762aff789104d10e9dbc949e740535a61396cd0ec34c1a1.svg":{"logical_path":"flags/1x1/co.svg","mtime":"2018-04-02T14:38:31+02:00","size":292,"digest":"d3c16180c6bce630f762aff789104d10e9dbc949e740535a61396cd0ec34c1a1","integrity":"sha256-08FhgMa85jD3Yq/3iRBNEOnbyUnnQFNaYTls0Ow0waE="},"flags/4x3/cr-84aec60f19bd33e1ac1a209155fec8d372e17cb59dc1346bb9124e5cc867375d.svg":{"logical_path":"flags/4x3/cr.svg","mtime":"2018-04-02T14:38:31+02:00","size":296,"digest":"84aec60f19bd33e1ac1a209155fec8d372e17cb59dc1346bb9124e5cc867375d","integrity":"sha256-hK7GDxm9M+GsGiCRVf7I03LhfLWdwTRruRJOXMhnN10="},"flags/1x1/cr-5371cf8bc5ad1a805155c1b3065e420a0a418c8d63b472bc545890289a365b35.svg":{"logical_path":"flags/1x1/cr.svg","mtime":"2018-04-02T14:38:31+02:00","size":296,"digest":"5371cf8bc5ad1a805155c1b3065e420a0a418c8d63b472bc545890289a365b35","integrity":"sha256-U3HPi8WtGoBRVcGzBl5CCgpBjI1jtHK8VFiQKJo2WzU="},"flags/4x3/cu-bb3f857e02aeab606120d9f164283f07a44b227f12aad7d6d344c7579f7b3ff0.svg":{"logical_path":"flags/4x3/cu.svg","mtime":"2018-04-02T14:38:31+02:00","size":619,"digest":"bb3f857e02aeab606120d9f164283f07a44b227f12aad7d6d344c7579f7b3ff0","integrity":"sha256-uz+FfgKuq2BhINnxZCg/B6RLIn8SqtfW00THV597P/A="},"flags/1x1/cu-02c0054169b874a8d231de1f45b2d0884de48848157734e0ddcd0f684c05c18d.svg":{"logical_path":"flags/1x1/cu.svg","mtime":"2018-04-02T14:38:31+02:00","size":576,"digest":"02c0054169b874a8d231de1f45b2d0884de48848157734e0ddcd0f684c05c18d","integrity":"sha256-AsAFQWm4dKjSMd4fRbLQiE3kiEgVdzTg3c0PaEwFwY0="},"flags/4x3/cv-90ee90ab59713454a218d8c300c71139e62655de80bfbea81df93142a529b81f.svg":{"logical_path":"flags/4x3/cv.svg","mtime":"2018-04-02T14:38:31+02:00","size":1414,"digest":"90ee90ab59713454a218d8c300c71139e62655de80bfbea81df93142a529b81f","integrity":"sha256-kO6Qq1lxNFSiGNjDAMcROeYmVd6Av76oHfkxQqUpuB8="},"flags/1x1/cv-2cf3eede97a468d28459ccc2271c28bb5b6029af2388b0301f6203be55e49308.svg":{"logical_path":"flags/1x1/cv.svg","mtime":"2018-04-02T14:38:31+02:00","size":1362,"digest":"2cf3eede97a468d28459ccc2271c28bb5b6029af2388b0301f6203be55e49308","integrity":"sha256-LPPu3pekaNKEWczCJxwou1tgKa8jiLAwH2IDvlXkkwg="},"flags/4x3/cw-d46beb7b10b40fa82cfd40eb86a3b3879f59f5da2a2f5ef91d121ab9b16c0aad.svg":{"logical_path":"flags/4x3/cw.svg","mtime":"2018-04-02T14:38:31+02:00","size":678,"digest":"d46beb7b10b40fa82cfd40eb86a3b3879f59f5da2a2f5ef91d121ab9b16c0aad","integrity":"sha256-1GvrexC0D6gs/UDrhqOzh59Z9doqL175HRIaubFsCq0="},"flags/1x1/cw-ba78c834e61b24a8a2b6bc7c80ab9f14e42c3c69415941ddb7c8c1f652ccd8b5.svg":{"logical_path":"flags/1x1/cw.svg","mtime":"2018-04-02T14:38:31+02:00","size":685,"digest":"ba78c834e61b24a8a2b6bc7c80ab9f14e42c3c69415941ddb7c8c1f652ccd8b5","integrity":"sha256-unjINOYbJKiitrx8gKufFOQsPGlBWUHdt8jB9lLM2LU="},"flags/4x3/cx-28187fb9d91bedc6f239b107d26eb6ec1cc2a0c7730810306c5a6b313c14f2b2.svg":{"logical_path":"flags/4x3/cx.svg","mtime":"2018-04-02T14:38:31+02:00","size":2469,"digest":"28187fb9d91bedc6f239b107d26eb6ec1cc2a0c7730810306c5a6b313c14f2b2","integrity":"sha256-KBh/udkb7cbyObEH0m627BzCoMdzCBAwbFprMTwU8rI="},"flags/1x1/cx-8ebe073d997f93d092a493300ea1d234c91aef80c6e8f431e88aa7f8e724f9a6.svg":{"logical_path":"flags/1x1/cx.svg","mtime":"2018-04-02T14:38:31+02:00","size":2508,"digest":"8ebe073d997f93d092a493300ea1d234c91aef80c6e8f431e88aa7f8e724f9a6","integrity":"sha256-jr4HPZl/k9CSpJMwDqHSNMka74DG6PQx6Iqn+Ock+aY="},"flags/4x3/cy-8d633ecabc7968bb8a869c62545f122aacbbc3e108c25ceb421bb8bc8734b9be.svg":{"logical_path":"flags/4x3/cy.svg","mtime":"2018-04-02T14:38:31+02:00","size":5949,"digest":"8d633ecabc7968bb8a869c62545f122aacbbc3e108c25ceb421bb8bc8734b9be","integrity":"sha256-jWM+yrx5aLuKhpxiVF8SKqy7w+EIwlzrQhu4vIc0ub4="},"flags/1x1/cy-6ef37fdd7518f18727bec1ed9741bb4d1f854dde7ef1a7e9fd2f4ba6291a7790.svg":{"logical_path":"flags/1x1/cy.svg","mtime":"2018-04-02T14:38:31+02:00","size":6053,"digest":"6ef37fdd7518f18727bec1ed9741bb4d1f854dde7ef1a7e9fd2f4ba6291a7790","integrity":"sha256-bvN/3XUY8YcnvsHtl0G7TR+FTd5+8afp/S9Lpikad5A="},"flags/4x3/cz-6c94e3d53fc1ae5982d8eb058b76d86f07d3fb4cd325698fea3291fa35504c56.svg":{"logical_path":"flags/4x3/cz.svg","mtime":"2018-04-02T14:38:31+02:00","size":481,"digest":"6c94e3d53fc1ae5982d8eb058b76d86f07d3fb4cd325698fea3291fa35504c56","integrity":"sha256-bJTj1T/BrlmC2OsFi3bYbwfT+0zTJWmP6jKR+jVQTFY="},"flags/1x1/cz-af9898ebd32559cdbea2fd17b351e5eedafccada6fbc6a2b7952cad78369817e.svg":{"logical_path":"flags/1x1/cz.svg","mtime":"2018-04-02T14:38:31+02:00","size":483,"digest":"af9898ebd32559cdbea2fd17b351e5eedafccada6fbc6a2b7952cad78369817e","integrity":"sha256-r5iY69MlWc2+ov0Xs1Hl7tr8ytpvvGoreVLK14NpgX4="},"flags/4x3/de-e7323083675d25107c85f0cea6534bd21d21e77e6d524d92e1b2d0a4e21117a1.svg":{"logical_path":"flags/4x3/de.svg","mtime":"2018-04-02T14:38:31+02:00","size":216,"digest":"e7323083675d25107c85f0cea6534bd21d21e77e6d524d92e1b2d0a4e21117a1","integrity":"sha256-5zIwg2ddJRB8hfDOplNL0h0h535tUk2S4bLQpOIRF6E="},"flags/1x1/de-fdb60146952d3b2d104310b28882a0ecde44d808240c3bab2cd6c302a538b266.svg":{"logical_path":"flags/1x1/de.svg","mtime":"2018-04-02T14:38:31+02:00","size":224,"digest":"fdb60146952d3b2d104310b28882a0ecde44d808240c3bab2cd6c302a538b266","integrity":"sha256-/bYBRpUtOy0QQxCyiIKg7N5E2AgkDDurLNbDAqU4smY="},"flags/4x3/dj-546da4a0dae9b1ab74dc6ac6076d0c706f37ef2a0d799342dd0345e11f770f03.svg":{"logical_path":"flags/4x3/dj.svg","mtime":"2018-04-02T14:38:31+02:00","size":588,"digest":"546da4a0dae9b1ab74dc6ac6076d0c706f37ef2a0d799342dd0345e11f770f03","integrity":"sha256-VG2koNrpsat03GrGB20McG837yoNeZNC3QNF4R93DwM="},"flags/1x1/dj-c0481b667f003d9d5a3c93861023a97a98224227ac19aa7e07b5b6edd35fe900.svg":{"logical_path":"flags/1x1/dj.svg","mtime":"2018-04-02T14:38:31+02:00","size":588,"digest":"c0481b667f003d9d5a3c93861023a97a98224227ac19aa7e07b5b6edd35fe900","integrity":"sha256-wEgbZn8APZ1aPJOGECOpepgiQiesGap+B7W27dNf6QA="},"flags/4x3/dk-a13735c0337ab4679cd8679508bf5e8067637ab611ca5c54172c621d740420e5.svg":{"logical_path":"flags/4x3/dk.svg","mtime":"2018-04-02T14:38:31+02:00","size":242,"digest":"a13735c0337ab4679cd8679508bf5e8067637ab611ca5c54172c621d740420e5","integrity":"sha256-oTc1wDN6tGec2GeVCL9egGdjerYRylxUFyxiHXQEIOU="},"flags/1x1/dk-822a3b8b6948f49aa81fe7620bd173453d9a45406a9680f24bad7e714e58cb7c.svg":{"logical_path":"flags/1x1/dk.svg","mtime":"2018-04-02T14:38:31+02:00","size":238,"digest":"822a3b8b6948f49aa81fe7620bd173453d9a45406a9680f24bad7e714e58cb7c","integrity":"sha256-gio7i2lI9JqoH+diC9FzRT2aRUBqloDyS61+cU5Yy3w="},"flags/4x3/dm-7713fabd3cf341694b4c1ef5d1379820773722b61c190234ac7416f2872e3940.svg":{"logical_path":"flags/4x3/dm.svg","mtime":"2018-04-02T14:38:31+02:00","size":16026,"digest":"7713fabd3cf341694b4c1ef5d1379820773722b61c190234ac7416f2872e3940","integrity":"sha256-dxP6vTzzQWlLTB710TeYIHc3IrYcGQI0rHQW8ocuOUA="},"flags/1x1/dm-33d984fc9897bb2a3bd16c6672b876effc1a8adc0c57ad122a16db54061e4e46.svg":{"logical_path":"flags/1x1/dm.svg","mtime":"2018-04-02T14:38:31+02:00","size":16514,"digest":"33d984fc9897bb2a3bd16c6672b876effc1a8adc0c57ad122a16db54061e4e46","integrity":"sha256-M9mE/JiXuyo70Wxmcrh27/waitwMV60SKhbbVAYeTkY="},"flags/4x3/do-714b6f307ea3a9c3d30348684b8574e8b7f5078f51649dfa97ae2a69a7108b4a.svg":{"logical_path":"flags/4x3/do.svg","mtime":"2018-04-02T14:38:31+02:00","size":394146,"digest":"714b6f307ea3a9c3d30348684b8574e8b7f5078f51649dfa97ae2a69a7108b4a","integrity":"sha256-cUtvMH6jqcPTA0hoS4V06Lf1B49RZJ36l64qaacQi0o="},"flags/1x1/do-d37306c4b346f89ea14739144374caad69652be31e8ce8e2504c9a0d422a4857.svg":{"logical_path":"flags/1x1/do.svg","mtime":"2018-04-02T14:38:31+02:00","size":391714,"digest":"d37306c4b346f89ea14739144374caad69652be31e8ce8e2504c9a0d422a4857","integrity":"sha256-03MGxLNG+J6hRzkUQ3TKrWllK+MejOjiUEyaDUIqSFc="},"flags/4x3/dz-a96e943c830558fe9823044aac2bfb3f6a4caf3bd3c57943352280a7f6b68cb1.svg":{"logical_path":"flags/4x3/dz.svg","mtime":"2018-04-02T14:38:31+02:00","size":301,"digest":"a96e943c830558fe9823044aac2bfb3f6a4caf3bd3c57943352280a7f6b68cb1","integrity":"sha256-qW6UPIMFWP6YIwRKrCv7P2pMrzvTxXlDNSKAp/a2jLE="},"flags/1x1/dz-09400d3b2c58e641a1641a687b81476761d05f9d0ff65861aeaa33c7f508cda4.svg":{"logical_path":"flags/1x1/dz.svg","mtime":"2018-04-02T14:38:31+02:00","size":312,"digest":"09400d3b2c58e641a1641a687b81476761d05f9d0ff65861aeaa33c7f508cda4","integrity":"sha256-CUANOyxY5kGhZBpoe4FHZ2HQX50P9lhhrqozx/UIzaQ="},"flags/4x3/ec-6762ba85ea0f7bb289b0aa6219c797e5243103d281b1462c61b61030fa329d5e.svg":{"logical_path":"flags/4x3/ec.svg","mtime":"2018-04-02T14:38:31+02:00","size":29417,"digest":"6762ba85ea0f7bb289b0aa6219c797e5243103d281b1462c61b61030fa329d5e","integrity":"sha256-Z2K6heoPe7KJsKpiGceX5SQxA9KBsUYsYbYQMPoynV4="},"flags/1x1/ec-7410a75a013738fbb8cbd756d967380e02ae54ca74e9ef9a41c4b583c2c2794f.svg":{"logical_path":"flags/1x1/ec.svg","mtime":"2018-04-02T14:38:31+02:00","size":29972,"digest":"7410a75a013738fbb8cbd756d967380e02ae54ca74e9ef9a41c4b583c2c2794f","integrity":"sha256-dBCnWgE3OPu4y9dW2Wc4DgKuVMp06e+aQcS1g8LCeU8="},"flags/4x3/ee-ce3b622214bd9eefb43373cae2811ea8cf6ef6a16bb6afbaa5bcaaea34024da0.svg":{"logical_path":"flags/4x3/ee.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"ce3b622214bd9eefb43373cae2811ea8cf6ef6a16bb6afbaa5bcaaea34024da0","integrity":"sha256-zjtiIhS9nu+0M3PK4oEeqM9u9qFrtq+6pbyq6jQCTaA="},"flags/1x1/ee-a207a8363b4dde44f59951501c2cb539419e92b0814b25d6448710ced52226f8.svg":{"logical_path":"flags/1x1/ee.svg","mtime":"2018-04-02T14:38:31+02:00","size":355,"digest":"a207a8363b4dde44f59951501c2cb539419e92b0814b25d6448710ced52226f8","integrity":"sha256-ogeoNjtN3kT1mVFQHCy1OUGekrCBSyXWRIcQztUiJvg="},"flags/4x3/eg-16a11fa93856ddc5fd46f8811adfc93660175724b20eaab55ff046855a352d2c.svg":{"logical_path":"flags/4x3/eg.svg","mtime":"2018-04-02T14:38:31+02:00","size":9978,"digest":"16a11fa93856ddc5fd46f8811adfc93660175724b20eaab55ff046855a352d2c","integrity":"sha256-FqEfqThW3cX9RviBGt/JNmAXVySyDqq1X/BGhVo1LSw="},"flags/1x1/eg-9f4d098c604326bbc3692f9e2f335dbc9b34bdf2706565bf448380f0a889d1e2.svg":{"logical_path":"flags/1x1/eg.svg","mtime":"2018-04-02T14:38:31+02:00","size":9992,"digest":"9f4d098c604326bbc3692f9e2f335dbc9b34bdf2706565bf448380f0a889d1e2","integrity":"sha256-n00JjGBDJrvDaS+eLzNdvJs0vfJwZWW/RIOA8KiJ0eI="},"flags/4x3/eh-9cf4a74d29c1a1afc4137deeb5b678d55c8fbdf8d181217267f3a5cce6a76a97.svg":{"logical_path":"flags/4x3/eh.svg","mtime":"2018-04-02T14:38:31+02:00","size":878,"digest":"9cf4a74d29c1a1afc4137deeb5b678d55c8fbdf8d181217267f3a5cce6a76a97","integrity":"sha256-nPSnTSnBoa/EE33utbZ41VyPvfjRgSFyZ/OlzOanapc="},"flags/1x1/eh-16c3327dbcf3483e634b3536b056324b5478212dae6d060f2ffb2ec961cd382f.svg":{"logical_path":"flags/1x1/eh.svg","mtime":"2018-04-02T14:38:31+02:00","size":828,"digest":"16c3327dbcf3483e634b3536b056324b5478212dae6d060f2ffb2ec961cd382f","integrity":"sha256-FsMyfbzzSD5jSzU2sFYyS1R4IS2ubQYPL/suyWHNOC8="},"flags/4x3/er-69a1e1e45289d1282df4b1e5ce5e712d69fbe314abd0c922353fce90814c543e.svg":{"logical_path":"flags/4x3/er.svg","mtime":"2018-04-02T14:38:31+02:00","size":3207,"digest":"69a1e1e45289d1282df4b1e5ce5e712d69fbe314abd0c922353fce90814c543e","integrity":"sha256-aaHh5FKJ0Sgt9LHlzl5xLWn74xSr0MkiNT/OkIFMVD4="},"flags/1x1/er-90d49408e58955cf1cf3185b0193e03c4a107042d47ef5e975dbbe10c6ef7f4a.svg":{"logical_path":"flags/1x1/er.svg","mtime":"2018-04-02T14:38:31+02:00","size":3395,"digest":"90d49408e58955cf1cf3185b0193e03c4a107042d47ef5e975dbbe10c6ef7f4a","integrity":"sha256-kNSUCOWJVc8c8xhbAZPgPEoQcELUfvXpddu+EMbvf0o="},"flags/4x3/es-50e59681c6b6412498bd9cbfc473abedc713db75c54c538b839db3c394d64499.svg":{"logical_path":"flags/4x3/es.svg","mtime":"2018-04-02T14:38:31+02:00","size":92574,"digest":"50e59681c6b6412498bd9cbfc473abedc713db75c54c538b839db3c394d64499","integrity":"sha256-UOWWgca2QSSYvZy/xHOr7ccT23XFTFOLg52zw5TWRJk="},"flags/1x1/es-29c68fa3c9c8c2adacdc2eb0162e9c2fa998faa408836900ec6285000476800d.svg":{"logical_path":"flags/1x1/es.svg","mtime":"2018-04-02T14:38:31+02:00","size":94269,"digest":"29c68fa3c9c8c2adacdc2eb0162e9c2fa998faa408836900ec6285000476800d","integrity":"sha256-KcaPo8nIwq2s3C6wFi6cL6mY+qQIg2kA7GKFAAR2gA0="},"flags/4x3/et-14263ba7ea890fd0a4d89a2791343ecb7acc89aab1fc2593e00a6093b22251df.svg":{"logical_path":"flags/4x3/et.svg","mtime":"2018-04-02T14:38:31+02:00","size":1243,"digest":"14263ba7ea890fd0a4d89a2791343ecb7acc89aab1fc2593e00a6093b22251df","integrity":"sha256-FCY7p+qJD9Ck2JonkTQ+y3rMiaqx/CWT4Apgk7IiUd8="},"flags/1x1/et-086eefb70e9adad537cc1c640a72cc0fa843ec7a9b06b2778aa98b2db055bfe6.svg":{"logical_path":"flags/1x1/et.svg","mtime":"2018-04-02T14:38:31+02:00","size":1242,"digest":"086eefb70e9adad537cc1c640a72cc0fa843ec7a9b06b2778aa98b2db055bfe6","integrity":"sha256-CG7vtw6a2tU3zBxkCnLMD6hD7HqbBrJ3iqmLLbBVv+Y="},"flags/4x3/fi-a4c41caa02a4f6803ea0d6c36de4beebf20d150e3df742b1369a4099c2ff648e.svg":{"logical_path":"flags/4x3/fi.svg","mtime":"2018-04-02T14:38:31+02:00","size":240,"digest":"a4c41caa02a4f6803ea0d6c36de4beebf20d150e3df742b1369a4099c2ff648e","integrity":"sha256-pMQcqgKk9oA+oNbDbeS+6/INFQ4990KxNppAmcL/ZI4="},"flags/1x1/fi-c5fdf318fac5fdfc94fe54268618e58a2bc5933617ead09992900f90cc25de9a.svg":{"logical_path":"flags/1x1/fi.svg","mtime":"2018-04-02T14:38:31+02:00","size":243,"digest":"c5fdf318fac5fdfc94fe54268618e58a2bc5933617ead09992900f90cc25de9a","integrity":"sha256-xf3zGPrF/fyU/lQmhhjliivFkzYX6tCZkpAPkMwl3po="},"flags/4x3/fj-cb0cc4b3b5c202f07487ee519f48b3eadb47035f5f2d5d3f99d20f81e48d6b79.svg":{"logical_path":"flags/4x3/fj.svg","mtime":"2018-04-02T14:38:31+02:00","size":27388,"digest":"cb0cc4b3b5c202f07487ee519f48b3eadb47035f5f2d5d3f99d20f81e48d6b79","integrity":"sha256-ywzEs7XCAvB0h+5Rn0iz6ttHA19fLV0/mdIPgeSNa3k="},"flags/1x1/fj-c2c7fd536841925e7647b2d510d6a0c58700e2a8ded0e42008fb93ffacde101f.svg":{"logical_path":"flags/1x1/fj.svg","mtime":"2018-04-02T14:38:31+02:00","size":27519,"digest":"c2c7fd536841925e7647b2d510d6a0c58700e2a8ded0e42008fb93ffacde101f","integrity":"sha256-wsf9U2hBkl52R7LVENagxYcA4qje0OQgCPuT/6zeEB8="},"flags/4x3/fk-cb61eaa0d7221823f7d17de59ea88ed16b506f9585ab0c7291cf839449d82968.svg":{"logical_path":"flags/4x3/fk.svg","mtime":"2018-04-02T14:38:31+02:00","size":30453,"digest":"cb61eaa0d7221823f7d17de59ea88ed16b506f9585ab0c7291cf839449d82968","integrity":"sha256-y2HqoNciGCP30X3lnqiO0WtQb5WFqwxykc+DlEnYKWg="},"flags/1x1/fk-a871742380ae157d1211a63cc35cd3621b1bf6de6d67e4a8e3565ad200b1d8cf.svg":{"logical_path":"flags/1x1/fk.svg","mtime":"2018-04-02T14:38:31+02:00","size":30648,"digest":"a871742380ae157d1211a63cc35cd3621b1bf6de6d67e4a8e3565ad200b1d8cf","integrity":"sha256-qHF0I4CuFX0SEaY8w1zTYhsb9t5tZ+So41Za0gCx2M8="},"flags/4x3/fm-079b937562a9a412aae8fb762b571ddb49bf23627943c97247b6a9bbdb768153.svg":{"logical_path":"flags/4x3/fm.svg","mtime":"2018-04-02T14:38:31+02:00","size":773,"digest":"079b937562a9a412aae8fb762b571ddb49bf23627943c97247b6a9bbdb768153","integrity":"sha256-B5uTdWKppBKq6Pt2K1cd20m/I2J5Q8lyR7apu9t2gVM="},"flags/1x1/fm-dbec73633ecd8a6c50f56d54df36bbe6a2f8fb534ac7658477c82cad14a806a8.svg":{"logical_path":"flags/1x1/fm.svg","mtime":"2018-04-02T14:38:31+02:00","size":763,"digest":"dbec73633ecd8a6c50f56d54df36bbe6a2f8fb534ac7658477c82cad14a806a8","integrity":"sha256-2+xzYz7NimxQ9W1U3za75qL4+1NKx2WEd8gsrRSoBqg="},"flags/4x3/fo-27279c2481bb1cb3e44850a948987d6a8411acffa770c3aecd1b76d4c5853413.svg":{"logical_path":"flags/4x3/fo.svg","mtime":"2018-04-02T14:38:31+02:00","size":567,"digest":"27279c2481bb1cb3e44850a948987d6a8411acffa770c3aecd1b76d4c5853413","integrity":"sha256-JyecJIG7HLPkSFCpSJh9aoQRrP+ncMOuzRt21MWFNBM="},"flags/1x1/fo-7cb4fdbba1c7223702d843cb0709ddc799f89f909dfe101e3e36d6bf36c3e67f.svg":{"logical_path":"flags/1x1/fo.svg","mtime":"2018-04-02T14:38:31+02:00","size":537,"digest":"7cb4fdbba1c7223702d843cb0709ddc799f89f909dfe101e3e36d6bf36c3e67f","integrity":"sha256-fLT9u6HHIjcC2EPLBwndx5n4n5Cd/hAePjbWvzbD5n8="},"flags/4x3/fr-30ed2f68dc9a17927643640f48f3d2a858bd041770547035349c6e79713cd84e.svg":{"logical_path":"flags/4x3/fr.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"30ed2f68dc9a17927643640f48f3d2a858bd041770547035349c6e79713cd84e","integrity":"sha256-MO0vaNyaF5J2Q2QPSPPSqFi9BBdwVHA1NJxueXE82E4="},"flags/1x1/fr-6b849151204c66fa661c30b34e62919a13b9e66b7cd37a4fc8962e8e0baf9bdc.svg":{"logical_path":"flags/1x1/fr.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"6b849151204c66fa661c30b34e62919a13b9e66b7cd37a4fc8962e8e0baf9bdc","integrity":"sha256-a4SRUSBMZvpmHDCzTmKRmhO55mt803pPyJYujguvm9w="},"flags/4x3/ga-e3840f9d5bd6ee08db748d37a534500b837bee0f8ce65987b2f099a6afd2cc63.svg":{"logical_path":"flags/4x3/ga.svg","mtime":"2018-04-02T14:38:31+02:00","size":277,"digest":"e3840f9d5bd6ee08db748d37a534500b837bee0f8ce65987b2f099a6afd2cc63","integrity":"sha256-44QPnVvW7gjbdI03pTRQC4N77g+M5lmHsvCZpq/SzGM="},"flags/1x1/ga-9eafd5388042b3d2258ac6223075b726426210136b9851b637973105721b64d9.svg":{"logical_path":"flags/1x1/ga.svg","mtime":"2018-04-02T14:38:31+02:00","size":281,"digest":"9eafd5388042b3d2258ac6223075b726426210136b9851b637973105721b64d9","integrity":"sha256-nq/VOIBCs9IlisYiMHW3JkJiEBNrmFG2N5cxBXIbZNk="},"flags/4x3/gb-ce93c8a6b974d63998e263f6d25f898fc20580a28464457f2f4463b687e4fe8d.svg":{"logical_path":"flags/4x3/gb.svg","mtime":"2018-04-02T14:38:31+02:00","size":834,"digest":"ce93c8a6b974d63998e263f6d25f898fc20580a28464457f2f4463b687e4fe8d","integrity":"sha256-zpPIprl01jmY4mP20l+Jj8IFgKKEZEV/L0Rjtofk/o0="},"flags/1x1/gb-1d93e1ce2e2e10c1709e4dc50ac956c007b2c1a63a4bc22ddfd64354f79ad457.svg":{"logical_path":"flags/1x1/gb.svg","mtime":"2018-04-02T14:38:31+02:00","size":792,"digest":"1d93e1ce2e2e10c1709e4dc50ac956c007b2c1a63a4bc22ddfd64354f79ad457","integrity":"sha256-HZPhzi4uEMFwnk3FCslWwAeywaY6S8It39ZDVPea1Fc="},"flags/4x3/gd-7c3a6b6068bbd9a6abc98c2297dd4acd5e31022e5a4210fc0e1205ec28498fa2.svg":{"logical_path":"flags/4x3/gd.svg","mtime":"2018-04-02T14:38:31+02:00","size":1694,"digest":"7c3a6b6068bbd9a6abc98c2297dd4acd5e31022e5a4210fc0e1205ec28498fa2","integrity":"sha256-fDprYGi72aaryYwil91KzV4xAi5aQhD8DhIF7ChJj6I="},"flags/1x1/gd-2310bc03d9e8ddc8599b40891bfb10b812b07023881599a7e02e3028d1bc9ca8.svg":{"logical_path":"flags/1x1/gd.svg","mtime":"2018-04-02T14:38:31+02:00","size":1834,"digest":"2310bc03d9e8ddc8599b40891bfb10b812b07023881599a7e02e3028d1bc9ca8","integrity":"sha256-IxC8A9no3chZm0CJG/sQuBKwcCOIFZmn4C4wKNG8nKg="},"flags/4x3/ge-501c0135fb8c377dbd2859ff6290b47ef4907a8e2ab2ae1e39116b716db6795f.svg":{"logical_path":"flags/4x3/ge.svg","mtime":"2018-04-02T14:38:31+02:00","size":1400,"digest":"501c0135fb8c377dbd2859ff6290b47ef4907a8e2ab2ae1e39116b716db6795f","integrity":"sha256-UBwBNfuMN329KFn/YpC0fvSQeo4qsq4eORFrcW22eV8="},"flags/1x1/ge-ca9ee36883ec12048fbb7fbbfaf231c0d4848ae0b07dab74a46d53b7b34d8114.svg":{"logical_path":"flags/1x1/ge.svg","mtime":"2018-04-02T14:38:31+02:00","size":1544,"digest":"ca9ee36883ec12048fbb7fbbfaf231c0d4848ae0b07dab74a46d53b7b34d8114","integrity":"sha256-yp7jaIPsEgSPu3+7+vIxwNSEiuCwfat0pG1Tt7NNgRQ="},"flags/4x3/gf-7c165f90bfe6ac3674903632182221a992f017ff706354b1761002382e89c2c2.svg":{"logical_path":"flags/4x3/gf.svg","mtime":"2018-04-02T14:38:31+02:00","size":261,"digest":"7c165f90bfe6ac3674903632182221a992f017ff706354b1761002382e89c2c2","integrity":"sha256-fBZfkL/mrDZ0kDYyGCIhqZLwF/9wY1SxdhACOC6JwsI="},"flags/1x1/gf-8838337b15cdcf143fac16c714e8dbf2d893d2ea8f1c8ef06dadcb652dfec41c.svg":{"logical_path":"flags/1x1/gf.svg","mtime":"2018-04-02T14:38:31+02:00","size":264,"digest":"8838337b15cdcf143fac16c714e8dbf2d893d2ea8f1c8ef06dadcb652dfec41c","integrity":"sha256-iDgzexXNzxQ/rBbHFOjb8tiT0uqPHI7wba3LZS3+xBw="},"flags/4x3/gg-2c7bfc50d5bcd374b5f6107974d06af24e70edba31ad71a225e0c2ecc2d6e778.svg":{"logical_path":"flags/4x3/gg.svg","mtime":"2018-04-02T14:38:31+02:00","size":598,"digest":"2c7bfc50d5bcd374b5f6107974d06af24e70edba31ad71a225e0c2ecc2d6e778","integrity":"sha256-LHv8UNW803S19hB5dNBq8k5w7boxrXGiJeDC7MLW53g="},"flags/1x1/gg-509489b1792831bb27d6975c76aa0a2ac2fa2c3906bcf844f616de5e0fbbc359.svg":{"logical_path":"flags/1x1/gg.svg","mtime":"2018-04-02T14:38:31+02:00","size":628,"digest":"509489b1792831bb27d6975c76aa0a2ac2fa2c3906bcf844f616de5e0fbbc359","integrity":"sha256-UJSJsXkoMbsn1pdcdqoKKsL6LDkGvPhE9hbeXg+7w1k="},"flags/4x3/gh-79c187756e93df22fae571ad9419629c5247c016e32a74471e0d461048fdf5cf.svg":{"logical_path":"flags/4x3/gh.svg","mtime":"2018-04-02T14:38:31+02:00","size":286,"digest":"79c187756e93df22fae571ad9419629c5247c016e32a74471e0d461048fdf5cf","integrity":"sha256-ecGHdW6T3yL65XGtlBlinFJHwBbjKnRHHg1GEEj99c8="},"flags/1x1/gh-e7bf18e6337982ee31e3673ab93e722b3410b7a4c202656a4bc3887d8656286b.svg":{"logical_path":"flags/1x1/gh.svg","mtime":"2018-04-02T14:38:31+02:00","size":299,"digest":"e7bf18e6337982ee31e3673ab93e722b3410b7a4c202656a4bc3887d8656286b","integrity":"sha256-578Y5jN5gu4x42c6uT5yKzQQt6TCAmVqS8OIfYZWKGs="},"flags/4x3/gi-ed99b369c8c77e64abd59fab1f28155d71b4378b49625c66ab0ab6dff4f88087.svg":{"logical_path":"flags/4x3/gi.svg","mtime":"2018-04-02T14:38:31+02:00","size":2972,"digest":"ed99b369c8c77e64abd59fab1f28155d71b4378b49625c66ab0ab6dff4f88087","integrity":"sha256-7ZmzacjHfmSr1Z+rHygVXXG0N4tJYlxmqwq23/T4gIc="},"flags/1x1/gi-2e563e96e766e13c0a9c5a3a372059a44739bb696e853d71a6f6b08c491dfb9a.svg":{"logical_path":"flags/1x1/gi.svg","mtime":"2018-04-02T14:38:31+02:00","size":2964,"digest":"2e563e96e766e13c0a9c5a3a372059a44739bb696e853d71a6f6b08c491dfb9a","integrity":"sha256-LlY+ludm4TwKnFo6NyBZpEc5u2luhT1xpvawjEkd+5o="},"flags/4x3/gl-612e560dbad68d540be672b80e22c54db43d6e2070523e81c156ccd6b3fc4260.svg":{"logical_path":"flags/4x3/gl.svg","mtime":"2018-04-02T14:38:31+02:00","size":229,"digest":"612e560dbad68d540be672b80e22c54db43d6e2070523e81c156ccd6b3fc4260","integrity":"sha256-YS5WDbrWjVQL5nK4DiLFTbQ9biBwUj6BwVbM1rP8QmA="},"flags/1x1/gl-a9bb35d2b9ff27638658d9ad6b9e2c4f452072b9a80b508d32e76d37bf62cf6e.svg":{"logical_path":"flags/1x1/gl.svg","mtime":"2018-04-02T14:38:31+02:00","size":243,"digest":"a9bb35d2b9ff27638658d9ad6b9e2c4f452072b9a80b508d32e76d37bf62cf6e","integrity":"sha256-qbs10rn/J2OGWNmta54sT0UgcrmoC1CNMudtN79iz24="},"flags/4x3/gm-4a6f9670a41548cceaced2b728e4bc56acbc4a3ba5544e7a097f7dae7a8bb045.svg":{"logical_path":"flags/4x3/gm.svg","mtime":"2018-04-02T14:38:31+02:00","size":543,"digest":"4a6f9670a41548cceaced2b728e4bc56acbc4a3ba5544e7a097f7dae7a8bb045","integrity":"sha256-Sm+WcKQVSMzqztK3KOS8Vqy8SjulVE56CX99rnqLsEU="},"flags/1x1/gm-b67f9f6bce2f8c8700c198de8bfafac72d01b8a1e55b77f71e8cafdc58f8af5c.svg":{"logical_path":"flags/1x1/gm.svg","mtime":"2018-04-02T14:38:31+02:00","size":385,"digest":"b67f9f6bce2f8c8700c198de8bfafac72d01b8a1e55b77f71e8cafdc58f8af5c","integrity":"sha256-tn+fa84vjIcAwZjei/r6xy0BuKHlW3f3Hoyv3Fj4r1w="},"flags/4x3/gn-873b4eb52f34c7558bef93cfd1b82117b5c32c9fbc0610f8821ccd22f28abe28.svg":{"logical_path":"flags/4x3/gn.svg","mtime":"2018-04-02T14:38:31+02:00","size":298,"digest":"873b4eb52f34c7558bef93cfd1b82117b5c32c9fbc0610f8821ccd22f28abe28","integrity":"sha256-hztOtS80x1WL75PP0bghF7XDLJ+8BhD4ghzNIvKKvig="},"flags/1x1/gn-72f51dc30cf0ed5459ad0f239cf3043eac05ece75945bcaf4ea6653af868c504.svg":{"logical_path":"flags/1x1/gn.svg","mtime":"2018-04-02T14:38:31+02:00","size":298,"digest":"72f51dc30cf0ed5459ad0f239cf3043eac05ece75945bcaf4ea6653af868c504","integrity":"sha256-cvUdwwzw7VRZrQ8jnPMEPqwF7OdZRbyvTqZlOvhoxQQ="},"flags/4x3/gp-4559cad3eb2d173214161d16b0237c68f5c817749a39c862fa7b23dfb4aee923.svg":{"logical_path":"flags/4x3/gp.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"4559cad3eb2d173214161d16b0237c68f5c817749a39c862fa7b23dfb4aee923","integrity":"sha256-RVnK0+stFzIUFh0WsCN8aPXIF3SaOchi+nsj37Su6SM="},"flags/1x1/gp-d6669532054db5b7e441f4858c28920246a65ca3e8a15518c64c7bbb4f9c6416.svg":{"logical_path":"flags/1x1/gp.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"d6669532054db5b7e441f4858c28920246a65ca3e8a15518c64c7bbb4f9c6416","integrity":"sha256-1maVMgVNtbfkQfSFjCiSAkamXKPooVUYxkx7u0+cZBY="},"flags/4x3/gq-0c8dfe7f9543307056bbe6d6e44a16c17201228e5344d5afec1ccf1b9a5eb2f9.svg":{"logical_path":"flags/4x3/gq.svg","mtime":"2018-04-02T14:38:31+02:00","size":5188,"digest":"0c8dfe7f9543307056bbe6d6e44a16c17201228e5344d5afec1ccf1b9a5eb2f9","integrity":"sha256-DI3+f5VDMHBWu+bW5EoWwXIBIo5TRNWv7BzPG5pesvk="},"flags/1x1/gq-ecb761e6db59b9bf8ba37533eaf0c60b7fcc7c0dfa2fcf281ee84c970dcb10f8.svg":{"logical_path":"flags/1x1/gq.svg","mtime":"2018-04-02T14:38:31+02:00","size":5280,"digest":"ecb761e6db59b9bf8ba37533eaf0c60b7fcc7c0dfa2fcf281ee84c970dcb10f8","integrity":"sha256-7Ldh5ttZub+Lo3Uz6vDGC3/MfA36L88oHuhMlw3LEPg="},"flags/4x3/gr-4a4086310397bffa682d439be8650a9e28d94e32963b6411b61435292ac4cf80.svg":{"logical_path":"flags/4x3/gr.svg","mtime":"2018-04-02T14:38:31+02:00","size":818,"digest":"4a4086310397bffa682d439be8650a9e28d94e32963b6411b61435292ac4cf80","integrity":"sha256-SkCGMQOXv/poLUOb6GUKnijZTjKWO2QRthQ1KSrEz4A="},"flags/1x1/gr-0cbd171892c0568b055d3b6585d58ac13dd60dfbcfad16eda1f4f9ead11dd16f.svg":{"logical_path":"flags/1x1/gr.svg","mtime":"2018-04-02T14:38:31+02:00","size":875,"digest":"0cbd171892c0568b055d3b6585d58ac13dd60dfbcfad16eda1f4f9ead11dd16f","integrity":"sha256-DL0XGJLAVosFXTtlhdWKwT3WDfvPrRbtofT56tEd0W8="},"flags/4x3/gs-e45169a93a9e94c15f5cb765a6c863319171fb9b4dce56094411829cd688d486.svg":{"logical_path":"flags/4x3/gs.svg","mtime":"2018-04-02T14:38:31+02:00","size":34658,"digest":"e45169a93a9e94c15f5cb765a6c863319171fb9b4dce56094411829cd688d486","integrity":"sha256-5FFpqTqelMFfXLdlpshjMZFx+5tNzlYJRBGCnNaI1IY="},"flags/1x1/gs-3efc9e1b32961f9aa9d7faa2626e596282b63d049f6717c2378b28e3f508e79a.svg":{"logical_path":"flags/1x1/gs.svg","mtime":"2018-04-02T14:38:31+02:00","size":35151,"digest":"3efc9e1b32961f9aa9d7faa2626e596282b63d049f6717c2378b28e3f508e79a","integrity":"sha256-PvyeGzKWH5qp1/qiYm5ZYoK2PQSfZxfCN4so4/UI55o="},"flags/4x3/gt-64a7345cf66facf7f323d2142aebb4172191108a78ac7493b1a6077b78ac8ec5.svg":{"logical_path":"flags/4x3/gt.svg","mtime":"2018-04-02T14:38:31+02:00","size":37857,"digest":"64a7345cf66facf7f323d2142aebb4172191108a78ac7493b1a6077b78ac8ec5","integrity":"sha256-ZKc0XPZvrPfzI9IUKuu0FyGREIp4rHSTsaYHe3isjsU="},"flags/1x1/gt-436a2af3d95cf3cb13ded897f319cfd6e2c087d678ad0e971c198b0d2c029911.svg":{"logical_path":"flags/1x1/gt.svg","mtime":"2018-04-02T14:38:31+02:00","size":37857,"digest":"436a2af3d95cf3cb13ded897f319cfd6e2c087d678ad0e971c198b0d2c029911","integrity":"sha256-Q2oq89lc88sT3tiX8xnP1uLAh9Z4rQ6XHBmLDSwCmRE="},"flags/4x3/gu-f560822ee237e5277829e63613a615a2ee3d8cc6196dffffe0f0d56a49b11c53.svg":{"logical_path":"flags/4x3/gu.svg","mtime":"2018-04-02T14:38:31+02:00","size":4859,"digest":"f560822ee237e5277829e63613a615a2ee3d8cc6196dffffe0f0d56a49b11c53","integrity":"sha256-9WCCLuI35Sd4KeY2E6YVou49jMYZbf//4PDVakmxHFM="},"flags/1x1/gu-a71c9d290c66c1a0929b05436dc6a8229b1147d7cc62336e04c9adf697030450.svg":{"logical_path":"flags/1x1/gu.svg","mtime":"2018-04-02T14:38:31+02:00","size":4644,"digest":"a71c9d290c66c1a0929b05436dc6a8229b1147d7cc62336e04c9adf697030450","integrity":"sha256-pxydKQxmwaCSmwVDbcaoIpsRR9fMYjNuBMmt9pcDBFA="},"flags/4x3/gw-0dc9ec17735ed605b68672947ce55c49a4ec1551491ccd121f482c1875cdf219.svg":{"logical_path":"flags/4x3/gw.svg","mtime":"2018-04-02T14:38:31+02:00","size":816,"digest":"0dc9ec17735ed605b68672947ce55c49a4ec1551491ccd121f482c1875cdf219","integrity":"sha256-DcnsF3Ne1gW2hnKUfOVcSaTsFVFJHM0SH0gsGHXN8hk="},"flags/1x1/gw-7868c305e4a64b0d8ebfd3f7cb8c881841d71a7e0c3ead2683fe503c80de0674.svg":{"logical_path":"flags/1x1/gw.svg","mtime":"2018-04-02T14:38:31+02:00","size":892,"digest":"7868c305e4a64b0d8ebfd3f7cb8c881841d71a7e0c3ead2683fe503c80de0674","integrity":"sha256-eGjDBeSmSw2Ov9P3y4yIGEHXGn4MPq0mg/5QPIDeBnQ="},"flags/4x3/gy-c9126e544c62508abfb898f0af0bd79c46f4c767c9ed6f928418a24b0f246d85.svg":{"logical_path":"flags/4x3/gy.svg","mtime":"2018-04-02T14:38:31+02:00","size":491,"digest":"c9126e544c62508abfb898f0af0bd79c46f4c767c9ed6f928418a24b0f246d85","integrity":"sha256-yRJuVExiUIq/uJjwrwvXnEb0x2fJ7W+ShBiiSw8kbYU="},"flags/1x1/gy-0e3b849ce460f8ab1ec7cf66a25be1ba91e89b72d8b0aa679a0553464f37a972.svg":{"logical_path":"flags/1x1/gy.svg","mtime":"2018-04-02T14:38:31+02:00","size":484,"digest":"0e3b849ce460f8ab1ec7cf66a25be1ba91e89b72d8b0aa679a0553464f37a972","integrity":"sha256-DjuEnORg+Ksex89molvhupHom3LYsKpnmgVTRk83qXI="},"flags/4x3/hk-cece9126ccbf9151feadfed75791ebf32d4a16beab12f182404519d0cc24eec7.svg":{"logical_path":"flags/4x3/hk.svg","mtime":"2018-04-02T14:38:31+02:00","size":3511,"digest":"cece9126ccbf9151feadfed75791ebf32d4a16beab12f182404519d0cc24eec7","integrity":"sha256-zs6RJsy/kVH+rf7XV5Hr8y1KFr6rEvGCQEUZ0Mwk7sc="},"flags/1x1/hk-9fad00e06f9034877149394914baa2bc3292223b0e32df2b1f9399d4de6e167d.svg":{"logical_path":"flags/1x1/hk.svg","mtime":"2018-04-02T14:38:31+02:00","size":3561,"digest":"9fad00e06f9034877149394914baa2bc3292223b0e32df2b1f9399d4de6e167d","integrity":"sha256-n60A4G+QNIdxSTlJFLqivDKSIjsOMt8rH5OZ1N5uFn0="},"flags/4x3/hm-4b4923b81da24d62ebf31a9bc0addf76beef84593374b1cbd03ba19f3b12e3e9.svg":{"logical_path":"flags/4x3/hm.svg","mtime":"2018-04-02T14:38:31+02:00","size":1328,"digest":"4b4923b81da24d62ebf31a9bc0addf76beef84593374b1cbd03ba19f3b12e3e9","integrity":"sha256-S0kjuB2iTWLr8xqbwK3fdr7vhFkzdLHL0DuhnzsS4+k="},"flags/1x1/hm-776c822113a22e83581234d05f40bfc0ed38b60648d87f513f3da3fff96ffb61.svg":{"logical_path":"flags/1x1/hm.svg","mtime":"2018-04-02T14:38:31+02:00","size":1312,"digest":"776c822113a22e83581234d05f40bfc0ed38b60648d87f513f3da3fff96ffb61","integrity":"sha256-d2yCIROiLoNYEjTQX0C/wO04tgZI2H9RPz2j//lv+2E="},"flags/4x3/hn-855c830786283862a5f399e0d69dffe52b6223b91b32e31b55d55c82f2fa32c9.svg":{"logical_path":"flags/4x3/hn.svg","mtime":"2018-04-02T14:38:31+02:00","size":1115,"digest":"855c830786283862a5f399e0d69dffe52b6223b91b32e31b55d55c82f2fa32c9","integrity":"sha256-hVyDB4YoOGKl85ng1p3/5StiI7kbMuMbVdVcgvL6Msk="},"flags/1x1/hn-64c38bac9403417c4e276bf5536d284fc5410fc04b80acd39a961d298f430dbd.svg":{"logical_path":"flags/1x1/hn.svg","mtime":"2018-04-02T14:38:31+02:00","size":1119,"digest":"64c38bac9403417c4e276bf5536d284fc5410fc04b80acd39a961d298f430dbd","integrity":"sha256-ZMOLrJQDQXxOJ2v1U20oT8VBD8BLgKzTmpYdKY9DDb0="},"flags/4x3/hr-c8cad861f7398a22b9d27ea682d2778df0dde8e146d30142b5294daf988854af.svg":{"logical_path":"flags/4x3/hr.svg","mtime":"2018-04-02T14:38:31+02:00","size":41617,"digest":"c8cad861f7398a22b9d27ea682d2778df0dde8e146d30142b5294daf988854af","integrity":"sha256-yMrYYfc5iiK50n6mgtJ3jfDd6OFG0wFCtSlNr5iIVK8="},"flags/1x1/hr-60c093df6760e4cc6abe26c37a52be3b51458f02712f18e11f08b07dc623b489.svg":{"logical_path":"flags/1x1/hr.svg","mtime":"2018-04-02T14:38:31+02:00","size":41808,"digest":"60c093df6760e4cc6abe26c37a52be3b51458f02712f18e11f08b07dc623b489","integrity":"sha256-YMCT32dg5MxqvibDelK+O1FFjwJxLxjhHwiwfcYjtIk="},"flags/4x3/ht-fe81da06228fa36e7f211bec0d9f0c020f5b9c7f81534b4cb2251848aa276b16.svg":{"logical_path":"flags/4x3/ht.svg","mtime":"2018-04-02T14:38:31+02:00","size":15231,"digest":"fe81da06228fa36e7f211bec0d9f0c020f5b9c7f81534b4cb2251848aa276b16","integrity":"sha256-/oHaBiKPo25/IRvsDZ8MAg9bnH+BU0tMsiUYSKonaxY="},"flags/1x1/ht-dd0197c078859c5a66ff3a51d3a3f92809768e36bfabdec0fc0ab60d068afcd9.svg":{"logical_path":"flags/1x1/ht.svg","mtime":"2018-04-02T14:38:31+02:00","size":15317,"digest":"dd0197c078859c5a66ff3a51d3a3f92809768e36bfabdec0fc0ab60d068afcd9","integrity":"sha256-3QGXwHiFnFpm/zpR06P5KAl2jja/q97A/Aq2DQaK/Nk="},"flags/4x3/hu-9aa998e636687aede491e307f3d068dbe58f2d90bfdfaec0e7ad03baa5b36344.svg":{"logical_path":"flags/4x3/hu.svg","mtime":"2018-04-02T14:38:31+02:00","size":277,"digest":"9aa998e636687aede491e307f3d068dbe58f2d90bfdfaec0e7ad03baa5b36344","integrity":"sha256-mqmY5jZoeu3kkeMH89Bo2+WPLZC/367A560DuqWzY0Q="},"flags/1x1/hu-06858d0fbd4320496e849010e35c8fe82eb618188cf6ec329aef93f5e7af1c23.svg":{"logical_path":"flags/1x1/hu.svg","mtime":"2018-04-02T14:38:31+02:00","size":279,"digest":"06858d0fbd4320496e849010e35c8fe82eb618188cf6ec329aef93f5e7af1c23","integrity":"sha256-BoWND71DIEluhJAQ41yP6C62GBiM9uwymu+T9eevHCM="},"flags/4x3/id-775dbfedd6533afdf5bd017ccc1ad4f8f4238cbe87393d9c837a669196f17293.svg":{"logical_path":"flags/4x3/id.svg","mtime":"2018-04-02T14:38:31+02:00","size":240,"digest":"775dbfedd6533afdf5bd017ccc1ad4f8f4238cbe87393d9c837a669196f17293","integrity":"sha256-d12/7dZTOv31vQF8zBrU+PQjjL6HOT2cg3pmkZbxcpM="},"flags/1x1/id-3920ce662a7ea937b2c11707d8e1f53db52611dd004edf753b0389ed490d9d29.svg":{"logical_path":"flags/1x1/id.svg","mtime":"2018-04-02T14:38:31+02:00","size":242,"digest":"3920ce662a7ea937b2c11707d8e1f53db52611dd004edf753b0389ed490d9d29","integrity":"sha256-OSDOZip+qTeywRcH2OH1PbUmEd0ATt91OwOJ7UkNnSk="},"flags/4x3/ie-6368a1c92440fcf80d3c35607543bcaa2d4662d6e0bc7acf6749ddbc418a72c0.svg":{"logical_path":"flags/4x3/ie.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"6368a1c92440fcf80d3c35607543bcaa2d4662d6e0bc7acf6749ddbc418a72c0","integrity":"sha256-Y2ihySRA/PgNPDVgdUO8qi1GYtbgvHrPZ0ndvEGKcsA="},"flags/1x1/ie-1997e9de640fa764677aa8f5d52f7888bb24a029160e8f67b06dbd043b4f11b3.svg":{"logical_path":"flags/1x1/ie.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"1997e9de640fa764677aa8f5d52f7888bb24a029160e8f67b06dbd043b4f11b3","integrity":"sha256-GZfp3mQPp2Rneqj11S94iLskoCkWDo9nsG29BDtPEbM="},"flags/4x3/il-d76883a2330f9a05a4a64990ba955fc1be90bb46bcb19ae548c21816e7e74178.svg":{"logical_path":"flags/4x3/il.svg","mtime":"2018-04-02T14:38:31+02:00","size":898,"digest":"d76883a2330f9a05a4a64990ba955fc1be90bb46bcb19ae548c21816e7e74178","integrity":"sha256-12iDojMPmgWkpkmQupVfwb6Qu0a8sZrlSMIYFufnQXg="},"flags/1x1/il-f5e643d0e10169a438119dc441ea3100b52a2ff569bbb3a3ad6d1131b47602d8.svg":{"logical_path":"flags/1x1/il.svg","mtime":"2018-04-02T14:38:31+02:00","size":851,"digest":"f5e643d0e10169a438119dc441ea3100b52a2ff569bbb3a3ad6d1131b47602d8","integrity":"sha256-9eZD0OEBaaQ4EZ3EQeoxALUqL/Vpu7OjrW0RMbR2Atg="},"flags/4x3/im-bbae8aa9dd129f8446556afe4904194ad43377d882f9a705fcf1da2bdbfabccf.svg":{"logical_path":"flags/4x3/im.svg","mtime":"2018-04-02T14:38:31+02:00","size":9948,"digest":"bbae8aa9dd129f8446556afe4904194ad43377d882f9a705fcf1da2bdbfabccf","integrity":"sha256-u66Kqd0Sn4RGVWr+SQQZStQzd9iC+acF/PHaK9v6vM8="},"flags/1x1/im-767d72c2e72d732d65c9b016adad983778dfbbb2b5b52e71830f4e41297728d3.svg":{"logical_path":"flags/1x1/im.svg","mtime":"2018-04-02T14:38:31+02:00","size":10295,"digest":"767d72c2e72d732d65c9b016adad983778dfbbb2b5b52e71830f4e41297728d3","integrity":"sha256-dn1ywuctcy1lybAWra2YN3jfu7K1tS5xgw9OQSl3KNM="},"flags/4x3/in-519e33321b8b2ba70a0b7557d66c62d7efdc9723896c49f82528b107028ffe29.svg":{"logical_path":"flags/4x3/in.svg","mtime":"2018-04-02T14:38:31+02:00","size":1077,"digest":"519e33321b8b2ba70a0b7557d66c62d7efdc9723896c49f82528b107028ffe29","integrity":"sha256-UZ4zMhuLK6cKC3VX1mxi1+/clyOJbEn4JSixBwKP/ik="},"flags/1x1/in-27831f76dc6a218a529b6e5d0eafc4c19c999461327b7c013f59226c0601a361.svg":{"logical_path":"flags/1x1/in.svg","mtime":"2018-04-02T14:38:31+02:00","size":1091,"digest":"27831f76dc6a218a529b6e5d0eafc4c19c999461327b7c013f59226c0601a361","integrity":"sha256-J4MfdtxqIYpSm25dDq/EwZyZlGEye3wBP1kibAYBo2E="},"flags/4x3/io-8d25a8e98f682199b413adfbcb6898c37058c9bae085e427fbab03d56e8c0de6.svg":{"logical_path":"flags/4x3/io.svg","mtime":"2018-04-02T14:38:31+02:00","size":27446,"digest":"8d25a8e98f682199b413adfbcb6898c37058c9bae085e427fbab03d56e8c0de6","integrity":"sha256-jSWo6Y9oIZm0E637y2iYw3BYybrgheQn+6sD1W6MDeY="},"flags/1x1/io-627f3b0cef72fd91ff426d74a007dc32d74c9fe677cf2c8355cba84359e16fde.svg":{"logical_path":"flags/1x1/io.svg","mtime":"2018-04-02T14:38:31+02:00","size":27497,"digest":"627f3b0cef72fd91ff426d74a007dc32d74c9fe677cf2c8355cba84359e16fde","integrity":"sha256-Yn87DO9y/ZH/Qm10oAfcMtdMn+Z3zyyDVcuoQ1nhb94="},"flags/4x3/iq-96b24d1439184d0a4c35ca7cea65e5f20469a0e8c8438963aad016e59c399cc6.svg":{"logical_path":"flags/4x3/iq.svg","mtime":"2018-04-02T14:38:31+02:00","size":1479,"digest":"96b24d1439184d0a4c35ca7cea65e5f20469a0e8c8438963aad016e59c399cc6","integrity":"sha256-lrJNFDkYTQpMNcp86mXl8gRpoOjIQ4ljqtAW5Zw5nMY="},"flags/1x1/iq-af04db139f8c44cfe0c612e2c05e848ccfad88fbbfcb58e88cdb7c80db365669.svg":{"logical_path":"flags/1x1/iq.svg","mtime":"2018-04-02T14:38:31+02:00","size":1484,"digest":"af04db139f8c44cfe0c612e2c05e848ccfad88fbbfcb58e88cdb7c80db365669","integrity":"sha256-rwTbE5+MRM/gxhLiwF6EjM+tiPu/y1jojNt8gNs2Vmk="},"flags/4x3/ir-db2c230d355ade2b1ac235ec647bb1535e4703c639a44f9ce112473272ee1019.svg":{"logical_path":"flags/4x3/ir.svg","mtime":"2018-04-02T14:38:31+02:00","size":15484,"digest":"db2c230d355ade2b1ac235ec647bb1535e4703c639a44f9ce112473272ee1019","integrity":"sha256-2ywjDTVa3isawjXsZHuxU15HA8Y5pE+c4RJHMnLuEBk="},"flags/1x1/ir-c648cbf56fc8f324fda477ea816783c9df8a7d398f45f5f94acc1c16c8877b63.svg":{"logical_path":"flags/1x1/ir.svg","mtime":"2018-04-02T14:38:31+02:00","size":15387,"digest":"c648cbf56fc8f324fda477ea816783c9df8a7d398f45f5f94acc1c16c8877b63","integrity":"sha256-xkjL9W/I8yT9pHfqgWeDyd+KfTmPRfX5SswcFsiHe2M="},"flags/4x3/is-29508693138977229758b0f322ba34e90dbcd7a8a74e8820729933d24051d9a7.svg":{"logical_path":"flags/4x3/is.svg","mtime":"2018-04-02T14:38:31+02:00","size":521,"digest":"29508693138977229758b0f322ba34e90dbcd7a8a74e8820729933d24051d9a7","integrity":"sha256-KVCGkxOJdyKXWLDzIro06Q2816inToggcpkz0kBR2ac="},"flags/1x1/is-b1c5db1d4b4853b8144f1d88ababbf14fc88752340457ba3e2c94ab5d54c9c01.svg":{"logical_path":"flags/1x1/is.svg","mtime":"2018-04-02T14:38:31+02:00","size":529,"digest":"b1c5db1d4b4853b8144f1d88ababbf14fc88752340457ba3e2c94ab5d54c9c01","integrity":"sha256-scXbHUtIU7gUTx2Iq6u/FPyIdSNARXuj4slKtdVMnAE="},"flags/4x3/it-d2c168050fc509adac1163b097b0ed409217560735b27802ae9259587c146562.svg":{"logical_path":"flags/4x3/it.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"d2c168050fc509adac1163b097b0ed409217560735b27802ae9259587c146562","integrity":"sha256-0sFoBQ/FCa2sEWOwl7DtQJIXVgc1sngCrpJZWHwUZWI="},"flags/1x1/it-592d34fb666430fa00f98d333623d5efa3c8e0e65ac4eee06bbc4c1de7ce4bea.svg":{"logical_path":"flags/1x1/it.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"592d34fb666430fa00f98d333623d5efa3c8e0e65ac4eee06bbc4c1de7ce4bea","integrity":"sha256-WS00+2ZkMPoA+Y0zNiPV76PI4OZaxO7ga7xMHefOS+o="},"flags/4x3/je-b363a4e3a21630f10791c2ebeb7f918320816ef87c155d4fd29ce37982f4df35.svg":{"logical_path":"flags/4x3/je.svg","mtime":"2018-04-02T14:38:31+02:00","size":4776,"digest":"b363a4e3a21630f10791c2ebeb7f918320816ef87c155d4fd29ce37982f4df35","integrity":"sha256-s2Ok46IWMPEHkcLr63+RgyCBbvh8FV1P0pzjeYL03zU="},"flags/1x1/je-6d43f74e30e099bc056da925ec34c0200708f0a6e90da34db1e59d54ce10cfd9.svg":{"logical_path":"flags/1x1/je.svg","mtime":"2018-04-02T14:38:31+02:00","size":4757,"digest":"6d43f74e30e099bc056da925ec34c0200708f0a6e90da34db1e59d54ce10cfd9","integrity":"sha256-bUP3TjDgmbwFbakl7DTAIAcI8KbpDaNNseWdVM4Qz9k="},"flags/4x3/jm-3d133fbc2564f29e036855e8be224d1579fe66fe49e0f5a2ba0bdcf3cb272823.svg":{"logical_path":"flags/4x3/jm.svg","mtime":"2018-04-02T14:38:31+02:00","size":392,"digest":"3d133fbc2564f29e036855e8be224d1579fe66fe49e0f5a2ba0bdcf3cb272823","integrity":"sha256-PRM/vCVk8p4DaFXoviJNFXn+Zv5J4PWiugvc88snKCM="},"flags/1x1/jm-1aea8ea5d8cbc717fa3ef331d8caa9a1421c88a7bd076e40f8276a5b6f8d0467.svg":{"logical_path":"flags/1x1/jm.svg","mtime":"2018-04-02T14:38:31+02:00","size":392,"digest":"1aea8ea5d8cbc717fa3ef331d8caa9a1421c88a7bd076e40f8276a5b6f8d0467","integrity":"sha256-GuqOpdjLxxf6PvMx2MqpoUIciKe9B25A+CdqW2+NBGc="},"flags/4x3/jo-eee432339f8ea6750987e1121187eb4b53ec537dd7ccb240c018de63f7a92db6.svg":{"logical_path":"flags/4x3/jo.svg","mtime":"2018-04-02T14:38:31+02:00","size":717,"digest":"eee432339f8ea6750987e1121187eb4b53ec537dd7ccb240c018de63f7a92db6","integrity":"sha256-7uQyM5+OpnUJh+ESEYfrS1PsU33XzLJAwBjeY/epLbY="},"flags/1x1/jo-7969b2083c535c85b7e714b755459a6606940e0b5ddb1b71e24daf0a180d14aa.svg":{"logical_path":"flags/1x1/jo.svg","mtime":"2018-04-02T14:38:31+02:00","size":694,"digest":"7969b2083c535c85b7e714b755459a6606940e0b5ddb1b71e24daf0a180d14aa","integrity":"sha256-eWmyCDxTXIW35xS3VUWaZgaUDgtd2xtx4k2vChgNFKo="},"flags/4x3/jp-2eadcfc67ba8cd50c1da86e08e6778e0102c3072865dab8c312cc88006da0abe.svg":{"logical_path":"flags/4x3/jp.svg","mtime":"2018-04-02T14:38:31+02:00","size":484,"digest":"2eadcfc67ba8cd50c1da86e08e6778e0102c3072865dab8c312cc88006da0abe","integrity":"sha256-Lq3PxnuozVDB2obgjmd44BAsMHKGXauMMSzIgAbaCr4="},"flags/1x1/jp-551281a75e6c6fd64eb65b39f56102b52c182f6c38ee045c9422f6592f0f65c5.svg":{"logical_path":"flags/1x1/jp.svg","mtime":"2018-04-02T14:38:31+02:00","size":500,"digest":"551281a75e6c6fd64eb65b39f56102b52c182f6c38ee045c9422f6592f0f65c5","integrity":"sha256-VRKBp15sb9ZOtls59WECtSwYL2w47gRclCL2WS8PZcU="},"flags/4x3/ke-45790bc3ec1ed8ed0124777a7c9e09163353b5af4ff70ae6604a61b53712df4b.svg":{"logical_path":"flags/4x3/ke.svg","mtime":"2018-04-02T14:38:31+02:00","size":1383,"digest":"45790bc3ec1ed8ed0124777a7c9e09163353b5af4ff70ae6604a61b53712df4b","integrity":"sha256-RXkLw+we2O0BJHd6fJ4JFjNTta9P9wrmYEphtTcS30s="},"flags/1x1/ke-2cca24ecf024b801543c0572efc9969ffdaf25cec313e2149c64961839bc301b.svg":{"logical_path":"flags/1x1/ke.svg","mtime":"2018-04-02T14:38:31+02:00","size":1495,"digest":"2cca24ecf024b801543c0572efc9969ffdaf25cec313e2149c64961839bc301b","integrity":"sha256-LMok7PAkuAFUPAVy78mWn/2vJc7DE+IUnGSWGDm8MBs="},"flags/4x3/kg-3879f8931d74cc9c5927261f4095b2bb786f3d62c803b2a96ec550a23fae9f49.svg":{"logical_path":"flags/4x3/kg.svg","mtime":"2018-04-02T14:38:31+02:00","size":3387,"digest":"3879f8931d74cc9c5927261f4095b2bb786f3d62c803b2a96ec550a23fae9f49","integrity":"sha256-OHn4kx10zJxZJyYfQJWyu3hvPWLIA7KpbsVQoj+un0k="},"flags/1x1/kg-74318932808f85b72df308358f2f2699ab0cb7ab4f7ad3c84c4be4024f0fb140.svg":{"logical_path":"flags/1x1/kg.svg","mtime":"2018-04-02T14:38:31+02:00","size":3337,"digest":"74318932808f85b72df308358f2f2699ab0cb7ab4f7ad3c84c4be4024f0fb140","integrity":"sha256-dDGJMoCPhbct8wg1jy8mmasMt6tPetPITEvkAk8PsUA="},"flags/4x3/kh-7409fab4ba4e676db7b5c61020b97893b1735fe0b8e39e9b4f96108400be704e.svg":{"logical_path":"flags/4x3/kh.svg","mtime":"2018-04-02T14:38:31+02:00","size":7295,"digest":"7409fab4ba4e676db7b5c61020b97893b1735fe0b8e39e9b4f96108400be704e","integrity":"sha256-dAn6tLpOZ223tcYQILl4k7FzX+C4456bT5YQhAC+cE4="},"flags/1x1/kh-2603f6a61b400cb12b87397eeba60ae1707511467d5e0c430c05809bf89e5042.svg":{"logical_path":"flags/1x1/kh.svg","mtime":"2018-04-02T14:38:31+02:00","size":7296,"digest":"2603f6a61b400cb12b87397eeba60ae1707511467d5e0c430c05809bf89e5042","integrity":"sha256-JgP2phtADLErhzl+66YK4XB1EUZ9XgxDDAWAm/ieUEI="},"flags/4x3/ki-617c1b52f3d9aee99d094edbd1775cae77aade266a1318eb4671b2bb1620ded5.svg":{"logical_path":"flags/4x3/ki.svg","mtime":"2018-04-02T14:38:31+02:00","size":5818,"digest":"617c1b52f3d9aee99d094edbd1775cae77aade266a1318eb4671b2bb1620ded5","integrity":"sha256-YXwbUvPZrumdCU7b0Xdcrneq3iZqExjrRnGyuxYg3tU="},"flags/1x1/ki-74615266b440a24f09abdeae3853d7e1111f0eba77df71ccd176d83fbd1fd9ad.svg":{"logical_path":"flags/1x1/ki.svg","mtime":"2018-04-02T14:38:31+02:00","size":5955,"digest":"74615266b440a24f09abdeae3853d7e1111f0eba77df71ccd176d83fbd1fd9ad","integrity":"sha256-dGFSZrRAok8Jq96uOFPX4REfDrp333HM0XbYP70f2a0="},"flags/4x3/km-0c9bcbf7e677a541fc8dff6f848c9d92b6982ac2934ae75faa56a2b846bb5698.svg":{"logical_path":"flags/4x3/km.svg","mtime":"2018-04-02T14:38:31+02:00","size":1061,"digest":"0c9bcbf7e677a541fc8dff6f848c9d92b6982ac2934ae75faa56a2b846bb5698","integrity":"sha256-DJvL9+Z3pUH8jf9vhIydkraYKsKTSudfqlaiuEa7Vpg="},"flags/1x1/km-81b0fbe53d09194270e8ed4cbe9be8eb1ae727e77957005369ad8bdc651dd1c8.svg":{"logical_path":"flags/1x1/km.svg","mtime":"2018-04-02T14:38:31+02:00","size":1044,"digest":"81b0fbe53d09194270e8ed4cbe9be8eb1ae727e77957005369ad8bdc651dd1c8","integrity":"sha256-gbD75T0JGUJw6O1Mvpvo6xrnJ+d5VwBTaa2L3GUd0cg="},"flags/4x3/kn-0442f55f81cd3b1057c609301f0af2b503d89a895a954af8c970df997e92bd03.svg":{"logical_path":"flags/4x3/kn.svg","mtime":"2018-04-02T14:38:31+02:00","size":816,"digest":"0442f55f81cd3b1057c609301f0af2b503d89a895a954af8c970df997e92bd03","integrity":"sha256-BEL1X4HNOxBXxgkwHwrytQPYmolalUr4yXDfmX6SvQM="},"flags/1x1/kn-897c34ef54bee486f0d24d2191e2400f49a19d98efb19f8c3f1a27fb0b97131a.svg":{"logical_path":"flags/1x1/kn.svg","mtime":"2018-04-02T14:38:31+02:00","size":820,"digest":"897c34ef54bee486f0d24d2191e2400f49a19d98efb19f8c3f1a27fb0b97131a","integrity":"sha256-iXw071S+5Ibw0k0hkeJAD0mhnZjvsZ+MPxon+wuXExo="},"flags/4x3/kp-a54f7201982b29530381b71a5e2a11c1153860f22c04c0a2d91bb0d20fedf78e.svg":{"logical_path":"flags/4x3/kp.svg","mtime":"2018-04-02T14:38:31+02:00","size":792,"digest":"a54f7201982b29530381b71a5e2a11c1153860f22c04c0a2d91bb0d20fedf78e","integrity":"sha256-pU9yAZgrKVMDgbcaXioRwRU4YPIsBMCi2Ruw0g/t944="},"flags/1x1/kp-758eccd89ef3707808fb68d931f086e49333904f4cc67c88468f3c96fb43b7b6.svg":{"logical_path":"flags/1x1/kp.svg","mtime":"2018-04-02T14:38:31+02:00","size":855,"digest":"758eccd89ef3707808fb68d931f086e49333904f4cc67c88468f3c96fb43b7b6","integrity":"sha256-dY7M2J7zcHgI+2jZMfCG5JMzkE9MxnyIRo88lvtDt7Y="},"flags/4x3/kr-c0b9b2c854133410c0ad9cadbc10b1e0bacf0305519883126d55bfa3214f9d06.svg":{"logical_path":"flags/4x3/kr.svg","mtime":"2018-04-02T14:38:31+02:00","size":1827,"digest":"c0b9b2c854133410c0ad9cadbc10b1e0bacf0305519883126d55bfa3214f9d06","integrity":"sha256-wLmyyFQTNBDArZytvBCx4LrPAwVRmIMSbVW/oyFPnQY="},"flags/1x1/kr-7c0457ac5d284b28b742ea2e061a1aa2a35f63171e464b3a7eb501a48756ce7b.svg":{"logical_path":"flags/1x1/kr.svg","mtime":"2018-04-02T14:38:31+02:00","size":1733,"digest":"7c0457ac5d284b28b742ea2e061a1aa2a35f63171e464b3a7eb501a48756ce7b","integrity":"sha256-fARXrF0oSyi3QuouBhoaoqNfYxceRks6frUBpIdWzns="},"flags/4x3/kw-81c3d5d25c7b840ef14783b51d18c6b7cfc61f94932c664bbc9e5879fef020eb.svg":{"logical_path":"flags/4x3/kw.svg","mtime":"2018-04-02T14:38:31+02:00","size":506,"digest":"81c3d5d25c7b840ef14783b51d18c6b7cfc61f94932c664bbc9e5879fef020eb","integrity":"sha256-gcPV0lx7hA7xR4O1HRjGt8/GH5STLGZLvJ5Yef7wIOs="},"flags/1x1/kw-66670211a67a4e61d4652a19d821dc5195f01a28a3a9b28b7e4c6048cd86b19c.svg":{"logical_path":"flags/1x1/kw.svg","mtime":"2018-04-02T14:38:31+02:00","size":510,"digest":"66670211a67a4e61d4652a19d821dc5195f01a28a3a9b28b7e4c6048cd86b19c","integrity":"sha256-ZmcCEaZ6TmHUZSoZ2CHcUZXwGiijqbKLfkxgSM2GsZw="},"flags/4x3/ky-0f4ab66d951ae33f800d680aaa5704804ba9c8844d4d80e5bee2e3fa0e100af3.svg":{"logical_path":"flags/4x3/ky.svg","mtime":"2018-04-02T14:38:31+02:00","size":21886,"digest":"0f4ab66d951ae33f800d680aaa5704804ba9c8844d4d80e5bee2e3fa0e100af3","integrity":"sha256-D0q2bZUa4z+ADWgKqlcEgEupyIRNTYDlvuLj+g4QCvM="},"flags/1x1/ky-fb5f57bb58b74d23377bad9954a75ab88d1587af68546ce137a6ae7a88a7701e.svg":{"logical_path":"flags/1x1/ky.svg","mtime":"2018-04-02T14:38:31+02:00","size":22495,"digest":"fb5f57bb58b74d23377bad9954a75ab88d1587af68546ce137a6ae7a88a7701e","integrity":"sha256-+19Xu1i3TSM3e62ZVKdauI0Vh69oVGzhN6aueoincB4="},"flags/4x3/kz-39edc952c598c71be2c9510944a8faf708d8e4b367b5ad78a688d1cd37f522eb.svg":{"logical_path":"flags/4x3/kz.svg","mtime":"2018-04-02T14:38:31+02:00","size":11339,"digest":"39edc952c598c71be2c9510944a8faf708d8e4b367b5ad78a688d1cd37f522eb","integrity":"sha256-Oe3JUsWYxxviyVEJRKj69wjY5LNnta14pojRzTf1Ius="},"flags/1x1/kz-924c04dc19267b049f35213af0e2b0c540933c06389433cb4aacd8dda33b286c.svg":{"logical_path":"flags/1x1/kz.svg","mtime":"2018-04-02T14:38:31+02:00","size":11433,"digest":"924c04dc19267b049f35213af0e2b0c540933c06389433cb4aacd8dda33b286c","integrity":"sha256-kkwE3BkmewSfNSE68OKwxUCTPAY4lDPLSqzY3aM7KGw="},"flags/4x3/la-e3a36a3bd0003442c3a21d3a192995fa6fb3b3c08a2daadc8f38f62736b5b1e3.svg":{"logical_path":"flags/4x3/la.svg","mtime":"2018-04-02T14:38:31+02:00","size":457,"digest":"e3a36a3bd0003442c3a21d3a192995fa6fb3b3c08a2daadc8f38f62736b5b1e3","integrity":"sha256-46NqO9AANELDoh06GSmV+m+zs8CKLarcjzj2Jza1seM="},"flags/1x1/la-c9d4223a897e5e2938a4892bbc593d3828093b9439fc3f6de21520e4013ddbc5.svg":{"logical_path":"flags/1x1/la.svg","mtime":"2018-04-02T14:38:31+02:00","size":507,"digest":"c9d4223a897e5e2938a4892bbc593d3828093b9439fc3f6de21520e4013ddbc5","integrity":"sha256-ydQiOol+Xik4pIkrvFk9OCgJO5Q5/D9t4hUg5AE928U="},"flags/4x3/lb-508c2a5a9b50d604895675b9f1c1e5914c394a7f468f5d823eb0476acaacbc7f.svg":{"logical_path":"flags/4x3/lb.svg","mtime":"2018-04-02T14:38:31+02:00","size":2814,"digest":"508c2a5a9b50d604895675b9f1c1e5914c394a7f468f5d823eb0476acaacbc7f","integrity":"sha256-UIwqWptQ1gSJVnW58cHlkUw5Sn9Gj12CPrBHasqsvH8="},"flags/1x1/lb-10c9ba8ea7aa3189f16a7273c837982a887fc4ddfc9d514d8f5a660d72356f7f.svg":{"logical_path":"flags/1x1/lb.svg","mtime":"2018-04-02T14:38:31+02:00","size":2754,"digest":"10c9ba8ea7aa3189f16a7273c837982a887fc4ddfc9d514d8f5a660d72356f7f","integrity":"sha256-EMm6jqeqMYnxanJzyDeYKoh/xN38nVFNj1pmDXI1b38="},"flags/4x3/lc-04ccd92fb1578654181febaea30ebd6b6620f56115730b2a2d673c712307bf5c.svg":{"logical_path":"flags/4x3/lc.svg","mtime":"2018-04-02T14:38:31+02:00","size":373,"digest":"04ccd92fb1578654181febaea30ebd6b6620f56115730b2a2d673c712307bf5c","integrity":"sha256-BMzZL7FXhlQYH+uuow69a2Yg9WEVcwsqLWc8cSMHv1w="},"flags/1x1/lc-4ffb53afb8bd296d526ac26fd8007afc74855e92833a893d3c934a5d12eb152a.svg":{"logical_path":"flags/1x1/lc.svg","mtime":"2018-04-02T14:38:31+02:00","size":373,"digest":"4ffb53afb8bd296d526ac26fd8007afc74855e92833a893d3c934a5d12eb152a","integrity":"sha256-T/tTr7i9KW1SasJv2AB6/HSFXpKDOok9PJNKXRLrFSo="},"flags/4x3/li-3058dc4aeaf2bd2da8cb910892137d732b56e5e9d342e565a4059de1a8e40e40.svg":{"logical_path":"flags/4x3/li.svg","mtime":"2018-04-02T14:38:31+02:00","size":8327,"digest":"3058dc4aeaf2bd2da8cb910892137d732b56e5e9d342e565a4059de1a8e40e40","integrity":"sha256-MFjcSuryvS2oy5EIkhN9cytW5enTQuVlpAWd4ajkDkA="},"flags/1x1/li-0780a4f218b9ee466e33d14274b8a01575a86b3787b347e3269a3b301c220d5f.svg":{"logical_path":"flags/1x1/li.svg","mtime":"2018-04-02T14:38:31+02:00","size":8350,"digest":"0780a4f218b9ee466e33d14274b8a01575a86b3787b347e3269a3b301c220d5f","integrity":"sha256-B4Ck8hi57kZuM9FCdLigFXWoazeHs0fjJpo7MBwiDV8="},"flags/4x3/lk-a13d6ab1da51be3b1d2c5b80f4d866c923d42b017e197469e1bfc0dd021c4bfe.svg":{"logical_path":"flags/4x3/lk.svg","mtime":"2018-04-02T14:38:31+02:00","size":11333,"digest":"a13d6ab1da51be3b1d2c5b80f4d866c923d42b017e197469e1bfc0dd021c4bfe","integrity":"sha256-oT1qsdpRvjsdLFuA9NhmySPUKwF+GXRp4b/A3QIcS/4="},"flags/1x1/lk-99759363f0df6b868fd1398bf05666c680bafe1eeec8b859b64d450930213e02.svg":{"logical_path":"flags/1x1/lk.svg","mtime":"2018-04-02T14:38:31+02:00","size":11345,"digest":"99759363f0df6b868fd1398bf05666c680bafe1eeec8b859b64d450930213e02","integrity":"sha256-mXWTY/Dfa4aP0TmL8FZmxoC6/h7uyLhZtk1FCTAhPgI="},"flags/4x3/lr-b06a1d70899826b305ce387fa31e1fa0bdb3bcb17c1392f15f995ce1dba723cf.svg":{"logical_path":"flags/4x3/lr.svg","mtime":"2018-04-02T14:38:31+02:00","size":724,"digest":"b06a1d70899826b305ce387fa31e1fa0bdb3bcb17c1392f15f995ce1dba723cf","integrity":"sha256-sGodcImYJrMFzjh/ox4foL2zvLF8E5LxX5lc4dunI88="},"flags/1x1/lr-820a9d023e5b1e68ed640bfaba8f84ad4379c42a6c5c982cb76b0390dd2bcbdd.svg":{"logical_path":"flags/1x1/lr.svg","mtime":"2018-04-02T14:38:31+02:00","size":697,"digest":"820a9d023e5b1e68ed640bfaba8f84ad4379c42a6c5c982cb76b0390dd2bcbdd","integrity":"sha256-ggqdAj5bHmjtZAv6uo+ErUN5xCpsXJgst2sDkN0ry90="},"flags/4x3/ls-d02bcefe7c298c153665f35c33eedb08e2e2b345350e4bf1714a87abf86b2d0e.svg":{"logical_path":"flags/4x3/ls.svg","mtime":"2018-04-02T14:38:31+02:00","size":1222,"digest":"d02bcefe7c298c153665f35c33eedb08e2e2b345350e4bf1714a87abf86b2d0e","integrity":"sha256-0CvO/nwpjBU2ZfNcM+7bCOLis0U1DkvxcUqHq/hrLQ4="},"flags/1x1/ls-85c731c313a46db12bdb27fe229e9f7d052b447c624663b73ffa1dbab97f03fb.svg":{"logical_path":"flags/1x1/ls.svg","mtime":"2018-04-02T14:38:31+02:00","size":1245,"digest":"85c731c313a46db12bdb27fe229e9f7d052b447c624663b73ffa1dbab97f03fb","integrity":"sha256-hccxwxOkbbEr2yf+Ip6ffQUrRHxiRmO3P/odurl/A/s="},"flags/4x3/lt-c08eb18a15d2003cb544432b11c5081d3d5741370669b4df306d1c6bce14cb51.svg":{"logical_path":"flags/4x3/lt.svg","mtime":"2018-04-02T14:38:31+02:00","size":445,"digest":"c08eb18a15d2003cb544432b11c5081d3d5741370669b4df306d1c6bce14cb51","integrity":"sha256-wI6xihXSADy1REMrEcUIHT1XQTcGabTfMG0ca84Uy1E="},"flags/1x1/lt-c1bd7e3d289ac9b0df06d47237780eaf4d30f01281ed50a7df9a22bc3a2489c5.svg":{"logical_path":"flags/1x1/lt.svg","mtime":"2018-04-02T14:38:31+02:00","size":445,"digest":"c1bd7e3d289ac9b0df06d47237780eaf4d30f01281ed50a7df9a22bc3a2489c5","integrity":"sha256-wb1+PSiaybDfBtRyN3gOr00w8BKB7VCn35oivDokicU="},"flags/4x3/lu-99e7b6adb3a9e0f867b17eb3b1f0f33db92fd27cfd7b651f62453f359bace22f.svg":{"logical_path":"flags/4x3/lu.svg","mtime":"2018-04-02T14:38:31+02:00","size":231,"digest":"99e7b6adb3a9e0f867b17eb3b1f0f33db92fd27cfd7b651f62453f359bace22f","integrity":"sha256-mee2rbOp4PhnsX6zsfDzPbkv0nz9e2UfYkU/NZus4i8="},"flags/1x1/lu-ab544445f16afa450549288ac86c2cc9a458a9d7747b3a89d5ecef7db9c83ce7.svg":{"logical_path":"flags/1x1/lu.svg","mtime":"2018-04-02T14:38:31+02:00","size":235,"digest":"ab544445f16afa450549288ac86c2cc9a458a9d7747b3a89d5ecef7db9c83ce7","integrity":"sha256-q1RERfFq+kUFSSiKyGwsyaRYqdd0ezqJ1ezvfbnIPOc="},"flags/4x3/lv-f8844d50b89f0369f73d580d3676553e7e55dd8ab2460e592a29a530d9bed886.svg":{"logical_path":"flags/4x3/lv.svg","mtime":"2018-04-02T14:38:31+02:00","size":236,"digest":"f8844d50b89f0369f73d580d3676553e7e55dd8ab2460e592a29a530d9bed886","integrity":"sha256-+IRNULifA2n3PVgNNnZVPn5V3YqyRg5ZKimlMNm+2IY="},"flags/1x1/lv-baeced49dd4249e36a25b0f23a5c601a69e9dee3137627cd4450194b85a99dd4.svg":{"logical_path":"flags/1x1/lv.svg","mtime":"2018-04-02T14:38:31+02:00","size":240,"digest":"baeced49dd4249e36a25b0f23a5c601a69e9dee3137627cd4450194b85a99dd4","integrity":"sha256-uuztSd1CSeNqJbDyOlxgGmnp3uMTdifNRFAZS4WpndQ="},"flags/4x3/ly-03209121483967f9d74849fb9261de23e9ff2e02c4e40b29f1cda0631b8a5fae.svg":{"logical_path":"flags/4x3/ly.svg","mtime":"2018-04-02T14:38:31+02:00","size":534,"digest":"03209121483967f9d74849fb9261de23e9ff2e02c4e40b29f1cda0631b8a5fae","integrity":"sha256-AyCRIUg5Z/nXSEn7kmHeI+n/LgLE5Asp8c2gYxuKX64="},"flags/1x1/ly-1e6e070aaa4bfc97a5a446a39bf746ab3c4c81d9f62c975cab164e16de3a3ffe.svg":{"logical_path":"flags/1x1/ly.svg","mtime":"2018-04-02T14:38:31+02:00","size":533,"digest":"1e6e070aaa4bfc97a5a446a39bf746ab3c4c81d9f62c975cab164e16de3a3ffe","integrity":"sha256-Hm4HCqpL/JelpEajm/dGqzxMgdn2LJdcqxZOFt46P/4="},"flags/4x3/ma-9a25cc7c2868fa45b251dd1b99a0be3b583df69732146142020fe9c6c0c95b63.svg":{"logical_path":"flags/4x3/ma.svg","mtime":"2018-04-02T14:38:31+02:00","size":253,"digest":"9a25cc7c2868fa45b251dd1b99a0be3b583df69732146142020fe9c6c0c95b63","integrity":"sha256-miXMfCho+kWyUd0bmaC+O1g99pcyFGFCAg/pxsDJW2M="},"flags/1x1/ma-4f18b9c355b8b8bf0db69badb235a183dbd558deb6439bf03b4f18e56837a7f3.svg":{"logical_path":"flags/1x1/ma.svg","mtime":"2018-04-02T14:38:31+02:00","size":253,"digest":"4f18b9c355b8b8bf0db69badb235a183dbd558deb6439bf03b4f18e56837a7f3","integrity":"sha256-Txi5w1W4uL8NtputsjWhg9vVWN62Q5vwO08Y5Wg3p/M="},"flags/4x3/mc-b0c50599ea2a550680a6a867579930e0b47d3e05193a7294a26b7849a7ad35e2.svg":{"logical_path":"flags/4x3/mc.svg","mtime":"2018-04-02T14:38:31+02:00","size":240,"digest":"b0c50599ea2a550680a6a867579930e0b47d3e05193a7294a26b7849a7ad35e2","integrity":"sha256-sMUFmeoqVQaApqhnV5kw4LR9PgUZOnKUomt4SaetNeI="},"flags/1x1/mc-8f1fe6210338399d8791d91f39234b1a09acf2aa5e0387696048dc7068534a28.svg":{"logical_path":"flags/1x1/mc.svg","mtime":"2018-04-02T14:38:31+02:00","size":240,"digest":"8f1fe6210338399d8791d91f39234b1a09acf2aa5e0387696048dc7068534a28","integrity":"sha256-jx/mIQM4OZ2HkdkfOSNLGgms8qpeA4dpYEjccGhTSig="},"flags/4x3/md-8849eef7bdf916e962f7bb31af87c8d47aef33f9f4a2017b2ce55c4166e79643.svg":{"logical_path":"flags/4x3/md.svg","mtime":"2018-04-02T14:38:31+02:00","size":11283,"digest":"8849eef7bdf916e962f7bb31af87c8d47aef33f9f4a2017b2ce55c4166e79643","integrity":"sha256-iEnu9735Fuli97sxr4fI1HrvM/n0ogF7LOVcQWbnlkM="},"flags/1x1/md-43f1bb4157545abe6e79215459efb548d913bbe7922078cd40cb722a4e19d9b4.svg":{"logical_path":"flags/1x1/md.svg","mtime":"2018-04-02T14:38:31+02:00","size":11387,"digest":"43f1bb4157545abe6e79215459efb548d913bbe7922078cd40cb722a4e19d9b4","integrity":"sha256-Q/G7QVdUWr5ueSFUWe+1SNkTu+eSIHjNQMtyKk4Z2bQ="},"flags/4x3/me-983d452d43cfb8d628bfc5c0cf4991c2ba3cf0e39e70aa5353cfd4e9ec3da62d.svg":{"logical_path":"flags/4x3/me.svg","mtime":"2018-04-02T14:38:31+02:00","size":63177,"digest":"983d452d43cfb8d628bfc5c0cf4991c2ba3cf0e39e70aa5353cfd4e9ec3da62d","integrity":"sha256-mD1FLUPPuNYov8XAz0mRwro88OOecKpTU8/U6ew9pi0="},"flags/1x1/me-104d6a96038ef06d3d8b89c9221996f3649b5b821139b11b2e07695b0f6fda2f.svg":{"logical_path":"flags/1x1/me.svg","mtime":"2018-04-02T14:38:31+02:00","size":64191,"digest":"104d6a96038ef06d3d8b89c9221996f3649b5b821139b11b2e07695b0f6fda2f","integrity":"sha256-EE1qlgOO8G09i4nJIhmW82SbW4IRObEbLgdpWw9v2i8="},"flags/4x3/mf-31fb851bfcc2340d2fa43e86a099cc7becfc8e7f996a4d2ca56bd050e6537086.svg":{"logical_path":"flags/4x3/mf.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"31fb851bfcc2340d2fa43e86a099cc7becfc8e7f996a4d2ca56bd050e6537086","integrity":"sha256-MfuFG/zCNA0vpD6GoJnMe+z8jn+Zak0spWvQUOZTcIY="},"flags/1x1/mf-fe20ce9bf911631d6e79edf21c8cff0716f2dc1ffded39515735444d9a66fa55.svg":{"logical_path":"flags/1x1/mf.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"fe20ce9bf911631d6e79edf21c8cff0716f2dc1ffded39515735444d9a66fa55","integrity":"sha256-/iDOm/kRYx1uee3yHIz/Bxby3B/97TlRVzVETZpm+lU="},"flags/4x3/mg-5effe963e29f804a26f95dbbc9519add454a0fd9eb918ddfeb55e1e99a1a2701.svg":{"logical_path":"flags/4x3/mg.svg","mtime":"2018-04-02T14:38:31+02:00","size":305,"digest":"5effe963e29f804a26f95dbbc9519add454a0fd9eb918ddfeb55e1e99a1a2701","integrity":"sha256-Xv/pY+KfgEom+V27yVGa3UVKD9nrkY3f61Xh6ZoaJwE="},"flags/1x1/mg-9e546cfb78810d9b25c814a84aadd6907880b8e0cdd2e4e30738b519e7c1ac91.svg":{"logical_path":"flags/1x1/mg.svg","mtime":"2018-04-02T14:38:31+02:00","size":305,"digest":"9e546cfb78810d9b25c814a84aadd6907880b8e0cdd2e4e30738b519e7c1ac91","integrity":"sha256-nlRs+3iBDZslyBSoSq3WkHiAuODN0uTjBzi1GefBrJE="},"flags/4x3/mh-d8cfd123007dbb99aa700c335957926a6d5e877ab49680c79629a32716d7a782.svg":{"logical_path":"flags/4x3/mh.svg","mtime":"2018-04-02T14:38:31+02:00","size":744,"digest":"d8cfd123007dbb99aa700c335957926a6d5e877ab49680c79629a32716d7a782","integrity":"sha256-2M/RIwB9u5mqcAwzWVeSam1eh3q0loDHlimjJxbXp4I="},"flags/1x1/mh-3fe03d4d063a4729fc8b68fd5e9d7d2eef6e65c4e82954c83f76b138cea2eb45.svg":{"logical_path":"flags/1x1/mh.svg","mtime":"2018-04-02T14:38:31+02:00","size":767,"digest":"3fe03d4d063a4729fc8b68fd5e9d7d2eef6e65c4e82954c83f76b138cea2eb45","integrity":"sha256-P+A9TQY6Ryn8i2j9Xp19Lu9uZcToKVTIP3axOM6i60U="},"flags/4x3/mk-6e8071d15f2ff125d30bf89d000dcb47db9545cf9b7ff04f1474650ec2f4d25c.svg":{"logical_path":"flags/4x3/mk.svg","mtime":"2018-04-02T14:38:31+02:00","size":385,"digest":"6e8071d15f2ff125d30bf89d000dcb47db9545cf9b7ff04f1474650ec2f4d25c","integrity":"sha256-boBx0V8v8SXTC/idAA3LR9uVRc+bf/BPFHRlDsL00lw="},"flags/1x1/mk-fdc9212f9f311cbface56b6587468a2e845111b697edc11b7edda9fcf100c1d5.svg":{"logical_path":"flags/1x1/mk.svg","mtime":"2018-04-02T14:38:31+02:00","size":413,"digest":"fdc9212f9f311cbface56b6587468a2e845111b697edc11b7edda9fcf100c1d5","integrity":"sha256-/ckhL58xHL+s5Wtlh0aKLoRREbaX7cEbft2p/PEAwdU="},"flags/4x3/ml-a730102e0c6f6362de9c10ef8da6cf7b123465d01a297e7a89808b01fa4771cd.svg":{"logical_path":"flags/4x3/ml.svg","mtime":"2018-04-02T14:38:31+02:00","size":279,"digest":"a730102e0c6f6362de9c10ef8da6cf7b123465d01a297e7a89808b01fa4771cd","integrity":"sha256-pzAQLgxvY2LenBDvjabPexI0ZdAaKX56iYCLAfpHcc0="},"flags/1x1/ml-a661355da206b0cb7ac4c84b6cdf7e411fbca8fcb271ae999fa60d5c67578192.svg":{"logical_path":"flags/1x1/ml.svg","mtime":"2018-04-02T14:38:31+02:00","size":282,"digest":"a661355da206b0cb7ac4c84b6cdf7e411fbca8fcb271ae999fa60d5c67578192","integrity":"sha256-pmE1XaIGsMt6xMhLbN9+QR+8qPyyca6Zn6YNXGdXgZI="},"flags/4x3/mm-6d0d207d662477110f2b863488088818d8400386358dcbc669a2d8c54d1bae16.svg":{"logical_path":"flags/4x3/mm.svg","mtime":"2018-04-02T14:38:31+02:00","size":851,"digest":"6d0d207d662477110f2b863488088818d8400386358dcbc669a2d8c54d1bae16","integrity":"sha256-bQ0gfWYkdxEPK4Y0iAiIGNhAA4Y1jcvGaaLYxU0brhY="},"flags/1x1/mm-de7d46b6543343af61ba997045cb41a707bd0db1e7a5879971ca8fddcbdf9e99.svg":{"logical_path":"flags/1x1/mm.svg","mtime":"2018-04-02T14:38:31+02:00","size":868,"digest":"de7d46b6543343af61ba997045cb41a707bd0db1e7a5879971ca8fddcbdf9e99","integrity":"sha256-3n1GtlQzQ69huplwRctBpwe9DbHnpYeZccqP3cvfnpk="},"flags/4x3/mn-656eb51e88bfce82401e4080eb791ddf16d571cbba102cdd4316c5de4711ac65.svg":{"logical_path":"flags/4x3/mn.svg","mtime":"2018-04-02T14:38:31+02:00","size":1256,"digest":"656eb51e88bfce82401e4080eb791ddf16d571cbba102cdd4316c5de4711ac65","integrity":"sha256-ZW61Hoi/zoJAHkCA63kd3xbVccu6ECzdQxbF3kcRrGU="},"flags/1x1/mn-ad22cb2c195a7d8ca8e4174db011d5f58238ee25039b5b2da2649d8ca8b00123.svg":{"logical_path":"flags/1x1/mn.svg","mtime":"2018-04-02T14:38:31+02:00","size":1263,"digest":"ad22cb2c195a7d8ca8e4174db011d5f58238ee25039b5b2da2649d8ca8b00123","integrity":"sha256-rSLLLBlafYyo5BdNsBHV9YI47iUDm1stomSdjKiwASM="},"flags/4x3/mo-37a1088aa687af13951bc93886e3e51cb246eccfde1b56528f189327ea291792.svg":{"logical_path":"flags/4x3/mo.svg","mtime":"2018-04-02T14:38:31+02:00","size":1516,"digest":"37a1088aa687af13951bc93886e3e51cb246eccfde1b56528f189327ea291792","integrity":"sha256-N6EIiqaHrxOVG8k4huPlHLJG7M/eG1ZSjxiTJ+opF5I="},"flags/1x1/mo-b463a1c37b69131d662e3fb2ae937583458824a09bcf68fc7ed2d7fd729138d1.svg":{"logical_path":"flags/1x1/mo.svg","mtime":"2018-04-02T14:38:31+02:00","size":1550,"digest":"b463a1c37b69131d662e3fb2ae937583458824a09bcf68fc7ed2d7fd729138d1","integrity":"sha256-tGOhw3tpEx1mLj+yrpN1g0WIJKCbz2j8ftLX/XKRONE="},"flags/4x3/mp-ecd12cadc358fdf293e856c0a3ffc09409123cabd3c7201225b2d21b59551e14.svg":{"logical_path":"flags/4x3/mp.svg","mtime":"2018-04-02T14:38:31+02:00","size":23425,"digest":"ecd12cadc358fdf293e856c0a3ffc09409123cabd3c7201225b2d21b59551e14","integrity":"sha256-7NEsrcNY/fKT6FbAo//AlAkSPKvTxyASJbLSG1lVHhQ="},"flags/1x1/mp-d1f4ba10c1409e713253f1fbb107eeccbd4ec1a8f9036663f1ac1991aee53835.svg":{"logical_path":"flags/1x1/mp.svg","mtime":"2018-04-02T14:38:31+02:00","size":23663,"digest":"d1f4ba10c1409e713253f1fbb107eeccbd4ec1a8f9036663f1ac1991aee53835","integrity":"sha256-0fS6EMFAnnEyU/H7sQfuzL1Owaj5A2Zj8awZka7lODU="},"flags/4x3/mq-b4e1b08a93c1364c79e6d61f95b16fca5b884da6e77835bc0e0adfff8ecc2d7f.svg":{"logical_path":"flags/4x3/mq.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"b4e1b08a93c1364c79e6d61f95b16fca5b884da6e77835bc0e0adfff8ecc2d7f","integrity":"sha256-tOGwipPBNkx55tYflbFvyluITabneDW8Dgrf/47MLX8="},"flags/1x1/mq-19cb6f7cb7354c3fd40e987c93a2d76329d34b2ed3873c3f25fe56802f251ea8.svg":{"logical_path":"flags/1x1/mq.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"19cb6f7cb7354c3fd40e987c93a2d76329d34b2ed3873c3f25fe56802f251ea8","integrity":"sha256-GctvfLc1TD/UDph8k6LXYynTSy7Thzw/Jf5WgC8lHqg="},"flags/4x3/mr-9f64af3ed5c6d8d1f68b5cb09fd1aa9d28c3c95107e063f64a0ef95f0cb9429a.svg":{"logical_path":"flags/4x3/mr.svg","mtime":"2018-04-02T14:38:31+02:00","size":450,"digest":"9f64af3ed5c6d8d1f68b5cb09fd1aa9d28c3c95107e063f64a0ef95f0cb9429a","integrity":"sha256-n2SvPtXG2NH2i1ywn9GqnSjDyVEH4GP2Sg75Xwy5Qpo="},"flags/1x1/mr-0e79b7bcc669bb871d94021db2b78b162b9867c7eaf934d8f7a3025fd5903576.svg":{"logical_path":"flags/1x1/mr.svg","mtime":"2018-04-02T14:38:31+02:00","size":438,"digest":"0e79b7bcc669bb871d94021db2b78b162b9867c7eaf934d8f7a3025fd5903576","integrity":"sha256-Dnm3vMZpu4cdlAIdsreLFiuYZ8fq+TTY96MCX9WQNXY="},"flags/4x3/ms-32620dd70353777b2ee62951556976f398cd38ae359b5a8c97311a1dc61eb8bc.svg":{"logical_path":"flags/4x3/ms.svg","mtime":"2018-04-02T14:38:31+02:00","size":6792,"digest":"32620dd70353777b2ee62951556976f398cd38ae359b5a8c97311a1dc61eb8bc","integrity":"sha256-MmIN1wNTd3su5ilRVWl285jNOK41m1qMlzEaHcYeuLw="},"flags/1x1/ms-4104d4f36cb5cf1c6de78e52e90bc3c5b8bfa262617b16a737673feb8c30a00c.svg":{"logical_path":"flags/1x1/ms.svg","mtime":"2018-04-02T14:38:31+02:00","size":6700,"digest":"4104d4f36cb5cf1c6de78e52e90bc3c5b8bfa262617b16a737673feb8c30a00c","integrity":"sha256-QQTU82y1zxxt545S6QvDxbi/omJhexanN2c/64wwoAw="},"flags/4x3/mt-0c9819aa69b34b84c1ee43620922737122eb38f107be9864a0690ac66ef8aa64.svg":{"logical_path":"flags/4x3/mt.svg","mtime":"2018-04-02T14:38:31+02:00","size":8807,"digest":"0c9819aa69b34b84c1ee43620922737122eb38f107be9864a0690ac66ef8aa64","integrity":"sha256-DJgZqmmzS4TB7kNiCSJzcSLrOPEHvphkoGkKxm74qmQ="},"flags/1x1/mt-3c3fe71f2a2bf0d961fd145ad7e48ca1e9d3a05cce514354714ba4568503d106.svg":{"logical_path":"flags/1x1/mt.svg","mtime":"2018-04-02T14:38:31+02:00","size":10519,"digest":"3c3fe71f2a2bf0d961fd145ad7e48ca1e9d3a05cce514354714ba4568503d106","integrity":"sha256-PD/nHyor8Nlh/RRa1+SMoenToFzOUUNUcUukVoUD0QY="},"flags/4x3/mu-c78c23f1499756b9db762ae434ca354d1481447fa94c66bc10aca9443b399059.svg":{"logical_path":"flags/4x3/mu.svg","mtime":"2018-04-02T14:38:31+02:00","size":322,"digest":"c78c23f1499756b9db762ae434ca354d1481447fa94c66bc10aca9443b399059","integrity":"sha256-x4wj8UmXVrnbdirkNMo1TRSBRH+pTGa8EKypRDs5kFk="},"flags/1x1/mu-91ebc79d0fa306127ea8b7a33f77d5b28f35c516ea91ff0468c7344dc838db69.svg":{"logical_path":"flags/1x1/mu.svg","mtime":"2018-04-02T14:38:31+02:00","size":322,"digest":"91ebc79d0fa306127ea8b7a33f77d5b28f35c516ea91ff0468c7344dc838db69","integrity":"sha256-kevHnQ+jBhJ+qLejP3fVso81xRbqkf8EaMc0Tcg422k="},"flags/4x3/mv-a17c947e17adae6aacef01a3e131c4150aa094911b53fbaead41783683e008eb.svg":{"logical_path":"flags/4x3/mv.svg","mtime":"2018-04-02T14:38:31+02:00","size":292,"digest":"a17c947e17adae6aacef01a3e131c4150aa094911b53fbaead41783683e008eb","integrity":"sha256-oXyUfhetrmqs7wGj4THEFQqglJEbU/uurUF4NoPgCOs="},"flags/1x1/mv-d138e94d9d2ed093ef1425c1164493b780202f9a7f7937241a7b081b79ff8b01.svg":{"logical_path":"flags/1x1/mv.svg","mtime":"2018-04-02T14:38:31+02:00","size":310,"digest":"d138e94d9d2ed093ef1425c1164493b780202f9a7f7937241a7b081b79ff8b01","integrity":"sha256-0TjpTZ0u0JPvFCXBFkSTt4AgL5p/eTckGnsIG3n/iwE="},"flags/4x3/mw-21f116afdf71df80e3c59084c6ba640814fa5389430328ff55c9403b5c239632.svg":{"logical_path":"flags/4x3/mw.svg","mtime":"2018-04-02T14:38:31+02:00","size":3721,"digest":"21f116afdf71df80e3c59084c6ba640814fa5389430328ff55c9403b5c239632","integrity":"sha256-IfEWr99x34DjxZCExrpkCBT6U4lDAyj/VclAO1wjljI="},"flags/1x1/mw-5c2228d3f1cf1f9cf8cb158e813202981828c11e8caf117836fc57fa6bc1c788.svg":{"logical_path":"flags/1x1/mw.svg","mtime":"2018-04-02T14:38:31+02:00","size":3930,"digest":"5c2228d3f1cf1f9cf8cb158e813202981828c11e8caf117836fc57fa6bc1c788","integrity":"sha256-XCIo0/HPH5z4yxWOgTICmBgowR6MrxF4NvxX+mvBx4g="},"flags/4x3/mx-a235f9b16921590b7e78caa6f76339361356946eaf0046badd10732b4647c0b6.svg":{"logical_path":"flags/4x3/mx.svg","mtime":"2018-04-02T14:38:31+02:00","size":95864,"digest":"a235f9b16921590b7e78caa6f76339361356946eaf0046badd10732b4647c0b6","integrity":"sha256-ojX5sWkhWQt+eMqm92M5NhNWlG6vAEa63RBzK0ZHwLY="},"flags/1x1/mx-cdab01ebcdccc020ca16e1355ef1fd18ca0043b501f399ca8edc48adfa8c7292.svg":{"logical_path":"flags/1x1/mx.svg","mtime":"2018-04-02T14:38:31+02:00","size":91341,"digest":"cdab01ebcdccc020ca16e1355ef1fd18ca0043b501f399ca8edc48adfa8c7292","integrity":"sha256-zasB683MwCDKFuE1XvH9GMoAQ7UB85nKjtxIrfqMcpI="},"flags/4x3/my-0ed63574cf5f20c0663ab8cd1f700e150fb641fd0b93602ba013abbfaae5ee59.svg":{"logical_path":"flags/4x3/my.svg","mtime":"2018-04-02T14:38:31+02:00","size":1284,"digest":"0ed63574cf5f20c0663ab8cd1f700e150fb641fd0b93602ba013abbfaae5ee59","integrity":"sha256-DtY1dM9fIMBmOrjNH3AOFQ+2Qf0Lk2AroBOrv6rl7lk="},"flags/1x1/my-5e8d31ef06ffc8af33a5616d760592ecd022c52afc8ba33c721f1e4989da0628.svg":{"logical_path":"flags/1x1/my.svg","mtime":"2018-04-02T14:38:31+02:00","size":1275,"digest":"5e8d31ef06ffc8af33a5616d760592ecd022c52afc8ba33c721f1e4989da0628","integrity":"sha256-Xo0x7wb/yK8zpWFtdgWS7NAixSr8i6M8ch8eSYnaBig="},"flags/4x3/mz-752e2293917b1d2ece3f097104caeadf6a679054a779e9d3be8e49dc324bb88a.svg":{"logical_path":"flags/4x3/mz.svg","mtime":"2018-04-02T14:38:31+02:00","size":2623,"digest":"752e2293917b1d2ece3f097104caeadf6a679054a779e9d3be8e49dc324bb88a","integrity":"sha256-dS4ik5F7HS7OPwlxBMrq32pnkFSneenTvo5J3DJLuIo="},"flags/1x1/mz-300cba975ad43c962ceca0d266ded1fe3d21d6b4d701d657fb42b27268ea2964.svg":{"logical_path":"flags/1x1/mz.svg","mtime":"2018-04-02T14:38:31+02:00","size":2604,"digest":"300cba975ad43c962ceca0d266ded1fe3d21d6b4d701d657fb42b27268ea2964","integrity":"sha256-MAy6l1rUPJYs7KDSZt7R/j0h1rTXAdZX+0KycmjqKWQ="},"flags/4x3/na-a0655a2e70751278e6a60d31e818f672864a6e68e8b3d3361b2fbb70fa9bfef8.svg":{"logical_path":"flags/4x3/na.svg","mtime":"2018-04-02T14:38:31+02:00","size":1005,"digest":"a0655a2e70751278e6a60d31e818f672864a6e68e8b3d3361b2fbb70fa9bfef8","integrity":"sha256-oGVaLnB1Enjmpg0x6Bj2coZKbmjos9M2Gy+7cPqb/vg="},"flags/1x1/na-1ce089a189db5be15eb05df8155f9bd017b61fc1a497e5b3021ff2ca664e122d.svg":{"logical_path":"flags/1x1/na.svg","mtime":"2018-04-02T14:38:31+02:00","size":983,"digest":"1ce089a189db5be15eb05df8155f9bd017b61fc1a497e5b3021ff2ca664e122d","integrity":"sha256-HOCJoYnbW+FesF34FV+b0Be2H8Gkl+WzAh/yymZOEi0="},"flags/4x3/nc-0c7171d91c44414ed69808611db588f1283ee7e34ea8a74a9a5101ba4b1cb305.svg":{"logical_path":"flags/4x3/nc.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"0c7171d91c44414ed69808611db588f1283ee7e34ea8a74a9a5101ba4b1cb305","integrity":"sha256-DHFx2RxEQU7WmAhhHbWI8Sg+5+NOqKdKmlEBukscswU="},"flags/1x1/nc-d3a1629f06dc3200af7669f2d895fce1908d2c1ca02d71e530bdfa6646a9516c.svg":{"logical_path":"flags/1x1/nc.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"d3a1629f06dc3200af7669f2d895fce1908d2c1ca02d71e530bdfa6646a9516c","integrity":"sha256-06FinwbcMgCvdmny2JX84ZCNLBygLXHlML36ZkapUWw="},"flags/4x3/ne-2b61d30a6cb4554535538e3b753926853e8c629a494a347286b9731c803548e4.svg":{"logical_path":"flags/4x3/ne.svg","mtime":"2018-04-02T14:38:31+02:00","size":279,"digest":"2b61d30a6cb4554535538e3b753926853e8c629a494a347286b9731c803548e4","integrity":"sha256-K2HTCmy0VUU1U447dTkmhT6MYppJSjRyhrlzHIA1SOQ="},"flags/1x1/ne-9c5f798ccd7d3dd3771ae628b4a39dfb2a4578fefd2e006f3ce89c3e494d0cb1.svg":{"logical_path":"flags/1x1/ne.svg","mtime":"2018-04-02T14:38:31+02:00","size":285,"digest":"9c5f798ccd7d3dd3771ae628b4a39dfb2a4578fefd2e006f3ce89c3e494d0cb1","integrity":"sha256-nF95jM19PdN3GuYotKOd+ypFeP79LgBvPOicPklNDLE="},"flags/4x3/nf-4e615baa83a8b4db3e39fe1d251ab913943d64e0cd320f251d619ab54e7512d3.svg":{"logical_path":"flags/4x3/nf.svg","mtime":"2018-04-02T14:38:31+02:00","size":5845,"digest":"4e615baa83a8b4db3e39fe1d251ab913943d64e0cd320f251d619ab54e7512d3","integrity":"sha256-TmFbqoOotNs+Of4dJRq5E5Q9ZODNMg8lHWGatU51EtM="},"flags/1x1/nf-45403247c90050484813acf23c50f543779528e346317274373c3c24fd830103.svg":{"logical_path":"flags/1x1/nf.svg","mtime":"2018-04-02T14:38:31+02:00","size":5598,"digest":"45403247c90050484813acf23c50f543779528e346317274373c3c24fd830103","integrity":"sha256-RUAyR8kAUEhIE6zyPFD1Q3eVKONGMXJ0Nzw8JP2DAQM="},"flags/4x3/ng-d52fd188be973f31dd34e5a0b3fed0de68fe736c8a41c6028d9c248c038c8641.svg":{"logical_path":"flags/4x3/ng.svg","mtime":"2018-04-02T14:38:31+02:00","size":263,"digest":"d52fd188be973f31dd34e5a0b3fed0de68fe736c8a41c6028d9c248c038c8641","integrity":"sha256-1S/RiL6XPzHdNOWgs/7Q3mj+c2yKQcYCjZwkjAOMhkE="},"flags/1x1/ng-f22edcc5867554d69ecbe15add0fbbb1389631f3ced07a4f820065c7770c65f5.svg":{"logical_path":"flags/1x1/ng.svg","mtime":"2018-04-02T14:38:31+02:00","size":263,"digest":"f22edcc5867554d69ecbe15add0fbbb1389631f3ced07a4f820065c7770c65f5","integrity":"sha256-8i7cxYZ1VNaey+Fa3Q+7sTiWMfPO0HpPggBlx3cMZfU="},"flags/4x3/ni-2fbb883e46fbe3b2ecfed9dac004ceb546f25c77a84a5966eea224674aebc610.svg":{"logical_path":"flags/4x3/ni.svg","mtime":"2018-04-02T14:38:31+02:00","size":18584,"digest":"2fbb883e46fbe3b2ecfed9dac004ceb546f25c77a84a5966eea224674aebc610","integrity":"sha256-L7uIPkb747Ls/tnawATOtUbyXHeoSllm7qIkZ0rrxhA="},"flags/1x1/ni-214aed148b615c4846f842b47f99cf178ac62a96cf18c5dd6b23467184b56680.svg":{"logical_path":"flags/1x1/ni.svg","mtime":"2018-04-02T14:38:31+02:00","size":18664,"digest":"214aed148b615c4846f842b47f99cf178ac62a96cf18c5dd6b23467184b56680","integrity":"sha256-IUrtFIthXEhG+EK0f5nPF4rGKpbPGMXdayNGcYS1ZoA="},"flags/4x3/nl-4f0ecea529dd4c0099dd41a7801fa5ac44aa04cd872ca31e11efd58b5a813774.svg":{"logical_path":"flags/4x3/nl.svg","mtime":"2018-04-02T14:38:31+02:00","size":367,"digest":"4f0ecea529dd4c0099dd41a7801fa5ac44aa04cd872ca31e11efd58b5a813774","integrity":"sha256-Tw7OpSndTACZ3UGngB+lrESqBM2HLKMeEe/Vi1qBN3Q="},"flags/1x1/nl-9c8f60e638879d642487818975e58c61cd3102f0e68c360708243c076436ff68.svg":{"logical_path":"flags/1x1/nl.svg","mtime":"2018-04-02T14:38:31+02:00","size":375,"digest":"9c8f60e638879d642487818975e58c61cd3102f0e68c360708243c076436ff68","integrity":"sha256-nI9g5jiHnWQkh4GJdeWMYc0xAvDmjDYHCCQ8B2Q2/2g="},"flags/4x3/no-270f7ee9d1d2efa6abf16f693faba8586adae842d79d8aad9e3f37e96c27cbce.svg":{"logical_path":"flags/4x3/no.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"270f7ee9d1d2efa6abf16f693faba8586adae842d79d8aad9e3f37e96c27cbce","integrity":"sha256-Jw9+6dHS76ar8W9pP6uoWGra6ELXnYqtnj836Wwny84="},"flags/1x1/no-7d377325e8c5ec4de0376e9f4c13463f183af637e6c443716f22020c7a313979.svg":{"logical_path":"flags/1x1/no.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"7d377325e8c5ec4de0376e9f4c13463f183af637e6c443716f22020c7a313979","integrity":"sha256-fTdzJejF7E3gN26fTBNGPxg69jfmxENxbyICDHoxOXk="},"flags/4x3/np-69637ddb3a173c4522a71598278aa32462e1762e34dd99c9dc99a515433a6cf8.svg":{"logical_path":"flags/4x3/np.svg","mtime":"2018-04-02T14:38:31+02:00","size":1061,"digest":"69637ddb3a173c4522a71598278aa32462e1762e34dd99c9dc99a515433a6cf8","integrity":"sha256-aWN92zoXPEUipxWYJ4qjJGLhdi403ZnJ3JmlFUM6bPg="},"flags/1x1/np-44ead118cce3a1fcbb720cc8d6eab6ecb6b62292315f61ae5963a40262ee11d2.svg":{"logical_path":"flags/1x1/np.svg","mtime":"2018-04-02T14:38:31+02:00","size":1199,"digest":"44ead118cce3a1fcbb720cc8d6eab6ecb6b62292315f61ae5963a40262ee11d2","integrity":"sha256-ROrRGMzjofy7cgzI1uq27La2IpIxX2GuWWOkAmLuEdI="},"flags/4x3/nr-0bd3c0ba7bbac4bd5985b838096eeebd67711d39065619ef092fa4bb55b22a6d.svg":{"logical_path":"flags/4x3/nr.svg","mtime":"2018-04-02T14:38:31+02:00","size":648,"digest":"0bd3c0ba7bbac4bd5985b838096eeebd67711d39065619ef092fa4bb55b22a6d","integrity":"sha256-C9PAunu6xL1Zhbg4CW7uvWdxHTkGVhnvCS+ku1WyKm0="},"flags/1x1/nr-63b9c44e5dd66a59895f52707dc24db5bd1eab6e535298d24e414c0f2dafcb3c.svg":{"logical_path":"flags/1x1/nr.svg","mtime":"2018-04-02T14:38:31+02:00","size":671,"digest":"63b9c44e5dd66a59895f52707dc24db5bd1eab6e535298d24e414c0f2dafcb3c","integrity":"sha256-Y7nETl3WalmJX1JwfcJNtb0eq25TUpjSTkFMDy2vyzw="},"flags/4x3/nu-259989e1eea0cbf6b41a33176a4c9c1eaa2e7ae6571ad80a324c6309bd5aa5fc.svg":{"logical_path":"flags/4x3/nu.svg","mtime":"2018-04-02T14:38:31+02:00","size":1748,"digest":"259989e1eea0cbf6b41a33176a4c9c1eaa2e7ae6571ad80a324c6309bd5aa5fc","integrity":"sha256-JZmJ4e6gy/a0GjMXakycHqoueuZXGtgKMkxjCb1apfw="},"flags/1x1/nu-1cb535708f64ed8b386a245e571e677e935009af92f2b214760a2832c1ee1b53.svg":{"logical_path":"flags/1x1/nu.svg","mtime":"2018-04-02T14:38:31+02:00","size":1736,"digest":"1cb535708f64ed8b386a245e571e677e935009af92f2b214760a2832c1ee1b53","integrity":"sha256-HLU1cI9k7Ys4aiReVx5nfpNQCa+S8rIUdgooMsHuG1M="},"flags/4x3/nz-90ceca2a683fbec395a91b77b0880cea99c3b2cbdb24caa5474925cbdcc3675e.svg":{"logical_path":"flags/4x3/nz.svg","mtime":"2018-04-02T14:38:31+02:00","size":3019,"digest":"90ceca2a683fbec395a91b77b0880cea99c3b2cbdb24caa5474925cbdcc3675e","integrity":"sha256-kM7KKmg/vsOVqRt3sIgM6pnDssvbJMqlR0kly9zDZ14="},"flags/1x1/nz-b0d78f165a72edd46599222a2ea5f6a91a8252975cb03e33c4ca08e389859aac.svg":{"logical_path":"flags/1x1/nz.svg","mtime":"2018-04-02T14:38:31+02:00","size":3045,"digest":"b0d78f165a72edd46599222a2ea5f6a91a8252975cb03e33c4ca08e389859aac","integrity":"sha256-sNePFlpy7dRlmSIqLqX2qRqCUpdcsD4zxMoI44mFmqw="},"flags/4x3/om-aadcca7bc7ad318400097b84849dd64c4744306cd9b4f152fba34f2e84116965.svg":{"logical_path":"flags/4x3/om.svg","mtime":"2018-04-02T14:38:31+02:00","size":22891,"digest":"aadcca7bc7ad318400097b84849dd64c4744306cd9b4f152fba34f2e84116965","integrity":"sha256-qtzKe8etMYQACXuEhJ3WTEdEMGzZtPFS+6NPLoQRaWU="},"flags/1x1/om-705e2bd2b2fc7d13c152aa06bfb9e6ee4ad8b299f8c06ca16adad0b18b2b18ed.svg":{"logical_path":"flags/1x1/om.svg","mtime":"2018-04-02T14:38:31+02:00","size":22875,"digest":"705e2bd2b2fc7d13c152aa06bfb9e6ee4ad8b299f8c06ca16adad0b18b2b18ed","integrity":"sha256-cF4r0rL8fRPBUqoGv7nm7krYspn4wGyhatrQsYsrGO0="},"flags/4x3/pa-027e679bd65dcaa2c53145a14669c1e674a467a889ef702cbe2a260f7ca8ad38.svg":{"logical_path":"flags/4x3/pa.svg","mtime":"2018-04-02T14:38:31+02:00","size":746,"digest":"027e679bd65dcaa2c53145a14669c1e674a467a889ef702cbe2a260f7ca8ad38","integrity":"sha256-An5nm9ZdyqLFMUWhRmnB5nSkZ6iJ73AsviomD3yorTg="},"flags/1x1/pa-edeb4faeadaa286de7fdc667e25d38ad0cdbccaec5023182fed6a3c74e8b09eb.svg":{"logical_path":"flags/1x1/pa.svg","mtime":"2018-04-02T14:38:31+02:00","size":662,"digest":"edeb4faeadaa286de7fdc667e25d38ad0cdbccaec5023182fed6a3c74e8b09eb","integrity":"sha256-7etPrq2qKG3n/cZn4l04rQzbzK7FAjGC/tajx06LCes="},"flags/4x3/pe-7ec59842737c90d6ff543f1831fd69b51e1e7ee1b068c3ac6259cbf2c214d611.svg":{"logical_path":"flags/4x3/pe.svg","mtime":"2018-04-02T14:38:31+02:00","size":74343,"digest":"7ec59842737c90d6ff543f1831fd69b51e1e7ee1b068c3ac6259cbf2c214d611","integrity":"sha256-fsWYQnN8kNb/VD8YMf1ptR4efuGwaMOsYlnL8sIU1hE="},"flags/1x1/pe-97d1b8ed1d4ed5e5f0348a731ca4a3a4b9abc7d440447dc87a521f229f375ed3.svg":{"logical_path":"flags/1x1/pe.svg","mtime":"2018-04-02T14:38:31+02:00","size":73629,"digest":"97d1b8ed1d4ed5e5f0348a731ca4a3a4b9abc7d440447dc87a521f229f375ed3","integrity":"sha256-l9G47R1O1eXwNIpzHKSjpLmrx9RARH3IelIfIp83XtM="},"flags/4x3/pf-27955c73c5be4043c5b7ddf64c8f46d11c6648e3b1fc0efe028b8afea21a40e1.svg":{"logical_path":"flags/4x3/pf.svg","mtime":"2018-04-02T14:38:31+02:00","size":4292,"digest":"27955c73c5be4043c5b7ddf64c8f46d11c6648e3b1fc0efe028b8afea21a40e1","integrity":"sha256-J5Vcc8W+QEPFt932TI9G0RxmSOOx/A7+AouK/qIaQOE="},"flags/1x1/pf-83e3e1d36fba45e015c62f938e6d182029edc05ebfdc50bcb33860f36f96d73a.svg":{"logical_path":"flags/1x1/pf.svg","mtime":"2018-04-02T14:38:31+02:00","size":4235,"digest":"83e3e1d36fba45e015c62f938e6d182029edc05ebfdc50bcb33860f36f96d73a","integrity":"sha256-g+Ph02+6ReAVxi+Tjm0YICntwF6/3FC8szhg82+W1zo="},"flags/4x3/pg-c2fdd2551f9044c461eccfae2d7ba0a347a99143f6002b71a429942af0217897.svg":{"logical_path":"flags/4x3/pg.svg","mtime":"2018-04-02T14:38:31+02:00","size":1671,"digest":"c2fdd2551f9044c461eccfae2d7ba0a347a99143f6002b71a429942af0217897","integrity":"sha256-wv3SVR+QRMRh7M+uLXugo0epkUP2ACtxpCmUKvAheJc="},"flags/1x1/pg-cf60257fa85f9270b1e9980e703435186110167f76c153bc460c10ee8b2d4b09.svg":{"logical_path":"flags/1x1/pg.svg","mtime":"2018-04-02T14:38:31+02:00","size":2111,"digest":"cf60257fa85f9270b1e9980e703435186110167f76c153bc460c10ee8b2d4b09","integrity":"sha256-z2Alf6hfknCx6ZgOcDQ1GGEQFn92wVO8RgwQ7ostSwk="},"flags/4x3/ph-bf3394850a6cec6a535420eabce263e7f8193413e4af1fb317c76da025388c1b.svg":{"logical_path":"flags/4x3/ph.svg","mtime":"2018-04-02T14:38:31+02:00","size":1303,"digest":"bf3394850a6cec6a535420eabce263e7f8193413e4af1fb317c76da025388c1b","integrity":"sha256-vzOUhQps7GpTVCDqvOJj5/gZNBPkrx+zF8dtoCU4jBs="},"flags/1x1/ph-006c3218effe4269252cb9638de82ea339eb2894951705c630533ceffa842169.svg":{"logical_path":"flags/1x1/ph.svg","mtime":"2018-04-02T14:38:31+02:00","size":1303,"digest":"006c3218effe4269252cb9638de82ea339eb2894951705c630533ceffa842169","integrity":"sha256-AGwyGO/+QmklLLljjeguoznrKJSVFwXGMFM87/qEIWk="},"flags/4x3/pk-b64f6a32e5bb598f57cfe49c4899c2021f2d153653f3d92101e6e11b2158e500.svg":{"logical_path":"flags/4x3/pk.svg","mtime":"2018-04-02T14:38:31+02:00","size":743,"digest":"b64f6a32e5bb598f57cfe49c4899c2021f2d153653f3d92101e6e11b2158e500","integrity":"sha256-tk9qMuW7WY9Xz+ScSJnCAh8tFTZT89khAebhGyFY5QA="},"flags/1x1/pk-d2d58def913c9081c5eeeda5f0b6895068ec13c955694e359531e23422145e60.svg":{"logical_path":"flags/1x1/pk.svg","mtime":"2018-04-02T14:38:31+02:00","size":694,"digest":"d2d58def913c9081c5eeeda5f0b6895068ec13c955694e359531e23422145e60","integrity":"sha256-0tWN75E8kIHF7u2l8LaJUGjsE8lVaU41lTHiNCIUXmA="},"flags/4x3/pl-f55a710991a94c2e6c2f9f1a7a4a36ebb84b24b7c9d9df4e1ffe86d61321fa6f.svg":{"logical_path":"flags/4x3/pl.svg","mtime":"2018-04-02T14:38:31+02:00","size":228,"digest":"f55a710991a94c2e6c2f9f1a7a4a36ebb84b24b7c9d9df4e1ffe86d61321fa6f","integrity":"sha256-9VpxCZGpTC5sL58aeko267hLJLfJ2d9OH/6G1hMh+m8="},"flags/1x1/pl-fafb539259385f2b99df910cff085710a9b4d9706b74e4e0f8a6ef627615c4e7.svg":{"logical_path":"flags/1x1/pl.svg","mtime":"2018-04-02T14:38:31+02:00","size":228,"digest":"fafb539259385f2b99df910cff085710a9b4d9706b74e4e0f8a6ef627615c4e7","integrity":"sha256-+vtTklk4XyuZ35EM/whXEKm02XBrdOTg+KbvYnYVxOc="},"flags/4x3/pm-8f6338d2ae3e0e42adc9754720ca21ad4979095cf6d7467a8db5a5a1c3e0b2a5.svg":{"logical_path":"flags/4x3/pm.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"8f6338d2ae3e0e42adc9754720ca21ad4979095cf6d7467a8db5a5a1c3e0b2a5","integrity":"sha256-j2M40q4+DkKtyXVHIMohrUl5CVz210Z6jbWlocPgsqU="},"flags/1x1/pm-63029c6198dc42c404ec39807a99528b1d198eeeea6f9a1e309548242480140b.svg":{"logical_path":"flags/1x1/pm.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"63029c6198dc42c404ec39807a99528b1d198eeeea6f9a1e309548242480140b","integrity":"sha256-YwKcYZjcQsQE7DmAeplSix0Zju7qb5oeMJVIJCSAFAs="},"flags/4x3/pn-4006c11ca83011c0dd60a13ac30b27da0578b9f1368bd8c6de5aab423f6662d8.svg":{"logical_path":"flags/4x3/pn.svg","mtime":"2018-04-02T14:38:31+02:00","size":10953,"digest":"4006c11ca83011c0dd60a13ac30b27da0578b9f1368bd8c6de5aab423f6662d8","integrity":"sha256-QAbBHKgwEcDdYKE6wwsn2gV4ufE2i9jG3lqrQj9mYtg="},"flags/1x1/pn-6c433f7f9cb79c6d5ed7bbeade8a495e3b26ca2604f4fd3995096109684ac5dd.svg":{"logical_path":"flags/1x1/pn.svg","mtime":"2018-04-02T14:38:31+02:00","size":8624,"digest":"6c433f7f9cb79c6d5ed7bbeade8a495e3b26ca2604f4fd3995096109684ac5dd","integrity":"sha256-bEM/f5y3nG1e17vq3opJXjsmyiYE9P05lQlhCWhKxd0="},"flags/4x3/pr-6287e1515fa80e2d05133ed93f14ca03a1be6909a9ef6c736fd60f9c9fe73132.svg":{"logical_path":"flags/4x3/pr.svg","mtime":"2018-04-02T14:38:31+02:00","size":634,"digest":"6287e1515fa80e2d05133ed93f14ca03a1be6909a9ef6c736fd60f9c9fe73132","integrity":"sha256-YofhUV+oDi0FEz7ZPxTKA6G+aQmp72xzb9YPnJ/nMTI="},"flags/1x1/pr-526985b3a6d2d6de577ed0ed92d0b49ce854667e3ff630304813fd5af15527cd.svg":{"logical_path":"flags/1x1/pr.svg","mtime":"2018-04-02T14:38:31+02:00","size":622,"digest":"526985b3a6d2d6de577ed0ed92d0b49ce854667e3ff630304813fd5af15527cd","integrity":"sha256-UmmFs6bS1t5XftDtktC0nOhUZn4/9jAwSBP9WvFVJ80="},"flags/4x3/ps-31f50e1fcb44b9aa6e9ce4473c3085f744e70ea0fa1fd8d85787f4e7b0c4a69b.svg":{"logical_path":"flags/4x3/ps.svg","mtime":"2018-04-02T14:38:31+02:00","size":558,"digest":"31f50e1fcb44b9aa6e9ce4473c3085f744e70ea0fa1fd8d85787f4e7b0c4a69b","integrity":"sha256-MfUOH8tEuapunORHPDCF90TnDqD6H9jYV4f057DEpps="},"flags/1x1/ps-c43918bc71bef71b24dd46e8cacc53e0df53e02dcce6199d06d11a4637f08a04.svg":{"logical_path":"flags/1x1/ps.svg","mtime":"2018-04-02T14:38:31+02:00","size":544,"digest":"c43918bc71bef71b24dd46e8cacc53e0df53e02dcce6199d06d11a4637f08a04","integrity":"sha256-xDkYvHG+9xsk3UboysxT4N9T4C3M5hmdBtEaRjfwigQ="},"flags/4x3/pt-9aab20caed714ee47fc408f017037aea94a649b3ba4d87e2da37870ee31e4f92.svg":{"logical_path":"flags/4x3/pt.svg","mtime":"2018-04-02T14:38:31+02:00","size":8393,"digest":"9aab20caed714ee47fc408f017037aea94a649b3ba4d87e2da37870ee31e4f92","integrity":"sha256-mqsgyu1xTuR/xAjwFwN66pSmSbO6TYfi2jeHDuMeT5I="},"flags/1x1/pt-a309869e5018c9690a65ebdf8a2d69d61f82772068a7920f9680ed0581ae5966.svg":{"logical_path":"flags/1x1/pt.svg","mtime":"2018-04-02T14:38:31+02:00","size":8775,"digest":"a309869e5018c9690a65ebdf8a2d69d61f82772068a7920f9680ed0581ae5966","integrity":"sha256-owmGnlAYyWkKZevfii1p1h+CdyBop5IPloDtBYGuWWY="},"flags/4x3/pw-9262037d114d0f61571c74f9a5455809709b43e6565443ae2667981eecb5f12a.svg":{"logical_path":"flags/4x3/pw.svg","mtime":"2018-04-02T14:38:31+02:00","size":467,"digest":"9262037d114d0f61571c74f9a5455809709b43e6565443ae2667981eecb5f12a","integrity":"sha256-kmIDfRFND2FXHHT5pUVYCXCbQ+ZWVEOuJmeYHuy18So="},"flags/1x1/pw-a6f42019653ae26d43c6e9b7bef83fc98cff8ec5e8d0c50ad7cb0a17d5e565a6.svg":{"logical_path":"flags/1x1/pw.svg","mtime":"2018-04-02T14:38:31+02:00","size":511,"digest":"a6f42019653ae26d43c6e9b7bef83fc98cff8ec5e8d0c50ad7cb0a17d5e565a6","integrity":"sha256-pvQgGWU64m1Dxum3vvg/yYz/jsXo0MUK18sKF9XlZaY="},"flags/4x3/py-5bc9e9f0dee94ae3d9bd80ae6fb1aac297dc81a1c592d0a73bc3383bce73af74.svg":{"logical_path":"flags/4x3/py.svg","mtime":"2018-04-02T14:38:31+02:00","size":17312,"digest":"5bc9e9f0dee94ae3d9bd80ae6fb1aac297dc81a1c592d0a73bc3383bce73af74","integrity":"sha256-W8np8N7pSuPZvYCub7GqwpfcgaHFktCnO8M4O85zr3Q="},"flags/1x1/py-182eff300f4507fd9399fb6310d1cd3b45adadd7924ad2814003c7111ec5c0de.svg":{"logical_path":"flags/1x1/py.svg","mtime":"2018-04-02T14:38:31+02:00","size":17478,"digest":"182eff300f4507fd9399fb6310d1cd3b45adadd7924ad2814003c7111ec5c0de","integrity":"sha256-GC7/MA9FB/2TmftjENHNO0WtrdeSStKBQAPHER7FwN4="},"flags/4x3/qa-32c93970f8e521850eddfaf2a89dfff987f0ae3b0b73a253c301b61cf547cf9e.svg":{"logical_path":"flags/4x3/qa.svg","mtime":"2018-04-02T14:38:31+02:00","size":362,"digest":"32c93970f8e521850eddfaf2a89dfff987f0ae3b0b73a253c301b61cf547cf9e","integrity":"sha256-Msk5cPjlIYUO3fryqJ3/+YfwrjsLc6JTwwG2HPVHz54="},"flags/1x1/qa-182e4d8ace2607d0c02d3c29d65eb084af71092357006bc41cd601981ec3b81c.svg":{"logical_path":"flags/1x1/qa.svg","mtime":"2018-04-02T14:38:31+02:00","size":359,"digest":"182e4d8ace2607d0c02d3c29d65eb084af71092357006bc41cd601981ec3b81c","integrity":"sha256-GC5Nis4mB9DALTwp1l6whK9xCSNXAGvEHNYBmB7DuBw="},"flags/4x3/re-8b2ea1f2727c266a2b80cb12a9b7195f6b656f521552b67893b6761a07f9bc92.svg":{"logical_path":"flags/4x3/re.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"8b2ea1f2727c266a2b80cb12a9b7195f6b656f521552b67893b6761a07f9bc92","integrity":"sha256-iy6h8nJ8JmorgMsSqbcZX2tlb1IVUrZ4k7Z2Ggf5vJI="},"flags/1x1/re-07eb7d855022bc678b47b0ce5fd05da5044d6dde86ad3697d4ae55c68ff447c1.svg":{"logical_path":"flags/1x1/re.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"07eb7d855022bc678b47b0ce5fd05da5044d6dde86ad3697d4ae55c68ff447c1","integrity":"sha256-B+t9hVAivGeLR7DOX9BdpQRNbd6GrTaX1K5Vxo/0R8E="},"flags/4x3/ro-4ab797571e1d9eb326486f75654a4590fd33f20444f85b77ba0997eb6138c21f.svg":{"logical_path":"flags/4x3/ro.svg","mtime":"2018-04-02T14:38:31+02:00","size":308,"digest":"4ab797571e1d9eb326486f75654a4590fd33f20444f85b77ba0997eb6138c21f","integrity":"sha256-SreXVx4dnrMmSG91ZUpFkP0z8gRE+Ft3ugmX62E4wh8="},"flags/1x1/ro-ddfcbaec04d11bf7f95abebd1d3a42b2862b1af8fca9b02764a6ed0e409a1d75.svg":{"logical_path":"flags/1x1/ro.svg","mtime":"2018-04-02T14:38:31+02:00","size":308,"digest":"ddfcbaec04d11bf7f95abebd1d3a42b2862b1af8fca9b02764a6ed0e409a1d75","integrity":"sha256-3fy67ATRG/f5Wr69HTpCsoYrGvj8qbAnZKbtDkCaHXU="},"flags/4x3/rs-dd8a52473ea40e23b393b5f4a30d1edd91865aab167f0c1835ae84b15dcce585.svg":{"logical_path":"flags/4x3/rs.svg","mtime":"2018-04-02T14:38:31+02:00","size":187640,"digest":"dd8a52473ea40e23b393b5f4a30d1edd91865aab167f0c1835ae84b15dcce585","integrity":"sha256-3YpSRz6kDiOzk7X0ow0e3ZGGWqsWfwwYNa6EsV3M5YU="},"flags/1x1/rs-42bf40209c92e4e7169daf29fbcb7253b2804eee7a463051529327f38851f865.svg":{"logical_path":"flags/1x1/rs.svg","mtime":"2018-04-02T14:38:31+02:00","size":187503,"digest":"42bf40209c92e4e7169daf29fbcb7253b2804eee7a463051529327f38851f865","integrity":"sha256-Qr9AIJyS5OcWna8p+8tyU7KATu56RjBRUpMn84hR+GU="},"flags/4x3/ru-13f4525a4caad6e31afa523d2bc4a0c1e6377c0bef1bfd872682130d3f199d1d.svg":{"logical_path":"flags/4x3/ru.svg","mtime":"2018-04-02T14:38:31+02:00","size":289,"digest":"13f4525a4caad6e31afa523d2bc4a0c1e6377c0bef1bfd872682130d3f199d1d","integrity":"sha256-E/RSWkyq1uMa+lI9K8SgweY3fAvvG/2HJoITDT8ZnR0="},"flags/1x1/ru-b9792a963faf667447e0456dba5be80a3b37c197a4284d1539a3433721d9e2fe.svg":{"logical_path":"flags/1x1/ru.svg","mtime":"2018-04-02T14:38:31+02:00","size":293,"digest":"b9792a963faf667447e0456dba5be80a3b37c197a4284d1539a3433721d9e2fe","integrity":"sha256-uXkqlj+vZnRH4EVtulvoCjs3wZekKE0VOaNDNyHZ4v4="},"flags/4x3/rw-bc38bcd6e19d2941839b253af6e863b13338cde1174874f9674471026c15e422.svg":{"logical_path":"flags/4x3/rw.svg","mtime":"2018-04-02T14:38:31+02:00","size":750,"digest":"bc38bcd6e19d2941839b253af6e863b13338cde1174874f9674471026c15e422","integrity":"sha256-vDi81uGdKUGDmyU69uhjsTM4zeEXSHT5Z0RxAmwV5CI="},"flags/1x1/rw-456698123775b83d2b0fa1b9fe073f9ccdba0b6bf39a703b8979dcce158eb32c.svg":{"logical_path":"flags/1x1/rw.svg","mtime":"2018-04-02T14:38:31+02:00","size":751,"digest":"456698123775b83d2b0fa1b9fe073f9ccdba0b6bf39a703b8979dcce158eb32c","integrity":"sha256-RWaYEjd1uD0rD6G5/gc/nM26C2vzmnA7iXnczhWOsyw="},"flags/4x3/sa-2b2fd6abb48415d5407c576c24a24fbd80af5877ef06cf2d026452f6c67f5f4d.svg":{"logical_path":"flags/4x3/sa.svg","mtime":"2018-04-02T14:38:31+02:00","size":10303,"digest":"2b2fd6abb48415d5407c576c24a24fbd80af5877ef06cf2d026452f6c67f5f4d","integrity":"sha256-Ky/Wq7SEFdVAfFdsJKJPvYCvWHfvBs8tAmRS9sZ/X00="},"flags/1x1/sa-d9ebc73e7957f86604164dd5054fb32601ad14d7dfd4bfe73da5bdd10bb2f8ae.svg":{"logical_path":"flags/1x1/sa.svg","mtime":"2018-04-02T14:38:31+02:00","size":10233,"digest":"d9ebc73e7957f86604164dd5054fb32601ad14d7dfd4bfe73da5bdd10bb2f8ae","integrity":"sha256-2evHPnlX+GYEFk3VBU+zJgGtFNff1L/nPaW90Quy+K4="},"flags/4x3/sb-37761927039d0a37ba0995c59fd31bbe36c8a0ca161e5b72b8131e3659f8dddf.svg":{"logical_path":"flags/4x3/sb.svg","mtime":"2018-04-02T14:38:31+02:00","size":950,"digest":"37761927039d0a37ba0995c59fd31bbe36c8a0ca161e5b72b8131e3659f8dddf","integrity":"sha256-N3YZJwOdCje6CZXFn9MbvjbIoMoWHltyuBMeNln43d8="},"flags/1x1/sb-bedbf8464cd82f391bfe6178c63055b650d0cf3aee60c37fa79a586f95783b79.svg":{"logical_path":"flags/1x1/sb.svg","mtime":"2018-04-02T14:38:31+02:00","size":956,"digest":"bedbf8464cd82f391bfe6178c63055b650d0cf3aee60c37fa79a586f95783b79","integrity":"sha256-vtv4RkzYLzkb/mF4xjBVtlDQzzruYMN/p5pYb5V4O3k="},"flags/4x3/sc-f6a2f8f37be93f07600b491b52cb58d80d74b92d8ace0af313f4ce081b0d1345.svg":{"logical_path":"flags/4x3/sc.svg","mtime":"2018-04-02T14:38:31+02:00","size":568,"digest":"f6a2f8f37be93f07600b491b52cb58d80d74b92d8ace0af313f4ce081b0d1345","integrity":"sha256-9qL483vpPwdgC0kbUstY2A10uS2KzgrzE/TOCBsNE0U="},"flags/1x1/sc-5dcd01b98c34460c9624280fb5047811fbae7d976620cd0a70ad4263a9085b60.svg":{"logical_path":"flags/1x1/sc.svg","mtime":"2018-04-02T14:38:31+02:00","size":573,"digest":"5dcd01b98c34460c9624280fb5047811fbae7d976620cd0a70ad4263a9085b60","integrity":"sha256-Xc0BuYw0RgyWJCgPtQR4EfuufZdmIM0KcK1CY6kIW2A="},"flags/4x3/sd-cc9cf97e8a37622b9e1bad28811d46c4471595afa448dc055e0e3aae7687fe4b.svg":{"logical_path":"flags/4x3/sd.svg","mtime":"2018-04-02T14:38:31+02:00","size":494,"digest":"cc9cf97e8a37622b9e1bad28811d46c4471595afa448dc055e0e3aae7687fe4b","integrity":"sha256-zJz5foo3YiueG60ogR1GxEcVla+kSNwFXg46rnaH/ks="},"flags/1x1/sd-1f5d13f9780085acbaad13d959b1918c796ba7b0450954b15d145e87cebe045c.svg":{"logical_path":"flags/1x1/sd.svg","mtime":"2018-04-02T14:38:31+02:00","size":496,"digest":"1f5d13f9780085acbaad13d959b1918c796ba7b0450954b15d145e87cebe045c","integrity":"sha256-H10T+XgAhay6rRPZWbGRjHlrp7BFCVSxXRReh86+BFw="},"flags/4x3/se-84b06bcd5bd90ea8dd6d1c3c8d2799a843c47b0256ce098aef75414964618286.svg":{"logical_path":"flags/4x3/se.svg","mtime":"2018-04-02T14:38:31+02:00","size":688,"digest":"84b06bcd5bd90ea8dd6d1c3c8d2799a843c47b0256ce098aef75414964618286","integrity":"sha256-hLBrzVvZDqjdbRw8jSeZqEPEewJWzgmK73VBSWRhgoY="},"flags/1x1/se-39f128686652cf914f8601110fcc9ac879bca204407013b93aff4ca4fb2ed9bc.svg":{"logical_path":"flags/1x1/se.svg","mtime":"2018-04-02T14:38:31+02:00","size":701,"digest":"39f128686652cf914f8601110fcc9ac879bca204407013b93aff4ca4fb2ed9bc","integrity":"sha256-OfEoaGZSz5FPhgERD8yayHm8ogRAcBO5Ov9MpPsu2bw="},"flags/4x3/sg-a82acd90077e76318ddb0be96999d9695b9a9f4627e8a0f341d3987a62747dcc.svg":{"logical_path":"flags/4x3/sg.svg","mtime":"2018-04-02T14:38:31+02:00","size":890,"digest":"a82acd90077e76318ddb0be96999d9695b9a9f4627e8a0f341d3987a62747dcc","integrity":"sha256-qCrNkAd+djGN2wvpaZnZaVuan0Yn6KDzQdOYemJ0fcw="},"flags/1x1/sg-c22e093634568aae249bf35f9ddcaa6796b5f27d76c39ff5336abf7f1b8a47d4.svg":{"logical_path":"flags/1x1/sg.svg","mtime":"2018-04-02T14:38:31+02:00","size":954,"digest":"c22e093634568aae249bf35f9ddcaa6796b5f27d76c39ff5336abf7f1b8a47d4","integrity":"sha256-wi4JNjRWiq4km/NfndyqZ5a18n12w5/1M2q/fxuKR9Q="},"flags/4x3/sh-57470d9a75955f0fac605a94e853bab524c7461a4c025e809fb09db762ebe46f.svg":{"logical_path":"flags/4x3/sh.svg","mtime":"2018-04-02T14:38:31+02:00","size":29702,"digest":"57470d9a75955f0fac605a94e853bab524c7461a4c025e809fb09db762ebe46f","integrity":"sha256-V0cNmnWVXw+sYFqU6FO6tSTHRhpMAl6An7Cdt2Lr5G8="},"flags/1x1/sh-8d06a0fff61e51eb65357d138e00736545835b8649aa2694152f4cdc9f941c16.svg":{"logical_path":"flags/1x1/sh.svg","mtime":"2018-04-02T14:38:31+02:00","size":30308,"digest":"8d06a0fff61e51eb65357d138e00736545835b8649aa2694152f4cdc9f941c16","integrity":"sha256-jQag//YeUetlNX0TjgBzZUWDW4ZJqiaUFS9M3J+UHBY="},"flags/4x3/si-289d6417f154323e7922df09ffc0f49ded31548c7ee8020c39cb85724ffbcea8.svg":{"logical_path":"flags/4x3/si.svg","mtime":"2018-04-02T14:38:31+02:00","size":2055,"digest":"289d6417f154323e7922df09ffc0f49ded31548c7ee8020c39cb85724ffbcea8","integrity":"sha256-KJ1kF/FUMj55It8J/8D0ne0xVIx+6AIMOcuFck/7zqg="},"flags/1x1/si-ca40a5f4f38119d6f52ffd3ddb36af95951a2aa1fadcd897f5bc1641bb2e0051.svg":{"logical_path":"flags/1x1/si.svg","mtime":"2018-04-02T14:38:31+02:00","size":2068,"digest":"ca40a5f4f38119d6f52ffd3ddb36af95951a2aa1fadcd897f5bc1641bb2e0051","integrity":"sha256-ykCl9POBGdb1L/092zavlZUaKqH63NiX9bwWQbsuAFE="},"flags/4x3/sj-67d4cdd268d0c0cd93fc561b506cb5646cb508385c93ed350d11f94aa1c83833.svg":{"logical_path":"flags/4x3/sj.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"67d4cdd268d0c0cd93fc561b506cb5646cb508385c93ed350d11f94aa1c83833","integrity":"sha256-Z9TN0mjQwM2T/FYbUGy1ZGy1CDhck+01DRH5SqHIODM="},"flags/1x1/sj-f7c489607033138039612d6abe7f4b0b4b6dada5cac75d78204f404a0d292b1c.svg":{"logical_path":"flags/1x1/sj.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"f7c489607033138039612d6abe7f4b0b4b6dada5cac75d78204f404a0d292b1c","integrity":"sha256-98SJYHAzE4A5YS1qvn9LC0ttraXKx114IE9ASg0pKxw="},"flags/4x3/sk-a0bdbb7f5d6998ffe9fcbc80bbdf0e6cff3629740d2ce1b8d61025e0a8b322b5.svg":{"logical_path":"flags/4x3/sk.svg","mtime":"2018-04-02T14:38:31+02:00","size":1208,"digest":"a0bdbb7f5d6998ffe9fcbc80bbdf0e6cff3629740d2ce1b8d61025e0a8b322b5","integrity":"sha256-oL27f11pmP/p/LyAu98ObP82KXQNLOG41hAl4KizIrU="},"flags/1x1/sk-a82a813b2d81af9be1aa775f22b2c2457d11e870e072d7e23957a11d0878faed.svg":{"logical_path":"flags/1x1/sk.svg","mtime":"2018-04-02T14:38:31+02:00","size":1187,"digest":"a82a813b2d81af9be1aa775f22b2c2457d11e870e072d7e23957a11d0878faed","integrity":"sha256-qCqBOy2Br5vhqndfIrLCRX0R6HDgctfiOVehHQh4+u0="},"flags/4x3/sl-be265bed24cfe0b25778201f251e52e4e721e3d319795875913805d1aea84ebb.svg":{"logical_path":"flags/4x3/sl.svg","mtime":"2018-04-02T14:38:31+02:00","size":278,"digest":"be265bed24cfe0b25778201f251e52e4e721e3d319795875913805d1aea84ebb","integrity":"sha256-viZb7STP4LJXeCAfJR5S5Och49MZeVh1kTgF0a6oTrs="},"flags/1x1/sl-cb8bccbaa21957f006ed4ae0144da81c999e93bd8014023b16b500fdcdc397d3.svg":{"logical_path":"flags/1x1/sl.svg","mtime":"2018-04-02T14:38:31+02:00","size":441,"digest":"cb8bccbaa21957f006ed4ae0144da81c999e93bd8014023b16b500fdcdc397d3","integrity":"sha256-y4vMuqIZV/AG7UrgFE2oHJmek72AFAI7FrUA/c3Dl9M="},"flags/4x3/sm-d7818df3f8f2d5dbed27dc5a0a80b1e41cdcd6130eeff221da58f0321e925f27.svg":{"logical_path":"flags/4x3/sm.svg","mtime":"2018-04-02T14:38:31+02:00","size":15960,"digest":"d7818df3f8f2d5dbed27dc5a0a80b1e41cdcd6130eeff221da58f0321e925f27","integrity":"sha256-14GN8/jy1dvtJ9xaCoCx5Bzc1hMO7/Ih2ljwMh6SXyc="},"flags/1x1/sm-6f87660dcac925bbdb036c79a0e20d3b208215d327be4c4764ae1069d6464efd.svg":{"logical_path":"flags/1x1/sm.svg","mtime":"2018-04-02T14:38:31+02:00","size":15881,"digest":"6f87660dcac925bbdb036c79a0e20d3b208215d327be4c4764ae1069d6464efd","integrity":"sha256-b4dmDcrJJbvbA2x5oOINOyCCFdMnvkxHZK4QadZGTv0="},"flags/4x3/sn-b131b17a374bcfbd00d442d282fa52f0e4e0e448cda1cdfaac25a95ff56443c0.svg":{"logical_path":"flags/4x3/sn.svg","mtime":"2018-04-02T14:38:31+02:00","size":427,"digest":"b131b17a374bcfbd00d442d282fa52f0e4e0e448cda1cdfaac25a95ff56443c0","integrity":"sha256-sTGxejdLz70A1ELSgvpS8OTg5EjNoc36rCWpX/VkQ8A="},"flags/1x1/sn-d180d3ce9846966dee6a3d9433ede7d24801dc4311636aabd470ec5b8765d772.svg":{"logical_path":"flags/1x1/sn.svg","mtime":"2018-04-02T14:38:31+02:00","size":418,"digest":"d180d3ce9846966dee6a3d9433ede7d24801dc4311636aabd470ec5b8765d772","integrity":"sha256-0YDTzphGlm3uaj2UM+3n0kgB3EMRY2qr1HDsW4dl13I="},"flags/4x3/so-3b5b77b371299478144a94b60c99524fb6b99bfedb3dcc976ab70185e07f399e.svg":{"logical_path":"flags/4x3/so.svg","mtime":"2018-04-02T14:38:31+02:00","size":494,"digest":"3b5b77b371299478144a94b60c99524fb6b99bfedb3dcc976ab70185e07f399e","integrity":"sha256-O1t3s3EplHgUSpS2DJlST7a5m/7bPcyXarcBheB/OZ4="},"flags/1x1/so-50aa941f2d2954285ef9e5ac260cdd264a73cf2e4b0c627677f04141fff2afd3.svg":{"logical_path":"flags/1x1/so.svg","mtime":"2018-04-02T14:38:31+02:00","size":501,"digest":"50aa941f2d2954285ef9e5ac260cdd264a73cf2e4b0c627677f04141fff2afd3","integrity":"sha256-UKqUHy0pVChe+eWsJgzdJkpzzy5LDGJ2d/BBQf/yr9M="},"flags/4x3/sr-94d0f0aefcbdea8d7ba35648eda5037e99bf4126723ce36416582ea43b08d3e2.svg":{"logical_path":"flags/4x3/sr.svg","mtime":"2018-04-02T14:38:31+02:00","size":318,"digest":"94d0f0aefcbdea8d7ba35648eda5037e99bf4126723ce36416582ea43b08d3e2","integrity":"sha256-lNDwrvy96o17o1ZI7aUDfpm/QSZyPONkFlgupDsI0+I="},"flags/1x1/sr-3944d683068d437471725d22fd71ccbe6a63ae307ff9775690417d3bf262cf82.svg":{"logical_path":"flags/1x1/sr.svg","mtime":"2018-04-02T14:38:31+02:00","size":323,"digest":"3944d683068d437471725d22fd71ccbe6a63ae307ff9775690417d3bf262cf82","integrity":"sha256-OUTWgwaNQ3Rxcl0i/XHMvmpjrjB/+XdWkEF9O/Jiz4I="},"flags/4x3/ss-f391e5002cbce83f97f7d1a11c284fa2e36a7d6dc734757d733656801ab17d0a.svg":{"logical_path":"flags/4x3/ss.svg","mtime":"2018-04-02T14:38:31+02:00","size":389,"digest":"f391e5002cbce83f97f7d1a11c284fa2e36a7d6dc734757d733656801ab17d0a","integrity":"sha256-85HlACy86D+X99GhHChPouNqfW3HNHV9czZWgBqxfQo="},"flags/1x1/ss-853bd9f713d2f6b1fe540a82e8bf4754912da21575b3fe756b8741767f318f7a.svg":{"logical_path":"flags/1x1/ss.svg","mtime":"2018-04-02T14:38:31+02:00","size":400,"digest":"853bd9f713d2f6b1fe540a82e8bf4754912da21575b3fe756b8741767f318f7a","integrity":"sha256-hTvZ9xPS9rH+VAqC6L9HVJEtohV1s/51a4dBdn8xj3o="},"flags/4x3/st-b52bb48a2c0800f5cb4b07bdd93c3908f77bcb6800be883ebf943bbd3d99d42c.svg":{"logical_path":"flags/4x3/st.svg","mtime":"2018-04-02T14:38:31+02:00","size":919,"digest":"b52bb48a2c0800f5cb4b07bdd93c3908f77bcb6800be883ebf943bbd3d99d42c","integrity":"sha256-tSu0iiwIAPXLSwe92Tw5CPd7y2gAvog+v5Q7vT2Z1Cw="},"flags/1x1/st-d8b5b1c8b9fe947086a4d277d2ac5d6b9cff188dfd37bda66c8bf5e02c5facc8.svg":{"logical_path":"flags/1x1/st.svg","mtime":"2018-04-02T14:38:31+02:00","size":923,"digest":"d8b5b1c8b9fe947086a4d277d2ac5d6b9cff188dfd37bda66c8bf5e02c5facc8","integrity":"sha256-2LWxyLn+lHCGpNJ30qxda5z/GI39N72mbIv14CxfrMg="},"flags/4x3/sv-6d02d63c7f04c9388e98f892cc43d8daa2110fc84242758d5627fcd247bfd09b.svg":{"logical_path":"flags/4x3/sv.svg","mtime":"2018-04-02T14:38:31+02:00","size":84037,"digest":"6d02d63c7f04c9388e98f892cc43d8daa2110fc84242758d5627fcd247bfd09b","integrity":"sha256-bQLWPH8EyTiOmPiSzEPY2qIRD8hCQnWNVif80ke/0Js="},"flags/1x1/sv-fb4c8d7eb98396a93c5b9c37195d70e809e0d71d8b8f9316e842121f95bb82ea.svg":{"logical_path":"flags/1x1/sv.svg","mtime":"2018-04-02T14:38:31+02:00","size":84509,"digest":"fb4c8d7eb98396a93c5b9c37195d70e809e0d71d8b8f9316e842121f95bb82ea","integrity":"sha256-+0yNfrmDlqk8W5w3GV1w6Ang1x2Lj5MW6EISH5W7guo="},"flags/4x3/sx-fb6a7b1cbc5b29eeeb39a5aec64ef7aad432c37bbe848d29955a3786b9763224.svg":{"logical_path":"flags/4x3/sx.svg","mtime":"2018-04-02T14:38:31+02:00","size":13306,"digest":"fb6a7b1cbc5b29eeeb39a5aec64ef7aad432c37bbe848d29955a3786b9763224","integrity":"sha256-+2p7HLxbKe7rOaWuxk73qtQyw3u+hI0plVo3hrl2MiQ="},"flags/1x1/sx-a37b124212f8530b921aef7657cfb35c2895a731c7a06f333faee4c93f32806a.svg":{"logical_path":"flags/1x1/sx.svg","mtime":"2018-04-02T14:38:31+02:00","size":13115,"digest":"a37b124212f8530b921aef7657cfb35c2895a731c7a06f333faee4c93f32806a","integrity":"sha256-o3sSQhL4UwuSGu92V8+zXCiVpzHHoG8zP67kyT8ygGo="},"flags/4x3/sy-e35f8d88c864ed4f38edb2f9f96d5bd69f6df078b50515b8c5467bf6b1689f50.svg":{"logical_path":"flags/4x3/sy.svg","mtime":"2018-04-02T14:38:31+02:00","size":568,"digest":"e35f8d88c864ed4f38edb2f9f96d5bd69f6df078b50515b8c5467bf6b1689f50","integrity":"sha256-41+NiMhk7U847bL5+W1b1p9t8Hi1BRW4xUZ79rFon1A="},"flags/1x1/sy-5d537bd5b42b58f6e8a7e33fbe5942a16126abb639edf9cb58b88938c57ebaa9.svg":{"logical_path":"flags/1x1/sy.svg","mtime":"2018-04-02T14:38:31+02:00","size":582,"digest":"5d537bd5b42b58f6e8a7e33fbe5942a16126abb639edf9cb58b88938c57ebaa9","integrity":"sha256-XVN71bQrWPbop+M/vllCoWEmq7Y57fnLWLiJOMV+uqk="},"flags/4x3/sz-c65ae592e943217787848364bdb4c57335869f4626ce705adabdc2620669c1c6.svg":{"logical_path":"flags/4x3/sz.svg","mtime":"2018-04-02T14:38:31+02:00","size":6755,"digest":"c65ae592e943217787848364bdb4c57335869f4626ce705adabdc2620669c1c6","integrity":"sha256-xlrlkulDIXeHhINkvbTFczWGn0YmznBa2r3CYgZpwcY="},"flags/1x1/sz-dd3d1c65bdf09317553f205e588e3dc7336acec1cb9315bfbe0f5bd8ca5bba3f.svg":{"logical_path":"flags/1x1/sz.svg","mtime":"2018-04-02T14:38:31+02:00","size":6706,"digest":"dd3d1c65bdf09317553f205e588e3dc7336acec1cb9315bfbe0f5bd8ca5bba3f","integrity":"sha256-3T0cZb3wkxdVPyBeWI49xzNqzsHLkxW/vg9b2Mpbuj8="},"flags/4x3/tc-594b6cc87040836c6d6777afb5833d565d3e5e75f404350a51443ec4588a1ccb.svg":{"logical_path":"flags/4x3/tc.svg","mtime":"2018-04-02T14:38:31+02:00","size":14585,"digest":"594b6cc87040836c6d6777afb5833d565d3e5e75f404350a51443ec4588a1ccb","integrity":"sha256-WUtsyHBAg2xtZ3evtYM9Vl0+XnX0BDUKUUQ+xFiKHMs="},"flags/1x1/tc-34a37006252eea340488220585c31d047b57e3e7934c77180d930972aaceadc3.svg":{"logical_path":"flags/1x1/tc.svg","mtime":"2018-04-02T14:38:31+02:00","size":14843,"digest":"34a37006252eea340488220585c31d047b57e3e7934c77180d930972aaceadc3","integrity":"sha256-NKNwBiUu6jQEiCIFhcMdBHtX4+eTTHcYDZMJcqrOrcM="},"flags/4x3/td-b67a1978e3badb895ff640c80bb6c0e33eac354220c08cf3fc93d62bf5d685a3.svg":{"logical_path":"flags/4x3/td.svg","mtime":"2018-04-02T14:38:31+02:00","size":270,"digest":"b67a1978e3badb895ff640c80bb6c0e33eac354220c08cf3fc93d62bf5d685a3","integrity":"sha256-tnoZeOO624lf9kDIC7bA4z6sNUIgwIzz/JPWK/XWhaM="},"flags/1x1/td-556b3a7991c17010cb7e1ff23c4edcc2dcdb8c406a128d407fd165ea8a19d311.svg":{"logical_path":"flags/1x1/td.svg","mtime":"2018-04-02T14:38:31+02:00","size":282,"digest":"556b3a7991c17010cb7e1ff23c4edcc2dcdb8c406a128d407fd165ea8a19d311","integrity":"sha256-VWs6eZHBcBDLfh/yPE7cwtzbjEBqEo1Af9Fl6ooZ0xE="},"flags/4x3/tf-35cd83351521f3022a43e01f0c40f34663a66ac1e92045979f31d3fd65c16d02.svg":{"logical_path":"flags/4x3/tf.svg","mtime":"2018-04-02T14:38:31+02:00","size":1091,"digest":"35cd83351521f3022a43e01f0c40f34663a66ac1e92045979f31d3fd65c16d02","integrity":"sha256-Nc2DNRUh8wIqQ+AfDEDzRmOmasHpIEWXnzHT/WXBbQI="},"flags/1x1/tf-485e71f61ff577735dbc4ba1025515c22a83c48ee7f3a2ed49804766c35f6ea5.svg":{"logical_path":"flags/1x1/tf.svg","mtime":"2018-04-02T14:38:31+02:00","size":1199,"digest":"485e71f61ff577735dbc4ba1025515c22a83c48ee7f3a2ed49804766c35f6ea5","integrity":"sha256-SF5x9h/1d3NdvEuhAlUVwiqDxI7n86LtSYBHZsNfbqU="},"flags/4x3/tg-24b25f4c2213fe35e5f5586d7ab23abf0c25ad2049708cd52ba72e1ec7b754ff.svg":{"logical_path":"flags/4x3/tg.svg","mtime":"2018-04-02T14:38:31+02:00","size":725,"digest":"24b25f4c2213fe35e5f5586d7ab23abf0c25ad2049708cd52ba72e1ec7b754ff","integrity":"sha256-JLJfTCIT/jXl9VhterI6vwwlrSBJcIzVK6cuHse3VP8="},"flags/1x1/tg-05f3d98392a5ec3e4aecf8f629d3d03f05ac55abb7d9d84187d599acfe271374.svg":{"logical_path":"flags/1x1/tg.svg","mtime":"2018-04-02T14:38:31+02:00","size":736,"digest":"05f3d98392a5ec3e4aecf8f629d3d03f05ac55abb7d9d84187d599acfe271374","integrity":"sha256-BfPZg5Kl7D5K7Pj2KdPQPwWsVau32dhBh9WZrP4nE3Q="},"flags/4x3/th-cc936bacd84dddd15454ef06bc64e357f83854af34692fc37363272d61f637d4.svg":{"logical_path":"flags/4x3/th.svg","mtime":"2018-04-02T14:38:31+02:00","size":287,"digest":"cc936bacd84dddd15454ef06bc64e357f83854af34692fc37363272d61f637d4","integrity":"sha256-zJNrrNhN3dFUVO8GvGTjV/g4VK80aS/Dc2MnLWH2N9Q="},"flags/1x1/th-de82cbd770db2be53a8e3d59d86e2b748a5d3f96eb8584f7b9364cefbd06a172.svg":{"logical_path":"flags/1x1/th.svg","mtime":"2018-04-02T14:38:31+02:00","size":288,"digest":"de82cbd770db2be53a8e3d59d86e2b748a5d3f96eb8584f7b9364cefbd06a172","integrity":"sha256-3oLL13DbK+U6jj1Z2G4rdIpdP5brhYT3uTZM770GoXI="},"flags/4x3/tj-b90bf3e2dd63265d55b67962b160df65f021c42b6ea304e2943c10b9e2a8749d.svg":{"logical_path":"flags/4x3/tj.svg","mtime":"2018-04-02T14:38:31+02:00","size":1831,"digest":"b90bf3e2dd63265d55b67962b160df65f021c42b6ea304e2943c10b9e2a8749d","integrity":"sha256-uQvz4t1jJl1VtnlisWDfZfAhxCtuowTilDwQueKodJ0="},"flags/1x1/tj-5f6571e74b1f8720f9ecc2d3aa2098ca45d2e7ad6602b2a57c206384719b9f36.svg":{"logical_path":"flags/1x1/tj.svg","mtime":"2018-04-02T14:38:31+02:00","size":1788,"digest":"5f6571e74b1f8720f9ecc2d3aa2098ca45d2e7ad6602b2a57c206384719b9f36","integrity":"sha256-X2Vx50sfhyD57MLTqiCYykXS561mArKlfCBjhHGbnzY="},"flags/4x3/tk-602520b29b909c96baea17a38eb654d6c6fbc7088f46a0cb8d8fe34ff92e3cb8.svg":{"logical_path":"flags/4x3/tk.svg","mtime":"2018-04-02T14:38:31+02:00","size":791,"digest":"602520b29b909c96baea17a38eb654d6c6fbc7088f46a0cb8d8fe34ff92e3cb8","integrity":"sha256-YCUgspuQnJa66hejjrZU1sb7xwiPRqDLjY/jT/kuPLg="},"flags/1x1/tk-fe1dc8aaa0643a45a74ecec8aec09f0fe2207d104bb3c28c0b84405f1275aeba.svg":{"logical_path":"flags/1x1/tk.svg","mtime":"2018-04-02T14:38:31+02:00","size":781,"digest":"fe1dc8aaa0643a45a74ecec8aec09f0fe2207d104bb3c28c0b84405f1275aeba","integrity":"sha256-/h3IqqBkOkWnTs7IrsCfD+IgfRBLs8KMC4RAXxJ1rro="},"flags/4x3/tl-ebdb862aa5ae5de1a72242571deaa70bfb222f488a93b70e304f2075b474d54b.svg":{"logical_path":"flags/4x3/tl.svg","mtime":"2018-04-02T14:38:31+02:00","size":600,"digest":"ebdb862aa5ae5de1a72242571deaa70bfb222f488a93b70e304f2075b474d54b","integrity":"sha256-69uGKqWuXeGnIkJXHeqnC/siL0iKk7cOME8gdbR01Us="},"flags/1x1/tl-485f02183bdb192ba3ce6e5f076e184112739f883ae0a8fde33c454377b848d6.svg":{"logical_path":"flags/1x1/tl.svg","mtime":"2018-04-02T14:38:31+02:00","size":582,"digest":"485f02183bdb192ba3ce6e5f076e184112739f883ae0a8fde33c454377b848d6","integrity":"sha256-SF8CGDvbGSujzm5fB24YQRJzn4g64Kj94zxFQ3e4SNY="},"flags/4x3/tm-5ddb4128bf0becd7c60413d5418027f5f01ca4bc72561d54b94febfee7a5a24b.svg":{"logical_path":"flags/4x3/tm.svg","mtime":"2018-04-02T14:38:31+02:00","size":32579,"digest":"5ddb4128bf0becd7c60413d5418027f5f01ca4bc72561d54b94febfee7a5a24b","integrity":"sha256-XdtBKL8L7NfGBBPVQYAn9fAcpLxyVh1UuU/r/ueloks="},"flags/1x1/tm-3521ad569a4095aa8d4166d5d9094fccfdbb3ea411207ad685b6dd5814ef3392.svg":{"logical_path":"flags/1x1/tm.svg","mtime":"2018-04-02T14:38:31+02:00","size":31884,"digest":"3521ad569a4095aa8d4166d5d9094fccfdbb3ea411207ad685b6dd5814ef3392","integrity":"sha256-NSGtVppAlaqNQWbV2QlPzP27PqQRIHrWhbbdWBTvM5I="},"flags/4x3/tn-ca27eb50d88b11d20b5b09e2bbecb7753267222489920c526608e5d2acd22d79.svg":{"logical_path":"flags/4x3/tn.svg","mtime":"2018-04-02T14:38:31+02:00","size":753,"digest":"ca27eb50d88b11d20b5b09e2bbecb7753267222489920c526608e5d2acd22d79","integrity":"sha256-yifrUNiLEdILWwniu+y3dTJnIiSJkgxSZgjl0qzSLXk="},"flags/1x1/tn-222c6cd4742c558f48ebcacb47ea334057642fffa3456a1c75e0fad9e728d09b.svg":{"logical_path":"flags/1x1/tn.svg","mtime":"2018-04-02T14:38:31+02:00","size":743,"digest":"222c6cd4742c558f48ebcacb47ea334057642fffa3456a1c75e0fad9e728d09b","integrity":"sha256-Iixs1HQsVY9I68rLR+ozQFdkL/+jRWocdeD62eco0Js="},"flags/4x3/to-c9c509fc24f591fbe52bbf732c44291384c787796e1fc9c703a973587c3f8ad1.svg":{"logical_path":"flags/4x3/to.svg","mtime":"2018-04-02T14:38:31+02:00","size":358,"digest":"c9c509fc24f591fbe52bbf732c44291384c787796e1fc9c703a973587c3f8ad1","integrity":"sha256-ycUJ/CT1kfvlK79zLEQpE4THh3luH8nHA6lzWHw/itE="},"flags/1x1/to-cf26dfb44b56b915b2f11896355cb778b938ed54423311d69d7cda9626887dda.svg":{"logical_path":"flags/1x1/to.svg","mtime":"2018-04-02T14:38:31+02:00","size":364,"digest":"cf26dfb44b56b915b2f11896355cb778b938ed54423311d69d7cda9626887dda","integrity":"sha256-zybftEtWuRWy8RiWNVy3eLk47VRCMxHWnXzaliaIfdo="},"flags/4x3/tr-c40f697070cf8d8358785b9203d1c8f438976e3cd644a87d9ee16fa9960deaa4.svg":{"logical_path":"flags/4x3/tr.svg","mtime":"2018-04-02T14:38:31+02:00","size":557,"digest":"c40f697070cf8d8358785b9203d1c8f438976e3cd644a87d9ee16fa9960deaa4","integrity":"sha256-xA9pcHDPjYNYeFuSA9HI9DiXbjzWRKh9nuFvqZYN6qQ="},"flags/1x1/tr-627dcf91a1e5153c045e33a3459b5d56002530fddd3fc53927f4d0fb7ea004a5.svg":{"logical_path":"flags/1x1/tr.svg","mtime":"2018-04-02T14:38:31+02:00","size":578,"digest":"627dcf91a1e5153c045e33a3459b5d56002530fddd3fc53927f4d0fb7ea004a5","integrity":"sha256-Yn3PkaHlFTwEXjOjRZtdVgAlMP3dP8U5J/TQ+36gBKU="},"flags/4x3/tt-04786ffedbde2c96a30ad1cbf4db000848f14bd700324651fc88364e5f3c2fd0.svg":{"logical_path":"flags/4x3/tt.svg","mtime":"2018-04-02T14:38:31+02:00","size":324,"digest":"04786ffedbde2c96a30ad1cbf4db000848f14bd700324651fc88364e5f3c2fd0","integrity":"sha256-BHhv/tveLJajCtHL9NsACEjxS9cAMkZR/Ig2Tl88L9A="},"flags/1x1/tt-6a3c73bfa7782366d95e673d847ef8f84c0475b364d359def1efd264297bac30.svg":{"logical_path":"flags/1x1/tt.svg","mtime":"2018-04-02T14:38:31+02:00","size":323,"digest":"6a3c73bfa7782366d95e673d847ef8f84c0475b364d359def1efd264297bac30","integrity":"sha256-ajxzv6d4I2bZXmc9hH74+EwEdbNk01ne8e/SZCl7rDA="},"flags/4x3/tv-20b56e7c0a2fbaa2a0b7b1bd87afc6368440f175fb3a0589de5e34e99d163fd7.svg":{"logical_path":"flags/4x3/tv.svg","mtime":"2018-04-02T14:38:31+02:00","size":2299,"digest":"20b56e7c0a2fbaa2a0b7b1bd87afc6368440f175fb3a0589de5e34e99d163fd7","integrity":"sha256-ILVufAovuqKgt7G9h6/GNoRA8XX7OgWJ3l406Z0WP9c="},"flags/1x1/tv-8bce1d7bde2e20dcc473ed3a33c66e4bedcf1acf2d2fff6d54353a480b8cafbc.svg":{"logical_path":"flags/1x1/tv.svg","mtime":"2018-04-02T14:38:31+02:00","size":2166,"digest":"8bce1d7bde2e20dcc473ed3a33c66e4bedcf1acf2d2fff6d54353a480b8cafbc","integrity":"sha256-i84de94uINzEc+06M8ZuS+3PGs8tL/9tVDU6SAuMr7w="},"flags/4x3/tw-36070ac0a15ab1f4811478da62e7678756a9aa266b141ed0549aba1c0e04333a.svg":{"logical_path":"flags/4x3/tw.svg","mtime":"2018-04-02T14:38:31+02:00","size":945,"digest":"36070ac0a15ab1f4811478da62e7678756a9aa266b141ed0549aba1c0e04333a","integrity":"sha256-NgcKwKFasfSBFHjaYudnh1apqiZrFB7QVJq6HA4EMzo="},"flags/1x1/tw-fd7a0db2f3808842ca99176f097356fe9e6f3c120d6aa9e8c4a9c2dd4c3943ba.svg":{"logical_path":"flags/1x1/tw.svg","mtime":"2018-04-02T14:38:31+02:00","size":960,"digest":"fd7a0db2f3808842ca99176f097356fe9e6f3c120d6aa9e8c4a9c2dd4c3943ba","integrity":"sha256-/XoNsvOAiELKmRdvCXNW/p5vPBINaqnoxKnC3Uw5Q7o="},"flags/4x3/tz-51ad7d69f059075df61b9226468af0d78642af4ad34a7540f64c5bea82e803d7.svg":{"logical_path":"flags/4x3/tz.svg","mtime":"2018-04-02T14:38:31+02:00","size":546,"digest":"51ad7d69f059075df61b9226468af0d78642af4ad34a7540f64c5bea82e803d7","integrity":"sha256-Ua19afBZB132G5ImRorw14ZCr0rTSnVA9kxb6oLoA9c="},"flags/1x1/tz-0703f29a7ae02a9a1753cb1726dd2934d75ed3a12e8d63faa9fa866e1fe61440.svg":{"logical_path":"flags/1x1/tz.svg","mtime":"2018-04-02T14:38:31+02:00","size":605,"digest":"0703f29a7ae02a9a1753cb1726dd2934d75ed3a12e8d63faa9fa866e1fe61440","integrity":"sha256-BwPymnrgKpoXU8sXJt0pNNde06EujWP6qfqGbh/mFEA="},"flags/4x3/ua-7f7db03c3b492aaacd11b0abac70d543a7c0ec5265a36d529bbb80a7c432d81a.svg":{"logical_path":"flags/4x3/ua.svg","mtime":"2018-04-02T14:38:31+02:00","size":241,"digest":"7f7db03c3b492aaacd11b0abac70d543a7c0ec5265a36d529bbb80a7c432d81a","integrity":"sha256-f32wPDtJKqrNEbCrrHDVQ6fA7FJlo21Sm7uAp8Qy2Bo="},"flags/1x1/ua-25192fa80f120edb1dd1c4757fd7b79ef38f5e1729238f4135003e6a1501bf28.svg":{"logical_path":"flags/1x1/ua.svg","mtime":"2018-04-02T14:38:31+02:00","size":241,"digest":"25192fa80f120edb1dd1c4757fd7b79ef38f5e1729238f4135003e6a1501bf28","integrity":"sha256-JRkvqA8SDtsd0cR1f9e3nvOPXhcpI49BNQA+ahUBvyg="},"flags/4x3/ug-7635df53eafdf411be0809df835bfbcffd61badd6c4df3db0909c8b3188015a0.svg":{"logical_path":"flags/4x3/ug.svg","mtime":"2018-04-02T14:38:31+02:00","size":3959,"digest":"7635df53eafdf411be0809df835bfbcffd61badd6c4df3db0909c8b3188015a0","integrity":"sha256-djXfU+r99BG+CAnfg1v7z/1hut1sTfPbCQnIsxiAFaA="},"flags/1x1/ug-537f34f64e723fbe7cb7902ea0e61303f1ada79214197efc39ebe2c52ce24186.svg":{"logical_path":"flags/1x1/ug.svg","mtime":"2018-04-02T14:38:31+02:00","size":4038,"digest":"537f34f64e723fbe7cb7902ea0e61303f1ada79214197efc39ebe2c52ce24186","integrity":"sha256-U3809k5yP758t5AuoOYTA/Gtp5IUGX78OevixSziQYY="},"flags/4x3/um-a0ae80e34bbf94677dd6052ea87cc0090aba747dab5440e5ca6e231f7f07c96d.svg":{"logical_path":"flags/4x3/um.svg","mtime":"2018-04-02T14:38:31+02:00","size":4524,"digest":"a0ae80e34bbf94677dd6052ea87cc0090aba747dab5440e5ca6e231f7f07c96d","integrity":"sha256-oK6A40u/lGd91gUuqHzACQq6dH2rVEDlym4jH38HyW0="},"flags/1x1/um-3f1bc09babe7fdcf32518bb49d1aac3a66d0204f955eacca291c58d4f4ef895a.svg":{"logical_path":"flags/1x1/um.svg","mtime":"2018-04-02T14:38:31+02:00","size":3975,"digest":"3f1bc09babe7fdcf32518bb49d1aac3a66d0204f955eacca291c58d4f4ef895a","integrity":"sha256-PxvAm6vn/c8yUYu0nRqsOmbQIE+VXqzKKRxY1PTviVo="},"flags/4x3/us-aefd8f7e57d11f7b0416d01d9c665ab3848b10af849f35a4d772d58d24d83329.svg":{"logical_path":"flags/4x3/us.svg","mtime":"2018-04-02T14:38:31+02:00","size":4468,"digest":"aefd8f7e57d11f7b0416d01d9c665ab3848b10af849f35a4d772d58d24d83329","integrity":"sha256-rv2PflfRH3sEFtAdnGZas4SLEK+EnzWk13LVjSTYMyk="},"flags/1x1/us-87af45be9346e8c820312976abe332ee11f8931e29fa361328d28660a711b1e2.svg":{"logical_path":"flags/1x1/us.svg","mtime":"2018-04-02T14:38:31+02:00","size":3924,"digest":"87af45be9346e8c820312976abe332ee11f8931e29fa361328d28660a711b1e2","integrity":"sha256-h69FvpNG6MggMSl2q+My7hH4kx4p+jYTKNKGYKcRseI="},"flags/4x3/uy-9f636c8283abf56cc930746fd427c1d1644dcf8736c537629df13f760da96ebc.svg":{"logical_path":"flags/4x3/uy.svg","mtime":"2018-04-02T14:38:31+02:00","size":1721,"digest":"9f636c8283abf56cc930746fd427c1d1644dcf8736c537629df13f760da96ebc","integrity":"sha256-n2NsgoOr9WzJMHRv1CfB0WRNz4c2xTdinfE/dg2pbrw="},"flags/1x1/uy-e216b762a93ec55bf9b4ae3d35b7febe0b192a12246fd66c45139ce77fb2095e.svg":{"logical_path":"flags/1x1/uy.svg","mtime":"2018-04-02T14:38:31+02:00","size":1718,"digest":"e216b762a93ec55bf9b4ae3d35b7febe0b192a12246fd66c45139ce77fb2095e","integrity":"sha256-4ha3Yqk+xVv5tK49Nbf+vgsZKhIkb9ZsRROc53+yCV4="},"flags/4x3/uz-697d596705372323beddccb3626d1ce405b36249315c6b006ff1529e24909ceb.svg":{"logical_path":"flags/4x3/uz.svg","mtime":"2018-04-02T14:38:31+02:00","size":1457,"digest":"697d596705372323beddccb3626d1ce405b36249315c6b006ff1529e24909ceb","integrity":"sha256-aX1ZZwU3IyO+3cyzYm0c5AWzYkkxXGsAb/FSniSQnOs="},"flags/1x1/uz-aa34cbe4f6f0e4b5d890975578d28cc9b1e88ebd503d3bdca693748eb29b3353.svg":{"logical_path":"flags/1x1/uz.svg","mtime":"2018-04-02T14:38:31+02:00","size":1457,"digest":"aa34cbe4f6f0e4b5d890975578d28cc9b1e88ebd503d3bdca693748eb29b3353","integrity":"sha256-qjTL5Pbw5LXYkJdVeNKMybHojr1QPTvcppN0jrKbM1M="},"flags/4x3/va-d24d3c5bee108c396997c3d5b2bd2273433752d8c222eb531650e51551a4afd0.svg":{"logical_path":"flags/4x3/va.svg","mtime":"2018-04-02T14:38:31+02:00","size":91241,"digest":"d24d3c5bee108c396997c3d5b2bd2273433752d8c222eb531650e51551a4afd0","integrity":"sha256-0k08W+4QjDlpl8PVsr0ic0M3UtjCIutTFlDlFVGkr9A="},"flags/1x1/va-01160c1bffda12f0b94554ba0c50162a88da807943617334bd4c57a030985e95.svg":{"logical_path":"flags/1x1/va.svg","mtime":"2018-04-02T14:38:31+02:00","size":90876,"digest":"01160c1bffda12f0b94554ba0c50162a88da807943617334bd4c57a030985e95","integrity":"sha256-ARYMG//aEvC5RVS6DFAWKojagHlDYXM0vUxXoDCYXpU="},"flags/4x3/vc-ddf979bee2889414e5a05ac55f39a9c93f34e0aff0d35f007605049a2d8b5afb.svg":{"logical_path":"flags/4x3/vc.svg","mtime":"2018-04-02T14:38:31+02:00","size":454,"digest":"ddf979bee2889414e5a05ac55f39a9c93f34e0aff0d35f007605049a2d8b5afb","integrity":"sha256-3fl5vuKIlBTloFrFXzmpyT804K/w018AdgUEmi2LWvs="},"flags/1x1/vc-ac776e16dec19ff2e2d9238f541dae5d977282b451a83ab3d4122efed2392be9.svg":{"logical_path":"flags/1x1/vc.svg","mtime":"2018-04-02T14:38:31+02:00","size":501,"digest":"ac776e16dec19ff2e2d9238f541dae5d977282b451a83ab3d4122efed2392be9","integrity":"sha256-rHduFt7Bn/Li2SOPVB2uXZdygrRRqDqz1BIu/tI5K+k="},"flags/4x3/ve-e23abd006cc75a8c4f9ec1cb122b46f9b52e26c5606532d2c868277d4ccd523b.svg":{"logical_path":"flags/4x3/ve.svg","mtime":"2018-04-02T14:38:31+02:00","size":1171,"digest":"e23abd006cc75a8c4f9ec1cb122b46f9b52e26c5606532d2c868277d4ccd523b","integrity":"sha256-4jq9AGzHWoxPnsHLEitG+bUuJsVgZTLSyGgnfUzNUjs="},"flags/1x1/ve-1480713f28719e0a83da2c5f1333407dbfa5bcc0de8c9ba718fcf47273ee95ef.svg":{"logical_path":"flags/1x1/ve.svg","mtime":"2018-04-02T14:38:31+02:00","size":1191,"digest":"1480713f28719e0a83da2c5f1333407dbfa5bcc0de8c9ba718fcf47273ee95ef","integrity":"sha256-FIBxPyhxngqD2ixfEzNAfb+lvMDejJunGPz0cnPule8="},"flags/4x3/vg-7f8f24a4d6995e4dd39e3d9098dad5e14649821fa12ffc200edf0a586285ee15.svg":{"logical_path":"flags/4x3/vg.svg","mtime":"2018-04-02T14:38:31+02:00","size":24818,"digest":"7f8f24a4d6995e4dd39e3d9098dad5e14649821fa12ffc200edf0a586285ee15","integrity":"sha256-f48kpNaZXk3Tnj2QmNrV4UZJgh+hL/wgDt8KWGKF7hU="},"flags/1x1/vg-b464b6a78e46c29df9e4bdadc2646208f11c59168706456075f970552a24efa8.svg":{"logical_path":"flags/1x1/vg.svg","mtime":"2018-04-02T14:38:31+02:00","size":24997,"digest":"b464b6a78e46c29df9e4bdadc2646208f11c59168706456075f970552a24efa8","integrity":"sha256-tGS2p45Gwp355L2twmRiCPEcWRaHBkVgdflwVSok76g="},"flags/4x3/vi-58311325a293b046044976d899f288ce0fbe9bfd705a23947a9b38d7991983d7.svg":{"logical_path":"flags/4x3/vi.svg","mtime":"2018-04-02T14:38:31+02:00","size":8775,"digest":"58311325a293b046044976d899f288ce0fbe9bfd705a23947a9b38d7991983d7","integrity":"sha256-WDETJaKTsEYESXbYmfKIzg++m/1wWiOUeps415kZg9c="},"flags/1x1/vi-1c132d2cff66cdbdb7b6acf504bb0cd9d7579595d80c3fa6604ff24ca7a0184d.svg":{"logical_path":"flags/1x1/vi.svg","mtime":"2018-04-02T14:38:31+02:00","size":8730,"digest":"1c132d2cff66cdbdb7b6acf504bb0cd9d7579595d80c3fa6604ff24ca7a0184d","integrity":"sha256-HBMtLP9mzb23tqz1BLsM2ddXlZXYDD+mYE/yTKegGE0="},"flags/4x3/vn-a918d3c9cdc368b1d2ff9614d58cbcd1d43b725889b0ba18f5d4e693071e389a.svg":{"logical_path":"flags/4x3/vn.svg","mtime":"2018-04-02T14:38:31+02:00","size":492,"digest":"a918d3c9cdc368b1d2ff9614d58cbcd1d43b725889b0ba18f5d4e693071e389a","integrity":"sha256-qRjTyc3DaLHS/5YU1Yy80dQ7cliJsLoY9dTmkwceOJo="},"flags/1x1/vn-895e428ae3d98c99dbb02088cf8ef040bfb031df6f16c3c8fc3678505d869791.svg":{"logical_path":"flags/1x1/vn.svg","mtime":"2018-04-02T14:38:31+02:00","size":501,"digest":"895e428ae3d98c99dbb02088cf8ef040bfb031df6f16c3c8fc3678505d869791","integrity":"sha256-iV5CiuPZjJnbsCCIz47wQL+wMd9vFsPI/DZ4UF2Gl5E="},"flags/4x3/vu-2c286c778a7bed03cb603ab24b68dc91868f4f054cf4f851bdd17aa16731571c.svg":{"logical_path":"flags/4x3/vu.svg","mtime":"2018-04-02T14:38:31+02:00","size":3771,"digest":"2c286c778a7bed03cb603ab24b68dc91868f4f054cf4f851bdd17aa16731571c","integrity":"sha256-LChsd4p77QPLYDqyS2jckYaPTwVM9PhRvdF6oWcxVxw="},"flags/1x1/vu-51ef23121e2641ebeeac50d31c4e52b7d00d3ab1bc9fc0ad95ea86fd3631975a.svg":{"logical_path":"flags/1x1/vu.svg","mtime":"2018-04-02T14:38:31+02:00","size":3740,"digest":"51ef23121e2641ebeeac50d31c4e52b7d00d3ab1bc9fc0ad95ea86fd3631975a","integrity":"sha256-Ue8jEh4mQevurFDTHE5St9ANOrG8n8CtleqG/TYxl1o="},"flags/4x3/wf-f7e9ac5edac196ac32d7bafa04b5c0d924b89e9d7e4f3535a6a26c6c1523639c.svg":{"logical_path":"flags/4x3/wf.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"f7e9ac5edac196ac32d7bafa04b5c0d924b89e9d7e4f3535a6a26c6c1523639c","integrity":"sha256-9+msXtrBlqwy17r6BLXA2SS4np1+TzU1pqJsbBUjY5w="},"flags/1x1/wf-95a920a79aa32d92f8a362321aae4230e17025ac04d976593f4423d0c37c1aee.svg":{"logical_path":"flags/1x1/wf.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"95a920a79aa32d92f8a362321aae4230e17025ac04d976593f4423d0c37c1aee","integrity":"sha256-lakgp5qjLZL4o2IyGq5CMOFwJawE2XZZP0Qj0MN8Gu4="},"flags/4x3/ws-efc6505a802a3fa2018bc102fc2e11db8c738464c619381b6edc32d0a89341a3.svg":{"logical_path":"flags/4x3/ws.svg","mtime":"2018-04-02T14:38:31+02:00","size":663,"digest":"efc6505a802a3fa2018bc102fc2e11db8c738464c619381b6edc32d0a89341a3","integrity":"sha256-78ZQWoAqP6IBi8EC/C4R24xzhGTGGTgbbtwy0KiTQaM="},"flags/1x1/ws-e3afb81c037c814620027bf61ac5e266683cab7ba5796ecf10b64c110cfcb932.svg":{"logical_path":"flags/1x1/ws.svg","mtime":"2018-04-02T14:38:31+02:00","size":645,"digest":"e3afb81c037c814620027bf61ac5e266683cab7ba5796ecf10b64c110cfcb932","integrity":"sha256-46+4HAN8gUYgAnv2GsXiZmg8q3uleW7PELZMEQz8uTI="},"flags/4x3/ye-fd88856e70d66b01b4f0f608936a61cf3b1d9dad40a2932fc5da4d01f72a447b.svg":{"logical_path":"flags/4x3/ye.svg","mtime":"2018-04-02T14:38:31+02:00","size":278,"digest":"fd88856e70d66b01b4f0f608936a61cf3b1d9dad40a2932fc5da4d01f72a447b","integrity":"sha256-/YiFbnDWawG08PYIk2phzzsdna1AopMvxdpNAfcqRHs="},"flags/1x1/ye-0c0e32330871e6d83af54affb7dadbbe736f9799068508211fbae54db9bbdcc6.svg":{"logical_path":"flags/1x1/ye.svg","mtime":"2018-04-02T14:38:31+02:00","size":278,"digest":"0c0e32330871e6d83af54affb7dadbbe736f9799068508211fbae54db9bbdcc6","integrity":"sha256-DA4yMwhx5tg69Ur/t9rbvnNvl5kGhQghH7rlTbm73MY="},"flags/4x3/yt-2eef17b543424082d9f9b42a67e84c20b52e7f7eae8c4326d60711158da51d5b.svg":{"logical_path":"flags/4x3/yt.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"2eef17b543424082d9f9b42a67e84c20b52e7f7eae8c4326d60711158da51d5b","integrity":"sha256-Lu8XtUNCQILZ+bQqZ+hMILUuf36ujEMm1gcRFY2lHVs="},"flags/1x1/yt-911da8075337fd8f75ecc8a338c294cb771c6b9a08576f96c9de1437888cd2a7.svg":{"logical_path":"flags/1x1/yt.svg","mtime":"2018-04-02T14:38:31+02:00","size":295,"digest":"911da8075337fd8f75ecc8a338c294cb771c6b9a08576f96c9de1437888cd2a7","integrity":"sha256-kR2oB1M3/Y917MijOMKUy3cca5oIV2+Wyd4UN4iM0qc="},"flags/4x3/za-45991a2aee307198510e56bf92523070aac4241cafe6c3ddb8f89b20a61d6371.svg":{"logical_path":"flags/4x3/za.svg","mtime":"2018-04-02T14:38:31+02:00","size":856,"digest":"45991a2aee307198510e56bf92523070aac4241cafe6c3ddb8f89b20a61d6371","integrity":"sha256-RZkaKu4wcZhRDla/klIwcKrEJByv5sPduPibIKYdY3E="},"flags/1x1/za-bc09a89b29311ea7e582ef60bf4e18aff7c29de6fbefe309463ca765723a0ce8.svg":{"logical_path":"flags/1x1/za.svg","mtime":"2018-04-02T14:38:31+02:00","size":875,"digest":"bc09a89b29311ea7e582ef60bf4e18aff7c29de6fbefe309463ca765723a0ce8","integrity":"sha256-vAmomykxHqflgu9gv04Yr/fCneb77+MJRjynZXI6DOg="},"flags/4x3/zm-07c0f30d86e66d0cad9d66cd9c9384d9cce1844f159d245deff6717101fe49c2.svg":{"logical_path":"flags/4x3/zm.svg","mtime":"2018-04-02T14:38:31+02:00","size":5508,"digest":"07c0f30d86e66d0cad9d66cd9c9384d9cce1844f159d245deff6717101fe49c2","integrity":"sha256-B8DzDYbmbQytnWbNnJOE2czhhE8VnSRd7/ZxcQH+ScI="},"flags/1x1/zm-fc5bce3834c71fe36617ea5f57f0bd1dcf3880a7c6aa515dcf92ae067f796241.svg":{"logical_path":"flags/1x1/zm.svg","mtime":"2018-04-02T14:38:31+02:00","size":5429,"digest":"fc5bce3834c71fe36617ea5f57f0bd1dcf3880a7c6aa515dcf92ae067f796241","integrity":"sha256-/FvOODTHH+NmF+pfV/C9Hc84gKfGqlFdz5KuBn95YkE="},"flags/4x3/zw-5217c74f14d9fdda244b69c5982bbabee052ac0f1cc0704926e8b1e621e50f9a.svg":{"logical_path":"flags/4x3/zw.svg","mtime":"2018-04-02T14:38:31+02:00","size":6791,"digest":"5217c74f14d9fdda244b69c5982bbabee052ac0f1cc0704926e8b1e621e50f9a","integrity":"sha256-UhfHTxTZ/dokS2nFmCu6vuBSrA8cwHBJJuix5iHlD5o="},"flags/1x1/zw-a33b191c631709b9e1d85e06f5b15535fb544d4668c8bef865ede2a0b6a88ed9.svg":{"logical_path":"flags/1x1/zw.svg","mtime":"2018-04-02T14:38:31+02:00","size":6770,"digest":"a33b191c631709b9e1d85e06f5b15535fb544d4668c8bef865ede2a0b6a88ed9","integrity":"sha256-ozsZHGMXCbnh2F4G9bFVNftUTUZoyL74Ze3ioLaojtk="},"flags/4x3/es-ct-bcbb454a50c9a647efd43dcf041445f15e8dd70654bde530bf62401d4fb7738d.svg":{"logical_path":"flags/4x3/es-ct.svg","mtime":"2018-04-02T14:38:31+02:00","size":261,"digest":"bcbb454a50c9a647efd43dcf041445f15e8dd70654bde530bf62401d4fb7738d","integrity":"sha256-vLtFSlDJpkfv1D3PBBRF8V6N1wZUveUwv2JAHU+3c40="},"flags/1x1/es-ct-7f13eb2b2f5c11dccd7043286bed7540d4dad4b1a8367b0aca1b8405a351b2ef.svg":{"logical_path":"flags/1x1/es-ct.svg","mtime":"2018-04-02T14:38:31+02:00","size":260,"digest":"7f13eb2b2f5c11dccd7043286bed7540d4dad4b1a8367b0aca1b8405a351b2ef","integrity":"sha256-fxPrKy9cEdzNcEMoa+11QNTa1LGoNnsKyhuEBaNRsu8="},"flags/4x3/eu-5f129db64306353251b78f998d531d2f1019404cfa890ae63ed70dc316c7f240.svg":{"logical_path":"flags/4x3/eu.svg","mtime":"2018-04-02T14:38:31+02:00","size":1252,"digest":"5f129db64306353251b78f998d531d2f1019404cfa890ae63ed70dc316c7f240","integrity":"sha256-XxKdtkMGNTJRt4+ZjVMdLxAZQEz6iQrmPtcNwxbH8kA="},"flags/1x1/eu-ec59ac8daf2a63ea8e299ad63a208445d68a96affe6a10a7328acb6799d44127.svg":{"logical_path":"flags/1x1/eu.svg","mtime":"2018-04-02T14:38:31+02:00","size":1253,"digest":"ec59ac8daf2a63ea8e299ad63a208445d68a96affe6a10a7328acb6799d44127","integrity":"sha256-7Fmsja8qY+qOKZrWOiCERdaKlq/+ahCnMorLZ5nUQSc="},"flags/4x3/gb-eng-1895f4e35ae299f5d869da2462ffcf98df4b08dcddc531c8f175e49720001a14.svg":{"logical_path":"flags/4x3/gb-eng.svg","mtime":"2018-04-02T14:38:31+02:00","size":245,"digest":"1895f4e35ae299f5d869da2462ffcf98df4b08dcddc531c8f175e49720001a14","integrity":"sha256-GJX041rimfXYadokYv/PmN9LCNzdxTHI8XXklyAAGhQ="},"flags/1x1/gb-eng-d11afb87f40f35acda435a886ea044bd5e0b6f363ba0c7319f1d0181551fecf3.svg":{"logical_path":"flags/1x1/gb-eng.svg","mtime":"2018-04-02T14:38:31+02:00","size":235,"digest":"d11afb87f40f35acda435a886ea044bd5e0b6f363ba0c7319f1d0181551fecf3","integrity":"sha256-0Rr7h/QPNazaQ1qIbqBEvV4LbzY7oMcxnx0BgVUf7PM="},"flags/4x3/gb-nir-b280f09c787f495c1074376cd67537b40216f672917e7d204bb12b8e7c72afaf.svg":{"logical_path":"flags/4x3/gb-nir.svg","mtime":"2018-04-02T14:38:31+02:00","size":23738,"digest":"b280f09c787f495c1074376cd67537b40216f672917e7d204bb12b8e7c72afaf","integrity":"sha256-soDwnHh/SVwQdDds1nU3tAIW9nKRfn0gS7Erjnxyr68="},"flags/1x1/gb-nir-2e516e72e0e8e244ef430e6608322f8c4fb276807ab033279b2a6570dd68fd41.svg":{"logical_path":"flags/1x1/gb-nir.svg","mtime":"2018-04-02T14:38:31+02:00","size":25263,"digest":"2e516e72e0e8e244ef430e6608322f8c4fb276807ab033279b2a6570dd68fd41","integrity":"sha256-LlFucuDo4kTvQw5mCDIvjE+ydoB6sDMnmyplcN1o/UE="},"flags/4x3/gb-sct-1b9e407802ae901cf8da740c382ec2b19821837d76271a73346e0c63c2244506.svg":{"logical_path":"flags/4x3/gb-sct.svg","mtime":"2018-04-02T14:38:31+02:00","size":234,"digest":"1b9e407802ae901cf8da740c382ec2b19821837d76271a73346e0c63c2244506","integrity":"sha256-G55AeAKukBz42nQMOC7CsZghg312JxpzNG4MY8IkRQY="},"flags/1x1/gb-sct-d01e8a06a340e30ce52e8a3aba7ca6207afb96fdb238a815cc6cb92df8fa5df3.svg":{"logical_path":"flags/1x1/gb-sct.svg","mtime":"2018-04-02T14:38:31+02:00","size":242,"digest":"d01e8a06a340e30ce52e8a3aba7ca6207afb96fdb238a815cc6cb92df8fa5df3","integrity":"sha256-0B6KBqNA4wzlLoo6unymIHr7lv2yOKgVzGy5Lfj6XfM="},"flags/4x3/gb-wls-5232b3e376a19866cddec8225cba242783b2a48063811957f1ce5a2c347c5bc9.svg":{"logical_path":"flags/4x3/gb-wls.svg","mtime":"2018-04-02T14:38:31+02:00","size":9188,"digest":"5232b3e376a19866cddec8225cba242783b2a48063811957f1ce5a2c347c5bc9","integrity":"sha256-UjKz43ahmGbN3sgiXLokJ4OypIBjgRlX8c5aLDR8W8k="},"flags/1x1/gb-wls-126615bc3597fda1ca4ee931ef24f6c2cf2547998c06db9c1ded69fe66c479e9.svg":{"logical_path":"flags/1x1/gb-wls.svg","mtime":"2018-04-02T14:38:31+02:00","size":9083,"digest":"126615bc3597fda1ca4ee931ef24f6c2cf2547998c06db9c1ded69fe66c479e9","integrity":"sha256-EmYVvDWX/aHKTukx7yT2ws8lR5mMBtucHe1p/mbEeek="},"flags/4x3/un-31dece22ae18c3e01e86648ef3ef45f2f5b3d9d28a1e2bbbcdb1d87c37af55af.svg":{"logical_path":"flags/4x3/un.svg","mtime":"2018-04-02T14:38:31+02:00","size":20268,"digest":"31dece22ae18c3e01e86648ef3ef45f2f5b3d9d28a1e2bbbcdb1d87c37af55af","integrity":"sha256-Md7OIq4Yw+AehmSO8+9F8vWz2dKKHiu7zbHYfDevVa8="},"flags/1x1/un-455b5f3173ca9ac64f2135fac4ead7217d7fbe07551d0d2cc60216f83208f798.svg":{"logical_path":"flags/1x1/un.svg","mtime":"2018-04-02T14:38:31+02:00","size":20476,"digest":"455b5f3173ca9ac64f2135fac4ead7217d7fbe07551d0d2cc60216f83208f798","integrity":"sha256-RVtfMXPKmsZPITX6xOrXIX1/vgdVHQ0sxgIW+DII95g="},"leaflet/dist/images/layers-1dbbe9d028e292f36fcba8f8b3a28d5e8932754fc2215b9ac69e4cdecf5107c6.png":{"logical_path":"leaflet/dist/images/layers.png","mtime":"2019-04-19T14:21:05+02:00","size":696,"digest":"1dbbe9d028e292f36fcba8f8b3a28d5e8932754fc2215b9ac69e4cdecf5107c6","integrity":"sha256-Hbvp0CjikvNvy6j4s6KNXokydU/CIVuaxp5M3s9RB8Y="},"leaflet/dist/images/layers-2x-066daca850d8ffbef007af00b06eac0015728dee279c51f3cb6c716df7c42edf.png":{"logical_path":"leaflet/dist/images/layers-2x.png","mtime":"2019-04-19T14:21:05+02:00","size":1259,"digest":"066daca850d8ffbef007af00b06eac0015728dee279c51f3cb6c716df7c42edf","integrity":"sha256-Bm2sqFDY/77wB68AsG6sABVyje4nnFHzy2xxbffELt8="},"leaflet/dist/images/marker-icon-574c3a5cca85f4114085b6841596d62f00d7c892c7b03f28cbfa301deb1dc437.png":{"logical_path":"leaflet/dist/images/marker-icon.png","mtime":"2019-04-19T14:21:05+02:00","size":1466,"digest":"574c3a5cca85f4114085b6841596d62f00d7c892c7b03f28cbfa301deb1dc437","integrity":"sha256-V0w6XMqF9BFAhbaEFZbWLwDXyJLHsD8oy/owHesdxDc="},"markers-soft-e78784e4ed70aaffddd73c315fab590233cc4e7b72388d7dd47a14796fc7c739.png":{"logical_path":"markers-soft.png","mtime":"2016-05-21T23:41:15+02:00","size":41226,"digest":"e78784e4ed70aaffddd73c315fab590233cc4e7b72388d7dd47a14796fc7c739","integrity":"sha256-54eE5O1wqv/d1zwxX6tZAjPMTntyOI191HoUeW/Hxzk="},"markers-shadow-8703a2262710f5e3d29e65d2acdf90d6512e159e119d27b8234731d8a6208a20.png":{"logical_path":"markers-shadow.png","mtime":"2016-05-21T23:41:15+02:00","size":535,"digest":"8703a2262710f5e3d29e65d2acdf90d6512e159e119d27b8234731d8a6208a20","integrity":"sha256-hwOiJicQ9ePSnmXSrN+Q1lEuFZ4RnSe4I0cx2KYgiiA="},"markers-soft@2x-c1e77253a8bfbe30cec24885d7046f443b76ebb66f4c961f77083b03f4a5cbaf.png":{"logical_path":"markers-soft@2x.png","mtime":"2016-05-21T23:41:15+02:00","size":66408,"digest":"c1e77253a8bfbe30cec24885d7046f443b76ebb66f4c961f77083b03f4a5cbaf","integrity":"sha256-wedyU6i/vjDOwkiF1wRvRDt267ZvTJYfdwg7A/Sly68="},"markers-shadow@2x-b21a536be27313fb504f69f5899ff0b1245b276571769ac08d6c32c35676e47a.png":{"logical_path":"markers-shadow@2x.png","mtime":"2016-05-21T23:41:15+02:00","size":1469,"digest":"b21a536be27313fb504f69f5899ff0b1245b276571769ac08d6c32c35676e47a","integrity":"sha256-shpTa+JzE/tQT2n1iZ/wsSRbJ2VxdprAjWwyw1Z25Ho="},"tinymce/langs/fr_FR-6aba16704f73dd83662a78ca3360f3d98b1f1ed80a67560313554446915611a5.js":{"logical_path":"tinymce/langs/fr_FR.js","mtime":"2019-04-17T02:49:18+02:00","size":14986,"digest":"6aba16704f73dd83662a78ca3360f3d98b1f1ed80a67560313554446915611a5","integrity":"sha256-aroWcE9z3YNmKnjKM2Dz2YsfHtgKZ1YDE1VERpFWEaU="},"markers-matte-497826545a90e09a240504d14530eba45823b19fd44175e09e27c47cd822ddb9.png":{"logical_path":"markers-matte.png","mtime":"2016-05-21T23:41:15+02:00","size":14323,"digest":"497826545a90e09a240504d14530eba45823b19fd44175e09e27c47cd822ddb9","integrity":"sha256-SXgmVFqQ4JokBQTRRTDrpFgjsZ/UQXXgnifEfNgi3bk="},"markers-matte@2x-948fc8c4426f04f60964ed20394247f45b0b60e575d02398b9b6810e7a29a823.png":{"logical_path":"markers-matte@2x.png","mtime":"2016-05-21T23:41:15+02:00","size":31113,"digest":"948fc8c4426f04f60964ed20394247f45b0b60e575d02398b9b6810e7a29a823","integrity":"sha256-lI/IxEJvBPYJZO0gOUJH9FsLYOV10COYubaBDnopqCM="},"markers-plain-cf233423aa44e75ac0031e77b8ba571cd3331010517e1197e63fb7b06856c1ff.png":{"logical_path":"markers-plain.png","mtime":"2016-05-21T23:41:15+02:00","size":7946,"digest":"cf233423aa44e75ac0031e77b8ba571cd3331010517e1197e63fb7b06856c1ff","integrity":"sha256-zyM0I6pE51rAAx53uLpXHNMzEBBRfhGX5j+3sGhWwf8="},"leaflet/dist/images/marker-icon-2x-00179c4c1ee830d3a108412ae0d294f55776cfeb085c60129a39aa6fc4ae2528.png":{"logical_path":"leaflet/dist/images/marker-icon-2x.png","mtime":"2019-04-19T14:21:05+02:00","size":2464,"digest":"00179c4c1ee830d3a108412ae0d294f55776cfeb085c60129a39aa6fc4ae2528","integrity":"sha256-ABecTB7oMNOhCEEq4NKU9Vd2z+sIXGASmjmqb8SuJSg="},"leaflet/dist/images/marker-shadow-264f5c640339f042dd729062cfc04c17f8ea0f29882b538e3848ed8f10edb4da.png":{"logical_path":"leaflet/dist/images/marker-shadow.png","mtime":"2019-04-19T14:21:05+02:00","size":618,"digest":"264f5c640339f042dd729062cfc04c17f8ea0f29882b538e3848ed8f10edb4da","integrity":"sha256-Jk9cZAM58ELdcpBiz8BMF/jqDymIK1OOOEjtjxDttNo="},"jquery-ui/ui-bg_flat_0_aaaaaa_40x100-ae65a7ae22c4c23115948fdeb5c05c9137dbd13ca2d426b3c4c3c4183451e410.png":{"logical_path":"jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png","mtime":"2018-03-12T11:55:26+01:00","size":86,"digest":"ae65a7ae22c4c23115948fdeb5c05c9137dbd13ca2d426b3c4c3c4183451e410","integrity":"sha256-rmWnriLEwjEVlI/etcBckTfb0Tyi1CazxMPEGDRR5BA="},"jquery-ui/ui-icons_444444_256x240-31d988765b4e6f56553c29588c500381dc3e6f0aa2980c8212202e5644aefd5d.png":{"logical_path":"jquery-ui/ui-icons_444444_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"31d988765b4e6f56553c29588c500381dc3e6f0aa2980c8212202e5644aefd5d","integrity":"sha256-MdmIdltOb1ZVPClYjFADgdw+bwqimAyCEiAuVkSu/V0="},"jquery-ui/ui-icons_555555_256x240-32175261daee76c82bb0edf0eea16a56421866fbc31e94f3c1d570aa114502f5.png":{"logical_path":"jquery-ui/ui-icons_555555_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"32175261daee76c82bb0edf0eea16a56421866fbc31e94f3c1d570aa114502f5","integrity":"sha256-MhdSYdrudsgrsO3w7qFqVkIYZvvDHpTzwdVwqhFFAvU="},"jquery-ui/ui-icons_777620_256x240-0b020fc6e696d88d296e7bb1f61f1eb2ad827848e2c7382a4c3e0999e702dd9b.png":{"logical_path":"jquery-ui/ui-icons_777620_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"0b020fc6e696d88d296e7bb1f61f1eb2ad827848e2c7382a4c3e0999e702dd9b","integrity":"sha256-CwIPxuaW2I0pbnux9h8esq2CeEjixzgqTD4JmecC3Zs="},"jquery-ui/ui-icons_777777_256x240-faf32007ae120c302213557626e660dd10e711c5dd4f1113d35f26dc05b78d2f.png":{"logical_path":"jquery-ui/ui-icons_777777_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"faf32007ae120c302213557626e660dd10e711c5dd4f1113d35f26dc05b78d2f","integrity":"sha256-+vMgB64SDDAiE1V2JuZg3RDnEcXdTxET018m3AW3jS8="},"jquery-ui/ui-icons_cc0000_256x240-40985a64b4d5dd213fba27fcd862a1bd1b337a97674f6ff0b9ec20abcee4bc69.png":{"logical_path":"jquery-ui/ui-icons_cc0000_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"40985a64b4d5dd213fba27fcd862a1bd1b337a97674f6ff0b9ec20abcee4bc69","integrity":"sha256-QJhaZLTV3SE/uif82GKhvRszepdnT2/wuewgq87kvGk="},"jquery-ui/ui-icons_ffffff_256x240-350df1b7131037de20e83c5c0f3a41a770d2ac48b5762ea772b3f4a8a7b9d47a.png":{"logical_path":"jquery-ui/ui-icons_ffffff_256x240.png","mtime":"2018-03-12T11:55:26+01:00","size":3756,"digest":"350df1b7131037de20e83c5c0f3a41a770d2ac48b5762ea772b3f4a8a7b9d47a","integrity":"sha256-NQ3xtxMQN94g6DxcDzpBp3DSrEi1di6ncrP0qKe51Ho="},"tinymce/preinit-84328a53e798df12f891eb49871773fd9f925439c8630e9e22423a82ef9e6f89.js":{"logical_path":"tinymce/preinit.js","mtime":"2019-04-24T10:04:09+02:00","size":82,"digest":"84328a53e798df12f891eb49871773fd9f925439c8630e9e22423a82ef9e6f89","integrity":"sha256-hDKKU+eY3xL4ketJhxdz/Z+SVDnIYw6eIkI6gu+eb4k="},"tinymce/rails-bf7fd5c952f25481010758dde6a2681498074f9509230f601b317356a6a54fca.js":{"logical_path":"tinymce/rails.js","mtime":"2019-04-24T10:04:09+02:00","size":1345,"digest":"bf7fd5c952f25481010758dde6a2681498074f9509230f601b317356a6a54fca","integrity":"sha256-v3/VyVLyVIEBB1jd5qJoFJgHT5UJIw9gGzFzVqalT8o="},"tinymce/tinymce-933bdee0c6ef78cce68c58cdff6d05ce0644cffd92f03096827dfc71ddfb8180.js":{"logical_path":"tinymce/tinymce.js","mtime":"2019-04-24T10:04:09+02:00","size":1035334,"digest":"933bdee0c6ef78cce68c58cdff6d05ce0644cffd92f03096827dfc71ddfb8180","integrity":"sha256-kzve4MbveMzmjFjN/20FzgZEz/2S8DCWgn38cd37gYA="},"tinymce/jquery.tinymce-05402ca7d9e16d0a48a6259f8c005507d800186c5187f8cab94e79803c657535.js":{"logical_path":"tinymce/jquery.tinymce.js","mtime":"2019-04-24T10:04:09+02:00","size":6689,"digest":"05402ca7d9e16d0a48a6259f8c005507d800186c5187f8cab94e79803c657535","integrity":"sha256-BUAsp9nhbQpIpiWfjABVB9gAGGxRh/jKuU55gDxldTU="},"tinymce/langs/readme-5a8b6a04d57b5c88e3fb7f2a870b8e2d3a48ec03ce6474206c41df78c155b2de.md":{"logical_path":"tinymce/langs/readme.md","mtime":"2019-04-24T10:04:09+02:00","size":151,"digest":"5a8b6a04d57b5c88e3fb7f2a870b8e2d3a48ec03ce6474206c41df78c155b2de","integrity":"sha256-WotqBNV7XIjj+38qhwuOLTpI7APOZHQgbEHfeMFVst4="},"tinymce/license-47a9dcd2574891a5a465112fd9dfcebcc7e61844edec27fa936a64642008fe66.txt":{"logical_path":"tinymce/license.txt","mtime":"2019-04-24T10:04:09+02:00","size":26441,"digest":"47a9dcd2574891a5a465112fd9dfcebcc7e61844edec27fa936a64642008fe66","integrity":"sha256-R6nc0ldIkaWkZREv2d/OvMfmGETt7Cf6k2pkZCAI/mY="},"tinymce/plugins/advlist/plugin-f6069c61cab2738bb578f2fe8281468a5cb0288557dd991b7bba8ded5e482fbd.js":{"logical_path":"tinymce/plugins/advlist/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":4121,"digest":"f6069c61cab2738bb578f2fe8281468a5cb0288557dd991b7bba8ded5e482fbd","integrity":"sha256-9gacYcqyc4u1ePL+goFGilywKIVX3Zkbe7qN7V5IL70="},"tinymce/plugins/anchor/plugin-ea234f2da55d91c64226d60ce759db2aec048e0b2c75a24df6a89d53124c07f6.js":{"logical_path":"tinymce/plugins/anchor/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2108,"digest":"ea234f2da55d91c64226d60ce759db2aec048e0b2c75a24df6a89d53124c07f6","integrity":"sha256-6iNPLaVdkcZCJtYM51nbKuwEjgssdaJN9qidUxJMB/Y="},"tinymce/plugins/autolink/plugin-ac28a17f983f18cd516db411cef14309f2f59f3e0c8ba50003cb0e6474fcda3c.js":{"logical_path":"tinymce/plugins/autolink/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2428,"digest":"ac28a17f983f18cd516db411cef14309f2f59f3e0c8ba50003cb0e6474fcda3c","integrity":"sha256-rCihf5g/GM1RbbQRzvFDCfL1nz4Mi6UAA8sOZHT82jw="},"tinymce/plugins/autoresize/plugin-2763b3400e380421179d07457608202b063c27a3a3048a464a6aae9019172f59.js":{"logical_path":"tinymce/plugins/autoresize/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2222,"digest":"2763b3400e380421179d07457608202b063c27a3a3048a464a6aae9019172f59","integrity":"sha256-J2OzQA44BCEXnQdFdgggKwY8J6OjBIpGSmqukBkXL1k="},"tinymce/plugins/autosave/plugin-1d1330b882d749e240d1e776010079de029c85bd927108deb213e7b49af94ff3.js":{"logical_path":"tinymce/plugins/autosave/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":3321,"digest":"1d1330b882d749e240d1e776010079de029c85bd927108deb213e7b49af94ff3","integrity":"sha256-HRMwuILXSeJA0ed2AQB53gKchb2ScQjeshPntJr5T/M="},"tinymce/plugins/bbcode/plugin-519d45b998601eecaf7200a940d966c1f49ce6a17b11ad8981b98eb5737d888b.js":{"logical_path":"tinymce/plugins/bbcode/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":3151,"digest":"519d45b998601eecaf7200a940d966c1f49ce6a17b11ad8981b98eb5737d888b","integrity":"sha256-UZ1FuZhgHuyvcgCpQNlmwfSc5qF7Ea2JgbmOtXN9iIs="},"tinymce/plugins/charmap/plugin-d92efb7c2b951cb6978d16e06dd01a2ed3f69930078fdb61e1c024d2be3088bd.js":{"logical_path":"tinymce/plugins/charmap/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":11935,"digest":"d92efb7c2b951cb6978d16e06dd01a2ed3f69930078fdb61e1c024d2be3088bd","integrity":"sha256-2S77fCuVHLaXjRbgbdAaLtP2mTAHj9th4cAk0r4wiL0="},"tinymce/plugins/code/plugin-12f14e1ff40aa149ed4602915a151b1a0fba95cd109c5a3660ef276a6cd4d12b.js":{"logical_path":"tinymce/plugins/code/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1225,"digest":"12f14e1ff40aa149ed4602915a151b1a0fba95cd109c5a3660ef276a6cd4d12b","integrity":"sha256-EvFOH/QKoUntRgKRWhUbGg+6lc0QnFo2YO8namzU0Ss="},"tinymce/plugins/codesample/plugin-961dec8320c47362b979cec22319eaa66b13aa7eebce410f72f40dfe256addfe.js":{"logical_path":"tinymce/plugins/codesample/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":21054,"digest":"961dec8320c47362b979cec22319eaa66b13aa7eebce410f72f40dfe256addfe","integrity":"sha256-lh3sgyDEc2K5ec7CIxnqpmsTqn7rzkEPcvQN/iVq3f4="},"tinymce/plugins/colorpicker/plugin-675106b228906c2c7c56fc575464632d663c28879ff4932941b22f65267a0eac.js":{"logical_path":"tinymce/plugins/colorpicker/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":541,"digest":"675106b228906c2c7c56fc575464632d663c28879ff4932941b22f65267a0eac","integrity":"sha256-Z1EGsiiQbCx8VvxXVGRjLWY8KIef9JMpQbIvZSZ6Dqw="},"tinymce/plugins/contextmenu/plugin-70fd6ce0f8a691c2d0322d149c0db77ffaee2e45382e373fb9286b1a69b44d02.js":{"logical_path":"tinymce/plugins/contextmenu/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":541,"digest":"70fd6ce0f8a691c2d0322d149c0db77ffaee2e45382e373fb9286b1a69b44d02","integrity":"sha256-cP1s4PimkcLQMi0UnA23f/ruLkU4Ljc/uShrGmm0TQI="},"tinymce/plugins/directionality/plugin-f04e257aaed783c1e59a5b80d4333e59466b693440c4ee59214e58a9104fdeb0.js":{"logical_path":"tinymce/plugins/directionality/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":4316,"digest":"f04e257aaed783c1e59a5b80d4333e59466b693440c4ee59214e58a9104fdeb0","integrity":"sha256-8E4leq7Xg8HlmluA1DM+WUZraTRAxO5ZIU5YqRBP3rA="},"tinymce/plugins/emoticons/js/emojis-c6f728975b5c86aca22f396025edefe6107b0dd4d95f5ef80daef569b545bce8.js":{"logical_path":"tinymce/plugins/emoticons/js/emojis.js","mtime":"2019-04-24T10:04:09+02:00","size":193207,"digest":"c6f728975b5c86aca22f396025edefe6107b0dd4d95f5ef80daef569b545bce8","integrity":"sha256-xvcol1tchqyiLzlgJe3v5hB7DdTZX174Da71abVFvOg="},"tinymce/plugins/emoticons/plugin-a22d47281e0384989309733a032c819d1e65997dd04eee51c1432f000ceff442.js":{"logical_path":"tinymce/plugins/emoticons/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":8074,"digest":"a22d47281e0384989309733a032c819d1e65997dd04eee51c1432f000ceff442","integrity":"sha256-oi1HKB4DhJiTCXM6AyyBnR5lmX3QTu5RwUMvAAzv9EI="},"tinymce/plugins/fullpage/plugin-80a11891b4f79a0cf9b60dfd59316cfbd414b88b5fcd42417e74e7f848cc1994.js":{"logical_path":"tinymce/plugins/fullpage/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":8195,"digest":"80a11891b4f79a0cf9b60dfd59316cfbd414b88b5fcd42417e74e7f848cc1994","integrity":"sha256-gKEYkbT3mgz5tg39WTFs+9QUuItfzUJBfnTn+EjMGZQ="},"tinymce/plugins/fullscreen/plugin-7e6977ec473334a87e2ec082d2b26469fc16e7e0418b693c3310dde6870abec0.js":{"logical_path":"tinymce/plugins/fullscreen/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2668,"digest":"7e6977ec473334a87e2ec082d2b26469fc16e7e0418b693c3310dde6870abec0","integrity":"sha256-fml37EczNKh+LsCC0rJkafwW5+BBi2k8MxDd5ocKvsA="},"tinymce/plugins/help/plugin-8bbaaa8c56dc2fc53d8e81431cb2572f3cde335ca69e6b263057b611779fba2a.js":{"logical_path":"tinymce/plugins/help/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":9311,"digest":"8bbaaa8c56dc2fc53d8e81431cb2572f3cde335ca69e6b263057b611779fba2a","integrity":"sha256-i7qqjFbcL8U9joFDHLJXLzzeM1ymnmsmMFe2EXefuio="},"tinymce/plugins/hr/plugin-af6dc21fc03fae20b20f43bdc020f000c94d7d44b85d2a3801b6cca7a63e89db.js":{"logical_path":"tinymce/plugins/hr/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":840,"digest":"af6dc21fc03fae20b20f43bdc020f000c94d7d44b85d2a3801b6cca7a63e89db","integrity":"sha256-r23CH8A/riCyD0O9wCDwAMlNfUS4XSo4AbbMp6Y+ids="},"tinymce/plugins/image/plugin-9cc2713ba38cfa55c0095931480a4488b5f1689a398d6356c7dad1e9e633fa65.js":{"logical_path":"tinymce/plugins/image/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":28385,"digest":"9cc2713ba38cfa55c0095931480a4488b5f1689a398d6356c7dad1e9e633fa65","integrity":"sha256-nMJxO6OM+lXACVkxSApEiLXxaJo5jWNWx9rR6eYz+mU="},"tinymce/plugins/imagetools/plugin-3cbcd85187b1b675f7dbd604936f34e34071f2d4b5aa5bc472c3fa32fc1b623c.js":{"logical_path":"tinymce/plugins/imagetools/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":29686,"digest":"3cbcd85187b1b675f7dbd604936f34e34071f2d4b5aa5bc472c3fa32fc1b623c","integrity":"sha256-PLzYUYextnX329YEk28040Bx8tS1qlvEcsP6MvwbYjw="},"tinymce/plugins/importcss/plugin-a3b02fc1e1536bfc021bf89a0ac7190da67c0210ba913f412a0afae69928c706.js":{"logical_path":"tinymce/plugins/importcss/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":4870,"digest":"a3b02fc1e1536bfc021bf89a0ac7190da67c0210ba913f412a0afae69928c706","integrity":"sha256-o7AvweFTa/wCG/iaCscZDaZ8AhC6kT9BKgr65pkoxwY="},"tinymce/plugins/insertdatetime/plugin-7c77d7748a4feaba38c5002f3f0c74b514f66cb853fadb812e316d6caaeebf13.js":{"logical_path":"tinymce/plugins/insertdatetime/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":3205,"digest":"7c77d7748a4feaba38c5002f3f0c74b514f66cb853fadb812e316d6caaeebf13","integrity":"sha256-fHfXdIpP6ro4xQAvPwx0tRT2bLhT+tuBLjFtbKruvxM="},"tinymce/plugins/legacyoutput/plugin-682ea2869f7859dd3f178b6e78ad633c43b432826d4ef6f77b57ae1e2bc35588.js":{"logical_path":"tinymce/plugins/legacyoutput/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2795,"digest":"682ea2869f7859dd3f178b6e78ad633c43b432826d4ef6f77b57ae1e2bc35588","integrity":"sha256-aC6ihp94Wd0/F4tueK1jPEO0MoJtTvb3e1euHivDVYg="},"tinymce/plugins/link/plugin-f13ef8ee24e703b7bb2a74383dc27015f8589940855719b84cf3172d5cfb7bde.js":{"logical_path":"tinymce/plugins/link/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":16484,"digest":"f13ef8ee24e703b7bb2a74383dc27015f8589940855719b84cf3172d5cfb7bde","integrity":"sha256-8T747iTnA7e7KnQ4PcJwFfhYmUCFVxm4TPMXLVz7e94="},"tinymce/plugins/lists/plugin-fb324d9a8658dd319991ad6c6f41bbcb7a9406dce01c87242972115f0aee0191.js":{"logical_path":"tinymce/plugins/lists/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":27854,"digest":"fb324d9a8658dd319991ad6c6f41bbcb7a9406dce01c87242972115f0aee0191","integrity":"sha256-+zJNmoZY3TGZka1sb0G7y3qUBtzgHIckKXIRXwruAZE="},"tinymce/plugins/media/plugin-314e9ca099af746e9d2bbfb76a3a72434d38e7940a6ffeb7c9448eca4a52feef.js":{"logical_path":"tinymce/plugins/media/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":17440,"digest":"314e9ca099af746e9d2bbfb76a3a72434d38e7940a6ffeb7c9448eca4a52feef","integrity":"sha256-MU6coJmvdG6dK7+3ajpyQ00455QKb/63yUSOykpS/u8="},"tinymce/plugins/nonbreaking/plugin-355a69fd71432a44b03e9efed7037601c1d305f8730baf36b5c8a112431d7673.js":{"logical_path":"tinymce/plugins/nonbreaking/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1421,"digest":"355a69fd71432a44b03e9efed7037601c1d305f8730baf36b5c8a112431d7673","integrity":"sha256-NVpp/XFDKkSwPp7+1wN2AcHTBfhzC682tcihEkMddnM="},"tinymce/plugins/noneditable/plugin-b7b8a3896f2337b7e0e6f1251356e62614c9e61392de8f7b3e21d87121692cc1.js":{"logical_path":"tinymce/plugins/noneditable/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1841,"digest":"b7b8a3896f2337b7e0e6f1251356e62614c9e61392de8f7b3e21d87121692cc1","integrity":"sha256-t7ijiW8jN7fg5vElE1bmJhTJ5hOS3o97PiHYcSFpLME="},"tinymce/plugins/pagebreak/plugin-003321c54baa547ece529c6ca421f9d445cd6baad6bd7187bcfa480a5cb1b5da.js":{"logical_path":"tinymce/plugins/pagebreak/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1843,"digest":"003321c54baa547ece529c6ca421f9d445cd6baad6bd7187bcfa480a5cb1b5da","integrity":"sha256-ADMhxUuqVH7OUpxspCH51EXNa6rWvXGHvPpIClyxtdo="},"tinymce/plugins/paste/plugin-74c15fe37fd45caed6df7fa655e883ef34d2e5539ff1ec37e117c800eda43d9d.js":{"logical_path":"tinymce/plugins/paste/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":24156,"digest":"74c15fe37fd45caed6df7fa655e883ef34d2e5539ff1ec37e117c800eda43d9d","integrity":"sha256-dMFf43/UXK7W33+mVeiD7zTS5VOf8ew34RfIAO2kPZ0="},"tinymce/plugins/preview/plugin-e15108b69ba14fe224244e8f331a6286387584884564761d8bfa30c7ed0fde9d.js":{"logical_path":"tinymce/plugins/preview/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":2001,"digest":"e15108b69ba14fe224244e8f331a6286387584884564761d8bfa30c7ed0fde9d","integrity":"sha256-4VEItpuhT+IkJE6PMxpihjh1hIhFZHYdi/owx+0P3p0="},"tinymce/plugins/print/plugin-8452fa0d6bed7ae4f730e5c3ff65fe1191764dda144525be24305f3d0498b353.js":{"logical_path":"tinymce/plugins/print/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":787,"digest":"8452fa0d6bed7ae4f730e5c3ff65fe1191764dda144525be24305f3d0498b353","integrity":"sha256-hFL6DWvteuT3MOXD/2X+EZF2TdoURSW+JDBfPQSYs1M="},"tinymce/plugins/quickbars/plugin-cad12e46c842299aab8c83a35accd0d45c59ba603e5842ccae2a2c3d3269729f.js":{"logical_path":"tinymce/plugins/quickbars/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":10934,"digest":"cad12e46c842299aab8c83a35accd0d45c59ba603e5842ccae2a2c3d3269729f","integrity":"sha256-ytEuRshCKZqrjIOjWszQ1FxZumA+WELMriosPTJpcp8="},"tinymce/plugins/save/plugin-f9655d7c4ba6c1a620842782d1a357e190d0af093a1c8c08d1766020decd3c9b.js":{"logical_path":"tinymce/plugins/save/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1829,"digest":"f9655d7c4ba6c1a620842782d1a357e190d0af093a1c8c08d1766020decd3c9b","integrity":"sha256-+WVdfEumwaYghCeC0aNX4ZDQrwk6HIwI0XZgIN7NPJs="},"tinymce/plugins/searchreplace/plugin-2dbbce30bf922da5973f1549f4bd428e36873469dea0e4c7a359d93a1803faa1.js":{"logical_path":"tinymce/plugins/searchreplace/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":8774,"digest":"2dbbce30bf922da5973f1549f4bd428e36873469dea0e4c7a359d93a1803faa1","integrity":"sha256-LbvOML+SLaWXPxVJ9L1CjjaHNGneoOTHo1nZOhgD+qE="},"tinymce/plugins/spellchecker/plugin-a839601eab929fa3b1f39e393620d8be359665ec4b51f48e6133ecc2185edd87.js":{"logical_path":"tinymce/plugins/spellchecker/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":10437,"digest":"a839601eab929fa3b1f39e393620d8be359665ec4b51f48e6133ecc2185edd87","integrity":"sha256-qDlgHquSn6Ox8545NiDYvjWWZexLUfSOYTPswhhe3Yc="},"tinymce/plugins/tabfocus/plugin-aad92eb25bdb176a91e7ffa93be020075ed4dff441b7577f7399fae09b3cf330.js":{"logical_path":"tinymce/plugins/tabfocus/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1915,"digest":"aad92eb25bdb176a91e7ffa93be020075ed4dff441b7577f7399fae09b3cf330","integrity":"sha256-qtkuslvbF2qR5/+pO+AgB17U3/RBt1d/c5n64Js88zA="},"tinymce/plugins/table/plugin-ccce8aa4de244bb1893de09ef8f8f45ad2f2dee025b2c5de7d4fd19b5ca69d8a.js":{"logical_path":"tinymce/plugins/table/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":120722,"digest":"ccce8aa4de244bb1893de09ef8f8f45ad2f2dee025b2c5de7d4fd19b5ca69d8a","integrity":"sha256-zM6KpN4kS7GJPeCe+Pj0WtLy3uAlssXefU/Rm1ymnYo="},"tinymce/plugins/template/plugin-062f4f7cd168b2467bcd488e29fdc8ca1384d94703a5b161cfab75186cba877b.js":{"logical_path":"tinymce/plugins/template/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":7905,"digest":"062f4f7cd168b2467bcd488e29fdc8ca1384d94703a5b161cfab75186cba877b","integrity":"sha256-Bi9PfNFoskZ7zUiOKf3IyhOE2UcDpbFhz6t1GGy6h3s="},"tinymce/plugins/textcolor/plugin-4f0245c9030f11782ca1945decd285c804f9704185ca967634b5c90e974d2c00.js":{"logical_path":"tinymce/plugins/textcolor/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":537,"digest":"4f0245c9030f11782ca1945decd285c804f9704185ca967634b5c90e974d2c00","integrity":"sha256-TwJFyQMPEXgsoZRd7NKFyAT5cEGFypZ2NLXJDpdNLAA="},"tinymce/plugins/textpattern/plugin-755816e67ce980115f9ea54a368f930c46cbee3ebe2116759b2bd4d2083e0d16.js":{"logical_path":"tinymce/plugins/textpattern/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":16283,"digest":"755816e67ce980115f9ea54a368f930c46cbee3ebe2116759b2bd4d2083e0d16","integrity":"sha256-dVgW5nzpgBFfnqVKNo+TDEbL7j6+IRZ1myvU0gg+DRY="},"tinymce/plugins/toc/plugin-f744b1ecd10fdd9b6f25e79c6e9ae708645869b0dde843ab985979d3dd8f7c3b.js":{"logical_path":"tinymce/plugins/toc/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":3522,"digest":"f744b1ecd10fdd9b6f25e79c6e9ae708645869b0dde843ab985979d3dd8f7c3b","integrity":"sha256-90Sx7NEP3ZtvJeecbprnCGRYabDd6EOrmFl5092PfDs="},"tinymce/plugins/visualblocks/plugin-f7f0593b3bf6fe18d0e94085aae2c3621a13ab42675c1819be39ca9bf9b373b9.js":{"logical_path":"tinymce/plugins/visualblocks/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":1655,"digest":"f7f0593b3bf6fe18d0e94085aae2c3621a13ab42675c1819be39ca9bf9b373b9","integrity":"sha256-9/BZOzv2/hjQ6UCFquLDYhoTq0JnXBgZvjnKm/mzc7k="},"tinymce/plugins/visualchars/plugin-b8cbbfadad5651a3d5611992a42d0da9cfe72c2eaec6d8f58f75aa0dea534671.js":{"logical_path":"tinymce/plugins/visualchars/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":5729,"digest":"b8cbbfadad5651a3d5611992a42d0da9cfe72c2eaec6d8f58f75aa0dea534671","integrity":"sha256-uMu/ra1WUaPVYRmSpC0Nqc/nLC6uxtj1j3WqDepTRnE="},"tinymce/plugins/wordcount/plugin-d516b3b2c47d96881ce318b3ab9730df1730e6b097017916b8e47962136210dc.js":{"logical_path":"tinymce/plugins/wordcount/plugin.js","mtime":"2019-04-24T10:04:09+02:00","size":12489,"digest":"d516b3b2c47d96881ce318b3ab9730df1730e6b097017916b8e47962136210dc","integrity":"sha256-1RazssR9logc4xizq5cw3xcw5rCXAXkWuOR5YhNiENw="},"tinymce/skins/content/default/content-59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178.css":{"logical_path":"tinymce/skins/content/default/content.css","mtime":"2019-04-24T10:04:09+02:00","size":569,"digest":"59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178","integrity":"sha256-Wa+OK9y4QwgkM+NaE+dEUrtxZ1tNCaECD7guwS+QUXg="},"tinymce/skins/content/default/content.min-59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178.css":{"logical_path":"tinymce/skins/content/default/content.min.css","mtime":"2019-04-24T10:04:09+02:00","size":569,"digest":"59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178","integrity":"sha256-Wa+OK9y4QwgkM+NaE+dEUrtxZ1tNCaECD7guwS+QUXg="},"tinymce/skins/content/document/content-1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943.css":{"logical_path":"tinymce/skins/content/document/content.css","mtime":"2019-04-24T10:04:09+02:00","size":653,"digest":"1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943","integrity":"sha256-HibMzvAFJSKv+4G/IUgxAjaxnN34Ey8COdjHVmci6UM="},"tinymce/skins/content/document/content.min-1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943.css":{"logical_path":"tinymce/skins/content/document/content.min.css","mtime":"2019-04-24T10:04:09+02:00","size":653,"digest":"1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943","integrity":"sha256-HibMzvAFJSKv+4G/IUgxAjaxnN34Ey8COdjHVmci6UM="},"tinymce/skins/content/writer/content-eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656.css":{"logical_path":"tinymce/skins/content/writer/content.css","mtime":"2019-04-24T10:04:09+02:00","size":590,"digest":"eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656","integrity":"sha256-7qXBU+4qEO0IZNhPod/7lept735XmXjNLdPY8JVsllY="},"tinymce/skins/content/writer/content.min-eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656.css":{"logical_path":"tinymce/skins/content/writer/content.min.css","mtime":"2019-04-24T10:04:09+02:00","size":590,"digest":"eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656","integrity":"sha256-7qXBU+4qEO0IZNhPod/7lept735XmXjNLdPY8JVsllY="},"tinymce/skins/ui/oxide/content-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css":{"logical_path":"tinymce/skins/ui/oxide/content.css","mtime":"2019-04-24T10:04:09+02:00","size":16025,"digest":"5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e","integrity":"sha256-W/vUbw+A/t6kE5YsnMucqP/Cwx7EChh8SLwIzTGkiw4="},"tinymce/skins/ui/oxide/content.inline-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css":{"logical_path":"tinymce/skins/ui/oxide/content.inline.css","mtime":"2019-04-24T10:04:09+02:00","size":16229,"digest":"3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096","integrity":"sha256-NnZULerJeGoLDOR2gDEOjdLtr6IGSRcjF6O8tLjVIJY="},"tinymce/skins/ui/oxide/content.inline.min-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css":{"logical_path":"tinymce/skins/ui/oxide/content.inline.min.css","mtime":"2019-04-24T10:04:09+02:00","size":16229,"digest":"3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096","integrity":"sha256-NnZULerJeGoLDOR2gDEOjdLtr6IGSRcjF6O8tLjVIJY="},"tinymce/skins/ui/oxide/content.min-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css":{"logical_path":"tinymce/skins/ui/oxide/content.min.css","mtime":"2019-04-24T10:04:09+02:00","size":16025,"digest":"5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e","integrity":"sha256-W/vUbw+A/t6kE5YsnMucqP/Cwx7EChh8SLwIzTGkiw4="},"tinymce/skins/ui/oxide/content.mobile-230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346.css":{"logical_path":"tinymce/skins/ui/oxide/content.mobile.css","mtime":"2019-04-24T10:04:09+02:00","size":235,"digest":"230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346","integrity":"sha256-Iwwx9lNWx8sXmSRKNPenIskqbWFOBuWdSNsOvM1/I0Y="},"tinymce/skins/ui/oxide/content.mobile.min-230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346.css":{"logical_path":"tinymce/skins/ui/oxide/content.mobile.min.css","mtime":"2019-04-24T10:04:09+02:00","size":235,"digest":"230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346","integrity":"sha256-Iwwx9lNWx8sXmSRKNPenIskqbWFOBuWdSNsOvM1/I0Y="},"tinymce/skins/ui/oxide/fonts/tinymce-mobile-e64bf156a432d63f5b34b4567b513dc0d351b49161c7f608fb82574bfdd9d213.woff":{"logical_path":"tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff","mtime":"2019-04-24T10:04:09+02:00","size":4624,"digest":"e64bf156a432d63f5b34b4567b513dc0d351b49161c7f608fb82574bfdd9d213","integrity":"sha256-5kvxVqQy1j9bNLRWe1E9wNNRtJFhx/YI+4JXS/3Z0hM="},"tinymce/skins/ui/oxide/skin-7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3.css":{"logical_path":"tinymce/skins/ui/oxide/skin.css","mtime":"2019-04-24T10:04:09+02:00","size":40002,"digest":"7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3","integrity":"sha256-fY4GFgVL9e/yyvSp78KHrrR67zeBIu/QJ8j6rj96mdM="},"tinymce/skins/ui/oxide/skin.min-7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3.css":{"logical_path":"tinymce/skins/ui/oxide/skin.min.css","mtime":"2019-04-24T10:04:09+02:00","size":40002,"digest":"7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3","integrity":"sha256-fY4GFgVL9e/yyvSp78KHrrR67zeBIu/QJ8j6rj96mdM="},"tinymce/skins/ui/oxide/skin.mobile-22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22.css":{"logical_path":"tinymce/skins/ui/oxide/skin.mobile.css","mtime":"2019-04-24T10:04:09+02:00","size":28233,"digest":"22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22","integrity":"sha256-InA8tCO+QysSWhn6lKKagSK3Ir5PfBswMQLOFu2DniI="},"tinymce/skins/ui/oxide/skin.mobile.min-22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22.css":{"logical_path":"tinymce/skins/ui/oxide/skin.mobile.min.css","mtime":"2019-04-24T10:04:09+02:00","size":28233,"digest":"22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22","integrity":"sha256-InA8tCO+QysSWhn6lKKagSK3Ir5PfBswMQLOFu2DniI="},"tinymce/skins/ui/oxide-dark/content-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css":{"logical_path":"tinymce/skins/ui/oxide-dark/content.css","mtime":"2019-04-24T10:04:09+02:00","size":16025,"digest":"5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e","integrity":"sha256-W/vUbw+A/t6kE5YsnMucqP/Cwx7EChh8SLwIzTGkiw4="},"tinymce/skins/ui/oxide-dark/content.inline-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css":{"logical_path":"tinymce/skins/ui/oxide-dark/content.inline.css","mtime":"2019-04-24T10:04:09+02:00","size":16229,"digest":"3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096","integrity":"sha256-NnZULerJeGoLDOR2gDEOjdLtr6IGSRcjF6O8tLjVIJY="},"tinymce/skins/ui/oxide-dark/content.inline.min-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css":{"logical_path":"tinymce/skins/ui/oxide-dark/content.inline.min.css","mtime":"2019-04-24T10:04:09+02:00","size":16229,"digest":"3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096","integrity":"sha256-NnZULerJeGoLDOR2gDEOjdLtr6IGSRcjF6O8tLjVIJY="},"tinymce/skins/ui/oxide-dark/content.min-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css":{"logical_path":"tinymce/skins/ui/oxide-dark/content.min.css","mtime":"2019-04-24T10:04:09+02:00","size":16025,"digest":"5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e","integrity":"sha256-W/vUbw+A/t6kE5YsnMucqP/Cwx7EChh8SLwIzTGkiw4="},"tinymce/skins/ui/oxide-dark/skin-661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a.css":{"logical_path":"tinymce/skins/ui/oxide-dark/skin.css","mtime":"2019-04-24T10:04:09+02:00","size":39983,"digest":"661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a","integrity":"sha256-ZhFXu8sFd9OenbqCXqe1UuqB/IiavtmO1sFzgsipBSo="},"tinymce/skins/ui/oxide-dark/skin.min-661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a.css":{"logical_path":"tinymce/skins/ui/oxide-dark/skin.min.css","mtime":"2019-04-24T10:04:09+02:00","size":39983,"digest":"661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a","integrity":"sha256-ZhFXu8sFd9OenbqCXqe1UuqB/IiavtmO1sFzgsipBSo="},"tinymce/themes/mobile/theme-842fc9d34b6299cf6acb8c991806c5c9706157c460c6242cf63e74d764faa830.js":{"logical_path":"tinymce/themes/mobile/theme.js","mtime":"2019-04-24T10:04:09+02:00","size":175095,"digest":"842fc9d34b6299cf6acb8c991806c5c9706157c460c6242cf63e74d764faa830","integrity":"sha256-hC/J00timc9qy4yZGAbFyXBhV8RgxiQs9j5012T6qDA="},"tinymce/themes/silver/theme-b0a7acb741588b1d3a5a5f16893b14da184559170c2a94f68d5a25415848ee7f.js":{"logical_path":"tinymce/themes/silver/theme.js","mtime":"2019-04-24T10:04:09+02:00","size":359189,"digest":"b0a7acb741588b1d3a5a5f16893b14da184559170c2a94f68d5a25415848ee7f","integrity":"sha256-sKest0FYix06Wl8WiTsU2hhFWRcMKpT2jVolQVhI7n8="}},"assets":{"active_admin.css":"active_admin-5c77f94f5d7cc920bb8cc169ecb08c8cc9c90855e82af6a210e2f726134f9b7f.css","active_admin/nested_menu_arrow.gif":"active_admin/nested_menu_arrow-15084d93c65c1964d7077700ea748bd2d70cfa2d4c19707c58a9c64e232dd442.gif","active_admin/nested_menu_arrow_dark.gif":"active_admin/nested_menu_arrow_dark-7c43b8e0a5f8823875f49a093c9d7a6b374f885b6f9cc248ae9cd7e6e9b29034.gif","active_admin/orderable.png":"active_admin/orderable-29374dbb55b0012d78a37c614d573bb3474f0779849b478a147d0f1845ca6617.png","active_admin/print.css":"active_admin/print-cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d35b11d8f99f6.css","active_admin.js":"active_admin-fb39ad579247fc31c9bf740b6e6e0675441c247d2c3d802a47182e53d7139872.js","tinymce.js":"tinymce-df95706398fbc0057225de6b0bc1a131dab80d0276e63a868d9982bcd74f2e33.js","modernizr.js":"modernizr-654222debe8018b12f1993ceddff30dc163a7d5008d79869c399d6d167321f97.js","font-awesome/fa-brands-400.eot":"font-awesome/fa-brands-400-bd4e21d8e25a889e979ac2367770c36863443b8e0f99feeaee09a62625b9cb13.eot","font-awesome/fa-regular-400.eot":"font-awesome/fa-regular-400-4aa44a07b71f47067872c8f177f31babc0c609af2b384511353c89b1ca804458.eot","font-awesome/fa-solid-900.eot":"font-awesome/fa-solid-900-e153efe317e731e59eb8d6d1a568a811b8f7dd5df3823c327103be8e4a0047e4.eot","font-awesome/fa-brands-400.svg":"font-awesome/fa-brands-400-e281f2a25598bf8b40a77f3c5228b51900788224e91dade3f4a0f8c383505f43.svg","font-awesome/fa-regular-400.svg":"font-awesome/fa-regular-400-934530d864b6f03fad8e87b66daf829d17f0e7afbd74baead32a6a4157d584c2.svg","font-awesome/fa-solid-900.svg":"font-awesome/fa-solid-900-d5b212510d72b66bdb7feb22c611456621c3dd1a2e88cc42983d7d4c9ab79563.svg","font-awesome/fa-brands-400.ttf":"font-awesome/fa-brands-400-70726f98e0d98f543d5fde05a3a74bb131c5c67f5fbffcf4d41b7f68bca2b56b.ttf","font-awesome/fa-regular-400.ttf":"font-awesome/fa-regular-400-112491dccca97bf50ec7adff8d430dcba6d0b71e0a0b20386f814f3bf5bb94b5.ttf","font-awesome/fa-solid-900.ttf":"font-awesome/fa-solid-900-7a58f741ff539af94798ff561c918e5841d7e6164e90cbe57befdec4a16f6a4e.ttf","font-awesome/fa-brands-400.woff":"font-awesome/fa-brands-400-17ce8b9d612897d1fefd5cd2096dbd83b82d05dd5d1f60421aca15c4ce2445ac.woff","font-awesome/fa-regular-400.woff":"font-awesome/fa-regular-400-2835b63ffc892d01aac2cc346969b501c845d9184f738589779ec176937e1f33.woff","font-awesome/fa-solid-900.woff":"font-awesome/fa-solid-900-20464aebbff54cc17776497ce4112c3374a54b38f7ba5f58eec12174149d6742.woff","font-awesome/fa-brands-400.woff2":"font-awesome/fa-brands-400-dc64d7192f84497cacad5c10aef682562c24aa6124270f85fe247e223607f3ed.woff2","font-awesome/fa-regular-400.woff2":"font-awesome/fa-regular-400-ccf4db1eeb68c96e05e74f8ebfa75cc60c3a0fed862dae6b0ad85d4e1b5b4e4f.woff2","font-awesome/fa-solid-900.woff2":"font-awesome/fa-solid-900-f18c486a80175cf02fee0e05c2b4acd86c04cdbaecec61c1ef91f920509b5efe.woff2","agendadescommuns.png":"agendadescommuns-0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33.png","alert.png":"alert-762ace9479328243a44061346b64c4d6b997e963c68dfc6bddd9e4d241192906.png","baby_gnu_adl.png":"baby_gnu_adl-463a81820aa2d4ffd8e7210dbce1a19ffcac67ef362aa7b092280c6f95c903fc.png","baby_gnu_adl.svg":"baby_gnu_adl-97251005d3225cf1d58b8c497d6b7905dbc9560cc8acd50118fcce60d0a2679e.svg","communs.png":"communs-0017bef53f6261cb3bf952d4b780c64307369714b2e1e2d4eb9f69dfd986ab33.png","lef-small.png":"lef-small-93285d531af463f877951d63fe844a6e9600b782c2c81f78723b730072fa942e.png","lef.png":"lef-7e9152b909c78144ff44ca2254c06709333bef0b8d4985deb1361aba5c63c86d.png","linux-presentation-day.png":"linux-presentation-day-863b30562924505dd21841220861f83643d310e0b943a0e6a905462ddfac86f1.png","priorite-logiciel-libre-je-soutiens-april_2_m.png":"priorite-logiciel-libre-je-soutiens-april_2_m-6442e454e96ed45cc1ebc40673a6c50bd286b9c28ea6a8b58572e94f7d6459fc.png","regions/CA-QC.png":"regions/CA-QC-70699e6a6e25c69040a3f1548b0afd829c4903ccca2760b6c10f49cc87d5d174.png","team.png":"team-65c86021cf8a1154493664094aeafcbe3e5aa13dc675bb8ef34b220481db98fa.png","application.js":"application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js","application.css":"application-f904f304c0e31520de1348a95610e5bd38cb3afae3405a752f5a50eee4e5dac4.css","flags/4x3/ad.svg":"flags/4x3/ad-f67c4e5a3f709ead53c04d9ff35614e6c67517c3d3289170f7a317390f661497.svg","flags/1x1/ad.svg":"flags/1x1/ad-a315836ec2c9dcc11ef9bfd8b18aa7ccfc2d31435cbf46a2c31930836076e09c.svg","flags/4x3/ae.svg":"flags/4x3/ae-7a3b3dc0f50b5310014cfbcc8200a5f1ce568127bf43452e40e8158e0cff2d2e.svg","flags/1x1/ae.svg":"flags/1x1/ae-bcdd9a4da09598785f3e31db4ff431e22687b2ead18209a3e615600655068cd5.svg","flags/4x3/af.svg":"flags/4x3/af-01601b521fa86582e32c39eed8c88480afec1f801b6de929b52ed7e49da47260.svg","flags/1x1/af.svg":"flags/1x1/af-6332cf754a5e2866db631923e1f7cfc52a0a554d32b97bcf19f8263819e4ca7d.svg","flags/4x3/ag.svg":"flags/4x3/ag-cb6952d821bac7855231c2cb4d1c44f7c730f6b3621518ab20f30d2b9afe604b.svg","flags/1x1/ag.svg":"flags/1x1/ag-14f7d9978487aaf4446b55167e85a711c48a13ff07edac175c172969a38650c4.svg","flags/4x3/ai.svg":"flags/4x3/ai-f07c6cc0646fdfa441b9a506e1d46e8dce0d97b37222292e9c6733c995dc89bc.svg","flags/1x1/ai.svg":"flags/1x1/ai-95099e544de29bcea3ba735de535823f2e19aeb4043e82dbc1d9862f9262b810.svg","flags/4x3/al.svg":"flags/4x3/al-9b997f2720de861e1b0ccec8ddf42a2890795ebf50817f9223e1ceba712c9b03.svg","flags/1x1/al.svg":"flags/1x1/al-94852d2711fc23abf3423534b9edb950a0c6aabf1d2d98bf2643f3c7dadfac09.svg","flags/4x3/am.svg":"flags/4x3/am-85a199ec21d1af74a256335ead0c1e38592bb603d8da81feda4678945e9e00e6.svg","flags/1x1/am.svg":"flags/1x1/am-869391b014ac299924d30777d72a4aba430752177290a90a1fc3255a7ad79ee7.svg","flags/4x3/ao.svg":"flags/4x3/ao-29224a61bf632826d530cda55d87c2615884bd2c2c3a322036ed468e34d85c75.svg","flags/1x1/ao.svg":"flags/1x1/ao-048eacbc862fe1868cf0ec73457b70a8b49a598c80dea049856f0e1fd6fec83e.svg","flags/4x3/aq.svg":"flags/4x3/aq-b401a776d2f1a7944170114f0aeeceab5e1d962df3de7ed1eff47d96824b73fd.svg","flags/1x1/aq.svg":"flags/1x1/aq-a8d7ce9bfb860b6e2b58608b50bf2cafc5220c77f6d049ab7770891f64334531.svg","flags/4x3/ar.svg":"flags/4x3/ar-bf73475bb707100874dec538ce4b7e1b5afc4ed67dc50a8a800ee519e51cc826.svg","flags/1x1/ar.svg":"flags/1x1/ar-fc6582cc6d3ef0782805d8497ee77ab2d836c53422e91007e48f81a4a9fa2e60.svg","flags/4x3/as.svg":"flags/4x3/as-79d395190345206ea03475b67b44638e1111562411504b60646483c9c0b0f7d1.svg","flags/1x1/as.svg":"flags/1x1/as-04f0db77c5d8610a55c69508b226a7c338924f8cf7d6577d5d6590e85ee57183.svg","flags/4x3/at.svg":"flags/4x3/at-3d197de8f1f0096a2b0d440b6fc7d80821585a6637e646c05487a87718bf6b5f.svg","flags/1x1/at.svg":"flags/1x1/at-ec4db9aeac793827ac7c8e40c072a76f7675010058cc8c8dfd3a86bb5acfa6b8.svg","flags/4x3/au.svg":"flags/4x3/au-126fa2500a315287a5f847f4d958bb929f11da9b39f35912cc440c0fcffb8b12.svg","flags/1x1/au.svg":"flags/1x1/au-bf990dcc957c9f74eb908e8ffa733f1731277bf6ec8b7301a6ea1ed92b59cc4b.svg","flags/4x3/aw.svg":"flags/4x3/aw-4524643452423e95f3b0dbe6216b059a9e52126b34c73ae4b3c17b682f893aa6.svg","flags/1x1/aw.svg":"flags/1x1/aw-f7002bceef55486a442bf6bf433be0c60d0b15b2aa548b81c524c67ccf0565a8.svg","flags/4x3/ax.svg":"flags/4x3/ax-c297e0eb654ca62e58f5eb3abb70df9f245e4919490f29bd0f1d49c4fe052d90.svg","flags/1x1/ax.svg":"flags/1x1/ax-a1245689ecbf321c0a9e556bba17f3c9f2aeb8b1f63d14fcb591d76a87f12880.svg","flags/4x3/az.svg":"flags/4x3/az-132e68d5e0386d3b9fa05b4288a0fd66f1414e2bc7af6b9d437b6935a7dfa00c.svg","flags/1x1/az.svg":"flags/1x1/az-3990c0526b933bd650285d821f2b93e432a73ba709869549b8ef75b051d3bd2d.svg","flags/4x3/ba.svg":"flags/4x3/ba-89dd0c1600d94741de7d667a487310193a0c48c4cf1a5159c3bf9dd37d65d2b5.svg","flags/1x1/ba.svg":"flags/1x1/ba-2dbe90eb12b937f4a9ae8db95760930a3e318f4ce5829ac05e292ead698bae5a.svg","flags/4x3/bb.svg":"flags/4x3/bb-16f8249ff958bfbc18fb1f23a5282000347bffdb5769ac620966185b1dcb57f6.svg","flags/1x1/bb.svg":"flags/1x1/bb-fae92d8426196ae24ffa561aca72613fae651a5e9c0bcda63ecc877add05b060.svg","flags/4x3/bd.svg":"flags/4x3/bd-8dac0547e73ee25a04148a3f0fd026a90e56c23b7e92921565d4263050ba77a6.svg","flags/1x1/bd.svg":"flags/1x1/bd-ecc3c3e87d4cc59c8350f2b4d7dca8f5cf46bdb26319db0ee80b744482af50c1.svg","flags/4x3/be.svg":"flags/4x3/be-a180ca68521188017bb5367f19e503d9599d6cbecd61bf054e59a57f58e648ae.svg","flags/1x1/be.svg":"flags/1x1/be-c8d4194137bd01955285b329dfdf996490d16c3116a92ce2f322e354b6d7494e.svg","flags/4x3/bf.svg":"flags/4x3/bf-6b214936ef89f19133d4a84e99cdf0cfdb99d6409f2f373f6d18694423013313.svg","flags/1x1/bf.svg":"flags/1x1/bf-04c7d61aa314adab5a41bd79d77aa780c10136bb6b8f4c62423e61e23e3851ee.svg","flags/4x3/bg.svg":"flags/4x3/bg-dd3985ba746942b0e65bc52a280cc4d28fb24fd2c7d9e22ac9afd2d75ee7bfc4.svg","flags/1x1/bg.svg":"flags/1x1/bg-f59294a736d5bdc0f102b58d70dbe45d02bd92df822820bf95336840f75a0746.svg","flags/4x3/bh.svg":"flags/4x3/bh-7c82c4a6ba963172c6c1b4423f39a0ebe9c999449cc7dd87018917943db4735c.svg","flags/1x1/bh.svg":"flags/1x1/bh-6893aac3e55c6480e9dac0c023ec2179f6c12a0da82a0bc2717134384c097e88.svg","flags/4x3/bi.svg":"flags/4x3/bi-4fcd0116f7f93c0564c6955806f3c3563d0ea7334ae406f29a897255845c923c.svg","flags/1x1/bi.svg":"flags/1x1/bi-91c34eb431b26be67852782a0b93e1d7d577a925454d6c8cea00a0d872d2de8a.svg","flags/4x3/bj.svg":"flags/4x3/bj-63bddb4268f5f8c2ed867041bcf058fb18fcd9d1e0799e01286fca2d5e961c7f.svg","flags/1x1/bj.svg":"flags/1x1/bj-e2606c5a8498c474a6b6708626b88108fcb73840344766566dc56f804279cdfc.svg","flags/4x3/bl.svg":"flags/4x3/bl-824a7265f48789d5e1ad5c5b0042a13a7d2d4357210e5bd8124fca19931e8c74.svg","flags/1x1/bl.svg":"flags/1x1/bl-ba6a7881b0ca72ac57aee4d823ae611ab4ad24a938ee9e01a7a4d5ae04cfccf6.svg","flags/4x3/bm.svg":"flags/4x3/bm-2e2f09e5a4edf4b18afff581656f50b0b4c37783db29591ff00ca768f7f755bc.svg","flags/1x1/bm.svg":"flags/1x1/bm-f553f953f8784ea4d67a5197f5d808a67747eb8a1cb56990d6838e690090d2d6.svg","flags/4x3/bn.svg":"flags/4x3/bn-bcf9967c12eb6397346cb5b960ae92efa41f314f780d09a3d7c81f5dacac4180.svg","flags/1x1/bn.svg":"flags/1x1/bn-1d1aad3fe9fd33ce922eba33c9ae6047a5646349239c20d1bc7307ec6d19a043.svg","flags/4x3/bo.svg":"flags/4x3/bo-fa423f2bb4ab6e8e9dd399ad73781ea8d9cbafd30f1b7ee0bcecfb9e7b75581e.svg","flags/1x1/bo.svg":"flags/1x1/bo-f5faa29e40191e0c76070ac1a1d2a1f2b18e9cd358b8a77cefaed8efc49a265e.svg","flags/4x3/bq.svg":"flags/4x3/bq-493c92ab19204c3ad319e6caba021df050132b99bd57a8f9b74131b78229c29e.svg","flags/1x1/bq.svg":"flags/1x1/bq-6e30bbeabc2aa097f657a411984b3c23278a8fcce2fc016b1cd6d2262f672d33.svg","flags/4x3/br.svg":"flags/4x3/br-cf3ba80ec2c9fd4d3c845c3a3c43a2b9d81cf90707a2918789e8b1f596833e01.svg","flags/1x1/br.svg":"flags/1x1/br-7bf4e4b31650ac25f0bc6c86eb87491a7e5a8eac13acccfcbde44346c88728f6.svg","flags/4x3/bs.svg":"flags/4x3/bs-69f60b5fea96b67dd939e597099994921bb3dc3bcf31b8dee7cc45be2885c836.svg","flags/1x1/bs.svg":"flags/1x1/bs-f5d6acf7ef7a240dc09ac88710fd77fd3494501104392db74d5c540d482f2262.svg","flags/4x3/bt.svg":"flags/4x3/bt-6c20b0c00e12d5898be0239a0c66ce775debd0bd536de56a271859a0285a039e.svg","flags/1x1/bt.svg":"flags/1x1/bt-58de3ca9438811ef1920e2f84c4ba4ce32d01069f4d197ab5d577de6acbe0c85.svg","flags/4x3/bv.svg":"flags/4x3/bv-ff173190fc339b3cb8b6e8235bc5e373853d7127fd94cbc32ac737e839aeb586.svg","flags/1x1/bv.svg":"flags/1x1/bv-59616ff1a722959064c83927ca2e49c1fce42a9b18e91b9ecbb74f62527aff43.svg","flags/4x3/bw.svg":"flags/4x3/bw-4bb1d3131b88c65b5decc67f7b44903e931bca2fcac841942591c599f0cbb850.svg","flags/1x1/bw.svg":"flags/1x1/bw-e08f50c0836ca5858aed7b0526aed6fb630da8dc6b6b96bd9a476af599dc89d6.svg","flags/4x3/by.svg":"flags/4x3/by-324ac96bfbe075781c664be3b9e2ac6b4d2a46dd2b418ca0920284f64394c7d4.svg","flags/1x1/by.svg":"flags/1x1/by-37b80e8bf7e51fef99a8307d6dffb04ee164790ceeafef606d516ca333e9488a.svg","flags/4x3/bz.svg":"flags/4x3/bz-156fdc45f8c15c9520a1ea9fc0f395f294f02077408ea1938c222a37cfbb7f1d.svg","flags/1x1/bz.svg":"flags/1x1/bz-24577d4e7b29b33ab3b1d37914c8479889baa7e8c8399c6d1c99faed31ab053a.svg","flags/4x3/ca.svg":"flags/4x3/ca-0d57cab46d5dbb0012a5e4ae0a9efee3baee90d5d157950a6c5d67edf2daa58f.svg","flags/1x1/ca.svg":"flags/1x1/ca-192a6fb0544e5a6f33a32149d62f1e7ac0a1d61c5c5afa57f3a42346ca8e8c90.svg","flags/4x3/cc.svg":"flags/4x3/cc-a35f2a9e10a28d6918ced65e0623b03bb2fbf1f20670b581bc0a409d33b4e843.svg","flags/1x1/cc.svg":"flags/1x1/cc-d2025eefc9d30f724f3fcd95c0fd9f7938930ecb01af7e0cd6ee6553d7358eb6.svg","flags/4x3/cd.svg":"flags/4x3/cd-5d2127c991b30522ae0a29d05facbc88728c050d7e333a60d614af1545459c5c.svg","flags/1x1/cd.svg":"flags/1x1/cd-59dacf424d1c8c779db66c5b7f2a93a3c8f14976c2975ccfb07639676a1602e3.svg","flags/4x3/cf.svg":"flags/4x3/cf-ac0aaffba354d848eba2501a402ee81dc96a56ad0acd3741ec9905e76c372e1e.svg","flags/1x1/cf.svg":"flags/1x1/cf-e637674faf7edcdad37182192d038448c157421ab0c69377d9b8e56ab2c0249d.svg","flags/4x3/cg.svg":"flags/4x3/cg-3729f717c83c9df7d0543a1a5d4a506efe184bdfeb39f9260b4b63edf19d2538.svg","flags/1x1/cg.svg":"flags/1x1/cg-8353ff1f251714b1b8905eec1722378426719955d0637d206d35d1dcfa68ddcf.svg","flags/4x3/ch.svg":"flags/4x3/ch-6739edee6d1ef72c4ed97cfe723d3bb7f17e4df5390f3a4ae234f1ffdeece0cf.svg","flags/1x1/ch.svg":"flags/1x1/ch-7c3dec465228981c57a90a3a7b3a6c42dd3e699230663e770b55008ce6d14208.svg","flags/4x3/ci.svg":"flags/4x3/ci-3e076d13c9524149508c442f8f727424660124e3591280d8ae9bddf9d8272a1e.svg","flags/1x1/ci.svg":"flags/1x1/ci-691a0a8577b7d555fc90dc7170adc9ec7571191cb3507c46c0e8516fd1778a91.svg","flags/4x3/ck.svg":"flags/4x3/ck-9cff098e505afde9bf5166cb7b0c409178575633b913ce08c1c700d08c477db6.svg","flags/1x1/ck.svg":"flags/1x1/ck-9c8dffa3bd5953d8a121780831f25b58738e67f3be71961894c56dfd25848c88.svg","flags/4x3/cl.svg":"flags/4x3/cl-a4c57ec2bb9adcb67e1850256e5165227b764187d6941a38d95d0def5144699b.svg","flags/1x1/cl.svg":"flags/1x1/cl-5a3e95cf63358e3911c97404818c2cddfd46414d8445e47d6976ee166c48926c.svg","flags/4x3/cm.svg":"flags/4x3/cm-5dce9f36d92a61bdc0c482141bdb4f55bfcec0a2ecc745db643a7953e2e5a722.svg","flags/1x1/cm.svg":"flags/1x1/cm-d8d21f54c44df5df9edef227691384a4ad37c15ff57c8aa0dead684d19eac8cd.svg","flags/4x3/cn.svg":"flags/4x3/cn-48ce1c2837bb806a6aaf8b7a9878b6d040c0d069a0ffca9a8a49e7a31aa30e7f.svg","flags/1x1/cn.svg":"flags/1x1/cn-e6be64c6c4a976e64d39bfe8a6ae4a5b1d38a6aa1b138ddcacf34a942dff50bc.svg","flags/4x3/co.svg":"flags/4x3/co-648d3ff596a0ecf3e85ac17c53abe1d7ca4759688e10a7a3a8b56f096ba6b6f7.svg","flags/1x1/co.svg":"flags/1x1/co-d3c16180c6bce630f762aff789104d10e9dbc949e740535a61396cd0ec34c1a1.svg","flags/4x3/cr.svg":"flags/4x3/cr-84aec60f19bd33e1ac1a209155fec8d372e17cb59dc1346bb9124e5cc867375d.svg","flags/1x1/cr.svg":"flags/1x1/cr-5371cf8bc5ad1a805155c1b3065e420a0a418c8d63b472bc545890289a365b35.svg","flags/4x3/cu.svg":"flags/4x3/cu-bb3f857e02aeab606120d9f164283f07a44b227f12aad7d6d344c7579f7b3ff0.svg","flags/1x1/cu.svg":"flags/1x1/cu-02c0054169b874a8d231de1f45b2d0884de48848157734e0ddcd0f684c05c18d.svg","flags/4x3/cv.svg":"flags/4x3/cv-90ee90ab59713454a218d8c300c71139e62655de80bfbea81df93142a529b81f.svg","flags/1x1/cv.svg":"flags/1x1/cv-2cf3eede97a468d28459ccc2271c28bb5b6029af2388b0301f6203be55e49308.svg","flags/4x3/cw.svg":"flags/4x3/cw-d46beb7b10b40fa82cfd40eb86a3b3879f59f5da2a2f5ef91d121ab9b16c0aad.svg","flags/1x1/cw.svg":"flags/1x1/cw-ba78c834e61b24a8a2b6bc7c80ab9f14e42c3c69415941ddb7c8c1f652ccd8b5.svg","flags/4x3/cx.svg":"flags/4x3/cx-28187fb9d91bedc6f239b107d26eb6ec1cc2a0c7730810306c5a6b313c14f2b2.svg","flags/1x1/cx.svg":"flags/1x1/cx-8ebe073d997f93d092a493300ea1d234c91aef80c6e8f431e88aa7f8e724f9a6.svg","flags/4x3/cy.svg":"flags/4x3/cy-8d633ecabc7968bb8a869c62545f122aacbbc3e108c25ceb421bb8bc8734b9be.svg","flags/1x1/cy.svg":"flags/1x1/cy-6ef37fdd7518f18727bec1ed9741bb4d1f854dde7ef1a7e9fd2f4ba6291a7790.svg","flags/4x3/cz.svg":"flags/4x3/cz-6c94e3d53fc1ae5982d8eb058b76d86f07d3fb4cd325698fea3291fa35504c56.svg","flags/1x1/cz.svg":"flags/1x1/cz-af9898ebd32559cdbea2fd17b351e5eedafccada6fbc6a2b7952cad78369817e.svg","flags/4x3/de.svg":"flags/4x3/de-e7323083675d25107c85f0cea6534bd21d21e77e6d524d92e1b2d0a4e21117a1.svg","flags/1x1/de.svg":"flags/1x1/de-fdb60146952d3b2d104310b28882a0ecde44d808240c3bab2cd6c302a538b266.svg","flags/4x3/dj.svg":"flags/4x3/dj-546da4a0dae9b1ab74dc6ac6076d0c706f37ef2a0d799342dd0345e11f770f03.svg","flags/1x1/dj.svg":"flags/1x1/dj-c0481b667f003d9d5a3c93861023a97a98224227ac19aa7e07b5b6edd35fe900.svg","flags/4x3/dk.svg":"flags/4x3/dk-a13735c0337ab4679cd8679508bf5e8067637ab611ca5c54172c621d740420e5.svg","flags/1x1/dk.svg":"flags/1x1/dk-822a3b8b6948f49aa81fe7620bd173453d9a45406a9680f24bad7e714e58cb7c.svg","flags/4x3/dm.svg":"flags/4x3/dm-7713fabd3cf341694b4c1ef5d1379820773722b61c190234ac7416f2872e3940.svg","flags/1x1/dm.svg":"flags/1x1/dm-33d984fc9897bb2a3bd16c6672b876effc1a8adc0c57ad122a16db54061e4e46.svg","flags/4x3/do.svg":"flags/4x3/do-714b6f307ea3a9c3d30348684b8574e8b7f5078f51649dfa97ae2a69a7108b4a.svg","flags/1x1/do.svg":"flags/1x1/do-d37306c4b346f89ea14739144374caad69652be31e8ce8e2504c9a0d422a4857.svg","flags/4x3/dz.svg":"flags/4x3/dz-a96e943c830558fe9823044aac2bfb3f6a4caf3bd3c57943352280a7f6b68cb1.svg","flags/1x1/dz.svg":"flags/1x1/dz-09400d3b2c58e641a1641a687b81476761d05f9d0ff65861aeaa33c7f508cda4.svg","flags/4x3/ec.svg":"flags/4x3/ec-6762ba85ea0f7bb289b0aa6219c797e5243103d281b1462c61b61030fa329d5e.svg","flags/1x1/ec.svg":"flags/1x1/ec-7410a75a013738fbb8cbd756d967380e02ae54ca74e9ef9a41c4b583c2c2794f.svg","flags/4x3/ee.svg":"flags/4x3/ee-ce3b622214bd9eefb43373cae2811ea8cf6ef6a16bb6afbaa5bcaaea34024da0.svg","flags/1x1/ee.svg":"flags/1x1/ee-a207a8363b4dde44f59951501c2cb539419e92b0814b25d6448710ced52226f8.svg","flags/4x3/eg.svg":"flags/4x3/eg-16a11fa93856ddc5fd46f8811adfc93660175724b20eaab55ff046855a352d2c.svg","flags/1x1/eg.svg":"flags/1x1/eg-9f4d098c604326bbc3692f9e2f335dbc9b34bdf2706565bf448380f0a889d1e2.svg","flags/4x3/eh.svg":"flags/4x3/eh-9cf4a74d29c1a1afc4137deeb5b678d55c8fbdf8d181217267f3a5cce6a76a97.svg","flags/1x1/eh.svg":"flags/1x1/eh-16c3327dbcf3483e634b3536b056324b5478212dae6d060f2ffb2ec961cd382f.svg","flags/4x3/er.svg":"flags/4x3/er-69a1e1e45289d1282df4b1e5ce5e712d69fbe314abd0c922353fce90814c543e.svg","flags/1x1/er.svg":"flags/1x1/er-90d49408e58955cf1cf3185b0193e03c4a107042d47ef5e975dbbe10c6ef7f4a.svg","flags/4x3/es.svg":"flags/4x3/es-50e59681c6b6412498bd9cbfc473abedc713db75c54c538b839db3c394d64499.svg","flags/1x1/es.svg":"flags/1x1/es-29c68fa3c9c8c2adacdc2eb0162e9c2fa998faa408836900ec6285000476800d.svg","flags/4x3/et.svg":"flags/4x3/et-14263ba7ea890fd0a4d89a2791343ecb7acc89aab1fc2593e00a6093b22251df.svg","flags/1x1/et.svg":"flags/1x1/et-086eefb70e9adad537cc1c640a72cc0fa843ec7a9b06b2778aa98b2db055bfe6.svg","flags/4x3/fi.svg":"flags/4x3/fi-a4c41caa02a4f6803ea0d6c36de4beebf20d150e3df742b1369a4099c2ff648e.svg","flags/1x1/fi.svg":"flags/1x1/fi-c5fdf318fac5fdfc94fe54268618e58a2bc5933617ead09992900f90cc25de9a.svg","flags/4x3/fj.svg":"flags/4x3/fj-cb0cc4b3b5c202f07487ee519f48b3eadb47035f5f2d5d3f99d20f81e48d6b79.svg","flags/1x1/fj.svg":"flags/1x1/fj-c2c7fd536841925e7647b2d510d6a0c58700e2a8ded0e42008fb93ffacde101f.svg","flags/4x3/fk.svg":"flags/4x3/fk-cb61eaa0d7221823f7d17de59ea88ed16b506f9585ab0c7291cf839449d82968.svg","flags/1x1/fk.svg":"flags/1x1/fk-a871742380ae157d1211a63cc35cd3621b1bf6de6d67e4a8e3565ad200b1d8cf.svg","flags/4x3/fm.svg":"flags/4x3/fm-079b937562a9a412aae8fb762b571ddb49bf23627943c97247b6a9bbdb768153.svg","flags/1x1/fm.svg":"flags/1x1/fm-dbec73633ecd8a6c50f56d54df36bbe6a2f8fb534ac7658477c82cad14a806a8.svg","flags/4x3/fo.svg":"flags/4x3/fo-27279c2481bb1cb3e44850a948987d6a8411acffa770c3aecd1b76d4c5853413.svg","flags/1x1/fo.svg":"flags/1x1/fo-7cb4fdbba1c7223702d843cb0709ddc799f89f909dfe101e3e36d6bf36c3e67f.svg","flags/4x3/fr.svg":"flags/4x3/fr-30ed2f68dc9a17927643640f48f3d2a858bd041770547035349c6e79713cd84e.svg","flags/1x1/fr.svg":"flags/1x1/fr-6b849151204c66fa661c30b34e62919a13b9e66b7cd37a4fc8962e8e0baf9bdc.svg","flags/4x3/ga.svg":"flags/4x3/ga-e3840f9d5bd6ee08db748d37a534500b837bee0f8ce65987b2f099a6afd2cc63.svg","flags/1x1/ga.svg":"flags/1x1/ga-9eafd5388042b3d2258ac6223075b726426210136b9851b637973105721b64d9.svg","flags/4x3/gb.svg":"flags/4x3/gb-ce93c8a6b974d63998e263f6d25f898fc20580a28464457f2f4463b687e4fe8d.svg","flags/1x1/gb.svg":"flags/1x1/gb-1d93e1ce2e2e10c1709e4dc50ac956c007b2c1a63a4bc22ddfd64354f79ad457.svg","flags/4x3/gd.svg":"flags/4x3/gd-7c3a6b6068bbd9a6abc98c2297dd4acd5e31022e5a4210fc0e1205ec28498fa2.svg","flags/1x1/gd.svg":"flags/1x1/gd-2310bc03d9e8ddc8599b40891bfb10b812b07023881599a7e02e3028d1bc9ca8.svg","flags/4x3/ge.svg":"flags/4x3/ge-501c0135fb8c377dbd2859ff6290b47ef4907a8e2ab2ae1e39116b716db6795f.svg","flags/1x1/ge.svg":"flags/1x1/ge-ca9ee36883ec12048fbb7fbbfaf231c0d4848ae0b07dab74a46d53b7b34d8114.svg","flags/4x3/gf.svg":"flags/4x3/gf-7c165f90bfe6ac3674903632182221a992f017ff706354b1761002382e89c2c2.svg","flags/1x1/gf.svg":"flags/1x1/gf-8838337b15cdcf143fac16c714e8dbf2d893d2ea8f1c8ef06dadcb652dfec41c.svg","flags/4x3/gg.svg":"flags/4x3/gg-2c7bfc50d5bcd374b5f6107974d06af24e70edba31ad71a225e0c2ecc2d6e778.svg","flags/1x1/gg.svg":"flags/1x1/gg-509489b1792831bb27d6975c76aa0a2ac2fa2c3906bcf844f616de5e0fbbc359.svg","flags/4x3/gh.svg":"flags/4x3/gh-79c187756e93df22fae571ad9419629c5247c016e32a74471e0d461048fdf5cf.svg","flags/1x1/gh.svg":"flags/1x1/gh-e7bf18e6337982ee31e3673ab93e722b3410b7a4c202656a4bc3887d8656286b.svg","flags/4x3/gi.svg":"flags/4x3/gi-ed99b369c8c77e64abd59fab1f28155d71b4378b49625c66ab0ab6dff4f88087.svg","flags/1x1/gi.svg":"flags/1x1/gi-2e563e96e766e13c0a9c5a3a372059a44739bb696e853d71a6f6b08c491dfb9a.svg","flags/4x3/gl.svg":"flags/4x3/gl-612e560dbad68d540be672b80e22c54db43d6e2070523e81c156ccd6b3fc4260.svg","flags/1x1/gl.svg":"flags/1x1/gl-a9bb35d2b9ff27638658d9ad6b9e2c4f452072b9a80b508d32e76d37bf62cf6e.svg","flags/4x3/gm.svg":"flags/4x3/gm-4a6f9670a41548cceaced2b728e4bc56acbc4a3ba5544e7a097f7dae7a8bb045.svg","flags/1x1/gm.svg":"flags/1x1/gm-b67f9f6bce2f8c8700c198de8bfafac72d01b8a1e55b77f71e8cafdc58f8af5c.svg","flags/4x3/gn.svg":"flags/4x3/gn-873b4eb52f34c7558bef93cfd1b82117b5c32c9fbc0610f8821ccd22f28abe28.svg","flags/1x1/gn.svg":"flags/1x1/gn-72f51dc30cf0ed5459ad0f239cf3043eac05ece75945bcaf4ea6653af868c504.svg","flags/4x3/gp.svg":"flags/4x3/gp-4559cad3eb2d173214161d16b0237c68f5c817749a39c862fa7b23dfb4aee923.svg","flags/1x1/gp.svg":"flags/1x1/gp-d6669532054db5b7e441f4858c28920246a65ca3e8a15518c64c7bbb4f9c6416.svg","flags/4x3/gq.svg":"flags/4x3/gq-0c8dfe7f9543307056bbe6d6e44a16c17201228e5344d5afec1ccf1b9a5eb2f9.svg","flags/1x1/gq.svg":"flags/1x1/gq-ecb761e6db59b9bf8ba37533eaf0c60b7fcc7c0dfa2fcf281ee84c970dcb10f8.svg","flags/4x3/gr.svg":"flags/4x3/gr-4a4086310397bffa682d439be8650a9e28d94e32963b6411b61435292ac4cf80.svg","flags/1x1/gr.svg":"flags/1x1/gr-0cbd171892c0568b055d3b6585d58ac13dd60dfbcfad16eda1f4f9ead11dd16f.svg","flags/4x3/gs.svg":"flags/4x3/gs-e45169a93a9e94c15f5cb765a6c863319171fb9b4dce56094411829cd688d486.svg","flags/1x1/gs.svg":"flags/1x1/gs-3efc9e1b32961f9aa9d7faa2626e596282b63d049f6717c2378b28e3f508e79a.svg","flags/4x3/gt.svg":"flags/4x3/gt-64a7345cf66facf7f323d2142aebb4172191108a78ac7493b1a6077b78ac8ec5.svg","flags/1x1/gt.svg":"flags/1x1/gt-436a2af3d95cf3cb13ded897f319cfd6e2c087d678ad0e971c198b0d2c029911.svg","flags/4x3/gu.svg":"flags/4x3/gu-f560822ee237e5277829e63613a615a2ee3d8cc6196dffffe0f0d56a49b11c53.svg","flags/1x1/gu.svg":"flags/1x1/gu-a71c9d290c66c1a0929b05436dc6a8229b1147d7cc62336e04c9adf697030450.svg","flags/4x3/gw.svg":"flags/4x3/gw-0dc9ec17735ed605b68672947ce55c49a4ec1551491ccd121f482c1875cdf219.svg","flags/1x1/gw.svg":"flags/1x1/gw-7868c305e4a64b0d8ebfd3f7cb8c881841d71a7e0c3ead2683fe503c80de0674.svg","flags/4x3/gy.svg":"flags/4x3/gy-c9126e544c62508abfb898f0af0bd79c46f4c767c9ed6f928418a24b0f246d85.svg","flags/1x1/gy.svg":"flags/1x1/gy-0e3b849ce460f8ab1ec7cf66a25be1ba91e89b72d8b0aa679a0553464f37a972.svg","flags/4x3/hk.svg":"flags/4x3/hk-cece9126ccbf9151feadfed75791ebf32d4a16beab12f182404519d0cc24eec7.svg","flags/1x1/hk.svg":"flags/1x1/hk-9fad00e06f9034877149394914baa2bc3292223b0e32df2b1f9399d4de6e167d.svg","flags/4x3/hm.svg":"flags/4x3/hm-4b4923b81da24d62ebf31a9bc0addf76beef84593374b1cbd03ba19f3b12e3e9.svg","flags/1x1/hm.svg":"flags/1x1/hm-776c822113a22e83581234d05f40bfc0ed38b60648d87f513f3da3fff96ffb61.svg","flags/4x3/hn.svg":"flags/4x3/hn-855c830786283862a5f399e0d69dffe52b6223b91b32e31b55d55c82f2fa32c9.svg","flags/1x1/hn.svg":"flags/1x1/hn-64c38bac9403417c4e276bf5536d284fc5410fc04b80acd39a961d298f430dbd.svg","flags/4x3/hr.svg":"flags/4x3/hr-c8cad861f7398a22b9d27ea682d2778df0dde8e146d30142b5294daf988854af.svg","flags/1x1/hr.svg":"flags/1x1/hr-60c093df6760e4cc6abe26c37a52be3b51458f02712f18e11f08b07dc623b489.svg","flags/4x3/ht.svg":"flags/4x3/ht-fe81da06228fa36e7f211bec0d9f0c020f5b9c7f81534b4cb2251848aa276b16.svg","flags/1x1/ht.svg":"flags/1x1/ht-dd0197c078859c5a66ff3a51d3a3f92809768e36bfabdec0fc0ab60d068afcd9.svg","flags/4x3/hu.svg":"flags/4x3/hu-9aa998e636687aede491e307f3d068dbe58f2d90bfdfaec0e7ad03baa5b36344.svg","flags/1x1/hu.svg":"flags/1x1/hu-06858d0fbd4320496e849010e35c8fe82eb618188cf6ec329aef93f5e7af1c23.svg","flags/4x3/id.svg":"flags/4x3/id-775dbfedd6533afdf5bd017ccc1ad4f8f4238cbe87393d9c837a669196f17293.svg","flags/1x1/id.svg":"flags/1x1/id-3920ce662a7ea937b2c11707d8e1f53db52611dd004edf753b0389ed490d9d29.svg","flags/4x3/ie.svg":"flags/4x3/ie-6368a1c92440fcf80d3c35607543bcaa2d4662d6e0bc7acf6749ddbc418a72c0.svg","flags/1x1/ie.svg":"flags/1x1/ie-1997e9de640fa764677aa8f5d52f7888bb24a029160e8f67b06dbd043b4f11b3.svg","flags/4x3/il.svg":"flags/4x3/il-d76883a2330f9a05a4a64990ba955fc1be90bb46bcb19ae548c21816e7e74178.svg","flags/1x1/il.svg":"flags/1x1/il-f5e643d0e10169a438119dc441ea3100b52a2ff569bbb3a3ad6d1131b47602d8.svg","flags/4x3/im.svg":"flags/4x3/im-bbae8aa9dd129f8446556afe4904194ad43377d882f9a705fcf1da2bdbfabccf.svg","flags/1x1/im.svg":"flags/1x1/im-767d72c2e72d732d65c9b016adad983778dfbbb2b5b52e71830f4e41297728d3.svg","flags/4x3/in.svg":"flags/4x3/in-519e33321b8b2ba70a0b7557d66c62d7efdc9723896c49f82528b107028ffe29.svg","flags/1x1/in.svg":"flags/1x1/in-27831f76dc6a218a529b6e5d0eafc4c19c999461327b7c013f59226c0601a361.svg","flags/4x3/io.svg":"flags/4x3/io-8d25a8e98f682199b413adfbcb6898c37058c9bae085e427fbab03d56e8c0de6.svg","flags/1x1/io.svg":"flags/1x1/io-627f3b0cef72fd91ff426d74a007dc32d74c9fe677cf2c8355cba84359e16fde.svg","flags/4x3/iq.svg":"flags/4x3/iq-96b24d1439184d0a4c35ca7cea65e5f20469a0e8c8438963aad016e59c399cc6.svg","flags/1x1/iq.svg":"flags/1x1/iq-af04db139f8c44cfe0c612e2c05e848ccfad88fbbfcb58e88cdb7c80db365669.svg","flags/4x3/ir.svg":"flags/4x3/ir-db2c230d355ade2b1ac235ec647bb1535e4703c639a44f9ce112473272ee1019.svg","flags/1x1/ir.svg":"flags/1x1/ir-c648cbf56fc8f324fda477ea816783c9df8a7d398f45f5f94acc1c16c8877b63.svg","flags/4x3/is.svg":"flags/4x3/is-29508693138977229758b0f322ba34e90dbcd7a8a74e8820729933d24051d9a7.svg","flags/1x1/is.svg":"flags/1x1/is-b1c5db1d4b4853b8144f1d88ababbf14fc88752340457ba3e2c94ab5d54c9c01.svg","flags/4x3/it.svg":"flags/4x3/it-d2c168050fc509adac1163b097b0ed409217560735b27802ae9259587c146562.svg","flags/1x1/it.svg":"flags/1x1/it-592d34fb666430fa00f98d333623d5efa3c8e0e65ac4eee06bbc4c1de7ce4bea.svg","flags/4x3/je.svg":"flags/4x3/je-b363a4e3a21630f10791c2ebeb7f918320816ef87c155d4fd29ce37982f4df35.svg","flags/1x1/je.svg":"flags/1x1/je-6d43f74e30e099bc056da925ec34c0200708f0a6e90da34db1e59d54ce10cfd9.svg","flags/4x3/jm.svg":"flags/4x3/jm-3d133fbc2564f29e036855e8be224d1579fe66fe49e0f5a2ba0bdcf3cb272823.svg","flags/1x1/jm.svg":"flags/1x1/jm-1aea8ea5d8cbc717fa3ef331d8caa9a1421c88a7bd076e40f8276a5b6f8d0467.svg","flags/4x3/jo.svg":"flags/4x3/jo-eee432339f8ea6750987e1121187eb4b53ec537dd7ccb240c018de63f7a92db6.svg","flags/1x1/jo.svg":"flags/1x1/jo-7969b2083c535c85b7e714b755459a6606940e0b5ddb1b71e24daf0a180d14aa.svg","flags/4x3/jp.svg":"flags/4x3/jp-2eadcfc67ba8cd50c1da86e08e6778e0102c3072865dab8c312cc88006da0abe.svg","flags/1x1/jp.svg":"flags/1x1/jp-551281a75e6c6fd64eb65b39f56102b52c182f6c38ee045c9422f6592f0f65c5.svg","flags/4x3/ke.svg":"flags/4x3/ke-45790bc3ec1ed8ed0124777a7c9e09163353b5af4ff70ae6604a61b53712df4b.svg","flags/1x1/ke.svg":"flags/1x1/ke-2cca24ecf024b801543c0572efc9969ffdaf25cec313e2149c64961839bc301b.svg","flags/4x3/kg.svg":"flags/4x3/kg-3879f8931d74cc9c5927261f4095b2bb786f3d62c803b2a96ec550a23fae9f49.svg","flags/1x1/kg.svg":"flags/1x1/kg-74318932808f85b72df308358f2f2699ab0cb7ab4f7ad3c84c4be4024f0fb140.svg","flags/4x3/kh.svg":"flags/4x3/kh-7409fab4ba4e676db7b5c61020b97893b1735fe0b8e39e9b4f96108400be704e.svg","flags/1x1/kh.svg":"flags/1x1/kh-2603f6a61b400cb12b87397eeba60ae1707511467d5e0c430c05809bf89e5042.svg","flags/4x3/ki.svg":"flags/4x3/ki-617c1b52f3d9aee99d094edbd1775cae77aade266a1318eb4671b2bb1620ded5.svg","flags/1x1/ki.svg":"flags/1x1/ki-74615266b440a24f09abdeae3853d7e1111f0eba77df71ccd176d83fbd1fd9ad.svg","flags/4x3/km.svg":"flags/4x3/km-0c9bcbf7e677a541fc8dff6f848c9d92b6982ac2934ae75faa56a2b846bb5698.svg","flags/1x1/km.svg":"flags/1x1/km-81b0fbe53d09194270e8ed4cbe9be8eb1ae727e77957005369ad8bdc651dd1c8.svg","flags/4x3/kn.svg":"flags/4x3/kn-0442f55f81cd3b1057c609301f0af2b503d89a895a954af8c970df997e92bd03.svg","flags/1x1/kn.svg":"flags/1x1/kn-897c34ef54bee486f0d24d2191e2400f49a19d98efb19f8c3f1a27fb0b97131a.svg","flags/4x3/kp.svg":"flags/4x3/kp-a54f7201982b29530381b71a5e2a11c1153860f22c04c0a2d91bb0d20fedf78e.svg","flags/1x1/kp.svg":"flags/1x1/kp-758eccd89ef3707808fb68d931f086e49333904f4cc67c88468f3c96fb43b7b6.svg","flags/4x3/kr.svg":"flags/4x3/kr-c0b9b2c854133410c0ad9cadbc10b1e0bacf0305519883126d55bfa3214f9d06.svg","flags/1x1/kr.svg":"flags/1x1/kr-7c0457ac5d284b28b742ea2e061a1aa2a35f63171e464b3a7eb501a48756ce7b.svg","flags/4x3/kw.svg":"flags/4x3/kw-81c3d5d25c7b840ef14783b51d18c6b7cfc61f94932c664bbc9e5879fef020eb.svg","flags/1x1/kw.svg":"flags/1x1/kw-66670211a67a4e61d4652a19d821dc5195f01a28a3a9b28b7e4c6048cd86b19c.svg","flags/4x3/ky.svg":"flags/4x3/ky-0f4ab66d951ae33f800d680aaa5704804ba9c8844d4d80e5bee2e3fa0e100af3.svg","flags/1x1/ky.svg":"flags/1x1/ky-fb5f57bb58b74d23377bad9954a75ab88d1587af68546ce137a6ae7a88a7701e.svg","flags/4x3/kz.svg":"flags/4x3/kz-39edc952c598c71be2c9510944a8faf708d8e4b367b5ad78a688d1cd37f522eb.svg","flags/1x1/kz.svg":"flags/1x1/kz-924c04dc19267b049f35213af0e2b0c540933c06389433cb4aacd8dda33b286c.svg","flags/4x3/la.svg":"flags/4x3/la-e3a36a3bd0003442c3a21d3a192995fa6fb3b3c08a2daadc8f38f62736b5b1e3.svg","flags/1x1/la.svg":"flags/1x1/la-c9d4223a897e5e2938a4892bbc593d3828093b9439fc3f6de21520e4013ddbc5.svg","flags/4x3/lb.svg":"flags/4x3/lb-508c2a5a9b50d604895675b9f1c1e5914c394a7f468f5d823eb0476acaacbc7f.svg","flags/1x1/lb.svg":"flags/1x1/lb-10c9ba8ea7aa3189f16a7273c837982a887fc4ddfc9d514d8f5a660d72356f7f.svg","flags/4x3/lc.svg":"flags/4x3/lc-04ccd92fb1578654181febaea30ebd6b6620f56115730b2a2d673c712307bf5c.svg","flags/1x1/lc.svg":"flags/1x1/lc-4ffb53afb8bd296d526ac26fd8007afc74855e92833a893d3c934a5d12eb152a.svg","flags/4x3/li.svg":"flags/4x3/li-3058dc4aeaf2bd2da8cb910892137d732b56e5e9d342e565a4059de1a8e40e40.svg","flags/1x1/li.svg":"flags/1x1/li-0780a4f218b9ee466e33d14274b8a01575a86b3787b347e3269a3b301c220d5f.svg","flags/4x3/lk.svg":"flags/4x3/lk-a13d6ab1da51be3b1d2c5b80f4d866c923d42b017e197469e1bfc0dd021c4bfe.svg","flags/1x1/lk.svg":"flags/1x1/lk-99759363f0df6b868fd1398bf05666c680bafe1eeec8b859b64d450930213e02.svg","flags/4x3/lr.svg":"flags/4x3/lr-b06a1d70899826b305ce387fa31e1fa0bdb3bcb17c1392f15f995ce1dba723cf.svg","flags/1x1/lr.svg":"flags/1x1/lr-820a9d023e5b1e68ed640bfaba8f84ad4379c42a6c5c982cb76b0390dd2bcbdd.svg","flags/4x3/ls.svg":"flags/4x3/ls-d02bcefe7c298c153665f35c33eedb08e2e2b345350e4bf1714a87abf86b2d0e.svg","flags/1x1/ls.svg":"flags/1x1/ls-85c731c313a46db12bdb27fe229e9f7d052b447c624663b73ffa1dbab97f03fb.svg","flags/4x3/lt.svg":"flags/4x3/lt-c08eb18a15d2003cb544432b11c5081d3d5741370669b4df306d1c6bce14cb51.svg","flags/1x1/lt.svg":"flags/1x1/lt-c1bd7e3d289ac9b0df06d47237780eaf4d30f01281ed50a7df9a22bc3a2489c5.svg","flags/4x3/lu.svg":"flags/4x3/lu-99e7b6adb3a9e0f867b17eb3b1f0f33db92fd27cfd7b651f62453f359bace22f.svg","flags/1x1/lu.svg":"flags/1x1/lu-ab544445f16afa450549288ac86c2cc9a458a9d7747b3a89d5ecef7db9c83ce7.svg","flags/4x3/lv.svg":"flags/4x3/lv-f8844d50b89f0369f73d580d3676553e7e55dd8ab2460e592a29a530d9bed886.svg","flags/1x1/lv.svg":"flags/1x1/lv-baeced49dd4249e36a25b0f23a5c601a69e9dee3137627cd4450194b85a99dd4.svg","flags/4x3/ly.svg":"flags/4x3/ly-03209121483967f9d74849fb9261de23e9ff2e02c4e40b29f1cda0631b8a5fae.svg","flags/1x1/ly.svg":"flags/1x1/ly-1e6e070aaa4bfc97a5a446a39bf746ab3c4c81d9f62c975cab164e16de3a3ffe.svg","flags/4x3/ma.svg":"flags/4x3/ma-9a25cc7c2868fa45b251dd1b99a0be3b583df69732146142020fe9c6c0c95b63.svg","flags/1x1/ma.svg":"flags/1x1/ma-4f18b9c355b8b8bf0db69badb235a183dbd558deb6439bf03b4f18e56837a7f3.svg","flags/4x3/mc.svg":"flags/4x3/mc-b0c50599ea2a550680a6a867579930e0b47d3e05193a7294a26b7849a7ad35e2.svg","flags/1x1/mc.svg":"flags/1x1/mc-8f1fe6210338399d8791d91f39234b1a09acf2aa5e0387696048dc7068534a28.svg","flags/4x3/md.svg":"flags/4x3/md-8849eef7bdf916e962f7bb31af87c8d47aef33f9f4a2017b2ce55c4166e79643.svg","flags/1x1/md.svg":"flags/1x1/md-43f1bb4157545abe6e79215459efb548d913bbe7922078cd40cb722a4e19d9b4.svg","flags/4x3/me.svg":"flags/4x3/me-983d452d43cfb8d628bfc5c0cf4991c2ba3cf0e39e70aa5353cfd4e9ec3da62d.svg","flags/1x1/me.svg":"flags/1x1/me-104d6a96038ef06d3d8b89c9221996f3649b5b821139b11b2e07695b0f6fda2f.svg","flags/4x3/mf.svg":"flags/4x3/mf-31fb851bfcc2340d2fa43e86a099cc7becfc8e7f996a4d2ca56bd050e6537086.svg","flags/1x1/mf.svg":"flags/1x1/mf-fe20ce9bf911631d6e79edf21c8cff0716f2dc1ffded39515735444d9a66fa55.svg","flags/4x3/mg.svg":"flags/4x3/mg-5effe963e29f804a26f95dbbc9519add454a0fd9eb918ddfeb55e1e99a1a2701.svg","flags/1x1/mg.svg":"flags/1x1/mg-9e546cfb78810d9b25c814a84aadd6907880b8e0cdd2e4e30738b519e7c1ac91.svg","flags/4x3/mh.svg":"flags/4x3/mh-d8cfd123007dbb99aa700c335957926a6d5e877ab49680c79629a32716d7a782.svg","flags/1x1/mh.svg":"flags/1x1/mh-3fe03d4d063a4729fc8b68fd5e9d7d2eef6e65c4e82954c83f76b138cea2eb45.svg","flags/4x3/mk.svg":"flags/4x3/mk-6e8071d15f2ff125d30bf89d000dcb47db9545cf9b7ff04f1474650ec2f4d25c.svg","flags/1x1/mk.svg":"flags/1x1/mk-fdc9212f9f311cbface56b6587468a2e845111b697edc11b7edda9fcf100c1d5.svg","flags/4x3/ml.svg":"flags/4x3/ml-a730102e0c6f6362de9c10ef8da6cf7b123465d01a297e7a89808b01fa4771cd.svg","flags/1x1/ml.svg":"flags/1x1/ml-a661355da206b0cb7ac4c84b6cdf7e411fbca8fcb271ae999fa60d5c67578192.svg","flags/4x3/mm.svg":"flags/4x3/mm-6d0d207d662477110f2b863488088818d8400386358dcbc669a2d8c54d1bae16.svg","flags/1x1/mm.svg":"flags/1x1/mm-de7d46b6543343af61ba997045cb41a707bd0db1e7a5879971ca8fddcbdf9e99.svg","flags/4x3/mn.svg":"flags/4x3/mn-656eb51e88bfce82401e4080eb791ddf16d571cbba102cdd4316c5de4711ac65.svg","flags/1x1/mn.svg":"flags/1x1/mn-ad22cb2c195a7d8ca8e4174db011d5f58238ee25039b5b2da2649d8ca8b00123.svg","flags/4x3/mo.svg":"flags/4x3/mo-37a1088aa687af13951bc93886e3e51cb246eccfde1b56528f189327ea291792.svg","flags/1x1/mo.svg":"flags/1x1/mo-b463a1c37b69131d662e3fb2ae937583458824a09bcf68fc7ed2d7fd729138d1.svg","flags/4x3/mp.svg":"flags/4x3/mp-ecd12cadc358fdf293e856c0a3ffc09409123cabd3c7201225b2d21b59551e14.svg","flags/1x1/mp.svg":"flags/1x1/mp-d1f4ba10c1409e713253f1fbb107eeccbd4ec1a8f9036663f1ac1991aee53835.svg","flags/4x3/mq.svg":"flags/4x3/mq-b4e1b08a93c1364c79e6d61f95b16fca5b884da6e77835bc0e0adfff8ecc2d7f.svg","flags/1x1/mq.svg":"flags/1x1/mq-19cb6f7cb7354c3fd40e987c93a2d76329d34b2ed3873c3f25fe56802f251ea8.svg","flags/4x3/mr.svg":"flags/4x3/mr-9f64af3ed5c6d8d1f68b5cb09fd1aa9d28c3c95107e063f64a0ef95f0cb9429a.svg","flags/1x1/mr.svg":"flags/1x1/mr-0e79b7bcc669bb871d94021db2b78b162b9867c7eaf934d8f7a3025fd5903576.svg","flags/4x3/ms.svg":"flags/4x3/ms-32620dd70353777b2ee62951556976f398cd38ae359b5a8c97311a1dc61eb8bc.svg","flags/1x1/ms.svg":"flags/1x1/ms-4104d4f36cb5cf1c6de78e52e90bc3c5b8bfa262617b16a737673feb8c30a00c.svg","flags/4x3/mt.svg":"flags/4x3/mt-0c9819aa69b34b84c1ee43620922737122eb38f107be9864a0690ac66ef8aa64.svg","flags/1x1/mt.svg":"flags/1x1/mt-3c3fe71f2a2bf0d961fd145ad7e48ca1e9d3a05cce514354714ba4568503d106.svg","flags/4x3/mu.svg":"flags/4x3/mu-c78c23f1499756b9db762ae434ca354d1481447fa94c66bc10aca9443b399059.svg","flags/1x1/mu.svg":"flags/1x1/mu-91ebc79d0fa306127ea8b7a33f77d5b28f35c516ea91ff0468c7344dc838db69.svg","flags/4x3/mv.svg":"flags/4x3/mv-a17c947e17adae6aacef01a3e131c4150aa094911b53fbaead41783683e008eb.svg","flags/1x1/mv.svg":"flags/1x1/mv-d138e94d9d2ed093ef1425c1164493b780202f9a7f7937241a7b081b79ff8b01.svg","flags/4x3/mw.svg":"flags/4x3/mw-21f116afdf71df80e3c59084c6ba640814fa5389430328ff55c9403b5c239632.svg","flags/1x1/mw.svg":"flags/1x1/mw-5c2228d3f1cf1f9cf8cb158e813202981828c11e8caf117836fc57fa6bc1c788.svg","flags/4x3/mx.svg":"flags/4x3/mx-a235f9b16921590b7e78caa6f76339361356946eaf0046badd10732b4647c0b6.svg","flags/1x1/mx.svg":"flags/1x1/mx-cdab01ebcdccc020ca16e1355ef1fd18ca0043b501f399ca8edc48adfa8c7292.svg","flags/4x3/my.svg":"flags/4x3/my-0ed63574cf5f20c0663ab8cd1f700e150fb641fd0b93602ba013abbfaae5ee59.svg","flags/1x1/my.svg":"flags/1x1/my-5e8d31ef06ffc8af33a5616d760592ecd022c52afc8ba33c721f1e4989da0628.svg","flags/4x3/mz.svg":"flags/4x3/mz-752e2293917b1d2ece3f097104caeadf6a679054a779e9d3be8e49dc324bb88a.svg","flags/1x1/mz.svg":"flags/1x1/mz-300cba975ad43c962ceca0d266ded1fe3d21d6b4d701d657fb42b27268ea2964.svg","flags/4x3/na.svg":"flags/4x3/na-a0655a2e70751278e6a60d31e818f672864a6e68e8b3d3361b2fbb70fa9bfef8.svg","flags/1x1/na.svg":"flags/1x1/na-1ce089a189db5be15eb05df8155f9bd017b61fc1a497e5b3021ff2ca664e122d.svg","flags/4x3/nc.svg":"flags/4x3/nc-0c7171d91c44414ed69808611db588f1283ee7e34ea8a74a9a5101ba4b1cb305.svg","flags/1x1/nc.svg":"flags/1x1/nc-d3a1629f06dc3200af7669f2d895fce1908d2c1ca02d71e530bdfa6646a9516c.svg","flags/4x3/ne.svg":"flags/4x3/ne-2b61d30a6cb4554535538e3b753926853e8c629a494a347286b9731c803548e4.svg","flags/1x1/ne.svg":"flags/1x1/ne-9c5f798ccd7d3dd3771ae628b4a39dfb2a4578fefd2e006f3ce89c3e494d0cb1.svg","flags/4x3/nf.svg":"flags/4x3/nf-4e615baa83a8b4db3e39fe1d251ab913943d64e0cd320f251d619ab54e7512d3.svg","flags/1x1/nf.svg":"flags/1x1/nf-45403247c90050484813acf23c50f543779528e346317274373c3c24fd830103.svg","flags/4x3/ng.svg":"flags/4x3/ng-d52fd188be973f31dd34e5a0b3fed0de68fe736c8a41c6028d9c248c038c8641.svg","flags/1x1/ng.svg":"flags/1x1/ng-f22edcc5867554d69ecbe15add0fbbb1389631f3ced07a4f820065c7770c65f5.svg","flags/4x3/ni.svg":"flags/4x3/ni-2fbb883e46fbe3b2ecfed9dac004ceb546f25c77a84a5966eea224674aebc610.svg","flags/1x1/ni.svg":"flags/1x1/ni-214aed148b615c4846f842b47f99cf178ac62a96cf18c5dd6b23467184b56680.svg","flags/4x3/nl.svg":"flags/4x3/nl-4f0ecea529dd4c0099dd41a7801fa5ac44aa04cd872ca31e11efd58b5a813774.svg","flags/1x1/nl.svg":"flags/1x1/nl-9c8f60e638879d642487818975e58c61cd3102f0e68c360708243c076436ff68.svg","flags/4x3/no.svg":"flags/4x3/no-270f7ee9d1d2efa6abf16f693faba8586adae842d79d8aad9e3f37e96c27cbce.svg","flags/1x1/no.svg":"flags/1x1/no-7d377325e8c5ec4de0376e9f4c13463f183af637e6c443716f22020c7a313979.svg","flags/4x3/np.svg":"flags/4x3/np-69637ddb3a173c4522a71598278aa32462e1762e34dd99c9dc99a515433a6cf8.svg","flags/1x1/np.svg":"flags/1x1/np-44ead118cce3a1fcbb720cc8d6eab6ecb6b62292315f61ae5963a40262ee11d2.svg","flags/4x3/nr.svg":"flags/4x3/nr-0bd3c0ba7bbac4bd5985b838096eeebd67711d39065619ef092fa4bb55b22a6d.svg","flags/1x1/nr.svg":"flags/1x1/nr-63b9c44e5dd66a59895f52707dc24db5bd1eab6e535298d24e414c0f2dafcb3c.svg","flags/4x3/nu.svg":"flags/4x3/nu-259989e1eea0cbf6b41a33176a4c9c1eaa2e7ae6571ad80a324c6309bd5aa5fc.svg","flags/1x1/nu.svg":"flags/1x1/nu-1cb535708f64ed8b386a245e571e677e935009af92f2b214760a2832c1ee1b53.svg","flags/4x3/nz.svg":"flags/4x3/nz-90ceca2a683fbec395a91b77b0880cea99c3b2cbdb24caa5474925cbdcc3675e.svg","flags/1x1/nz.svg":"flags/1x1/nz-b0d78f165a72edd46599222a2ea5f6a91a8252975cb03e33c4ca08e389859aac.svg","flags/4x3/om.svg":"flags/4x3/om-aadcca7bc7ad318400097b84849dd64c4744306cd9b4f152fba34f2e84116965.svg","flags/1x1/om.svg":"flags/1x1/om-705e2bd2b2fc7d13c152aa06bfb9e6ee4ad8b299f8c06ca16adad0b18b2b18ed.svg","flags/4x3/pa.svg":"flags/4x3/pa-027e679bd65dcaa2c53145a14669c1e674a467a889ef702cbe2a260f7ca8ad38.svg","flags/1x1/pa.svg":"flags/1x1/pa-edeb4faeadaa286de7fdc667e25d38ad0cdbccaec5023182fed6a3c74e8b09eb.svg","flags/4x3/pe.svg":"flags/4x3/pe-7ec59842737c90d6ff543f1831fd69b51e1e7ee1b068c3ac6259cbf2c214d611.svg","flags/1x1/pe.svg":"flags/1x1/pe-97d1b8ed1d4ed5e5f0348a731ca4a3a4b9abc7d440447dc87a521f229f375ed3.svg","flags/4x3/pf.svg":"flags/4x3/pf-27955c73c5be4043c5b7ddf64c8f46d11c6648e3b1fc0efe028b8afea21a40e1.svg","flags/1x1/pf.svg":"flags/1x1/pf-83e3e1d36fba45e015c62f938e6d182029edc05ebfdc50bcb33860f36f96d73a.svg","flags/4x3/pg.svg":"flags/4x3/pg-c2fdd2551f9044c461eccfae2d7ba0a347a99143f6002b71a429942af0217897.svg","flags/1x1/pg.svg":"flags/1x1/pg-cf60257fa85f9270b1e9980e703435186110167f76c153bc460c10ee8b2d4b09.svg","flags/4x3/ph.svg":"flags/4x3/ph-bf3394850a6cec6a535420eabce263e7f8193413e4af1fb317c76da025388c1b.svg","flags/1x1/ph.svg":"flags/1x1/ph-006c3218effe4269252cb9638de82ea339eb2894951705c630533ceffa842169.svg","flags/4x3/pk.svg":"flags/4x3/pk-b64f6a32e5bb598f57cfe49c4899c2021f2d153653f3d92101e6e11b2158e500.svg","flags/1x1/pk.svg":"flags/1x1/pk-d2d58def913c9081c5eeeda5f0b6895068ec13c955694e359531e23422145e60.svg","flags/4x3/pl.svg":"flags/4x3/pl-f55a710991a94c2e6c2f9f1a7a4a36ebb84b24b7c9d9df4e1ffe86d61321fa6f.svg","flags/1x1/pl.svg":"flags/1x1/pl-fafb539259385f2b99df910cff085710a9b4d9706b74e4e0f8a6ef627615c4e7.svg","flags/4x3/pm.svg":"flags/4x3/pm-8f6338d2ae3e0e42adc9754720ca21ad4979095cf6d7467a8db5a5a1c3e0b2a5.svg","flags/1x1/pm.svg":"flags/1x1/pm-63029c6198dc42c404ec39807a99528b1d198eeeea6f9a1e309548242480140b.svg","flags/4x3/pn.svg":"flags/4x3/pn-4006c11ca83011c0dd60a13ac30b27da0578b9f1368bd8c6de5aab423f6662d8.svg","flags/1x1/pn.svg":"flags/1x1/pn-6c433f7f9cb79c6d5ed7bbeade8a495e3b26ca2604f4fd3995096109684ac5dd.svg","flags/4x3/pr.svg":"flags/4x3/pr-6287e1515fa80e2d05133ed93f14ca03a1be6909a9ef6c736fd60f9c9fe73132.svg","flags/1x1/pr.svg":"flags/1x1/pr-526985b3a6d2d6de577ed0ed92d0b49ce854667e3ff630304813fd5af15527cd.svg","flags/4x3/ps.svg":"flags/4x3/ps-31f50e1fcb44b9aa6e9ce4473c3085f744e70ea0fa1fd8d85787f4e7b0c4a69b.svg","flags/1x1/ps.svg":"flags/1x1/ps-c43918bc71bef71b24dd46e8cacc53e0df53e02dcce6199d06d11a4637f08a04.svg","flags/4x3/pt.svg":"flags/4x3/pt-9aab20caed714ee47fc408f017037aea94a649b3ba4d87e2da37870ee31e4f92.svg","flags/1x1/pt.svg":"flags/1x1/pt-a309869e5018c9690a65ebdf8a2d69d61f82772068a7920f9680ed0581ae5966.svg","flags/4x3/pw.svg":"flags/4x3/pw-9262037d114d0f61571c74f9a5455809709b43e6565443ae2667981eecb5f12a.svg","flags/1x1/pw.svg":"flags/1x1/pw-a6f42019653ae26d43c6e9b7bef83fc98cff8ec5e8d0c50ad7cb0a17d5e565a6.svg","flags/4x3/py.svg":"flags/4x3/py-5bc9e9f0dee94ae3d9bd80ae6fb1aac297dc81a1c592d0a73bc3383bce73af74.svg","flags/1x1/py.svg":"flags/1x1/py-182eff300f4507fd9399fb6310d1cd3b45adadd7924ad2814003c7111ec5c0de.svg","flags/4x3/qa.svg":"flags/4x3/qa-32c93970f8e521850eddfaf2a89dfff987f0ae3b0b73a253c301b61cf547cf9e.svg","flags/1x1/qa.svg":"flags/1x1/qa-182e4d8ace2607d0c02d3c29d65eb084af71092357006bc41cd601981ec3b81c.svg","flags/4x3/re.svg":"flags/4x3/re-8b2ea1f2727c266a2b80cb12a9b7195f6b656f521552b67893b6761a07f9bc92.svg","flags/1x1/re.svg":"flags/1x1/re-07eb7d855022bc678b47b0ce5fd05da5044d6dde86ad3697d4ae55c68ff447c1.svg","flags/4x3/ro.svg":"flags/4x3/ro-4ab797571e1d9eb326486f75654a4590fd33f20444f85b77ba0997eb6138c21f.svg","flags/1x1/ro.svg":"flags/1x1/ro-ddfcbaec04d11bf7f95abebd1d3a42b2862b1af8fca9b02764a6ed0e409a1d75.svg","flags/4x3/rs.svg":"flags/4x3/rs-dd8a52473ea40e23b393b5f4a30d1edd91865aab167f0c1835ae84b15dcce585.svg","flags/1x1/rs.svg":"flags/1x1/rs-42bf40209c92e4e7169daf29fbcb7253b2804eee7a463051529327f38851f865.svg","flags/4x3/ru.svg":"flags/4x3/ru-13f4525a4caad6e31afa523d2bc4a0c1e6377c0bef1bfd872682130d3f199d1d.svg","flags/1x1/ru.svg":"flags/1x1/ru-b9792a963faf667447e0456dba5be80a3b37c197a4284d1539a3433721d9e2fe.svg","flags/4x3/rw.svg":"flags/4x3/rw-bc38bcd6e19d2941839b253af6e863b13338cde1174874f9674471026c15e422.svg","flags/1x1/rw.svg":"flags/1x1/rw-456698123775b83d2b0fa1b9fe073f9ccdba0b6bf39a703b8979dcce158eb32c.svg","flags/4x3/sa.svg":"flags/4x3/sa-2b2fd6abb48415d5407c576c24a24fbd80af5877ef06cf2d026452f6c67f5f4d.svg","flags/1x1/sa.svg":"flags/1x1/sa-d9ebc73e7957f86604164dd5054fb32601ad14d7dfd4bfe73da5bdd10bb2f8ae.svg","flags/4x3/sb.svg":"flags/4x3/sb-37761927039d0a37ba0995c59fd31bbe36c8a0ca161e5b72b8131e3659f8dddf.svg","flags/1x1/sb.svg":"flags/1x1/sb-bedbf8464cd82f391bfe6178c63055b650d0cf3aee60c37fa79a586f95783b79.svg","flags/4x3/sc.svg":"flags/4x3/sc-f6a2f8f37be93f07600b491b52cb58d80d74b92d8ace0af313f4ce081b0d1345.svg","flags/1x1/sc.svg":"flags/1x1/sc-5dcd01b98c34460c9624280fb5047811fbae7d976620cd0a70ad4263a9085b60.svg","flags/4x3/sd.svg":"flags/4x3/sd-cc9cf97e8a37622b9e1bad28811d46c4471595afa448dc055e0e3aae7687fe4b.svg","flags/1x1/sd.svg":"flags/1x1/sd-1f5d13f9780085acbaad13d959b1918c796ba7b0450954b15d145e87cebe045c.svg","flags/4x3/se.svg":"flags/4x3/se-84b06bcd5bd90ea8dd6d1c3c8d2799a843c47b0256ce098aef75414964618286.svg","flags/1x1/se.svg":"flags/1x1/se-39f128686652cf914f8601110fcc9ac879bca204407013b93aff4ca4fb2ed9bc.svg","flags/4x3/sg.svg":"flags/4x3/sg-a82acd90077e76318ddb0be96999d9695b9a9f4627e8a0f341d3987a62747dcc.svg","flags/1x1/sg.svg":"flags/1x1/sg-c22e093634568aae249bf35f9ddcaa6796b5f27d76c39ff5336abf7f1b8a47d4.svg","flags/4x3/sh.svg":"flags/4x3/sh-57470d9a75955f0fac605a94e853bab524c7461a4c025e809fb09db762ebe46f.svg","flags/1x1/sh.svg":"flags/1x1/sh-8d06a0fff61e51eb65357d138e00736545835b8649aa2694152f4cdc9f941c16.svg","flags/4x3/si.svg":"flags/4x3/si-289d6417f154323e7922df09ffc0f49ded31548c7ee8020c39cb85724ffbcea8.svg","flags/1x1/si.svg":"flags/1x1/si-ca40a5f4f38119d6f52ffd3ddb36af95951a2aa1fadcd897f5bc1641bb2e0051.svg","flags/4x3/sj.svg":"flags/4x3/sj-67d4cdd268d0c0cd93fc561b506cb5646cb508385c93ed350d11f94aa1c83833.svg","flags/1x1/sj.svg":"flags/1x1/sj-f7c489607033138039612d6abe7f4b0b4b6dada5cac75d78204f404a0d292b1c.svg","flags/4x3/sk.svg":"flags/4x3/sk-a0bdbb7f5d6998ffe9fcbc80bbdf0e6cff3629740d2ce1b8d61025e0a8b322b5.svg","flags/1x1/sk.svg":"flags/1x1/sk-a82a813b2d81af9be1aa775f22b2c2457d11e870e072d7e23957a11d0878faed.svg","flags/4x3/sl.svg":"flags/4x3/sl-be265bed24cfe0b25778201f251e52e4e721e3d319795875913805d1aea84ebb.svg","flags/1x1/sl.svg":"flags/1x1/sl-cb8bccbaa21957f006ed4ae0144da81c999e93bd8014023b16b500fdcdc397d3.svg","flags/4x3/sm.svg":"flags/4x3/sm-d7818df3f8f2d5dbed27dc5a0a80b1e41cdcd6130eeff221da58f0321e925f27.svg","flags/1x1/sm.svg":"flags/1x1/sm-6f87660dcac925bbdb036c79a0e20d3b208215d327be4c4764ae1069d6464efd.svg","flags/4x3/sn.svg":"flags/4x3/sn-b131b17a374bcfbd00d442d282fa52f0e4e0e448cda1cdfaac25a95ff56443c0.svg","flags/1x1/sn.svg":"flags/1x1/sn-d180d3ce9846966dee6a3d9433ede7d24801dc4311636aabd470ec5b8765d772.svg","flags/4x3/so.svg":"flags/4x3/so-3b5b77b371299478144a94b60c99524fb6b99bfedb3dcc976ab70185e07f399e.svg","flags/1x1/so.svg":"flags/1x1/so-50aa941f2d2954285ef9e5ac260cdd264a73cf2e4b0c627677f04141fff2afd3.svg","flags/4x3/sr.svg":"flags/4x3/sr-94d0f0aefcbdea8d7ba35648eda5037e99bf4126723ce36416582ea43b08d3e2.svg","flags/1x1/sr.svg":"flags/1x1/sr-3944d683068d437471725d22fd71ccbe6a63ae307ff9775690417d3bf262cf82.svg","flags/4x3/ss.svg":"flags/4x3/ss-f391e5002cbce83f97f7d1a11c284fa2e36a7d6dc734757d733656801ab17d0a.svg","flags/1x1/ss.svg":"flags/1x1/ss-853bd9f713d2f6b1fe540a82e8bf4754912da21575b3fe756b8741767f318f7a.svg","flags/4x3/st.svg":"flags/4x3/st-b52bb48a2c0800f5cb4b07bdd93c3908f77bcb6800be883ebf943bbd3d99d42c.svg","flags/1x1/st.svg":"flags/1x1/st-d8b5b1c8b9fe947086a4d277d2ac5d6b9cff188dfd37bda66c8bf5e02c5facc8.svg","flags/4x3/sv.svg":"flags/4x3/sv-6d02d63c7f04c9388e98f892cc43d8daa2110fc84242758d5627fcd247bfd09b.svg","flags/1x1/sv.svg":"flags/1x1/sv-fb4c8d7eb98396a93c5b9c37195d70e809e0d71d8b8f9316e842121f95bb82ea.svg","flags/4x3/sx.svg":"flags/4x3/sx-fb6a7b1cbc5b29eeeb39a5aec64ef7aad432c37bbe848d29955a3786b9763224.svg","flags/1x1/sx.svg":"flags/1x1/sx-a37b124212f8530b921aef7657cfb35c2895a731c7a06f333faee4c93f32806a.svg","flags/4x3/sy.svg":"flags/4x3/sy-e35f8d88c864ed4f38edb2f9f96d5bd69f6df078b50515b8c5467bf6b1689f50.svg","flags/1x1/sy.svg":"flags/1x1/sy-5d537bd5b42b58f6e8a7e33fbe5942a16126abb639edf9cb58b88938c57ebaa9.svg","flags/4x3/sz.svg":"flags/4x3/sz-c65ae592e943217787848364bdb4c57335869f4626ce705adabdc2620669c1c6.svg","flags/1x1/sz.svg":"flags/1x1/sz-dd3d1c65bdf09317553f205e588e3dc7336acec1cb9315bfbe0f5bd8ca5bba3f.svg","flags/4x3/tc.svg":"flags/4x3/tc-594b6cc87040836c6d6777afb5833d565d3e5e75f404350a51443ec4588a1ccb.svg","flags/1x1/tc.svg":"flags/1x1/tc-34a37006252eea340488220585c31d047b57e3e7934c77180d930972aaceadc3.svg","flags/4x3/td.svg":"flags/4x3/td-b67a1978e3badb895ff640c80bb6c0e33eac354220c08cf3fc93d62bf5d685a3.svg","flags/1x1/td.svg":"flags/1x1/td-556b3a7991c17010cb7e1ff23c4edcc2dcdb8c406a128d407fd165ea8a19d311.svg","flags/4x3/tf.svg":"flags/4x3/tf-35cd83351521f3022a43e01f0c40f34663a66ac1e92045979f31d3fd65c16d02.svg","flags/1x1/tf.svg":"flags/1x1/tf-485e71f61ff577735dbc4ba1025515c22a83c48ee7f3a2ed49804766c35f6ea5.svg","flags/4x3/tg.svg":"flags/4x3/tg-24b25f4c2213fe35e5f5586d7ab23abf0c25ad2049708cd52ba72e1ec7b754ff.svg","flags/1x1/tg.svg":"flags/1x1/tg-05f3d98392a5ec3e4aecf8f629d3d03f05ac55abb7d9d84187d599acfe271374.svg","flags/4x3/th.svg":"flags/4x3/th-cc936bacd84dddd15454ef06bc64e357f83854af34692fc37363272d61f637d4.svg","flags/1x1/th.svg":"flags/1x1/th-de82cbd770db2be53a8e3d59d86e2b748a5d3f96eb8584f7b9364cefbd06a172.svg","flags/4x3/tj.svg":"flags/4x3/tj-b90bf3e2dd63265d55b67962b160df65f021c42b6ea304e2943c10b9e2a8749d.svg","flags/1x1/tj.svg":"flags/1x1/tj-5f6571e74b1f8720f9ecc2d3aa2098ca45d2e7ad6602b2a57c206384719b9f36.svg","flags/4x3/tk.svg":"flags/4x3/tk-602520b29b909c96baea17a38eb654d6c6fbc7088f46a0cb8d8fe34ff92e3cb8.svg","flags/1x1/tk.svg":"flags/1x1/tk-fe1dc8aaa0643a45a74ecec8aec09f0fe2207d104bb3c28c0b84405f1275aeba.svg","flags/4x3/tl.svg":"flags/4x3/tl-ebdb862aa5ae5de1a72242571deaa70bfb222f488a93b70e304f2075b474d54b.svg","flags/1x1/tl.svg":"flags/1x1/tl-485f02183bdb192ba3ce6e5f076e184112739f883ae0a8fde33c454377b848d6.svg","flags/4x3/tm.svg":"flags/4x3/tm-5ddb4128bf0becd7c60413d5418027f5f01ca4bc72561d54b94febfee7a5a24b.svg","flags/1x1/tm.svg":"flags/1x1/tm-3521ad569a4095aa8d4166d5d9094fccfdbb3ea411207ad685b6dd5814ef3392.svg","flags/4x3/tn.svg":"flags/4x3/tn-ca27eb50d88b11d20b5b09e2bbecb7753267222489920c526608e5d2acd22d79.svg","flags/1x1/tn.svg":"flags/1x1/tn-222c6cd4742c558f48ebcacb47ea334057642fffa3456a1c75e0fad9e728d09b.svg","flags/4x3/to.svg":"flags/4x3/to-c9c509fc24f591fbe52bbf732c44291384c787796e1fc9c703a973587c3f8ad1.svg","flags/1x1/to.svg":"flags/1x1/to-cf26dfb44b56b915b2f11896355cb778b938ed54423311d69d7cda9626887dda.svg","flags/4x3/tr.svg":"flags/4x3/tr-c40f697070cf8d8358785b9203d1c8f438976e3cd644a87d9ee16fa9960deaa4.svg","flags/1x1/tr.svg":"flags/1x1/tr-627dcf91a1e5153c045e33a3459b5d56002530fddd3fc53927f4d0fb7ea004a5.svg","flags/4x3/tt.svg":"flags/4x3/tt-04786ffedbde2c96a30ad1cbf4db000848f14bd700324651fc88364e5f3c2fd0.svg","flags/1x1/tt.svg":"flags/1x1/tt-6a3c73bfa7782366d95e673d847ef8f84c0475b364d359def1efd264297bac30.svg","flags/4x3/tv.svg":"flags/4x3/tv-20b56e7c0a2fbaa2a0b7b1bd87afc6368440f175fb3a0589de5e34e99d163fd7.svg","flags/1x1/tv.svg":"flags/1x1/tv-8bce1d7bde2e20dcc473ed3a33c66e4bedcf1acf2d2fff6d54353a480b8cafbc.svg","flags/4x3/tw.svg":"flags/4x3/tw-36070ac0a15ab1f4811478da62e7678756a9aa266b141ed0549aba1c0e04333a.svg","flags/1x1/tw.svg":"flags/1x1/tw-fd7a0db2f3808842ca99176f097356fe9e6f3c120d6aa9e8c4a9c2dd4c3943ba.svg","flags/4x3/tz.svg":"flags/4x3/tz-51ad7d69f059075df61b9226468af0d78642af4ad34a7540f64c5bea82e803d7.svg","flags/1x1/tz.svg":"flags/1x1/tz-0703f29a7ae02a9a1753cb1726dd2934d75ed3a12e8d63faa9fa866e1fe61440.svg","flags/4x3/ua.svg":"flags/4x3/ua-7f7db03c3b492aaacd11b0abac70d543a7c0ec5265a36d529bbb80a7c432d81a.svg","flags/1x1/ua.svg":"flags/1x1/ua-25192fa80f120edb1dd1c4757fd7b79ef38f5e1729238f4135003e6a1501bf28.svg","flags/4x3/ug.svg":"flags/4x3/ug-7635df53eafdf411be0809df835bfbcffd61badd6c4df3db0909c8b3188015a0.svg","flags/1x1/ug.svg":"flags/1x1/ug-537f34f64e723fbe7cb7902ea0e61303f1ada79214197efc39ebe2c52ce24186.svg","flags/4x3/um.svg":"flags/4x3/um-a0ae80e34bbf94677dd6052ea87cc0090aba747dab5440e5ca6e231f7f07c96d.svg","flags/1x1/um.svg":"flags/1x1/um-3f1bc09babe7fdcf32518bb49d1aac3a66d0204f955eacca291c58d4f4ef895a.svg","flags/4x3/us.svg":"flags/4x3/us-aefd8f7e57d11f7b0416d01d9c665ab3848b10af849f35a4d772d58d24d83329.svg","flags/1x1/us.svg":"flags/1x1/us-87af45be9346e8c820312976abe332ee11f8931e29fa361328d28660a711b1e2.svg","flags/4x3/uy.svg":"flags/4x3/uy-9f636c8283abf56cc930746fd427c1d1644dcf8736c537629df13f760da96ebc.svg","flags/1x1/uy.svg":"flags/1x1/uy-e216b762a93ec55bf9b4ae3d35b7febe0b192a12246fd66c45139ce77fb2095e.svg","flags/4x3/uz.svg":"flags/4x3/uz-697d596705372323beddccb3626d1ce405b36249315c6b006ff1529e24909ceb.svg","flags/1x1/uz.svg":"flags/1x1/uz-aa34cbe4f6f0e4b5d890975578d28cc9b1e88ebd503d3bdca693748eb29b3353.svg","flags/4x3/va.svg":"flags/4x3/va-d24d3c5bee108c396997c3d5b2bd2273433752d8c222eb531650e51551a4afd0.svg","flags/1x1/va.svg":"flags/1x1/va-01160c1bffda12f0b94554ba0c50162a88da807943617334bd4c57a030985e95.svg","flags/4x3/vc.svg":"flags/4x3/vc-ddf979bee2889414e5a05ac55f39a9c93f34e0aff0d35f007605049a2d8b5afb.svg","flags/1x1/vc.svg":"flags/1x1/vc-ac776e16dec19ff2e2d9238f541dae5d977282b451a83ab3d4122efed2392be9.svg","flags/4x3/ve.svg":"flags/4x3/ve-e23abd006cc75a8c4f9ec1cb122b46f9b52e26c5606532d2c868277d4ccd523b.svg","flags/1x1/ve.svg":"flags/1x1/ve-1480713f28719e0a83da2c5f1333407dbfa5bcc0de8c9ba718fcf47273ee95ef.svg","flags/4x3/vg.svg":"flags/4x3/vg-7f8f24a4d6995e4dd39e3d9098dad5e14649821fa12ffc200edf0a586285ee15.svg","flags/1x1/vg.svg":"flags/1x1/vg-b464b6a78e46c29df9e4bdadc2646208f11c59168706456075f970552a24efa8.svg","flags/4x3/vi.svg":"flags/4x3/vi-58311325a293b046044976d899f288ce0fbe9bfd705a23947a9b38d7991983d7.svg","flags/1x1/vi.svg":"flags/1x1/vi-1c132d2cff66cdbdb7b6acf504bb0cd9d7579595d80c3fa6604ff24ca7a0184d.svg","flags/4x3/vn.svg":"flags/4x3/vn-a918d3c9cdc368b1d2ff9614d58cbcd1d43b725889b0ba18f5d4e693071e389a.svg","flags/1x1/vn.svg":"flags/1x1/vn-895e428ae3d98c99dbb02088cf8ef040bfb031df6f16c3c8fc3678505d869791.svg","flags/4x3/vu.svg":"flags/4x3/vu-2c286c778a7bed03cb603ab24b68dc91868f4f054cf4f851bdd17aa16731571c.svg","flags/1x1/vu.svg":"flags/1x1/vu-51ef23121e2641ebeeac50d31c4e52b7d00d3ab1bc9fc0ad95ea86fd3631975a.svg","flags/4x3/wf.svg":"flags/4x3/wf-f7e9ac5edac196ac32d7bafa04b5c0d924b89e9d7e4f3535a6a26c6c1523639c.svg","flags/1x1/wf.svg":"flags/1x1/wf-95a920a79aa32d92f8a362321aae4230e17025ac04d976593f4423d0c37c1aee.svg","flags/4x3/ws.svg":"flags/4x3/ws-efc6505a802a3fa2018bc102fc2e11db8c738464c619381b6edc32d0a89341a3.svg","flags/1x1/ws.svg":"flags/1x1/ws-e3afb81c037c814620027bf61ac5e266683cab7ba5796ecf10b64c110cfcb932.svg","flags/4x3/ye.svg":"flags/4x3/ye-fd88856e70d66b01b4f0f608936a61cf3b1d9dad40a2932fc5da4d01f72a447b.svg","flags/1x1/ye.svg":"flags/1x1/ye-0c0e32330871e6d83af54affb7dadbbe736f9799068508211fbae54db9bbdcc6.svg","flags/4x3/yt.svg":"flags/4x3/yt-2eef17b543424082d9f9b42a67e84c20b52e7f7eae8c4326d60711158da51d5b.svg","flags/1x1/yt.svg":"flags/1x1/yt-911da8075337fd8f75ecc8a338c294cb771c6b9a08576f96c9de1437888cd2a7.svg","flags/4x3/za.svg":"flags/4x3/za-45991a2aee307198510e56bf92523070aac4241cafe6c3ddb8f89b20a61d6371.svg","flags/1x1/za.svg":"flags/1x1/za-bc09a89b29311ea7e582ef60bf4e18aff7c29de6fbefe309463ca765723a0ce8.svg","flags/4x3/zm.svg":"flags/4x3/zm-07c0f30d86e66d0cad9d66cd9c9384d9cce1844f159d245deff6717101fe49c2.svg","flags/1x1/zm.svg":"flags/1x1/zm-fc5bce3834c71fe36617ea5f57f0bd1dcf3880a7c6aa515dcf92ae067f796241.svg","flags/4x3/zw.svg":"flags/4x3/zw-5217c74f14d9fdda244b69c5982bbabee052ac0f1cc0704926e8b1e621e50f9a.svg","flags/1x1/zw.svg":"flags/1x1/zw-a33b191c631709b9e1d85e06f5b15535fb544d4668c8bef865ede2a0b6a88ed9.svg","flags/4x3/es-ct.svg":"flags/4x3/es-ct-bcbb454a50c9a647efd43dcf041445f15e8dd70654bde530bf62401d4fb7738d.svg","flags/1x1/es-ct.svg":"flags/1x1/es-ct-7f13eb2b2f5c11dccd7043286bed7540d4dad4b1a8367b0aca1b8405a351b2ef.svg","flags/4x3/eu.svg":"flags/4x3/eu-5f129db64306353251b78f998d531d2f1019404cfa890ae63ed70dc316c7f240.svg","flags/1x1/eu.svg":"flags/1x1/eu-ec59ac8daf2a63ea8e299ad63a208445d68a96affe6a10a7328acb6799d44127.svg","flags/4x3/gb-eng.svg":"flags/4x3/gb-eng-1895f4e35ae299f5d869da2462ffcf98df4b08dcddc531c8f175e49720001a14.svg","flags/1x1/gb-eng.svg":"flags/1x1/gb-eng-d11afb87f40f35acda435a886ea044bd5e0b6f363ba0c7319f1d0181551fecf3.svg","flags/4x3/gb-nir.svg":"flags/4x3/gb-nir-b280f09c787f495c1074376cd67537b40216f672917e7d204bb12b8e7c72afaf.svg","flags/1x1/gb-nir.svg":"flags/1x1/gb-nir-2e516e72e0e8e244ef430e6608322f8c4fb276807ab033279b2a6570dd68fd41.svg","flags/4x3/gb-sct.svg":"flags/4x3/gb-sct-1b9e407802ae901cf8da740c382ec2b19821837d76271a73346e0c63c2244506.svg","flags/1x1/gb-sct.svg":"flags/1x1/gb-sct-d01e8a06a340e30ce52e8a3aba7ca6207afb96fdb238a815cc6cb92df8fa5df3.svg","flags/4x3/gb-wls.svg":"flags/4x3/gb-wls-5232b3e376a19866cddec8225cba242783b2a48063811957f1ce5a2c347c5bc9.svg","flags/1x1/gb-wls.svg":"flags/1x1/gb-wls-126615bc3597fda1ca4ee931ef24f6c2cf2547998c06db9c1ded69fe66c479e9.svg","flags/4x3/un.svg":"flags/4x3/un-31dece22ae18c3e01e86648ef3ef45f2f5b3d9d28a1e2bbbcdb1d87c37af55af.svg","flags/1x1/un.svg":"flags/1x1/un-455b5f3173ca9ac64f2135fac4ead7217d7fbe07551d0d2cc60216f83208f798.svg","leaflet/dist/images/layers.png":"leaflet/dist/images/layers-1dbbe9d028e292f36fcba8f8b3a28d5e8932754fc2215b9ac69e4cdecf5107c6.png","leaflet/dist/images/layers-2x.png":"leaflet/dist/images/layers-2x-066daca850d8ffbef007af00b06eac0015728dee279c51f3cb6c716df7c42edf.png","leaflet/dist/images/marker-icon.png":"leaflet/dist/images/marker-icon-574c3a5cca85f4114085b6841596d62f00d7c892c7b03f28cbfa301deb1dc437.png","markers-soft.png":"markers-soft-e78784e4ed70aaffddd73c315fab590233cc4e7b72388d7dd47a14796fc7c739.png","markers-shadow.png":"markers-shadow-8703a2262710f5e3d29e65d2acdf90d6512e159e119d27b8234731d8a6208a20.png","markers-soft@2x.png":"markers-soft@2x-c1e77253a8bfbe30cec24885d7046f443b76ebb66f4c961f77083b03f4a5cbaf.png","markers-shadow@2x.png":"markers-shadow@2x-b21a536be27313fb504f69f5899ff0b1245b276571769ac08d6c32c35676e47a.png","tinymce/langs/fr_FR.js":"tinymce/langs/fr_FR-6aba16704f73dd83662a78ca3360f3d98b1f1ed80a67560313554446915611a5.js","markers-matte.png":"markers-matte-497826545a90e09a240504d14530eba45823b19fd44175e09e27c47cd822ddb9.png","markers-matte@2x.png":"markers-matte@2x-948fc8c4426f04f60964ed20394247f45b0b60e575d02398b9b6810e7a29a823.png","markers-plain.png":"markers-plain-cf233423aa44e75ac0031e77b8ba571cd3331010517e1197e63fb7b06856c1ff.png","leaflet/dist/images/marker-icon-2x.png":"leaflet/dist/images/marker-icon-2x-00179c4c1ee830d3a108412ae0d294f55776cfeb085c60129a39aa6fc4ae2528.png","leaflet/dist/images/marker-shadow.png":"leaflet/dist/images/marker-shadow-264f5c640339f042dd729062cfc04c17f8ea0f29882b538e3848ed8f10edb4da.png","jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png":"jquery-ui/ui-bg_flat_0_aaaaaa_40x100-ae65a7ae22c4c23115948fdeb5c05c9137dbd13ca2d426b3c4c3c4183451e410.png","jquery-ui/ui-icons_444444_256x240.png":"jquery-ui/ui-icons_444444_256x240-31d988765b4e6f56553c29588c500381dc3e6f0aa2980c8212202e5644aefd5d.png","jquery-ui/ui-icons_555555_256x240.png":"jquery-ui/ui-icons_555555_256x240-32175261daee76c82bb0edf0eea16a56421866fbc31e94f3c1d570aa114502f5.png","jquery-ui/ui-icons_777620_256x240.png":"jquery-ui/ui-icons_777620_256x240-0b020fc6e696d88d296e7bb1f61f1eb2ad827848e2c7382a4c3e0999e702dd9b.png","jquery-ui/ui-icons_777777_256x240.png":"jquery-ui/ui-icons_777777_256x240-faf32007ae120c302213557626e660dd10e711c5dd4f1113d35f26dc05b78d2f.png","jquery-ui/ui-icons_cc0000_256x240.png":"jquery-ui/ui-icons_cc0000_256x240-40985a64b4d5dd213fba27fcd862a1bd1b337a97674f6ff0b9ec20abcee4bc69.png","jquery-ui/ui-icons_ffffff_256x240.png":"jquery-ui/ui-icons_ffffff_256x240-350df1b7131037de20e83c5c0f3a41a770d2ac48b5762ea772b3f4a8a7b9d47a.png","tinymce/preinit.js":"tinymce/preinit-84328a53e798df12f891eb49871773fd9f925439c8630e9e22423a82ef9e6f89.js","tinymce/rails.js":"tinymce/rails-bf7fd5c952f25481010758dde6a2681498074f9509230f601b317356a6a54fca.js","tinymce/tinymce.js":"tinymce/tinymce-933bdee0c6ef78cce68c58cdff6d05ce0644cffd92f03096827dfc71ddfb8180.js","tinymce/jquery.tinymce.js":"tinymce/jquery.tinymce-05402ca7d9e16d0a48a6259f8c005507d800186c5187f8cab94e79803c657535.js","tinymce/langs/readme.md":"tinymce/langs/readme-5a8b6a04d57b5c88e3fb7f2a870b8e2d3a48ec03ce6474206c41df78c155b2de.md","tinymce/license.txt":"tinymce/license-47a9dcd2574891a5a465112fd9dfcebcc7e61844edec27fa936a64642008fe66.txt","tinymce/plugins/advlist/plugin.js":"tinymce/plugins/advlist/plugin-f6069c61cab2738bb578f2fe8281468a5cb0288557dd991b7bba8ded5e482fbd.js","tinymce/plugins/anchor/plugin.js":"tinymce/plugins/anchor/plugin-ea234f2da55d91c64226d60ce759db2aec048e0b2c75a24df6a89d53124c07f6.js","tinymce/plugins/autolink/plugin.js":"tinymce/plugins/autolink/plugin-ac28a17f983f18cd516db411cef14309f2f59f3e0c8ba50003cb0e6474fcda3c.js","tinymce/plugins/autoresize/plugin.js":"tinymce/plugins/autoresize/plugin-2763b3400e380421179d07457608202b063c27a3a3048a464a6aae9019172f59.js","tinymce/plugins/autosave/plugin.js":"tinymce/plugins/autosave/plugin-1d1330b882d749e240d1e776010079de029c85bd927108deb213e7b49af94ff3.js","tinymce/plugins/bbcode/plugin.js":"tinymce/plugins/bbcode/plugin-519d45b998601eecaf7200a940d966c1f49ce6a17b11ad8981b98eb5737d888b.js","tinymce/plugins/charmap/plugin.js":"tinymce/plugins/charmap/plugin-d92efb7c2b951cb6978d16e06dd01a2ed3f69930078fdb61e1c024d2be3088bd.js","tinymce/plugins/code/plugin.js":"tinymce/plugins/code/plugin-12f14e1ff40aa149ed4602915a151b1a0fba95cd109c5a3660ef276a6cd4d12b.js","tinymce/plugins/codesample/plugin.js":"tinymce/plugins/codesample/plugin-961dec8320c47362b979cec22319eaa66b13aa7eebce410f72f40dfe256addfe.js","tinymce/plugins/colorpicker/plugin.js":"tinymce/plugins/colorpicker/plugin-675106b228906c2c7c56fc575464632d663c28879ff4932941b22f65267a0eac.js","tinymce/plugins/contextmenu/plugin.js":"tinymce/plugins/contextmenu/plugin-70fd6ce0f8a691c2d0322d149c0db77ffaee2e45382e373fb9286b1a69b44d02.js","tinymce/plugins/directionality/plugin.js":"tinymce/plugins/directionality/plugin-f04e257aaed783c1e59a5b80d4333e59466b693440c4ee59214e58a9104fdeb0.js","tinymce/plugins/emoticons/js/emojis.js":"tinymce/plugins/emoticons/js/emojis-c6f728975b5c86aca22f396025edefe6107b0dd4d95f5ef80daef569b545bce8.js","tinymce/plugins/emoticons/plugin.js":"tinymce/plugins/emoticons/plugin-a22d47281e0384989309733a032c819d1e65997dd04eee51c1432f000ceff442.js","tinymce/plugins/fullpage/plugin.js":"tinymce/plugins/fullpage/plugin-80a11891b4f79a0cf9b60dfd59316cfbd414b88b5fcd42417e74e7f848cc1994.js","tinymce/plugins/fullscreen/plugin.js":"tinymce/plugins/fullscreen/plugin-7e6977ec473334a87e2ec082d2b26469fc16e7e0418b693c3310dde6870abec0.js","tinymce/plugins/help/plugin.js":"tinymce/plugins/help/plugin-8bbaaa8c56dc2fc53d8e81431cb2572f3cde335ca69e6b263057b611779fba2a.js","tinymce/plugins/hr/plugin.js":"tinymce/plugins/hr/plugin-af6dc21fc03fae20b20f43bdc020f000c94d7d44b85d2a3801b6cca7a63e89db.js","tinymce/plugins/image/plugin.js":"tinymce/plugins/image/plugin-9cc2713ba38cfa55c0095931480a4488b5f1689a398d6356c7dad1e9e633fa65.js","tinymce/plugins/imagetools/plugin.js":"tinymce/plugins/imagetools/plugin-3cbcd85187b1b675f7dbd604936f34e34071f2d4b5aa5bc472c3fa32fc1b623c.js","tinymce/plugins/importcss/plugin.js":"tinymce/plugins/importcss/plugin-a3b02fc1e1536bfc021bf89a0ac7190da67c0210ba913f412a0afae69928c706.js","tinymce/plugins/insertdatetime/plugin.js":"tinymce/plugins/insertdatetime/plugin-7c77d7748a4feaba38c5002f3f0c74b514f66cb853fadb812e316d6caaeebf13.js","tinymce/plugins/legacyoutput/plugin.js":"tinymce/plugins/legacyoutput/plugin-682ea2869f7859dd3f178b6e78ad633c43b432826d4ef6f77b57ae1e2bc35588.js","tinymce/plugins/link/plugin.js":"tinymce/plugins/link/plugin-f13ef8ee24e703b7bb2a74383dc27015f8589940855719b84cf3172d5cfb7bde.js","tinymce/plugins/lists/plugin.js":"tinymce/plugins/lists/plugin-fb324d9a8658dd319991ad6c6f41bbcb7a9406dce01c87242972115f0aee0191.js","tinymce/plugins/media/plugin.js":"tinymce/plugins/media/plugin-314e9ca099af746e9d2bbfb76a3a72434d38e7940a6ffeb7c9448eca4a52feef.js","tinymce/plugins/nonbreaking/plugin.js":"tinymce/plugins/nonbreaking/plugin-355a69fd71432a44b03e9efed7037601c1d305f8730baf36b5c8a112431d7673.js","tinymce/plugins/noneditable/plugin.js":"tinymce/plugins/noneditable/plugin-b7b8a3896f2337b7e0e6f1251356e62614c9e61392de8f7b3e21d87121692cc1.js","tinymce/plugins/pagebreak/plugin.js":"tinymce/plugins/pagebreak/plugin-003321c54baa547ece529c6ca421f9d445cd6baad6bd7187bcfa480a5cb1b5da.js","tinymce/plugins/paste/plugin.js":"tinymce/plugins/paste/plugin-74c15fe37fd45caed6df7fa655e883ef34d2e5539ff1ec37e117c800eda43d9d.js","tinymce/plugins/preview/plugin.js":"tinymce/plugins/preview/plugin-e15108b69ba14fe224244e8f331a6286387584884564761d8bfa30c7ed0fde9d.js","tinymce/plugins/print/plugin.js":"tinymce/plugins/print/plugin-8452fa0d6bed7ae4f730e5c3ff65fe1191764dda144525be24305f3d0498b353.js","tinymce/plugins/quickbars/plugin.js":"tinymce/plugins/quickbars/plugin-cad12e46c842299aab8c83a35accd0d45c59ba603e5842ccae2a2c3d3269729f.js","tinymce/plugins/save/plugin.js":"tinymce/plugins/save/plugin-f9655d7c4ba6c1a620842782d1a357e190d0af093a1c8c08d1766020decd3c9b.js","tinymce/plugins/searchreplace/plugin.js":"tinymce/plugins/searchreplace/plugin-2dbbce30bf922da5973f1549f4bd428e36873469dea0e4c7a359d93a1803faa1.js","tinymce/plugins/spellchecker/plugin.js":"tinymce/plugins/spellchecker/plugin-a839601eab929fa3b1f39e393620d8be359665ec4b51f48e6133ecc2185edd87.js","tinymce/plugins/tabfocus/plugin.js":"tinymce/plugins/tabfocus/plugin-aad92eb25bdb176a91e7ffa93be020075ed4dff441b7577f7399fae09b3cf330.js","tinymce/plugins/table/plugin.js":"tinymce/plugins/table/plugin-ccce8aa4de244bb1893de09ef8f8f45ad2f2dee025b2c5de7d4fd19b5ca69d8a.js","tinymce/plugins/template/plugin.js":"tinymce/plugins/template/plugin-062f4f7cd168b2467bcd488e29fdc8ca1384d94703a5b161cfab75186cba877b.js","tinymce/plugins/textcolor/plugin.js":"tinymce/plugins/textcolor/plugin-4f0245c9030f11782ca1945decd285c804f9704185ca967634b5c90e974d2c00.js","tinymce/plugins/textpattern/plugin.js":"tinymce/plugins/textpattern/plugin-755816e67ce980115f9ea54a368f930c46cbee3ebe2116759b2bd4d2083e0d16.js","tinymce/plugins/toc/plugin.js":"tinymce/plugins/toc/plugin-f744b1ecd10fdd9b6f25e79c6e9ae708645869b0dde843ab985979d3dd8f7c3b.js","tinymce/plugins/visualblocks/plugin.js":"tinymce/plugins/visualblocks/plugin-f7f0593b3bf6fe18d0e94085aae2c3621a13ab42675c1819be39ca9bf9b373b9.js","tinymce/plugins/visualchars/plugin.js":"tinymce/plugins/visualchars/plugin-b8cbbfadad5651a3d5611992a42d0da9cfe72c2eaec6d8f58f75aa0dea534671.js","tinymce/plugins/wordcount/plugin.js":"tinymce/plugins/wordcount/plugin-d516b3b2c47d96881ce318b3ab9730df1730e6b097017916b8e47962136210dc.js","tinymce/skins/content/default/content.css":"tinymce/skins/content/default/content-59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178.css","tinymce/skins/content/default/content.min.css":"tinymce/skins/content/default/content.min-59af8e2bdcb843082433e35a13e74452bb71675b4d09a1020fb82ec12f905178.css","tinymce/skins/content/document/content.css":"tinymce/skins/content/document/content-1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943.css","tinymce/skins/content/document/content.min.css":"tinymce/skins/content/document/content.min-1e26cccef0052522affb81bf2148310236b19cddf8132f0239d8c7566722e943.css","tinymce/skins/content/writer/content.css":"tinymce/skins/content/writer/content-eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656.css","tinymce/skins/content/writer/content.min.css":"tinymce/skins/content/writer/content.min-eea5c153ee2a10ed0864d84fa1dffb95ea6def7e579978cd2dd3d8f0956c9656.css","tinymce/skins/ui/oxide/content.css":"tinymce/skins/ui/oxide/content-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css","tinymce/skins/ui/oxide/content.inline.css":"tinymce/skins/ui/oxide/content.inline-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css","tinymce/skins/ui/oxide/content.inline.min.css":"tinymce/skins/ui/oxide/content.inline.min-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css","tinymce/skins/ui/oxide/content.min.css":"tinymce/skins/ui/oxide/content.min-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css","tinymce/skins/ui/oxide/content.mobile.css":"tinymce/skins/ui/oxide/content.mobile-230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346.css","tinymce/skins/ui/oxide/content.mobile.min.css":"tinymce/skins/ui/oxide/content.mobile.min-230c31f65356c7cb1799244a34f7a722c92a6d614e06e59d48db0ebccd7f2346.css","tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff":"tinymce/skins/ui/oxide/fonts/tinymce-mobile-e64bf156a432d63f5b34b4567b513dc0d351b49161c7f608fb82574bfdd9d213.woff","tinymce/skins/ui/oxide/skin.css":"tinymce/skins/ui/oxide/skin-7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3.css","tinymce/skins/ui/oxide/skin.min.css":"tinymce/skins/ui/oxide/skin.min-7d8e0616054bf5eff2caf4a9efc287aeb47aef378122efd027c8faae3f7a99d3.css","tinymce/skins/ui/oxide/skin.mobile.css":"tinymce/skins/ui/oxide/skin.mobile-22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22.css","tinymce/skins/ui/oxide/skin.mobile.min.css":"tinymce/skins/ui/oxide/skin.mobile.min-22703cb423be432b125a19fa94a29a8122b722be4f7c1b303102ce16ed839e22.css","tinymce/skins/ui/oxide-dark/content.css":"tinymce/skins/ui/oxide-dark/content-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css","tinymce/skins/ui/oxide-dark/content.inline.css":"tinymce/skins/ui/oxide-dark/content.inline-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css","tinymce/skins/ui/oxide-dark/content.inline.min.css":"tinymce/skins/ui/oxide-dark/content.inline.min-3676542deac9786a0b0ce47680310e8dd2edafa20649172317a3bcb4b8d52096.css","tinymce/skins/ui/oxide-dark/content.min.css":"tinymce/skins/ui/oxide-dark/content.min-5bfbd46f0f80fedea413962c9ccb9ca8ffc2c31ec40a187c48bc08cd31a48b0e.css","tinymce/skins/ui/oxide-dark/skin.css":"tinymce/skins/ui/oxide-dark/skin-661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a.css","tinymce/skins/ui/oxide-dark/skin.min.css":"tinymce/skins/ui/oxide-dark/skin.min-661157bbcb0577d39e9dba825ea7b552ea81fc889abed98ed6c17382c8a9052a.css","tinymce/themes/mobile/theme.js":"tinymce/themes/mobile/theme-842fc9d34b6299cf6acb8c991806c5c9706157c460c6242cf63e74d764faa830.js","tinymce/themes/silver/theme.js":"tinymce/themes/silver/theme-b0a7acb741588b1d3a5a5f16893b14da184559170c2a94f68d5a25415848ee7f.js"}} \ No newline at end of file diff --git a/public/assets/application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js b/public/assets/application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js deleted file mode 100644 index a29b900f..00000000 --- a/public/assets/application-132ee03ddf23bf52dab5adbbd092731b7e323cbf6695416790d5ee972d39d2ed.js +++ /dev/null @@ -1,66651 +0,0 @@ -/* - * File: iframeResizer.js - * Desc: Force iframes to size to content. - * Requires: iframeResizer.contentWindow.js to be loaded into the target frame. - * Doc: https://github.com/davidjbradshaw/iframe-resizer - * Author: David J. Bradshaw - dave@bradshaw.net - * Contributor: Jure Mav - jure.mav@gmail.com - * Contributor: Reed Dadoune - reed@dadoune.com - */ - -// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names -;(function(undefined) { - if (typeof window === 'undefined') return // don't run for server side render - - var count = 0, - logEnabled = false, - hiddenCheckEnabled = false, - msgHeader = 'message', - msgHeaderLen = msgHeader.length, - msgId = '[iFrameSizer]', // Must match iframe msg ID - msgIdLen = msgId.length, - pagePosition = null, - requestAnimationFrame = window.requestAnimationFrame, - resetRequiredMethods = { - max: 1, - scroll: 1, - bodyScroll: 1, - documentElementScroll: 1 - }, - settings = {}, - timer = null, - defaults = { - autoResize: true, - bodyBackground: null, - bodyMargin: null, - bodyMarginV1: 8, - bodyPadding: null, - checkOrigin: true, - inPageLinks: false, - enablePublicMethods: true, - heightCalculationMethod: 'bodyOffset', - id: 'iFrameResizer', - interval: 32, - log: false, - maxHeight: Infinity, - maxWidth: Infinity, - minHeight: 0, - minWidth: 0, - resizeFrom: 'parent', - scrolling: false, - sizeHeight: true, - sizeWidth: false, - warningTimeout: 5000, - tolerance: 0, - widthCalculationMethod: 'scroll', - onClosed: function() {}, - onInit: function() {}, - onMessage: function() { - warn('onMessage function not defined') - }, - onResized: function() {}, - onScroll: function() { - return true - } - } - - function getMutationObserver() { - return ( - window.MutationObserver || - window.WebKitMutationObserver || - window.MozMutationObserver - ) - } - - function addEventListener(el, evt, func) { - el.addEventListener(evt, func, false) - } - - function removeEventListener(el, evt, func) { - el.removeEventListener(evt, func, false) - } - - function setupRequestAnimationFrame() { - var vendors = ['moz', 'webkit', 'o', 'ms'] - var x - - // Remove vendor prefixing if prefixed and break early if not - for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) { - requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'] - } - - if (!requestAnimationFrame) { - log('setup', 'RequestAnimationFrame not supported') - } - } - - function getMyID(iframeId) { - var retStr = 'Host page: ' + iframeId - - if (window.top !== window.self) { - if (window.parentIFrame && window.parentIFrame.getId) { - retStr = window.parentIFrame.getId() + ': ' + iframeId - } else { - retStr = 'Nested host page: ' + iframeId - } - } - - return retStr - } - - function formatLogHeader(iframeId) { - return msgId + '[' + getMyID(iframeId) + ']' - } - - function isLogEnabled(iframeId) { - return settings[iframeId] ? settings[iframeId].log : logEnabled - } - - function log(iframeId, msg) { - output('log', iframeId, msg, isLogEnabled(iframeId)) - } - - function info(iframeId, msg) { - output('info', iframeId, msg, isLogEnabled(iframeId)) - } - - function warn(iframeId, msg) { - output('warn', iframeId, msg, true) - } - - function output(type, iframeId, msg, enabled) { - if (true === enabled && 'object' === typeof window.console) { - // eslint-disable-next-line no-console - console[type](formatLogHeader(iframeId), msg) - } - } - - function iFrameListener(event) { - function resizeIFrame() { - function resize() { - setSize(messageData) - setPagePosition(iframeId) - on('onResized', messageData) - } - - ensureInRange('Height') - ensureInRange('Width') - - syncResize(resize, messageData, 'init') - } - - function processMsg() { - var data = msg.substr(msgIdLen).split(':') - - return { - iframe: settings[data[0]] && settings[data[0]].iframe, - id: data[0], - height: data[1], - width: data[2], - type: data[3] - } - } - - function ensureInRange(Dimension) { - var max = Number(settings[iframeId]['max' + Dimension]), - min = Number(settings[iframeId]['min' + Dimension]), - dimension = Dimension.toLowerCase(), - size = Number(messageData[dimension]) - - log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max) - - if (size < min) { - size = min - log(iframeId, 'Set ' + dimension + ' to min value') - } - - if (size > max) { - size = max - log(iframeId, 'Set ' + dimension + ' to max value') - } - - messageData[dimension] = '' + size - } - - function isMessageFromIFrame() { - function checkAllowedOrigin() { - function checkList() { - var i = 0, - retCode = false - - log( - iframeId, - 'Checking connection is from allowed list of origins: ' + - checkOrigin - ) - - for (; i < checkOrigin.length; i++) { - if (checkOrigin[i] === origin) { - retCode = true - break - } - } - return retCode - } - - function checkSingle() { - var remoteHost = settings[iframeId] && settings[iframeId].remoteHost - log(iframeId, 'Checking connection is from: ' + remoteHost) - return origin === remoteHost - } - - return checkOrigin.constructor === Array ? checkList() : checkSingle() - } - - var origin = event.origin, - checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin - - if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) { - throw new Error( - 'Unexpected message received from: ' + - origin + - ' for ' + - messageData.iframe.id + - '. Message was: ' + - event.data + - '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.' - ) - } - - return true - } - - function isMessageForUs() { - return ( - msgId === ('' + msg).substr(0, msgIdLen) && - msg.substr(msgIdLen).split(':')[0] in settings - ) // ''+Protects against non-string msg - } - - function isMessageFromMetaParent() { - // Test if this message is from a parent above us. This is an ugly test, however, updating - // the message format would break backwards compatibity. - var retCode = messageData.type in { true: 1, false: 1, undefined: 1 } - - if (retCode) { - log(iframeId, 'Ignoring init message from meta parent page') - } - - return retCode - } - - function getMsgBody(offset) { - return msg.substr(msg.indexOf(':') + msgHeaderLen + offset) - } - - function forwardMsgFromIFrame(msgBody) { - log( - iframeId, - 'onMessage passed: {iframe: ' + - messageData.iframe.id + - ', message: ' + - msgBody + - '}' - ) - on('onMessage', { - iframe: messageData.iframe, - message: JSON.parse(msgBody) - }) - log(iframeId, '--') - } - - function getPageInfo() { - var bodyPosition = document.body.getBoundingClientRect(), - iFramePosition = messageData.iframe.getBoundingClientRect() - - return JSON.stringify({ - iframeHeight: iFramePosition.height, - iframeWidth: iFramePosition.width, - clientHeight: Math.max( - document.documentElement.clientHeight, - window.innerHeight || 0 - ), - clientWidth: Math.max( - document.documentElement.clientWidth, - window.innerWidth || 0 - ), - offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10), - offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10), - scrollTop: window.pageYOffset, - scrollLeft: window.pageXOffset, - documentHeight: document.documentElement.clientHeight, - documentWidth: document.documentElement.clientWidth, - windowHeight: window.innerHeight, - windowWidth: window.innerWidth - }) - } - - function sendPageInfoToIframe(iframe, iframeId) { - function debouncedTrigger() { - trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId) - } - debounceFrameEvents(debouncedTrigger, 32, iframeId) - } - - function startPageInfoMonitor() { - function setListener(type, func) { - function sendPageInfo() { - if (settings[id]) { - sendPageInfoToIframe(settings[id].iframe, id) - } else { - stop() - } - } - - ;['scroll', 'resize'].forEach(function(evt) { - log(id, type + evt + ' listener for sendPageInfo') - func(window, evt, sendPageInfo) - }) - } - - function stop() { - setListener('Remove ', removeEventListener) - } - - function start() { - setListener('Add ', addEventListener) - } - - var id = iframeId // Create locally scoped copy of iFrame ID - - start() - - if (settings[id]) { - settings[id].stopPageInfo = stop - } - } - - function stopPageInfoMonitor() { - if (settings[iframeId] && settings[iframeId].stopPageInfo) { - settings[iframeId].stopPageInfo() - delete settings[iframeId].stopPageInfo - } - } - - function checkIFrameExists() { - var retBool = true - - if (null === messageData.iframe) { - warn(iframeId, 'IFrame (' + messageData.id + ') not found') - retBool = false - } - return retBool - } - - function getElementPosition(target) { - var iFramePosition = target.getBoundingClientRect() - - getPagePosition(iframeId) - - return { - x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)), - y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y)) - } - } - - function scrollRequestFromChild(addOffset) { - /* istanbul ignore next */ // Not testable in Karma - function reposition() { - pagePosition = newPosition - scrollTo() - log(iframeId, '--') - } - - function calcOffset() { - return { - x: Number(messageData.width) + offset.x, - y: Number(messageData.height) + offset.y - } - } - - function scrollParent() { - if (window.parentIFrame) { - window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')]( - newPosition.x, - newPosition.y - ) - } else { - warn( - iframeId, - 'Unable to scroll to requested position, window.parentIFrame not found' - ) - } - } - - var offset = addOffset - ? getElementPosition(messageData.iframe) - : { x: 0, y: 0 }, - newPosition = calcOffset() - - log( - iframeId, - 'Reposition requested from iFrame (offset x:' + - offset.x + - ' y:' + - offset.y + - ')' - ) - - if (window.top !== window.self) { - scrollParent() - } else { - reposition() - } - } - - function scrollTo() { - if (false !== on('onScroll', pagePosition)) { - setPagePosition(iframeId) - } else { - unsetPagePosition() - } - } - - function findTarget(location) { - function jumpToTarget() { - var jumpPosition = getElementPosition(target) - - log( - iframeId, - 'Moving to in page link (#' + - hash + - ') at x: ' + - jumpPosition.x + - ' y: ' + - jumpPosition.y - ) - pagePosition = { - x: jumpPosition.x, - y: jumpPosition.y - } - - scrollTo() - log(iframeId, '--') - } - - function jumpToParent() { - if (window.parentIFrame) { - window.parentIFrame.moveToAnchor(hash) - } else { - log( - iframeId, - 'In page link #' + - hash + - ' not found and window.parentIFrame not found' - ) - } - } - - var hash = location.split('#')[1] || '', - hashData = decodeURIComponent(hash), - target = - document.getElementById(hashData) || - document.getElementsByName(hashData)[0] - - if (target) { - jumpToTarget() - } else if (window.top !== window.self) { - jumpToParent() - } else { - log(iframeId, 'In page link #' + hash + ' not found') - } - } - - function on(funcName, val) { - return chkEvent(iframeId, funcName, val) - } - - function actionMsg() { - if (settings[iframeId] && settings[iframeId].firstRun) firstRun() - - switch (messageData.type) { - case 'close': - if (settings[iframeId].closeRequeston) - chkEvent(iframeId, 'onCloseRequest', settings[iframeId].iframe) - else closeIFrame(messageData.iframe) - break - - case 'message': - forwardMsgFromIFrame(getMsgBody(6)) - break - - case 'scrollTo': - scrollRequestFromChild(false) - break - - case 'scrollToOffset': - scrollRequestFromChild(true) - break - - case 'pageInfo': - sendPageInfoToIframe( - settings[iframeId] && settings[iframeId].iframe, - iframeId - ) - startPageInfoMonitor() - break - - case 'pageInfoStop': - stopPageInfoMonitor() - break - - case 'inPageLink': - findTarget(getMsgBody(9)) - break - - case 'reset': - resetIFrame(messageData) - break - - case 'init': - resizeIFrame() - on('onInit', messageData.iframe) - break - - default: - resizeIFrame() - } - } - - function hasSettings(iframeId) { - var retBool = true - - if (!settings[iframeId]) { - retBool = false - warn( - messageData.type + - ' No settings for ' + - iframeId + - '. Message was: ' + - msg - ) - } - - return retBool - } - - function iFrameReadyMsgReceived() { - // eslint-disable-next-line no-restricted-syntax, guard-for-in - for (var iframeId in settings) { - trigger( - 'iFrame requested init', - createOutgoingMsg(iframeId), - document.getElementById(iframeId), - iframeId - ) - } - } - - function firstRun() { - if (settings[iframeId]) { - settings[iframeId].firstRun = false - } - } - - var msg = event.data, - messageData = {}, - iframeId = null - - if ('[iFrameResizerChild]Ready' === msg) { - iFrameReadyMsgReceived() - } else if (isMessageForUs()) { - messageData = processMsg() - iframeId = messageData.id - if (settings[iframeId]) { - settings[iframeId].loaded = true - } - - if (!isMessageFromMetaParent() && hasSettings(iframeId)) { - log(iframeId, 'Received: ' + msg) - - if (checkIFrameExists() && isMessageFromIFrame()) { - actionMsg() - } - } - } else { - info(iframeId, 'Ignored: ' + msg) - } - } - - function chkEvent(iframeId, funcName, val) { - var func = null, - retVal = null - - if (settings[iframeId]) { - func = settings[iframeId][funcName] - - if ('function' === typeof func) { - retVal = func(val) - } else { - throw new TypeError( - funcName + ' on iFrame[' + iframeId + '] is not a function' - ) - } - } - - return retVal - } - - function removeIframeListeners(iframe) { - var iframeId = iframe.id - delete settings[iframeId] - } - - function closeIFrame(iframe) { - var iframeId = iframe.id - log(iframeId, 'Removing iFrame: ' + iframeId) - - try { - // Catch race condition error with React - if (iframe.parentNode) { - iframe.parentNode.removeChild(iframe) - } - } catch (error) { - warn(error) - } - - chkEvent(iframeId, 'onClosed', iframeId) - log(iframeId, '--') - removeIframeListeners(iframe) - } - - function getPagePosition(iframeId) { - if (null === pagePosition) { - pagePosition = { - x: - window.pageXOffset !== undefined - ? window.pageXOffset - : document.documentElement.scrollLeft, - y: - window.pageYOffset !== undefined - ? window.pageYOffset - : document.documentElement.scrollTop - } - log( - iframeId, - 'Get page position: ' + pagePosition.x + ',' + pagePosition.y - ) - } - } - - function setPagePosition(iframeId) { - if (null !== pagePosition) { - window.scrollTo(pagePosition.x, pagePosition.y) - log( - iframeId, - 'Set page position: ' + pagePosition.x + ',' + pagePosition.y - ) - unsetPagePosition() - } - } - - function unsetPagePosition() { - pagePosition = null - } - - function resetIFrame(messageData) { - function reset() { - setSize(messageData) - trigger('reset', 'reset', messageData.iframe, messageData.id) - } - - log( - messageData.id, - 'Size reset requested by ' + - ('init' === messageData.type ? 'host page' : 'iFrame') - ) - getPagePosition(messageData.id) - syncResize(reset, messageData, 'reset') - } - - function setSize(messageData) { - function setDimension(dimension) { - if (!messageData.id) { - log('undefined', 'messageData id not set') - return - } - messageData.iframe.style[dimension] = messageData[dimension] + 'px' - log( - messageData.id, - 'IFrame (' + - iframeId + - ') ' + - dimension + - ' set to ' + - messageData[dimension] + - 'px' - ) - } - - function chkZero(dimension) { - // FireFox sets dimension of hidden iFrames to zero. - // So if we detect that set up an event to check for - // when iFrame becomes visible. - - /* istanbul ignore next */ // Not testable in PhantomJS - if (!hiddenCheckEnabled && '0' === messageData[dimension]) { - hiddenCheckEnabled = true - log(iframeId, 'Hidden iFrame detected, creating visibility listener') - fixHiddenIFrames() - } - } - - function processDimension(dimension) { - setDimension(dimension) - chkZero(dimension) - } - - var iframeId = messageData.iframe.id - - if (settings[iframeId]) { - if (settings[iframeId].sizeHeight) { - processDimension('height') - } - if (settings[iframeId].sizeWidth) { - processDimension('width') - } - } - } - - function syncResize(func, messageData, doNotSync) { - /* istanbul ignore if */ // Not testable in PhantomJS - if (doNotSync !== messageData.type && requestAnimationFrame) { - log(messageData.id, 'Requesting animation frame') - requestAnimationFrame(func) - } else { - func() - } - } - - function trigger(calleeMsg, msg, iframe, id, noResponseWarning) { - function postMessageToIFrame() { - var target = settings[id] && settings[id].targetOrigin - log( - id, - '[' + - calleeMsg + - '] Sending msg to iframe[' + - id + - '] (' + - msg + - ') targetOrigin: ' + - target - ) - iframe.contentWindow.postMessage(msgId + msg, target) - } - - function iFrameNotFound() { - warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found') - } - - function chkAndSend() { - if ( - iframe && - 'contentWindow' in iframe && - null !== iframe.contentWindow - ) { - // Null test for PhantomJS - postMessageToIFrame() - } else { - iFrameNotFound() - } - } - - function warnOnNoResponse() { - function warning() { - if (settings[id] && !settings[id].loaded && !errorShown) { - errorShown = true - warn( - id, - 'IFrame has not responded within ' + - settings[id].warningTimeout / 1000 + - ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.' - ) - } - } - - if ( - !!noResponseWarning && - settings[id] && - !!settings[id].warningTimeout - ) { - settings[id].msgTimeout = setTimeout( - warning, - settings[id].warningTimeout - ) - } - } - - var errorShown = false - - id = id || iframe.id - - if (settings[id]) { - chkAndSend() - warnOnNoResponse() - } - } - - function createOutgoingMsg(iframeId) { - return ( - iframeId + - ':' + - settings[iframeId].bodyMarginV1 + - ':' + - settings[iframeId].sizeWidth + - ':' + - settings[iframeId].log + - ':' + - settings[iframeId].interval + - ':' + - settings[iframeId].enablePublicMethods + - ':' + - settings[iframeId].autoResize + - ':' + - settings[iframeId].bodyMargin + - ':' + - settings[iframeId].heightCalculationMethod + - ':' + - settings[iframeId].bodyBackground + - ':' + - settings[iframeId].bodyPadding + - ':' + - settings[iframeId].tolerance + - ':' + - settings[iframeId].inPageLinks + - ':' + - settings[iframeId].resizeFrom + - ':' + - settings[iframeId].widthCalculationMethod - ) - } - - function setupIFrame(iframe, options) { - function setLimits() { - function addStyle(style) { - if ( - Infinity !== settings[iframeId][style] && - 0 !== settings[iframeId][style] - ) { - iframe.style[style] = settings[iframeId][style] + 'px' - log( - iframeId, - 'Set ' + style + ' = ' + settings[iframeId][style] + 'px' - ) - } - } - - function chkMinMax(dimension) { - if ( - settings[iframeId]['min' + dimension] > - settings[iframeId]['max' + dimension] - ) { - throw new Error( - 'Value for min' + - dimension + - ' can not be greater than max' + - dimension - ) - } - } - - chkMinMax('Height') - chkMinMax('Width') - - addStyle('maxHeight') - addStyle('minHeight') - addStyle('maxWidth') - addStyle('minWidth') - } - - function newId() { - var id = (options && options.id) || defaults.id + count++ - if (null !== document.getElementById(id)) { - id += count++ - } - return id - } - - function ensureHasId(iframeId) { - if ('' === iframeId) { - // eslint-disable-next-line no-multi-assign - iframe.id = iframeId = newId() - logEnabled = (options || {}).log - log( - iframeId, - 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')' - ) - } - - return iframeId - } - - function setScrolling() { - log( - iframeId, - 'IFrame scrolling ' + - (settings[iframeId] && settings[iframeId].scrolling - ? 'enabled' - : 'disabled') + - ' for ' + - iframeId - ) - iframe.style.overflow = - false === (settings[iframeId] && settings[iframeId].scrolling) - ? 'hidden' - : 'auto' - switch (settings[iframeId] && settings[iframeId].scrolling) { - case 'omit': - break - - case true: - iframe.scrolling = 'yes' - break - - case false: - iframe.scrolling = 'no' - break - - default: - iframe.scrolling = settings[iframeId] - ? settings[iframeId].scrolling - : 'no' - } - } - - // The V1 iFrame script expects an int, where as in V2 expects a CSS - // string value such as '1px 3em', so if we have an int for V2, set V1=V2 - // and then convert V2 to a string PX value. - function setupBodyMarginValues() { - if ( - 'number' === - typeof (settings[iframeId] && settings[iframeId].bodyMargin) || - '0' === (settings[iframeId] && settings[iframeId].bodyMargin) - ) { - settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin - settings[iframeId].bodyMargin = - '' + settings[iframeId].bodyMargin + 'px' - } - } - - function checkReset() { - // Reduce scope of firstRun to function, because IE8's JS execution - // context stack is borked and this value gets externally - // changed midway through running this function!!! - var firstRun = settings[iframeId] && settings[iframeId].firstRun, - resetRequertMethod = - settings[iframeId] && - settings[iframeId].heightCalculationMethod in resetRequiredMethods - - if (!firstRun && resetRequertMethod) { - resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' }) - } - } - - function setupIFrameObject() { - if (settings[iframeId]) { - settings[iframeId].iframe.iFrameResizer = { - close: closeIFrame.bind(null, settings[iframeId].iframe), - - removeListeners: removeIframeListeners.bind( - null, - settings[iframeId].iframe - ), - - resize: trigger.bind( - null, - 'Window resize', - 'resize', - settings[iframeId].iframe - ), - - moveToAnchor: function(anchor) { - trigger( - 'Move to anchor', - 'moveToAnchor:' + anchor, - settings[iframeId].iframe, - iframeId - ) - }, - - sendMessage: function(message) { - message = JSON.stringify(message) - trigger( - 'Send Message', - 'message:' + message, - settings[iframeId].iframe, - iframeId - ) - } - } - } - } - - // We have to call trigger twice, as we can not be sure if all - // iframes have completed loading when this code runs. The - // event listener also catches the page changing in the iFrame. - function init(msg) { - function iFrameLoaded() { - trigger('iFrame.onload', msg, iframe, undefined, true) - checkReset() - } - - function createDestroyObserver(MutationObserver) { - if (!iframe.parentNode) { - return - } - - var destroyObserver = new MutationObserver(function(mutations) { - mutations.forEach(function(mutation) { - var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array - removedNodes.forEach(function(removedNode) { - if (removedNode === iframe) { - closeIFrame(iframe) - } - }) - }) - }) - destroyObserver.observe(iframe.parentNode, { - childList: true - }) - } - - var MutationObserver = getMutationObserver() - if (MutationObserver) { - createDestroyObserver(MutationObserver) - } - - addEventListener(iframe, 'load', iFrameLoaded) - trigger('init', msg, iframe, undefined, true) - } - - function checkOptions(options) { - if ('object' !== typeof options) { - throw new TypeError('Options is not an object') - } - } - - function copyOptions(options) { - // eslint-disable-next-line no-restricted-syntax - for (var option in defaults) { - if (Object.prototype.hasOwnProperty.call(defaults, option)) { - settings[iframeId][option] = Object.prototype.hasOwnProperty.call( - options, - option - ) - ? options[option] - : defaults[option] - } - } - } - - function getTargetOrigin(remoteHost) { - return '' === remoteHost || 'file://' === remoteHost ? '*' : remoteHost - } - - function depricate(key) { - var splitName = key.split('Callback') - - if (splitName.length === 2) { - var name = - 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1) - this[name] = this[key] - delete this[key] - warn( - iframeId, - "Deprecated: '" + - key + - "' has been renamed '" + - name + - "'. The old method will be removed in the next major version." - ) - } - } - - function processOptions(options) { - options = options || {} - settings[iframeId] = { - firstRun: true, - iframe: iframe, - remoteHost: iframe.src - .split('/') - .slice(0, 3) - .join('/') - } - - checkOptions(options) - Object.keys(options).forEach(depricate, options) - copyOptions(options) - - if (settings[iframeId]) { - settings[iframeId].targetOrigin = - true === settings[iframeId].checkOrigin - ? getTargetOrigin(settings[iframeId].remoteHost) - : '*' - } - } - - function beenHere() { - return iframeId in settings && 'iFrameResizer' in iframe - } - - var iframeId = ensureHasId(iframe.id) - - if (!beenHere()) { - processOptions(options) - setScrolling() - setLimits() - setupBodyMarginValues() - init(createOutgoingMsg(iframeId)) - setupIFrameObject() - } else { - warn(iframeId, 'Ignored iFrame, already setup.') - } - } - - function debouce(fn, time) { - if (null === timer) { - timer = setTimeout(function() { - timer = null - fn() - }, time) - } - } - - var frameTimer = {} - function debounceFrameEvents(fn, time, frameId) { - if (!frameTimer[frameId]) { - frameTimer[frameId] = setTimeout(function() { - frameTimer[frameId] = null - fn() - }, time) - } - } - - // Not testable in PhantomJS - /* istanbul ignore next */ - - function fixHiddenIFrames() { - function checkIFrames() { - function checkIFrame(settingId) { - function chkDimension(dimension) { - return ( - '0px' === - (settings[settingId] && settings[settingId].iframe.style[dimension]) - ) - } - - function isVisible(el) { - return null !== el.offsetParent - } - - if ( - settings[settingId] && - isVisible(settings[settingId].iframe) && - (chkDimension('height') || chkDimension('width')) - ) { - trigger( - 'Visibility change', - 'resize', - settings[settingId].iframe, - settingId - ) - } - } - - Object.keys(settings).forEach(function(key) { - checkIFrame(settings[key]) - }) - } - - function mutationObserved(mutations) { - log( - 'window', - 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type - ) - debouce(checkIFrames, 16) - } - - function createMutationObserver() { - var target = document.querySelector('body'), - config = { - attributes: true, - attributeOldValue: false, - characterData: true, - characterDataOldValue: false, - childList: true, - subtree: true - }, - observer = new MutationObserver(mutationObserved) - - observer.observe(target, config) - } - - var MutationObserver = getMutationObserver() - if (MutationObserver) { - createMutationObserver() - } - } - - function resizeIFrames(event) { - function resize() { - sendTriggerMsg('Window ' + event, 'resize') - } - - log('window', 'Trigger event: ' + event) - debouce(resize, 16) - } - - // Not testable in PhantomJS - /* istanbul ignore next */ - function tabVisible() { - function resize() { - sendTriggerMsg('Tab Visable', 'resize') - } - - if ('hidden' !== document.visibilityState) { - log('document', 'Trigger event: Visiblity change') - debouce(resize, 16) - } - } - - function sendTriggerMsg(eventName, event) { - function isIFrameResizeEnabled(iframeId) { - return ( - settings[iframeId] && - 'parent' === settings[iframeId].resizeFrom && - settings[iframeId].autoResize && - !settings[iframeId].firstRun - ) - } - - Object.keys(settings).forEach(function(iframeId) { - if (isIFrameResizeEnabled(iframeId)) { - trigger(eventName, event, document.getElementById(iframeId), iframeId) - } - }) - } - - function setupEventListeners() { - addEventListener(window, 'message', iFrameListener) - - addEventListener(window, 'resize', function() { - resizeIFrames('resize') - }) - - addEventListener(document, 'visibilitychange', tabVisible) - - addEventListener(document, '-webkit-visibilitychange', tabVisible) - } - - function factory() { - function init(options, element) { - function chkType() { - if (!element.tagName) { - throw new TypeError('Object is not a valid DOM element') - } else if ('IFRAME' !== element.tagName.toUpperCase()) { - throw new TypeError( - 'Expected ') !== -1; - }; - var createFragmentedLevel = function (fragments) { - return { - type: 'fragmented', - fragments: fragments, - content: '', - bookmark: null, - beforeBookmark: null - }; - }; - var createCompleteLevel = function (content) { - return { - type: 'complete', - fragments: null, - content: content, - bookmark: null, - beforeBookmark: null - }; - }; - var createFromEditor = function (editor) { - var fragments, content, trimmedFragments; - fragments = Fragments.read(editor.getBody()); - trimmedFragments = bind(fragments, function (html) { - var trimmed = TrimHtml.trimInternal(editor.serializer, html); - return trimmed.length > 0 ? [trimmed] : []; - }); - content = trimmedFragments.join(''); - return hasIframes(content) ? createFragmentedLevel(trimmedFragments) : createCompleteLevel(content); - }; - var applyToEditor = function (editor, level, before) { - if (level.type === 'fragmented') { - Fragments.write(level.fragments, editor.getBody()); - } else { - editor.setContent(level.content, { format: 'raw' }); - } - editor.selection.moveToBookmark(before ? level.beforeBookmark : level.bookmark); - }; - var getLevelContent = function (level) { - return level.type === 'fragmented' ? level.fragments.join('') : level.content; - }; - var getCleanLevelContent = function (level) { - var elm = Element.fromTag('body', lazyTempDocument()); - set$1(elm, getLevelContent(level)); - each(descendants$1(elm, '*[data-mce-bogus]'), unwrap); - return get$4(elm); - }; - var hasEqualContent = function (level1, level2) { - return getLevelContent(level1) === getLevelContent(level2); - }; - var hasEqualCleanedContent = function (level1, level2) { - return getCleanLevelContent(level1) === getCleanLevelContent(level2); - }; - var isEq$2 = function (level1, level2) { - if (!level1 || !level2) { - return false; - } else if (hasEqualContent(level1, level2)) { - return true; - } else { - return hasEqualCleanedContent(level1, level2); - } - }; - var Levels = { - createFragmentedLevel: createFragmentedLevel, - createCompleteLevel: createCompleteLevel, - createFromEditor: createFromEditor, - applyToEditor: applyToEditor, - isEq: isEq$2 - }; - - var UndoManager = function (editor) { - var self = this, index = 0, data = [], beforeBookmark, isFirstTypedCharacter, locks = 0; - var isUnlocked = function () { - return locks === 0; - }; - var setTyping = function (typing) { - if (isUnlocked()) { - self.typing = typing; - } - }; - var setDirty = function (state) { - editor.setDirty(state); - }; - var addNonTypingUndoLevel = function (e) { - setTyping(false); - self.add({}, e); - }; - var endTyping = function () { - if (self.typing) { - setTyping(false); - self.add(); - } - }; - editor.on('init', function () { - self.add(); - }); - editor.on('BeforeExecCommand', function (e) { - var cmd = e.command; - if (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') { - endTyping(); - self.beforeChange(); - } - }); - editor.on('ExecCommand', function (e) { - var cmd = e.command; - if (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') { - addNonTypingUndoLevel(e); - } - }); - editor.on('ObjectResizeStart cut', function () { - self.beforeChange(); - }); - editor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel); - editor.on('dragend', addNonTypingUndoLevel); - editor.on('keyup', function (e) { - var keyCode = e.keyCode; - if (e.isDefaultPrevented()) { - return; - } - if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45 || e.ctrlKey) { - addNonTypingUndoLevel(); - editor.nodeChanged(); - } - if (keyCode === 46 || keyCode === 8) { - editor.nodeChanged(); - } - if (isFirstTypedCharacter && self.typing && Levels.isEq(Levels.createFromEditor(editor), data[0]) === false) { - if (editor.isDirty() === false) { - setDirty(true); - editor.fire('change', { - level: data[0], - lastLevel: null - }); - } - editor.fire('TypingUndo'); - isFirstTypedCharacter = false; - editor.nodeChanged(); - } - }); - editor.on('keydown', function (e) { - var keyCode = e.keyCode; - if (e.isDefaultPrevented()) { - return; - } - if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45) { - if (self.typing) { - addNonTypingUndoLevel(e); - } - return; - } - var modKey = e.ctrlKey && !e.altKey || e.metaKey; - if ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !self.typing && !modKey) { - self.beforeChange(); - setTyping(true); - self.add({}, e); - isFirstTypedCharacter = true; - } - }); - editor.on('mousedown', function (e) { - if (self.typing) { - addNonTypingUndoLevel(e); - } - }); - var isInsertReplacementText = function (event) { - return event.inputType === 'insertReplacementText'; - }; - var isInsertTextDataNull = function (event) { - return event.inputType === 'insertText' && event.data === null; - }; - editor.on('input', function (e) { - if (e.inputType && (isInsertReplacementText(e) || isInsertTextDataNull(e))) { - addNonTypingUndoLevel(e); - } - }); - editor.addShortcut('meta+z', '', 'Undo'); - editor.addShortcut('meta+y,meta+shift+z', '', 'Redo'); - editor.on('AddUndo Undo Redo ClearUndos', function (e) { - if (!e.isDefaultPrevented()) { - editor.nodeChanged(); - } - }); - self = { - data: data, - typing: false, - beforeChange: function () { - if (isUnlocked()) { - beforeBookmark = GetBookmark.getUndoBookmark(editor.selection); - } - }, - add: function (level, event) { - var i; - var settings = editor.settings; - var lastLevel, currentLevel; - currentLevel = Levels.createFromEditor(editor); - level = level || {}; - level = Tools.extend(level, currentLevel); - if (isUnlocked() === false || editor.removed) { - return null; - } - lastLevel = data[index]; - if (editor.fire('BeforeAddUndo', { - level: level, - lastLevel: lastLevel, - originalEvent: event - }).isDefaultPrevented()) { - return null; - } - if (lastLevel && Levels.isEq(lastLevel, level)) { - return null; - } - if (data[index]) { - data[index].beforeBookmark = beforeBookmark; - } - if (settings.custom_undo_redo_levels) { - if (data.length > settings.custom_undo_redo_levels) { - for (i = 0; i < data.length - 1; i++) { - data[i] = data[i + 1]; - } - data.length--; - index = data.length; - } - } - level.bookmark = GetBookmark.getUndoBookmark(editor.selection); - if (index < data.length - 1) { - data.length = index + 1; - } - data.push(level); - index = data.length - 1; - var args = { - level: level, - lastLevel: lastLevel, - originalEvent: event - }; - editor.fire('AddUndo', args); - if (index > 0) { - setDirty(true); - editor.fire('change', args); - } - return level; - }, - undo: function () { - var level; - if (self.typing) { - self.add(); - self.typing = false; - setTyping(false); - } - if (index > 0) { - level = data[--index]; - Levels.applyToEditor(editor, level, true); - setDirty(true); - editor.fire('Undo', { level: level }); - } - return level; - }, - redo: function () { - var level; - if (index < data.length - 1) { - level = data[++index]; - Levels.applyToEditor(editor, level, false); - setDirty(true); - editor.fire('Redo', { level: level }); - } - return level; - }, - clear: function () { - data = []; - index = 0; - self.typing = false; - self.data = data; - editor.fire('ClearUndos'); - }, - reset: function () { - self.clear(); - self.add(); - }, - hasUndo: function () { - return index > 0 || self.typing && data[0] && !Levels.isEq(Levels.createFromEditor(editor), data[0]); - }, - hasRedo: function () { - return index < data.length - 1 && !self.typing; - }, - transact: function (callback) { - endTyping(); - self.beforeChange(); - self.ignore(callback); - return self.add(); - }, - ignore: function (callback) { - try { - locks++; - callback(); - } finally { - locks--; - } - }, - extra: function (callback1, callback2) { - var lastLevel, bookmark; - if (self.transact(callback1)) { - bookmark = data[index].bookmark; - lastLevel = data[index - 1]; - Levels.applyToEditor(editor, lastLevel, true); - if (self.transact(callback2)) { - data[index - 1].beforeBookmark = bookmark; - } - } - } - }; - return self; - }; - - var getLastChildren$1 = function (elm) { - var children = []; - var rawNode = elm.dom(); - while (rawNode) { - children.push(Element.fromDom(rawNode)); - rawNode = rawNode.lastChild; - } - return children; - }; - var removeTrailingBr = function (elm) { - var allBrs = descendants$1(elm, 'br'); - var brs = filter(getLastChildren$1(elm).slice(-1), isBr$1); - if (allBrs.length === brs.length) { - each(brs, remove$1); - } - }; - var fillWithPaddingBr = function (elm) { - empty(elm); - append(elm, Element.fromHtml('
')); - }; - var isPaddingContents = function (elm) { - return isText(elm) ? get$5(elm) === '\xA0' : isBr$1(elm); - }; - var isPaddedElement = function (elm) { - return filter(children(elm), isPaddingContents).length === 1; - }; - var trimBlockTrailingBr = function (elm) { - lastChild(elm).each(function (lastChild) { - prevSibling(lastChild).each(function (lastChildPrevSibling) { - if (isBlock(elm) && isBr$1(lastChild) && isBlock(lastChildPrevSibling)) { - remove$1(lastChild); - } - }); - }); - }; - var PaddingBr = { - removeTrailingBr: removeTrailingBr, - fillWithPaddingBr: fillWithPaddingBr, - isPaddedElement: isPaddedElement, - trimBlockTrailingBr: trimBlockTrailingBr - }; - - var isEq$3 = FormatUtils.isEq; - var matchesUnInheritedFormatSelector = function (ed, node, name) { - var formatList = ed.formatter.get(name); - if (formatList) { - for (var i = 0; i < formatList.length; i++) { - if (formatList[i].inherit === false && ed.dom.is(node, formatList[i].selector)) { - return true; - } - } - } - return false; - }; - var matchParents = function (editor, node, name, vars) { - var root = editor.dom.getRoot(); - if (node === root) { - return false; - } - node = editor.dom.getParent(node, function (node) { - if (matchesUnInheritedFormatSelector(editor, node, name)) { - return true; - } - return node.parentNode === root || !!matchNode(editor, node, name, vars, true); - }); - return matchNode(editor, node, name, vars); - }; - var matchName = function (dom, node, format) { - if (isEq$3(node, format.inline)) { - return true; - } - if (isEq$3(node, format.block)) { - return true; - } - if (format.selector) { - return node.nodeType === 1 && dom.is(node, format.selector); - } - }; - var matchItems = function (dom, node, format, itemName, similar, vars) { - var key, value; - var items = format[itemName]; - var i; - if (format.onmatch) { - return format.onmatch(node, format, itemName); - } - if (items) { - if (typeof items.length === 'undefined') { - for (key in items) { - if (items.hasOwnProperty(key)) { - if (itemName === 'attributes') { - value = dom.getAttrib(node, key); - } else { - value = FormatUtils.getStyle(dom, node, key); - } - if (similar && !value && !format.exact) { - return; - } - if ((!similar || format.exact) && !isEq$3(value, FormatUtils.normalizeStyleValue(dom, FormatUtils.replaceVars(items[key], vars), key))) { - return; - } - } - } - } else { - for (i = 0; i < items.length; i++) { - if (itemName === 'attributes' ? dom.getAttrib(node, items[i]) : FormatUtils.getStyle(dom, node, items[i])) { - return format; - } - } - } - } - return format; - }; - var matchNode = function (ed, node, name, vars, similar) { - var formatList = ed.formatter.get(name); - var format, i, x, classes; - var dom = ed.dom; - if (formatList && node) { - for (i = 0; i < formatList.length; i++) { - format = formatList[i]; - if (matchName(ed.dom, node, format) && matchItems(dom, node, format, 'attributes', similar, vars) && matchItems(dom, node, format, 'styles', similar, vars)) { - if (classes = format.classes) { - for (x = 0; x < classes.length; x++) { - if (!ed.dom.hasClass(node, classes[x])) { - return; - } - } - } - return format; - } - } - } - }; - var match = function (editor, name, vars, node) { - var startNode; - if (node) { - return matchParents(editor, node, name, vars); - } - node = editor.selection.getNode(); - if (matchParents(editor, node, name, vars)) { - return true; - } - startNode = editor.selection.getStart(); - if (startNode !== node) { - if (matchParents(editor, startNode, name, vars)) { - return true; - } - } - return false; - }; - var matchAll = function (editor, names, vars) { - var startElement; - var matchedFormatNames = []; - var checkedMap = {}; - startElement = editor.selection.getStart(); - editor.dom.getParent(startElement, function (node) { - var i, name; - for (i = 0; i < names.length; i++) { - name = names[i]; - if (!checkedMap[name] && matchNode(editor, node, name, vars)) { - checkedMap[name] = true; - matchedFormatNames.push(name); - } - } - }, editor.dom.getRoot()); - return matchedFormatNames; - }; - var canApply = function (editor, name) { - var formatList = editor.formatter.get(name); - var startNode, parents, i, x, selector; - var dom = editor.dom; - if (formatList) { - startNode = editor.selection.getStart(); - parents = FormatUtils.getParents(dom, startNode); - for (x = formatList.length - 1; x >= 0; x--) { - selector = formatList[x].selector; - if (!selector || formatList[x].defaultBlock) { - return true; - } - for (i = parents.length - 1; i >= 0; i--) { - if (dom.is(parents[i], selector)) { - return true; - } - } - } - } - return false; - }; - var MatchFormat = { - matchNode: matchNode, - matchName: matchName, - match: match, - matchAll: matchAll, - canApply: canApply, - matchesUnInheritedFormatSelector: matchesUnInheritedFormatSelector - }; - - var splitText = function (node, offset) { - return node.splitText(offset); - }; - var split$1 = function (rng) { - var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset; - if (startContainer === endContainer && NodeType.isText(startContainer)) { - if (startOffset > 0 && startOffset < startContainer.nodeValue.length) { - endContainer = splitText(startContainer, startOffset); - startContainer = endContainer.previousSibling; - if (endOffset > startOffset) { - endOffset = endOffset - startOffset; - startContainer = endContainer = splitText(endContainer, endOffset).previousSibling; - endOffset = endContainer.nodeValue.length; - startOffset = 0; - } else { - endOffset = 0; - } - } - } else { - if (NodeType.isText(startContainer) && startOffset > 0 && startOffset < startContainer.nodeValue.length) { - startContainer = splitText(startContainer, startOffset); - startOffset = 0; - } - if (NodeType.isText(endContainer) && endOffset > 0 && endOffset < endContainer.nodeValue.length) { - endContainer = splitText(endContainer, endOffset).previousSibling; - endOffset = endContainer.nodeValue.length; - } - } - return { - startContainer: startContainer, - startOffset: startOffset, - endContainer: endContainer, - endOffset: endOffset - }; - }; - - var isCollapsibleWhitespace = function (c) { - return ' \f\n\r\t\x0B'.indexOf(c) !== -1; - }; - var normalizeContent = function (content, isStartOfContent, isEndOfContent) { - var result = foldl(content.split(''), function (acc, c) { - if (isCollapsibleWhitespace(c) || c === '\xA0') { - if (acc.previousCharIsSpace || acc.str === '' && isStartOfContent || acc.str.length === content.length - 1 && isEndOfContent) { - return { - previousCharIsSpace: false, - str: acc.str + '\xA0' - }; - } else { - return { - previousCharIsSpace: true, - str: acc.str + ' ' - }; - } - } else { - return { - previousCharIsSpace: false, - str: acc.str + c - }; - } - }, { - previousCharIsSpace: false, - str: '' - }); - return result.str; - }; - var normalize = function (node, offset, count) { - if (count === 0) { - return; - } - var whitespace = node.data.slice(offset, offset + count); - var isEndOfContent = offset + count >= node.data.length; - var isStartOfContent = offset === 0; - node.replaceData(offset, count, normalizeContent(whitespace, isStartOfContent, isEndOfContent)); - }; - var normalizeWhitespaceAfter = function (node, offset) { - var content = node.data.slice(offset); - var whitespaceCount = content.length - lTrim(content).length; - return normalize(node, offset, whitespaceCount); - }; - var normalizeWhitespaceBefore = function (node, offset) { - var content = node.data.slice(0, offset); - var whitespaceCount = content.length - rTrim(content).length; - return normalize(node, offset - whitespaceCount, whitespaceCount); - }; - var mergeTextNodes = function (prevNode, nextNode, normalizeWhitespace) { - var whitespaceOffset = rTrim(prevNode.data).length; - prevNode.appendData(nextNode.data); - remove$1(Element.fromDom(nextNode)); - if (normalizeWhitespace) { - normalizeWhitespaceAfter(prevNode, whitespaceOffset); - } - return prevNode; - }; - - var ancestor$2 = function (scope, selector, isRoot) { - return ancestor$1(scope, selector, isRoot).isSome(); - }; - - var hasWhitespacePreserveParent = function (rootNode, node) { - var rootElement = Element.fromDom(rootNode); - var startNode = Element.fromDom(node); - return ancestor$2(startNode, 'pre,code', curry(eq, rootElement)); - }; - var isWhitespace = function (rootNode, node) { - return NodeType.isText(node) && /^[ \t\r\n]*$/.test(node.data) && hasWhitespacePreserveParent(rootNode, node) === false; - }; - var isNamedAnchor = function (node) { - return NodeType.isElement(node) && node.nodeName === 'A' && node.hasAttribute('name'); - }; - var isContent$1 = function (rootNode, node) { - return isCaretCandidate(node) && isWhitespace(rootNode, node) === false || isNamedAnchor(node) || isBookmark(node); - }; - var isBookmark = NodeType.hasAttribute('data-mce-bookmark'); - var isBogus$2 = NodeType.hasAttribute('data-mce-bogus'); - var isBogusAll$1 = NodeType.hasAttributeValue('data-mce-bogus', 'all'); - var isEmptyNode = function (targetNode) { - var node, brCount = 0; - if (isContent$1(targetNode, targetNode)) { - return false; - } else { - node = targetNode.firstChild; - if (!node) { - return true; - } - var walker = new TreeWalker(node, targetNode); - do { - if (isBogusAll$1(node)) { - node = walker.next(true); - continue; - } - if (isBogus$2(node)) { - node = walker.next(); - continue; - } - if (NodeType.isBr(node)) { - brCount++; - node = walker.next(); - continue; - } - if (isContent$1(targetNode, node)) { - return false; - } - node = walker.next(); - } while (node); - return brCount <= 1; - } - }; - var isEmpty$1 = function (elm) { - return isEmptyNode(elm.dom()); - }; - var Empty = { isEmpty: isEmpty$1 }; - - var needsReposition = function (pos, elm) { - var container = pos.container(); - var offset = pos.offset(); - return CaretPosition$1.isTextPosition(pos) === false && container === elm.parentNode && offset > CaretPosition$1.before(elm).offset(); - }; - var reposition = function (elm, pos) { - return needsReposition(pos, elm) ? CaretPosition$1(pos.container(), pos.offset() - 1) : pos; - }; - var beforeOrStartOf = function (node) { - return NodeType.isText(node) ? CaretPosition$1(node, 0) : CaretPosition$1.before(node); - }; - var afterOrEndOf = function (node) { - return NodeType.isText(node) ? CaretPosition$1(node, node.data.length) : CaretPosition$1.after(node); - }; - var getPreviousSiblingCaretPosition = function (elm) { - if (isCaretCandidate(elm.previousSibling)) { - return Option.some(afterOrEndOf(elm.previousSibling)); - } else { - return elm.previousSibling ? CaretFinder.lastPositionIn(elm.previousSibling) : Option.none(); - } - }; - var getNextSiblingCaretPosition = function (elm) { - if (isCaretCandidate(elm.nextSibling)) { - return Option.some(beforeOrStartOf(elm.nextSibling)); - } else { - return elm.nextSibling ? CaretFinder.firstPositionIn(elm.nextSibling) : Option.none(); - } - }; - var findCaretPositionBackwardsFromElm = function (rootElement, elm) { - var startPosition = CaretPosition$1.before(elm.previousSibling ? elm.previousSibling : elm.parentNode); - return CaretFinder.prevPosition(rootElement, startPosition).fold(function () { - return CaretFinder.nextPosition(rootElement, CaretPosition$1.after(elm)); - }, Option.some); - }; - var findCaretPositionForwardsFromElm = function (rootElement, elm) { - return CaretFinder.nextPosition(rootElement, CaretPosition$1.after(elm)).fold(function () { - return CaretFinder.prevPosition(rootElement, CaretPosition$1.before(elm)); - }, Option.some); - }; - var findCaretPositionBackwards = function (rootElement, elm) { - return getPreviousSiblingCaretPosition(elm).orThunk(function () { - return getNextSiblingCaretPosition(elm); - }).orThunk(function () { - return findCaretPositionBackwardsFromElm(rootElement, elm); - }); - }; - var findCaretPositionForward = function (rootElement, elm) { - return getNextSiblingCaretPosition(elm).orThunk(function () { - return getPreviousSiblingCaretPosition(elm); - }).orThunk(function () { - return findCaretPositionForwardsFromElm(rootElement, elm); - }); - }; - var findCaretPosition$1 = function (forward, rootElement, elm) { - return forward ? findCaretPositionForward(rootElement, elm) : findCaretPositionBackwards(rootElement, elm); - }; - var findCaretPosOutsideElmAfterDelete = function (forward, rootElement, elm) { - return findCaretPosition$1(forward, rootElement, elm).map(curry(reposition, elm)); - }; - var setSelection = function (editor, forward, pos) { - pos.fold(function () { - editor.focus(); - }, function (pos) { - editor.selection.setRng(pos.toRange(), forward); - }); - }; - var eqRawNode = function (rawNode) { - return function (elm) { - return elm.dom() === rawNode; - }; - }; - var isBlock$2 = function (editor, elm) { - return elm && editor.schema.getBlockElements().hasOwnProperty(name(elm)); - }; - var paddEmptyBlock = function (elm) { - if (Empty.isEmpty(elm)) { - var br = Element.fromHtml('
'); - empty(elm); - append(elm, br); - return Option.some(CaretPosition$1.before(br.dom())); - } else { - return Option.none(); - } - }; - var deleteNormalized = function (elm, afterDeletePosOpt, normalizeWhitespace) { - var prevTextOpt = prevSibling(elm).filter(function (e) { - return NodeType.isText(e.dom()); - }); - var nextTextOpt = nextSibling(elm).filter(function (e) { - return NodeType.isText(e.dom()); - }); - remove$1(elm); - return liftN([ - prevTextOpt, - nextTextOpt, - afterDeletePosOpt - ], function (prev, next, pos) { - var prevNode = prev.dom(), nextNode = next.dom(); - var offset = prevNode.data.length; - mergeTextNodes(prevNode, nextNode, normalizeWhitespace); - return pos.container() === nextNode ? CaretPosition$1(prevNode, offset) : pos; - }).orThunk(function () { - if (normalizeWhitespace) { - prevTextOpt.each(function (elm) { - return normalizeWhitespaceBefore(elm.dom(), elm.dom().length); - }); - nextTextOpt.each(function (elm) { - return normalizeWhitespaceAfter(elm.dom(), 0); - }); - } - return afterDeletePosOpt; - }); - }; - var isInlineElement = function (editor, element) { - return has(editor.schema.getTextInlineElements(), name(element)); - }; - var deleteElement = function (editor, forward, elm, moveCaret) { - if (moveCaret === void 0) { - moveCaret = true; - } - var afterDeletePos = findCaretPosOutsideElmAfterDelete(forward, editor.getBody(), elm.dom()); - var parentBlock = ancestor(elm, curry(isBlock$2, editor), eqRawNode(editor.getBody())); - var normalizedAfterDeletePos = deleteNormalized(elm, afterDeletePos, isInlineElement(editor, elm)); - if (editor.dom.isEmpty(editor.getBody())) { - editor.setContent(''); - editor.selection.setCursorLocation(); - } else { - parentBlock.bind(paddEmptyBlock).fold(function () { - if (moveCaret) { - setSelection(editor, forward, normalizedAfterDeletePos); - } - }, function (paddPos) { - if (moveCaret) { - setSelection(editor, forward, Option.some(paddPos)); - } - }); - } - }; - var DeleteElement = { deleteElement: deleteElement }; - - var ZWSP$1 = Zwsp.ZWSP, CARET_ID$1 = '_mce_caret'; - var importNode = function (ownerDocument, node) { - return ownerDocument.importNode(node, true); - }; - var getEmptyCaretContainers = function (node) { - var nodes = []; - while (node) { - if (node.nodeType === 3 && node.nodeValue !== ZWSP$1 || node.childNodes.length > 1) { - return []; - } - if (node.nodeType === 1) { - nodes.push(node); - } - node = node.firstChild; - } - return nodes; - }; - var isCaretContainerEmpty = function (node) { - return getEmptyCaretContainers(node).length > 0; - }; - var findFirstTextNode = function (node) { - if (node) { - var walker = new TreeWalker(node, node); - for (node = walker.current(); node; node = walker.next()) { - if (node.nodeType === 3) { - return node; - } - } - } - return null; - }; - var createCaretContainer = function (fill) { - var caretContainer = Element.fromTag('span'); - setAll(caretContainer, { - 'id': CARET_ID$1, - 'data-mce-bogus': '1', - 'data-mce-type': 'format-caret' - }); - if (fill) { - append(caretContainer, Element.fromText(ZWSP$1)); - } - return caretContainer; - }; - var trimZwspFromCaretContainer = function (caretContainerNode) { - var textNode = findFirstTextNode(caretContainerNode); - if (textNode && textNode.nodeValue.charAt(0) === ZWSP$1) { - textNode.deleteData(0, 1); - } - return textNode; - }; - var removeCaretContainerNode = function (editor, node, moveCaret) { - if (moveCaret === void 0) { - moveCaret = true; - } - var dom = editor.dom, selection = editor.selection; - if (isCaretContainerEmpty(node)) { - DeleteElement.deleteElement(editor, false, Element.fromDom(node), moveCaret); - } else { - var rng = selection.getRng(); - var block = dom.getParent(node, dom.isBlock); - var textNode = trimZwspFromCaretContainer(node); - if (rng.startContainer === textNode && rng.startOffset > 0) { - rng.setStart(textNode, rng.startOffset - 1); - } - if (rng.endContainer === textNode && rng.endOffset > 0) { - rng.setEnd(textNode, rng.endOffset - 1); - } - dom.remove(node, true); - if (block && dom.isEmpty(block)) { - PaddingBr.fillWithPaddingBr(Element.fromDom(block)); - } - selection.setRng(rng); - } - }; - var removeCaretContainer = function (editor, node, moveCaret) { - if (moveCaret === void 0) { - moveCaret = true; - } - var dom = editor.dom, selection = editor.selection; - if (!node) { - node = getParentCaretContainer(editor.getBody(), selection.getStart()); - if (!node) { - while (node = dom.get(CARET_ID$1)) { - removeCaretContainerNode(editor, node, false); - } - } - } else { - removeCaretContainerNode(editor, node, moveCaret); - } - }; - var insertCaretContainerNode = function (editor, caretContainer, formatNode) { - var dom = editor.dom, block = dom.getParent(formatNode, curry(FormatUtils.isTextBlock, editor)); - if (block && dom.isEmpty(block)) { - formatNode.parentNode.replaceChild(caretContainer, formatNode); - } else { - PaddingBr.removeTrailingBr(Element.fromDom(formatNode)); - if (dom.isEmpty(formatNode)) { - formatNode.parentNode.replaceChild(caretContainer, formatNode); - } else { - dom.insertAfter(caretContainer, formatNode); - } - } - }; - var appendNode = function (parentNode, node) { - parentNode.appendChild(node); - return node; - }; - var insertFormatNodesIntoCaretContainer = function (formatNodes, caretContainer) { - var innerMostFormatNode = foldr(formatNodes, function (parentNode, formatNode) { - return appendNode(parentNode, formatNode.cloneNode(false)); - }, caretContainer); - return appendNode(innerMostFormatNode, innerMostFormatNode.ownerDocument.createTextNode(ZWSP$1)); - }; - var applyCaretFormat = function (editor, name, vars) { - var rng, caretContainer, textNode, offset, bookmark, container, text; - var selection = editor.selection; - rng = selection.getRng(); - offset = rng.startOffset; - container = rng.startContainer; - text = container.nodeValue; - caretContainer = getParentCaretContainer(editor.getBody(), selection.getStart()); - if (caretContainer) { - textNode = findFirstTextNode(caretContainer); - } - var wordcharRegex = /[^\s\u00a0\u00ad\u200b\ufeff]/; - if (text && offset > 0 && offset < text.length && wordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) { - bookmark = selection.getBookmark(); - rng.collapse(true); - rng = ExpandRange.expandRng(editor, rng, editor.formatter.get(name)); - rng = split$1(rng); - editor.formatter.apply(name, vars, rng); - selection.moveToBookmark(bookmark); - } else { - if (!caretContainer || textNode.nodeValue !== ZWSP$1) { - caretContainer = importNode(editor.getDoc(), createCaretContainer(true).dom()); - textNode = caretContainer.firstChild; - rng.insertNode(caretContainer); - offset = 1; - editor.formatter.apply(name, vars, caretContainer); - } else { - editor.formatter.apply(name, vars, caretContainer); - } - selection.setCursorLocation(textNode, offset); - } - }; - var removeCaretFormat = function (editor, name, vars, similar) { - var dom = editor.dom, selection = editor.selection; - var container, offset, bookmark; - var hasContentAfter, node, formatNode; - var parents = [], rng = selection.getRng(); - var caretContainer; - container = rng.startContainer; - offset = rng.startOffset; - node = container; - if (container.nodeType === 3) { - if (offset !== container.nodeValue.length) { - hasContentAfter = true; - } - node = node.parentNode; - } - while (node) { - if (MatchFormat.matchNode(editor, node, name, vars, similar)) { - formatNode = node; - break; - } - if (node.nextSibling) { - hasContentAfter = true; - } - parents.push(node); - node = node.parentNode; - } - if (!formatNode) { - return; - } - if (hasContentAfter) { - bookmark = selection.getBookmark(); - rng.collapse(true); - var expandedRng = ExpandRange.expandRng(editor, rng, editor.formatter.get(name), true); - expandedRng = split$1(expandedRng); - editor.formatter.remove(name, vars, expandedRng); - selection.moveToBookmark(bookmark); - } else { - caretContainer = getParentCaretContainer(editor.getBody(), formatNode); - var newCaretContainer = createCaretContainer(false).dom(); - var caretNode = insertFormatNodesIntoCaretContainer(parents, newCaretContainer); - if (caretContainer) { - insertCaretContainerNode(editor, newCaretContainer, caretContainer); - } else { - insertCaretContainerNode(editor, newCaretContainer, formatNode); - } - removeCaretContainerNode(editor, caretContainer, false); - selection.setCursorLocation(caretNode, 1); - if (dom.isEmpty(formatNode)) { - dom.remove(formatNode); - } - } - }; - var disableCaretContainer = function (editor, keyCode) { - var selection = editor.selection, body = editor.getBody(); - removeCaretContainer(editor, null, false); - if ((keyCode === 8 || keyCode === 46) && selection.isCollapsed() && selection.getStart().innerHTML === ZWSP$1) { - removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart())); - } - if (keyCode === 37 || keyCode === 39) { - removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart())); - } - }; - var setup$4 = function (editor) { - editor.on('mouseup keydown', function (e) { - disableCaretContainer(editor, e.keyCode); - }); - }; - var replaceWithCaretFormat = function (targetNode, formatNodes) { - var caretContainer = createCaretContainer(false); - var innerMost = insertFormatNodesIntoCaretContainer(formatNodes, caretContainer.dom()); - before(Element.fromDom(targetNode), caretContainer); - remove$1(Element.fromDom(targetNode)); - return CaretPosition$1(innerMost, 0); - }; - var isFormatElement = function (editor, element) { - var inlineElements = editor.schema.getTextInlineElements(); - return inlineElements.hasOwnProperty(name(element)) && !isCaretNode(element.dom()) && !NodeType.isBogus(element.dom()); - }; - var isEmptyCaretFormatElement = function (element) { - return isCaretNode(element.dom()) && isCaretContainerEmpty(element.dom()); - }; - - var postProcessHooks = {}, filter$3 = ArrUtils.filter, each$9 = ArrUtils.each; - var addPostProcessHook = function (name, hook) { - var hooks = postProcessHooks[name]; - if (!hooks) { - postProcessHooks[name] = hooks = []; - } - postProcessHooks[name].push(hook); - }; - var postProcess = function (name, editor) { - each$9(postProcessHooks[name], function (hook) { - hook(editor); - }); - }; - addPostProcessHook('pre', function (editor) { - var rng = editor.selection.getRng(); - var isPre, blocks; - var hasPreSibling = function (pre) { - return isPre(pre.previousSibling) && ArrUtils.indexOf(blocks, pre.previousSibling) !== -1; - }; - var joinPre = function (pre1, pre2) { - DomQuery(pre2).remove(); - DomQuery(pre1).append('

').append(pre2.childNodes); - }; - isPre = NodeType.matchNodeNames('pre'); - if (!rng.collapsed) { - blocks = editor.selection.getSelectedBlocks(); - each$9(filter$3(filter$3(blocks, isPre), hasPreSibling), function (pre) { - joinPre(pre.previousSibling, pre); - }); - } - }); - var Hooks = { postProcess: postProcess }; - - var each$a = Tools.each; - var ElementUtils = function (dom) { - this.compare = function (node1, node2) { - if (node1.nodeName !== node2.nodeName) { - return false; - } - var getAttribs = function (node) { - var attribs = {}; - each$a(dom.getAttribs(node), function (attr) { - var name = attr.nodeName.toLowerCase(); - if (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) { - attribs[name] = dom.getAttrib(node, name); - } - }); - return attribs; - }; - var compareObjects = function (obj1, obj2) { - var value, name; - for (name in obj1) { - if (obj1.hasOwnProperty(name)) { - value = obj2[name]; - if (typeof value === 'undefined') { - return false; - } - if (obj1[name] !== value) { - return false; - } - delete obj2[name]; - } - } - for (name in obj2) { - if (obj2.hasOwnProperty(name)) { - return false; - } - } - return true; - }; - if (!compareObjects(getAttribs(node1), getAttribs(node2))) { - return false; - } - if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) { - return false; - } - return !Bookmarks.isBookmarkNode(node1) && !Bookmarks.isBookmarkNode(node2); - }; - }; - - var MCE_ATTR_RE = /^(src|href|style)$/; - var each$b = Tools.each; - var isEq$4 = FormatUtils.isEq; - var isTableCell$2 = function (node) { - return /^(TH|TD)$/.test(node.nodeName); - }; - var isChildOfInlineParent = function (dom, node, parent) { - return dom.isChildOf(node, parent) && node !== parent && !dom.isBlock(parent); - }; - var getContainer = function (ed, rng, start) { - var container, offset, lastIdx; - container = rng[start ? 'startContainer' : 'endContainer']; - offset = rng[start ? 'startOffset' : 'endOffset']; - if (NodeType.isElement(container)) { - lastIdx = container.childNodes.length - 1; - if (!start && offset) { - offset--; - } - container = container.childNodes[offset > lastIdx ? lastIdx : offset]; - } - if (NodeType.isText(container) && start && offset >= container.nodeValue.length) { - container = new TreeWalker(container, ed.getBody()).next() || container; - } - if (NodeType.isText(container) && !start && offset === 0) { - container = new TreeWalker(container, ed.getBody()).prev() || container; - } - return container; - }; - var wrap$2 = function (dom, node, name, attrs) { - var wrapper = dom.create(name, attrs); - node.parentNode.insertBefore(wrapper, node); - wrapper.appendChild(node); - return wrapper; - }; - var wrapWithSiblings = function (dom, node, next, name, attrs) { - var start = Element.fromDom(node); - var wrapper = Element.fromDom(dom.create(name, attrs)); - var siblings = next ? nextSiblings(start) : prevSiblings(start); - append$1(wrapper, siblings); - if (next) { - before(start, wrapper); - prepend(wrapper, start); - } else { - after(start, wrapper); - append(wrapper, start); - } - return wrapper.dom(); - }; - var matchName$1 = function (dom, node, format) { - if (isEq$4(node, format.inline)) { - return true; - } - if (isEq$4(node, format.block)) { - return true; - } - if (format.selector) { - return NodeType.isElement(node) && dom.is(node, format.selector); - } - }; - var isColorFormatAndAnchor = function (node, format) { - return format.links && node.tagName === 'A'; - }; - var find$3 = function (dom, node, next, inc) { - node = FormatUtils.getNonWhiteSpaceSibling(node, next, inc); - return !node || (node.nodeName === 'BR' || dom.isBlock(node)); - }; - var removeNode$1 = function (ed, node, format) { - var parentNode = node.parentNode; - var rootBlockElm; - var dom = ed.dom, forcedRootBlock = Settings.getForcedRootBlock(ed); - if (format.block) { - if (!forcedRootBlock) { - if (dom.isBlock(node) && !dom.isBlock(parentNode)) { - if (!find$3(dom, node, false) && !find$3(dom, node.firstChild, true, 1)) { - node.insertBefore(dom.create('br'), node.firstChild); - } - if (!find$3(dom, node, true) && !find$3(dom, node.lastChild, false, 1)) { - node.appendChild(dom.create('br')); - } - } - } else { - if (parentNode === dom.getRoot()) { - if (!format.list_block || !isEq$4(node, format.list_block)) { - each$b(Tools.grep(node.childNodes), function (node) { - if (FormatUtils.isValid(ed, forcedRootBlock, node.nodeName.toLowerCase())) { - if (!rootBlockElm) { - rootBlockElm = wrap$2(dom, node, forcedRootBlock); - dom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs); - } else { - rootBlockElm.appendChild(node); - } - } else { - rootBlockElm = 0; - } - }); - } - } - } - } - if (format.selector && format.inline && !isEq$4(format.inline, node)) { - return; - } - dom.remove(node, 1); - }; - var removeFormat = function (ed, format, vars, node, compareNode) { - var i, attrs, stylesModified; - var dom = ed.dom; - if (!matchName$1(dom, node, format) && !isColorFormatAndAnchor(node, format)) { - return false; - } - if (format.remove !== 'all') { - each$b(format.styles, function (value, name) { - value = FormatUtils.normalizeStyleValue(dom, FormatUtils.replaceVars(value, vars), name); - if (typeof name === 'number') { - name = value; - compareNode = 0; - } - if (format.remove_similar || (!compareNode || isEq$4(FormatUtils.getStyle(dom, compareNode, name), value))) { - dom.setStyle(node, name, ''); - } - stylesModified = 1; - }); - if (stylesModified && dom.getAttrib(node, 'style') === '') { - node.removeAttribute('style'); - node.removeAttribute('data-mce-style'); - } - each$b(format.attributes, function (value, name) { - var valueOut; - value = FormatUtils.replaceVars(value, vars); - if (typeof name === 'number') { - name = value; - compareNode = 0; - } - if (!compareNode || isEq$4(dom.getAttrib(compareNode, name), value)) { - if (name === 'class') { - value = dom.getAttrib(node, name); - if (value) { - valueOut = ''; - each$b(value.split(/\s+/), function (cls) { - if (/mce\-\w+/.test(cls)) { - valueOut += (valueOut ? ' ' : '') + cls; - } - }); - if (valueOut) { - dom.setAttrib(node, name, valueOut); - return; - } - } - } - if (name === 'class') { - node.removeAttribute('className'); - } - if (MCE_ATTR_RE.test(name)) { - node.removeAttribute('data-mce-' + name); - } - node.removeAttribute(name); - } - }); - each$b(format.classes, function (value) { - value = FormatUtils.replaceVars(value, vars); - if (!compareNode || dom.hasClass(compareNode, value)) { - dom.removeClass(node, value); - } - }); - attrs = dom.getAttribs(node); - for (i = 0; i < attrs.length; i++) { - var attrName = attrs[i].nodeName; - if (attrName.indexOf('_') !== 0 && attrName.indexOf('data-') !== 0) { - return false; - } - } - } - if (format.remove !== 'none') { - removeNode$1(ed, node, format); - return true; - } - }; - var findFormatRoot = function (editor, container, name, vars, similar) { - var formatRoot; - each$b(FormatUtils.getParents(editor.dom, container.parentNode).reverse(), function (parent) { - var format; - if (!formatRoot && parent.id !== '_start' && parent.id !== '_end') { - format = MatchFormat.matchNode(editor, parent, name, vars, similar); - if (format && format.split !== false) { - formatRoot = parent; - } - } - }); - return formatRoot; - }; - var wrapAndSplit = function (editor, formatList, formatRoot, container, target, split, format, vars) { - var parent, clone, lastClone, firstClone, i, formatRootParent; - var dom = editor.dom; - if (formatRoot) { - formatRootParent = formatRoot.parentNode; - for (parent = container.parentNode; parent && parent !== formatRootParent; parent = parent.parentNode) { - clone = dom.clone(parent, false); - for (i = 0; i < formatList.length; i++) { - if (removeFormat(editor, formatList[i], vars, clone, clone)) { - clone = 0; - break; - } - } - if (clone) { - if (lastClone) { - clone.appendChild(lastClone); - } - if (!firstClone) { - firstClone = clone; - } - lastClone = clone; - } - } - if (split && (!format.mixed || !dom.isBlock(formatRoot))) { - container = dom.split(formatRoot, container); - } - if (lastClone) { - target.parentNode.insertBefore(lastClone, target); - firstClone.appendChild(target); - } - } - return container; - }; - var remove$7 = function (ed, name, vars, node, similar) { - var formatList = ed.formatter.get(name), format = formatList[0]; - var bookmark, rng, contentEditable = true; - var dom = ed.dom; - var selection = ed.selection; - var splitToFormatRoot = function (container) { - var formatRoot = findFormatRoot(ed, container, name, vars, similar); - return wrapAndSplit(ed, formatList, formatRoot, container, container, true, format, vars); - }; - var isRemoveBookmarkNode = function (node) { - return Bookmarks.isBookmarkNode(node) && NodeType.isElement(node) && (node.id === '_start' || node.id === '_end'); - }; - var process = function (node) { - var children, i, l, lastContentEditable, hasContentEditableState; - if (NodeType.isElement(node) && dom.getContentEditable(node)) { - lastContentEditable = contentEditable; - contentEditable = dom.getContentEditable(node) === 'true'; - hasContentEditableState = true; - } - children = Tools.grep(node.childNodes); - if (contentEditable && !hasContentEditableState) { - for (i = 0, l = formatList.length; i < l; i++) { - if (removeFormat(ed, formatList[i], vars, node, node)) { - break; - } - } - } - if (format.deep) { - if (children.length) { - for (i = 0, l = children.length; i < l; i++) { - process(children[i]); - } - if (hasContentEditableState) { - contentEditable = lastContentEditable; - } - } - } - }; - var unwrap = function (start) { - var node = dom.get(start ? '_start' : '_end'); - var out = node[start ? 'firstChild' : 'lastChild']; - if (isRemoveBookmarkNode(out)) { - out = out[start ? 'firstChild' : 'lastChild']; - } - if (NodeType.isText(out) && out.data.length === 0) { - out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling; - } - dom.remove(node, true); - return out; - }; - var removeRngStyle = function (rng) { - var startContainer, endContainer; - var commonAncestorContainer = rng.commonAncestorContainer; - rng = ExpandRange.expandRng(ed, rng, formatList, true); - if (format.split) { - rng = split$1(rng); - startContainer = getContainer(ed, rng, true); - endContainer = getContainer(ed, rng); - if (startContainer !== endContainer) { - if (/^(TR|TH|TD)$/.test(startContainer.nodeName) && startContainer.firstChild) { - if (startContainer.nodeName === 'TR') { - startContainer = startContainer.firstChild.firstChild || startContainer; - } else { - startContainer = startContainer.firstChild || startContainer; - } - } - if (commonAncestorContainer && /^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) && isTableCell$2(endContainer) && endContainer.firstChild) { - endContainer = endContainer.firstChild || endContainer; - } - if (isChildOfInlineParent(dom, startContainer, endContainer)) { - var marker = Option.from(startContainer.firstChild).getOr(startContainer); - splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', { - 'id': '_start', - 'data-mce-type': 'bookmark' - })); - unwrap(true); - return; - } - if (isChildOfInlineParent(dom, endContainer, startContainer)) { - var marker = Option.from(endContainer.lastChild).getOr(endContainer); - splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', { - 'id': '_end', - 'data-mce-type': 'bookmark' - })); - unwrap(false); - return; - } - startContainer = wrap$2(dom, startContainer, 'span', { - 'id': '_start', - 'data-mce-type': 'bookmark' - }); - endContainer = wrap$2(dom, endContainer, 'span', { - 'id': '_end', - 'data-mce-type': 'bookmark' - }); - splitToFormatRoot(startContainer); - splitToFormatRoot(endContainer); - startContainer = unwrap(true); - endContainer = unwrap(); - } else { - startContainer = endContainer = splitToFormatRoot(startContainer); - } - rng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer; - rng.startOffset = dom.nodeIndex(startContainer); - rng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer; - rng.endOffset = dom.nodeIndex(endContainer) + 1; - } - RangeWalk.walk(dom, rng, function (nodes) { - each$b(nodes, function (node) { - process(node); - if (NodeType.isElement(node) && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && FormatUtils.getTextDecoration(dom, node.parentNode) === 'underline') { - removeFormat(ed, { - deep: false, - exact: true, - inline: 'span', - styles: { textDecoration: 'underline' } - }, null, node); - } - }); - }); - }; - if (node) { - if (node.nodeType) { - rng = dom.createRng(); - rng.setStartBefore(node); - rng.setEndAfter(node); - removeRngStyle(rng); - } else { - removeRngStyle(node); - } - return; - } - if (dom.getContentEditable(selection.getNode()) === 'false') { - node = selection.getNode(); - for (var i = 0, l = formatList.length; i < l; i++) { - if (formatList[i].ceFalseOverride) { - if (removeFormat(ed, formatList[i], vars, node, node)) { - break; - } - } - } - return; - } - if (!selection.isCollapsed() || !format.inline || dom.select('td[data-mce-selected],th[data-mce-selected]').length) { - bookmark = GetBookmark.getPersistentBookmark(ed.selection, true); - removeRngStyle(selection.getRng()); - selection.moveToBookmark(bookmark); - if (format.inline && MatchFormat.match(ed, name, vars, selection.getStart())) { - FormatUtils.moveStart(dom, selection, selection.getRng()); - } - ed.nodeChanged(); - } else { - removeCaretFormat(ed, name, vars, similar); - } - }; - var RemoveFormat = { - removeFormat: removeFormat, - remove: remove$7 - }; - - var each$c = Tools.each; - var isElementNode = function (node) { - return node && node.nodeType === 1 && !Bookmarks.isBookmarkNode(node) && !isCaretNode(node) && !NodeType.isBogus(node); - }; - var findElementSibling = function (node, siblingName) { - var sibling; - for (sibling = node; sibling; sibling = sibling[siblingName]) { - if (sibling.nodeType === 3 && sibling.nodeValue.length !== 0) { - return node; - } - if (sibling.nodeType === 1 && !Bookmarks.isBookmarkNode(sibling)) { - return sibling; - } - } - return node; - }; - var mergeSiblingsNodes = function (dom, prev, next) { - var sibling, tmpSibling; - var elementUtils = new ElementUtils(dom); - if (prev && next) { - prev = findElementSibling(prev, 'previousSibling'); - next = findElementSibling(next, 'nextSibling'); - if (elementUtils.compare(prev, next)) { - for (sibling = prev.nextSibling; sibling && sibling !== next;) { - tmpSibling = sibling; - sibling = sibling.nextSibling; - prev.appendChild(tmpSibling); - } - dom.remove(next); - Tools.each(Tools.grep(next.childNodes), function (node) { - prev.appendChild(node); - }); - return prev; - } - } - return next; - }; - var processChildElements = function (node, filter, process) { - each$c(node.childNodes, function (node) { - if (isElementNode(node)) { - if (filter(node)) { - process(node); - } - if (node.hasChildNodes()) { - processChildElements(node, filter, process); - } - } - }); - }; - var hasStyle = function (dom, name) { - return curry(function (name, node) { - return !!(node && FormatUtils.getStyle(dom, node, name)); - }, name); - }; - var applyStyle = function (dom, name, value) { - return curry(function (name, value, node) { - dom.setStyle(node, name, value); - if (node.getAttribute('style') === '') { - node.removeAttribute('style'); - } - unwrapEmptySpan(dom, node); - }, name, value); - }; - var unwrapEmptySpan = function (dom, node) { - if (node.nodeName === 'SPAN' && dom.getAttribs(node).length === 0) { - dom.remove(node, true); - } - }; - var processUnderlineAndColor = function (dom, node) { - var textDecoration; - if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) { - textDecoration = FormatUtils.getTextDecoration(dom, node.parentNode); - if (dom.getStyle(node, 'color') && textDecoration) { - dom.setStyle(node, 'text-decoration', textDecoration); - } else if (dom.getStyle(node, 'text-decoration') === textDecoration) { - dom.setStyle(node, 'text-decoration', null); - } - } - }; - var mergeUnderlineAndColor = function (dom, format, vars, node) { - if (format.styles.color || format.styles.textDecoration) { - Tools.walk(node, curry(processUnderlineAndColor, dom), 'childNodes'); - processUnderlineAndColor(dom, node); - } - }; - var mergeBackgroundColorAndFontSize = function (dom, format, vars, node) { - if (format.styles && format.styles.backgroundColor) { - processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'backgroundColor', FormatUtils.replaceVars(format.styles.backgroundColor, vars))); - } - }; - var mergeSubSup = function (dom, format, vars, node) { - if (format.inline === 'sub' || format.inline === 'sup') { - processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'fontSize', '')); - dom.remove(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), true); - } - }; - var mergeSiblings = function (dom, format, vars, node) { - if (node && format.merge_siblings !== false) { - node = mergeSiblingsNodes(dom, FormatUtils.getNonWhiteSpaceSibling(node), node); - node = mergeSiblingsNodes(dom, node, FormatUtils.getNonWhiteSpaceSibling(node, true)); - } - }; - var clearChildStyles = function (dom, format, node) { - if (format.clear_child_styles) { - var selector = format.links ? '*:not(a)' : '*'; - each$c(dom.select(selector, node), function (node) { - if (isElementNode(node)) { - each$c(format.styles, function (value, name) { - dom.setStyle(node, name, ''); - }); - } - }); - } - }; - var mergeWithChildren = function (editor, formatList, vars, node) { - each$c(formatList, function (format) { - each$c(editor.dom.select(format.inline, node), function (child) { - if (!isElementNode(child)) { - return; - } - RemoveFormat.removeFormat(editor, format, vars, child, format.exact ? child : null); - }); - clearChildStyles(editor.dom, format, node); - }); - }; - var mergeWithParents = function (editor, format, name, vars, node) { - if (MatchFormat.matchNode(editor, node.parentNode, name, vars)) { - if (RemoveFormat.removeFormat(editor, format, vars, node)) { - return; - } - } - if (format.merge_with_parents) { - editor.dom.getParent(node.parentNode, function (parent) { - if (MatchFormat.matchNode(editor, parent, name, vars)) { - RemoveFormat.removeFormat(editor, format, vars, node); - return true; - } - }); - } - }; - var MergeFormats = { - mergeWithChildren: mergeWithChildren, - mergeUnderlineAndColor: mergeUnderlineAndColor, - mergeBackgroundColorAndFontSize: mergeBackgroundColorAndFontSize, - mergeSubSup: mergeSubSup, - mergeSiblings: mergeSiblings, - mergeWithParents: mergeWithParents - }; - - var createRange$1 = function (sc, so, ec, eo) { - var rng = domGlobals.document.createRange(); - rng.setStart(sc, so); - rng.setEnd(ec, eo); - return rng; - }; - var normalizeBlockSelectionRange = function (rng) { - var startPos = CaretPosition$1.fromRangeStart(rng); - var endPos = CaretPosition$1.fromRangeEnd(rng); - var rootNode = rng.commonAncestorContainer; - return CaretFinder.fromPosition(false, rootNode, endPos).map(function (newEndPos) { - if (!isInSameBlock(startPos, endPos, rootNode) && isInSameBlock(startPos, newEndPos, rootNode)) { - return createRange$1(startPos.container(), startPos.offset(), newEndPos.container(), newEndPos.offset()); - } else { - return rng; - } - }).getOr(rng); - }; - var normalize$1 = function (rng) { - return rng.collapsed ? rng : normalizeBlockSelectionRange(rng); - }; - var RangeNormalizer = { normalize: normalize$1 }; - - var each$d = Tools.each; - var isElementNode$1 = function (node) { - return node && node.nodeType === 1 && !Bookmarks.isBookmarkNode(node) && !isCaretNode(node) && !NodeType.isBogus(node); - }; - var applyFormat = function (ed, name, vars, node) { - var formatList = ed.formatter.get(name); - var format = formatList[0]; - var bookmark, rng; - var isCollapsed = !node && ed.selection.isCollapsed(); - var dom = ed.dom, selection = ed.selection; - var setElementFormat = function (elm, fmt) { - fmt = fmt || format; - if (elm) { - if (fmt.onformat) { - fmt.onformat(elm, fmt, vars, node); - } - each$d(fmt.styles, function (value, name) { - dom.setStyle(elm, name, FormatUtils.replaceVars(value, vars)); - }); - if (fmt.styles) { - var styleVal = dom.getAttrib(elm, 'style'); - if (styleVal) { - elm.setAttribute('data-mce-style', styleVal); - } - } - each$d(fmt.attributes, function (value, name) { - dom.setAttrib(elm, name, FormatUtils.replaceVars(value, vars)); - }); - each$d(fmt.classes, function (value) { - value = FormatUtils.replaceVars(value, vars); - if (!dom.hasClass(elm, value)) { - dom.addClass(elm, value); - } - }); - } - }; - var applyNodeStyle = function (formatList, node) { - var found = false; - if (!format.selector) { - return false; - } - each$d(formatList, function (format) { - if ('collapsed' in format && format.collapsed !== isCollapsed) { - return; - } - if (dom.is(node, format.selector) && !isCaretNode(node)) { - setElementFormat(node, format); - found = true; - return false; - } - }); - return found; - }; - var applyRngStyle = function (dom, rng, bookmark, nodeSpecific) { - var newWrappers = []; - var wrapName, wrapElm, contentEditable = true; - wrapName = format.inline || format.block; - wrapElm = dom.create(wrapName); - setElementFormat(wrapElm); - RangeWalk.walk(dom, rng, function (nodes) { - var currentWrapElm; - var process = function (node) { - var nodeName, parentName, hasContentEditableState, lastContentEditable; - lastContentEditable = contentEditable; - nodeName = node.nodeName.toLowerCase(); - parentName = node.parentNode.nodeName.toLowerCase(); - if (node.nodeType === 1 && dom.getContentEditable(node)) { - lastContentEditable = contentEditable; - contentEditable = dom.getContentEditable(node) === 'true'; - hasContentEditableState = true; - } - if (FormatUtils.isEq(nodeName, 'br')) { - currentWrapElm = 0; - if (format.block) { - dom.remove(node); - } - return; - } - if (format.wrapper && MatchFormat.matchNode(ed, node, name, vars)) { - currentWrapElm = 0; - return; - } - if (contentEditable && !hasContentEditableState && format.block && !format.wrapper && FormatUtils.isTextBlock(ed, nodeName) && FormatUtils.isValid(ed, parentName, wrapName)) { - node = dom.rename(node, wrapName); - setElementFormat(node); - newWrappers.push(node); - currentWrapElm = 0; - return; - } - if (format.selector) { - var found = applyNodeStyle(formatList, node); - if (!format.inline || found) { - currentWrapElm = 0; - return; - } - } - if (contentEditable && !hasContentEditableState && FormatUtils.isValid(ed, wrapName, nodeName) && FormatUtils.isValid(ed, parentName, wrapName) && !(!nodeSpecific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node) && (!format.inline || !dom.isBlock(node))) { - if (!currentWrapElm) { - currentWrapElm = dom.clone(wrapElm, false); - node.parentNode.insertBefore(currentWrapElm, node); - newWrappers.push(currentWrapElm); - } - currentWrapElm.appendChild(node); - } else { - currentWrapElm = 0; - each$d(Tools.grep(node.childNodes), process); - if (hasContentEditableState) { - contentEditable = lastContentEditable; - } - currentWrapElm = 0; - } - }; - each$d(nodes, process); - }); - if (format.links === true) { - each$d(newWrappers, function (node) { - var process = function (node) { - if (node.nodeName === 'A') { - setElementFormat(node, format); - } - each$d(Tools.grep(node.childNodes), process); - }; - process(node); - }); - } - each$d(newWrappers, function (node) { - var childCount; - var getChildCount = function (node) { - var count = 0; - each$d(node.childNodes, function (node) { - if (!FormatUtils.isWhiteSpaceNode(node) && !Bookmarks.isBookmarkNode(node)) { - count++; - } - }); - return count; - }; - var getChildElementNode = function (root) { - var child = false; - each$d(root.childNodes, function (node) { - if (isElementNode$1(node)) { - child = node; - return false; - } - }); - return child; - }; - var mergeStyles = function (node) { - var child, clone; - child = getChildElementNode(node); - if (child && !Bookmarks.isBookmarkNode(child) && MatchFormat.matchName(dom, child, format)) { - clone = dom.clone(child, false); - setElementFormat(clone); - dom.replace(clone, node, true); - dom.remove(child, 1); - } - return clone || node; - }; - childCount = getChildCount(node); - if ((newWrappers.length > 1 || !dom.isBlock(node)) && childCount === 0) { - dom.remove(node, 1); - return; - } - if (format.inline || format.wrapper) { - if (!format.exact && childCount === 1) { - node = mergeStyles(node); - } - MergeFormats.mergeWithChildren(ed, formatList, vars, node); - MergeFormats.mergeWithParents(ed, format, name, vars, node); - MergeFormats.mergeBackgroundColorAndFontSize(dom, format, vars, node); - MergeFormats.mergeSubSup(dom, format, vars, node); - MergeFormats.mergeSiblings(dom, format, vars, node); - } - }); - }; - if (dom.getContentEditable(selection.getNode()) === 'false') { - node = selection.getNode(); - for (var i = 0, l = formatList.length; i < l; i++) { - if (formatList[i].ceFalseOverride && dom.is(node, formatList[i].selector)) { - setElementFormat(node, formatList[i]); - return; - } - } - return; - } - if (format) { - if (node) { - if (node.nodeType) { - if (!applyNodeStyle(formatList, node)) { - rng = dom.createRng(); - rng.setStartBefore(node); - rng.setEndAfter(node); - applyRngStyle(dom, ExpandRange.expandRng(ed, rng, formatList), null, true); - } - } else { - applyRngStyle(dom, node, null, true); - } - } else { - if (!isCollapsed || !format.inline || dom.select('td[data-mce-selected],th[data-mce-selected]').length) { - var curSelNode = ed.selection.getNode(); - if (!ed.settings.forced_root_block && formatList[0].defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) { - applyFormat(ed, formatList[0].defaultBlock); - } - ed.selection.setRng(RangeNormalizer.normalize(ed.selection.getRng())); - bookmark = GetBookmark.getPersistentBookmark(ed.selection, true); - applyRngStyle(dom, ExpandRange.expandRng(ed, selection.getRng(), formatList), bookmark); - if (format.styles) { - MergeFormats.mergeUnderlineAndColor(dom, format, vars, curSelNode); - } - selection.moveToBookmark(bookmark); - FormatUtils.moveStart(dom, selection, selection.getRng()); - ed.nodeChanged(); - } else { - applyCaretFormat(ed, name, vars); - } - } - Hooks.postProcess(name, ed); - } - }; - var ApplyFormat = { applyFormat: applyFormat }; - - var setup$5 = function (registeredFormatListeners, editor) { - var currentFormats = Cell({}); - registeredFormatListeners.set({}); - editor.on('NodeChange', function (e) { - updateAndFireChangeCallbacks(editor, e.element, currentFormats, registeredFormatListeners.get()); - }); - }; - var updateAndFireChangeCallbacks = function (editor, elm, currentFormats, formatChangeData) { - var formatsList = keys(currentFormats.get()); - var newFormats = {}; - var matchedFormats = {}; - var parents = filter(FormatUtils.getParents(editor.dom, elm), function (node) { - return node.nodeType === 1 && !node.getAttribute('data-mce-bogus'); - }); - each$3(formatChangeData, function (data, format) { - Tools.each(parents, function (node) { - if (editor.formatter.matchNode(node, format, {}, data.similar)) { - if (formatsList.indexOf(format) === -1) { - each(data.callbacks, function (callback) { - callback(true, { - node: node, - format: format, - parents: parents - }); - }); - newFormats[format] = data.callbacks; - } - matchedFormats[format] = data.callbacks; - return false; - } - if (MatchFormat.matchesUnInheritedFormatSelector(editor, node, format)) { - return false; - } - }); - }); - var remainingFormats = filterRemainingFormats(currentFormats.get(), matchedFormats, elm, parents); - currentFormats.set(__assign({}, newFormats, remainingFormats)); - }; - var filterRemainingFormats = function (currentFormats, matchedFormats, elm, parents) { - return bifilter(currentFormats, function (callbacks, format) { - if (!has(matchedFormats, format)) { - each(callbacks, function (callback) { - callback(false, { - node: elm, - format: format, - parents: parents - }); - }); - return false; - } else { - return true; - } - }).t; - }; - var addListeners = function (registeredFormatListeners, formats, callback, similar) { - var formatChangeItems = registeredFormatListeners.get(); - each(formats.split(','), function (format) { - if (!formatChangeItems[format]) { - formatChangeItems[format] = { - similar: similar, - callbacks: [] - }; - } - formatChangeItems[format].callbacks.push(callback); - }); - registeredFormatListeners.set(formatChangeItems); - }; - var removeListeners = function (registeredFormatListeners, formats, callback) { - var formatChangeItems = registeredFormatListeners.get(); - each(formats.split(','), function (format) { - formatChangeItems[format].callbacks = filter(formatChangeItems[format].callbacks, function (c) { - return c !== callback; - }); - if (formatChangeItems[format].callbacks.length === 0) { - delete formatChangeItems[format]; - } - }); - registeredFormatListeners.set(formatChangeItems); - }; - var formatChanged = function (editor, registeredFormatListeners, formats, callback, similar) { - if (registeredFormatListeners.get() === null) { - setup$5(registeredFormatListeners, editor); - } - addListeners(registeredFormatListeners, formats, callback, similar); - return { - unbind: function () { - return removeListeners(registeredFormatListeners, formats, callback); - } - }; - }; - - var get$6 = function (dom) { - var formats = { - valigntop: [{ - selector: 'td,th', - styles: { verticalAlign: 'top' } - }], - valignmiddle: [{ - selector: 'td,th', - styles: { verticalAlign: 'middle' } - }], - valignbottom: [{ - selector: 'td,th', - styles: { verticalAlign: 'bottom' } - }], - alignleft: [ - { - selector: 'figure.image', - collapsed: false, - classes: 'align-left', - ceFalseOverride: true, - preview: 'font-family font-size' - }, - { - selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', - styles: { textAlign: 'left' }, - inherit: false, - preview: false, - defaultBlock: 'div' - }, - { - selector: 'img,table', - collapsed: false, - styles: { float: 'left' }, - preview: 'font-family font-size' - } - ], - aligncenter: [ - { - selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', - styles: { textAlign: 'center' }, - inherit: false, - preview: 'font-family font-size', - defaultBlock: 'div' - }, - { - selector: 'figure.image', - collapsed: false, - classes: 'align-center', - ceFalseOverride: true, - preview: 'font-family font-size' - }, - { - selector: 'img', - collapsed: false, - styles: { - display: 'block', - marginLeft: 'auto', - marginRight: 'auto' - }, - preview: false - }, - { - selector: 'table', - collapsed: false, - styles: { - marginLeft: 'auto', - marginRight: 'auto' - }, - preview: 'font-family font-size' - } - ], - alignright: [ - { - selector: 'figure.image', - collapsed: false, - classes: 'align-right', - ceFalseOverride: true, - preview: 'font-family font-size' - }, - { - selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', - styles: { textAlign: 'right' }, - inherit: false, - preview: 'font-family font-size', - defaultBlock: 'div' - }, - { - selector: 'img,table', - collapsed: false, - styles: { float: 'right' }, - preview: 'font-family font-size' - } - ], - alignjustify: [{ - selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', - styles: { textAlign: 'justify' }, - inherit: false, - defaultBlock: 'div', - preview: 'font-family font-size' - }], - bold: [ - { - inline: 'strong', - remove: 'all' - }, - { - inline: 'span', - styles: { fontWeight: 'bold' } - }, - { - inline: 'b', - remove: 'all' - } - ], - italic: [ - { - inline: 'em', - remove: 'all' - }, - { - inline: 'span', - styles: { fontStyle: 'italic' } - }, - { - inline: 'i', - remove: 'all' - } - ], - underline: [ - { - inline: 'span', - styles: { textDecoration: 'underline' }, - exact: true - }, - { - inline: 'u', - remove: 'all' - } - ], - strikethrough: [ - { - inline: 'span', - styles: { textDecoration: 'line-through' }, - exact: true - }, - { - inline: 'strike', - remove: 'all' - } - ], - forecolor: { - inline: 'span', - styles: { color: '%value' }, - links: true, - remove_similar: true, - clear_child_styles: true - }, - hilitecolor: { - inline: 'span', - styles: { backgroundColor: '%value' }, - links: true, - remove_similar: true, - clear_child_styles: true - }, - fontname: { - inline: 'span', - toggle: false, - styles: { fontFamily: '%value' }, - clear_child_styles: true - }, - fontsize: { - inline: 'span', - toggle: false, - styles: { fontSize: '%value' }, - clear_child_styles: true - }, - fontsize_class: { - inline: 'span', - attributes: { class: '%value' } - }, - blockquote: { - block: 'blockquote', - wrapper: true, - remove: 'all' - }, - subscript: { inline: 'sub' }, - superscript: { inline: 'sup' }, - code: { inline: 'code' }, - link: { - inline: 'a', - selector: 'a', - remove: 'all', - split: true, - deep: true, - onmatch: function () { - return true; - }, - onformat: function (elm, fmt, vars) { - Tools.each(vars, function (value, key) { - dom.setAttrib(elm, key, value); - }); - } - }, - removeformat: [ - { - selector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins', - remove: 'all', - split: true, - expand: false, - block_expand: true, - deep: true - }, - { - selector: 'span', - attributes: [ - 'style', - 'class' - ], - remove: 'empty', - split: true, - expand: false, - deep: true - }, - { - selector: '*', - attributes: [ - 'style', - 'class' - ], - split: false, - expand: false, - deep: true - } - ] - }; - Tools.each('p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp'.split(/\s/), function (name) { - formats[name] = { - block: name, - remove: 'all' - }; - }); - return formats; - }; - var DefaultFormats = { get: get$6 }; - - function FormatRegistry(editor) { - var formats = {}; - var get = function (name) { - return name ? formats[name] : formats; - }; - var has$1 = function (name) { - return has(formats, name); - }; - var register = function (name, format) { - if (name) { - if (typeof name !== 'string') { - Tools.each(name, function (format, name) { - register(name, format); - }); - } else { - if (!isArray(format)) { - format = [format]; - } - Tools.each(format, function (format) { - if (typeof format.deep === 'undefined') { - format.deep = !format.selector; - } - if (typeof format.split === 'undefined') { - format.split = !format.selector || format.inline; - } - if (typeof format.remove === 'undefined' && format.selector && !format.inline) { - format.remove = 'none'; - } - if (format.selector && format.inline) { - format.mixed = true; - format.block_expand = true; - } - if (typeof format.classes === 'string') { - format.classes = format.classes.split(/\s+/); - } - }); - formats[name] = format; - } - } - }; - var unregister = function (name) { - if (name && formats[name]) { - delete formats[name]; - } - return formats; - }; - register(DefaultFormats.get(editor.dom)); - register(editor.settings.formats); - return { - get: get, - has: has$1, - register: register, - unregister: unregister - }; - } - - var each$e = Tools.each; - var dom = DOMUtils$1.DOM; - var parsedSelectorToHtml = function (ancestry, editor) { - var elm, item, fragment; - var schema = editor && editor.schema || Schema({}); - var decorate = function (elm, item) { - if (item.classes.length) { - dom.addClass(elm, item.classes.join(' ')); - } - dom.setAttribs(elm, item.attrs); - }; - var createElement = function (sItem) { - var elm; - item = typeof sItem === 'string' ? { - name: sItem, - classes: [], - attrs: {} - } : sItem; - elm = dom.create(item.name); - decorate(elm, item); - return elm; - }; - var getRequiredParent = function (elm, candidate) { - var name = typeof elm !== 'string' ? elm.nodeName.toLowerCase() : elm; - var elmRule = schema.getElementRule(name); - var parentsRequired = elmRule && elmRule.parentsRequired; - if (parentsRequired && parentsRequired.length) { - return candidate && Tools.inArray(parentsRequired, candidate) !== -1 ? candidate : parentsRequired[0]; - } else { - return false; - } - }; - var wrapInHtml = function (elm, ancestry, siblings) { - var parent, parentCandidate, parentRequired; - var ancestor = ancestry.length > 0 && ancestry[0]; - var ancestorName = ancestor && ancestor.name; - parentRequired = getRequiredParent(elm, ancestorName); - if (parentRequired) { - if (ancestorName === parentRequired) { - parentCandidate = ancestry[0]; - ancestry = ancestry.slice(1); - } else { - parentCandidate = parentRequired; - } - } else if (ancestor) { - parentCandidate = ancestry[0]; - ancestry = ancestry.slice(1); - } else if (!siblings) { - return elm; - } - if (parentCandidate) { - parent = createElement(parentCandidate); - parent.appendChild(elm); - } - if (siblings) { - if (!parent) { - parent = dom.create('div'); - parent.appendChild(elm); - } - Tools.each(siblings, function (sibling) { - var siblingElm = createElement(sibling); - parent.insertBefore(siblingElm, elm); - }); - } - return wrapInHtml(parent, ancestry, parentCandidate && parentCandidate.siblings); - }; - if (ancestry && ancestry.length) { - item = ancestry[0]; - elm = createElement(item); - fragment = dom.create('div'); - fragment.appendChild(wrapInHtml(elm, ancestry.slice(1), item.siblings)); - return fragment; - } else { - return ''; - } - }; - var selectorToHtml = function (selector, editor) { - return parsedSelectorToHtml(parseSelector(selector), editor); - }; - var parseSelectorItem = function (item) { - var tagName; - var obj = { - classes: [], - attrs: {} - }; - item = obj.selector = Tools.trim(item); - if (item !== '*') { - tagName = item.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function ($0, $1, $2, $3, $4) { - switch ($1) { - case '#': - obj.attrs.id = $2; - break; - case '.': - obj.classes.push($2); - break; - case ':': - if (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) { - obj.attrs[$2] = $2; - } - break; - } - if ($3 === '[') { - var m = $4.match(/([\w\-]+)(?:\=\"([^\"]+))?/); - if (m) { - obj.attrs[m[1]] = m[2]; - } - } - return ''; - }); - } - obj.name = tagName || 'div'; - return obj; - }; - var parseSelector = function (selector) { - if (!selector || typeof selector !== 'string') { - return []; - } - selector = selector.split(/\s*,\s*/)[0]; - selector = selector.replace(/\s*(~\+|~|\+|>)\s*/g, '$1'); - return Tools.map(selector.split(/(?:>|\s+(?![^\[\]]+\]))/), function (item) { - var siblings = Tools.map(item.split(/(?:~\+|~|\+)/), parseSelectorItem); - var obj = siblings.pop(); - if (siblings.length) { - obj.siblings = siblings; - } - return obj; - }).reverse(); - }; - var getCssText = function (editor, format) { - var name, previewFrag, previewElm, items; - var previewCss = '', parentFontSize, previewStyles; - previewStyles = editor.settings.preview_styles; - if (previewStyles === false) { - return ''; - } - if (typeof previewStyles !== 'string') { - previewStyles = 'font-family font-size font-weight font-style text-decoration ' + 'text-transform color background-color border border-radius outline text-shadow'; - } - var removeVars = function (val) { - return val.replace(/%(\w+)/g, ''); - }; - if (typeof format === 'string') { - format = editor.formatter.get(format); - if (!format) { - return; - } - format = format[0]; - } - if ('preview' in format) { - previewStyles = format.preview; - if (previewStyles === false) { - return ''; - } - } - name = format.block || format.inline || 'span'; - items = parseSelector(format.selector); - if (items.length) { - if (!items[0].name) { - items[0].name = name; - } - name = format.selector; - previewFrag = parsedSelectorToHtml(items, editor); - } else { - previewFrag = parsedSelectorToHtml([name], editor); - } - previewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild; - each$e(format.styles, function (value, name) { - value = removeVars(value); - if (value) { - dom.setStyle(previewElm, name, value); - } - }); - each$e(format.attributes, function (value, name) { - value = removeVars(value); - if (value) { - dom.setAttrib(previewElm, name, value); - } - }); - each$e(format.classes, function (value) { - value = removeVars(value); - if (!dom.hasClass(previewElm, value)) { - dom.addClass(previewElm, value); - } - }); - editor.fire('PreviewFormats'); - dom.setStyles(previewFrag, { - position: 'absolute', - left: -65535 - }); - editor.getBody().appendChild(previewFrag); - parentFontSize = dom.getStyle(editor.getBody(), 'fontSize', true); - parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0; - each$e(previewStyles.split(' '), function (name) { - var value = dom.getStyle(previewElm, name, true); - if (name === 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) { - value = dom.getStyle(editor.getBody(), name, true); - if (dom.toHex(value).toLowerCase() === '#ffffff') { - return; - } - } - if (name === 'color') { - if (dom.toHex(value).toLowerCase() === '#000000') { - return; - } - } - if (name === 'font-size') { - if (/em|%$/.test(value)) { - if (parentFontSize === 0) { - return; - } - var numValue = parseFloat(value) / (/%$/.test(value) ? 100 : 1); - value = numValue * parentFontSize + 'px'; - } - } - if (name === 'border' && value) { - previewCss += 'padding:0 2px;'; - } - previewCss += name + ':' + value + ';'; - }); - editor.fire('AfterPreviewFormats'); - dom.remove(previewFrag); - return previewCss; - }; - var Preview = { - getCssText: getCssText, - parseSelector: parseSelector, - selectorToHtml: selectorToHtml - }; - - var toggle$1 = function (editor, formats, name, vars, node) { - var fmt = formats.get(name); - if (MatchFormat.match(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) { - RemoveFormat.remove(editor, name, vars, node); - } else { - ApplyFormat.applyFormat(editor, name, vars, node); - } - }; - var ToggleFormat = { toggle: toggle$1 }; - - var setup$6 = function (editor) { - editor.addShortcut('meta+b', '', 'Bold'); - editor.addShortcut('meta+i', '', 'Italic'); - editor.addShortcut('meta+u', '', 'Underline'); - for (var i = 1; i <= 6; i++) { - editor.addShortcut('access+' + i, '', [ - 'FormatBlock', - false, - 'h' + i - ]); - } - editor.addShortcut('access+7', '', [ - 'FormatBlock', - false, - 'p' - ]); - editor.addShortcut('access+8', '', [ - 'FormatBlock', - false, - 'div' - ]); - editor.addShortcut('access+9', '', [ - 'FormatBlock', - false, - 'address' - ]); - }; - var FormatShortcuts = { setup: setup$6 }; - - var Formatter = function (editor) { - var formats = FormatRegistry(editor); - var formatChangeState = Cell(null); - FormatShortcuts.setup(editor); - setup$4(editor); - return { - get: formats.get, - has: formats.has, - register: formats.register, - unregister: formats.unregister, - apply: curry(ApplyFormat.applyFormat, editor), - remove: curry(RemoveFormat.remove, editor), - toggle: curry(ToggleFormat.toggle, editor, formats), - match: curry(MatchFormat.match, editor), - matchAll: curry(MatchFormat.matchAll, editor), - matchNode: curry(MatchFormat.matchNode, editor), - canApply: curry(MatchFormat.canApply, editor), - formatChanged: curry(formatChanged, editor, formatChangeState), - getCssText: curry(Preview.getCssText, editor) - }; - }; - - var hasOwnProperty$2 = Object.prototype.hasOwnProperty; - var shallow$1 = function (old, nu) { - return nu; - }; - var baseMerge = function (merger) { - return function () { - var objects = new Array(arguments.length); - for (var i = 0; i < objects.length; i++) - objects[i] = arguments[i]; - if (objects.length === 0) - throw new Error('Can\'t merge zero objects'); - var ret = {}; - for (var j = 0; j < objects.length; j++) { - var curObject = objects[j]; - for (var key in curObject) - if (hasOwnProperty$2.call(curObject, key)) { - ret[key] = merger(ret[key], curObject[key]); - } - } - return ret; - }; - }; - var merge = baseMerge(shallow$1); - - var register = function (htmlParser, settings, dom) { - htmlParser.addAttributeFilter('data-mce-tabindex', function (nodes, name) { - var i = nodes.length, node; - while (i--) { - node = nodes[i]; - node.attr('tabindex', node.attr('data-mce-tabindex')); - node.attr(name, null); - } - }); - htmlParser.addAttributeFilter('src,href,style', function (nodes, name) { - var i = nodes.length, node, value; - var internalName = 'data-mce-' + name; - var urlConverter = settings.url_converter; - var urlConverterScope = settings.url_converter_scope; - while (i--) { - node = nodes[i]; - value = node.attr(internalName); - if (value !== undefined) { - node.attr(name, value.length > 0 ? value : null); - node.attr(internalName, null); - } else { - value = node.attr(name); - if (name === 'style') { - value = dom.serializeStyle(dom.parseStyle(value), node.name); - } else if (urlConverter) { - value = urlConverter.call(urlConverterScope, value, name, node.name); - } - node.attr(name, value.length > 0 ? value : null); - } - } - }); - htmlParser.addAttributeFilter('class', function (nodes) { - var i = nodes.length, node, value; - while (i--) { - node = nodes[i]; - value = node.attr('class'); - if (value) { - value = node.attr('class').replace(/(?:^|\s)mce-item-\w+(?!\S)/g, ''); - node.attr('class', value.length > 0 ? value : null); - } - } - }); - htmlParser.addAttributeFilter('data-mce-type', function (nodes, name, args) { - var i = nodes.length, node; - while (i--) { - node = nodes[i]; - if (node.attr('data-mce-type') === 'bookmark' && !args.cleanup) { - var hasChildren = Option.from(node.firstChild).exists(function (firstChild) { - return !Zwsp.isZwsp(firstChild.value); - }); - if (hasChildren) { - node.unwrap(); - } else { - node.remove(); - } - } - } - }); - htmlParser.addNodeFilter('noscript', function (nodes) { - var i = nodes.length, node; - while (i--) { - node = nodes[i].firstChild; - if (node) { - node.value = Entities.decode(node.value); - } - } - }); - htmlParser.addNodeFilter('script,style', function (nodes, name) { - var i = nodes.length, node, value, type; - var trim = function (value) { - return value.replace(/()/g, '\n').replace(/^[\r\n]*|[\r\n]*$/g, '').replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, ''); - }; - while (i--) { - node = nodes[i]; - value = node.firstChild ? node.firstChild.value : ''; - if (name === 'script') { - type = node.attr('type'); - if (type) { - node.attr('type', type === 'mce-no/type' ? null : type.replace(/^mce\-/, '')); - } - if (settings.element_format === 'xhtml' && value.length > 0) { - node.firstChild.value = '// '; - } - } else { - if (settings.element_format === 'xhtml' && value.length > 0) { - node.firstChild.value = ''; - } - } - } - }); - htmlParser.addNodeFilter('#comment', function (nodes) { - var i = nodes.length, node; - while (i--) { - node = nodes[i]; - if (node.value.indexOf('[CDATA[') === 0) { - node.name = '#cdata'; - node.type = 4; - node.value = node.value.replace(/^\[CDATA\[|\]\]$/g, ''); - } else if (node.value.indexOf('mce:protected ') === 0) { - node.name = '#text'; - node.type = 3; - node.raw = true; - node.value = unescape(node.value).substr(14); - } - } - }); - htmlParser.addNodeFilter('xml:namespace,input', function (nodes, name) { - var i = nodes.length, node; - while (i--) { - node = nodes[i]; - if (node.type === 7) { - node.remove(); - } else if (node.type === 1) { - if (name === 'input' && !node.attr('type')) { - node.attr('type', 'text'); - } - } - } - }); - htmlParser.addAttributeFilter('data-mce-type', function (nodes) { - each(nodes, function (node) { - if (node.attr('data-mce-type') === 'format-caret') { - if (node.isEmpty(htmlParser.schema.getNonEmptyElements())) { - node.remove(); - } else { - node.unwrap(); - } - } - }); - }); - htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style,' + 'data-mce-selected,data-mce-expando,' + 'data-mce-type,data-mce-resize', function (nodes, name) { - var i = nodes.length; - while (i--) { - nodes[i].attr(name, null); - } - }); - }; - var trimTrailingBr = function (rootNode) { - var brNode1, brNode2; - var isBr = function (node) { - return node && node.name === 'br'; - }; - brNode1 = rootNode.lastChild; - if (isBr(brNode1)) { - brNode2 = brNode1.prev; - if (isBr(brNode2)) { - brNode1.remove(); - brNode2.remove(); - } - } - }; - var DomSerializerFilters = { - register: register, - trimTrailingBr: trimTrailingBr - }; - - var preProcess = function (editor, node, args) { - var impl, doc, oldDoc; - var dom = editor.dom; - node = node.cloneNode(true); - impl = domGlobals.document.implementation; - if (impl.createHTMLDocument) { - doc = impl.createHTMLDocument(''); - Tools.each(node.nodeName === 'BODY' ? node.childNodes : [node], function (node) { - doc.body.appendChild(doc.importNode(node, true)); - }); - if (node.nodeName !== 'BODY') { - node = doc.body.firstChild; - } else { - node = doc.body; - } - oldDoc = dom.doc; - dom.doc = doc; - } - Events.firePreProcess(editor, merge(args, { node: node })); - if (oldDoc) { - dom.doc = oldDoc; - } - return node; - }; - var shouldFireEvent = function (editor, args) { - return editor && editor.hasEventListeners('PreProcess') && !args.no_events; - }; - var process = function (editor, node, args) { - return shouldFireEvent(editor, args) ? preProcess(editor, node, args) : node; - }; - var DomSerializerPreProcess = { process: process }; - - var removeAttrs = function (node, names) { - each(names, function (name) { - node.attr(name, null); - }); - }; - var addFontToSpansFilter = function (domParser, styles, fontSizes) { - domParser.addNodeFilter('font', function (nodes) { - each(nodes, function (node) { - var props = styles.parse(node.attr('style')); - var color = node.attr('color'); - var face = node.attr('face'); - var size = node.attr('size'); - if (color) { - props.color = color; - } - if (face) { - props['font-family'] = face; - } - if (size) { - props['font-size'] = fontSizes[parseInt(node.attr('size'), 10) - 1]; - } - node.name = 'span'; - node.attr('style', styles.serialize(props)); - removeAttrs(node, [ - 'color', - 'face', - 'size' - ]); - }); - }); - }; - var addStrikeToSpanFilter = function (domParser, styles) { - domParser.addNodeFilter('strike', function (nodes) { - each(nodes, function (node) { - var props = styles.parse(node.attr('style')); - props['text-decoration'] = 'line-through'; - node.name = 'span'; - node.attr('style', styles.serialize(props)); - }); - }); - }; - var addFilters = function (domParser, settings) { - var styles = Styles(); - if (settings.convert_fonts_to_spans) { - addFontToSpansFilter(domParser, styles, Tools.explode(settings.font_size_legacy_values)); - } - addStrikeToSpanFilter(domParser, styles); - }; - var register$1 = function (domParser, settings) { - if (settings.inline_styles) { - addFilters(domParser, settings); - } - }; - var LegacyFilter = { register: register$1 }; - - var paddEmptyNode = function (settings, args, blockElements, node) { - var brPreferred = settings.padd_empty_with_br || args.insert; - if (brPreferred && blockElements[node.name]) { - node.empty().append(new Node$1('br', 1)).shortEnded = true; - } else { - node.empty().append(new Node$1('#text', 3)).value = '\xA0'; - } - }; - var isPaddedWithNbsp = function (node) { - return hasOnlyChild(node, '#text') && node.firstChild.value === '\xA0'; - }; - var hasOnlyChild = function (node, name) { - return node && node.firstChild && node.firstChild === node.lastChild && node.firstChild.name === name; - }; - var isPadded = function (schema, node) { - var rule = schema.getElementRule(node.name); - return rule && rule.paddEmpty; - }; - var isEmpty$2 = function (schema, nonEmptyElements, whitespaceElements, node) { - return node.isEmpty(nonEmptyElements, whitespaceElements, function (node) { - return isPadded(schema, node); - }); - }; - var isLineBreakNode = function (node, blockElements) { - return node && (blockElements[node.name] || node.name === 'br'); - }; - - var register$2 = function (parser, settings) { - var schema = parser.schema; - if (settings.remove_trailing_brs) { - parser.addNodeFilter('br', function (nodes, _, args) { - var i; - var l = nodes.length; - var node; - var blockElements = Tools.extend({}, schema.getBlockElements()); - var nonEmptyElements = schema.getNonEmptyElements(); - var parent, lastParent, prev, prevName; - var whiteSpaceElements = schema.getNonEmptyElements(); - var elementRule, textNode; - blockElements.body = 1; - for (i = 0; i < l; i++) { - node = nodes[i]; - parent = node.parent; - if (blockElements[node.parent.name] && node === parent.lastChild) { - prev = node.prev; - while (prev) { - prevName = prev.name; - if (prevName !== 'span' || prev.attr('data-mce-type') !== 'bookmark') { - if (prevName !== 'br') { - break; - } - if (prevName === 'br') { - node = null; - break; - } - } - prev = prev.prev; - } - if (node) { - node.remove(); - if (isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, parent)) { - elementRule = schema.getElementRule(parent.name); - if (elementRule) { - if (elementRule.removeEmpty) { - parent.remove(); - } else if (elementRule.paddEmpty) { - paddEmptyNode(settings, args, blockElements, parent); - } - } - } - } - } else { - lastParent = node; - while (parent && parent.firstChild === lastParent && parent.lastChild === lastParent) { - lastParent = parent; - if (blockElements[parent.name]) { - break; - } - parent = parent.parent; - } - if (lastParent === parent && settings.padd_empty_with_br !== true) { - textNode = new Node$1('#text', 3); - textNode.value = '\xA0'; - node.replace(textNode); - } - } - } - }); - } - parser.addAttributeFilter('href', function (nodes) { - var i = nodes.length, node; - var appendRel = function (rel) { - var parts = rel.split(' ').filter(function (p) { - return p.length > 0; - }); - return parts.concat(['noopener']).sort().join(' '); - }; - var addNoOpener = function (rel) { - var newRel = rel ? Tools.trim(rel) : ''; - if (!/\b(noopener)\b/g.test(newRel)) { - return appendRel(newRel); - } else { - return newRel; - } - }; - if (!settings.allow_unsafe_link_target) { - while (i--) { - node = nodes[i]; - if (node.name === 'a' && node.attr('target') === '_blank') { - node.attr('rel', addNoOpener(node.attr('rel'))); - } - } - } - }); - if (!settings.allow_html_in_named_anchor) { - parser.addAttributeFilter('id,name', function (nodes) { - var i = nodes.length, sibling, prevSibling, parent, node; - while (i--) { - node = nodes[i]; - if (node.name === 'a' && node.firstChild && !node.attr('href')) { - parent = node.parent; - sibling = node.lastChild; - do { - prevSibling = sibling.prev; - parent.insert(sibling, node); - sibling = prevSibling; - } while (sibling); - } - } - }); - } - if (settings.fix_list_elements) { - parser.addNodeFilter('ul,ol', function (nodes) { - var i = nodes.length, node, parentNode; - while (i--) { - node = nodes[i]; - parentNode = node.parent; - if (parentNode.name === 'ul' || parentNode.name === 'ol') { - if (node.prev && node.prev.name === 'li') { - node.prev.append(node); - } else { - var li = new Node$1('li', 1); - li.attr('style', 'list-style-type: none'); - node.wrap(li); - } - } - } - }); - } - if (settings.validate && schema.getValidClasses()) { - parser.addAttributeFilter('class', function (nodes) { - var i = nodes.length, node, classList, ci, className, classValue; - var validClasses = schema.getValidClasses(); - var validClassesMap, valid; - while (i--) { - node = nodes[i]; - classList = node.attr('class').split(' '); - classValue = ''; - for (ci = 0; ci < classList.length; ci++) { - className = classList[ci]; - valid = false; - validClassesMap = validClasses['*']; - if (validClassesMap && validClassesMap[className]) { - valid = true; - } - validClassesMap = validClasses[node.name]; - if (!valid && validClassesMap && validClassesMap[className]) { - valid = true; - } - if (valid) { - if (classValue) { - classValue += ' '; - } - classValue += className; - } - } - if (!classValue.length) { - classValue = null; - } - node.attr('class', classValue); - } - }); - } - }; - - var makeMap$4 = Tools.makeMap, each$f = Tools.each, explode$2 = Tools.explode, extend$2 = Tools.extend; - var DomParser = function (settings, schema) { - if (schema === void 0) { - schema = Schema(); - } - var nodeFilters = {}; - var attributeFilters = []; - var matchedNodes = {}; - var matchedAttributes = {}; - settings = settings || {}; - settings.validate = 'validate' in settings ? settings.validate : true; - settings.root_name = settings.root_name || 'body'; - var fixInvalidChildren = function (nodes) { - var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i; - var nonEmptyElements, whitespaceElements, nonSplitableElements, textBlockElements, specialElements, sibling, nextNode; - nonSplitableElements = makeMap$4('tr,td,th,tbody,thead,tfoot,table'); - nonEmptyElements = schema.getNonEmptyElements(); - whitespaceElements = schema.getWhiteSpaceElements(); - textBlockElements = schema.getTextBlockElements(); - specialElements = schema.getSpecialElements(); - for (ni = 0; ni < nodes.length; ni++) { - node = nodes[ni]; - if (!node.parent || node.fixed) { - continue; - } - if (textBlockElements[node.name] && node.parent.name === 'li') { - sibling = node.next; - while (sibling) { - if (textBlockElements[sibling.name]) { - sibling.name = 'li'; - sibling.fixed = true; - node.parent.insert(sibling, node.parent); - } else { - break; - } - sibling = sibling.next; - } - node.unwrap(node); - continue; - } - parents = [node]; - for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) { - parents.push(parent); - } - if (parent && parents.length > 1) { - parents.reverse(); - newParent = currentNode = filterNode(parents[0].clone()); - for (i = 0; i < parents.length - 1; i++) { - if (schema.isValidChild(currentNode.name, parents[i].name)) { - tempNode = filterNode(parents[i].clone()); - currentNode.append(tempNode); - } else { - tempNode = currentNode; - } - for (childNode = parents[i].firstChild; childNode && childNode !== parents[i + 1];) { - nextNode = childNode.next; - tempNode.append(childNode); - childNode = nextNode; - } - currentNode = tempNode; - } - if (!isEmpty$2(schema, nonEmptyElements, whitespaceElements, newParent)) { - parent.insert(newParent, parents[0], true); - parent.insert(node, newParent); - } else { - parent.insert(node, parents[0], true); - } - parent = parents[0]; - if (isEmpty$2(schema, nonEmptyElements, whitespaceElements, parent) || hasOnlyChild(parent, 'br')) { - parent.empty().remove(); - } - } else if (node.parent) { - if (node.name === 'li') { - sibling = node.prev; - if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { - sibling.append(node); - continue; - } - sibling = node.next; - if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) { - sibling.insert(node, sibling.firstChild, true); - continue; - } - node.wrap(filterNode(new Node$1('ul', 1))); - continue; - } - if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) { - node.wrap(filterNode(new Node$1('div', 1))); - } else { - if (specialElements[node.name]) { - node.empty().remove(); - } else { - node.unwrap(); - } - } - } - } - }; - var filterNode = function (node) { - var i, name, list; - name = node.name; - if (name in nodeFilters) { - list = matchedNodes[name]; - if (list) { - list.push(node); - } else { - matchedNodes[name] = [node]; - } - } - i = attributeFilters.length; - while (i--) { - name = attributeFilters[i].name; - if (name in node.attributes.map) { - list = matchedAttributes[name]; - if (list) { - list.push(node); - } else { - matchedAttributes[name] = [node]; - } - } - } - return node; - }; - var addNodeFilter = function (name, callback) { - each$f(explode$2(name), function (name) { - var list = nodeFilters[name]; - if (!list) { - nodeFilters[name] = list = []; - } - list.push(callback); - }); - }; - var getNodeFilters = function () { - var out = []; - for (var name in nodeFilters) { - if (nodeFilters.hasOwnProperty(name)) { - out.push({ - name: name, - callbacks: nodeFilters[name] - }); - } - } - return out; - }; - var addAttributeFilter = function (name, callback) { - each$f(explode$2(name), function (name) { - var i; - for (i = 0; i < attributeFilters.length; i++) { - if (attributeFilters[i].name === name) { - attributeFilters[i].callbacks.push(callback); - return; - } - } - attributeFilters.push({ - name: name, - callbacks: [callback] - }); - }); - }; - var getAttributeFilters = function () { - return [].concat(attributeFilters); - }; - var parse = function (html, args) { - var parser, nodes, i, l, fi, fl, list, name; - var blockElements; - var invalidChildren = []; - var isInWhiteSpacePreservedElement; - var node; - var getRootBlockName = function (name) { - if (name === false) { - return ''; - } else if (name === true) { - return 'p'; - } else { - return name; - } - }; - args = args || {}; - matchedNodes = {}; - matchedAttributes = {}; - blockElements = extend$2(makeMap$4('script,style,head,html,body,title,meta,param'), schema.getBlockElements()); - var nonEmptyElements = schema.getNonEmptyElements(); - var children = schema.children; - var validate = settings.validate; - var forcedRootBlockName = 'forced_root_block' in args ? args.forced_root_block : settings.forced_root_block; - var rootBlockName = getRootBlockName(forcedRootBlockName); - var whiteSpaceElements = schema.getWhiteSpaceElements(); - var startWhiteSpaceRegExp = /^[ \t\r\n]+/; - var endWhiteSpaceRegExp = /[ \t\r\n]+$/; - var allWhiteSpaceRegExp = /[ \t\r\n]+/g; - var isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/; - isInWhiteSpacePreservedElement = whiteSpaceElements.hasOwnProperty(args.context) || whiteSpaceElements.hasOwnProperty(settings.root_name); - var addRootBlocks = function () { - var node = rootNode.firstChild, next, rootBlockNode; - var trim = function (rootBlockNode) { - if (rootBlockNode) { - node = rootBlockNode.firstChild; - if (node && node.type === 3) { - node.value = node.value.replace(startWhiteSpaceRegExp, ''); - } - node = rootBlockNode.lastChild; - if (node && node.type === 3) { - node.value = node.value.replace(endWhiteSpaceRegExp, ''); - } - } - }; - if (!schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) { - return; - } - while (node) { - next = node.next; - if (node.type === 3 || node.type === 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type')) { - if (!rootBlockNode) { - rootBlockNode = createNode(rootBlockName, 1); - rootBlockNode.attr(settings.forced_root_block_attrs); - rootNode.insert(rootBlockNode, node); - rootBlockNode.append(node); - } else { - rootBlockNode.append(node); - } - } else { - trim(rootBlockNode); - rootBlockNode = null; - } - node = next; - } - trim(rootBlockNode); - }; - var createNode = function (name, type) { - var node = new Node$1(name, type); - var list; - if (name in nodeFilters) { - list = matchedNodes[name]; - if (list) { - list.push(node); - } else { - matchedNodes[name] = [node]; - } - } - return node; - }; - var removeWhitespaceBefore = function (node) { - var textNode, textNodeNext, textVal, sibling; - var blockElements = schema.getBlockElements(); - for (textNode = node.prev; textNode && textNode.type === 3;) { - textVal = textNode.value.replace(endWhiteSpaceRegExp, ''); - if (textVal.length > 0) { - textNode.value = textVal; - return; - } - textNodeNext = textNode.next; - if (textNodeNext) { - if (textNodeNext.type === 3 && textNodeNext.value.length) { - textNode = textNode.prev; - continue; - } - if (!blockElements[textNodeNext.name] && textNodeNext.name !== 'script' && textNodeNext.name !== 'style') { - textNode = textNode.prev; - continue; - } - } - sibling = textNode.prev; - textNode.remove(); - textNode = sibling; - } - }; - var cloneAndExcludeBlocks = function (input) { - var name; - var output = {}; - for (name in input) { - if (name !== 'li' && name !== 'p') { - output[name] = input[name]; - } - } - return output; - }; - parser = SaxParser$1({ - validate: validate, - allow_script_urls: settings.allow_script_urls, - allow_conditional_comments: settings.allow_conditional_comments, - self_closing_elements: cloneAndExcludeBlocks(schema.getSelfClosingElements()), - cdata: function (text) { - node.append(createNode('#cdata', 4)).value = text; - }, - text: function (text, raw) { - var textNode; - if (!isInWhiteSpacePreservedElement) { - text = text.replace(allWhiteSpaceRegExp, ' '); - if (isLineBreakNode(node.lastChild, blockElements)) { - text = text.replace(startWhiteSpaceRegExp, ''); - } - } - if (text.length !== 0) { - textNode = createNode('#text', 3); - textNode.raw = !!raw; - node.append(textNode).value = text; - } - }, - comment: function (text) { - node.append(createNode('#comment', 8)).value = text; - }, - pi: function (name, text) { - node.append(createNode(name, 7)).value = text; - removeWhitespaceBefore(node); - }, - doctype: function (text) { - var newNode; - newNode = node.append(createNode('#doctype', 10)); - newNode.value = text; - removeWhitespaceBefore(node); - }, - start: function (name, attrs, empty) { - var newNode, attrFiltersLen, elementRule, attrName, parent; - elementRule = validate ? schema.getElementRule(name) : {}; - if (elementRule) { - newNode = createNode(elementRule.outputName || name, 1); - newNode.attributes = attrs; - newNode.shortEnded = empty; - node.append(newNode); - parent = children[node.name]; - if (parent && children[newNode.name] && !parent[newNode.name]) { - invalidChildren.push(newNode); - } - attrFiltersLen = attributeFilters.length; - while (attrFiltersLen--) { - attrName = attributeFilters[attrFiltersLen].name; - if (attrName in attrs.map) { - list = matchedAttributes[attrName]; - if (list) { - list.push(newNode); - } else { - matchedAttributes[attrName] = [newNode]; - } - } - } - if (blockElements[name]) { - removeWhitespaceBefore(newNode); - } - if (!empty) { - node = newNode; - } - if (!isInWhiteSpacePreservedElement && whiteSpaceElements[name]) { - isInWhiteSpacePreservedElement = true; - } - } - }, - end: function (name) { - var textNode, elementRule, text, sibling, tempNode; - elementRule = validate ? schema.getElementRule(name) : {}; - if (elementRule) { - if (blockElements[name]) { - if (!isInWhiteSpacePreservedElement) { - textNode = node.firstChild; - if (textNode && textNode.type === 3) { - text = textNode.value.replace(startWhiteSpaceRegExp, ''); - if (text.length > 0) { - textNode.value = text; - textNode = textNode.next; - } else { - sibling = textNode.next; - textNode.remove(); - textNode = sibling; - while (textNode && textNode.type === 3) { - text = textNode.value; - sibling = textNode.next; - if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) { - textNode.remove(); - textNode = sibling; - } - textNode = sibling; - } - } - } - textNode = node.lastChild; - if (textNode && textNode.type === 3) { - text = textNode.value.replace(endWhiteSpaceRegExp, ''); - if (text.length > 0) { - textNode.value = text; - textNode = textNode.prev; - } else { - sibling = textNode.prev; - textNode.remove(); - textNode = sibling; - while (textNode && textNode.type === 3) { - text = textNode.value; - sibling = textNode.prev; - if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) { - textNode.remove(); - textNode = sibling; - } - textNode = sibling; - } - } - } - } - } - if (isInWhiteSpacePreservedElement && whiteSpaceElements[name]) { - isInWhiteSpacePreservedElement = false; - } - if (elementRule.removeEmpty && isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, node)) { - if (!node.attr('name') && !node.attr('id')) { - tempNode = node.parent; - if (blockElements[node.name]) { - node.empty().remove(); - } else { - node.unwrap(); - } - node = tempNode; - return; - } - } - if (elementRule.paddEmpty && (isPaddedWithNbsp(node) || isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, node))) { - paddEmptyNode(settings, args, blockElements, node); - } - node = node.parent; - } - } - }, schema); - var rootNode = node = new Node$1(args.context || settings.root_name, 11); - parser.parse(html); - if (validate && invalidChildren.length) { - if (!args.context) { - fixInvalidChildren(invalidChildren); - } else { - args.invalid = true; - } - } - if (rootBlockName && (rootNode.name === 'body' || args.isRootContent)) { - addRootBlocks(); - } - if (!args.invalid) { - for (name in matchedNodes) { - if (!matchedNodes.hasOwnProperty(name)) { - continue; - } - list = nodeFilters[name]; - nodes = matchedNodes[name]; - fi = nodes.length; - while (fi--) { - if (!nodes[fi].parent) { - nodes.splice(fi, 1); - } - } - for (i = 0, l = list.length; i < l; i++) { - list[i](nodes, name, args); - } - } - for (i = 0, l = attributeFilters.length; i < l; i++) { - list = attributeFilters[i]; - if (list.name in matchedAttributes) { - nodes = matchedAttributes[list.name]; - fi = nodes.length; - while (fi--) { - if (!nodes[fi].parent) { - nodes.splice(fi, 1); - } - } - for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) { - list.callbacks[fi](nodes, list.name, args); - } - } - } - } - return rootNode; - }; - var exports = { - schema: schema, - addAttributeFilter: addAttributeFilter, - getAttributeFilters: getAttributeFilters, - addNodeFilter: addNodeFilter, - getNodeFilters: getNodeFilters, - filterNode: filterNode, - parse: parse - }; - register$2(exports, settings); - LegacyFilter.register(exports, settings); - return exports; - }; - - var addTempAttr = function (htmlParser, tempAttrs, name) { - if (Tools.inArray(tempAttrs, name) === -1) { - htmlParser.addAttributeFilter(name, function (nodes, name) { - var i = nodes.length; - while (i--) { - nodes[i].attr(name, null); - } - }); - tempAttrs.push(name); - } - }; - var postProcess$1 = function (editor, args, content) { - if (!args.no_events && editor) { - var outArgs = Events.firePostProcess(editor, merge(args, { content: content })); - return outArgs.content; - } else { - return content; - } - }; - var getHtmlFromNode = function (dom, node, args) { - var html = Zwsp.trim(args.getInner ? node.innerHTML : dom.getOuterHTML(node)); - return args.selection || isWsPreserveElement(Element.fromDom(node)) ? html : Tools.trim(html); - }; - var parseHtml = function (htmlParser, html, args) { - var parserArgs = args.selection ? merge({ forced_root_block: false }, args) : args; - var rootNode = htmlParser.parse(html, parserArgs); - DomSerializerFilters.trimTrailingBr(rootNode); - return rootNode; - }; - var serializeNode = function (settings, schema, node) { - var htmlSerializer = Serializer(settings, schema); - return htmlSerializer.serialize(node); - }; - var toHtml = function (editor, settings, schema, rootNode, args) { - var content = serializeNode(settings, schema, rootNode); - return postProcess$1(editor, args, content); - }; - var DomSerializer = function (settings, editor) { - var dom, schema, htmlParser; - var tempAttrs = ['data-mce-selected']; - dom = editor && editor.dom ? editor.dom : DOMUtils$1.DOM; - schema = editor && editor.schema ? editor.schema : Schema(settings); - settings.entity_encoding = settings.entity_encoding || 'named'; - settings.remove_trailing_brs = 'remove_trailing_brs' in settings ? settings.remove_trailing_brs : true; - htmlParser = DomParser(settings, schema); - DomSerializerFilters.register(htmlParser, settings, dom); - var serialize = function (node, parserArgs) { - var args = merge({ format: 'html' }, parserArgs ? parserArgs : {}); - var targetNode = DomSerializerPreProcess.process(editor, node, args); - var html = getHtmlFromNode(dom, targetNode, args); - var rootNode = parseHtml(htmlParser, html, args); - return args.format === 'tree' ? rootNode : toHtml(editor, settings, schema, rootNode, args); - }; - return { - schema: schema, - addNodeFilter: htmlParser.addNodeFilter, - addAttributeFilter: htmlParser.addAttributeFilter, - serialize: serialize, - addRules: function (rules) { - schema.addValidElements(rules); - }, - setRules: function (rules) { - schema.setValidElements(rules); - }, - addTempAttr: curry(addTempAttr, htmlParser, tempAttrs), - getTempAttrs: function () { - return tempAttrs; - } - }; - }; - - var Serializer$1 = function (settings, editor) { - var domSerializer = DomSerializer(settings, editor); - return { - schema: domSerializer.schema, - addNodeFilter: domSerializer.addNodeFilter, - addAttributeFilter: domSerializer.addAttributeFilter, - serialize: domSerializer.serialize, - addRules: domSerializer.addRules, - setRules: domSerializer.setRules, - addTempAttr: domSerializer.addTempAttr, - getTempAttrs: domSerializer.getTempAttrs - }; - }; - - function BookmarkManager(selection) { - return { - getBookmark: curry(Bookmarks.getBookmark, selection), - moveToBookmark: curry(Bookmarks.moveToBookmark, selection) - }; - } - (function (BookmarkManager) { - BookmarkManager.isBookmarkNode = Bookmarks.isBookmarkNode; - }(BookmarkManager || (BookmarkManager = {}))); - var BookmarkManager$1 = BookmarkManager; - - var isContentEditableFalse$a = NodeType.isContentEditableFalse; - var isContentEditableTrue$5 = NodeType.isContentEditableTrue; - var getContentEditableRoot$1 = function (root, node) { - while (node && node !== root) { - if (isContentEditableTrue$5(node) || isContentEditableFalse$a(node)) { - return node; - } - node = node.parentNode; - } - return null; - }; - var ControlSelection = function (selection, editor) { - var dom = editor.dom, each = Tools.each; - var selectedElm, selectedElmGhost, resizeHelper, resizeHandles, selectedHandle; - var startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted; - var width, height; - var editableDoc = editor.getDoc(), rootDocument = domGlobals.document; - var abs = Math.abs, round = Math.round, rootElement = editor.getBody(); - var startScrollWidth, startScrollHeight; - resizeHandles = { - nw: [ - 0, - 0, - -1, - -1 - ], - ne: [ - 1, - 0, - 1, - -1 - ], - se: [ - 1, - 1, - 1, - 1 - ], - sw: [ - 0, - 1, - -1, - 1 - ] - }; - var isImage = function (elm) { - return elm && (elm.nodeName === 'IMG' || editor.dom.is(elm, 'figure.image')); - }; - var isEventOnImageOutsideRange = function (evt, range) { - return isImage(evt.target) && !RangePoint.isXYWithinRange(evt.clientX, evt.clientY, range); - }; - var contextMenuSelectImage = function (evt) { - var target = evt.target; - if (isEventOnImageOutsideRange(evt, editor.selection.getRng()) && !evt.isDefaultPrevented()) { - evt.preventDefault(); - editor.selection.select(target); - } - }; - var getResizeTarget = function (elm) { - return editor.dom.is(elm, 'figure.image') ? elm.querySelector('img') : elm; - }; - var isResizable = function (elm) { - var selector = editor.settings.object_resizing; - if (selector === false || Env.iOS) { - return false; - } - if (typeof selector !== 'string') { - selector = 'table,img,figure.image,div'; - } - if (elm.getAttribute('data-mce-resize') === 'false') { - return false; - } - if (elm === editor.getBody()) { - return false; - } - return is$1(Element.fromDom(elm), selector); - }; - var resizeGhostElement = function (e) { - var deltaX, deltaY, proportional; - var resizeHelperX, resizeHelperY; - deltaX = e.screenX - startX; - deltaY = e.screenY - startY; - width = deltaX * selectedHandle[2] + startW; - height = deltaY * selectedHandle[3] + startH; - width = width < 5 ? 5 : width; - height = height < 5 ? 5 : height; - if (isImage(selectedElm) && editor.settings.resize_img_proportional !== false) { - proportional = !VK.modifierPressed(e); - } else { - proportional = VK.modifierPressed(e) || isImage(selectedElm) && selectedHandle[2] * selectedHandle[3] !== 0; - } - if (proportional) { - if (abs(deltaX) > abs(deltaY)) { - height = round(width * ratio); - width = round(height / ratio); - } else { - width = round(height / ratio); - height = round(width * ratio); - } - } - dom.setStyles(getResizeTarget(selectedElmGhost), { - width: width, - height: height - }); - resizeHelperX = selectedHandle.startPos.x + deltaX; - resizeHelperY = selectedHandle.startPos.y + deltaY; - resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0; - resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0; - dom.setStyles(resizeHelper, { - left: resizeHelperX, - top: resizeHelperY, - display: 'block' - }); - resizeHelper.innerHTML = width + ' × ' + height; - if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) { - dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width)); - } - if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) { - dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height)); - } - deltaX = rootElement.scrollWidth - startScrollWidth; - deltaY = rootElement.scrollHeight - startScrollHeight; - if (deltaX + deltaY !== 0) { - dom.setStyles(resizeHelper, { - left: resizeHelperX - deltaX, - top: resizeHelperY - deltaY - }); - } - if (!resizeStarted) { - Events.fireObjectResizeStart(editor, selectedElm, startW, startH); - resizeStarted = true; - } - }; - var endGhostResize = function () { - resizeStarted = false; - var setSizeProp = function (name, value) { - if (value) { - if (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) { - dom.setStyle(getResizeTarget(selectedElm), name, value); - } else { - dom.setAttrib(getResizeTarget(selectedElm), name, value); - } - } - }; - setSizeProp('width', width); - setSizeProp('height', height); - dom.unbind(editableDoc, 'mousemove', resizeGhostElement); - dom.unbind(editableDoc, 'mouseup', endGhostResize); - if (rootDocument !== editableDoc) { - dom.unbind(rootDocument, 'mousemove', resizeGhostElement); - dom.unbind(rootDocument, 'mouseup', endGhostResize); - } - dom.remove(selectedElmGhost); - dom.remove(resizeHelper); - showResizeRect(selectedElm); - Events.fireObjectResized(editor, selectedElm, width, height); - dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style')); - editor.nodeChanged(); - }; - var showResizeRect = function (targetElm) { - var position, targetWidth, targetHeight, e, rect; - hideResizeRect(); - unbindResizeHandleEvents(); - position = dom.getPos(targetElm, rootElement); - selectedElmX = position.x; - selectedElmY = position.y; - rect = targetElm.getBoundingClientRect(); - targetWidth = rect.width || rect.right - rect.left; - targetHeight = rect.height || rect.bottom - rect.top; - if (selectedElm !== targetElm) { - selectedElm = targetElm; - width = height = 0; - } - e = editor.fire('ObjectSelected', { target: targetElm }); - if (isResizable(targetElm) && !e.isDefaultPrevented()) { - each(resizeHandles, function (handle, name) { - var handleElm; - var startDrag = function (e) { - startX = e.screenX; - startY = e.screenY; - startW = getResizeTarget(selectedElm).clientWidth; - startH = getResizeTarget(selectedElm).clientHeight; - ratio = startH / startW; - selectedHandle = handle; - handle.startPos = { - x: targetWidth * handle[0] + selectedElmX, - y: targetHeight * handle[1] + selectedElmY - }; - startScrollWidth = rootElement.scrollWidth; - startScrollHeight = rootElement.scrollHeight; - selectedElmGhost = selectedElm.cloneNode(true); - dom.addClass(selectedElmGhost, 'mce-clonedresizable'); - dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all'); - selectedElmGhost.contentEditable = false; - selectedElmGhost.unSelectabe = true; - dom.setStyles(selectedElmGhost, { - left: selectedElmX, - top: selectedElmY, - margin: 0 - }); - selectedElmGhost.removeAttribute('data-mce-selected'); - rootElement.appendChild(selectedElmGhost); - dom.bind(editableDoc, 'mousemove', resizeGhostElement); - dom.bind(editableDoc, 'mouseup', endGhostResize); - if (rootDocument !== editableDoc) { - dom.bind(rootDocument, 'mousemove', resizeGhostElement); - dom.bind(rootDocument, 'mouseup', endGhostResize); - } - resizeHelper = dom.add(rootElement, 'div', { - 'class': 'mce-resize-helper', - 'data-mce-bogus': 'all' - }, startW + ' × ' + startH); - }; - handleElm = dom.get('mceResizeHandle' + name); - if (handleElm) { - dom.remove(handleElm); - } - handleElm = dom.add(rootElement, 'div', { - 'id': 'mceResizeHandle' + name, - 'data-mce-bogus': 'all', - 'class': 'mce-resizehandle', - 'unselectable': true, - 'style': 'cursor:' + name + '-resize; margin:0; padding:0' - }); - if (Env.ie === 11) { - handleElm.contentEditable = false; - } - dom.bind(handleElm, 'mousedown', function (e) { - e.stopImmediatePropagation(); - e.preventDefault(); - startDrag(e); - }); - handle.elm = handleElm; - dom.setStyles(handleElm, { - left: targetWidth * handle[0] + selectedElmX - handleElm.offsetWidth / 2, - top: targetHeight * handle[1] + selectedElmY - handleElm.offsetHeight / 2 - }); - }); - } else { - hideResizeRect(); - } - selectedElm.setAttribute('data-mce-selected', '1'); - }; - var hideResizeRect = function () { - var name, handleElm; - unbindResizeHandleEvents(); - if (selectedElm) { - selectedElm.removeAttribute('data-mce-selected'); - } - for (name in resizeHandles) { - handleElm = dom.get('mceResizeHandle' + name); - if (handleElm) { - dom.unbind(handleElm); - dom.remove(handleElm); - } - } - }; - var updateResizeRect = function (e) { - var startElm, controlElm; - var isChildOrEqual = function (node, parent) { - if (node) { - do { - if (node === parent) { - return true; - } - } while (node = node.parentNode); - } - }; - if (resizeStarted || editor.removed) { - return; - } - each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function (img) { - img.removeAttribute('data-mce-selected'); - }); - controlElm = e.type === 'mousedown' ? e.target : selection.getNode(); - controlElm = dom.$(controlElm).closest('table,img,figure.image,hr')[0]; - if (isChildOrEqual(controlElm, rootElement)) { - disableGeckoResize(); - startElm = selection.getStart(true); - if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) { - showResizeRect(controlElm); - return; - } - } - hideResizeRect(); - }; - var isWithinContentEditableFalse = function (elm) { - return isContentEditableFalse$a(getContentEditableRoot$1(editor.getBody(), elm)); - }; - var unbindResizeHandleEvents = function () { - for (var name in resizeHandles) { - var handle = resizeHandles[name]; - if (handle.elm) { - dom.unbind(handle.elm); - delete handle.elm; - } - } - }; - var disableGeckoResize = function () { - try { - editor.getDoc().execCommand('enableObjectResizing', false, false); - } catch (ex) { - } - }; - editor.on('init', function () { - disableGeckoResize(); - if (Env.ie && Env.ie >= 11) { - editor.on('mousedown click', function (e) { - var target = e.target, nodeName = target.nodeName; - if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName) && !isWithinContentEditableFalse(target)) { - if (e.button !== 2) { - editor.selection.select(target, nodeName === 'TABLE'); - } - if (e.type === 'mousedown') { - editor.nodeChanged(); - } - } - }); - editor.dom.bind(rootElement, 'mscontrolselect', function (e) { - var delayedSelect = function (node) { - Delay.setEditorTimeout(editor, function () { - editor.selection.select(node); - }); - }; - if (isWithinContentEditableFalse(e.target)) { - e.preventDefault(); - delayedSelect(e.target); - return; - } - if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) { - e.preventDefault(); - if (e.target.tagName === 'IMG') { - delayedSelect(e.target); - } - } - }); - } - var throttledUpdateResizeRect = Delay.throttle(function (e) { - if (!editor.composing) { - updateResizeRect(e); - } - }); - editor.on('nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged', throttledUpdateResizeRect); - editor.on('keyup compositionend', function (e) { - if (selectedElm && selectedElm.nodeName === 'TABLE') { - throttledUpdateResizeRect(e); - } - }); - editor.on('hide blur', hideResizeRect); - editor.on('contextmenu', contextMenuSelectImage); - }); - editor.on('remove', unbindResizeHandleEvents); - var destroy = function () { - selectedElm = selectedElmGhost = null; - }; - return { - isResizable: isResizable, - showResizeRect: showResizeRect, - hideResizeRect: hideResizeRect, - updateResizeRect: updateResizeRect, - destroy: destroy - }; - }; - - var getPos$1 = function (elm) { - var x = 0, y = 0; - var offsetParent = elm; - while (offsetParent && offsetParent.nodeType) { - x += offsetParent.offsetLeft || 0; - y += offsetParent.offsetTop || 0; - offsetParent = offsetParent.offsetParent; - } - return { - x: x, - y: y - }; - }; - var fireScrollIntoViewEvent = function (editor, elm, alignToTop) { - var scrollEvent = { - elm: elm, - alignToTop: alignToTop - }; - editor.fire('ScrollIntoView', scrollEvent); - return scrollEvent.isDefaultPrevented(); - }; - var scrollElementIntoView = function (editor, elm, alignToTop) { - var y, viewPort; - var dom = editor.dom; - var root = dom.getRoot(); - var viewPortY, viewPortH, offsetY = 0; - if (fireScrollIntoViewEvent(editor, elm, alignToTop)) { - return; - } - if (!NodeType.isElement(elm)) { - return; - } - if (alignToTop === false) { - offsetY = elm.offsetHeight; - } - if (root.nodeName !== 'BODY') { - var scrollContainer = editor.selection.getScrollContainer(); - if (scrollContainer) { - y = getPos$1(elm).y - getPos$1(scrollContainer).y + offsetY; - viewPortH = scrollContainer.clientHeight; - viewPortY = scrollContainer.scrollTop; - if (y < viewPortY || y + 25 > viewPortY + viewPortH) { - scrollContainer.scrollTop = y < viewPortY ? y : y - viewPortH + 25; - } - return; - } - } - viewPort = dom.getViewPort(editor.getWin()); - y = dom.getPos(elm).y + offsetY; - viewPortY = viewPort.y; - viewPortH = viewPort.h; - if (y < viewPort.y || y + 25 > viewPortY + viewPortH) { - editor.getWin().scrollTo(0, y < viewPortY ? y : y - viewPortH + 25); - } - }; - var getViewPortRect = function (editor) { - if (editor.inline) { - return editor.getBody().getBoundingClientRect(); - } else { - var win = editor.getWin(); - return { - left: 0, - right: win.innerWidth, - top: 0, - bottom: win.innerHeight, - width: win.innerWidth, - height: win.innerHeight - }; - } - }; - var scrollBy = function (editor, dx, dy) { - if (editor.inline) { - editor.getBody().scrollLeft += dx; - editor.getBody().scrollTop += dy; - } else { - editor.getWin().scrollBy(dx, dy); - } - }; - var scrollRangeIntoView = function (editor, rng) { - head(CaretPosition.fromRangeStart(rng).getClientRects()).each(function (rngRect) { - var bodyRect = getViewPortRect(editor); - var overflow = getOverflow(bodyRect, rngRect); - var margin = 4; - var dx = overflow.x > 0 ? overflow.x + margin : overflow.x - margin; - var dy = overflow.y > 0 ? overflow.y + margin : overflow.y - margin; - scrollBy(editor, overflow.x !== 0 ? dx : 0, overflow.y !== 0 ? dy : 0); - }); - }; - var ScrollIntoView = { - scrollElementIntoView: scrollElementIntoView, - scrollRangeIntoView: scrollRangeIntoView - }; - - var hasCeProperty = function (node) { - return NodeType.isContentEditableTrue(node) || NodeType.isContentEditableFalse(node); - }; - var findParent = function (node, rootNode, predicate) { - while (node && node !== rootNode) { - if (predicate(node)) { - return node; - } - node = node.parentNode; - } - return null; - }; - var findClosestIeRange = function (clientX, clientY, doc) { - var element, rng, rects; - element = doc.elementFromPoint(clientX, clientY); - rng = doc.body.createTextRange(); - if (!element || element.tagName === 'HTML') { - element = doc.body; - } - rng.moveToElementText(element); - rects = Tools.toArray(rng.getClientRects()); - rects = rects.sort(function (a, b) { - a = Math.abs(Math.max(a.top - clientY, a.bottom - clientY)); - b = Math.abs(Math.max(b.top - clientY, b.bottom - clientY)); - return a - b; - }); - if (rects.length > 0) { - clientY = (rects[0].bottom + rects[0].top) / 2; - try { - rng.moveToPoint(clientX, clientY); - rng.collapse(true); - return rng; - } catch (ex) { - } - } - return null; - }; - var moveOutOfContentEditableFalse = function (rng, rootNode) { - var parentElement = rng && rng.parentElement ? rng.parentElement() : null; - return NodeType.isContentEditableFalse(findParent(parentElement, rootNode, hasCeProperty)) ? null : rng; - }; - var fromPoint$1 = function (clientX, clientY, doc) { - var rng, point; - var pointDoc = doc; - if (pointDoc.caretPositionFromPoint) { - point = pointDoc.caretPositionFromPoint(clientX, clientY); - if (point) { - rng = doc.createRange(); - rng.setStart(point.offsetNode, point.offset); - rng.collapse(true); - } - } else if (doc.caretRangeFromPoint) { - rng = doc.caretRangeFromPoint(clientX, clientY); - } else if (pointDoc.body.createTextRange) { - rng = pointDoc.body.createTextRange(); - try { - rng.moveToPoint(clientX, clientY); - rng.collapse(true); - } catch (ex) { - rng = findClosestIeRange(clientX, clientY, doc); - } - return moveOutOfContentEditableFalse(rng, doc.body); - } - return rng; - }; - var CaretRangeFromPoint = { fromPoint: fromPoint$1 }; - - var processRanges = function (editor, ranges) { - return map(ranges, function (range) { - var evt = editor.fire('GetSelectionRange', { range: range }); - return evt.range !== range ? evt.range : range; - }); - }; - var EventProcessRanges = { processRanges: processRanges }; - - var fromElements = function (elements, scope) { - var doc = scope || domGlobals.document; - var fragment = doc.createDocumentFragment(); - each(elements, function (element) { - fragment.appendChild(element.dom()); - }); - return Element.fromDom(fragment); - }; - - var tableModel = Immutable('element', 'width', 'rows'); - var tableRow = Immutable('element', 'cells'); - var cellPosition = Immutable('x', 'y'); - var getSpan = function (td, key) { - var value = parseInt(get$1(td, key), 10); - return isNaN(value) ? 1 : value; - }; - var fillout = function (table, x, y, tr, td) { - var rowspan = getSpan(td, 'rowspan'); - var colspan = getSpan(td, 'colspan'); - var rows = table.rows(); - for (var y2 = y; y2 < y + rowspan; y2++) { - if (!rows[y2]) { - rows[y2] = tableRow(deep(tr), []); - } - for (var x2 = x; x2 < x + colspan; x2++) { - var cells = rows[y2].cells(); - cells[x2] = y2 === y && x2 === x ? td : shallow(td); - } - } - }; - var cellExists = function (table, x, y) { - var rows = table.rows(); - var cells = rows[y] ? rows[y].cells() : []; - return !!cells[x]; - }; - var skipCellsX = function (table, x, y) { - while (cellExists(table, x, y)) { - x++; - } - return x; - }; - var getWidth = function (rows) { - return foldl(rows, function (acc, row) { - return row.cells().length > acc ? row.cells().length : acc; - }, 0); - }; - var findElementPos = function (table, element) { - var rows = table.rows(); - for (var y = 0; y < rows.length; y++) { - var cells = rows[y].cells(); - for (var x = 0; x < cells.length; x++) { - if (eq(cells[x], element)) { - return Option.some(cellPosition(x, y)); - } - } - } - return Option.none(); - }; - var extractRows = function (table, sx, sy, ex, ey) { - var newRows = []; - var rows = table.rows(); - for (var y = sy; y <= ey; y++) { - var cells = rows[y].cells(); - var slice = sx < ex ? cells.slice(sx, ex + 1) : cells.slice(ex, sx + 1); - newRows.push(tableRow(rows[y].element(), slice)); - } - return newRows; - }; - var subTable = function (table, startPos, endPos) { - var sx = startPos.x(), sy = startPos.y(); - var ex = endPos.x(), ey = endPos.y(); - var newRows = sy < ey ? extractRows(table, sx, sy, ex, ey) : extractRows(table, sx, ey, ex, sy); - return tableModel(table.element(), getWidth(newRows), newRows); - }; - var createDomTable = function (table, rows) { - var tableElement = shallow(table.element()); - var tableBody = Element.fromTag('tbody'); - append$1(tableBody, rows); - append(tableElement, tableBody); - return tableElement; - }; - var modelRowsToDomRows = function (table) { - return map(table.rows(), function (row) { - var cells = map(row.cells(), function (cell) { - var td = deep(cell); - remove(td, 'colspan'); - remove(td, 'rowspan'); - return td; - }); - var tr = shallow(row.element()); - append$1(tr, cells); - return tr; - }); - }; - var fromDom$1 = function (tableElm) { - var table = tableModel(shallow(tableElm), 0, []); - each(descendants$1(tableElm, 'tr'), function (tr, y) { - each(descendants$1(tr, 'td,th'), function (td, x) { - fillout(table, skipCellsX(table, x, y), y, tr, td); - }); - }); - return tableModel(table.element(), getWidth(table.rows()), table.rows()); - }; - var toDom = function (table) { - return createDomTable(table, modelRowsToDomRows(table)); - }; - var subsection = function (table, startElement, endElement) { - return findElementPos(table, startElement).bind(function (startPos) { - return findElementPos(table, endElement).map(function (endPos) { - return subTable(table, startPos, endPos); - }); - }); - }; - var SimpleTableModel = { - fromDom: fromDom$1, - toDom: toDom, - subsection: subsection - }; - - var getRanges = function (selection) { - var ranges = []; - if (selection) { - for (var i = 0; i < selection.rangeCount; i++) { - ranges.push(selection.getRangeAt(i)); - } - } - return ranges; - }; - var getSelectedNodes = function (ranges) { - return bind(ranges, function (range) { - var node = getSelectedNode(range); - return node ? [Element.fromDom(node)] : []; - }); - }; - var hasMultipleRanges = function (selection) { - return getRanges(selection).length > 1; - }; - var MultiRange = { - getRanges: getRanges, - getSelectedNodes: getSelectedNodes, - hasMultipleRanges: hasMultipleRanges - }; - - var getCellsFromRanges = function (ranges) { - return filter(MultiRange.getSelectedNodes(ranges), isTableCell); - }; - var getCellsFromElement = function (elm) { - return descendants$1(elm, 'td[data-mce-selected],th[data-mce-selected]'); - }; - var getCellsFromElementOrRanges = function (ranges, element) { - var selectedCells = getCellsFromElement(element); - var rangeCells = getCellsFromRanges(ranges); - return selectedCells.length > 0 ? selectedCells : rangeCells; - }; - var getCellsFromEditor = function (editor) { - return getCellsFromElementOrRanges(MultiRange.getRanges(editor.selection.getSel()), Element.fromDom(editor.getBody())); - }; - var TableCellSelection = { - getCellsFromRanges: getCellsFromRanges, - getCellsFromElement: getCellsFromElement, - getCellsFromElementOrRanges: getCellsFromElementOrRanges, - getCellsFromEditor: getCellsFromEditor - }; - - var findParentListContainer = function (parents) { - return find(parents, function (elm) { - return name(elm) === 'ul' || name(elm) === 'ol'; - }); - }; - var getFullySelectedListWrappers = function (parents, rng) { - return find(parents, function (elm) { - return name(elm) === 'li' && hasAllContentsSelected(elm, rng); - }).fold(constant([]), function (li) { - return findParentListContainer(parents).map(function (listCont) { - return [ - Element.fromTag('li'), - Element.fromTag(name(listCont)) - ]; - }).getOr([]); - }); - }; - var wrap$3 = function (innerElm, elms) { - var wrapped = foldl(elms, function (acc, elm) { - append(elm, acc); - return elm; - }, innerElm); - return elms.length > 0 ? fromElements([wrapped]) : wrapped; - }; - var directListWrappers = function (commonAnchorContainer) { - if (isListItem(commonAnchorContainer)) { - return parent(commonAnchorContainer).filter(isList).fold(constant([]), function (listElm) { - return [ - commonAnchorContainer, - listElm - ]; - }); - } else { - return isList(commonAnchorContainer) ? [commonAnchorContainer] : []; - } - }; - var getWrapElements = function (rootNode, rng) { - var commonAnchorContainer = Element.fromDom(rng.commonAncestorContainer); - var parents = Parents.parentsAndSelf(commonAnchorContainer, rootNode); - var wrapElements = filter(parents, function (elm) { - return isInline(elm) || isHeading(elm); - }); - var listWrappers = getFullySelectedListWrappers(parents, rng); - var allWrappers = wrapElements.concat(listWrappers.length ? listWrappers : directListWrappers(commonAnchorContainer)); - return map(allWrappers, shallow); - }; - var emptyFragment = function () { - return fromElements([]); - }; - var getFragmentFromRange = function (rootNode, rng) { - return wrap$3(Element.fromDom(rng.cloneContents()), getWrapElements(rootNode, rng)); - }; - var getParentTable = function (rootElm, cell) { - return ancestor$1(cell, 'table', curry(eq, rootElm)); - }; - var getTableFragment = function (rootNode, selectedTableCells) { - return getParentTable(rootNode, selectedTableCells[0]).bind(function (tableElm) { - var firstCell = selectedTableCells[0]; - var lastCell = selectedTableCells[selectedTableCells.length - 1]; - var fullTableModel = SimpleTableModel.fromDom(tableElm); - return SimpleTableModel.subsection(fullTableModel, firstCell, lastCell).map(function (sectionedTableModel) { - return fromElements([SimpleTableModel.toDom(sectionedTableModel)]); - }); - }).getOrThunk(emptyFragment); - }; - var getSelectionFragment = function (rootNode, ranges) { - return ranges.length > 0 && ranges[0].collapsed ? emptyFragment() : getFragmentFromRange(rootNode, ranges[0]); - }; - var read$2 = function (rootNode, ranges) { - var selectedCells = TableCellSelection.getCellsFromElementOrRanges(ranges, rootNode); - return selectedCells.length > 0 ? getTableFragment(rootNode, selectedCells) : getSelectionFragment(rootNode, ranges); - }; - var FragmentReader = { read: read$2 }; - - var getTextContent = function (editor) { - return Option.from(editor.selection.getRng()).map(function (rng) { - var bin = editor.dom.add(editor.getBody(), 'div', { - 'data-mce-bogus': 'all', - 'style': 'overflow: hidden; opacity: 0;' - }, rng.cloneContents()); - var text = Zwsp.trim(bin.innerText); - editor.dom.remove(bin); - return text; - }).getOr(''); - }; - var getHtmlContent = function (editor, args) { - var rng = editor.selection.getRng(), tmpElm = editor.dom.create('body'); - var sel = editor.selection.getSel(); - var fragment; - var ranges = EventProcessRanges.processRanges(editor, MultiRange.getRanges(sel)); - fragment = args.contextual ? FragmentReader.read(Element.fromDom(editor.getBody()), ranges).dom() : rng.cloneContents(); - if (fragment) { - tmpElm.appendChild(fragment); - } - return editor.selection.serializer.serialize(tmpElm, args); - }; - var getContent$1 = function (editor, args) { - if (args === void 0) { - args = {}; - } - args.get = true; - args.format = args.format || 'html'; - args.selection = true; - args = editor.fire('BeforeGetContent', args); - if (args.isDefaultPrevented()) { - editor.fire('GetContent', args); - return args.content; - } - if (args.format === 'text') { - return getTextContent(editor); - } else { - args.getInner = true; - var content = getHtmlContent(editor, args); - if (args.format === 'tree') { - return content; - } else { - args.content = editor.selection.isCollapsed() ? '' : content; - editor.fire('GetContent', args); - return args.content; - } - } - }; - var GetSelectionContent = { getContent: getContent$1 }; - - var findParent$1 = function (node, rootNode, predicate) { - while (node && node !== rootNode) { - if (predicate(node)) { - return node; - } - node = node.parentNode; - } - return null; - }; - var hasParent = function (node, rootNode, predicate) { - return findParent$1(node, rootNode, predicate) !== null; - }; - var hasParentWithName = function (node, rootNode, name) { - return hasParent(node, rootNode, function (node) { - return node.nodeName === name; - }); - }; - var isTable$3 = function (node) { - return node && node.nodeName === 'TABLE'; - }; - var isTableCell$3 = function (node) { - return node && /^(TD|TH|CAPTION)$/.test(node.nodeName); - }; - var isCeFalseCaretContainer = function (node, rootNode) { - return isCaretContainer(node) && hasParent(node, rootNode, isCaretNode) === false; - }; - var hasBrBeforeAfter = function (dom, node, left) { - var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || dom.getRoot()); - while (node = walker[left ? 'prev' : 'next']()) { - if (NodeType.isBr(node)) { - return true; - } - } - }; - var isPrevNode = function (node, name) { - return node.previousSibling && node.previousSibling.nodeName === name; - }; - var hasContentEditableFalseParent = function (body, node) { - while (node && node !== body) { - if (NodeType.isContentEditableFalse(node)) { - return true; - } - node = node.parentNode; - } - return false; - }; - var findTextNodeRelative = function (dom, isAfterNode, collapsed, left, startNode) { - var lastInlineElement; - var body = dom.getRoot(); - var node; - var nonEmptyElementsMap = dom.schema.getNonEmptyElements(); - var parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body; - if (left && NodeType.isBr(startNode) && isAfterNode && dom.isEmpty(parentBlockContainer)) { - return Option.some(CaretPosition(startNode.parentNode, dom.nodeIndex(startNode))); - } - var walker = new TreeWalker(startNode, parentBlockContainer); - while (node = walker[left ? 'prev' : 'next']()) { - if (dom.getContentEditableParent(node) === 'false' || isCeFalseCaretContainer(node, body)) { - return Option.none(); - } - if (NodeType.isText(node) && node.nodeValue.length > 0) { - if (hasParentWithName(node, body, 'A') === false) { - return Option.some(CaretPosition(node, left ? node.nodeValue.length : 0)); - } - return Option.none(); - } - if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) { - return Option.none(); - } - lastInlineElement = node; - } - if (collapsed && lastInlineElement) { - return Option.some(CaretPosition(lastInlineElement, 0)); - } - return Option.none(); - }; - var normalizeEndPoint = function (dom, collapsed, start, rng) { - var container, offset; - var body = dom.getRoot(); - var node, nonEmptyElementsMap; - var directionLeft, isAfterNode, normalized = false; - container = rng[(start ? 'start' : 'end') + 'Container']; - offset = rng[(start ? 'start' : 'end') + 'Offset']; - isAfterNode = NodeType.isElement(container) && offset === container.childNodes.length; - nonEmptyElementsMap = dom.schema.getNonEmptyElements(); - directionLeft = start; - if (isCaretContainer(container)) { - return Option.none(); - } - if (NodeType.isElement(container) && offset > container.childNodes.length - 1) { - directionLeft = false; - } - if (NodeType.isDocument(container)) { - container = body; - offset = 0; - } - if (container === body) { - if (directionLeft) { - node = container.childNodes[offset > 0 ? offset - 1 : 0]; - if (node) { - if (isCaretContainer(node)) { - return Option.none(); - } - if (nonEmptyElementsMap[node.nodeName] || isTable$3(node)) { - return Option.none(); - } - } - } - if (container.hasChildNodes()) { - offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1); - container = container.childNodes[offset]; - offset = NodeType.isText(container) && isAfterNode ? container.data.length : 0; - if (!collapsed && container === body.lastChild && isTable$3(container)) { - return Option.none(); - } - if (hasContentEditableFalseParent(body, container) || isCaretContainer(container)) { - return Option.none(); - } - if (container.hasChildNodes() && isTable$3(container) === false) { - node = container; - var walker = new TreeWalker(container, body); - do { - if (NodeType.isContentEditableFalse(node) || isCaretContainer(node)) { - normalized = false; - break; - } - if (NodeType.isText(node) && node.nodeValue.length > 0) { - offset = directionLeft ? 0 : node.nodeValue.length; - container = node; - normalized = true; - break; - } - if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell$3(node)) { - offset = dom.nodeIndex(node); - container = node.parentNode; - if (!directionLeft) { - offset++; - } - normalized = true; - break; - } - } while (node = directionLeft ? walker.next() : walker.prev()); - } - } - } - if (collapsed) { - if (NodeType.isText(container) && offset === 0) { - findTextNodeRelative(dom, isAfterNode, collapsed, true, container).each(function (pos) { - container = pos.container(); - offset = pos.offset(); - normalized = true; - }); - } - if (NodeType.isElement(container)) { - node = container.childNodes[offset]; - if (!node) { - node = container.childNodes[offset - 1]; - } - if (node && NodeType.isBr(node) && !isPrevNode(node, 'A') && !hasBrBeforeAfter(dom, node, false) && !hasBrBeforeAfter(dom, node, true)) { - findTextNodeRelative(dom, isAfterNode, collapsed, true, node).each(function (pos) { - container = pos.container(); - offset = pos.offset(); - normalized = true; - }); - } - } - } - if (directionLeft && !collapsed && NodeType.isText(container) && offset === container.nodeValue.length) { - findTextNodeRelative(dom, isAfterNode, collapsed, false, container).each(function (pos) { - container = pos.container(); - offset = pos.offset(); - normalized = true; - }); - } - return normalized ? Option.some(CaretPosition(container, offset)) : Option.none(); - }; - var normalize$2 = function (dom, rng) { - var collapsed = rng.collapsed, normRng = rng.cloneRange(); - var startPos = CaretPosition.fromRangeStart(rng); - normalizeEndPoint(dom, collapsed, true, normRng).each(function (pos) { - if (!collapsed || !CaretPosition.isAbove(startPos, pos)) { - normRng.setStart(pos.container(), pos.offset()); - } - }); - if (!collapsed) { - normalizeEndPoint(dom, collapsed, false, normRng).each(function (pos) { - normRng.setEnd(pos.container(), pos.offset()); - }); - } - if (collapsed) { - normRng.collapse(true); - } - return RangeCompare.isEq(rng, normRng) ? Option.none() : Option.some(normRng); - }; - var NormalizeRange = { normalize: normalize$2 }; - - var prependData = function (target, data) { - target.insertData(0, data); - }; - var removeEmpty = function (text) { - if (text.dom().length === 0) { - remove$1(text); - return Option.none(); - } - return Option.some(text); - }; - var rngSetContent = function (rng, fragment) { - var firstChild = Option.from(fragment.firstChild).map(Element.fromDom); - var lastChild = Option.from(fragment.lastChild).map(Element.fromDom); - rng.deleteContents(); - rng.insertNode(fragment); - var prevText = firstChild.bind(prevSibling).filter(isText).bind(removeEmpty); - var nextText = lastChild.bind(nextSibling).filter(isText).bind(removeEmpty); - liftN([ - prevText, - firstChild.filter(isText) - ], function (prev, start) { - prependData(start.dom(), prev.dom().data); - remove$1(prev); - }); - liftN([ - nextText, - lastChild.filter(isText) - ], function (next, end) { - var oldLength = end.dom().length; - end.dom().appendData(next.dom().data); - rng.setEnd(end.dom(), oldLength); - remove$1(next); - }); - rng.collapse(false); - }; - var setupArgs = function (args, content) { - args = args || { format: 'html' }; - args.set = true; - args.selection = true; - args.content = content; - return args; - }; - var setContent$1 = function (editor, content, args) { - args = setupArgs(args, content); - if (!args.no_events) { - args = editor.fire('BeforeSetContent', args); - if (args.isDefaultPrevented()) { - editor.fire('SetContent', args); - return; - } - } - var rng = editor.selection.getRng(); - rngSetContent(rng, rng.createContextualFragment(args.content)); - editor.selection.setRng(rng); - ScrollIntoView.scrollRangeIntoView(editor, rng); - if (!args.no_events) { - editor.fire('SetContent', args); - } - }; - var SetSelectionContent = { setContent: setContent$1 }; - - var getEndpointElement = function (root, rng, start, real, resolve) { - var container = start ? rng.startContainer : rng.endContainer; - var offset = start ? rng.startOffset : rng.endOffset; - return Option.from(container).map(Element.fromDom).map(function (elm) { - return !real || !rng.collapsed ? child(elm, resolve(elm, offset)).getOr(elm) : elm; - }).bind(function (elm) { - return isElement(elm) ? Option.some(elm) : parent(elm); - }).map(function (elm) { - return elm.dom(); - }).getOr(root); - }; - var getStart = function (root, rng, real) { - return getEndpointElement(root, rng, true, real, function (elm, offset) { - return Math.min(childNodesCount(elm), offset); - }); - }; - var getEnd = function (root, rng, real) { - return getEndpointElement(root, rng, false, real, function (elm, offset) { - return offset > 0 ? offset - 1 : offset; - }); - }; - var skipEmptyTextNodes = function (node, forwards) { - var orig = node; - while (node && NodeType.isText(node) && node.length === 0) { - node = forwards ? node.nextSibling : node.previousSibling; - } - return node || orig; - }; - var getNode$1 = function (root, rng) { - var elm, startContainer, endContainer, startOffset, endOffset; - if (!rng) { - return root; - } - startContainer = rng.startContainer; - endContainer = rng.endContainer; - startOffset = rng.startOffset; - endOffset = rng.endOffset; - elm = rng.commonAncestorContainer; - if (!rng.collapsed) { - if (startContainer === endContainer) { - if (endOffset - startOffset < 2) { - if (startContainer.hasChildNodes()) { - elm = startContainer.childNodes[startOffset]; - } - } - } - if (startContainer.nodeType === 3 && endContainer.nodeType === 3) { - if (startContainer.length === startOffset) { - startContainer = skipEmptyTextNodes(startContainer.nextSibling, true); - } else { - startContainer = startContainer.parentNode; - } - if (endOffset === 0) { - endContainer = skipEmptyTextNodes(endContainer.previousSibling, false); - } else { - endContainer = endContainer.parentNode; - } - if (startContainer && startContainer === endContainer) { - return startContainer; - } - } - } - if (elm && elm.nodeType === 3) { - return elm.parentNode; - } - return elm; - }; - var getSelectedBlocks = function (dom, rng, startElm, endElm) { - var node, root; - var selectedBlocks = []; - root = dom.getRoot(); - startElm = dom.getParent(startElm || getStart(root, rng, rng.collapsed), dom.isBlock); - endElm = dom.getParent(endElm || getEnd(root, rng, rng.collapsed), dom.isBlock); - if (startElm && startElm !== root) { - selectedBlocks.push(startElm); - } - if (startElm && endElm && startElm !== endElm) { - node = startElm; - var walker = new TreeWalker(startElm, root); - while ((node = walker.next()) && node !== endElm) { - if (dom.isBlock(node)) { - selectedBlocks.push(node); - } - } - } - if (endElm && startElm !== endElm && endElm !== root) { - selectedBlocks.push(endElm); - } - return selectedBlocks; - }; - var select$1 = function (dom, node, content) { - return Option.from(node).map(function (node) { - var idx = dom.nodeIndex(node); - var rng = dom.createRng(); - rng.setStart(node.parentNode, idx); - rng.setEnd(node.parentNode, idx + 1); - if (content) { - moveEndPoint$1(dom, rng, node, true); - moveEndPoint$1(dom, rng, node, false); - } - return rng; - }); - }; - - var deleteFromCallbackMap = function (callbackMap, selector, callback) { - if (callbackMap && callbackMap.hasOwnProperty(selector)) { - var newCallbacks = filter(callbackMap[selector], function (cb) { - return cb !== callback; - }); - if (newCallbacks.length === 0) { - delete callbackMap[selector]; - } else { - callbackMap[selector] = newCallbacks; - } - } - }; - function SelectorChanged (dom, editor) { - var selectorChangedData, currentSelectors; - return { - selectorChangedWithUnbind: function (selector, callback) { - if (!selectorChangedData) { - selectorChangedData = {}; - currentSelectors = {}; - editor.on('NodeChange', function (e) { - var node = e.element, parents = dom.getParents(node, null, dom.getRoot()), matchedSelectors = {}; - Tools.each(selectorChangedData, function (callbacks, selector) { - Tools.each(parents, function (node) { - if (dom.is(node, selector)) { - if (!currentSelectors[selector]) { - Tools.each(callbacks, function (callback) { - callback(true, { - node: node, - selector: selector, - parents: parents - }); - }); - currentSelectors[selector] = callbacks; - } - matchedSelectors[selector] = callbacks; - return false; - } - }); - }); - Tools.each(currentSelectors, function (callbacks, selector) { - if (!matchedSelectors[selector]) { - delete currentSelectors[selector]; - Tools.each(callbacks, function (callback) { - callback(false, { - node: node, - selector: selector, - parents: parents - }); - }); - } - }); - }); - } - if (!selectorChangedData[selector]) { - selectorChangedData[selector] = []; - } - selectorChangedData[selector].push(callback); - return { - unbind: function () { - deleteFromCallbackMap(selectorChangedData, selector, callback); - deleteFromCallbackMap(currentSelectors, selector, callback); - } - }; - } - }; - } - - var isNativeIeSelection = function (rng) { - return !!rng.select; - }; - var isAttachedToDom = function (node) { - return !!(node && node.ownerDocument) && contains$3(Element.fromDom(node.ownerDocument), Element.fromDom(node)); - }; - var isValidRange = function (rng) { - if (!rng) { - return false; - } else if (isNativeIeSelection(rng)) { - return true; - } else { - return isAttachedToDom(rng.startContainer) && isAttachedToDom(rng.endContainer); - } - }; - var Selection = function (dom, win, serializer, editor) { - var bookmarkManager, controlSelection; - var selectedRange, explicitRange; - var selectorChangedWithUnbind = SelectorChanged(dom, editor).selectorChangedWithUnbind; - var setCursorLocation = function (node, offset) { - var rng = dom.createRng(); - if (!node) { - moveEndPoint$1(dom, rng, editor.getBody(), true); - setRng(rng); - } else { - rng.setStart(node, offset); - rng.setEnd(node, offset); - setRng(rng); - collapse(false); - } - }; - var getContent = function (args) { - return GetSelectionContent.getContent(editor, args); - }; - var setContent = function (content, args) { - return SetSelectionContent.setContent(editor, content, args); - }; - var getStart$1 = function (real) { - return getStart(editor.getBody(), getRng(), real); - }; - var getEnd$1 = function (real) { - return getEnd(editor.getBody(), getRng(), real); - }; - var getBookmark = function (type, normalized) { - return bookmarkManager.getBookmark(type, normalized); - }; - var moveToBookmark = function (bookmark) { - return bookmarkManager.moveToBookmark(bookmark); - }; - var select = function (node, content) { - select$1(dom, node, content).each(setRng); - return node; - }; - var isCollapsed = function () { - var rng = getRng(), sel = getSel(); - if (!rng || rng.item) { - return false; - } - if (rng.compareEndPoints) { - return rng.compareEndPoints('StartToEnd', rng) === 0; - } - return !sel || rng.collapsed; - }; - var collapse = function (toStart) { - var rng = getRng(); - rng.collapse(!!toStart); - setRng(rng); - }; - var getSel = function () { - return win.getSelection ? win.getSelection() : win.document.selection; - }; - var getRng = function () { - var selection, rng, elm, doc; - var tryCompareBoundaryPoints = function (how, sourceRange, destinationRange) { - try { - return sourceRange.compareBoundaryPoints(how, destinationRange); - } catch (ex) { - return -1; - } - }; - if (!win) { - return null; - } - doc = win.document; - if (typeof doc === 'undefined' || doc === null) { - return null; - } - if (editor.bookmark !== undefined && EditorFocus.hasFocus(editor) === false) { - var bookmark = SelectionBookmark.getRng(editor); - if (bookmark.isSome()) { - return bookmark.map(function (r) { - return EventProcessRanges.processRanges(editor, [r])[0]; - }).getOr(doc.createRange()); - } - } - try { - if (selection = getSel()) { - if (selection.rangeCount > 0) { - rng = selection.getRangeAt(0); - } else { - rng = selection.createRange ? selection.createRange() : doc.createRange(); - } - } - } catch (ex) { - } - rng = EventProcessRanges.processRanges(editor, [rng])[0]; - if (!rng) { - rng = doc.createRange ? doc.createRange() : doc.body.createTextRange(); - } - if (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) { - elm = dom.getRoot(); - rng.setStart(elm, 0); - rng.setEnd(elm, 0); - } - if (selectedRange && explicitRange) { - if (tryCompareBoundaryPoints(rng.START_TO_START, rng, selectedRange) === 0 && tryCompareBoundaryPoints(rng.END_TO_END, rng, selectedRange) === 0) { - rng = explicitRange; - } else { - selectedRange = null; - explicitRange = null; - } - } - return rng; - }; - var setRng = function (rng, forward) { - var sel, node, evt; - if (!isValidRange(rng)) { - return; - } - var ieRange = isNativeIeSelection(rng) ? rng : null; - if (ieRange) { - explicitRange = null; - try { - ieRange.select(); - } catch (ex) { - } - return; - } - sel = getSel(); - evt = editor.fire('SetSelectionRange', { - range: rng, - forward: forward - }); - rng = evt.range; - if (sel) { - explicitRange = rng; - try { - sel.removeAllRanges(); - sel.addRange(rng); - } catch (ex) { - } - if (forward === false && sel.extend) { - sel.collapse(rng.endContainer, rng.endOffset); - sel.extend(rng.startContainer, rng.startOffset); - } - selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null; - } - if (!rng.collapsed && rng.startContainer === rng.endContainer && sel.setBaseAndExtent && !Env.ie) { - if (rng.endOffset - rng.startOffset < 2) { - if (rng.startContainer.hasChildNodes()) { - node = rng.startContainer.childNodes[rng.startOffset]; - if (node && node.tagName === 'IMG') { - sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset); - if (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) { - sel.setBaseAndExtent(node, 0, node, 1); - } - } - } - } - } - editor.fire('AfterSetSelectionRange', { - range: rng, - forward: forward - }); - }; - var setNode = function (elm) { - setContent(dom.getOuterHTML(elm)); - return elm; - }; - var getNode = function () { - return getNode$1(editor.getBody(), getRng()); - }; - var getSelectedBlocks$1 = function (startElm, endElm) { - return getSelectedBlocks(dom, getRng(), startElm, endElm); - }; - var isForward = function () { - var sel = getSel(); - var anchorRange, focusRange; - if (!sel || !sel.anchorNode || !sel.focusNode) { - return true; - } - anchorRange = dom.createRng(); - anchorRange.setStart(sel.anchorNode, sel.anchorOffset); - anchorRange.collapse(true); - focusRange = dom.createRng(); - focusRange.setStart(sel.focusNode, sel.focusOffset); - focusRange.collapse(true); - return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0; - }; - var normalize = function () { - var rng = getRng(); - var sel = getSel(); - if (!MultiRange.hasMultipleRanges(sel) && hasAnyRanges(editor)) { - var normRng = NormalizeRange.normalize(dom, rng); - normRng.each(function (normRng) { - setRng(normRng, isForward()); - }); - return normRng.getOr(rng); - } - return rng; - }; - var selectorChanged = function (selector, callback) { - selectorChangedWithUnbind(selector, callback); - return exports; - }; - var getScrollContainer = function () { - var scrollContainer; - var node = dom.getRoot(); - while (node && node.nodeName !== 'BODY') { - if (node.scrollHeight > node.clientHeight) { - scrollContainer = node; - break; - } - node = node.parentNode; - } - return scrollContainer; - }; - var scrollIntoView = function (elm, alignToTop) { - return ScrollIntoView.scrollElementIntoView(editor, elm, alignToTop); - }; - var placeCaretAt = function (clientX, clientY) { - return setRng(CaretRangeFromPoint.fromPoint(clientX, clientY, editor.getDoc())); - }; - var getBoundingClientRect = function () { - var rng = getRng(); - return rng.collapsed ? CaretPosition$1.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect(); - }; - var destroy = function () { - win = selectedRange = explicitRange = null; - controlSelection.destroy(); - }; - var exports = { - bookmarkManager: null, - controlSelection: null, - dom: dom, - win: win, - serializer: serializer, - editor: editor, - collapse: collapse, - setCursorLocation: setCursorLocation, - getContent: getContent, - setContent: setContent, - getBookmark: getBookmark, - moveToBookmark: moveToBookmark, - select: select, - isCollapsed: isCollapsed, - isForward: isForward, - setNode: setNode, - getNode: getNode, - getSel: getSel, - setRng: setRng, - getRng: getRng, - getStart: getStart$1, - getEnd: getEnd$1, - getSelectedBlocks: getSelectedBlocks$1, - normalize: normalize, - selectorChanged: selectorChanged, - selectorChangedWithUnbind: selectorChangedWithUnbind, - getScrollContainer: getScrollContainer, - scrollIntoView: scrollIntoView, - placeCaretAt: placeCaretAt, - getBoundingClientRect: getBoundingClientRect, - destroy: destroy - }; - bookmarkManager = BookmarkManager$1(exports); - controlSelection = ControlSelection(exports, editor); - exports.bookmarkManager = bookmarkManager; - exports.controlSelection = controlSelection; - return exports; - }; - - var isText$8 = NodeType.isText; - var startsWithCaretContainer$1 = function (node) { - return isText$8(node) && node.data[0] === Zwsp.ZWSP; - }; - var endsWithCaretContainer$1 = function (node) { - return isText$8(node) && node.data[node.data.length - 1] === Zwsp.ZWSP; - }; - var createZwsp = function (node) { - return node.ownerDocument.createTextNode(Zwsp.ZWSP); - }; - var insertBefore = function (node) { - if (isText$8(node.previousSibling)) { - if (endsWithCaretContainer$1(node.previousSibling)) { - return node.previousSibling; - } else { - node.previousSibling.appendData(Zwsp.ZWSP); - return node.previousSibling; - } - } else if (isText$8(node)) { - if (startsWithCaretContainer$1(node)) { - return node; - } else { - node.insertData(0, Zwsp.ZWSP); - return node; - } - } else { - var newNode = createZwsp(node); - node.parentNode.insertBefore(newNode, node); - return newNode; - } - }; - var insertAfter = function (node) { - if (isText$8(node.nextSibling)) { - if (startsWithCaretContainer$1(node.nextSibling)) { - return node.nextSibling; - } else { - node.nextSibling.insertData(0, Zwsp.ZWSP); - return node.nextSibling; - } - } else if (isText$8(node)) { - if (endsWithCaretContainer$1(node)) { - return node; - } else { - node.appendData(Zwsp.ZWSP); - return node; - } - } else { - var newNode = createZwsp(node); - if (node.nextSibling) { - node.parentNode.insertBefore(newNode, node.nextSibling); - } else { - node.parentNode.appendChild(newNode); - } - return newNode; - } - }; - var insertInline$1 = function (before, node) { - return before ? insertBefore(node) : insertAfter(node); - }; - var insertInlineBefore = curry(insertInline$1, true); - var insertInlineAfter = curry(insertInline$1, false); - - var insertInlinePos = function (pos, before) { - if (NodeType.isText(pos.container())) { - return insertInline$1(before, pos.container()); - } else { - return insertInline$1(before, pos.getNode()); - } - }; - var isPosCaretContainer = function (pos, caret) { - var caretNode = caret.get(); - return caretNode && pos.container() === caretNode && isCaretContainerInline(caretNode); - }; - var renderCaret = function (caret, location) { - return location.fold(function (element) { - CaretContainerRemove.remove(caret.get()); - var text = insertInlineBefore(element); - caret.set(text); - return Option.some(CaretPosition$1(text, text.length - 1)); - }, function (element) { - return CaretFinder.firstPositionIn(element).map(function (pos) { - if (!isPosCaretContainer(pos, caret)) { - CaretContainerRemove.remove(caret.get()); - var text = insertInlinePos(pos, true); - caret.set(text); - return CaretPosition$1(text, 1); - } else { - return CaretPosition$1(caret.get(), 1); - } - }); - }, function (element) { - return CaretFinder.lastPositionIn(element).map(function (pos) { - if (!isPosCaretContainer(pos, caret)) { - CaretContainerRemove.remove(caret.get()); - var text = insertInlinePos(pos, false); - caret.set(text); - return CaretPosition$1(text, text.length - 1); - } else { - return CaretPosition$1(caret.get(), caret.get().length - 1); - } - }); - }, function (element) { - CaretContainerRemove.remove(caret.get()); - var text = insertInlineAfter(element); - caret.set(text); - return Option.some(CaretPosition$1(text, 1)); - }); - }; - var BoundaryCaret = { renderCaret: renderCaret }; - - var strongRtl = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/; - var hasStrongRtl = function (text) { - return strongRtl.test(text); - }; - - var isInlineTarget = function (editor, elm) { - var selector = getString(editor, 'inline_boundaries_selector').getOr('a[href],code'); - return is$1(Element.fromDom(elm), selector); - }; - var isRtl$1 = function (element) { - return DOMUtils$1.DOM.getStyle(element, 'direction', true) === 'rtl' || hasStrongRtl(element.textContent); - }; - var findInlineParents = function (isInlineTarget, rootNode, pos) { - return filter(DOMUtils$1.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget); - }; - var findRootInline = function (isInlineTarget, rootNode, pos) { - var parents = findInlineParents(isInlineTarget, rootNode, pos); - return Option.from(parents[parents.length - 1]); - }; - var hasSameParentBlock = function (rootNode, node1, node2) { - var block1 = getParentBlock(node1, rootNode); - var block2 = getParentBlock(node2, rootNode); - return block1 && block1 === block2; - }; - var isAtZwsp = function (pos) { - return isBeforeInline(pos) || isAfterInline(pos); - }; - var normalizePosition = function (forward, pos) { - if (!pos) { - return pos; - } - var container = pos.container(), offset = pos.offset(); - if (forward) { - if (isCaretContainerInline(container)) { - if (NodeType.isText(container.nextSibling)) { - return CaretPosition$1(container.nextSibling, 0); - } else { - return CaretPosition$1.after(container); - } - } else { - return isBeforeInline(pos) ? CaretPosition$1(container, offset + 1) : pos; - } - } else { - if (isCaretContainerInline(container)) { - if (NodeType.isText(container.previousSibling)) { - return CaretPosition$1(container.previousSibling, container.previousSibling.data.length); - } else { - return CaretPosition$1.before(container); - } - } else { - return isAfterInline(pos) ? CaretPosition$1(container, offset - 1) : pos; - } - } - }; - var normalizeForwards = curry(normalizePosition, true); - var normalizeBackwards = curry(normalizePosition, false); - var InlineUtils = { - isInlineTarget: isInlineTarget, - findRootInline: findRootInline, - isRtl: isRtl$1, - isAtZwsp: isAtZwsp, - normalizePosition: normalizePosition, - normalizeForwards: normalizeForwards, - normalizeBackwards: normalizeBackwards, - hasSameParentBlock: hasSameParentBlock - }; - - var evaluateUntil = function (fns, args) { - for (var i = 0; i < fns.length; i++) { - var result = fns[i].apply(null, args); - if (result.isSome()) { - return result; - } - } - return Option.none(); - }; - var LazyEvaluator = { evaluateUntil: evaluateUntil }; - - var Location = Adt.generate([ - { before: ['element'] }, - { start: ['element'] }, - { end: ['element'] }, - { after: ['element'] } - ]); - var rescope = function (rootNode, node) { - var parentBlock = getParentBlock(node, rootNode); - return parentBlock ? parentBlock : rootNode; - }; - var before$3 = function (isInlineTarget, rootNode, pos) { - var nPos = InlineUtils.normalizeForwards(pos); - var scope = rescope(rootNode, nPos.container()); - return InlineUtils.findRootInline(isInlineTarget, scope, nPos).fold(function () { - return CaretFinder.nextPosition(scope, nPos).bind(curry(InlineUtils.findRootInline, isInlineTarget, scope)).map(function (inline) { - return Location.before(inline); - }); - }, Option.none); - }; - var isNotInsideFormatCaretContainer = function (rootNode, elm) { - return getParentCaretContainer(rootNode, elm) === null; - }; - var findInsideRootInline = function (isInlineTarget, rootNode, pos) { - return InlineUtils.findRootInline(isInlineTarget, rootNode, pos).filter(curry(isNotInsideFormatCaretContainer, rootNode)); - }; - var start$1 = function (isInlineTarget, rootNode, pos) { - var nPos = InlineUtils.normalizeBackwards(pos); - return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) { - var prevPos = CaretFinder.prevPosition(inline, nPos); - return prevPos.isNone() ? Option.some(Location.start(inline)) : Option.none(); - }); - }; - var end = function (isInlineTarget, rootNode, pos) { - var nPos = InlineUtils.normalizeForwards(pos); - return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) { - var nextPos = CaretFinder.nextPosition(inline, nPos); - return nextPos.isNone() ? Option.some(Location.end(inline)) : Option.none(); - }); - }; - var after$2 = function (isInlineTarget, rootNode, pos) { - var nPos = InlineUtils.normalizeBackwards(pos); - var scope = rescope(rootNode, nPos.container()); - return InlineUtils.findRootInline(isInlineTarget, scope, nPos).fold(function () { - return CaretFinder.prevPosition(scope, nPos).bind(curry(InlineUtils.findRootInline, isInlineTarget, scope)).map(function (inline) { - return Location.after(inline); - }); - }, Option.none); - }; - var isValidLocation = function (location) { - return InlineUtils.isRtl(getElement(location)) === false; - }; - var readLocation = function (isInlineTarget, rootNode, pos) { - var location = LazyEvaluator.evaluateUntil([ - before$3, - start$1, - end, - after$2 - ], [ - isInlineTarget, - rootNode, - pos - ]); - return location.filter(isValidLocation); - }; - var getElement = function (location) { - return location.fold(identity, identity, identity, identity); - }; - var getName = function (location) { - return location.fold(constant('before'), constant('start'), constant('end'), constant('after')); - }; - var outside = function (location) { - return location.fold(Location.before, Location.before, Location.after, Location.after); - }; - var inside = function (location) { - return location.fold(Location.start, Location.start, Location.end, Location.end); - }; - var isEq$5 = function (location1, location2) { - return getName(location1) === getName(location2) && getElement(location1) === getElement(location2); - }; - var betweenInlines = function (forward, isInlineTarget, rootNode, from, to, location) { - return liftN([ - InlineUtils.findRootInline(isInlineTarget, rootNode, from), - InlineUtils.findRootInline(isInlineTarget, rootNode, to) - ], function (fromInline, toInline) { - if (fromInline !== toInline && InlineUtils.hasSameParentBlock(rootNode, fromInline, toInline)) { - return Location.after(forward ? fromInline : toInline); - } else { - return location; - } - }).getOr(location); - }; - var skipNoMovement = function (fromLocation, toLocation) { - return fromLocation.fold(constant(true), function (fromLocation) { - return !isEq$5(fromLocation, toLocation); - }); - }; - var findLocationTraverse = function (forward, isInlineTarget, rootNode, fromLocation, pos) { - var from = InlineUtils.normalizePosition(forward, pos); - var to = CaretFinder.fromPosition(forward, rootNode, from).map(curry(InlineUtils.normalizePosition, forward)); - var location = to.fold(function () { - return fromLocation.map(outside); - }, function (to) { - return readLocation(isInlineTarget, rootNode, to).map(curry(betweenInlines, forward, isInlineTarget, rootNode, from, to)).filter(curry(skipNoMovement, fromLocation)); - }); - return location.filter(isValidLocation); - }; - var findLocationSimple = function (forward, location) { - if (forward) { - return location.fold(compose(Option.some, Location.start), Option.none, compose(Option.some, Location.after), Option.none); - } else { - return location.fold(Option.none, compose(Option.some, Location.before), Option.none, compose(Option.some, Location.end)); - } - }; - var findLocation = function (forward, isInlineTarget, rootNode, pos) { - var from = InlineUtils.normalizePosition(forward, pos); - var fromLocation = readLocation(isInlineTarget, rootNode, from); - return readLocation(isInlineTarget, rootNode, from).bind(curry(findLocationSimple, forward)).orThunk(function () { - return findLocationTraverse(forward, isInlineTarget, rootNode, fromLocation, pos); - }); - }; - var BoundaryLocation = { - readLocation: readLocation, - findLocation: findLocation, - prevLocation: curry(findLocation, false), - nextLocation: curry(findLocation, true), - getElement: getElement, - outside: outside, - inside: inside - }; - - var hasSelectionModifyApi = function (editor) { - return isFunction(editor.selection.getSel().modify); - }; - var moveRel = function (forward, selection, pos) { - var delta = forward ? 1 : -1; - selection.setRng(CaretPosition$1(pos.container(), pos.offset() + delta).toRange()); - selection.getSel().modify('move', forward ? 'forward' : 'backward', 'word'); - return true; - }; - var moveByWord = function (forward, editor) { - var rng = editor.selection.getRng(); - var pos = forward ? CaretPosition$1.fromRangeEnd(rng) : CaretPosition$1.fromRangeStart(rng); - if (!hasSelectionModifyApi(editor)) { - return false; - } else if (forward && isBeforeInline(pos)) { - return moveRel(true, editor.selection, pos); - } else if (!forward && isAfterInline(pos)) { - return moveRel(false, editor.selection, pos); - } else { - return false; - } - }; - var WordSelection = { - hasSelectionModifyApi: hasSelectionModifyApi, - moveByWord: moveByWord - }; - - var setCaretPosition = function (editor, pos) { - var rng = editor.dom.createRng(); - rng.setStart(pos.container(), pos.offset()); - rng.setEnd(pos.container(), pos.offset()); - editor.selection.setRng(rng); - }; - var isFeatureEnabled = function (editor) { - return editor.settings.inline_boundaries !== false; - }; - var setSelected = function (state, elm) { - if (state) { - elm.setAttribute('data-mce-selected', 'inline-boundary'); - } else { - elm.removeAttribute('data-mce-selected'); - } - }; - var renderCaretLocation = function (editor, caret, location) { - return BoundaryCaret.renderCaret(caret, location).map(function (pos) { - setCaretPosition(editor, pos); - return location; - }); - }; - var findLocation$1 = function (editor, caret, forward) { - var rootNode = editor.getBody(); - var from = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - var location = BoundaryLocation.findLocation(forward, isInlineTarget, rootNode, from); - return location.bind(function (location) { - return renderCaretLocation(editor, caret, location); - }); - }; - var toggleInlines = function (isInlineTarget, dom, elms) { - var selectedInlines = filter(dom.select('*[data-mce-selected="inline-boundary"]'), isInlineTarget); - var targetInlines = filter(elms, isInlineTarget); - each(difference(selectedInlines, targetInlines), curry(setSelected, false)); - each(difference(targetInlines, selectedInlines), curry(setSelected, true)); - }; - var safeRemoveCaretContainer = function (editor, caret) { - if (editor.selection.isCollapsed() && editor.composing !== true && caret.get()) { - var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - if (CaretPosition$1.isTextPosition(pos) && InlineUtils.isAtZwsp(pos) === false) { - setCaretPosition(editor, CaretContainerRemove.removeAndReposition(caret.get(), pos)); - caret.set(null); - } - } - }; - var renderInsideInlineCaret = function (isInlineTarget, editor, caret, elms) { - if (editor.selection.isCollapsed()) { - var inlines = filter(elms, isInlineTarget); - each(inlines, function (inline) { - var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - BoundaryLocation.readLocation(isInlineTarget, editor.getBody(), pos).bind(function (location) { - return renderCaretLocation(editor, caret, location); - }); - }); - } - }; - var move$1 = function (editor, caret, forward) { - return function () { - return isFeatureEnabled(editor) ? findLocation$1(editor, caret, forward).isSome() : false; - }; - }; - var moveWord = function (forward, editor, caret) { - return function () { - return isFeatureEnabled(editor) ? WordSelection.moveByWord(forward, editor) : false; - }; - }; - var setupSelectedState = function (editor) { - var caret = Cell(null); - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - editor.on('NodeChange', function (e) { - if (isFeatureEnabled(editor)) { - toggleInlines(isInlineTarget, editor.dom, e.parents); - safeRemoveCaretContainer(editor, caret); - renderInsideInlineCaret(isInlineTarget, editor, caret, e.parents); - } - }); - return caret; - }; - var moveNextWord = curry(moveWord, true); - var movePrevWord = curry(moveWord, false); - var BoundarySelection = { - move: move$1, - moveNextWord: moveNextWord, - movePrevWord: movePrevWord, - setupSelectedState: setupSelectedState, - setCaretPosition: setCaretPosition - }; - - var BreakType; - (function (BreakType) { - BreakType[BreakType['Br'] = 0] = 'Br'; - BreakType[BreakType['Block'] = 1] = 'Block'; - BreakType[BreakType['Wrap'] = 2] = 'Wrap'; - BreakType[BreakType['Eol'] = 3] = 'Eol'; - }(BreakType || (BreakType = {}))); - var flip = function (direction, positions) { - return direction === HDirection.Backwards ? positions.reverse() : positions; - }; - var walk$3 = function (direction, caretWalker, pos) { - return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos); - }; - var getBreakType = function (scope, direction, currentPos, nextPos) { - if (NodeType.isBr(nextPos.getNode(direction === HDirection.Forwards))) { - return BreakType.Br; - } else if (isInSameBlock(currentPos, nextPos) === false) { - return BreakType.Block; - } else { - return BreakType.Wrap; - } - }; - var getPositionsUntil = function (predicate, direction, scope, start) { - var caretWalker = CaretWalker(scope); - var currentPos = start, nextPos; - var positions = []; - while (currentPos) { - nextPos = walk$3(direction, caretWalker, currentPos); - if (!nextPos) { - break; - } - if (NodeType.isBr(nextPos.getNode(false))) { - if (direction === HDirection.Forwards) { - return { - positions: flip(direction, positions).concat([nextPos]), - breakType: BreakType.Br, - breakAt: Option.some(nextPos) - }; - } else { - return { - positions: flip(direction, positions), - breakType: BreakType.Br, - breakAt: Option.some(nextPos) - }; - } - } - if (!nextPos.isVisible()) { - currentPos = nextPos; - continue; - } - if (predicate(currentPos, nextPos)) { - var breakType = getBreakType(scope, direction, currentPos, nextPos); - return { - positions: flip(direction, positions), - breakType: breakType, - breakAt: Option.some(nextPos) - }; - } - positions.push(nextPos); - currentPos = nextPos; - } - return { - positions: flip(direction, positions), - breakType: BreakType.Eol, - breakAt: Option.none() - }; - }; - var getAdjacentLinePositions = function (direction, getPositionsUntilBreak, scope, start) { - return getPositionsUntilBreak(scope, start).breakAt.map(function (pos) { - var positions = getPositionsUntilBreak(scope, pos).positions; - return direction === HDirection.Backwards ? positions.concat(pos) : [pos].concat(positions); - }).getOr([]); - }; - var findClosestHorizontalPositionFromPoint = function (positions, x) { - return foldl(positions, function (acc, newPos) { - return acc.fold(function () { - return Option.some(newPos); - }, function (lastPos) { - return liftN([ - head(lastPos.getClientRects()), - head(newPos.getClientRects()) - ], function (lastRect, newRect) { - var lastDist = Math.abs(x - lastRect.left); - var newDist = Math.abs(x - newRect.left); - return newDist <= lastDist ? newPos : lastPos; - }).or(acc); - }); - }, Option.none()); - }; - var findClosestHorizontalPosition = function (positions, pos) { - return head(pos.getClientRects()).bind(function (targetRect) { - return findClosestHorizontalPositionFromPoint(positions, targetRect.left); - }); - }; - var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1); - var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1); - var isAtFirstLine = function (scope, pos) { - return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone(); - }; - var isAtLastLine = function (scope, pos) { - return getPositionsUntilNextLine(scope, pos).breakAt.isNone(); - }; - var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine); - var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine); - var getFirstLinePositions = function (scope) { - return CaretFinder.firstPositionIn(scope).map(function (pos) { - return [pos].concat(getPositionsUntilNextLine(scope, pos).positions); - }).getOr([]); - }; - var getLastLinePositions = function (scope) { - return CaretFinder.lastPositionIn(scope).map(function (pos) { - return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos); - }).getOr([]); - }; - - var isContentEditableFalse$b = NodeType.isContentEditableFalse; - var getSelectedNode$1 = getSelectedNode; - var moveToCeFalseHorizontally = function (direction, editor, getNextPosFn, range) { - var forwards = direction === HDirection.Forwards; - var isBeforeContentEditableFalseFn = forwards ? isBeforeContentEditableFalse : isAfterContentEditableFalse; - if (!range.collapsed) { - var node = getSelectedNode$1(range); - if (isContentEditableFalse$b(node)) { - return showCaret(direction, editor, node, direction === HDirection.Backwards, true); - } - } - var rangeIsInContainerBlock = isRangeInCaretContainerBlock(range); - var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range); - if (isBeforeContentEditableFalseFn(caretPosition)) { - return selectNode(editor, caretPosition.getNode(!forwards)); - } - var nextCaretPosition = InlineUtils.normalizePosition(forwards, getNextPosFn(caretPosition)); - if (!nextCaretPosition) { - if (rangeIsInContainerBlock) { - return range; - } - return null; - } - if (isBeforeContentEditableFalseFn(nextCaretPosition)) { - return showCaret(direction, editor, nextCaretPosition.getNode(!forwards), forwards, true); - } - var peekCaretPosition = getNextPosFn(nextCaretPosition); - if (peekCaretPosition && isBeforeContentEditableFalseFn(peekCaretPosition)) { - if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) { - return showCaret(direction, editor, peekCaretPosition.getNode(!forwards), forwards, true); - } - } - if (rangeIsInContainerBlock) { - return renderRangeCaret(editor, nextCaretPosition.toRange(), true); - } - return null; - }; - var moveToCeFalseVertically = function (direction, editor, walkerFn, range) { - var caretPosition, linePositions, nextLinePositions; - var closestNextLineRect, caretClientRect, clientX; - var dist1, dist2, contentEditableFalseNode; - contentEditableFalseNode = getSelectedNode$1(range); - caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range); - linePositions = walkerFn(editor.getBody(), isAboveLine(1), caretPosition); - nextLinePositions = filter(linePositions, isLine(1)); - caretClientRect = ArrUtils.last(caretPosition.getClientRects()); - if (isBeforeContentEditableFalse(caretPosition) || isBeforeTable(caretPosition)) { - contentEditableFalseNode = caretPosition.getNode(); - } - if (isAfterContentEditableFalse(caretPosition) || isAfterTable(caretPosition)) { - contentEditableFalseNode = caretPosition.getNode(true); - } - if (!caretClientRect) { - return null; - } - clientX = caretClientRect.left; - closestNextLineRect = findClosestClientRect(nextLinePositions, clientX); - if (closestNextLineRect) { - if (isContentEditableFalse$b(closestNextLineRect.node)) { - dist1 = Math.abs(clientX - closestNextLineRect.left); - dist2 = Math.abs(clientX - closestNextLineRect.right); - return showCaret(direction, editor, closestNextLineRect.node, dist1 < dist2, true); - } - } - if (contentEditableFalseNode) { - var caretPositions = positionsUntil(direction, editor.getBody(), isAboveLine(1), contentEditableFalseNode); - closestNextLineRect = findClosestClientRect(filter(caretPositions, isLine(1)), clientX); - if (closestNextLineRect) { - return renderRangeCaret(editor, closestNextLineRect.position.toRange(), true); - } - closestNextLineRect = ArrUtils.last(filter(caretPositions, isLine(0))); - if (closestNextLineRect) { - return renderRangeCaret(editor, closestNextLineRect.position.toRange(), true); - } - } - }; - var createTextBlock = function (editor) { - var textBlock = editor.dom.create(Settings.getForcedRootBlock(editor)); - if (!Env.ie || Env.ie >= 11) { - textBlock.innerHTML = '
'; - } - return textBlock; - }; - var exitPreBlock = function (editor, direction, range) { - var pre, caretPos, newBlock; - var caretWalker = CaretWalker(editor.getBody()); - var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next); - var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev); - if (range.collapsed && editor.settings.forced_root_block) { - pre = editor.dom.getParent(range.startContainer, 'PRE'); - if (!pre) { - return; - } - if (direction === 1) { - caretPos = getNextVisualCaretPosition(CaretPosition$1.fromRangeStart(range)); - } else { - caretPos = getPrevVisualCaretPosition(CaretPosition$1.fromRangeStart(range)); - } - if (!caretPos) { - newBlock = createTextBlock(editor); - if (direction === 1) { - editor.$(pre).after(newBlock); - } else { - editor.$(pre).before(newBlock); - } - editor.selection.select(newBlock, true); - editor.selection.collapse(); - } - } - }; - var getHorizontalRange = function (editor, forward) { - var caretWalker = CaretWalker(editor.getBody()); - var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next); - var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev); - var newRange; - var direction = forward ? HDirection.Forwards : HDirection.Backwards; - var getNextPosFn = forward ? getNextVisualCaretPosition : getPrevVisualCaretPosition; - var range = editor.selection.getRng(); - newRange = moveToCeFalseHorizontally(direction, editor, getNextPosFn, range); - if (newRange) { - return newRange; - } - newRange = exitPreBlock(editor, direction, range); - if (newRange) { - return newRange; - } - return null; - }; - var getVerticalRange = function (editor, down) { - var newRange; - var direction = down ? 1 : -1; - var walkerFn = down ? downUntil : upUntil; - var range = editor.selection.getRng(); - newRange = moveToCeFalseVertically(direction, editor, walkerFn, range); - if (newRange) { - return newRange; - } - newRange = exitPreBlock(editor, direction, range); - if (newRange) { - return newRange; - } - return null; - }; - var moveH = function (editor, forward) { - return function () { - var newRng = getHorizontalRange(editor, forward); - if (newRng) { - editor.selection.setRng(newRng); - return true; - } else { - return false; - } - }; - }; - var moveV = function (editor, down) { - return function () { - var newRng = getVerticalRange(editor, down); - if (newRng) { - editor.selection.setRng(newRng); - return true; - } else { - return false; - } - }; - }; - var isCefPosition = function (forward) { - return function (pos) { - return forward ? isAfterContentEditableFalse(pos) : isBeforeContentEditableFalse(pos); - }; - }; - var moveToLineEndPoint = function (editor, forward) { - return function () { - var from = forward ? CaretPosition$1.fromRangeEnd(editor.selection.getRng()) : CaretPosition$1.fromRangeStart(editor.selection.getRng()); - var result = forward ? getPositionsUntilNextLine(editor.getBody(), from) : getPositionsUntilPreviousLine(editor.getBody(), from); - var to = forward ? last(result.positions) : head(result.positions); - return to.filter(isCefPosition(forward)).fold(constant(false), function (pos) { - editor.selection.setRng(pos.toRange()); - return true; - }); - }; - }; - - var deflate = function (rect, delta) { - return { - left: rect.left - delta, - top: rect.top - delta, - right: rect.right + delta * 2, - bottom: rect.bottom + delta * 2, - width: rect.width + delta, - height: rect.height + delta - }; - }; - var getCorners = function (getYAxisValue, tds) { - return bind(tds, function (td) { - var rect = deflate(clone$1(td.getBoundingClientRect()), -1); - return [ - { - x: rect.left, - y: getYAxisValue(rect), - cell: td - }, - { - x: rect.right, - y: getYAxisValue(rect), - cell: td - } - ]; - }); - }; - var findClosestCorner = function (corners, x, y) { - return foldl(corners, function (acc, newCorner) { - return acc.fold(function () { - return Option.some(newCorner); - }, function (oldCorner) { - var oldDist = Math.sqrt(Math.abs(oldCorner.x - x) + Math.abs(oldCorner.y - y)); - var newDist = Math.sqrt(Math.abs(newCorner.x - x) + Math.abs(newCorner.y - y)); - return Option.some(newDist < oldDist ? newCorner : oldCorner); - }); - }, Option.none()); - }; - var getClosestCell = function (getYAxisValue, isTargetCorner, table, x, y) { - var cells = descendants$1(Element.fromDom(table), 'td,th,caption').map(function (e) { - return e.dom(); - }); - var corners = filter(getCorners(getYAxisValue, cells), function (corner) { - return isTargetCorner(corner, y); - }); - return findClosestCorner(corners, x, y).map(function (corner) { - return corner.cell; - }); - }; - var getBottomValue = function (rect) { - return rect.bottom; - }; - var getTopValue = function (rect) { - return rect.top; - }; - var isAbove$1 = function (corner, y) { - return corner.y < y; - }; - var isBelow$1 = function (corner, y) { - return corner.y > y; - }; - var getClosestCellAbove = curry(getClosestCell, getBottomValue, isAbove$1); - var getClosestCellBelow = curry(getClosestCell, getTopValue, isBelow$1); - var findClosestPositionInAboveCell = function (table, pos) { - return head(pos.getClientRects()).bind(function (rect) { - return getClosestCellAbove(table, rect.left, rect.top); - }).bind(function (cell) { - return findClosestHorizontalPosition(getLastLinePositions(cell), pos); - }); - }; - var findClosestPositionInBelowCell = function (table, pos) { - return last(pos.getClientRects()).bind(function (rect) { - return getClosestCellBelow(table, rect.left, rect.top); - }).bind(function (cell) { - return findClosestHorizontalPosition(getFirstLinePositions(cell), pos); - }); - }; - - var moveToRange = function (editor, rng) { - editor.selection.setRng(rng); - ScrollIntoView.scrollRangeIntoView(editor, rng); - }; - var hasNextBreak = function (getPositionsUntil, scope, lineInfo) { - return lineInfo.breakAt.map(function (breakPos) { - return getPositionsUntil(scope, breakPos).breakAt.isSome(); - }).getOr(false); - }; - var startsWithWrapBreak = function (lineInfo) { - return lineInfo.breakType === BreakType.Wrap && lineInfo.positions.length === 0; - }; - var startsWithBrBreak = function (lineInfo) { - return lineInfo.breakType === BreakType.Br && lineInfo.positions.length === 1; - }; - var isAtTableCellLine = function (getPositionsUntil, scope, pos) { - var lineInfo = getPositionsUntil(scope, pos); - if (startsWithWrapBreak(lineInfo) || !NodeType.isBr(pos.getNode()) && startsWithBrBreak(lineInfo)) { - return !hasNextBreak(getPositionsUntil, scope, lineInfo); - } else { - return lineInfo.breakAt.isNone(); - } - }; - var isAtFirstTableCellLine = curry(isAtTableCellLine, getPositionsUntilPreviousLine); - var isAtLastTableCellLine = curry(isAtTableCellLine, getPositionsUntilNextLine); - var isCaretAtStartOrEndOfTable = function (forward, rng, table) { - var caretPos = CaretPosition$1.fromRangeStart(rng); - return CaretFinder.positionIn(!forward, table).map(function (pos) { - return pos.isEqual(caretPos); - }).getOr(false); - }; - var navigateHorizontally = function (editor, forward, table, td) { - var rng = editor.selection.getRng(); - var direction = forward ? 1 : -1; - if (isFakeCaretTableBrowser() && isCaretAtStartOrEndOfTable(forward, rng, table)) { - var newRng = showCaret(direction, editor, table, !forward, true); - moveToRange(editor, newRng); - return true; - } - return false; - }; - var getClosestAbovePosition = function (root, table, start) { - return findClosestPositionInAboveCell(table, start).orThunk(function () { - return head(start.getClientRects()).bind(function (rect) { - return findClosestHorizontalPositionFromPoint(getPositionsAbove(root, CaretPosition$1.before(table)), rect.left); - }); - }).getOr(CaretPosition$1.before(table)); - }; - var getClosestBelowPosition = function (root, table, start) { - return findClosestPositionInBelowCell(table, start).orThunk(function () { - return head(start.getClientRects()).bind(function (rect) { - return findClosestHorizontalPositionFromPoint(getPositionsBelow(root, CaretPosition$1.after(table)), rect.left); - }); - }).getOr(CaretPosition$1.after(table)); - }; - var getTable = function (previous, pos) { - var node = pos.getNode(previous); - return NodeType.isElement(node) && node.nodeName === 'TABLE' ? Option.some(node) : Option.none(); - }; - var renderBlock = function (down, editor, table, pos) { - var forcedRootBlock = Settings.getForcedRootBlock(editor); - if (forcedRootBlock) { - editor.undoManager.transact(function () { - var element = Element.fromTag(forcedRootBlock); - setAll(element, Settings.getForcedRootBlockAttrs(editor)); - append(element, Element.fromTag('br')); - if (down) { - after(Element.fromDom(table), element); - } else { - before(Element.fromDom(table), element); - } - var rng = editor.dom.createRng(); - rng.setStart(element.dom(), 0); - rng.setEnd(element.dom(), 0); - moveToRange(editor, rng); - }); - } else { - moveToRange(editor, pos.toRange()); - } - }; - var moveCaret = function (editor, down, pos) { - var table = down ? getTable(true, pos) : getTable(false, pos); - var last = down === false; - table.fold(function () { - return moveToRange(editor, pos.toRange()); - }, function (table) { - return CaretFinder.positionIn(last, editor.getBody()).filter(function (lastPos) { - return lastPos.isEqual(pos); - }).fold(function () { - return moveToRange(editor, pos.toRange()); - }, function (_) { - return renderBlock(down, editor, table, pos); - }); - }); - }; - var navigateVertically = function (editor, down, table, td) { - var rng = editor.selection.getRng(); - var pos = CaretPosition$1.fromRangeStart(rng); - var root = editor.getBody(); - if (!down && isAtFirstTableCellLine(td, pos)) { - var newPos = getClosestAbovePosition(root, table, pos); - moveCaret(editor, down, newPos); - return true; - } else if (down && isAtLastTableCellLine(td, pos)) { - var newPos = getClosestBelowPosition(root, table, pos); - moveCaret(editor, down, newPos); - return true; - } else { - return false; - } - }; - var moveH$1 = function (editor, forward) { - return function () { - return Option.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) { - return Option.from(editor.dom.getParent(td, 'table')).map(function (table) { - return navigateHorizontally(editor, forward, table, td); - }); - }).getOr(false); - }; - }; - var moveV$1 = function (editor, forward) { - return function () { - return Option.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) { - return Option.from(editor.dom.getParent(td, 'table')).map(function (table) { - return navigateVertically(editor, forward, table, td); - }); - }).getOr(false); - }; - }; - - var isTarget = function (node) { - return contains(['figcaption'], name(node)); - }; - var rangeBefore = function (target) { - var rng = domGlobals.document.createRange(); - rng.setStartBefore(target.dom()); - rng.setEndBefore(target.dom()); - return rng; - }; - var insertElement = function (root, elm, forward) { - if (forward) { - append(root, elm); - } else { - prepend(root, elm); - } - }; - var insertBr = function (root, forward) { - var br = Element.fromTag('br'); - insertElement(root, br, forward); - return rangeBefore(br); - }; - var insertBlock$1 = function (root, forward, blockName, attrs) { - var block = Element.fromTag(blockName); - var br = Element.fromTag('br'); - setAll(block, attrs); - append(block, br); - insertElement(root, block, forward); - return rangeBefore(br); - }; - var insertEmptyLine = function (root, rootBlockName, attrs, forward) { - if (rootBlockName === '') { - return insertBr(root, forward); - } else { - return insertBlock$1(root, forward, rootBlockName, attrs); - } - }; - var getClosestTargetBlock = function (pos, root) { - var isRoot = curry(eq, root); - return closest(Element.fromDom(pos.container()), isBlock, isRoot).filter(isTarget); - }; - var isAtFirstOrLastLine = function (root, forward, pos) { - return forward ? isAtLastLine(root.dom(), pos) : isAtFirstLine(root.dom(), pos); - }; - var moveCaretToNewEmptyLine = function (editor, forward) { - var root = Element.fromDom(editor.getBody()); - var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - var rootBlock = Settings.getForcedRootBlock(editor); - var rootBlockAttrs = Settings.getForcedRootBlockAttrs(editor); - return getClosestTargetBlock(pos, root).exists(function () { - if (isAtFirstOrLastLine(root, forward, pos)) { - var rng = insertEmptyLine(root, rootBlock, rootBlockAttrs, forward); - editor.selection.setRng(rng); - return true; - } else { - return false; - } - }); - }; - var moveV$2 = function (editor, forward) { - return function () { - if (editor.selection.isCollapsed()) { - return moveCaretToNewEmptyLine(editor, forward); - } else { - return false; - } - }; - }; - - var defaultPatterns = function (patterns) { - return map(patterns, function (pattern) { - return merge({ - shiftKey: false, - altKey: false, - ctrlKey: false, - metaKey: false, - keyCode: 0, - action: noop - }, pattern); - }); - }; - var matchesEvent = function (pattern, evt) { - return evt.keyCode === pattern.keyCode && evt.shiftKey === pattern.shiftKey && evt.altKey === pattern.altKey && evt.ctrlKey === pattern.ctrlKey && evt.metaKey === pattern.metaKey; - }; - var match$1 = function (patterns, evt) { - return bind(defaultPatterns(patterns), function (pattern) { - return matchesEvent(pattern, evt) ? [pattern] : []; - }); - }; - var action = function (f) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return f.apply(null, args); - }; - }; - var execute = function (patterns, evt) { - return find(match$1(patterns, evt), function (pattern) { - return pattern.action(); - }); - }; - var MatchKeys = { - match: match$1, - action: action, - execute: execute - }; - - var executeKeydownOverride = function (editor, caret, evt) { - var os = PlatformDetection$1.detect().os; - MatchKeys.execute([ - { - keyCode: VK.RIGHT, - action: moveH(editor, true) - }, - { - keyCode: VK.LEFT, - action: moveH(editor, false) - }, - { - keyCode: VK.UP, - action: moveV(editor, false) - }, - { - keyCode: VK.DOWN, - action: moveV(editor, true) - }, - { - keyCode: VK.RIGHT, - action: moveH$1(editor, true) - }, - { - keyCode: VK.LEFT, - action: moveH$1(editor, false) - }, - { - keyCode: VK.UP, - action: moveV$1(editor, false) - }, - { - keyCode: VK.DOWN, - action: moveV$1(editor, true) - }, - { - keyCode: VK.RIGHT, - action: BoundarySelection.move(editor, caret, true) - }, - { - keyCode: VK.LEFT, - action: BoundarySelection.move(editor, caret, false) - }, - { - keyCode: VK.RIGHT, - ctrlKey: !os.isOSX(), - altKey: os.isOSX(), - action: BoundarySelection.moveNextWord(editor, caret) - }, - { - keyCode: VK.LEFT, - ctrlKey: !os.isOSX(), - altKey: os.isOSX(), - action: BoundarySelection.movePrevWord(editor, caret) - }, - { - keyCode: VK.UP, - action: moveV$2(editor, false) - }, - { - keyCode: VK.DOWN, - action: moveV$2(editor, true) - } - ], evt).each(function (_) { - evt.preventDefault(); - }); - }; - var setup$7 = function (editor, caret) { - editor.on('keydown', function (evt) { - if (evt.isDefaultPrevented() === false) { - executeKeydownOverride(editor, caret, evt); - } - }); - }; - var ArrowKeys = { setup: setup$7 }; - - var isBeforeRoot = function (rootNode) { - return function (elm) { - return eq(rootNode, Element.fromDom(elm.dom().parentNode)); - }; - }; - var getParentBlock$1 = function (rootNode, elm) { - return contains$3(rootNode, elm) ? closest(elm, function (element) { - return isTextBlock(element) || isListItem(element); - }, isBeforeRoot(rootNode)) : Option.none(); - }; - var placeCaretInEmptyBody = function (editor) { - var body = editor.getBody(); - var node = body.firstChild && editor.dom.isBlock(body.firstChild) ? body.firstChild : body; - editor.selection.setCursorLocation(node, 0); - }; - var paddEmptyBody = function (editor) { - if (editor.dom.isEmpty(editor.getBody())) { - editor.setContent(''); - placeCaretInEmptyBody(editor); - } - }; - var willDeleteLastPositionInElement = function (forward, fromPos, elm) { - return liftN([ - CaretFinder.firstPositionIn(elm), - CaretFinder.lastPositionIn(elm) - ], function (firstPos, lastPos) { - var normalizedFirstPos = InlineUtils.normalizePosition(true, firstPos); - var normalizedLastPos = InlineUtils.normalizePosition(false, lastPos); - var normalizedFromPos = InlineUtils.normalizePosition(false, fromPos); - if (forward) { - return CaretFinder.nextPosition(elm, normalizedFromPos).map(function (nextPos) { - return nextPos.isEqual(normalizedLastPos) && fromPos.isEqual(normalizedFirstPos); - }).getOr(false); - } else { - return CaretFinder.prevPosition(elm, normalizedFromPos).map(function (prevPos) { - return prevPos.isEqual(normalizedFirstPos) && fromPos.isEqual(normalizedLastPos); - }).getOr(false); - } - }).getOr(true); - }; - var DeleteUtils = { - getParentBlock: getParentBlock$1, - paddEmptyBody: paddEmptyBody, - willDeleteLastPositionInElement: willDeleteLastPositionInElement - }; - - var BlockPosition = Immutable('block', 'position'); - var BlockBoundary = Immutable('from', 'to'); - var getBlockPosition = function (rootNode, pos) { - var rootElm = Element.fromDom(rootNode); - var containerElm = Element.fromDom(pos.container()); - return DeleteUtils.getParentBlock(rootElm, containerElm).map(function (block) { - return BlockPosition(block, pos); - }); - }; - var isDifferentBlocks = function (blockBoundary) { - return eq(blockBoundary.from().block(), blockBoundary.to().block()) === false; - }; - var hasSameParent = function (blockBoundary) { - return parent(blockBoundary.from().block()).bind(function (parent1) { - return parent(blockBoundary.to().block()).filter(function (parent2) { - return eq(parent1, parent2); - }); - }).isSome(); - }; - var isEditable = function (blockBoundary) { - return NodeType.isContentEditableFalse(blockBoundary.from().block()) === false && NodeType.isContentEditableFalse(blockBoundary.to().block()) === false; - }; - var skipLastBr = function (rootNode, forward, blockPosition) { - if (NodeType.isBr(blockPosition.position().getNode()) && Empty.isEmpty(blockPosition.block()) === false) { - return CaretFinder.positionIn(false, blockPosition.block().dom()).bind(function (lastPositionInBlock) { - if (lastPositionInBlock.isEqual(blockPosition.position())) { - return CaretFinder.fromPosition(forward, rootNode, lastPositionInBlock).bind(function (to) { - return getBlockPosition(rootNode, to); - }); - } else { - return Option.some(blockPosition); - } - }).getOr(blockPosition); - } else { - return blockPosition; - } - }; - var readFromRange = function (rootNode, forward, rng) { - var fromBlockPos = getBlockPosition(rootNode, CaretPosition$1.fromRangeStart(rng)); - var toBlockPos = fromBlockPos.bind(function (blockPos) { - return CaretFinder.fromPosition(forward, rootNode, blockPos.position()).bind(function (to) { - return getBlockPosition(rootNode, to).map(function (blockPos) { - return skipLastBr(rootNode, forward, blockPos); - }); - }); - }); - return liftN([ - fromBlockPos, - toBlockPos - ], BlockBoundary).filter(function (blockBoundary) { - return isDifferentBlocks(blockBoundary) && hasSameParent(blockBoundary) && isEditable(blockBoundary); - }); - }; - var read$3 = function (rootNode, forward, rng) { - return rng.collapsed ? readFromRange(rootNode, forward, rng) : Option.none(); - }; - var BlockMergeBoundary = { read: read$3 }; - - var getChildrenUntilBlockBoundary = function (block) { - var children$1 = children(block); - return findIndex(children$1, isBlock).fold(function () { - return children$1; - }, function (index) { - return children$1.slice(0, index); - }); - }; - var extractChildren = function (block) { - var children = getChildrenUntilBlockBoundary(block); - each(children, remove$1); - return children; - }; - var removeEmptyRoot = function (rootNode, block) { - var parents = Parents.parentsAndSelf(block, rootNode); - return find(parents.reverse(), Empty.isEmpty).each(remove$1); - }; - var isEmptyBefore = function (el) { - return filter(prevSiblings(el), function (el) { - return !Empty.isEmpty(el); - }).length === 0; - }; - var nestedBlockMerge = function (rootNode, fromBlock, toBlock, insertionPoint) { - if (Empty.isEmpty(toBlock)) { - PaddingBr.fillWithPaddingBr(toBlock); - return CaretFinder.firstPositionIn(toBlock.dom()); - } - if (isEmptyBefore(insertionPoint) && Empty.isEmpty(fromBlock)) { - before(insertionPoint, Element.fromTag('br')); - } - var position = CaretFinder.prevPosition(toBlock.dom(), CaretPosition$1.before(insertionPoint.dom())); - each(extractChildren(fromBlock), function (child) { - before(insertionPoint, child); - }); - removeEmptyRoot(rootNode, fromBlock); - return position; - }; - var sidelongBlockMerge = function (rootNode, fromBlock, toBlock) { - if (Empty.isEmpty(toBlock)) { - remove$1(toBlock); - if (Empty.isEmpty(fromBlock)) { - PaddingBr.fillWithPaddingBr(fromBlock); - } - return CaretFinder.firstPositionIn(fromBlock.dom()); - } - var position = CaretFinder.lastPositionIn(toBlock.dom()); - each(extractChildren(fromBlock), function (child) { - append(toBlock, child); - }); - removeEmptyRoot(rootNode, fromBlock); - return position; - }; - var findInsertionPoint = function (toBlock, block) { - var parentsAndSelf = Parents.parentsAndSelf(block, toBlock); - return Option.from(parentsAndSelf[parentsAndSelf.length - 1]); - }; - var getInsertionPoint = function (fromBlock, toBlock) { - return contains$3(toBlock, fromBlock) ? findInsertionPoint(toBlock, fromBlock) : Option.none(); - }; - var trimBr = function (first, block) { - CaretFinder.positionIn(first, block.dom()).map(function (position) { - return position.getNode(); - }).map(Element.fromDom).filter(isBr$1).each(remove$1); - }; - var mergeBlockInto = function (rootNode, fromBlock, toBlock) { - trimBr(true, fromBlock); - trimBr(false, toBlock); - return getInsertionPoint(fromBlock, toBlock).fold(curry(sidelongBlockMerge, rootNode, fromBlock, toBlock), curry(nestedBlockMerge, rootNode, fromBlock, toBlock)); - }; - var mergeBlocks = function (rootNode, forward, block1, block2) { - return forward ? mergeBlockInto(rootNode, block2, block1) : mergeBlockInto(rootNode, block1, block2); - }; - var MergeBlocks = { mergeBlocks: mergeBlocks }; - - var backspaceDelete = function (editor, forward) { - var position; - var rootNode = Element.fromDom(editor.getBody()); - position = BlockMergeBoundary.read(rootNode.dom(), forward, editor.selection.getRng()).bind(function (blockBoundary) { - return MergeBlocks.mergeBlocks(rootNode, forward, blockBoundary.from().block(), blockBoundary.to().block()); - }); - position.each(function (pos) { - editor.selection.setRng(pos.toRange()); - }); - return position.isSome(); - }; - var BlockBoundaryDelete = { backspaceDelete: backspaceDelete }; - - var deleteRangeMergeBlocks = function (rootNode, selection) { - var rng = selection.getRng(); - return liftN([ - DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.startContainer)), - DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.endContainer)) - ], function (block1, block2) { - if (eq(block1, block2) === false) { - rng.deleteContents(); - MergeBlocks.mergeBlocks(rootNode, true, block1, block2).each(function (pos) { - selection.setRng(pos.toRange()); - }); - return true; - } else { - return false; - } - }).getOr(false); - }; - var isRawNodeInTable = function (root, rawNode) { - var node = Element.fromDom(rawNode); - var isRoot = curry(eq, root); - return ancestor(node, isTableCell, isRoot).isSome(); - }; - var isSelectionInTable = function (root, rng) { - return isRawNodeInTable(root, rng.startContainer) || isRawNodeInTable(root, rng.endContainer); - }; - var isEverythingSelected = function (root, rng) { - var noPrevious = CaretFinder.prevPosition(root.dom(), CaretPosition$1.fromRangeStart(rng)).isNone(); - var noNext = CaretFinder.nextPosition(root.dom(), CaretPosition$1.fromRangeEnd(rng)).isNone(); - return !isSelectionInTable(root, rng) && noPrevious && noNext; - }; - var emptyEditor = function (editor) { - editor.setContent(''); - editor.selection.setCursorLocation(); - return true; - }; - var deleteRange = function (editor) { - var rootNode = Element.fromDom(editor.getBody()); - var rng = editor.selection.getRng(); - return isEverythingSelected(rootNode, rng) ? emptyEditor(editor) : deleteRangeMergeBlocks(rootNode, editor.selection); - }; - var backspaceDelete$1 = function (editor, forward) { - return editor.selection.isCollapsed() ? false : deleteRange(editor); - }; - var BlockRangeDelete = { backspaceDelete: backspaceDelete$1 }; - - var isBr$5 = function (pos) { - return getElementFromPosition(pos).exists(isBr$1); - }; - var findBr = function (forward, root, pos) { - var parentBlocks = filter(Parents.parentsAndSelf(Element.fromDom(pos.container()), root), isBlock); - var scope = head(parentBlocks).getOr(root); - return CaretFinder.fromPosition(forward, scope.dom(), pos).filter(isBr$5); - }; - var isBeforeBr = function (root, pos) { - return getElementFromPosition(pos).exists(isBr$1) || findBr(true, root, pos).isSome(); - }; - var isAfterBr = function (root, pos) { - return getElementFromPrevPosition(pos).exists(isBr$1) || findBr(false, root, pos).isSome(); - }; - var findPreviousBr = curry(findBr, false); - var findNextBr = curry(findBr, true); - - var isCompoundElement = function (node) { - return isTableCell(Element.fromDom(node)) || isListItem(Element.fromDom(node)); - }; - var DeleteAction = Adt.generate([ - { remove: ['element'] }, - { moveToElement: ['element'] }, - { moveToPosition: ['position'] } - ]); - var isAtContentEditableBlockCaret = function (forward, from) { - var elm = from.getNode(forward === false); - var caretLocation = forward ? 'after' : 'before'; - return NodeType.isElement(elm) && elm.getAttribute('data-mce-caret') === caretLocation; - }; - var isDeleteFromCefDifferentBlocks = function (root, forward, from, to) { - var inSameBlock = function (elm) { - return isInline(Element.fromDom(elm)) && !isInSameBlock(from, to, root); - }; - return getRelativeCefElm(!forward, from).fold(function () { - return getRelativeCefElm(forward, to).fold(constant(false), inSameBlock); - }, inSameBlock); - }; - var deleteEmptyBlockOrMoveToCef = function (root, forward, from, to) { - var toCefElm = to.getNode(forward === false); - return DeleteUtils.getParentBlock(Element.fromDom(root), Element.fromDom(from.getNode())).map(function (blockElm) { - return Empty.isEmpty(blockElm) ? DeleteAction.remove(blockElm.dom()) : DeleteAction.moveToElement(toCefElm); - }).orThunk(function () { - return Option.some(DeleteAction.moveToElement(toCefElm)); - }); - }; - var findCefPosition = function (root, forward, from) { - return CaretFinder.fromPosition(forward, root, from).bind(function (to) { - if (isCompoundElement(to.getNode())) { - return Option.none(); - } else if (isDeleteFromCefDifferentBlocks(root, forward, from, to)) { - return Option.none(); - } else if (forward && NodeType.isContentEditableFalse(to.getNode())) { - return deleteEmptyBlockOrMoveToCef(root, forward, from, to); - } else if (forward === false && NodeType.isContentEditableFalse(to.getNode(true))) { - return deleteEmptyBlockOrMoveToCef(root, forward, from, to); - } else if (forward && isAfterContentEditableFalse(from)) { - return Option.some(DeleteAction.moveToPosition(to)); - } else if (forward === false && isBeforeContentEditableFalse(from)) { - return Option.some(DeleteAction.moveToPosition(to)); - } else { - return Option.none(); - } - }); - }; - var getContentEditableBlockAction = function (forward, elm) { - if (forward && NodeType.isContentEditableFalse(elm.nextSibling)) { - return Option.some(DeleteAction.moveToElement(elm.nextSibling)); - } else if (forward === false && NodeType.isContentEditableFalse(elm.previousSibling)) { - return Option.some(DeleteAction.moveToElement(elm.previousSibling)); - } else { - return Option.none(); - } - }; - var skipMoveToActionFromInlineCefToContent = function (root, from, deleteAction) { - return deleteAction.fold(function (elm) { - return Option.some(DeleteAction.remove(elm)); - }, function (elm) { - return Option.some(DeleteAction.moveToElement(elm)); - }, function (to) { - if (isInSameBlock(from, to, root)) { - return Option.none(); - } else { - return Option.some(DeleteAction.moveToPosition(to)); - } - }); - }; - var getContentEditableAction = function (root, forward, from) { - if (isAtContentEditableBlockCaret(forward, from)) { - return getContentEditableBlockAction(forward, from.getNode(forward === false)).fold(function () { - return findCefPosition(root, forward, from); - }, Option.some); - } else { - return findCefPosition(root, forward, from).bind(function (deleteAction) { - return skipMoveToActionFromInlineCefToContent(root, from, deleteAction); - }); - } - }; - var read$4 = function (root, forward, rng) { - var normalizedRange = normalizeRange(forward ? 1 : -1, root, rng); - var from = CaretPosition$1.fromRangeStart(normalizedRange); - var rootElement = Element.fromDom(root); - if (forward === false && isAfterContentEditableFalse(from)) { - return Option.some(DeleteAction.remove(from.getNode(true))); - } else if (forward && isBeforeContentEditableFalse(from)) { - return Option.some(DeleteAction.remove(from.getNode())); - } else if (forward === false && isBeforeContentEditableFalse(from) && isAfterBr(rootElement, from)) { - return findPreviousBr(rootElement, from).map(function (br) { - return DeleteAction.remove(br.getNode()); - }); - } else if (forward && isAfterContentEditableFalse(from) && isBeforeBr(rootElement, from)) { - return findNextBr(rootElement, from).map(function (br) { - return DeleteAction.remove(br.getNode()); - }); - } else { - return getContentEditableAction(root, forward, from); - } - }; - - var deleteElement$1 = function (editor, forward) { - return function (element) { - editor._selectionOverrides.hideFakeCaret(); - DeleteElement.deleteElement(editor, forward, Element.fromDom(element)); - return true; - }; - }; - var moveToElement = function (editor, forward) { - return function (element) { - var pos = forward ? CaretPosition$1.before(element) : CaretPosition$1.after(element); - editor.selection.setRng(pos.toRange()); - return true; - }; - }; - var moveToPosition = function (editor) { - return function (pos) { - editor.selection.setRng(pos.toRange()); - return true; - }; - }; - var backspaceDeleteCaret = function (editor, forward) { - var result = read$4(editor.getBody(), forward, editor.selection.getRng()).map(function (deleteAction) { - return deleteAction.fold(deleteElement$1(editor, forward), moveToElement(editor, forward), moveToPosition(editor)); - }); - return result.getOr(false); - }; - var deleteOffscreenSelection = function (rootElement) { - each(descendants$1(rootElement, '.mce-offscreen-selection'), remove$1); - }; - var backspaceDeleteRange = function (editor, forward) { - var selectedElement = editor.selection.getNode(); - if (NodeType.isContentEditableFalse(selectedElement)) { - deleteOffscreenSelection(Element.fromDom(editor.getBody())); - DeleteElement.deleteElement(editor, forward, Element.fromDom(editor.selection.getNode())); - DeleteUtils.paddEmptyBody(editor); - return true; - } else { - return false; - } - }; - var getContentEditableRoot$2 = function (root, node) { - while (node && node !== root) { - if (NodeType.isContentEditableTrue(node) || NodeType.isContentEditableFalse(node)) { - return node; - } - node = node.parentNode; - } - return null; - }; - var paddEmptyElement = function (editor) { - var br; - var ceRoot = getContentEditableRoot$2(editor.getBody(), editor.selection.getNode()); - if (NodeType.isContentEditableTrue(ceRoot) && editor.dom.isBlock(ceRoot) && editor.dom.isEmpty(ceRoot)) { - br = editor.dom.create('br', { 'data-mce-bogus': '1' }); - editor.dom.setHTML(ceRoot, ''); - ceRoot.appendChild(br); - editor.selection.setRng(CaretPosition$1.before(br).toRange()); - } - return true; - }; - var backspaceDelete$2 = function (editor, forward) { - if (editor.selection.isCollapsed()) { - return backspaceDeleteCaret(editor, forward); - } else { - return backspaceDeleteRange(editor, forward); - } - }; - var CefDelete = { - backspaceDelete: backspaceDelete$2, - paddEmptyElement: paddEmptyElement - }; - - var trimEmptyTextNode$1 = function (dom, node) { - if (NodeType.isText(node) && node.data.length === 0) { - dom.remove(node); - } - }; - var deleteContentAndShowCaret = function (editor, range, node, direction, forward, peekCaretPosition) { - var caretRange = showCaret(direction, editor, peekCaretPosition.getNode(!forward), forward, true); - if (range.collapsed) { - var deleteRange = range.cloneRange(); - if (forward) { - deleteRange.setEnd(caretRange.startContainer, caretRange.startOffset); - } else { - deleteRange.setStart(caretRange.endContainer, caretRange.endOffset); - } - deleteRange.deleteContents(); - } else { - range.deleteContents(); - } - editor.selection.setRng(caretRange); - trimEmptyTextNode$1(editor.dom, node); - return true; - }; - var deleteCefBoundaryText = function (editor, forward) { - var range = editor.selection.getRng(); - if (!NodeType.isText(range.commonAncestorContainer)) { - return false; - } - var direction = forward ? HDirection.Forwards : HDirection.Backwards; - var caretWalker = CaretWalker(editor.getBody()); - var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next); - var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev); - var getNextPosFn = forward ? getNextVisualCaretPosition : getPrevVisualCaretPosition; - var isBeforeContentEditableFalseFn = forward ? isBeforeContentEditableFalse : isAfterContentEditableFalse; - var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range); - var nextCaretPosition = InlineUtils.normalizePosition(forward, getNextPosFn(caretPosition)); - if (!nextCaretPosition) { - return false; - } else if (isBeforeContentEditableFalseFn(nextCaretPosition)) { - return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, nextCaretPosition); - } - var peekCaretPosition = getNextPosFn(nextCaretPosition); - if (peekCaretPosition && isBeforeContentEditableFalseFn(peekCaretPosition)) { - if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) { - return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, peekCaretPosition); - } - } - return false; - }; - var backspaceDelete$3 = function (editor, forward) { - return deleteCefBoundaryText(editor, forward); - }; - var CefBoundaryDelete = { backspaceDelete: backspaceDelete$3 }; - - var isFeatureEnabled$1 = function (editor) { - return editor.settings.inline_boundaries !== false; - }; - var rangeFromPositions = function (from, to) { - var range = domGlobals.document.createRange(); - range.setStart(from.container(), from.offset()); - range.setEnd(to.container(), to.offset()); - return range; - }; - var hasOnlyTwoOrLessPositionsLeft = function (elm) { - return liftN([ - CaretFinder.firstPositionIn(elm), - CaretFinder.lastPositionIn(elm) - ], function (firstPos, lastPos) { - var normalizedFirstPos = InlineUtils.normalizePosition(true, firstPos); - var normalizedLastPos = InlineUtils.normalizePosition(false, lastPos); - return CaretFinder.nextPosition(elm, normalizedFirstPos).map(function (pos) { - return pos.isEqual(normalizedLastPos); - }).getOr(true); - }).getOr(true); - }; - var setCaretLocation = function (editor, caret) { - return function (location) { - return BoundaryCaret.renderCaret(caret, location).map(function (pos) { - BoundarySelection.setCaretPosition(editor, pos); - return true; - }).getOr(false); - }; - }; - var deleteFromTo = function (editor, caret, from, to) { - var rootNode = editor.getBody(); - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - editor.undoManager.ignore(function () { - editor.selection.setRng(rangeFromPositions(from, to)); - editor.execCommand('Delete'); - BoundaryLocation.readLocation(isInlineTarget, rootNode, CaretPosition$1.fromRangeStart(editor.selection.getRng())).map(BoundaryLocation.inside).map(setCaretLocation(editor, caret)); - }); - editor.nodeChanged(); - }; - var rescope$1 = function (rootNode, node) { - var parentBlock = getParentBlock(node, rootNode); - return parentBlock ? parentBlock : rootNode; - }; - var backspaceDeleteCollapsed = function (editor, caret, forward, from) { - var rootNode = rescope$1(editor.getBody(), from.container()); - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - var fromLocation = BoundaryLocation.readLocation(isInlineTarget, rootNode, from); - return fromLocation.bind(function (location) { - if (forward) { - return location.fold(constant(Option.some(BoundaryLocation.inside(location))), Option.none, constant(Option.some(BoundaryLocation.outside(location))), Option.none); - } else { - return location.fold(Option.none, constant(Option.some(BoundaryLocation.outside(location))), Option.none, constant(Option.some(BoundaryLocation.inside(location)))); - } - }).map(setCaretLocation(editor, caret)).getOrThunk(function () { - var toPosition = CaretFinder.navigate(forward, rootNode, from); - var toLocation = toPosition.bind(function (pos) { - return BoundaryLocation.readLocation(isInlineTarget, rootNode, pos); - }); - if (fromLocation.isSome() && toLocation.isSome()) { - return InlineUtils.findRootInline(isInlineTarget, rootNode, from).map(function (elm) { - if (hasOnlyTwoOrLessPositionsLeft(elm)) { - DeleteElement.deleteElement(editor, forward, Element.fromDom(elm)); - return true; - } else { - return false; - } - }).getOr(false); - } else { - return toLocation.bind(function (_) { - return toPosition.map(function (to) { - if (forward) { - deleteFromTo(editor, caret, from, to); - } else { - deleteFromTo(editor, caret, to, from); - } - return true; - }); - }).getOr(false); - } - }); - }; - var backspaceDelete$4 = function (editor, caret, forward) { - if (editor.selection.isCollapsed() && isFeatureEnabled$1(editor)) { - var from = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return backspaceDeleteCollapsed(editor, caret, forward, from); - } - return false; - }; - var BoundaryDelete = { backspaceDelete: backspaceDelete$4 }; - - var getParentInlines = function (rootElm, startElm) { - var parents = Parents.parentsAndSelf(startElm, rootElm); - return findIndex(parents, isBlock).fold(constant(parents), function (index) { - return parents.slice(0, index); - }); - }; - var hasOnlyOneChild = function (elm) { - return children(elm).length === 1; - }; - var deleteLastPosition = function (forward, editor, target, parentInlines) { - var isFormatElement$1 = curry(isFormatElement, editor); - var formatNodes = map(filter(parentInlines, isFormatElement$1), function (elm) { - return elm.dom(); - }); - if (formatNodes.length === 0) { - DeleteElement.deleteElement(editor, forward, target); - } else { - var pos = replaceWithCaretFormat(target.dom(), formatNodes); - editor.selection.setRng(pos.toRange()); - } - }; - var deleteCaret = function (editor, forward) { - var rootElm = Element.fromDom(editor.getBody()); - var startElm = Element.fromDom(editor.selection.getStart()); - var parentInlines = filter(getParentInlines(rootElm, startElm), hasOnlyOneChild); - return last(parentInlines).map(function (target) { - var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - if (DeleteUtils.willDeleteLastPositionInElement(forward, fromPos, target.dom()) && !isEmptyCaretFormatElement(target)) { - deleteLastPosition(forward, editor, target, parentInlines); - return true; - } else { - return false; - } - }).getOr(false); - }; - var backspaceDelete$5 = function (editor, forward) { - return editor.selection.isCollapsed() ? deleteCaret(editor, forward) : false; - }; - var InlineFormatDelete = { backspaceDelete: backspaceDelete$5 }; - - var tableCellRng = Immutable('start', 'end'); - var tableSelection = Immutable('rng', 'table', 'cells'); - var deleteAction = Adt.generate([ - { removeTable: ['element'] }, - { emptyCells: ['cells'] } - ]); - var isRootFromElement = function (root) { - return curry(eq, root); - }; - var getClosestCell$1 = function (container, isRoot) { - return closest$1(Element.fromDom(container), 'td,th', isRoot); - }; - var getClosestTable = function (cell, isRoot) { - return ancestor$1(cell, 'table', isRoot); - }; - var isExpandedCellRng = function (cellRng) { - return eq(cellRng.start(), cellRng.end()) === false; - }; - var getTableFromCellRng = function (cellRng, isRoot) { - return getClosestTable(cellRng.start(), isRoot).bind(function (startParentTable) { - return getClosestTable(cellRng.end(), isRoot).bind(function (endParentTable) { - return eq(startParentTable, endParentTable) ? Option.some(startParentTable) : Option.none(); - }); - }); - }; - var getTableCells = function (table) { - return descendants$1(table, 'td,th'); - }; - var getCellRangeFromStartTable = function (cellRng, isRoot) { - return getClosestTable(cellRng.start(), isRoot).bind(function (table) { - return last(getTableCells(table)).map(function (endCell) { - return tableCellRng(cellRng.start(), endCell); - }); - }); - }; - var partialSelection = function (isRoot, rng) { - var startCell = getClosestCell$1(rng.startContainer, isRoot); - var endCell = getClosestCell$1(rng.endContainer, isRoot); - return rng.collapsed ? Option.none() : liftN([ - startCell, - endCell - ], tableCellRng).fold(function () { - return startCell.fold(function () { - return endCell.bind(function (endCell) { - return getClosestTable(endCell, isRoot).bind(function (table) { - return head(getTableCells(table)).map(function (startCell) { - return tableCellRng(startCell, endCell); - }); - }); - }); - }, function (startCell) { - return getClosestTable(startCell, isRoot).bind(function (table) { - return last(getTableCells(table)).map(function (endCell) { - return tableCellRng(startCell, endCell); - }); - }); - }); - }, function (cellRng) { - return isWithinSameTable(isRoot, cellRng) ? Option.none() : getCellRangeFromStartTable(cellRng, isRoot); - }); - }; - var isWithinSameTable = function (isRoot, cellRng) { - return getTableFromCellRng(cellRng, isRoot).isSome(); - }; - var getCellRng = function (rng, isRoot) { - var startCell = getClosestCell$1(rng.startContainer, isRoot); - var endCell = getClosestCell$1(rng.endContainer, isRoot); - return liftN([ - startCell, - endCell - ], tableCellRng).filter(isExpandedCellRng).filter(function (cellRng) { - return isWithinSameTable(isRoot, cellRng); - }).orThunk(function () { - return partialSelection(isRoot, rng); - }); - }; - var getTableSelectionFromCellRng = function (cellRng, isRoot) { - return getTableFromCellRng(cellRng, isRoot).map(function (table) { - return tableSelection(cellRng, table, getTableCells(table)); - }); - }; - var getTableSelectionFromRng = function (root, rng) { - var isRoot = isRootFromElement(root); - return getCellRng(rng, isRoot).bind(function (cellRng) { - return getTableSelectionFromCellRng(cellRng, isRoot); - }); - }; - var getCellIndex = function (cells, cell) { - return findIndex(cells, function (x) { - return eq(x, cell); - }); - }; - var getSelectedCells = function (tableSelection) { - return liftN([ - getCellIndex(tableSelection.cells(), tableSelection.rng().start()), - getCellIndex(tableSelection.cells(), tableSelection.rng().end()) - ], function (startIndex, endIndex) { - return tableSelection.cells().slice(startIndex, endIndex + 1); - }); - }; - var getAction = function (tableSelection) { - return getSelectedCells(tableSelection).map(function (selected) { - var cells = tableSelection.cells(); - return selected.length === cells.length ? deleteAction.removeTable(tableSelection.table()) : deleteAction.emptyCells(selected); - }); - }; - var getActionFromCells = function (cells) { - return deleteAction.emptyCells(cells); - }; - var getActionFromRange = function (root, rng) { - return getTableSelectionFromRng(root, rng).bind(getAction); - }; - var TableDeleteAction = { - getActionFromRange: getActionFromRange, - getActionFromCells: getActionFromCells - }; - - var emptyCells = function (editor, cells) { - each(cells, PaddingBr.fillWithPaddingBr); - editor.selection.setCursorLocation(cells[0].dom(), 0); - return true; - }; - var deleteTableElement = function (editor, table) { - DeleteElement.deleteElement(editor, false, table); - return true; - }; - var deleteCellRange = function (editor, rootElm, rng) { - return TableDeleteAction.getActionFromRange(rootElm, rng).map(function (action) { - return action.fold(curry(deleteTableElement, editor), curry(emptyCells, editor)); - }); - }; - var deleteCaptionRange = function (editor, caption) { - return emptyElement(editor, caption); - }; - var deleteTableRange = function (editor, rootElm, rng, startElm) { - return getParentCaption(rootElm, startElm).fold(function () { - return deleteCellRange(editor, rootElm, rng); - }, function (caption) { - return deleteCaptionRange(editor, caption); - }).getOr(false); - }; - var deleteRange$1 = function (editor, startElm) { - var rootNode = Element.fromDom(editor.getBody()); - var rng = editor.selection.getRng(); - var selectedCells = TableCellSelection.getCellsFromEditor(editor); - return selectedCells.length !== 0 ? emptyCells(editor, selectedCells) : deleteTableRange(editor, rootNode, rng, startElm); - }; - var getParentCell = function (rootElm, elm) { - return find(Parents.parentsAndSelf(elm, rootElm), isTableCell); - }; - var getParentCaption = function (rootElm, elm) { - return find(Parents.parentsAndSelf(elm, rootElm), function (elm) { - return name(elm) === 'caption'; - }); - }; - var deleteBetweenCells = function (editor, rootElm, forward, fromCell, from) { - return CaretFinder.navigate(forward, editor.getBody(), from).bind(function (to) { - return getParentCell(rootElm, Element.fromDom(to.getNode())).map(function (toCell) { - return eq(toCell, fromCell) === false; - }); - }); - }; - var emptyElement = function (editor, elm) { - PaddingBr.fillWithPaddingBr(elm); - editor.selection.setCursorLocation(elm.dom(), 0); - return Option.some(true); - }; - var isDeleteOfLastCharPos = function (fromCaption, forward, from, to) { - return CaretFinder.firstPositionIn(fromCaption.dom()).bind(function (first) { - return CaretFinder.lastPositionIn(fromCaption.dom()).map(function (last) { - return forward ? from.isEqual(first) && to.isEqual(last) : from.isEqual(last) && to.isEqual(first); - }); - }).getOr(true); - }; - var emptyCaretCaption = function (editor, elm) { - return emptyElement(editor, elm); - }; - var validateCaretCaption = function (rootElm, fromCaption, to) { - return getParentCaption(rootElm, Element.fromDom(to.getNode())).map(function (toCaption) { - return eq(toCaption, fromCaption) === false; - }); - }; - var deleteCaretInsideCaption = function (editor, rootElm, forward, fromCaption, from) { - return CaretFinder.navigate(forward, editor.getBody(), from).bind(function (to) { - return isDeleteOfLastCharPos(fromCaption, forward, from, to) ? emptyCaretCaption(editor, fromCaption) : validateCaretCaption(rootElm, fromCaption, to); - }).or(Option.some(true)); - }; - var deleteCaretCells = function (editor, forward, rootElm, startElm) { - var from = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return getParentCell(rootElm, startElm).bind(function (fromCell) { - return Empty.isEmpty(fromCell) ? emptyElement(editor, fromCell) : deleteBetweenCells(editor, rootElm, forward, fromCell, from); - }).getOr(false); - }; - var deleteCaretCaption = function (editor, forward, rootElm, fromCaption) { - var from = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return Empty.isEmpty(fromCaption) ? emptyElement(editor, fromCaption) : deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from); - }; - var isNearTable = function (forward, pos) { - return forward ? isBeforeTable(pos) : isAfterTable(pos); - }; - var isBeforeOrAfterTable = function (editor, forward) { - var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return isNearTable(forward, fromPos) || CaretFinder.fromPosition(forward, editor.getBody(), fromPos).map(function (pos) { - return isNearTable(forward, pos); - }).getOr(false); - }; - var deleteCaret$1 = function (editor, forward, startElm) { - var rootElm = Element.fromDom(editor.getBody()); - return getParentCaption(rootElm, startElm).fold(function () { - return deleteCaretCells(editor, forward, rootElm, startElm) || isBeforeOrAfterTable(editor, forward); - }, function (fromCaption) { - return deleteCaretCaption(editor, forward, rootElm, fromCaption).getOr(false); - }); - }; - var backspaceDelete$6 = function (editor, forward) { - var startElm = Element.fromDom(editor.selection.getStart(true)); - var cells = TableCellSelection.getCellsFromEditor(editor); - return editor.selection.isCollapsed() && cells.length === 0 ? deleteCaret$1(editor, forward, startElm) : deleteRange$1(editor, startElm); - }; - var TableDelete = { backspaceDelete: backspaceDelete$6 }; - - var deleteCaret$2 = function (editor, forward) { - var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return CaretFinder.fromPosition(forward, editor.getBody(), fromPos).filter(function (pos) { - return forward ? isBeforeImageBlock(pos) : isAfterImageBlock(pos); - }).bind(function (pos) { - return Option.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, pos)); - }).map(function (elm) { - editor.selection.select(elm); - return true; - }).getOr(false); - }; - var backspaceDelete$7 = function (editor, forward) { - return editor.selection.isCollapsed() ? deleteCaret$2(editor, forward) : false; - }; - var PageBreakDelete = { backspaceDelete: backspaceDelete$7 }; - - var executeKeydownOverride$1 = function (editor, caret, evt) { - MatchKeys.execute([ - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(CefDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(CefDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(CefBoundaryDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(CefBoundaryDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(BoundaryDelete.backspaceDelete, editor, caret, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(BoundaryDelete.backspaceDelete, editor, caret, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(TableDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(TableDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(PageBreakDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(PageBreakDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(BlockRangeDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(BlockRangeDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(BlockBoundaryDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(BlockBoundaryDelete.backspaceDelete, editor, true) - }, - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(InlineFormatDelete.backspaceDelete, editor, false) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(InlineFormatDelete.backspaceDelete, editor, true) - } - ], evt).each(function (_) { - evt.preventDefault(); - }); - }; - var executeKeyupOverride = function (editor, evt) { - MatchKeys.execute([ - { - keyCode: VK.BACKSPACE, - action: MatchKeys.action(CefDelete.paddEmptyElement, editor) - }, - { - keyCode: VK.DELETE, - action: MatchKeys.action(CefDelete.paddEmptyElement, editor) - } - ], evt); - }; - var setup$8 = function (editor, caret) { - editor.on('keydown', function (evt) { - if (evt.isDefaultPrevented() === false) { - executeKeydownOverride$1(editor, caret, evt); - } - }); - editor.on('keyup', function (evt) { - if (evt.isDefaultPrevented() === false) { - executeKeyupOverride(editor, evt); - } - }); - }; - var DeleteBackspaceKeys = { setup: setup$8 }; - - var firstNonWhiteSpaceNodeSibling = function (node) { - while (node) { - if (node.nodeType === 1 || node.nodeType === 3 && node.data && /[\r\n\s]/.test(node.data)) { - return node; - } - node = node.nextSibling; - } - }; - var moveToCaretPosition = function (editor, root) { - var node, rng, lastNode = root; - var dom = editor.dom; - var moveCaretBeforeOnEnterElementsMap = editor.schema.getMoveCaretBeforeOnEnterElements(); - if (!root) { - return; - } - if (/^(LI|DT|DD)$/.test(root.nodeName)) { - var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild); - if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) { - root.insertBefore(dom.doc.createTextNode('\xA0'), root.firstChild); - } - } - rng = dom.createRng(); - root.normalize(); - if (root.hasChildNodes()) { - var walker = new TreeWalker(root, root); - while (node = walker.current()) { - if (NodeType.isText(node)) { - rng.setStart(node, 0); - rng.setEnd(node, 0); - break; - } - if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) { - rng.setStartBefore(node); - rng.setEndBefore(node); - break; - } - lastNode = node; - node = walker.next(); - } - if (!node) { - rng.setStart(lastNode, 0); - rng.setEnd(lastNode, 0); - } - } else { - if (NodeType.isBr(root)) { - if (root.nextSibling && dom.isBlock(root.nextSibling)) { - rng.setStartBefore(root); - rng.setEndBefore(root); - } else { - rng.setStartAfter(root); - rng.setEndAfter(root); - } - } else { - rng.setStart(root, 0); - rng.setEnd(root, 0); - } - } - editor.selection.setRng(rng); - editor.selection.scrollIntoView(root); - }; - var getEditableRoot = function (dom, node) { - var root = dom.getRoot(); - var parent, editableRoot; - parent = node; - while (parent !== root && dom.getContentEditable(parent) !== 'false') { - if (dom.getContentEditable(parent) === 'true') { - editableRoot = parent; - } - parent = parent.parentNode; - } - return parent !== root ? editableRoot : root; - }; - var getParentBlock$2 = function (editor) { - return Option.from(editor.dom.getParent(editor.selection.getStart(true), editor.dom.isBlock)); - }; - var getParentBlockName = function (editor) { - return getParentBlock$2(editor).fold(constant(''), function (parentBlock) { - return parentBlock.nodeName.toUpperCase(); - }); - }; - var isListItemParentBlock = function (editor) { - return getParentBlock$2(editor).filter(function (elm) { - return isListItem(Element.fromDom(elm)); - }).isSome(); - }; - var NewLineUtils = { - moveToCaretPosition: moveToCaretPosition, - getEditableRoot: getEditableRoot, - getParentBlock: getParentBlock$2, - getParentBlockName: getParentBlockName, - isListItemParentBlock: isListItemParentBlock - }; - - var hasFirstChild = function (elm, name) { - return elm.firstChild && elm.firstChild.nodeName === name; - }; - var hasParent$1 = function (elm, parentName) { - return elm && elm.parentNode && elm.parentNode.nodeName === parentName; - }; - var isListBlock = function (elm) { - return elm && /^(OL|UL|LI)$/.test(elm.nodeName); - }; - var isNestedList = function (elm) { - return isListBlock(elm) && isListBlock(elm.parentNode); - }; - var getContainerBlock = function (containerBlock) { - var containerBlockParent = containerBlock.parentNode; - if (/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)) { - return containerBlockParent; - } - return containerBlock; - }; - var isFirstOrLastLi = function (containerBlock, parentBlock, first) { - var node = containerBlock[first ? 'firstChild' : 'lastChild']; - while (node) { - if (NodeType.isElement(node)) { - break; - } - node = node[first ? 'nextSibling' : 'previousSibling']; - } - return node === parentBlock; - }; - var insert = function (editor, createNewBlock, containerBlock, parentBlock, newBlockName) { - var dom = editor.dom; - var rng = editor.selection.getRng(); - if (containerBlock === editor.getBody()) { - return; - } - if (isNestedList(containerBlock)) { - newBlockName = 'LI'; - } - var newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR'); - if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) { - if (hasParent$1(containerBlock, 'LI')) { - dom.insertAfter(newBlock, getContainerBlock(containerBlock)); - } else { - dom.replace(newBlock, containerBlock); - } - } else if (isFirstOrLastLi(containerBlock, parentBlock, true)) { - if (hasParent$1(containerBlock, 'LI')) { - dom.insertAfter(newBlock, getContainerBlock(containerBlock)); - newBlock.appendChild(dom.doc.createTextNode(' ')); - newBlock.appendChild(containerBlock); - } else { - containerBlock.parentNode.insertBefore(newBlock, containerBlock); - } - } else if (isFirstOrLastLi(containerBlock, parentBlock, false)) { - dom.insertAfter(newBlock, getContainerBlock(containerBlock)); - } else { - containerBlock = getContainerBlock(containerBlock); - var tmpRng = rng.cloneRange(); - tmpRng.setStartAfter(parentBlock); - tmpRng.setEndAfter(containerBlock); - var fragment = tmpRng.extractContents(); - if (newBlockName === 'LI' && hasFirstChild(fragment, 'LI')) { - newBlock = fragment.firstChild; - dom.insertAfter(fragment, containerBlock); - } else { - dom.insertAfter(fragment, containerBlock); - dom.insertAfter(newBlock, containerBlock); - } - } - dom.remove(parentBlock); - NewLineUtils.moveToCaretPosition(editor, newBlock); - }; - var InsertLi = { insert: insert }; - - var trimZwsp = function (fragment) { - each(descendants(Element.fromDom(fragment), isText), function (text) { - var rawNode = text.dom(); - rawNode.nodeValue = Zwsp.trim(rawNode.nodeValue); - }); - }; - var isEmptyAnchor = function (dom, elm) { - return elm && elm.nodeName === 'A' && dom.isEmpty(elm); - }; - var isTableCell$4 = function (node) { - return node && /^(TD|TH|CAPTION)$/.test(node.nodeName); - }; - var emptyBlock = function (elm) { - elm.innerHTML = '
'; - }; - var containerAndSiblingName = function (container, nodeName) { - return container.nodeName === nodeName || container.previousSibling && container.previousSibling.nodeName === nodeName; - }; - var canSplitBlock = function (dom, node) { - return node && dom.isBlock(node) && !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position) && dom.getContentEditable(node) !== 'true'; - }; - var trimInlineElementsOnLeftSideOfBlock = function (dom, nonEmptyElementsMap, block) { - var node = block; - var firstChilds = []; - var i; - if (!node) { - return; - } - while (node = node.firstChild) { - if (dom.isBlock(node)) { - return; - } - if (NodeType.isElement(node) && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) { - firstChilds.push(node); - } - } - i = firstChilds.length; - while (i--) { - node = firstChilds[i]; - if (!node.hasChildNodes() || node.firstChild === node.lastChild && node.firstChild.nodeValue === '') { - dom.remove(node); - } else { - if (isEmptyAnchor(dom, node)) { - dom.remove(node); - } - } - } - }; - var normalizeZwspOffset = function (start, container, offset) { - if (NodeType.isText(container) === false) { - return offset; - } else if (start) { - return offset === 1 && container.data.charAt(offset - 1) === Zwsp.ZWSP ? 0 : offset; - } else { - return offset === container.data.length - 1 && container.data.charAt(offset) === Zwsp.ZWSP ? container.data.length : offset; - } - }; - var includeZwspInRange = function (rng) { - var newRng = rng.cloneRange(); - newRng.setStart(rng.startContainer, normalizeZwspOffset(true, rng.startContainer, rng.startOffset)); - newRng.setEnd(rng.endContainer, normalizeZwspOffset(false, rng.endContainer, rng.endOffset)); - return newRng; - }; - var trimLeadingLineBreaks = function (node) { - do { - if (NodeType.isText(node)) { - node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, ''); - } - node = node.firstChild; - } while (node); - }; - var getEditableRoot$1 = function (dom, node) { - var root = dom.getRoot(); - var parent, editableRoot; - parent = node; - while (parent !== root && dom.getContentEditable(parent) !== 'false') { - if (dom.getContentEditable(parent) === 'true') { - editableRoot = parent; - } - parent = parent.parentNode; - } - return parent !== root ? editableRoot : root; - }; - var setForcedBlockAttrs = function (editor, node) { - var forcedRootBlockName = Settings.getForcedRootBlock(editor); - if (forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) { - editor.dom.setAttribs(node, Settings.getForcedRootBlockAttrs(editor)); - } - }; - var wrapSelfAndSiblingsInDefaultBlock = function (editor, newBlockName, rng, container, offset) { - var newBlock, parentBlock, startNode, node, next, rootBlockName; - var blockName = newBlockName || 'P'; - var dom = editor.dom, editableRoot = getEditableRoot$1(dom, container); - parentBlock = dom.getParent(container, dom.isBlock); - if (!parentBlock || !canSplitBlock(dom, parentBlock)) { - parentBlock = parentBlock || editableRoot; - if (parentBlock === editor.getBody() || isTableCell$4(parentBlock)) { - rootBlockName = parentBlock.nodeName.toLowerCase(); - } else { - rootBlockName = parentBlock.parentNode.nodeName.toLowerCase(); - } - if (!parentBlock.hasChildNodes()) { - newBlock = dom.create(blockName); - setForcedBlockAttrs(editor, newBlock); - parentBlock.appendChild(newBlock); - rng.setStart(newBlock, 0); - rng.setEnd(newBlock, 0); - return newBlock; - } - node = container; - while (node.parentNode !== parentBlock) { - node = node.parentNode; - } - while (node && !dom.isBlock(node)) { - startNode = node; - node = node.previousSibling; - } - if (startNode && editor.schema.isValidChild(rootBlockName, blockName.toLowerCase())) { - newBlock = dom.create(blockName); - setForcedBlockAttrs(editor, newBlock); - startNode.parentNode.insertBefore(newBlock, startNode); - node = startNode; - while (node && !dom.isBlock(node)) { - next = node.nextSibling; - newBlock.appendChild(node); - node = next; - } - rng.setStart(container, offset); - rng.setEnd(container, offset); - } - } - return container; - }; - var addBrToBlockIfNeeded = function (dom, block) { - var lastChild; - block.normalize(); - lastChild = block.lastChild; - if (!lastChild || /^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true))) { - dom.add(block, 'br'); - } - }; - var insert$1 = function (editor, evt) { - var tmpRng, editableRoot, container, offset, parentBlock, shiftKey; - var newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer; - var dom = editor.dom; - var schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements(); - var rng = editor.selection.getRng(); - var createNewBlock = function (name) { - var node = container, block, clonedNode, caretNode; - var textInlineElements = schema.getTextInlineElements(); - if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') { - block = dom.create(name || newBlockName); - setForcedBlockAttrs(editor, block); - } else { - block = parentBlock.cloneNode(false); - } - caretNode = block; - if (Settings.shouldKeepStyles(editor) === false) { - dom.setAttrib(block, 'style', null); - dom.setAttrib(block, 'class', null); - } else { - do { - if (textInlineElements[node.nodeName]) { - if (isCaretNode(node) || Bookmarks.isBookmarkNode(node)) { - continue; - } - clonedNode = node.cloneNode(false); - dom.setAttrib(clonedNode, 'id', ''); - if (block.hasChildNodes()) { - clonedNode.appendChild(block.firstChild); - block.appendChild(clonedNode); - } else { - caretNode = clonedNode; - block.appendChild(clonedNode); - } - } - } while ((node = node.parentNode) && node !== editableRoot); - } - emptyBlock(caretNode); - return block; - }; - var isCaretAtStartOrEndOfBlock = function (start) { - var node, name; - var normalizedOffset = normalizeZwspOffset(start, container, offset); - if (NodeType.isText(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.nodeValue.length)) { - return false; - } - if (container.parentNode === parentBlock && isAfterLastNodeInContainer && !start) { - return true; - } - if (start && NodeType.isElement(container) && container === parentBlock.firstChild) { - return true; - } - if (containerAndSiblingName(container, 'TABLE') || containerAndSiblingName(container, 'HR')) { - return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start; - } - var walker = new TreeWalker(container, parentBlock); - if (NodeType.isText(container)) { - if (start && normalizedOffset === 0) { - walker.prev(); - } else if (!start && normalizedOffset === container.nodeValue.length) { - walker.next(); - } - } - while (node = walker.current()) { - if (NodeType.isElement(node)) { - if (!node.getAttribute('data-mce-bogus')) { - name = node.nodeName.toLowerCase(); - if (nonEmptyElementsMap[name] && name !== 'br') { - return false; - } - } - } else if (NodeType.isText(node) && !/^[ \t\r\n]*$/.test(node.nodeValue)) { - return false; - } - if (start) { - walker.prev(); - } else { - walker.next(); - } - } - return true; - }; - var insertNewBlockAfter = function () { - if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== 'HGROUP') { - newBlock = createNewBlock(newBlockName); - } else { - newBlock = createNewBlock(); - } - if (Settings.shouldEndContainerOnEmptyBlock(editor) && canSplitBlock(dom, containerBlock) && dom.isEmpty(parentBlock)) { - newBlock = dom.split(containerBlock, parentBlock); - } else { - dom.insertAfter(newBlock, parentBlock); - } - NewLineUtils.moveToCaretPosition(editor, newBlock); - }; - NormalizeRange.normalize(dom, rng).each(function (normRng) { - rng.setStart(normRng.startContainer, normRng.startOffset); - rng.setEnd(normRng.endContainer, normRng.endOffset); - }); - container = rng.startContainer; - offset = rng.startOffset; - newBlockName = Settings.getForcedRootBlock(editor); - shiftKey = !!(evt && evt.shiftKey); - var ctrlKey = !!(evt && evt.ctrlKey); - if (NodeType.isElement(container) && container.hasChildNodes()) { - isAfterLastNodeInContainer = offset > container.childNodes.length - 1; - container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container; - if (isAfterLastNodeInContainer && NodeType.isText(container)) { - offset = container.nodeValue.length; - } else { - offset = 0; - } - } - editableRoot = getEditableRoot$1(dom, container); - if (!editableRoot) { - return; - } - if (newBlockName && !shiftKey || !newBlockName && shiftKey) { - container = wrapSelfAndSiblingsInDefaultBlock(editor, newBlockName, rng, container, offset); - } - parentBlock = dom.getParent(container, dom.isBlock); - containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null; - parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; - containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; - if (containerBlockName === 'LI' && !ctrlKey) { - parentBlock = containerBlock; - containerBlock = containerBlock.parentNode; - parentBlockName = containerBlockName; - } - if (/^(LI|DT|DD)$/.test(parentBlockName)) { - if (dom.isEmpty(parentBlock)) { - InsertLi.insert(editor, createNewBlock, containerBlock, parentBlock, newBlockName); - return; - } - } - if (newBlockName && parentBlock === editor.getBody()) { - return; - } - newBlockName = newBlockName || 'P'; - if (isCaretContainerBlock(parentBlock)) { - newBlock = showCaretContainerBlock(parentBlock); - if (dom.isEmpty(parentBlock)) { - emptyBlock(parentBlock); - } - NewLineUtils.moveToCaretPosition(editor, newBlock); - } else if (isCaretAtStartOrEndOfBlock()) { - insertNewBlockAfter(); - } else if (isCaretAtStartOrEndOfBlock(true)) { - newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock); - NewLineUtils.moveToCaretPosition(editor, containerAndSiblingName(parentBlock, 'HR') ? newBlock : parentBlock); - } else { - tmpRng = includeZwspInRange(rng).cloneRange(); - tmpRng.setEndAfter(parentBlock); - fragment = tmpRng.extractContents(); - trimZwsp(fragment); - trimLeadingLineBreaks(fragment); - newBlock = fragment.firstChild; - dom.insertAfter(fragment, parentBlock); - trimInlineElementsOnLeftSideOfBlock(dom, nonEmptyElementsMap, newBlock); - addBrToBlockIfNeeded(dom, parentBlock); - if (dom.isEmpty(parentBlock)) { - emptyBlock(parentBlock); - } - newBlock.normalize(); - if (dom.isEmpty(newBlock)) { - dom.remove(newBlock); - insertNewBlockAfter(); - } else { - NewLineUtils.moveToCaretPosition(editor, newBlock); - } - } - dom.setAttrib(newBlock, 'id', ''); - editor.fire('NewBlock', { newBlock: newBlock }); - }; - var InsertBlock = { insert: insert$1 }; - - var hasRightSideContent = function (schema, container, parentBlock) { - var walker = new TreeWalker(container, parentBlock); - var node; - var nonEmptyElementsMap = schema.getNonEmptyElements(); - while (node = walker.next()) { - if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) { - return true; - } - } - }; - var scrollToBr = function (dom, selection, brElm) { - var marker = dom.create('span', {}, ' '); - brElm.parentNode.insertBefore(marker, brElm); - selection.scrollIntoView(marker); - dom.remove(marker); - }; - var moveSelectionToBr = function (dom, selection, brElm, extraBr) { - var rng = dom.createRng(); - if (!extraBr) { - rng.setStartAfter(brElm); - rng.setEndAfter(brElm); - } else { - rng.setStartBefore(brElm); - rng.setEndBefore(brElm); - } - selection.setRng(rng); - }; - var insertBrAtCaret = function (editor, evt) { - var selection = editor.selection; - var dom = editor.dom; - var rng = selection.getRng(); - var brElm; - var extraBr; - NormalizeRange.normalize(dom, rng).each(function (normRng) { - rng.setStart(normRng.startContainer, normRng.startOffset); - rng.setEnd(normRng.endContainer, normRng.endOffset); - }); - var offset = rng.startOffset; - var container = rng.startContainer; - if (container.nodeType === 1 && container.hasChildNodes()) { - var isAfterLastNodeInContainer = offset > container.childNodes.length - 1; - container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container; - if (isAfterLastNodeInContainer && container.nodeType === 3) { - offset = container.nodeValue.length; - } else { - offset = 0; - } - } - var parentBlock = dom.getParent(container, dom.isBlock); - var containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null; - var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; - var isControlKey = !!(evt && evt.ctrlKey); - if (containerBlockName === 'LI' && !isControlKey) { - parentBlock = containerBlock; - } - if (container && container.nodeType === 3 && offset >= container.nodeValue.length) { - if (!hasRightSideContent(editor.schema, container, parentBlock)) { - brElm = dom.create('br'); - rng.insertNode(brElm); - rng.setStartAfter(brElm); - rng.setEndAfter(brElm); - extraBr = true; - } - } - brElm = dom.create('br'); - rangeInsertNode(dom, rng, brElm); - scrollToBr(dom, selection, brElm); - moveSelectionToBr(dom, selection, brElm, extraBr); - editor.undoManager.add(); - }; - var insertBrBefore = function (editor, inline) { - var br = Element.fromTag('br'); - before(Element.fromDom(inline), br); - editor.undoManager.add(); - }; - var insertBrAfter = function (editor, inline) { - if (!hasBrAfter(editor.getBody(), inline)) { - after(Element.fromDom(inline), Element.fromTag('br')); - } - var br = Element.fromTag('br'); - after(Element.fromDom(inline), br); - scrollToBr(editor.dom, editor.selection, br.dom()); - moveSelectionToBr(editor.dom, editor.selection, br.dom(), false); - editor.undoManager.add(); - }; - var isBeforeBr$1 = function (pos) { - return NodeType.isBr(pos.getNode()); - }; - var hasBrAfter = function (rootNode, startNode) { - if (isBeforeBr$1(CaretPosition$1.after(startNode))) { - return true; - } else { - return CaretFinder.nextPosition(rootNode, CaretPosition$1.after(startNode)).map(function (pos) { - return NodeType.isBr(pos.getNode()); - }).getOr(false); - } - }; - var isAnchorLink = function (elm) { - return elm && elm.nodeName === 'A' && 'href' in elm; - }; - var isInsideAnchor = function (location) { - return location.fold(constant(false), isAnchorLink, isAnchorLink, constant(false)); - }; - var readInlineAnchorLocation = function (editor) { - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - var position = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return BoundaryLocation.readLocation(isInlineTarget, editor.getBody(), position).filter(isInsideAnchor); - }; - var insertBrOutsideAnchor = function (editor, location) { - location.fold(noop, curry(insertBrBefore, editor), curry(insertBrAfter, editor), noop); - }; - var insert$2 = function (editor, evt) { - var anchorLocation = readInlineAnchorLocation(editor); - if (anchorLocation.isSome()) { - anchorLocation.each(curry(insertBrOutsideAnchor, editor)); - } else { - insertBrAtCaret(editor, evt); - } - }; - var InsertBr = { insert: insert$2 }; - - var matchesSelector = function (editor, selector) { - return NewLineUtils.getParentBlock(editor).filter(function (parentBlock) { - return selector.length > 0 && is$1(Element.fromDom(parentBlock), selector); - }).isSome(); - }; - var shouldInsertBr = function (editor) { - return matchesSelector(editor, Settings.getBrNewLineSelector(editor)); - }; - var shouldBlockNewLine = function (editor) { - return matchesSelector(editor, Settings.getNoNewLineSelector(editor)); - }; - var ContextSelectors = { - shouldInsertBr: shouldInsertBr, - shouldBlockNewLine: shouldBlockNewLine - }; - - var newLineAction = Adt.generate([ - { br: [] }, - { block: [] }, - { none: [] } - ]); - var shouldBlockNewLine$1 = function (editor, shiftKey) { - return ContextSelectors.shouldBlockNewLine(editor); - }; - var isBrMode = function (requiredState) { - return function (editor, shiftKey) { - var brMode = Settings.getForcedRootBlock(editor) === ''; - return brMode === requiredState; - }; - }; - var inListBlock = function (requiredState) { - return function (editor, shiftKey) { - return NewLineUtils.isListItemParentBlock(editor) === requiredState; - }; - }; - var inBlock = function (blockName, requiredState) { - return function (editor, shiftKey) { - var state = NewLineUtils.getParentBlockName(editor) === blockName.toUpperCase(); - return state === requiredState; - }; - }; - var inPreBlock = function (requiredState) { - return inBlock('pre', requiredState); - }; - var inSummaryBlock = function () { - return inBlock('summary', true); - }; - var shouldPutBrInPre$1 = function (requiredState) { - return function (editor, shiftKey) { - return Settings.shouldPutBrInPre(editor) === requiredState; - }; - }; - var inBrContext = function (editor, shiftKey) { - return ContextSelectors.shouldInsertBr(editor); - }; - var hasShiftKey = function (editor, shiftKey) { - return shiftKey; - }; - var canInsertIntoEditableRoot = function (editor) { - var forcedRootBlock = Settings.getForcedRootBlock(editor); - var rootEditable = NewLineUtils.getEditableRoot(editor.dom, editor.selection.getStart()); - return rootEditable && editor.schema.isValidChild(rootEditable.nodeName, forcedRootBlock ? forcedRootBlock : 'P'); - }; - var match$2 = function (predicates, action) { - return function (editor, shiftKey) { - var isMatch = foldl(predicates, function (res, p) { - return res && p(editor, shiftKey); - }, true); - return isMatch ? Option.some(action) : Option.none(); - }; - }; - var getAction$1 = function (editor, evt) { - return LazyEvaluator.evaluateUntil([ - match$2([shouldBlockNewLine$1], newLineAction.none()), - match$2([inSummaryBlock()], newLineAction.br()), - match$2([ - inPreBlock(true), - shouldPutBrInPre$1(false), - hasShiftKey - ], newLineAction.br()), - match$2([ - inPreBlock(true), - shouldPutBrInPre$1(false) - ], newLineAction.block()), - match$2([ - inPreBlock(true), - shouldPutBrInPre$1(true), - hasShiftKey - ], newLineAction.block()), - match$2([ - inPreBlock(true), - shouldPutBrInPre$1(true) - ], newLineAction.br()), - match$2([ - inListBlock(true), - hasShiftKey - ], newLineAction.br()), - match$2([inListBlock(true)], newLineAction.block()), - match$2([ - isBrMode(true), - hasShiftKey, - canInsertIntoEditableRoot - ], newLineAction.block()), - match$2([isBrMode(true)], newLineAction.br()), - match$2([inBrContext], newLineAction.br()), - match$2([ - isBrMode(false), - hasShiftKey - ], newLineAction.br()), - match$2([canInsertIntoEditableRoot], newLineAction.block()) - ], [ - editor, - !!(evt && evt.shiftKey) - ]).getOr(newLineAction.none()); - }; - var NewLineAction = { getAction: getAction$1 }; - - var insert$3 = function (editor, evt) { - NewLineAction.getAction(editor, evt).fold(function () { - InsertBr.insert(editor, evt); - }, function () { - InsertBlock.insert(editor, evt); - }, noop); - }; - var InsertNewLine = { insert: insert$3 }; - - var endTypingLevel = function (undoManager) { - if (undoManager.typing) { - undoManager.typing = false; - undoManager.add(); - } - }; - var handleEnterKeyEvent = function (editor, event) { - if (event.isDefaultPrevented()) { - return; - } - event.preventDefault(); - endTypingLevel(editor.undoManager); - editor.undoManager.transact(function () { - if (editor.selection.isCollapsed() === false) { - editor.execCommand('Delete'); - } - InsertNewLine.insert(editor, event); - }); - }; - var setup$9 = function (editor) { - editor.on('keydown', function (event) { - if (event.keyCode === VK.ENTER) { - handleEnterKeyEvent(editor, event); - } - }); - }; - var EnterKey = { setup: setup$9 }; - - var insertTextAtPosition = function (text, pos) { - var container = pos.container(); - var offset = pos.offset(); - if (NodeType.isText(container)) { - container.insertData(offset, text); - return Option.some(CaretPosition(container, offset + text.length)); - } else { - return getElementFromPosition(pos).map(function (elm) { - var textNode = Element.fromText(text); - if (pos.isAtEnd()) { - after(elm, textNode); - } else { - before(elm, textNode); - } - return CaretPosition(textNode.dom(), text.length); - }); - } - }; - var insertNbspAtPosition = curry(insertTextAtPosition, '\xA0'); - var insertSpaceAtPosition = curry(insertTextAtPosition, ' '); - - var navigateIgnoreEmptyTextNodes = function (forward, root, from) { - return CaretFinder.navigateIgnore(forward, root, from, isEmptyText); - }; - var isAtBlockBoundary = function (forward, root, pos) { - var parentBlocks = filter(Parents.parentsAndSelf(Element.fromDom(pos.container()), root), isBlock); - return head(parentBlocks).fold(function () { - return navigateIgnoreEmptyTextNodes(forward, root.dom(), pos).forall(function (newPos) { - return isInSameBlock(newPos, pos, root.dom()) === false; - }); - }, function (parent) { - return navigateIgnoreEmptyTextNodes(forward, parent.dom(), pos).isNone(); - }); - }; - var isAtStartOfBlock = curry(isAtBlockBoundary, false); - var isAtEndOfBlock = curry(isAtBlockBoundary, true); - - var nbsp = '\xA0'; - var isInMiddleOfText = function (pos) { - return CaretPosition.isTextPosition(pos) && !pos.isAtStart() && !pos.isAtEnd(); - }; - var getClosestBlock = function (root, pos) { - var parentBlocks = filter(Parents.parentsAndSelf(Element.fromDom(pos.container()), root), isBlock); - return head(parentBlocks).getOr(root); - }; - var hasSpaceBefore = function (root, pos) { - if (isInMiddleOfText(pos)) { - return isAfterSpace(pos); - } else { - return isAfterSpace(pos) || CaretFinder.prevPosition(getClosestBlock(root, pos).dom(), pos).exists(isAfterSpace); - } - }; - var hasSpaceAfter = function (root, pos) { - if (isInMiddleOfText(pos)) { - return isBeforeSpace(pos); - } else { - return isBeforeSpace(pos) || CaretFinder.nextPosition(getClosestBlock(root, pos).dom(), pos).exists(isBeforeSpace); - } - }; - var isPreValue = function (value) { - return contains([ - 'pre', - 'pre-line', - 'pre-wrap' - ], value); - }; - var isInPre = function (pos) { - return getElementFromPosition(pos).bind(function (elm) { - return closest(elm, isElement); - }).exists(function (elm) { - return isPreValue(get$2(elm, 'white-space')); - }); - }; - var isAtBeginningOfBody = function (root, pos) { - return CaretFinder.prevPosition(root.dom(), pos).isNone(); - }; - var isAtEndOfBody = function (root, pos) { - return CaretFinder.nextPosition(root.dom(), pos).isNone(); - }; - var isAtLineBoundary = function (root, pos) { - return isAtBeginningOfBody(root, pos) || isAtEndOfBody(root, pos) || isAtStartOfBlock(root, pos) || isAtEndOfBlock(root, pos) || isAfterBr(root, pos) || isBeforeBr(root, pos); - }; - var needsToHaveNbsp = function (root, pos) { - if (isInPre(pos)) { - return false; - } else { - return isAtLineBoundary(root, pos) || hasSpaceBefore(root, pos) || hasSpaceAfter(root, pos); - } - }; - var needsToBeNbspLeft = function (root, pos) { - if (isInPre(pos)) { - return false; - } else { - return isAtStartOfBlock(root, pos) || isAfterBr(root, pos) || hasSpaceBefore(root, pos); - } - }; - var leanRight = function (pos) { - var container = pos.container(); - var offset = pos.offset(); - if (NodeType.isText(container) && offset < container.data.length) { - return CaretPosition(container, offset + 1); - } else { - return pos; - } - }; - var needsToBeNbspRight = function (root, pos) { - var afterPos = leanRight(pos); - if (isInPre(afterPos)) { - return false; - } else { - return isAtEndOfBlock(root, afterPos) || isBeforeBr(root, afterPos) || hasSpaceAfter(root, afterPos); - } - }; - var needsToBeNbsp = function (root, pos) { - return needsToBeNbspLeft(root, pos) || needsToBeNbspRight(root, pos); - }; - var isNbspAt = function (text, offset) { - return isNbsp(text.charAt(offset)); - }; - var hasNbsp = function (pos) { - var container = pos.container(); - return NodeType.isText(container) && contains$2(container.data, nbsp); - }; - var normalizeNbspMiddle = function (text) { - return map(text.split(''), function (chr, i, chars) { - if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent(chars[i - 1]) && isContent(chars[i + 1])) { - return ' '; - } else { - return chr; - } - }).join(''); - }; - var normalizeNbspAtStart = function (root, node) { - var text = node.data; - var firstPos = CaretPosition(node, 0); - if (isNbspAt(text, 0) && !needsToBeNbsp(root, firstPos)) { - node.data = ' ' + text.slice(1); - return true; - } else { - return false; - } - }; - var normalizeNbspInMiddleOfTextNode = function (node) { - var text = node.data; - var newText = normalizeNbspMiddle(text); - if (newText !== text) { - node.data = newText; - return true; - } else { - return false; - } - }; - var normalizeNbspAtEnd = function (root, node) { - var text = node.data; - var lastPos = CaretPosition(node, text.length - 1); - if (isNbspAt(text, text.length - 1) && !needsToBeNbsp(root, lastPos)) { - node.data = text.slice(0, -1) + ' '; - return true; - } else { - return false; - } - }; - var normalizeNbsps = function (root, pos) { - return Option.some(pos).filter(hasNbsp).bind(function (pos) { - var container = pos.container(); - var normalized = normalizeNbspAtStart(root, container) || normalizeNbspInMiddleOfTextNode(container) || normalizeNbspAtEnd(root, container); - return normalized ? Option.some(pos) : Option.none(); - }); - }; - var normalizeNbspsInEditor = function (editor) { - var root = Element.fromDom(editor.getBody()); - if (editor.selection.isCollapsed()) { - normalizeNbsps(root, CaretPosition.fromRangeStart(editor.selection.getRng())).each(function (pos) { - editor.selection.setRng(pos.toRange()); - }); - } - }; - - var locationToCaretPosition = function (root) { - return function (location) { - return location.fold(function (element) { - return CaretFinder.prevPosition(root.dom(), CaretPosition$1.before(element)); - }, function (element) { - return CaretFinder.firstPositionIn(element); - }, function (element) { - return CaretFinder.lastPositionIn(element); - }, function (element) { - return CaretFinder.nextPosition(root.dom(), CaretPosition$1.after(element)); - }); - }; - }; - var insertInlineBoundarySpaceOrNbsp = function (root, pos) { - return function (checkPos) { - return needsToHaveNbsp(root, checkPos) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos); - }; - }; - var setSelection$1 = function (editor) { - return function (pos) { - editor.selection.setRng(pos.toRange()); - editor.nodeChanged(); - return true; - }; - }; - var insertSpaceOrNbspAtSelection = function (editor) { - var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - var root = Element.fromDom(editor.getBody()); - if (editor.selection.isCollapsed()) { - var isInlineTarget = curry(InlineUtils.isInlineTarget, editor); - var caretPosition = CaretPosition$1.fromRangeStart(editor.selection.getRng()); - return BoundaryLocation.readLocation(isInlineTarget, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).exists(setSelection$1(editor)); - } else { - return false; - } - }; - - var executeKeydownOverride$2 = function (editor, evt) { - MatchKeys.execute([{ - keyCode: VK.SPACEBAR, - action: MatchKeys.action(insertSpaceOrNbspAtSelection, editor) - }], evt).each(function (_) { - evt.preventDefault(); - }); - }; - var setup$a = function (editor) { - editor.on('keydown', function (evt) { - if (evt.isDefaultPrevented() === false) { - executeKeydownOverride$2(editor, evt); - } - }); - }; - var SpaceKey = { setup: setup$a }; - - var findBlockCaretContainer = function (editor) { - return descendant(Element.fromDom(editor.getBody()), '*[data-mce-caret]').fold(constant(null), function (elm) { - return elm.dom(); - }); - }; - var removeIeControlRect = function (editor) { - editor.selection.setRng(editor.selection.getRng()); - }; - var showBlockCaretContainer = function (editor, blockCaretContainer) { - if (blockCaretContainer.hasAttribute('data-mce-caret')) { - showCaretContainerBlock(blockCaretContainer); - removeIeControlRect(editor); - editor.selection.scrollIntoView(blockCaretContainer); - } - }; - var handleBlockContainer = function (editor, e) { - var blockCaretContainer = findBlockCaretContainer(editor); - if (!blockCaretContainer) { - return; - } - if (e.type === 'compositionstart') { - e.preventDefault(); - e.stopPropagation(); - showBlockCaretContainer(editor, blockCaretContainer); - return; - } - if (hasContent(blockCaretContainer)) { - showBlockCaretContainer(editor, blockCaretContainer); - editor.undoManager.add(); - } - }; - var setup$b = function (editor) { - editor.on('keyup compositionstart', curry(handleBlockContainer, editor)); - }; - var CaretContainerInput = { setup: setup$b }; - - var browser$4 = PlatformDetection$1.detect().browser; - var setupIeInput = function (editor) { - var keypressThrotter = first(function () { - if (!editor.composing) { - normalizeNbspsInEditor(editor); - } - }, 0); - if (browser$4.isIE()) { - editor.on('keypress', function (e) { - keypressThrotter.throttle(); - }); - editor.on('remove', function (e) { - keypressThrotter.cancel(); - }); - } - }; - var setup$c = function (editor) { - setupIeInput(editor); - editor.on('input', function (e) { - if (e.isComposing === false) { - normalizeNbspsInEditor(editor); - } - }); - }; - - var executeKeydownOverride$3 = function (editor, evt) { - MatchKeys.execute([ - { - keyCode: VK.END, - action: moveToLineEndPoint(editor, true) - }, - { - keyCode: VK.HOME, - action: moveToLineEndPoint(editor, false) - } - ], evt).each(function (_) { - evt.preventDefault(); - }); - }; - var setup$d = function (editor) { - editor.on('keydown', function (evt) { - if (evt.isDefaultPrevented() === false) { - executeKeydownOverride$3(editor, evt); - } - }); - }; - var HomeEndKeys = { setup: setup$d }; - - var setup$e = function (editor) { - var caret = BoundarySelection.setupSelectedState(editor); - CaretContainerInput.setup(editor); - ArrowKeys.setup(editor, caret); - DeleteBackspaceKeys.setup(editor, caret); - EnterKey.setup(editor); - SpaceKey.setup(editor); - setup$c(editor); - HomeEndKeys.setup(editor); - }; - var KeyboardOverrides = { setup: setup$e }; - - var Quirks = function (editor) { - var each = Tools.each; - var BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, settings = editor.settings, parser = editor.parser; - var isGecko = Env.gecko, isIE = Env.ie, isWebKit = Env.webkit; - var mceInternalUrlPrefix = 'data:text/mce-internal,'; - var mceInternalDataType = isIE ? 'Text' : 'URL'; - var setEditorCommandState = function (cmd, state) { - try { - editor.getDoc().execCommand(cmd, false, state); - } catch (ex) { - } - }; - var isDefaultPrevented = function (e) { - return e.isDefaultPrevented(); - }; - var setMceInternalContent = function (e) { - var selectionHtml, internalContent; - if (e.dataTransfer) { - if (editor.selection.isCollapsed() && e.target.tagName === 'IMG') { - selection.select(e.target); - } - selectionHtml = editor.selection.getContent(); - if (selectionHtml.length > 0) { - internalContent = mceInternalUrlPrefix + escape(editor.id) + ',' + escape(selectionHtml); - e.dataTransfer.setData(mceInternalDataType, internalContent); - } - } - }; - var getMceInternalContent = function (e) { - var internalContent; - if (e.dataTransfer) { - internalContent = e.dataTransfer.getData(mceInternalDataType); - if (internalContent && internalContent.indexOf(mceInternalUrlPrefix) >= 0) { - internalContent = internalContent.substr(mceInternalUrlPrefix.length).split(','); - return { - id: unescape(internalContent[0]), - html: unescape(internalContent[1]) - }; - } - } - return null; - }; - var insertClipboardContents = function (content, internal) { - if (editor.queryCommandSupported('mceInsertClipboardContent')) { - editor.execCommand('mceInsertClipboardContent', false, { - content: content, - internal: internal - }); - } else { - editor.execCommand('mceInsertContent', false, content); - } - }; - var emptyEditorWhenDeleting = function () { - var serializeRng = function (rng) { - var body = dom.create('body'); - var contents = rng.cloneContents(); - body.appendChild(contents); - return selection.serializer.serialize(body, { format: 'html' }); - }; - var allContentsSelected = function (rng) { - var selection = serializeRng(rng); - var allRng = dom.createRng(); - allRng.selectNode(editor.getBody()); - var allSelection = serializeRng(allRng); - return selection === allSelection; - }; - editor.on('keydown', function (e) { - var keyCode = e.keyCode; - var isCollapsed, body; - if (!isDefaultPrevented(e) && (keyCode === DELETE || keyCode === BACKSPACE)) { - isCollapsed = editor.selection.isCollapsed(); - body = editor.getBody(); - if (isCollapsed && !dom.isEmpty(body)) { - return; - } - if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) { - return; - } - e.preventDefault(); - editor.setContent(''); - if (body.firstChild && dom.isBlock(body.firstChild)) { - editor.selection.setCursorLocation(body.firstChild, 0); - } else { - editor.selection.setCursorLocation(body, 0); - } - editor.nodeChanged(); - } - }); - }; - var selectAll = function () { - editor.shortcuts.add('meta+a', null, 'SelectAll'); - }; - var inputMethodFocus = function () { - if (!editor.inline) { - dom.bind(editor.getDoc(), 'mousedown mouseup', function (e) { - var rng; - if (e.target === editor.getDoc().documentElement) { - rng = selection.getRng(); - editor.getBody().focus(); - if (e.type === 'mousedown') { - if (isCaretContainer(rng.startContainer)) { - return; - } - selection.placeCaretAt(e.clientX, e.clientY); - } else { - selection.setRng(rng); - } - } - }); - } - }; - var removeHrOnBackspace = function () { - editor.on('keydown', function (e) { - if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) { - if (!editor.getBody().getElementsByTagName('hr').length) { - return; - } - if (selection.isCollapsed() && selection.getRng().startOffset === 0) { - var node = selection.getNode(); - var previousSibling = node.previousSibling; - if (node.nodeName === 'HR') { - dom.remove(node); - e.preventDefault(); - return; - } - if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'hr') { - dom.remove(previousSibling); - e.preventDefault(); - } - } - } - }); - }; - var focusBody = function () { - if (!domGlobals.Range.prototype.getClientRects) { - editor.on('mousedown', function (e) { - if (!isDefaultPrevented(e) && e.target.nodeName === 'HTML') { - var body_1 = editor.getBody(); - body_1.blur(); - Delay.setEditorTimeout(editor, function () { - body_1.focus(); - }); - } - }); - } - }; - var selectControlElements = function () { - editor.on('click', function (e) { - var target = e.target; - if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== 'false') { - e.preventDefault(); - editor.selection.select(target); - editor.nodeChanged(); - } - if (target.nodeName === 'A' && dom.hasClass(target, 'mce-item-anchor')) { - e.preventDefault(); - selection.select(target); - } - }); - }; - var removeStylesWhenDeletingAcrossBlockElements = function () { - var getAttributeApplyFunction = function () { - var template = dom.getAttribs(selection.getStart().cloneNode(false)); - return function () { - var target = selection.getStart(); - if (target !== editor.getBody()) { - dom.setAttrib(target, 'style', null); - each(template, function (attr) { - target.setAttributeNode(attr.cloneNode(true)); - }); - } - }; - }; - var isSelectionAcrossElements = function () { - return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) !== dom.getParent(selection.getEnd(), dom.isBlock); - }; - editor.on('keypress', function (e) { - var applyAttributes; - if (!isDefaultPrevented(e) && (e.keyCode === 8 || e.keyCode === 46) && isSelectionAcrossElements()) { - applyAttributes = getAttributeApplyFunction(); - editor.getDoc().execCommand('delete', false, null); - applyAttributes(); - e.preventDefault(); - return false; - } - }); - dom.bind(editor.getDoc(), 'cut', function (e) { - var applyAttributes; - if (!isDefaultPrevented(e) && isSelectionAcrossElements()) { - applyAttributes = getAttributeApplyFunction(); - Delay.setEditorTimeout(editor, function () { - applyAttributes(); - }); - } - }); - }; - var disableBackspaceIntoATable = function () { - editor.on('keydown', function (e) { - if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) { - if (selection.isCollapsed() && selection.getRng().startOffset === 0) { - var previousSibling = selection.getNode().previousSibling; - if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'table') { - e.preventDefault(); - return false; - } - } - } - }); - }; - var removeBlockQuoteOnBackSpace = function () { - editor.on('keydown', function (e) { - var rng, container, offset, root, parent; - if (isDefaultPrevented(e) || e.keyCode !== VK.BACKSPACE) { - return; - } - rng = selection.getRng(); - container = rng.startContainer; - offset = rng.startOffset; - root = dom.getRoot(); - parent = container; - if (!rng.collapsed || offset !== 0) { - return; - } - while (parent && parent.parentNode && parent.parentNode.firstChild === parent && parent.parentNode !== root) { - parent = parent.parentNode; - } - if (parent.tagName === 'BLOCKQUOTE') { - editor.formatter.toggle('blockquote', null, parent); - rng = dom.createRng(); - rng.setStart(container, 0); - rng.setEnd(container, 0); - selection.setRng(rng); - } - }); - }; - var setGeckoEditingOptions = function () { - var setOpts = function () { - setEditorCommandState('StyleWithCSS', false); - setEditorCommandState('enableInlineTableEditing', false); - if (!settings.object_resizing) { - setEditorCommandState('enableObjectResizing', false); - } - }; - if (!settings.readonly) { - editor.on('BeforeExecCommand mousedown', setOpts); - } - }; - var addBrAfterLastLinks = function () { - var fixLinks = function () { - each(dom.select('a'), function (node) { - var parentNode = node.parentNode; - var root = dom.getRoot(); - if (parentNode.lastChild === node) { - while (parentNode && !dom.isBlock(parentNode)) { - if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) { - return; - } - parentNode = parentNode.parentNode; - } - dom.add(parentNode, 'br', { 'data-mce-bogus': 1 }); - } - }); - }; - editor.on('SetContent ExecCommand', function (e) { - if (e.type === 'setcontent' || e.command === 'mceInsertLink') { - fixLinks(); - } - }); - }; - var setDefaultBlockType = function () { - if (settings.forced_root_block) { - editor.on('init', function () { - setEditorCommandState('DefaultParagraphSeparator', Settings.getForcedRootBlock(editor)); - }); - } - }; - var normalizeSelection = function () { - editor.on('keyup focusin mouseup', function (e) { - if (!VK.modifierPressed(e)) { - selection.normalize(); - } - }, true); - }; - var showBrokenImageIcon = function () { - editor.contentStyles.push('img:-moz-broken {' + '-moz-force-broken-image-icon:1;' + 'min-width:24px;' + 'min-height:24px' + '}'); - }; - var restoreFocusOnKeyDown = function () { - if (!editor.inline) { - editor.on('keydown', function () { - if (domGlobals.document.activeElement === domGlobals.document.body) { - editor.getWin().focus(); - } - }); - } - }; - var bodyHeight = function () { - if (!editor.inline) { - editor.contentStyles.push('body {min-height: 150px}'); - editor.on('click', function (e) { - var rng; - if (e.target.nodeName === 'HTML') { - if (Env.ie > 11) { - editor.getBody().focus(); - return; - } - rng = editor.selection.getRng(); - editor.getBody().focus(); - editor.selection.setRng(rng); - editor.selection.normalize(); - editor.nodeChanged(); - } - }); - } - }; - var blockCmdArrowNavigation = function () { - if (Env.mac) { - editor.on('keydown', function (e) { - if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode === 37 || e.keyCode === 39)) { - e.preventDefault(); - var selection_1 = editor.selection.getSel(); - selection_1.modify('move', e.keyCode === 37 ? 'backward' : 'forward', 'lineboundary'); - } - }); - } - }; - var disableAutoUrlDetect = function () { - setEditorCommandState('AutoUrlDetect', false); - }; - var tapLinksAndImages = function () { - editor.on('click', function (e) { - var elm = e.target; - do { - if (elm.tagName === 'A') { - e.preventDefault(); - return; - } - } while (elm = elm.parentNode); - }); - editor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}'); - }; - var blockFormSubmitInsideEditor = function () { - editor.on('init', function () { - editor.dom.bind(editor.getBody(), 'submit', function (e) { - e.preventDefault(); - }); - }); - }; - var removeAppleInterchangeBrs = function () { - parser.addNodeFilter('br', function (nodes) { - var i = nodes.length; - while (i--) { - if (nodes[i].attr('class') === 'Apple-interchange-newline') { - nodes[i].remove(); - } - } - }); - }; - var ieInternalDragAndDrop = function () { - editor.on('dragstart', function (e) { - setMceInternalContent(e); - }); - editor.on('drop', function (e) { - if (!isDefaultPrevented(e)) { - var internalContent = getMceInternalContent(e); - if (internalContent && internalContent.id !== editor.id) { - e.preventDefault(); - var rng = CaretRangeFromPoint.fromPoint(e.x, e.y, editor.getDoc()); - selection.setRng(rng); - insertClipboardContents(internalContent.html, true); - } - } - }); - }; - var refreshContentEditable = function () { - }; - var isHidden = function () { - var sel; - if (!isGecko || editor.removed) { - return false; - } - sel = editor.selection.getSel(); - return !sel || !sel.rangeCount || sel.rangeCount === 0; - }; - removeBlockQuoteOnBackSpace(); - emptyEditorWhenDeleting(); - if (!Env.windowsPhone) { - normalizeSelection(); - } - if (isWebKit) { - inputMethodFocus(); - selectControlElements(); - setDefaultBlockType(); - blockFormSubmitInsideEditor(); - disableBackspaceIntoATable(); - removeAppleInterchangeBrs(); - if (Env.iOS) { - restoreFocusOnKeyDown(); - bodyHeight(); - tapLinksAndImages(); - } else { - selectAll(); - } - } - if (Env.ie >= 11) { - bodyHeight(); - disableBackspaceIntoATable(); - } - if (Env.ie) { - selectAll(); - disableAutoUrlDetect(); - ieInternalDragAndDrop(); - } - if (isGecko) { - removeHrOnBackspace(); - focusBody(); - removeStylesWhenDeletingAcrossBlockElements(); - setGeckoEditingOptions(); - addBrAfterLastLinks(); - showBrokenImageIcon(); - blockCmdArrowNavigation(); - disableBackspaceIntoATable(); - } - return { - refreshContentEditable: refreshContentEditable, - isHidden: isHidden - }; - }; - - var isTextBlockNode = function (node) { - return NodeType.isElement(node) && isTextBlock(Element.fromDom(node)); - }; - var normalizeSelection$1 = function (editor) { - var rng = editor.selection.getRng(); - var startPos = CaretPosition.fromRangeStart(rng); - var endPos = CaretPosition.fromRangeEnd(rng); - if (CaretPosition.isElementPosition(startPos)) { - var container = startPos.container(); - if (isTextBlockNode(container)) { - CaretFinder.firstPositionIn(container).each(function (pos) { - return rng.setStart(pos.container(), pos.offset()); - }); - } - } - if (CaretPosition.isElementPosition(endPos)) { - var container = startPos.container(); - if (isTextBlockNode(container)) { - CaretFinder.lastPositionIn(container).each(function (pos) { - return rng.setEnd(pos.container(), pos.offset()); - }); - } - } - editor.selection.setRng(RangeNormalizer.normalize(rng)); - }; - var setup$f = function (editor) { - editor.on('click', function (e) { - if (e.detail >= 3) { - normalizeSelection$1(editor); - } - }); - }; - - var preventSummaryToggle = function (editor) { - editor.on('click', function (e) { - if (editor.dom.getParent(e.target, 'details')) { - e.preventDefault(); - } - }); - }; - var filterDetails = function (editor) { - editor.parser.addNodeFilter('details', function (elms) { - each(elms, function (details) { - details.attr('data-mce-open', details.attr('open')); - details.attr('open', 'open'); - }); - }); - editor.serializer.addNodeFilter('details', function (elms) { - each(elms, function (details) { - var open = details.attr('data-mce-open'); - details.attr('open', isString(open) ? open : null); - details.attr('data-mce-open', null); - }); - }); - }; - var setup$g = function (editor) { - preventSummaryToggle(editor); - filterDetails(editor); - }; - - var DOM$2 = DOMUtils$1.DOM; - var appendStyle = function (editor, text) { - var head = Element.fromDom(editor.getDoc().head); - var tag = Element.fromTag('style'); - set(tag, 'type', 'text/css'); - append(tag, Element.fromText(text)); - append(head, tag); - }; - var createParser = function (editor) { - var parser = DomParser(editor.settings, editor.schema); - parser.addAttributeFilter('src,href,style,tabindex', function (nodes, name) { - var i = nodes.length, node; - var dom = editor.dom; - var value, internalName; - while (i--) { - node = nodes[i]; - value = node.attr(name); - internalName = 'data-mce-' + name; - if (!node.attr(internalName)) { - if (value.indexOf('data:') === 0 || value.indexOf('blob:') === 0) { - continue; - } - if (name === 'style') { - value = dom.serializeStyle(dom.parseStyle(value), node.name); - if (!value.length) { - value = null; - } - node.attr(internalName, value); - node.attr(name, value); - } else if (name === 'tabindex') { - node.attr(internalName, value); - node.attr(name, null); - } else { - node.attr(internalName, editor.convertURL(value, name, node.name)); - } - } - } - }); - parser.addNodeFilter('script', function (nodes) { - var i = nodes.length, node, type; - while (i--) { - node = nodes[i]; - type = node.attr('type') || 'no/type'; - if (type.indexOf('mce-') !== 0) { - node.attr('type', 'mce-' + type); - } - } - }); - parser.addNodeFilter('#cdata', function (nodes) { - var i = nodes.length, node; - while (i--) { - node = nodes[i]; - node.type = 8; - node.name = '#comment'; - node.value = '[CDATA[' + node.value + ']]'; - } - }); - parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function (nodes) { - var i = nodes.length, node; - var nonEmptyElements = editor.schema.getNonEmptyElements(); - while (i--) { - node = nodes[i]; - if (node.isEmpty(nonEmptyElements) && node.getAll('br').length === 0) { - node.append(new Node$1('br', 1)).shortEnded = true; - } - } - }); - return parser; - }; - var autoFocus = function (editor) { - if (editor.settings.auto_focus) { - Delay.setEditorTimeout(editor, function () { - var focusEditor; - if (editor.settings.auto_focus === true) { - focusEditor = editor; - } else { - focusEditor = editor.editorManager.get(editor.settings.auto_focus); - } - if (!focusEditor.destroyed) { - focusEditor.focus(); - } - }, 100); - } - }; - var initEditor = function (editor) { - editor.bindPendingEventDelegates(); - editor.initialized = true; - editor.fire('init'); - editor.focus(true); - editor.nodeChanged({ initial: true }); - editor.execCallback('init_instance_callback', editor); - autoFocus(editor); - }; - var getStyleSheetLoader = function (editor) { - return editor.inline ? DOM$2.styleSheetLoader : editor.dom.styleSheetLoader; - }; - var initContentBody = function (editor, skipWrite) { - var settings = editor.settings; - var targetElm = editor.getElement(); - var doc = editor.getDoc(), body, contentCssText; - if (!settings.inline) { - editor.getElement().style.visibility = editor.orgVisibility; - } - if (!skipWrite && !editor.inline) { - doc.open(); - doc.write(editor.iframeHTML); - doc.close(); - } - if (editor.inline) { - editor.on('remove', function () { - var bodyEl = this.getBody(); - DOM$2.removeClass(bodyEl, 'mce-content-body'); - DOM$2.removeClass(bodyEl, 'mce-edit-focus'); - DOM$2.setAttrib(bodyEl, 'contentEditable', null); - }); - DOM$2.addClass(targetElm, 'mce-content-body'); - editor.contentDocument = doc = settings.content_document || domGlobals.document; - editor.contentWindow = settings.content_window || domGlobals.window; - editor.bodyElement = targetElm; - editor.contentAreaContainer = targetElm; - settings.content_document = settings.content_window = null; - settings.root_name = targetElm.nodeName.toLowerCase(); - } - body = editor.getBody(); - body.disabled = true; - editor.readonly = settings.readonly; - if (!editor.readonly) { - if (editor.inline && DOM$2.getStyle(body, 'position', true) === 'static') { - body.style.position = 'relative'; - } - body.contentEditable = editor.getParam('content_editable_state', true); - } - body.disabled = false; - editor.editorUpload = EditorUpload(editor); - editor.schema = Schema(settings); - editor.dom = DOMUtils$1(doc, { - keep_values: true, - url_converter: editor.convertURL, - url_converter_scope: editor, - hex_colors: settings.force_hex_style_colors, - update_styles: true, - root_element: editor.inline ? editor.getBody() : null, - collect: function () { - return editor.inline; - }, - schema: editor.schema, - contentCssCors: Settings.shouldUseContentCssCors(editor), - onSetAttrib: function (e) { - editor.fire('SetAttrib', e); - } - }); - editor.parser = createParser(editor); - editor.serializer = Serializer$1(settings, editor); - editor.selection = Selection(editor.dom, editor.getWin(), editor.serializer, editor); - editor.annotator = Annotator(editor); - editor.formatter = Formatter(editor); - editor.undoManager = UndoManager(editor); - editor._nodeChangeDispatcher = new NodeChange(editor); - editor._selectionOverrides = SelectionOverrides(editor); - setup$g(editor); - setup$f(editor); - KeyboardOverrides.setup(editor); - ForceBlocks.setup(editor); - editor.fire('PreInit'); - if (!settings.browser_spellcheck && !settings.gecko_spellcheck) { - doc.body.spellcheck = false; - DOM$2.setAttrib(body, 'spellcheck', 'false'); - } - editor.quirks = Quirks(editor); - editor.fire('PostRender'); - if (settings.directionality) { - body.dir = settings.directionality; - } - if (settings.protect) { - editor.on('BeforeSetContent', function (e) { - Tools.each(settings.protect, function (pattern) { - e.content = e.content.replace(pattern, function (str) { - return ''; - }); - }); - }); - } - editor.on('SetContent', function () { - editor.addVisual(editor.getBody()); - }); - editor.load({ - initial: true, - format: 'html' - }); - editor.startContent = editor.getContent({ format: 'raw' }); - editor.on('compositionstart compositionend', function (e) { - editor.composing = e.type === 'compositionstart'; - }); - if (editor.contentStyles.length > 0) { - contentCssText = ''; - Tools.each(editor.contentStyles, function (style) { - contentCssText += style + '\r\n'; - }); - editor.dom.addStyle(contentCssText); - } - getStyleSheetLoader(editor).loadAll(editor.contentCSS, function (_) { - initEditor(editor); - }, function (urls) { - initEditor(editor); - }); - if (settings.content_style) { - appendStyle(editor, settings.content_style); - } - }; - var InitContentBody = { initContentBody: initContentBody }; - - var DOM$3 = DOMUtils$1.DOM; - var relaxDomain = function (editor, ifr) { - if (domGlobals.document.domain !== domGlobals.window.location.hostname && Env.ie && Env.ie < 12) { - var bodyUuid = Uuid.uuid('mce'); - editor[bodyUuid] = function () { - InitContentBody.initContentBody(editor); - }; - var domainRelaxUrl = 'javascript:(function(){' + 'document.open();document.domain="' + domGlobals.document.domain + '";' + 'var ed = window.parent.tinymce.get("' + editor.id + '");document.write(ed.iframeHTML);' + 'document.close();ed.' + bodyUuid + '(true);})()'; - DOM$3.setAttrib(ifr, 'src', domainRelaxUrl); - return true; - } - return false; - }; - var createIframeElement = function (id, title, height, customAttrs) { - var iframe = Element.fromTag('iframe'); - setAll(iframe, customAttrs); - setAll(iframe, { - id: id + '_ifr', - frameBorder: '0', - allowTransparency: 'true', - title: title - }); - add$3(iframe, 'tox-edit-area__iframe'); - return iframe; - }; - var getIframeHtml = function (editor) { - var bodyId, bodyClass, iframeHTML; - iframeHTML = Settings.getDocType(editor) + ''; - if (Settings.getDocumentBaseUrl(editor) !== editor.documentBaseUrl) { - iframeHTML += ''; - } - iframeHTML += ''; - bodyId = Settings.getBodyId(editor); - bodyClass = Settings.getBodyClass(editor); - if (Settings.getContentSecurityPolicy(editor)) { - iframeHTML += ''; - } - iframeHTML += '
'; - return iframeHTML; - }; - var createIframe = function (editor, o) { - var title = editor.editorManager.translate('Rich Text Area. Press ALT-0 for help.'); - var ifr = createIframeElement(editor.id, title, o.height, Settings.getIframeAttrs(editor)).dom(); - ifr.onload = function () { - ifr.onload = null; - editor.fire('load'); - }; - var isDomainRelaxed = relaxDomain(editor, ifr); - editor.contentAreaContainer = o.iframeContainer; - editor.iframeElement = ifr; - editor.iframeHTML = getIframeHtml(editor); - DOM$3.add(o.iframeContainer, ifr); - return isDomainRelaxed; - }; - var init$1 = function (editor, boxInfo) { - var isDomainRelaxed = createIframe(editor, boxInfo); - if (boxInfo.editorContainer) { - DOM$3.get(boxInfo.editorContainer).style.display = editor.orgDisplay; - editor.hidden = DOM$3.isHidden(boxInfo.editorContainer); - } - editor.getElement().style.display = 'none'; - DOM$3.setAttrib(editor.id, 'aria-hidden', 'true'); - if (!isDomainRelaxed) { - InitContentBody.initContentBody(editor); - } - }; - var InitIframe = { init: init$1 }; - - var isContentCssSkinName = function (url) { - return /^[a-z0-9\-]+$/i.test(url); - }; - var getContentCssUrls = function (editor) { - var contentCss = Settings.getContentCss(editor); - var skinUrl = editor.editorManager.baseURL + '/skins/content'; - var suffix = editor.editorManager.suffix; - var contentCssFile = 'content' + suffix + '.css'; - var inline = editor.inline === true; - return map(contentCss, function (url) { - if (isContentCssSkinName(url) && !inline) { - return skinUrl + '/' + url + '/' + contentCssFile; - } else { - return editor.documentBaseURI.toAbsolute(url); - } - }); - }; - var appendContentCssFromSettings = function (editor) { - editor.contentCSS = editor.contentCSS.concat(getContentCssUrls(editor)); - }; - - var DOM$4 = DOMUtils$1.DOM; - var initPlugin = function (editor, initializedPlugins, plugin) { - var Plugin = PluginManager$1.get(plugin); - var pluginUrl = PluginManager$1.urls[plugin] || editor.documentBaseUrl.replace(/\/$/, ''); - plugin = Tools.trim(plugin); - if (Plugin && Tools.inArray(initializedPlugins, plugin) === -1) { - Tools.each(PluginManager$1.dependencies(plugin), function (dep) { - initPlugin(editor, initializedPlugins, dep); - }); - if (editor.plugins[plugin]) { - return; - } - try { - var pluginInstance = new Plugin(editor, pluginUrl, editor.$); - editor.plugins[plugin] = pluginInstance; - if (pluginInstance.init) { - pluginInstance.init(editor, pluginUrl); - initializedPlugins.push(plugin); - } - } catch (e) { - ErrorReporter.pluginInitError(editor, plugin, e); - } - } - }; - var trimLegacyPrefix = function (name) { - return name.replace(/^\-/, ''); - }; - var initPlugins = function (editor) { - var initializedPlugins = []; - Tools.each(editor.settings.plugins.split(/[ ,]/), function (name) { - initPlugin(editor, initializedPlugins, trimLegacyPrefix(name)); - }); - }; - var initIcons = function (editor) { - var iconPackName = Tools.trim(editor.settings.icons); - var currentIcons = editor.ui.registry.getAll().icons; - var defaultIcons = getAll(); - var loadIcons = __assign({}, defaultIcons, IconManager.get(iconPackName).icons); - each$3(loadIcons, function (svgData, icon) { - if (!has(currentIcons, icon)) { - editor.ui.registry.addIcon(icon, svgData); - } - }); - }; - var initTheme = function (editor) { - var theme = editor.settings.theme; - if (isString(theme)) { - editor.settings.theme = trimLegacyPrefix(theme); - var Theme = ThemeManager.get(theme); - editor.theme = new Theme(editor, ThemeManager.urls[theme]); - if (editor.theme.init) { - editor.theme.init(editor, ThemeManager.urls[theme] || editor.documentBaseUrl.replace(/\/$/, ''), editor.$); - } - } else { - editor.theme = {}; - } - }; - var renderFromLoadedTheme = function (editor) { - return editor.theme.renderUI(); - }; - var renderFromThemeFunc = function (editor) { - var elm = editor.getElement(); - var theme = editor.settings.theme; - var info = theme(editor, elm); - if (info.editorContainer.nodeType) { - info.editorContainer.id = info.editorContainer.id || editor.id + '_parent'; - } - if (info.iframeContainer && info.iframeContainer.nodeType) { - info.iframeContainer.id = info.iframeContainer.id || editor.id + '_iframecontainer'; - } - info.height = info.iframeHeight ? info.iframeHeight : elm.offsetHeight; - return info; - }; - var createThemeFalseResult = function (element) { - return { - editorContainer: element, - iframeContainer: element - }; - }; - var renderThemeFalseIframe = function (targetElement) { - var iframeContainer = DOM$4.create('div'); - DOM$4.insertAfter(iframeContainer, targetElement); - return createThemeFalseResult(iframeContainer); - }; - var renderThemeFalse = function (editor) { - var targetElement = editor.getElement(); - return editor.inline ? createThemeFalseResult(null) : renderThemeFalseIframe(targetElement); - }; - var renderThemeUi = function (editor) { - var elm = editor.getElement(); - editor.orgDisplay = elm.style.display; - if (isString(editor.settings.theme)) { - return renderFromLoadedTheme(editor); - } else if (isFunction(editor.settings.theme)) { - return renderFromThemeFunc(editor); - } else { - return renderThemeFalse(editor); - } - }; - var init$2 = function (editor) { - editor.fire('ScriptsLoaded'); - initIcons(editor); - initTheme(editor); - initPlugins(editor); - var boxInfo = renderThemeUi(editor); - editor.editorContainer = boxInfo.editorContainer ? boxInfo.editorContainer : null; - appendContentCssFromSettings(editor); - if (editor.inline) { - return InitContentBody.initContentBody(editor); - } else { - return InitIframe.init(editor, boxInfo); - } - }; - var Init = { init: init$2 }; - - var DOM$5 = DOMUtils$1.DOM; - var hasSkipLoadPrefix = function (name) { - return name.charAt(0) === '-'; - }; - var loadLanguage = function (scriptLoader, editor) { - var languageCode = Settings.getLanguageCode(editor); - var languageUrl = Settings.getLanguageUrl(editor); - if (I18n.hasCode(languageCode) === false && languageCode !== 'en') { - if (languageUrl !== '') { - scriptLoader.add(languageUrl); - } else { - scriptLoader.add(editor.editorManager.baseURL + '/langs/' + languageCode + '.js'); - } - } - }; - var loadTheme = function (scriptLoader, editor, suffix, callback) { - var settings = editor.settings, theme = settings.theme; - if (isString(theme)) { - if (!hasSkipLoadPrefix(theme) && !ThemeManager.urls.hasOwnProperty(theme)) { - var themeUrl = settings.theme_url; - if (themeUrl) { - ThemeManager.load(theme, editor.documentBaseURI.toAbsolute(themeUrl)); - } else { - ThemeManager.load(theme, 'themes/' + theme + '/theme' + suffix + '.js'); - } - } - scriptLoader.loadQueue(function () { - ThemeManager.waitFor(theme, callback); - }); - } else { - callback(); - } - }; - var loadIcons = function (editor) { - var iconPackName = Tools.trim(editor.getParam('icons', '', 'string')); - if (iconPackName.length > 0 && !IconManager.has(iconPackName)) { - var urlString = editor.editorManager.baseURL + '/icons/' + iconPackName + '/icons.js'; - ScriptLoader.ScriptLoader.add(urlString); - } - }; - var loadPlugins = function (settings, suffix) { - if (Tools.isArray(settings.plugins)) { - settings.plugins = settings.plugins.join(' '); - } - Tools.each(settings.external_plugins, function (url, name) { - PluginManager$1.load(name, url); - settings.plugins += ' ' + name; - }); - Tools.each(settings.plugins.split(/[ ,]/), function (plugin) { - plugin = Tools.trim(plugin); - if (plugin && !PluginManager$1.urls[plugin]) { - if (hasSkipLoadPrefix(plugin)) { - plugin = plugin.substr(1, plugin.length); - var dependencies = PluginManager$1.dependencies(plugin); - Tools.each(dependencies, function (dep) { - var defaultSettings = { - prefix: 'plugins/', - resource: dep, - suffix: '/plugin' + suffix + '.js' - }; - dep = PluginManager$1.createUrl(defaultSettings, dep); - PluginManager$1.load(dep.resource, dep); - }); - } else { - PluginManager$1.load(plugin, { - prefix: 'plugins/', - resource: plugin, - suffix: '/plugin' + suffix + '.js' - }); - } - } - }); - }; - var loadScripts = function (editor, suffix) { - var scriptLoader = ScriptLoader.ScriptLoader; - loadTheme(scriptLoader, editor, suffix, function () { - loadLanguage(scriptLoader, editor); - loadIcons(editor); - loadPlugins(editor.settings, suffix); - scriptLoader.loadQueue(function () { - if (!editor.removed) { - Init.init(editor); - } - }, editor, function (urls) { - ErrorReporter.pluginLoadError(editor, urls[0]); - if (!editor.removed) { - Init.init(editor); - } - }); - }); - }; - var render = function (editor) { - var settings = editor.settings, id = editor.id; - I18n.setCode(Settings.getLanguageCode(editor)); - var readyHandler = function () { - DOM$5.unbind(domGlobals.window, 'ready', readyHandler); - editor.render(); - }; - if (!EventUtils.Event.domLoaded) { - DOM$5.bind(domGlobals.window, 'ready', readyHandler); - return; - } - if (!editor.getElement()) { - return; - } - if (!Env.contentEditable) { - return; - } - if (!settings.inline) { - editor.orgVisibility = editor.getElement().style.visibility; - editor.getElement().style.visibility = 'hidden'; - } else { - editor.inline = true; - } - var form = editor.getElement().form || DOM$5.getParent(id, 'form'); - if (form) { - editor.formElement = form; - if (settings.hidden_input && !/TEXTAREA|INPUT/i.test(editor.getElement().nodeName)) { - DOM$5.insertAfter(DOM$5.create('input', { - type: 'hidden', - name: id - }), id); - editor.hasHiddenInput = true; - } - editor.formEventDelegate = function (e) { - editor.fire(e.type, e); - }; - DOM$5.bind(form, 'submit reset', editor.formEventDelegate); - editor.on('reset', function () { - editor.resetContent(); - }); - if (settings.submit_patch && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) { - form._mceOldSubmit = form.submit; - form.submit = function () { - editor.editorManager.triggerSave(); - editor.setDirty(false); - return form._mceOldSubmit(form); - }; - } - } - editor.windowManager = WindowManager(editor); - editor.notificationManager = NotificationManager(editor); - if (settings.encoding === 'xml') { - editor.on('GetContent', function (e) { - if (e.save) { - e.content = DOM$5.encode(e.content); - } - }); - } - if (settings.add_form_submit_trigger) { - editor.on('submit', function () { - if (editor.initialized) { - editor.save(); - } - }); - } - if (settings.add_unload_trigger) { - editor._beforeUnload = function () { - if (editor.initialized && !editor.destroyed && !editor.isHidden()) { - editor.save({ - format: 'raw', - no_events: true, - set_dirty: false - }); - } - }; - editor.editorManager.on('BeforeUnload', editor._beforeUnload); - } - editor.editorManager.add(editor); - loadScripts(editor, editor.suffix); - }; - var Render = { render: render }; - - var toggleClass = function (elm, cls, state) { - if (has$2(elm, cls) && state === false) { - remove$4(elm, cls); - } else if (state) { - add$3(elm, cls); - } - }; - var create$3 = function (editor) { - var activeMode = 'design'; - var defaultModes = [ - 'design', - 'readonly' - ]; - var availableModes = { - design: { - activate: noop, - deactivate: noop, - editorReadOnly: false - }, - readonly: { - activate: noop, - deactivate: noop, - editorReadOnly: true - } - }; - var setEditorCommandState = function (cmd, state) { - try { - editor.getDoc().execCommand(cmd, false, state); - } catch (ex) { - } - }; - var toggleReadOnly = function (state) { - toggleClass(Element.fromDom(editor.getBody()), 'mce-content-readonly', state); - if (state) { - editor.selection.controlSelection.hideResizeRect(); - editor.readonly = true; - editor.getBody().contentEditable = 'false'; - } else { - editor.readonly = false; - editor.getBody().contentEditable = 'true'; - setEditorCommandState('StyleWithCSS', false); - setEditorCommandState('enableInlineTableEditing', false); - setEditorCommandState('enableObjectResizing', false); - editor.focus(); - editor.nodeChanged(); - } - }; - var switchToMode = function (mode) { - var oldMode = availableModes[activeMode]; - var newMode = availableModes[mode]; - try { - newMode.activate(); - } catch (e) { - domGlobals.console.error('problem while activating editor mode ' + mode + ':', e); - return; - } - oldMode.deactivate(); - if (oldMode.editorReadOnly !== newMode.editorReadOnly) { - toggleReadOnly(newMode.editorReadOnly); - } - activeMode = mode; - Events.fireSwitchMode(editor, mode); - }; - var set = function (mode) { - if (mode === activeMode) { - return; - } else if (!has(availableModes, mode)) { - throw new Error('Editor mode \'' + mode + '\' is invalid'); - } - if (editor.initialized) { - switchToMode(mode); - } else { - editor.on('init', function () { - return switchToMode(mode); - }); - } - }; - var get = function () { - return activeMode; - }; - var isReadOnly = function () { - return editor.readonly === true; - }; - var register = function (mode, api) { - if (contains(defaultModes, mode)) { - throw new Error('Cannot override default mode ' + mode); - } - availableModes[mode] = __assign({}, api, { - deactivate: function () { - try { - api.deactivate(); - } catch (e) { - domGlobals.console.error('problem while deactivating editor mode ' + mode + ':'); - domGlobals.console.error(e); - } - } - }); - }; - return { - isReadOnly: isReadOnly, - set: set, - get: get, - register: register - }; - }; - - var hasOnlyOneChild$1 = function (node) { - return node.firstChild && node.firstChild === node.lastChild; - }; - var isPaddingNode = function (node) { - return node.name === 'br' || node.value === '\xA0'; - }; - var isPaddedEmptyBlock = function (schema, node) { - var blockElements = schema.getBlockElements(); - return blockElements[node.name] && hasOnlyOneChild$1(node) && isPaddingNode(node.firstChild); - }; - var isEmptyFragmentElement = function (schema, node) { - var nonEmptyElements = schema.getNonEmptyElements(); - return node && (node.isEmpty(nonEmptyElements) || isPaddedEmptyBlock(schema, node)); - }; - var isListFragment = function (schema, fragment) { - var firstChild = fragment.firstChild; - var lastChild = fragment.lastChild; - if (firstChild && firstChild.name === 'meta') { - firstChild = firstChild.next; - } - if (lastChild && lastChild.attr('id') === 'mce_marker') { - lastChild = lastChild.prev; - } - if (isEmptyFragmentElement(schema, lastChild)) { - lastChild = lastChild.prev; - } - if (!firstChild || firstChild !== lastChild) { - return false; - } - return firstChild.name === 'ul' || firstChild.name === 'ol'; - }; - var cleanupDomFragment = function (domFragment) { - var firstChild = domFragment.firstChild; - var lastChild = domFragment.lastChild; - if (firstChild && firstChild.nodeName === 'META') { - firstChild.parentNode.removeChild(firstChild); - } - if (lastChild && lastChild.id === 'mce_marker') { - lastChild.parentNode.removeChild(lastChild); - } - return domFragment; - }; - var toDomFragment = function (dom, serializer, fragment) { - var html = serializer.serialize(fragment); - var domFragment = dom.createFragment(html); - return cleanupDomFragment(domFragment); - }; - var listItems$1 = function (elm) { - return Tools.grep(elm.childNodes, function (child) { - return child.nodeName === 'LI'; - }); - }; - var isPadding = function (node) { - return node.data === '\xA0' || NodeType.isBr(node); - }; - var isListItemPadded = function (node) { - return node && node.firstChild && node.firstChild === node.lastChild && isPadding(node.firstChild); - }; - var isEmptyOrPadded = function (elm) { - return !elm.firstChild || isListItemPadded(elm); - }; - var trimListItems = function (elms) { - return elms.length > 0 && isEmptyOrPadded(elms[elms.length - 1]) ? elms.slice(0, -1) : elms; - }; - var getParentLi = function (dom, node) { - var parentBlock = dom.getParent(node, dom.isBlock); - return parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null; - }; - var isParentBlockLi = function (dom, node) { - return !!getParentLi(dom, node); - }; - var getSplit = function (parentNode, rng) { - var beforeRng = rng.cloneRange(); - var afterRng = rng.cloneRange(); - beforeRng.setStartBefore(parentNode); - afterRng.setEndAfter(parentNode); - return [ - beforeRng.cloneContents(), - afterRng.cloneContents() - ]; - }; - var findFirstIn = function (node, rootNode) { - var caretPos = CaretPosition$1.before(node); - var caretWalker = CaretWalker(rootNode); - var newCaretPos = caretWalker.next(caretPos); - return newCaretPos ? newCaretPos.toRange() : null; - }; - var findLastOf = function (node, rootNode) { - var caretPos = CaretPosition$1.after(node); - var caretWalker = CaretWalker(rootNode); - var newCaretPos = caretWalker.prev(caretPos); - return newCaretPos ? newCaretPos.toRange() : null; - }; - var insertMiddle = function (target, elms, rootNode, rng) { - var parts = getSplit(target, rng); - var parentElm = target.parentNode; - parentElm.insertBefore(parts[0], target); - Tools.each(elms, function (li) { - parentElm.insertBefore(li, target); - }); - parentElm.insertBefore(parts[1], target); - parentElm.removeChild(target); - return findLastOf(elms[elms.length - 1], rootNode); - }; - var insertBefore$1 = function (target, elms, rootNode) { - var parentElm = target.parentNode; - Tools.each(elms, function (elm) { - parentElm.insertBefore(elm, target); - }); - return findFirstIn(target, rootNode); - }; - var insertAfter$1 = function (target, elms, rootNode, dom) { - dom.insertAfter(elms.reverse(), target); - return findLastOf(elms[0], rootNode); - }; - var insertAtCaret = function (serializer, dom, rng, fragment) { - var domFragment = toDomFragment(dom, serializer, fragment); - var liTarget = getParentLi(dom, rng.startContainer); - var liElms = trimListItems(listItems$1(domFragment.firstChild)); - var BEGINNING = 1, END = 2; - var rootNode = dom.getRoot(); - var isAt = function (location) { - var caretPos = CaretPosition$1.fromRangeStart(rng); - var caretWalker = CaretWalker(dom.getRoot()); - var newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos); - return newPos ? getParentLi(dom, newPos.getNode()) !== liTarget : true; - }; - if (isAt(BEGINNING)) { - return insertBefore$1(liTarget, liElms, rootNode); - } else if (isAt(END)) { - return insertAfter$1(liTarget, liElms, rootNode, dom); - } - return insertMiddle(liTarget, liElms, rootNode, rng); - }; - var InsertList = { - isListFragment: isListFragment, - insertAtCaret: insertAtCaret, - isParentBlockLi: isParentBlockLi, - trimListItems: trimListItems, - listItems: listItems$1 - }; - - var isAfterNbsp = function (container, offset) { - return NodeType.isText(container) && container.nodeValue[offset - 1] === '\xA0'; - }; - var trimOrPadLeftRight = function (rng, html) { - var container, offset; - container = rng.startContainer; - offset = rng.startOffset; - var hasSiblingText = function (siblingName) { - return container[siblingName] && container[siblingName].nodeType === 3; - }; - if (container.nodeType === 3) { - if (offset > 0) { - html = html.replace(/^ /, ' '); - } else if (!hasSiblingText('previousSibling')) { - html = html.replace(/^ /, ' '); - } - if (offset < container.length) { - html = html.replace(/ (
|)$/, ' '); - } else if (!hasSiblingText('nextSibling')) { - html = html.replace(/( | )(
|)$/, ' '); - } - } - return html; - }; - var trimNbspAfterDeleteAndPadValue = function (rng, value) { - var container, offset; - container = rng.startContainer; - offset = rng.startOffset; - if (container.nodeType === 3 && rng.collapsed) { - if (container.data[offset] === '\xA0') { - container.deleteData(offset, 1); - if (!/[\u00a0| ]$/.test(value)) { - value += ' '; - } - } else if (container.data[offset - 1] === '\xA0') { - container.deleteData(offset - 1, 1); - if (!/[\u00a0| ]$/.test(value)) { - value = ' ' + value; - } - } - } - return value; - }; - - var isTableCell$5 = NodeType.matchNodeNames('td th'); - var selectionSetContent = function (editor, content) { - var rng = editor.selection.getRng(); - var container = rng.startContainer; - var offset = rng.startOffset; - if (rng.collapsed && isAfterNbsp(container, offset) && NodeType.isText(container)) { - container.insertData(offset - 1, ' '); - container.deleteData(offset, 1); - rng.setStart(container, offset); - rng.setEnd(container, offset); - editor.selection.setRng(rng); - } - editor.selection.setContent(content); - }; - var validInsertion = function (editor, value, parentNode) { - if (parentNode.getAttribute('data-mce-bogus') === 'all') { - parentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode); - } else { - var node = parentNode.firstChild; - var node2 = parentNode.lastChild; - if (!node || node === node2 && node.nodeName === 'BR') { - editor.dom.setHTML(parentNode, value); - } else { - selectionSetContent(editor, value); - } - } - }; - var trimBrsFromTableCell = function (dom, elm) { - Option.from(dom.getParent(elm, 'td,th')).map(Element.fromDom).each(PaddingBr.trimBlockTrailingBr); - }; - var reduceInlineTextElements = function (editor, merge) { - var textInlineElements = editor.schema.getTextInlineElements(); - var dom = editor.dom; - if (merge) { - var root_1 = editor.getBody(), elementUtils_1 = new ElementUtils(dom); - Tools.each(dom.select('*[data-mce-fragment]'), function (node) { - for (var testNode = node.parentNode; testNode && testNode !== root_1; testNode = testNode.parentNode) { - if (textInlineElements[node.nodeName.toLowerCase()] && elementUtils_1.compare(testNode, node)) { - dom.remove(node, true); - } - } - }); - } - }; - var markFragmentElements = function (fragment) { - var node = fragment; - while (node = node.walk()) { - if (node.type === 1) { - node.attr('data-mce-fragment', '1'); - } - } - }; - var umarkFragmentElements = function (elm) { - Tools.each(elm.getElementsByTagName('*'), function (elm) { - elm.removeAttribute('data-mce-fragment'); - }); - }; - var isPartOfFragment = function (node) { - return !!node.getAttribute('data-mce-fragment'); - }; - var canHaveChildren = function (editor, node) { - return node && !editor.schema.getShortEndedElements()[node.nodeName]; - }; - var moveSelectionToMarker = function (editor, marker) { - var parentEditableFalseElm, parentBlock, nextRng; - var dom = editor.dom, selection = editor.selection; - var node, node2; - var getContentEditableFalseParent = function (node) { - var root = editor.getBody(); - for (; node && node !== root; node = node.parentNode) { - if (editor.dom.getContentEditable(node) === 'false') { - return node; - } - } - return null; - }; - if (!marker) { - return; - } - editor.selection.scrollIntoView(marker); - parentEditableFalseElm = getContentEditableFalseParent(marker); - if (parentEditableFalseElm) { - dom.remove(marker); - selection.select(parentEditableFalseElm); - return; - } - var rng = dom.createRng(); - node = marker.previousSibling; - if (node && node.nodeType === 3) { - rng.setStart(node, node.nodeValue.length); - if (!Env.ie) { - node2 = marker.nextSibling; - if (node2 && node2.nodeType === 3) { - node.appendData(node2.data); - node2.parentNode.removeChild(node2); - } - } - } else { - rng.setStartBefore(marker); - rng.setEndBefore(marker); - } - var findNextCaretRng = function (rng) { - var caretPos = CaretPosition$1.fromRangeStart(rng); - var caretWalker = CaretWalker(editor.getBody()); - caretPos = caretWalker.next(caretPos); - if (caretPos) { - return caretPos.toRange(); - } - }; - parentBlock = dom.getParent(marker, dom.isBlock); - dom.remove(marker); - if (parentBlock && dom.isEmpty(parentBlock)) { - editor.$(parentBlock).empty(); - rng.setStart(parentBlock, 0); - rng.setEnd(parentBlock, 0); - if (!isTableCell$5(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) { - rng = nextRng; - dom.remove(parentBlock); - } else { - dom.add(parentBlock, dom.create('br', { 'data-mce-bogus': '1' })); - } - } - selection.setRng(rng); - }; - var insertHtmlAtCaret = function (editor, value, details) { - var parser, serializer, parentNode, rootNode, fragment, args; - var marker, rng, node, bookmarkHtml, merge; - var selection = editor.selection, dom = editor.dom; - if (/^ | $/.test(value)) { - value = trimOrPadLeftRight(selection.getRng(), value); - } - parser = editor.parser; - merge = details.merge; - serializer = Serializer({ validate: editor.settings.validate }, editor.schema); - bookmarkHtml = '​'; - args = { - content: value, - format: 'html', - selection: true, - paste: details.paste - }; - args = editor.fire('BeforeSetContent', args); - if (args.isDefaultPrevented()) { - editor.fire('SetContent', { - content: args.content, - format: 'html', - selection: true, - paste: details.paste - }); - return; - } - value = args.content; - if (value.indexOf('{$caret}') === -1) { - value += '{$caret}'; - } - value = value.replace(/\{\$caret\}/, bookmarkHtml); - rng = selection.getRng(); - var caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null); - var body = editor.getBody(); - if (caretElement === body && selection.isCollapsed()) { - if (dom.isBlock(body.firstChild) && canHaveChildren(editor, body.firstChild) && dom.isEmpty(body.firstChild)) { - rng = dom.createRng(); - rng.setStart(body.firstChild, 0); - rng.setEnd(body.firstChild, 0); - selection.setRng(rng); - } - } - if (!selection.isCollapsed()) { - editor.selection.setRng(RangeNormalizer.normalize(editor.selection.getRng())); - editor.getDoc().execCommand('Delete', false, null); - value = trimNbspAfterDeleteAndPadValue(editor.selection.getRng(), value); - } - parentNode = selection.getNode(); - var parserArgs = { - context: parentNode.nodeName.toLowerCase(), - data: details.data, - insert: true - }; - fragment = parser.parse(value, parserArgs); - if (details.paste === true && InsertList.isListFragment(editor.schema, fragment) && InsertList.isParentBlockLi(dom, parentNode)) { - rng = InsertList.insertAtCaret(serializer, dom, editor.selection.getRng(), fragment); - editor.selection.setRng(rng); - editor.fire('SetContent', args); - return; - } - markFragmentElements(fragment); - node = fragment.lastChild; - if (node.attr('id') === 'mce_marker') { - marker = node; - for (node = node.prev; node; node = node.walk(true)) { - if (node.type === 3 || !dom.isBlock(node.name)) { - if (editor.schema.isValidChild(node.parent.name, 'span')) { - node.parent.insert(marker, node, node.name === 'br'); - } - break; - } - } - } - editor._selectionOverrides.showBlockCaretContainer(parentNode); - if (!parserArgs.invalid) { - value = serializer.serialize(fragment); - validInsertion(editor, value, parentNode); - } else { - selectionSetContent(editor, bookmarkHtml); - parentNode = selection.getNode(); - rootNode = editor.getBody(); - if (parentNode.nodeType === 9) { - parentNode = node = rootNode; - } else { - node = parentNode; - } - while (node !== rootNode) { - parentNode = node; - node = node.parentNode; - } - value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); - value = serializer.serialize(parser.parse(value.replace(//i, function () { - return serializer.serialize(fragment); - }))); - if (parentNode === rootNode) { - dom.setHTML(rootNode, value); - } else { - dom.setOuterHTML(parentNode, value); - } - } - reduceInlineTextElements(editor, merge); - moveSelectionToMarker(editor, dom.get('mce_marker')); - umarkFragmentElements(editor.getBody()); - trimBrsFromTableCell(editor.dom, editor.selection.getStart()); - editor.fire('SetContent', args); - editor.addVisual(); - }; - var processValue = function (value) { - var details; - if (typeof value !== 'string') { - details = Tools.extend({ - paste: value.paste, - data: { paste: value.paste } - }, value); - return { - content: value.content, - details: details - }; - } - return { - content: value, - details: {} - }; - }; - var insertAtCaret$1 = function (editor, value) { - var result = processValue(value); - insertHtmlAtCaret(editor, result.content, result.details); - }; - var InsertContent = { insertAtCaret: insertAtCaret$1 }; - - var nativeCommand = function (editor, command) { - editor.getDoc().execCommand(command, false, null); - }; - var deleteCommand = function (editor) { - if (CefDelete.backspaceDelete(editor, false)) { - return; - } else if (CefBoundaryDelete.backspaceDelete(editor, false)) { - return; - } else if (BoundaryDelete.backspaceDelete(editor, false)) { - return; - } else if (BlockBoundaryDelete.backspaceDelete(editor, false)) { - return; - } else if (TableDelete.backspaceDelete(editor)) { - return; - } else if (BlockRangeDelete.backspaceDelete(editor, false)) { - return; - } else if (InlineFormatDelete.backspaceDelete(editor, false)) { - return; - } else { - nativeCommand(editor, 'Delete'); - DeleteUtils.paddEmptyBody(editor); - } - }; - var forwardDeleteCommand = function (editor) { - if (CefDelete.backspaceDelete(editor, true)) { - return; - } else if (CefBoundaryDelete.backspaceDelete(editor, true)) { - return; - } else if (BoundaryDelete.backspaceDelete(editor, true)) { - return; - } else if (BlockBoundaryDelete.backspaceDelete(editor, true)) { - return; - } else if (TableDelete.backspaceDelete(editor)) { - return; - } else if (BlockRangeDelete.backspaceDelete(editor, true)) { - return; - } else if (InlineFormatDelete.backspaceDelete(editor, true)) { - return; - } else { - nativeCommand(editor, 'ForwardDelete'); - } - }; - var DeleteCommands = { - deleteCommand: deleteCommand, - forwardDeleteCommand: forwardDeleteCommand - }; - - var getSpecifiedFontProp = function (propName, rootElm, elm) { - var getProperty = function (elm) { - return getRaw(elm, propName); - }; - var isRoot = function (elm) { - return eq(Element.fromDom(rootElm), elm); - }; - return closest(Element.fromDom(elm), function (elm) { - return getProperty(elm).isSome(); - }, isRoot).bind(getProperty); - }; - var round$1 = function (number, precision) { - var factor = Math.pow(10, precision); - return Math.round(number * factor) / factor; - }; - var toPt = function (fontSize, precision) { - if (/[0-9.]+px$/.test(fontSize)) { - return round$1(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt'; - } - return fontSize; - }; - var normalizeFontFamily = function (fontFamily) { - return fontFamily.replace(/[\'\"\\]/g, '').replace(/,\s+/g, ','); - }; - var getComputedFontProp = function (propName, elm) { - return Option.from(DOMUtils$1.DOM.getStyle(elm, propName, true)); - }; - var getFontProp = function (propName) { - return function (rootElm, elm) { - return Option.from(elm).map(Element.fromDom).filter(isElement).bind(function (element) { - return getSpecifiedFontProp(propName, rootElm, element.dom()).or(getComputedFontProp(propName, element.dom())); - }).getOr(''); - }; - }; - var FontInfo = { - getFontSize: getFontProp('font-size'), - getFontFamily: compose(normalizeFontFamily, getFontProp('font-family')), - toPt: toPt - }; - - var findFirstCaretElement = function (editor) { - return CaretFinder.firstPositionIn(editor.getBody()).map(function (caret) { - var container = caret.container(); - return NodeType.isText(container) ? container.parentNode : container; - }); - }; - var isRangeAtStartOfNode = function (rng, root) { - return rng.startContainer === root && rng.startOffset === 0; - }; - var getCaretElement = function (editor) { - return Option.from(editor.selection.getRng()).bind(function (rng) { - var root = editor.getBody(); - return isRangeAtStartOfNode(rng, root) ? Option.none() : Option.from(editor.selection.getStart(true)); - }); - }; - var fromFontSizeNumber = function (editor, value) { - if (/^[0-9\.]+$/.test(value)) { - var fontSizeNumber = parseInt(value, 10); - if (fontSizeNumber >= 1 && fontSizeNumber <= 7) { - var fontSizes = Settings.getFontStyleValues(editor); - var fontClasses = Settings.getFontSizeClasses(editor); - if (fontClasses) { - return fontClasses[fontSizeNumber - 1] || value; - } else { - return fontSizes[fontSizeNumber - 1] || value; - } - } else { - return value; - } - } else { - return value; - } - }; - var fontNameAction = function (editor, value) { - editor.formatter.toggle('fontname', { value: fromFontSizeNumber(editor, value) }); - editor.nodeChanged(); - }; - var fontNameQuery = function (editor) { - return getCaretElement(editor).fold(function () { - return findFirstCaretElement(editor).map(function (caretElement) { - return FontInfo.getFontFamily(editor.getBody(), caretElement); - }).getOr(''); - }, function (caretElement) { - return FontInfo.getFontFamily(editor.getBody(), caretElement); - }); - }; - var fontSizeAction = function (editor, value) { - editor.formatter.toggle('fontsize', { value: fromFontSizeNumber(editor, value) }); - editor.nodeChanged(); - }; - var fontSizeQuery = function (editor) { - return getCaretElement(editor).fold(function () { - return findFirstCaretElement(editor).map(function (caretElement) { - return FontInfo.getFontSize(editor.getBody(), caretElement); - }).getOr(''); - }, function (caretElement) { - return FontInfo.getFontSize(editor.getBody(), caretElement); - }); - }; - - var isEditable$1 = function (target) { - return closest(target, function (elm) { - return NodeType.isContentEditableTrue(elm.dom()) || NodeType.isContentEditableFalse(elm.dom()); - }).exists(function (elm) { - return NodeType.isContentEditableTrue(elm.dom()); - }); - }; - var parseIndentValue = function (value) { - var number = parseInt(value, 10); - return isNaN(number) ? 0 : number; - }; - var getIndentStyleName = function (useMargin, element) { - var indentStyleName = useMargin || isTable$1(element) ? 'margin' : 'padding'; - var suffix = get$2(element, 'direction') === 'rtl' ? '-right' : '-left'; - return indentStyleName + suffix; - }; - var indentElement = function (dom, command, useMargin, value, unit, element) { - var indentStyleName = getIndentStyleName(useMargin, Element.fromDom(element)); - if (command === 'outdent') { - var styleValue = Math.max(0, parseIndentValue(element.style[indentStyleName]) - value); - dom.setStyle(element, indentStyleName, styleValue ? styleValue + unit : ''); - } else { - var styleValue = parseIndentValue(element.style[indentStyleName]) + value + unit; - dom.setStyle(element, indentStyleName, styleValue); - } - }; - var validateBlocks = function (editor, blocks) { - return forall(blocks, function (block) { - var indentStyleName = getIndentStyleName(Settings.shouldIndentUseMargin(editor), block); - var intentValue = getRaw(block, indentStyleName).map(parseIndentValue).getOr(0); - var contentEditable = editor.dom.getContentEditable(block.dom()); - return contentEditable !== 'false' && intentValue > 0; - }); - }; - var canOutdent = function (editor) { - var blocks = getBlocksToIndent(editor); - return editor.readonly !== true && (blocks.length > 1 || validateBlocks(editor, blocks)); - }; - var isListComponent = function (el) { - return isList(el) || isListItem(el); - }; - var parentIsListComponent = function (el) { - return parent(el).map(isListComponent).getOr(false); - }; - var getBlocksToIndent = function (editor) { - return filter(map(editor.selection.getSelectedBlocks(), Element.fromDom), function (el) { - return !isListComponent(el) && !parentIsListComponent(el) && isEditable$1(el); - }); - }; - var handle = function (editor, command) { - var dom = editor.dom, selection = editor.selection, formatter = editor.formatter; - var indentation = Settings.getIndentation(editor); - var indentUnit = /[a-z%]+$/i.exec(indentation)[0]; - var indentValue = parseInt(indentation, 10); - var useMargin = Settings.shouldIndentUseMargin(editor); - var forcedRootBlock = Settings.getForcedRootBlock(editor); - if (!editor.queryCommandState('InsertUnorderedList') && !editor.queryCommandState('InsertOrderedList')) { - if (forcedRootBlock === '' && !dom.getParent(selection.getNode(), dom.isBlock)) { - formatter.apply('div'); - } - } - each(getBlocksToIndent(editor), function (block) { - indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom()); - }); - }; - - var each$g = Tools.each; - var map$3 = Tools.map, inArray$2 = Tools.inArray; - var EditorCommands = function () { - function EditorCommands(editor) { - this.commands = { - state: {}, - exec: {}, - value: {} - }; - this.editor = editor; - this.setupCommands(editor); - } - EditorCommands.prototype.execCommand = function (command, ui, value, args) { - var func, customCommand, state = false; - var self = this; - if (self.editor.removed) { - return; - } - if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) { - self.editor.focus(); - } else { - SelectionBookmark.restore(self.editor); - } - args = self.editor.fire('BeforeExecCommand', { - command: command, - ui: ui, - value: value - }); - if (args.isDefaultPrevented()) { - return false; - } - customCommand = command.toLowerCase(); - if (func = self.commands.exec[customCommand]) { - func(customCommand, ui, value); - self.editor.fire('ExecCommand', { - command: command, - ui: ui, - value: value - }); - return true; - } - each$g(this.editor.plugins, function (p) { - if (p.execCommand && p.execCommand(command, ui, value)) { - self.editor.fire('ExecCommand', { - command: command, - ui: ui, - value: value - }); - state = true; - return false; - } - }); - if (state) { - return state; - } - if (self.editor.theme && self.editor.theme.execCommand && self.editor.theme.execCommand(command, ui, value)) { - self.editor.fire('ExecCommand', { - command: command, - ui: ui, - value: value - }); - return true; - } - try { - state = self.editor.getDoc().execCommand(command, ui, value); - } catch (ex) { - } - if (state) { - self.editor.fire('ExecCommand', { - command: command, - ui: ui, - value: value - }); - return true; - } - return false; - }; - EditorCommands.prototype.queryCommandState = function (command) { - var func; - if (this.editor.quirks.isHidden() || this.editor.removed) { - return; - } - command = command.toLowerCase(); - if (func = this.commands.state[command]) { - return func(command); - } - try { - return this.editor.getDoc().queryCommandState(command); - } catch (ex) { - } - return false; - }; - EditorCommands.prototype.queryCommandValue = function (command) { - var func; - if (this.editor.quirks.isHidden() || this.editor.removed) { - return; - } - command = command.toLowerCase(); - if (func = this.commands.value[command]) { - return func(command); - } - try { - return this.editor.getDoc().queryCommandValue(command); - } catch (ex) { - } - }; - EditorCommands.prototype.addCommands = function (commandList, type) { - var self = this; - type = type || 'exec'; - each$g(commandList, function (callback, command) { - each$g(command.toLowerCase().split(','), function (command) { - self.commands[type][command] = callback; - }); - }); - }; - EditorCommands.prototype.addCommand = function (command, callback, scope) { - var _this = this; - command = command.toLowerCase(); - this.commands.exec[command] = function (command, ui, value, args) { - return callback.call(scope || _this.editor, ui, value, args); - }; - }; - EditorCommands.prototype.queryCommandSupported = function (command) { - command = command.toLowerCase(); - if (this.commands.exec[command]) { - return true; - } - try { - return this.editor.getDoc().queryCommandSupported(command); - } catch (ex) { - } - return false; - }; - EditorCommands.prototype.addQueryStateHandler = function (command, callback, scope) { - var _this = this; - command = command.toLowerCase(); - this.commands.state[command] = function () { - return callback.call(scope || _this.editor); - }; - }; - EditorCommands.prototype.addQueryValueHandler = function (command, callback, scope) { - var _this = this; - command = command.toLowerCase(); - this.commands.value[command] = function () { - return callback.call(scope || _this.editor); - }; - }; - EditorCommands.prototype.hasCustomCommand = function (command) { - command = command.toLowerCase(); - return !!this.commands.exec[command]; - }; - EditorCommands.prototype.execNativeCommand = function (command, ui, value) { - if (ui === undefined) { - ui = false; - } - if (value === undefined) { - value = null; - } - return this.editor.getDoc().execCommand(command, ui, value); - }; - EditorCommands.prototype.isFormatMatch = function (name) { - return this.editor.formatter.match(name); - }; - EditorCommands.prototype.toggleFormat = function (name, value) { - this.editor.formatter.toggle(name, value ? { value: value } : undefined); - this.editor.nodeChanged(); - }; - EditorCommands.prototype.storeSelection = function (type) { - this.selectionBookmark = this.editor.selection.getBookmark(type); - }; - EditorCommands.prototype.restoreSelection = function () { - this.editor.selection.moveToBookmark(this.selectionBookmark); - }; - EditorCommands.prototype.setupCommands = function (editor) { - var self = this; - this.addCommands({ - 'mceResetDesignMode,mceBeginUndoLevel': function () { - }, - 'mceEndUndoLevel,mceAddUndoLevel': function () { - editor.undoManager.add(); - }, - 'Cut,Copy,Paste': function (command) { - var doc = editor.getDoc(); - var failed; - try { - self.execNativeCommand(command); - } catch (ex) { - failed = true; - } - if (command === 'paste' && !doc.queryCommandEnabled(command)) { - failed = true; - } - if (failed || !doc.queryCommandSupported(command)) { - var msg = editor.translate('Your browser doesn\'t support direct access to the clipboard. ' + 'Please use the Ctrl+X/C/V keyboard shortcuts instead.'); - if (Env.mac) { - msg = msg.replace(/Ctrl\+/g, '\u2318+'); - } - editor.notificationManager.open({ - text: msg, - type: 'error' - }); - } - }, - 'unlink': function () { - if (editor.selection.isCollapsed()) { - var elm = editor.dom.getParent(editor.selection.getStart(), 'a'); - if (elm) { - editor.dom.remove(elm, true); - } - return; - } - editor.formatter.remove('link'); - }, - 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function (command) { - var align = command.substring(7); - if (align === 'full') { - align = 'justify'; - } - each$g('left,center,right,justify'.split(','), function (name) { - if (align !== name) { - editor.formatter.remove('align' + name); - } - }); - if (align !== 'none') { - self.toggleFormat('align' + align); - } - }, - 'InsertUnorderedList,InsertOrderedList': function (command) { - var listElm, listParent; - self.execNativeCommand(command); - listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul'); - if (listElm) { - listParent = listElm.parentNode; - if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) { - self.storeSelection(); - editor.dom.split(listParent, listElm); - self.restoreSelection(); - } - } - }, - 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) { - self.toggleFormat(command); - }, - 'ForeColor,HiliteColor': function (command, ui, value) { - self.toggleFormat(command, value); - }, - 'FontName': function (command, ui, value) { - fontNameAction(editor, value); - }, - 'FontSize': function (command, ui, value) { - fontSizeAction(editor, value); - }, - 'RemoveFormat': function (command) { - editor.formatter.remove(command); - }, - 'mceBlockQuote': function () { - self.toggleFormat('blockquote'); - }, - 'FormatBlock': function (command, ui, value) { - return self.toggleFormat(value || 'p'); - }, - 'mceCleanup': function () { - var bookmark = editor.selection.getBookmark(); - editor.setContent(editor.getContent()); - editor.selection.moveToBookmark(bookmark); - }, - 'mceRemoveNode': function (command, ui, value) { - var node = value || editor.selection.getNode(); - if (node !== editor.getBody()) { - self.storeSelection(); - editor.dom.remove(node, true); - self.restoreSelection(); - } - }, - 'mceSelectNodeDepth': function (command, ui, value) { - var counter = 0; - editor.dom.getParent(editor.selection.getNode(), function (node) { - if (node.nodeType === 1 && counter++ === value) { - editor.selection.select(node); - return false; - } - }, editor.getBody()); - }, - 'mceSelectNode': function (command, ui, value) { - editor.selection.select(value); - }, - 'mceInsertContent': function (command, ui, value) { - InsertContent.insertAtCaret(editor, value); - }, - 'mceInsertRawHTML': function (command, ui, value) { - editor.selection.setContent('tiny_mce_marker'); - var content = editor.getContent(); - editor.setContent(content.replace(/tiny_mce_marker/g, function () { - return value; - })); - }, - 'mceInsertNewLine': function (command, ui, value) { - InsertNewLine.insert(editor, value); - }, - 'mceToggleFormat': function (command, ui, value) { - self.toggleFormat(value); - }, - 'mceSetContent': function (command, ui, value) { - editor.setContent(value); - }, - 'Indent,Outdent': function (command) { - handle(editor, command); - }, - 'mceRepaint': function () { - }, - 'InsertHorizontalRule': function () { - editor.execCommand('mceInsertContent', false, '
'); - }, - 'mceToggleVisualAid': function () { - editor.hasVisual = !editor.hasVisual; - editor.addVisual(); - }, - 'mceReplaceContent': function (command, ui, value) { - editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, editor.selection.getContent({ format: 'text' }))); - }, - 'mceInsertLink': function (command, ui, value) { - var anchor; - if (typeof value === 'string') { - value = { href: value }; - } - anchor = editor.dom.getParent(editor.selection.getNode(), 'a'); - value.href = value.href.replace(' ', '%20'); - if (!anchor || !value.href) { - editor.formatter.remove('link'); - } - if (value.href) { - editor.formatter.apply('link', value, anchor); - } - }, - 'selectAll': function () { - var editingHost = editor.dom.getParent(editor.selection.getStart(), NodeType.isContentEditableTrue); - if (editingHost) { - var rng = editor.dom.createRng(); - rng.selectNodeContents(editingHost); - editor.selection.setRng(rng); - } - }, - 'delete': function () { - DeleteCommands.deleteCommand(editor); - }, - 'forwardDelete': function () { - DeleteCommands.forwardDeleteCommand(editor); - }, - 'mceNewDocument': function () { - editor.setContent(''); - }, - 'InsertLineBreak': function (command, ui, value) { - InsertBr.insert(editor, value); - return true; - } - }); - var alignStates = function (name) { - return function () { - var nodes = editor.selection.isCollapsed() ? [editor.dom.getParent(editor.selection.getNode(), editor.dom.isBlock)] : editor.selection.getSelectedBlocks(); - var matches = map$3(nodes, function (node) { - return !!editor.formatter.matchNode(node, name); - }); - return inArray$2(matches, true) !== -1; - }; - }; - self.addCommands({ - 'JustifyLeft': alignStates('alignleft'), - 'JustifyCenter': alignStates('aligncenter'), - 'JustifyRight': alignStates('alignright'), - 'JustifyFull': alignStates('alignjustify'), - 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) { - return self.isFormatMatch(command); - }, - 'mceBlockQuote': function () { - return self.isFormatMatch('blockquote'); - }, - 'Outdent': function () { - return canOutdent(editor); - }, - 'InsertUnorderedList,InsertOrderedList': function (command) { - var list = editor.dom.getParent(editor.selection.getNode(), 'ul,ol'); - return list && (command === 'insertunorderedlist' && list.tagName === 'UL' || command === 'insertorderedlist' && list.tagName === 'OL'); - } - }, 'state'); - self.addCommands({ - Undo: function () { - editor.undoManager.undo(); - }, - Redo: function () { - editor.undoManager.redo(); - } - }); - self.addQueryValueHandler('FontName', function () { - return fontNameQuery(editor); - }, this); - self.addQueryValueHandler('FontSize', function () { - return fontSizeQuery(editor); - }, this); - }; - return EditorCommands; - }(); - - var nativeEvents = Tools.makeMap('focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange ' + 'mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover ' + 'draggesture dragdrop drop drag submit ' + 'compositionstart compositionend compositionupdate touchstart touchmove touchend', ' '); - var returnFalse$1 = function () { - return false; - }; - var returnTrue$1 = function () { - return true; - }; - var EventDispatcher = function () { - function EventDispatcher(settings) { - this.bindings = {}; - this.settings = settings || {}; - this.scope = this.settings.scope || this; - this.toggleEvent = this.settings.toggleEvent || returnFalse$1; - } - EventDispatcher.isNative = function (name) { - return !!nativeEvents[name.toLowerCase()]; - }; - EventDispatcher.prototype.fire = function (name, args) { - var handlers, i, l, callback; - name = name.toLowerCase(); - args = args || {}; - args.type = name; - if (!args.target) { - args.target = this.scope; - } - if (!args.preventDefault) { - args.preventDefault = function () { - args.isDefaultPrevented = returnTrue$1; - }; - args.stopPropagation = function () { - args.isPropagationStopped = returnTrue$1; - }; - args.stopImmediatePropagation = function () { - args.isImmediatePropagationStopped = returnTrue$1; - }; - args.isDefaultPrevented = returnFalse$1; - args.isPropagationStopped = returnFalse$1; - args.isImmediatePropagationStopped = returnFalse$1; - } - if (this.settings.beforeFire) { - this.settings.beforeFire(args); - } - handlers = this.bindings[name]; - if (handlers) { - for (i = 0, l = handlers.length; i < l; i++) { - callback = handlers[i]; - if (callback.once) { - this.off(name, callback.func); - } - if (args.isImmediatePropagationStopped()) { - args.stopPropagation(); - return args; - } - if (callback.func.call(this.scope, args) === false) { - args.preventDefault(); - return args; - } - } - } - return args; - }; - EventDispatcher.prototype.on = function (name, callback, prepend, extra) { - var handlers, names, i; - if (callback === false) { - callback = returnFalse$1; - } - if (callback) { - var wrappedCallback = { func: callback }; - if (extra) { - Tools.extend(wrappedCallback, extra); - } - names = name.toLowerCase().split(' '); - i = names.length; - while (i--) { - name = names[i]; - handlers = this.bindings[name]; - if (!handlers) { - handlers = this.bindings[name] = []; - this.toggleEvent(name, true); - } - if (prepend) { - handlers.unshift(wrappedCallback); - } else { - handlers.push(wrappedCallback); - } - } - } - return this; - }; - EventDispatcher.prototype.off = function (name, callback) { - var i, handlers, bindingName, names, hi; - if (name) { - names = name.toLowerCase().split(' '); - i = names.length; - while (i--) { - name = names[i]; - handlers = this.bindings[name]; - if (!name) { - for (bindingName in this.bindings) { - this.toggleEvent(bindingName, false); - delete this.bindings[bindingName]; - } - return this; - } - if (handlers) { - if (!callback) { - handlers.length = 0; - } else { - hi = handlers.length; - while (hi--) { - if (handlers[hi].func === callback) { - handlers = handlers.slice(0, hi).concat(handlers.slice(hi + 1)); - this.bindings[name] = handlers; - } - } - } - if (!handlers.length) { - this.toggleEvent(name, false); - delete this.bindings[name]; - } - } - } - } else { - for (name in this.bindings) { - this.toggleEvent(name, false); - } - this.bindings = {}; - } - return this; - }; - EventDispatcher.prototype.once = function (name, callback, prepend) { - return this.on(name, callback, prepend, { once: true }); - }; - EventDispatcher.prototype.has = function (name) { - name = name.toLowerCase(); - return !(!this.bindings[name] || this.bindings[name].length === 0); - }; - return EventDispatcher; - }(); - - var getEventDispatcher = function (obj) { - if (!obj._eventDispatcher) { - obj._eventDispatcher = new EventDispatcher({ - scope: obj, - toggleEvent: function (name, state) { - if (EventDispatcher.isNative(name) && obj.toggleNativeEvent) { - obj.toggleNativeEvent(name, state); - } - } - }); - } - return obj._eventDispatcher; - }; - var Observable = { - fire: function (name, args, bubble) { - var self = this; - if (self.removed && name !== 'remove' && name !== 'detach') { - return args; - } - var dispatcherArgs = getEventDispatcher(self).fire(name, args); - if (bubble !== false && self.parent) { - var parent = self.parent(); - while (parent && !dispatcherArgs.isPropagationStopped()) { - parent.fire(name, dispatcherArgs, false); - parent = parent.parent(); - } - } - return dispatcherArgs; - }, - on: function (name, callback, prepend) { - return getEventDispatcher(this).on(name, callback, prepend); - }, - off: function (name, callback) { - return getEventDispatcher(this).off(name, callback); - }, - once: function (name, callback) { - return getEventDispatcher(this).once(name, callback); - }, - hasEventListeners: function (name) { - return getEventDispatcher(this).has(name); - } - }; - - var DOM$6 = DOMUtils$1.DOM; - var customEventRootDelegates; - var getEventTarget = function (editor, eventName) { - if (eventName === 'selectionchange') { - return editor.getDoc(); - } - if (!editor.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(eventName)) { - return editor.getDoc().documentElement; - } - if (editor.settings.event_root) { - if (!editor.eventRoot) { - editor.eventRoot = DOM$6.select(editor.settings.event_root)[0]; - } - return editor.eventRoot; - } - return editor.getBody(); - }; - var isListening = function (editor) { - return !editor.hidden && !editor.readonly; - }; - var fireEvent = function (editor, eventName, e) { - if (isListening(editor)) { - editor.fire(eventName, e); - } else if (editor.readonly) { - e.preventDefault(); - } - }; - var bindEventDelegate = function (editor, eventName) { - var eventRootElm, delegate; - if (!editor.delegates) { - editor.delegates = {}; - } - if (editor.delegates[eventName] || editor.removed) { - return; - } - eventRootElm = getEventTarget(editor, eventName); - if (editor.settings.event_root) { - if (!customEventRootDelegates) { - customEventRootDelegates = {}; - editor.editorManager.on('removeEditor', function () { - var name; - if (!editor.editorManager.activeEditor) { - if (customEventRootDelegates) { - for (name in customEventRootDelegates) { - editor.dom.unbind(getEventTarget(editor, name)); - } - customEventRootDelegates = null; - } - } - }); - } - if (customEventRootDelegates[eventName]) { - return; - } - delegate = function (e) { - var target = e.target; - var editors = editor.editorManager.get(); - var i = editors.length; - while (i--) { - var body = editors[i].getBody(); - if (body === target || DOM$6.isChildOf(target, body)) { - fireEvent(editors[i], eventName, e); - } - } - }; - customEventRootDelegates[eventName] = delegate; - DOM$6.bind(eventRootElm, eventName, delegate); - } else { - delegate = function (e) { - fireEvent(editor, eventName, e); - }; - DOM$6.bind(eventRootElm, eventName, delegate); - editor.delegates[eventName] = delegate; - } - }; - var EditorObservable = __assign({}, Observable, { - bindPendingEventDelegates: function () { - var self = this; - Tools.each(self._pendingNativeEvents, function (name) { - bindEventDelegate(self, name); - }); - }, - toggleNativeEvent: function (name, state) { - var self = this; - if (name === 'focus' || name === 'blur') { - return; - } - if (state) { - if (self.initialized) { - bindEventDelegate(self, name); - } else { - if (!self._pendingNativeEvents) { - self._pendingNativeEvents = [name]; - } else { - self._pendingNativeEvents.push(name); - } - } - } else if (self.initialized) { - self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]); - delete self.delegates[name]; - } - }, - unbindAllNativeEvents: function () { - var self = this; - var body = self.getBody(); - var dom = self.dom; - var name; - if (self.delegates) { - for (name in self.delegates) { - self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]); - } - delete self.delegates; - } - if (!self.inline && body && dom) { - body.onload = null; - dom.unbind(self.getWin()); - dom.unbind(self.getDoc()); - } - if (dom) { - dom.unbind(body); - dom.unbind(self.getContainer()); - } - } - }); - - var each$h = Tools.each, explode$3 = Tools.explode; - var keyCodeLookup = { - f1: 112, - f2: 113, - f3: 114, - f4: 115, - f5: 116, - f6: 117, - f7: 118, - f8: 119, - f9: 120, - f10: 121, - f11: 122, - f12: 123 - }; - var modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access'); - var Shortcuts = function () { - function Shortcuts(editor) { - this.shortcuts = {}; - this.pendingPatterns = []; - this.editor = editor; - var self = this; - editor.on('keyup keypress keydown', function (e) { - if ((self.hasModifier(e) || self.isFunctionKey(e)) && !e.isDefaultPrevented()) { - each$h(self.shortcuts, function (shortcut) { - if (self.matchShortcut(e, shortcut)) { - self.pendingPatterns = shortcut.subpatterns.slice(0); - if (e.type === 'keydown') { - self.executeShortcutAction(shortcut); - } - return true; - } - }); - if (self.matchShortcut(e, self.pendingPatterns[0])) { - if (self.pendingPatterns.length === 1) { - if (e.type === 'keydown') { - self.executeShortcutAction(self.pendingPatterns[0]); - } - } - self.pendingPatterns.shift(); - } - } - }); - } - Shortcuts.prototype.add = function (pattern, desc, cmdFunc, scope) { - var self = this; - var cmd; - cmd = cmdFunc; - if (typeof cmdFunc === 'string') { - cmdFunc = function () { - self.editor.execCommand(cmd, false, null); - }; - } else if (Tools.isArray(cmd)) { - cmdFunc = function () { - self.editor.execCommand(cmd[0], cmd[1], cmd[2]); - }; - } - each$h(explode$3(Tools.trim(pattern.toLowerCase())), function (pattern) { - var shortcut = self.createShortcut(pattern, desc, cmdFunc, scope); - self.shortcuts[shortcut.id] = shortcut; - }); - return true; - }; - Shortcuts.prototype.remove = function (pattern) { - var shortcut = this.createShortcut(pattern); - if (this.shortcuts[shortcut.id]) { - delete this.shortcuts[shortcut.id]; - return true; - } - return false; - }; - Shortcuts.prototype.parseShortcut = function (pattern) { - var id, key; - var shortcut = {}; - each$h(explode$3(pattern, '+'), function (value) { - if (value in modifierNames) { - shortcut[value] = true; - } else { - if (/^[0-9]{2,}$/.test(value)) { - shortcut.keyCode = parseInt(value, 10); - } else { - shortcut.charCode = value.charCodeAt(0); - shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0); - } - } - }); - id = [shortcut.keyCode]; - for (key in modifierNames) { - if (shortcut[key]) { - id.push(key); - } else { - shortcut[key] = false; - } - } - shortcut.id = id.join(','); - if (shortcut.access) { - shortcut.alt = true; - if (Env.mac) { - shortcut.ctrl = true; - } else { - shortcut.shift = true; - } - } - if (shortcut.meta) { - if (Env.mac) { - shortcut.meta = true; - } else { - shortcut.ctrl = true; - shortcut.meta = false; - } - } - return shortcut; - }; - Shortcuts.prototype.createShortcut = function (pattern, desc, cmdFunc, scope) { - var shortcuts; - shortcuts = Tools.map(explode$3(pattern, '>'), this.parseShortcut); - shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], { - func: cmdFunc, - scope: scope || this.editor - }); - return Tools.extend(shortcuts[0], { - desc: this.editor.translate(desc), - subpatterns: shortcuts.slice(1) - }); - }; - Shortcuts.prototype.hasModifier = function (e) { - return e.altKey || e.ctrlKey || e.metaKey; - }; - Shortcuts.prototype.isFunctionKey = function (e) { - return e.type === 'keydown' && e.keyCode >= 112 && e.keyCode <= 123; - }; - Shortcuts.prototype.matchShortcut = function (e, shortcut) { - if (!shortcut) { - return false; - } - if (shortcut.ctrl !== e.ctrlKey || shortcut.meta !== e.metaKey) { - return false; - } - if (shortcut.alt !== e.altKey || shortcut.shift !== e.shiftKey) { - return false; - } - if (e.keyCode === shortcut.keyCode || e.charCode && e.charCode === shortcut.charCode) { - e.preventDefault(); - return true; - } - return false; - }; - Shortcuts.prototype.executeShortcutAction = function (shortcut) { - return shortcut.func ? shortcut.func.call(shortcut.scope) : null; - }; - return Shortcuts; - }(); - - var each$i = Tools.each, trim$4 = Tools.trim; - var queryParts = 'source protocol authority userInfo user password host port relative path directory file query anchor'.split(' '); - var DEFAULT_PORTS = { - ftp: 21, - http: 80, - https: 443, - mailto: 25 - }; - var URI = function () { - function URI(url, settings) { - url = trim$4(url); - this.settings = settings || {}; - var baseUri = this.settings.base_uri; - var self = this; - if (/^([\w\-]+):([^\/]{2})/i.test(url) || /^\s*#/.test(url)) { - self.source = url; - return; - } - var isProtocolRelative = url.indexOf('//') === 0; - if (url.indexOf('/') === 0 && !isProtocolRelative) { - url = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url; - } - if (!/^[\w\-]*:?\/\//.test(url)) { - var baseUrl = this.settings.base_uri ? this.settings.base_uri.path : new URI(domGlobals.document.location.href).directory; - if (this.settings.base_uri.protocol == '') { - url = '//mce_host' + self.toAbsPath(baseUrl, url); - } else { - var match = /([^#?]*)([#?]?.*)/.exec(url); - url = (baseUri && baseUri.protocol || 'http') + '://mce_host' + self.toAbsPath(baseUrl, match[1]) + match[2]; - } - } - url = url.replace(/@@/g, '(mce_at)'); - var urlMatch = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url); - each$i(queryParts, function (v, i) { - var part = urlMatch[i]; - if (part) { - part = part.replace(/\(mce_at\)/g, '@@'); - } - self[v] = part; - }); - if (baseUri) { - if (!self.protocol) { - self.protocol = baseUri.protocol; - } - if (!self.userInfo) { - self.userInfo = baseUri.userInfo; - } - if (!self.port && self.host === 'mce_host') { - self.port = baseUri.port; - } - if (!self.host || self.host === 'mce_host') { - self.host = baseUri.host; - } - self.source = ''; - } - if (isProtocolRelative) { - self.protocol = ''; - } - } - URI.parseDataUri = function (uri) { - var type; - var uriComponents = decodeURIComponent(uri).split(','); - var matches = /data:([^;]+)/.exec(uriComponents[0]); - if (matches) { - type = matches[1]; - } - return { - type: type, - data: uriComponents[1] - }; - }; - URI.getDocumentBaseUrl = function (loc) { - var baseUrl; - if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') { - baseUrl = loc.href; - } else { - baseUrl = loc.protocol + '//' + loc.host + loc.pathname; - } - if (/^[^:]+:\/\/\/?[^\/]+\//.test(baseUrl)) { - baseUrl = baseUrl.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, ''); - if (!/[\/\\]$/.test(baseUrl)) { - baseUrl += '/'; - } - } - return baseUrl; - }; - URI.prototype.setPath = function (path) { - var pathMatch = /^(.*?)\/?(\w+)?$/.exec(path); - this.path = pathMatch[0]; - this.directory = pathMatch[1]; - this.file = pathMatch[2]; - this.source = ''; - this.getURI(); - }; - URI.prototype.toRelative = function (uri) { - var output; - if (uri === './') { - return uri; - } - var relativeUri = new URI(uri, { base_uri: this }); - if (relativeUri.host !== 'mce_host' && this.host !== relativeUri.host && relativeUri.host || this.port !== relativeUri.port || this.protocol !== relativeUri.protocol && relativeUri.protocol !== '') { - return relativeUri.getURI(); - } - var tu = this.getURI(), uu = relativeUri.getURI(); - if (tu === uu || tu.charAt(tu.length - 1) === '/' && tu.substr(0, tu.length - 1) === uu) { - return tu; - } - output = this.toRelPath(this.path, relativeUri.path); - if (relativeUri.query) { - output += '?' + relativeUri.query; - } - if (relativeUri.anchor) { - output += '#' + relativeUri.anchor; - } - return output; - }; - URI.prototype.toAbsolute = function (uri, noHost) { - var absoluteUri = new URI(uri, { base_uri: this }); - return absoluteUri.getURI(noHost && this.isSameOrigin(absoluteUri)); - }; - URI.prototype.isSameOrigin = function (uri) { - if (this.host == uri.host && this.protocol == uri.protocol) { - if (this.port == uri.port) { - return true; - } - var defaultPort = DEFAULT_PORTS[this.protocol]; - if (defaultPort && (this.port || defaultPort) == (uri.port || defaultPort)) { - return true; - } - } - return false; - }; - URI.prototype.toRelPath = function (base, path) { - var items, breakPoint = 0, out = '', i, l; - var normalizedBase = base.substring(0, base.lastIndexOf('/')).split('/'); - items = path.split('/'); - if (normalizedBase.length >= items.length) { - for (i = 0, l = normalizedBase.length; i < l; i++) { - if (i >= items.length || normalizedBase[i] !== items[i]) { - breakPoint = i + 1; - break; - } - } - } - if (normalizedBase.length < items.length) { - for (i = 0, l = items.length; i < l; i++) { - if (i >= normalizedBase.length || normalizedBase[i] !== items[i]) { - breakPoint = i + 1; - break; - } - } - } - if (breakPoint === 1) { - return path; - } - for (i = 0, l = normalizedBase.length - (breakPoint - 1); i < l; i++) { - out += '../'; - } - for (i = breakPoint - 1, l = items.length; i < l; i++) { - if (i !== breakPoint - 1) { - out += '/' + items[i]; - } else { - out += items[i]; - } - } - return out; - }; - URI.prototype.toAbsPath = function (base, path) { - var i, nb = 0, o = [], tr, outPath; - tr = /\/$/.test(path) ? '/' : ''; - var normalizedBase = base.split('/'); - var normalizedPath = path.split('/'); - each$i(normalizedBase, function (k) { - if (k) { - o.push(k); - } - }); - normalizedBase = o; - for (i = normalizedPath.length - 1, o = []; i >= 0; i--) { - if (normalizedPath[i].length === 0 || normalizedPath[i] === '.') { - continue; - } - if (normalizedPath[i] === '..') { - nb++; - continue; - } - if (nb > 0) { - nb--; - continue; - } - o.push(normalizedPath[i]); - } - i = normalizedBase.length - nb; - if (i <= 0) { - outPath = o.reverse().join('/'); - } else { - outPath = normalizedBase.slice(0, i).join('/') + '/' + o.reverse().join('/'); - } - if (outPath.indexOf('/') !== 0) { - outPath = '/' + outPath; - } - if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) { - outPath += tr; - } - return outPath; - }; - URI.prototype.getURI = function (noProtoHost) { - if (noProtoHost === void 0) { - noProtoHost = false; - } - var s; - if (!this.source || noProtoHost) { - s = ''; - if (!noProtoHost) { - if (this.protocol) { - s += this.protocol + '://'; - } else { - s += '//'; - } - if (this.userInfo) { - s += this.userInfo + '@'; - } - if (this.host) { - s += this.host; - } - if (this.port) { - s += ':' + this.port; - } - } - if (this.path) { - s += this.path; - } - if (this.query) { - s += '?' + this.query; - } - if (this.anchor) { - s += '#' + this.anchor; - } - this.source = s; - } - return this.source; - }; - return URI; - }(); - - var create$4 = function () { - var buttons = {}; - var menuItems = {}; - var popups = {}; - var icons = {}; - var contextMenus = {}; - var contextToolbars = {}; - var sidebars = {}; - var add = function (collection, type) { - return function (name, spec) { - return collection[name.toLowerCase()] = merge({ type: type }, spec); - }; - }; - var addIcon = function (name, svgData) { - return icons[name.toLowerCase()] = svgData; - }; - return { - addButton: add(buttons, 'button'), - addToggleButton: add(buttons, 'togglebutton'), - addMenuButton: add(buttons, 'menubutton'), - addSplitButton: add(buttons, 'splitbutton'), - addMenuItem: add(menuItems, 'menuitem'), - addNestedMenuItem: add(menuItems, 'nestedmenuitem'), - addToggleMenuItem: add(menuItems, 'togglemenuitem'), - addAutocompleter: add(popups, 'autocompleter'), - addContextMenu: add(contextMenus, 'contextmenu'), - addContextToolbar: add(contextToolbars, 'contexttoolbar'), - addContextForm: add(contextToolbars, 'contextform'), - addSidebar: add(sidebars, 'sidebar'), - addIcon: addIcon, - getAll: function () { - return { - buttons: buttons, - menuItems: menuItems, - icons: icons, - popups: popups, - contextMenus: contextMenus, - contextToolbars: contextToolbars, - sidebars: sidebars - }; - } - }; - }; - - var registry = function () { - var bridge = create$4(); - return { - addAutocompleter: bridge.addAutocompleter, - addButton: bridge.addButton, - addContextForm: bridge.addContextForm, - addContextMenu: bridge.addContextMenu, - addContextToolbar: bridge.addContextToolbar, - addIcon: bridge.addIcon, - addMenuButton: bridge.addMenuButton, - addMenuItem: bridge.addMenuItem, - addNestedMenuItem: bridge.addNestedMenuItem, - addSidebar: bridge.addSidebar, - addSplitButton: bridge.addSplitButton, - addToggleButton: bridge.addToggleButton, - addToggleMenuItem: bridge.addToggleMenuItem, - getAll: bridge.getAll - }; - }; - - var DOM$7 = DOMUtils$1.DOM; - var extend$3 = Tools.extend, each$j = Tools.each; - var resolve$4 = Tools.resolve; - var ie$2 = Env.ie; - var Editor = function () { - function Editor(id, settings, editorManager) { - var _this = this; - this.plugins = {}; - this.contentCSS = []; - this.contentStyles = []; - this.loadedCSS = {}; - this.isNotDirty = false; - this.editorManager = editorManager; - this.documentBaseUrl = editorManager.documentBaseURL; - this.baseUri = editorManager.baseURI; - extend$3(this, EditorObservable); - this.settings = getEditorSettings(this, id, this.documentBaseUrl, editorManager.defaultSettings, settings); - AddOnManager$1.languageLoad = this.settings.language_load; - AddOnManager$1.baseURL = editorManager.baseURL; - this.id = id; - this.setDirty(false); - this.documentBaseURI = new URI(this.settings.document_base_url, { base_uri: this.baseUri }); - this.baseURI = this.baseUri; - this.inline = this.settings.inline; - this.suffix = editorManager.suffix; - this.shortcuts = new Shortcuts(this); - this.editorCommands = new EditorCommands(this); - if (this.settings.cache_suffix) { - Env.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, ''); - } - if (this.settings.override_viewport === false) { - Env.overrideViewPort = false; - } - this.ui = { registry: registry() }; - var self = this; - var modeInstance = create$3(self); - this.mode = modeInstance; - this.setMode = modeInstance.set; - editorManager.fire('SetupEditor', { editor: this }); - this.execCallback('setup', this); - this.$ = DomQuery.overrideDefaults(function () { - return { - context: _this.inline ? _this.getBody() : _this.getDoc(), - element: _this.getBody() - }; - }); - } - Editor.prototype.render = function () { - Render.render(this); - }; - Editor.prototype.focus = function (skipFocus) { - EditorFocus.focus(this, skipFocus); - }; - Editor.prototype.hasFocus = function () { - return EditorFocus.hasFocus(this); - }; - Editor.prototype.execCallback = function (name) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } - var self = this; - var callback = self.settings[name], scope; - if (!callback) { - return; - } - if (self.callbackLookup && (scope = self.callbackLookup[name])) { - callback = scope.func; - scope = scope.scope; - } - if (typeof callback === 'string') { - scope = callback.replace(/\.\w+$/, ''); - scope = scope ? resolve$4(scope) : 0; - callback = resolve$4(callback); - self.callbackLookup = self.callbackLookup || {}; - self.callbackLookup[name] = { - func: callback, - scope: scope - }; - } - return callback.apply(scope || self, Array.prototype.slice.call(arguments, 1)); - }; - Editor.prototype.translate = function (text) { - return I18n.translate(text); - }; - Editor.prototype.getParam = function (name, defaultVal, type) { - return getParam(this, name, defaultVal, type); - }; - Editor.prototype.nodeChanged = function (args) { - this._nodeChangeDispatcher.nodeChanged(args); - }; - Editor.prototype.addCommand = function (name, callback, scope) { - this.editorCommands.addCommand(name, callback, scope); - }; - Editor.prototype.addQueryStateHandler = function (name, callback, scope) { - this.editorCommands.addQueryStateHandler(name, callback, scope); - }; - Editor.prototype.addQueryValueHandler = function (name, callback, scope) { - this.editorCommands.addQueryValueHandler(name, callback, scope); - }; - Editor.prototype.addShortcut = function (pattern, desc, cmdFunc, scope) { - this.shortcuts.add(pattern, desc, cmdFunc, scope); - }; - Editor.prototype.execCommand = function (cmd, ui, value, args) { - return this.editorCommands.execCommand(cmd, ui, value, args); - }; - Editor.prototype.queryCommandState = function (cmd) { - return this.editorCommands.queryCommandState(cmd); - }; - Editor.prototype.queryCommandValue = function (cmd) { - return this.editorCommands.queryCommandValue(cmd); - }; - Editor.prototype.queryCommandSupported = function (cmd) { - return this.editorCommands.queryCommandSupported(cmd); - }; - Editor.prototype.show = function () { - var self = this; - if (self.hidden) { - self.hidden = false; - if (self.inline) { - self.getBody().contentEditable = 'true'; - } else { - DOM$7.show(self.getContainer()); - DOM$7.hide(self.id); - } - self.load(); - self.fire('show'); - } - }; - Editor.prototype.hide = function () { - var self = this, doc = self.getDoc(); - if (!self.hidden) { - if (ie$2 && doc && !self.inline) { - doc.execCommand('SelectAll'); - } - self.save(); - if (self.inline) { - self.getBody().contentEditable = 'false'; - if (self === self.editorManager.focusedEditor) { - self.editorManager.focusedEditor = null; - } - } else { - DOM$7.hide(self.getContainer()); - DOM$7.setStyle(self.id, 'display', self.orgDisplay); - } - self.hidden = true; - self.fire('hide'); - } - }; - Editor.prototype.isHidden = function () { - return !!this.hidden; - }; - Editor.prototype.setProgressState = function (state, time) { - this.fire('ProgressState', { - state: state, - time: time - }); - }; - Editor.prototype.load = function (args) { - var self = this; - var elm = self.getElement(), html; - if (self.removed) { - return ''; - } - if (elm) { - args = args || {}; - args.load = true; - var value = elm.value; - html = self.setContent(value !== undefined ? value : elm.innerHTML, args); - args.element = elm; - if (!args.no_events) { - self.fire('LoadContent', args); - } - args.element = elm = null; - return html; - } - }; - Editor.prototype.save = function (args) { - var self = this; - var elm = self.getElement(), html, form; - if (!elm || !self.initialized || self.removed) { - return; - } - args = args || {}; - args.save = true; - args.element = elm; - html = args.content = self.getContent(args); - if (!args.no_events) { - self.fire('SaveContent', args); - } - if (args.format === 'raw') { - self.fire('RawSaveContent', args); - } - html = args.content; - if (!/TEXTAREA|INPUT/i.test(elm.nodeName)) { - if (args.is_removing || !self.inline) { - elm.innerHTML = html; - } - if (form = DOM$7.getParent(self.id, 'form')) { - each$j(form.elements, function (elm) { - if (elm.name === self.id) { - elm.value = html; - return false; - } - }); - } - } else { - elm.value = html; - } - args.element = elm = null; - if (args.set_dirty !== false) { - self.setDirty(false); - } - return html; - }; - Editor.prototype.setContent = function (content, args) { - return setContent(this, content, args); - }; - Editor.prototype.getContent = function (args) { - return getContent(this, args); - }; - Editor.prototype.insertContent = function (content, args) { - if (args) { - content = extend$3({ content: content }, args); - } - this.execCommand('mceInsertContent', false, content); - }; - Editor.prototype.resetContent = function (initialContent) { - if (initialContent === undefined) { - setContent(this, this.startContent, { format: 'raw' }); - } else { - setContent(this, initialContent); - } - this.undoManager.reset(); - this.setDirty(false); - this.nodeChanged(); - }; - Editor.prototype.isDirty = function () { - return !this.isNotDirty; - }; - Editor.prototype.setDirty = function (state) { - var oldState = !this.isNotDirty; - this.isNotDirty = !state; - if (state && state !== oldState) { - this.fire('dirty'); - } - }; - Editor.prototype.getContainer = function () { - var self = this; - if (!self.container) { - self.container = DOM$7.get(self.editorContainer || self.id + '_parent'); - } - return self.container; - }; - Editor.prototype.getContentAreaContainer = function () { - return this.contentAreaContainer; - }; - Editor.prototype.getElement = function () { - if (!this.targetElm) { - this.targetElm = DOM$7.get(this.id); - } - return this.targetElm; - }; - Editor.prototype.getWin = function () { - var self = this; - var elm; - if (!self.contentWindow) { - elm = self.iframeElement; - if (elm) { - self.contentWindow = elm.contentWindow; - } - } - return self.contentWindow; - }; - Editor.prototype.getDoc = function () { - var self = this; - var win; - if (!self.contentDocument) { - win = self.getWin(); - if (win) { - self.contentDocument = win.document; - } - } - return self.contentDocument; - }; - Editor.prototype.getBody = function () { - var doc = this.getDoc(); - return this.bodyElement || (doc ? doc.body : null); - }; - Editor.prototype.convertURL = function (url, name, elm) { - var self = this, settings = self.settings; - if (settings.urlconverter_callback) { - return self.execCallback('urlconverter_callback', url, elm, true, name); - } - if (!settings.convert_urls || elm && elm.nodeName === 'LINK' || url.indexOf('file:') === 0 || url.length === 0) { - return url; - } - if (settings.relative_urls) { - return self.documentBaseURI.toRelative(url); - } - url = self.documentBaseURI.toAbsolute(url, settings.remove_script_host); - return url; - }; - Editor.prototype.addVisual = function (elm) { - var self = this; - var settings = self.settings; - var dom = self.dom; - var cls; - elm = elm || self.getBody(); - if (self.hasVisual === undefined) { - self.hasVisual = settings.visual; - } - each$j(dom.select('table,a', elm), function (elm) { - var value; - switch (elm.nodeName) { - case 'TABLE': - cls = settings.visual_table_class || 'mce-item-table'; - value = dom.getAttrib(elm, 'border'); - if ((!value || value === '0') && self.hasVisual) { - dom.addClass(elm, cls); - } else { - dom.removeClass(elm, cls); - } - return; - case 'A': - if (!dom.getAttrib(elm, 'href')) { - value = dom.getAttrib(elm, 'name') || elm.id; - cls = settings.visual_anchor_class || 'mce-item-anchor'; - if (value && self.hasVisual) { - dom.addClass(elm, cls); - } else { - dom.removeClass(elm, cls); - } - } - return; - } - }); - self.fire('VisualAid', { - element: elm, - hasVisual: self.hasVisual - }); - }; - Editor.prototype.remove = function () { - remove$6(this); - }; - Editor.prototype.destroy = function (automatic) { - destroy(this, automatic); - }; - Editor.prototype.uploadImages = function (callback) { - return this.editorUpload.uploadImages(callback); - }; - Editor.prototype._scanForImages = function () { - return this.editorUpload.scanForImages(); - }; - Editor.prototype.addButton = function () { - throw new Error('editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead'); - }; - Editor.prototype.addSidebar = function () { - throw new Error('editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead'); - }; - Editor.prototype.addMenuItem = function () { - throw new Error('editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead'); - }; - Editor.prototype.addContextToolbar = function () { - throw new Error('editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead'); - }; - return Editor; - }(); - - var isEditorUIElement = function (elm) { - return elm.className.toString().indexOf('tox-') !== -1 || elm.className.toString().indexOf('mce-') !== -1; - }; - var FocusManager = { isEditorUIElement: isEditorUIElement }; - - var isManualNodeChange = function (e) { - return e.type === 'nodechange' && e.selectionChange; - }; - var registerPageMouseUp = function (editor, throttledStore) { - var mouseUpPage = function () { - throttledStore.throttle(); - }; - DOMUtils$1.DOM.bind(domGlobals.document, 'mouseup', mouseUpPage); - editor.on('remove', function () { - DOMUtils$1.DOM.unbind(domGlobals.document, 'mouseup', mouseUpPage); - }); - }; - var registerFocusOut = function (editor) { - editor.on('focusout', function () { - SelectionBookmark.store(editor); - }); - }; - var registerMouseUp = function (editor, throttledStore) { - editor.on('mouseup touchend', function (e) { - throttledStore.throttle(); - }); - }; - var registerEditorEvents = function (editor, throttledStore) { - var browser = PlatformDetection$1.detect().browser; - if (browser.isIE()) { - registerFocusOut(editor); - } else { - registerMouseUp(editor, throttledStore); - } - editor.on('keyup NodeChange', function (e) { - if (!isManualNodeChange(e)) { - SelectionBookmark.store(editor); - } - }); - }; - var register$3 = function (editor) { - var throttledStore = first(function () { - SelectionBookmark.store(editor); - }, 0); - if (editor.inline) { - registerPageMouseUp(editor, throttledStore); - } - editor.on('init', function () { - registerEditorEvents(editor, throttledStore); - }); - editor.on('remove', function () { - throttledStore.cancel(); - }); - }; - var SelectionRestore = { register: register$3 }; - - var documentFocusInHandler; - var DOM$8 = DOMUtils$1.DOM; - var isEditorUIElement$1 = function (elm) { - return FocusManager.isEditorUIElement(elm); - }; - var isUIElement = function (editor, elm) { - var customSelector = editor ? editor.settings.custom_ui_selector : ''; - var parent = DOM$8.getParent(elm, function (elm) { - return isEditorUIElement$1(elm) || (customSelector ? editor.dom.is(elm, customSelector) : false); - }); - return parent !== null; - }; - var getActiveElement = function () { - try { - return domGlobals.document.activeElement; - } catch (ex) { - return domGlobals.document.body; - } - }; - var registerEvents = function (editorManager, e) { - var editor = e.editor; - SelectionRestore.register(editor); - editor.on('focusin', function () { - var self = this; - var focusedEditor = editorManager.focusedEditor; - if (focusedEditor !== self) { - if (focusedEditor) { - focusedEditor.fire('blur', { focusedEditor: self }); - } - editorManager.setActive(self); - editorManager.focusedEditor = self; - self.fire('focus', { blurredEditor: focusedEditor }); - self.focus(true); - } - }); - editor.on('focusout', function () { - var self = this; - Delay.setEditorTimeout(self, function () { - var focusedEditor = editorManager.focusedEditor; - if (!isUIElement(self, getActiveElement()) && focusedEditor === self) { - self.fire('blur', { focusedEditor: null }); - editorManager.focusedEditor = null; - } - }); - }); - if (!documentFocusInHandler) { - documentFocusInHandler = function (e) { - var activeEditor = editorManager.activeEditor; - var target; - target = e.target; - if (activeEditor && target.ownerDocument === domGlobals.document) { - if (target !== domGlobals.document.body && !isUIElement(activeEditor, target) && editorManager.focusedEditor === activeEditor) { - activeEditor.fire('blur', { focusedEditor: null }); - editorManager.focusedEditor = null; - } - } - }; - DOM$8.bind(domGlobals.document, 'focusin', documentFocusInHandler); - } - }; - var unregisterDocumentEvents = function (editorManager, e) { - if (editorManager.focusedEditor === e.editor) { - editorManager.focusedEditor = null; - } - if (!editorManager.activeEditor) { - DOM$8.unbind(domGlobals.document, 'focusin', documentFocusInHandler); - documentFocusInHandler = null; - } - }; - var setup$h = function (editorManager) { - editorManager.on('AddEditor', curry(registerEvents, editorManager)); - editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager)); - }; - var FocusController = { - setup: setup$h, - isEditorUIElement: isEditorUIElement$1, - isUIElement: isUIElement - }; - - var DOM$9 = DOMUtils$1.DOM; - var explode$4 = Tools.explode, each$k = Tools.each, extend$4 = Tools.extend; - var instanceCounter = 0, beforeUnloadDelegate, boundGlobalEvents = false; - var legacyEditors = []; - var editors = []; - var isValidLegacyKey = function (id) { - return id !== 'length'; - }; - var globalEventDelegate = function (e) { - var type = e.type; - each$k(EditorManager.get(), function (editor) { - switch (type) { - case 'scroll': - editor.fire('ScrollWindow', e); - break; - case 'resize': - editor.fire('ResizeWindow', e); - break; - } - }); - }; - var toggleGlobalEvents = function (state) { - if (state !== boundGlobalEvents) { - if (state) { - DomQuery(window).on('resize scroll', globalEventDelegate); - } else { - DomQuery(window).off('resize scroll', globalEventDelegate); - } - boundGlobalEvents = state; - } - }; - var removeEditorFromList = function (targetEditor) { - var oldEditors = editors; - delete legacyEditors[targetEditor.id]; - for (var i = 0; i < legacyEditors.length; i++) { - if (legacyEditors[i] === targetEditor) { - legacyEditors.splice(i, 1); - break; - } - } - editors = filter(editors, function (editor) { - return targetEditor !== editor; - }); - if (EditorManager.activeEditor === targetEditor) { - EditorManager.activeEditor = editors.length > 0 ? editors[0] : null; - } - if (EditorManager.focusedEditor === targetEditor) { - EditorManager.focusedEditor = null; - } - return oldEditors.length !== editors.length; - }; - var purgeDestroyedEditor = function (editor) { - if (editor && editor.initialized && !(editor.getContainer() || editor.getBody()).parentNode) { - removeEditorFromList(editor); - editor.unbindAllNativeEvents(); - editor.destroy(true); - editor.removed = true; - editor = null; - } - return editor; - }; - var EditorManager = __assign({}, Observable, { - _beforeUnloadHandler: null, - baseURI: null, - baseURL: null, - defaultSettings: {}, - documentBaseURL: null, - suffix: null, - $: DomQuery, - majorVersion: '5', - minorVersion: '0.4', - releaseDate: '2019-04-23', - editors: legacyEditors, - i18n: I18n, - activeEditor: null, - focusedEditor: null, - settings: {}, - setup: function () { - var self = this; - var baseURL, documentBaseURL, suffix = '', preInit, src; - documentBaseURL = URI.getDocumentBaseUrl(domGlobals.document.location); - if (/^[^:]+:\/\/\/?[^\/]+\//.test(documentBaseURL)) { - documentBaseURL = documentBaseURL.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, ''); - if (!/[\/\\]$/.test(documentBaseURL)) { - documentBaseURL += '/'; - } - } - preInit = window.tinymce || window.tinyMCEPreInit; - if (preInit) { - baseURL = preInit.base || preInit.baseURL; - suffix = preInit.suffix; - } else { - var scripts = domGlobals.document.getElementsByTagName('script'); - for (var i = 0; i < scripts.length; i++) { - src = scripts[i].src; - var srcScript = src.substring(src.lastIndexOf('/')); - if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(src)) { - if (srcScript.indexOf('.min') !== -1) { - suffix = '.min'; - } - baseURL = src.substring(0, src.lastIndexOf('/')); - break; - } - } - if (!baseURL && domGlobals.document.currentScript) { - src = domGlobals.document.currentScript.src; - if (src.indexOf('.min') !== -1) { - suffix = '.min'; - } - baseURL = src.substring(0, src.lastIndexOf('/')); - } - } - self.baseURL = new URI(documentBaseURL).toAbsolute(baseURL); - self.documentBaseURL = documentBaseURL; - self.baseURI = new URI(self.baseURL); - self.suffix = suffix; - FocusController.setup(self); - }, - overrideDefaults: function (defaultSettings) { - var baseUrl, suffix; - baseUrl = defaultSettings.base_url; - if (baseUrl) { - this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, '')); - this.baseURI = new URI(this.baseURL); - } - suffix = defaultSettings.suffix; - if (defaultSettings.suffix) { - this.suffix = suffix; - } - this.defaultSettings = defaultSettings; - var pluginBaseUrls = defaultSettings.plugin_base_urls; - for (var name in pluginBaseUrls) { - AddOnManager$1.PluginManager.urls[name] = pluginBaseUrls[name]; - } - }, - init: function (settings) { - var self = this; - var result, invalidInlineTargets; - invalidInlineTargets = Tools.makeMap('area base basefont br col frame hr img input isindex link meta param embed source wbr track ' + 'colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu', ' '); - var isInvalidInlineTarget = function (settings, elm) { - return settings.inline && elm.tagName.toLowerCase() in invalidInlineTargets; - }; - var createId = function (elm) { - var id = elm.id; - if (!id) { - id = elm.name; - if (id && !DOM$9.get(id)) { - id = elm.name; - } else { - id = DOM$9.uniqueId(); - } - elm.setAttribute('id', id); - } - return id; - }; - var execCallback = function (name) { - var callback = settings[name]; - if (!callback) { - return; - } - return callback.apply(self, Array.prototype.slice.call(arguments, 2)); - }; - var hasClass = function (elm, className) { - return className.constructor === RegExp ? className.test(elm.className) : DOM$9.hasClass(elm, className); - }; - var findTargets = function (settings) { - var l, targets = []; - if (Env.ie && Env.ie < 11) { - ErrorReporter.initError('TinyMCE does not support the browser you are using. For a list of supported' + ' browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/'); - return []; - } - if (settings.types) { - each$k(settings.types, function (type) { - targets = targets.concat(DOM$9.select(type.selector)); - }); - return targets; - } else if (settings.selector) { - return DOM$9.select(settings.selector); - } else if (settings.target) { - return [settings.target]; - } - switch (settings.mode) { - case 'exact': - l = settings.elements || ''; - if (l.length > 0) { - each$k(explode$4(l), function (id) { - var elm; - if (elm = DOM$9.get(id)) { - targets.push(elm); - } else { - each$k(domGlobals.document.forms, function (f) { - each$k(f.elements, function (e) { - if (e.name === id) { - id = 'mce_editor_' + instanceCounter++; - DOM$9.setAttrib(e, 'id', id); - targets.push(e); - } - }); - }); - } - }); - } - break; - case 'textareas': - case 'specific_textareas': - each$k(DOM$9.select('textarea'), function (elm) { - if (settings.editor_deselector && hasClass(elm, settings.editor_deselector)) { - return; - } - if (!settings.editor_selector || hasClass(elm, settings.editor_selector)) { - targets.push(elm); - } - }); - break; - } - return targets; - }; - var provideResults = function (editors) { - result = editors; - }; - var initEditors = function () { - var initCount = 0; - var editors = []; - var targets; - var createEditor = function (id, settings, targetElm) { - var editor = new Editor(id, settings, self); - editors.push(editor); - editor.on('init', function () { - if (++initCount === targets.length) { - provideResults(editors); - } - }); - editor.targetElm = editor.targetElm || targetElm; - editor.render(); - }; - DOM$9.unbind(window, 'ready', initEditors); - execCallback('onpageload'); - targets = DomQuery.unique(findTargets(settings)); - if (settings.types) { - each$k(settings.types, function (type) { - Tools.each(targets, function (elm) { - if (DOM$9.is(elm, type.selector)) { - createEditor(createId(elm), extend$4({}, settings, type), elm); - return false; - } - return true; - }); - }); - return; - } - Tools.each(targets, function (elm) { - purgeDestroyedEditor(self.get(elm.id)); - }); - targets = Tools.grep(targets, function (elm) { - return !self.get(elm.id); - }); - if (targets.length === 0) { - provideResults([]); - } else { - each$k(targets, function (elm) { - if (isInvalidInlineTarget(settings, elm)) { - ErrorReporter.initError('Could not initialize inline editor on invalid inline target element', elm); - } else { - createEditor(createId(elm), settings, elm); - } - }); - } - }; - self.settings = settings; - DOM$9.bind(window, 'ready', initEditors); - return new promiseObj(function (resolve) { - if (result) { - resolve(result); - } else { - provideResults = function (editors) { - resolve(editors); - }; - } - }); - }, - get: function (id) { - if (arguments.length === 0) { - return editors.slice(0); - } else if (isString(id)) { - return find(editors, function (editor) { - return editor.id === id; - }).getOr(null); - } else if (isNumber(id)) { - return editors[id] ? editors[id] : null; - } else { - return null; - } - }, - add: function (editor) { - var self = this; - var existingEditor; - existingEditor = legacyEditors[editor.id]; - if (existingEditor === editor) { - return editor; - } - if (self.get(editor.id) === null) { - if (isValidLegacyKey(editor.id)) { - legacyEditors[editor.id] = editor; - } - legacyEditors.push(editor); - editors.push(editor); - } - toggleGlobalEvents(true); - self.activeEditor = editor; - self.fire('AddEditor', { editor: editor }); - if (!beforeUnloadDelegate) { - beforeUnloadDelegate = function () { - self.fire('BeforeUnload'); - }; - DOM$9.bind(window, 'beforeunload', beforeUnloadDelegate); - } - return editor; - }, - createEditor: function (id, settings) { - return this.add(new Editor(id, settings, this)); - }, - remove: function (selector) { - var self = this; - var i, editor; - if (!selector) { - for (i = editors.length - 1; i >= 0; i--) { - self.remove(editors[i]); - } - return; - } - if (isString(selector)) { - each$k(DOM$9.select(selector), function (elm) { - editor = self.get(elm.id); - if (editor) { - self.remove(editor); - } - }); - return; - } - editor = selector; - if (isNull(self.get(editor.id))) { - return null; - } - if (removeEditorFromList(editor)) { - self.fire('RemoveEditor', { editor: editor }); - } - if (editors.length === 0) { - DOM$9.unbind(window, 'beforeunload', beforeUnloadDelegate); - } - editor.remove(); - toggleGlobalEvents(editors.length > 0); - return editor; - }, - execCommand: function (cmd, ui, value) { - var self = this, editor = self.get(value); - switch (cmd) { - case 'mceAddEditor': - if (!self.get(value)) { - new Editor(value, self.settings, self).render(); - } - return true; - case 'mceRemoveEditor': - if (editor) { - editor.remove(); - } - return true; - case 'mceToggleEditor': - if (!editor) { - self.execCommand('mceAddEditor', 0, value); - return true; - } - if (editor.isHidden()) { - editor.show(); - } else { - editor.hide(); - } - return true; - } - if (self.activeEditor) { - return self.activeEditor.execCommand(cmd, ui, value); - } - return false; - }, - triggerSave: function () { - each$k(editors, function (editor) { - editor.save(); - }); - }, - addI18n: function (code, items) { - I18n.add(code, items); - }, - translate: function (text) { - return I18n.translate(text); - }, - setActive: function (editor) { - var activeEditor = this.activeEditor; - if (this.activeEditor !== editor) { - if (activeEditor) { - activeEditor.fire('deactivate', { relatedTarget: editor }); - } - editor.fire('activate', { relatedTarget: activeEditor }); - } - this.activeEditor = editor; - } - }); - EditorManager.setup(); - - function RangeUtils(dom) { - var walk = function (rng, callback) { - return RangeWalk.walk(dom, rng, callback); - }; - var split = split$1; - var normalize = function (rng) { - return NormalizeRange.normalize(dom, rng).fold(constant(false), function (normalizedRng) { - rng.setStart(normalizedRng.startContainer, normalizedRng.startOffset); - rng.setEnd(normalizedRng.endContainer, normalizedRng.endOffset); - return true; - }); - }; - return { - walk: walk, - split: split, - normalize: normalize - }; - } - (function (RangeUtils) { - RangeUtils.compareRanges = RangeCompare.isEq; - RangeUtils.getCaretRangeFromPoint = CaretRangeFromPoint.fromPoint; - RangeUtils.getSelectedNode = getSelectedNode; - RangeUtils.getNode = getNode; - }(RangeUtils || (RangeUtils = {}))); - var RangeUtils$1 = RangeUtils; - - var min = Math.min, max = Math.max, round$2 = Math.round; - var relativePosition = function (rect, targetRect, rel) { - var x, y, w, h, targetW, targetH; - x = targetRect.x; - y = targetRect.y; - w = rect.w; - h = rect.h; - targetW = targetRect.w; - targetH = targetRect.h; - rel = (rel || '').split(''); - if (rel[0] === 'b') { - y += targetH; - } - if (rel[1] === 'r') { - x += targetW; - } - if (rel[0] === 'c') { - y += round$2(targetH / 2); - } - if (rel[1] === 'c') { - x += round$2(targetW / 2); - } - if (rel[3] === 'b') { - y -= h; - } - if (rel[4] === 'r') { - x -= w; - } - if (rel[3] === 'c') { - y -= round$2(h / 2); - } - if (rel[4] === 'c') { - x -= round$2(w / 2); - } - return create$5(x, y, w, h); - }; - var findBestRelativePosition = function (rect, targetRect, constrainRect, rels) { - var pos, i; - for (i = 0; i < rels.length; i++) { - pos = relativePosition(rect, targetRect, rels[i]); - if (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x && pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) { - return rels[i]; - } - } - return null; - }; - var inflate = function (rect, w, h) { - return create$5(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2); - }; - var intersect = function (rect, cropRect) { - var x1, y1, x2, y2; - x1 = max(rect.x, cropRect.x); - y1 = max(rect.y, cropRect.y); - x2 = min(rect.x + rect.w, cropRect.x + cropRect.w); - y2 = min(rect.y + rect.h, cropRect.y + cropRect.h); - if (x2 - x1 < 0 || y2 - y1 < 0) { - return null; - } - return create$5(x1, y1, x2 - x1, y2 - y1); - }; - var clamp$1 = function (rect, clampRect, fixedSize) { - var underflowX1, underflowY1, overflowX2, overflowY2, x1, y1, x2, y2, cx2, cy2; - x1 = rect.x; - y1 = rect.y; - x2 = rect.x + rect.w; - y2 = rect.y + rect.h; - cx2 = clampRect.x + clampRect.w; - cy2 = clampRect.y + clampRect.h; - underflowX1 = max(0, clampRect.x - x1); - underflowY1 = max(0, clampRect.y - y1); - overflowX2 = max(0, x2 - cx2); - overflowY2 = max(0, y2 - cy2); - x1 += underflowX1; - y1 += underflowY1; - if (fixedSize) { - x2 += underflowX1; - y2 += underflowY1; - x1 -= overflowX2; - y1 -= overflowY2; - } - x2 -= overflowX2; - y2 -= overflowY2; - return create$5(x1, y1, x2 - x1, y2 - y1); - }; - var create$5 = function (x, y, w, h) { - return { - x: x, - y: y, - w: w, - h: h - }; - }; - var fromClientRect = function (clientRect) { - return create$5(clientRect.left, clientRect.top, clientRect.width, clientRect.height); - }; - var Rect = { - inflate: inflate, - relativePosition: relativePosition, - findBestRelativePosition: findBestRelativePosition, - intersect: intersect, - clamp: clamp$1, - create: create$5, - fromClientRect: fromClientRect - }; - - var each$l = Tools.each, extend$5 = Tools.extend; - var extendClass, initializing; - var Class = function () { - }; - Class.extend = extendClass = function (prop) { - var self = this; - var _super = self.prototype; - var prototype, name, member; - var Class = function () { - var i, mixins, mixin; - var self = this; - if (!initializing) { - if (self.init) { - self.init.apply(self, arguments); - } - mixins = self.Mixins; - if (mixins) { - i = mixins.length; - while (i--) { - mixin = mixins[i]; - if (mixin.init) { - mixin.init.apply(self, arguments); - } - } - } - } - }; - var dummy = function () { - return this; - }; - var createMethod = function (name, fn) { - return function () { - var self = this; - var tmp = self._super; - var ret; - self._super = _super[name]; - ret = fn.apply(self, arguments); - self._super = tmp; - return ret; - }; - }; - initializing = true; - prototype = new self(); - initializing = false; - if (prop.Mixins) { - each$l(prop.Mixins, function (mixin) { - for (var name_1 in mixin) { - if (name_1 !== 'init') { - prop[name_1] = mixin[name_1]; - } - } - }); - if (_super.Mixins) { - prop.Mixins = _super.Mixins.concat(prop.Mixins); - } - } - if (prop.Methods) { - each$l(prop.Methods.split(','), function (name) { - prop[name] = dummy; - }); - } - if (prop.Properties) { - each$l(prop.Properties.split(','), function (name) { - var fieldName = '_' + name; - prop[name] = function (value) { - var self = this; - if (value !== undefined) { - self[fieldName] = value; - return self; - } - return self[fieldName]; - }; - }); - } - if (prop.Statics) { - each$l(prop.Statics, function (func, name) { - Class[name] = func; - }); - } - if (prop.Defaults && _super.Defaults) { - prop.Defaults = extend$5({}, _super.Defaults, prop.Defaults); - } - for (name in prop) { - member = prop[name]; - if (typeof member === 'function' && _super[name]) { - prototype[name] = createMethod(name, member); - } else { - prototype[name] = member; - } - } - Class.prototype = prototype; - Class.constructor = Class; - Class.extend = extendClass; - return Class; - }; - - var min$1 = Math.min, max$1 = Math.max, round$3 = Math.round; - var Color = function (value) { - var self = {}; - var r = 0, g = 0, b = 0; - var rgb2hsv = function (r, g, b) { - var h, s, v, d, minRGB, maxRGB; - h = 0; - s = 0; - v = 0; - r = r / 255; - g = g / 255; - b = b / 255; - minRGB = min$1(r, min$1(g, b)); - maxRGB = max$1(r, max$1(g, b)); - if (minRGB === maxRGB) { - v = minRGB; - return { - h: 0, - s: 0, - v: v * 100 - }; - } - d = r === minRGB ? g - b : b === minRGB ? r - g : b - r; - h = r === minRGB ? 3 : b === minRGB ? 1 : 5; - h = 60 * (h - d / (maxRGB - minRGB)); - s = (maxRGB - minRGB) / maxRGB; - v = maxRGB; - return { - h: round$3(h), - s: round$3(s * 100), - v: round$3(v * 100) - }; - }; - var hsvToRgb = function (hue, saturation, brightness) { - var side, chroma, x, match; - hue = (parseInt(hue, 10) || 0) % 360; - saturation = parseInt(saturation, 10) / 100; - brightness = parseInt(brightness, 10) / 100; - saturation = max$1(0, min$1(saturation, 1)); - brightness = max$1(0, min$1(brightness, 1)); - if (saturation === 0) { - r = g = b = round$3(255 * brightness); - return; - } - side = hue / 60; - chroma = brightness * saturation; - x = chroma * (1 - Math.abs(side % 2 - 1)); - match = brightness - chroma; - switch (Math.floor(side)) { - case 0: - r = chroma; - g = x; - b = 0; - break; - case 1: - r = x; - g = chroma; - b = 0; - break; - case 2: - r = 0; - g = chroma; - b = x; - break; - case 3: - r = 0; - g = x; - b = chroma; - break; - case 4: - r = x; - g = 0; - b = chroma; - break; - case 5: - r = chroma; - g = 0; - b = x; - break; - default: - r = g = b = 0; - } - r = round$3(255 * (r + match)); - g = round$3(255 * (g + match)); - b = round$3(255 * (b + match)); - }; - var toHex = function () { - var hex = function (val) { - val = parseInt(val, 10).toString(16); - return val.length > 1 ? val : '0' + val; - }; - return '#' + hex(r) + hex(g) + hex(b); - }; - var toRgb = function () { - return { - r: r, - g: g, - b: b - }; - }; - var toHsv = function () { - return rgb2hsv(r, g, b); - }; - var parse = function (value) { - var matches; - if (typeof value === 'object') { - if ('r' in value) { - r = value.r; - g = value.g; - b = value.b; - } else if ('v' in value) { - hsvToRgb(value.h, value.s, value.v); - } - } else { - if (matches = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(value)) { - r = parseInt(matches[1], 10); - g = parseInt(matches[2], 10); - b = parseInt(matches[3], 10); - } else if (matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value)) { - r = parseInt(matches[1], 16); - g = parseInt(matches[2], 16); - b = parseInt(matches[3], 16); - } else if (matches = /#([0-F])([0-F])([0-F])/gi.exec(value)) { - r = parseInt(matches[1] + matches[1], 16); - g = parseInt(matches[2] + matches[2], 16); - b = parseInt(matches[3] + matches[3], 16); - } - } - r = r < 0 ? 0 : r > 255 ? 255 : r; - g = g < 0 ? 0 : g > 255 ? 255 : g; - b = b < 0 ? 0 : b > 255 ? 255 : b; - return self; - }; - if (value) { - parse(value); - } - self.toRgb = toRgb; - self.toHsv = toHsv; - self.toHex = toHex; - self.parse = parse; - return self; - }; - - var serialize = function (obj) { - var data = JSON.stringify(obj); - if (!isString(data)) { - return data; - } - return data.replace(/[\u0080-\uFFFF]/g, function (match) { - var hexCode = match.charCodeAt(0).toString(16); - return '\\u' + '0000'.substring(hexCode.length) + hexCode; - }); - }; - var JSONUtils = { - serialize: serialize, - parse: function (text) { - try { - return JSON.parse(text); - } catch (ex) { - } - } - }; - - var JSONP = { - callbacks: {}, - count: 0, - send: function (settings) { - var self = this, dom = DOMUtils$1.DOM, count = settings.count !== undefined ? settings.count : self.count; - var id = 'tinymce_jsonp_' + count; - self.callbacks[count] = function (json) { - dom.remove(id); - delete self.callbacks[count]; - settings.callback(json); - }; - dom.add(dom.doc.body, 'script', { - id: id, - src: settings.url, - type: 'text/javascript' - }); - self.count++; - } - }; - - var XHR = __assign({}, Observable, { - send: function (settings) { - var xhr, count = 0; - var ready = function () { - if (!settings.async || xhr.readyState === 4 || count++ > 10000) { - if (settings.success && count < 10000 && xhr.status === 200) { - settings.success.call(settings.success_scope, '' + xhr.responseText, xhr, settings); - } else if (settings.error) { - settings.error.call(settings.error_scope, count > 10000 ? 'TIMED_OUT' : 'GENERAL', xhr, settings); - } - xhr = null; - } else { - Delay.setTimeout(ready, 10); - } - }; - settings.scope = settings.scope || this; - settings.success_scope = settings.success_scope || settings.scope; - settings.error_scope = settings.error_scope || settings.scope; - settings.async = settings.async !== false; - settings.data = settings.data || ''; - XHR.fire('beforeInitialize', { settings: settings }); - xhr = XMLHttpRequest(); - if (xhr) { - if (xhr.overrideMimeType) { - xhr.overrideMimeType(settings.content_type); - } - xhr.open(settings.type || (settings.data ? 'POST' : 'GET'), settings.url, settings.async); - if (settings.crossDomain) { - xhr.withCredentials = true; - } - if (settings.content_type) { - xhr.setRequestHeader('Content-Type', settings.content_type); - } - if (settings.requestheaders) { - Tools.each(settings.requestheaders, function (header) { - xhr.setRequestHeader(header.key, header.value); - }); - } - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - xhr = XHR.fire('beforeSend', { - xhr: xhr, - settings: settings - }).xhr; - xhr.send(settings.data); - if (!settings.async) { - return ready(); - } - Delay.setTimeout(ready, 10); - } - } - }); - - var extend$6 = Tools.extend; - var JSONRequest = function () { - function JSONRequest(settings) { - this.settings = extend$6({}, settings); - this.count = 0; - } - JSONRequest.sendRPC = function (o) { - return new JSONRequest().send(o); - }; - JSONRequest.prototype.send = function (args) { - var ecb = args.error, scb = args.success; - var xhrArgs = extend$6(this.settings, args); - xhrArgs.success = function (c, x) { - c = JSONUtils.parse(c); - if (typeof c === 'undefined') { - c = { error: 'JSON Parse error.' }; - } - if (c.error) { - ecb.call(xhrArgs.error_scope || xhrArgs.scope, c.error, x); - } else { - scb.call(xhrArgs.success_scope || xhrArgs.scope, c.result); - } - }; - xhrArgs.error = function (ty, x) { - if (ecb) { - ecb.call(xhrArgs.error_scope || xhrArgs.scope, ty, x); - } - }; - xhrArgs.data = JSONUtils.serialize({ - id: args.id || 'c' + this.count++, - method: args.method, - params: args.params - }); - xhrArgs.content_type = 'application/json'; - XHR.send(xhrArgs); - }; - return JSONRequest; - }(); - - var create$6 = function () { - return function () { - var data = {}; - var keys = []; - var storage = { - getItem: function (key) { - var item = data[key]; - return item ? item : null; - }, - setItem: function (key, value) { - keys.push(key); - data[key] = String(value); - }, - key: function (index) { - return keys[index]; - }, - removeItem: function (key) { - keys = keys.filter(function (k) { - return k === key; - }); - delete data[key]; - }, - clear: function () { - keys = []; - data = {}; - }, - length: 0 - }; - Object.defineProperty(storage, 'length', { - get: function () { - return keys.length; - }, - configurable: false, - enumerable: false - }); - return storage; - }(); - }; - - var localStorage; - try { - localStorage = domGlobals.window.localStorage; - } catch (e) { - localStorage = create$6(); - } - var LocalStorage = localStorage; - - var publicApi = { - geom: { Rect: Rect }, - util: { - Promise: promiseObj, - Delay: Delay, - Tools: Tools, - VK: VK, - URI: URI, - Class: Class, - EventDispatcher: EventDispatcher, - Observable: Observable, - I18n: I18n, - XHR: XHR, - JSON: JSONUtils, - JSONRequest: JSONRequest, - JSONP: JSONP, - LocalStorage: LocalStorage, - Color: Color - }, - dom: { - EventUtils: EventUtils, - Sizzle: Sizzle, - DomQuery: DomQuery, - TreeWalker: TreeWalker, - DOMUtils: DOMUtils$1, - ScriptLoader: ScriptLoader, - RangeUtils: RangeUtils$1, - Serializer: Serializer$1, - ControlSelection: ControlSelection, - BookmarkManager: BookmarkManager$1, - Selection: Selection, - Event: EventUtils.Event - }, - html: { - Styles: Styles, - Entities: Entities, - Node: Node$1, - Schema: Schema, - SaxParser: SaxParser$1, - DomParser: DomParser, - Writer: Writer, - Serializer: Serializer - }, - Env: Env, - AddOnManager: AddOnManager$1, - Annotator: Annotator, - Formatter: Formatter, - UndoManager: UndoManager, - EditorCommands: EditorCommands, - WindowManager: WindowManager, - NotificationManager: NotificationManager, - EditorObservable: EditorObservable, - Shortcuts: Shortcuts, - Editor: Editor, - FocusManager: FocusManager, - EditorManager: EditorManager, - DOM: DOMUtils$1.DOM, - ScriptLoader: ScriptLoader.ScriptLoader, - PluginManager: AddOnManager$1.PluginManager, - ThemeManager: AddOnManager$1.ThemeManager, - IconManager: IconManager, - trim: Tools.trim, - isArray: Tools.isArray, - is: Tools.is, - toArray: Tools.toArray, - makeMap: Tools.makeMap, - each: Tools.each, - map: Tools.map, - grep: Tools.grep, - inArray: Tools.inArray, - extend: Tools.extend, - create: Tools.create, - walk: Tools.walk, - createNS: Tools.createNS, - resolve: Tools.resolve, - explode: Tools.explode, - _addCacheSuffix: Tools._addCacheSuffix, - isOpera: Env.opera, - isWebKit: Env.webkit, - isIE: Env.ie, - isGecko: Env.gecko, - isMac: Env.mac - }; - var tinymce = Tools.extend(EditorManager, publicApi); - - var exportToModuleLoaders = function (tinymce) { - if (typeof module === 'object') { - try { - module.exports = tinymce; - } catch (_) { - } - } - }; - var exportToWindowGlobal = function (tinymce) { - window.tinymce = tinymce; - window.tinyMCE = tinymce; - }; - exportToWindowGlobal(tinymce); - exportToModuleLoaders(tinymce); - -}(window)); -})(); - - - -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - */ -/** - * Jquery integration plugin. - * - * @class tinymce.core.JqueryIntegration - * @private - */ - -!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){ -// Reference to tinymce needs to be lazily evaluated since tinymce -// might be loaded through the compressor or other means -return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r=""; -// No match then just ignore the call -if(!l.length)return l; -// Get editor instance -if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");// Hide textarea to avoid flicker -var n=function(){var a=[],c=0; -// Apply patches to the jQuery object, only once -u||(m(),u=!0), -// Create an editor instance for each matched node -l.each(function(e,t){var n,i=t.id,r=o.oninit; -// Generate unique id for target element if needed -i||(t.id=i=v().DOM.uniqueId()), -// Only init the editor once -v().get(i)||( -// Create editor instance and render it -n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""), -// Run this if the oninit setting is defined -// this logic will fire the oninit callback ones each -// matched editor instance is initialized -r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)), -// Call the oninit function with the object -t.apply(e||v(),a))}))}), -// Render the editor instances in a separate loop since we -// need to have the full editors array used in the onInit calls -p.each(a,function(e,t){t.render()})}; -// Load TinyMCE on demand, if we need to -if(d.tinymce||c||!(e=o.script_url)) -// Delay the init call until tinymce is loaded -1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")), -// Check if it's a dev/src version they want to load then -// make sure that all plugins, themes etc are loaded in source mode as well --1!=e.indexOf(".min")&&(r=".min"), -// Setup tinyMCEPreInit object this will later be used by the TinyMCE -// core script to locate other resources like CSS files, dialogs etc -// You can also predefined a tinyMCEPreInit object and then it will use that instead -d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r}, -// url contains gzip then we assume it's a compressor --1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""), -// Check if compressor script is already loaded otherwise setup a basic one -d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))}; -// Add core languages -n("langs/"+i+".js"), -// Add themes with languages -n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"), -// Add plugins with languages -p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2, -// Execute callback after mainscript has been loaded and before the initialization occurs -o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l}, -// Add :tinymce pseudo selector this will select elements that has been converted into editor instances -// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements. -p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}}); -// This function patches internal jQuery functions so that if -// you for example remove an div element containing an editor it's -// automatically destroyed by the TinyMCE API -var m=function(){ -// Removes any child editor instances by looking for editor wrapper elements -var r=function(e){ -// If the function is remove -"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this; -// Handle set value -/*jshint eqnull:true */if(null!=i)r.call(t), -// Saves the contents before get/set value of textarea/div -t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}), -// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe -p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}), -// Makes sure that the editor instance gets properly destroyed when the parent element is removed -p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr, -// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents -p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining -var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}(); - - -/*! - * Modernizr v2.7.1 - * www.modernizr.com - * - * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton - * Available under the BSD and MIT licenses: www.modernizr.com/license/ - */ - -/* - * Modernizr tests which native CSS3 and HTML5 features are available in - * the current UA and makes the results available to you in two ways: - * as properties on a global Modernizr object, and as classes on the - * element. This information allows you to progressively enhance - * your pages with a granular level of control over the experience. - * - * Modernizr has an optional (not included) conditional resource loader - * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). - * To get a build that includes Modernizr.load(), as well as choosing - * which tests to include, go to www.modernizr.com/download/ - * - * Authors Faruk Ates, Paul Irish, Alex Sexton - * Contributors Ryan Seddon, Ben Alman - */ - - -window.Modernizr = (function( window, document, undefined ) { - - var version = '2.7.1', - - Modernizr = {}, - - /*>>cssclasses*/ - // option for enabling the HTML classes to be added - enableClasses = true, - /*>>cssclasses*/ - - docElement = document.documentElement, - - /** - * Create our "modernizr" element that we do most feature tests on. - */ - mod = 'modernizr', - modElem = document.createElement(mod), - mStyle = modElem.style, - - /** - * Create the input element for various Web Forms feature tests. - */ - inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ , - - /*>>smile*/ - smile = ':)', - /*>>smile*/ - - toString = {}.toString, - - // TODO :: make the prefixes more granular - /*>>prefixes*/ - // List of property values to set for css tests. See ticket #21 - prefixes = ' -webkit- -moz- -o- -ms- '.split(' '), - /*>>prefixes*/ - - /*>>domprefixes*/ - // Following spec is to expose vendor-specific style properties as: - // elem.style.WebkitBorderRadius - // and the following would be incorrect: - // elem.style.webkitBorderRadius - - // Webkit ghosts their properties in lowercase but Opera & Moz do not. - // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ - // erik.eae.net/archives/2008/03/10/21.48.10/ - - // More here: github.com/Modernizr/Modernizr/issues/issue/21 - omPrefixes = 'Webkit Moz O ms', - - cssomPrefixes = omPrefixes.split(' '), - - domPrefixes = omPrefixes.toLowerCase().split(' '), - /*>>domprefixes*/ - - /*>>ns*/ - ns = {'svg': 'http://www.w3.org/2000/svg'}, - /*>>ns*/ - - tests = {}, - inputs = {}, - attrs = {}, - - classes = [], - - slice = classes.slice, - - featureName, // used in testing loop - - - /*>>teststyles*/ - // Inject element with style element and some CSS rules - injectElementWithStyles = function( rule, callback, nodes, testnames ) { - - var style, ret, node, docOverflow, - div = document.createElement('div'), - // After page load injecting a fake body doesn't work so check if body exists - body = document.body, - // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. - fakeBody = body || document.createElement('body'); - - if ( parseInt(nodes, 10) ) { - // In order not to give false positives we create a node for each test - // This also allows the method to scale for unspecified uses - while ( nodes-- ) { - node = document.createElement('div'); - node.id = testnames ? testnames[nodes] : mod + (nodes + 1); - div.appendChild(node); - } - } - - // '].join(''); - div.id = mod; - // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. - // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 - (body ? div : fakeBody).innerHTML += style; - fakeBody.appendChild(div); - if ( !body ) { - //avoid crashing IE8, if background image is used - fakeBody.style.background = ''; - //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible - fakeBody.style.overflow = 'hidden'; - docOverflow = docElement.style.overflow; - docElement.style.overflow = 'hidden'; - docElement.appendChild(fakeBody); - } - - ret = callback(div, rule); - // If this is done after page load we don't want to remove the body so check if body exists - if ( !body ) { - fakeBody.parentNode.removeChild(fakeBody); - docElement.style.overflow = docOverflow; - } else { - div.parentNode.removeChild(div); - } - - return !!ret; - - }, - /*>>teststyles*/ - - /*>>mq*/ - // adapted from matchMedia polyfill - // by Scott Jehl and Paul Irish - // gist.github.com/786768 - testMediaQuery = function( mq ) { - - var matchMedia = window.matchMedia || window.msMatchMedia; - if ( matchMedia ) { - return matchMedia(mq).matches; - } - - var bool; - - injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { - bool = (window.getComputedStyle ? - getComputedStyle(node, null) : - node.currentStyle)['position'] == 'absolute'; - }); - - return bool; - - }, - /*>>mq*/ - - - /*>>hasevent*/ - // - // isEventSupported determines if a given element supports the given event - // kangax.github.com/iseventsupported/ - // - // The following results are known incorrects: - // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative - // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333 - // ... - isEventSupported = (function() { - - var TAGNAMES = { - 'select': 'input', 'change': 'input', - 'submit': 'form', 'reset': 'form', - 'error': 'img', 'load': 'img', 'abort': 'img' - }; - - function isEventSupported( eventName, element ) { - - element = element || document.createElement(TAGNAMES[eventName] || 'div'); - eventName = 'on' + eventName; - - // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those - var isSupported = eventName in element; - - if ( !isSupported ) { - // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element - if ( !element.setAttribute ) { - element = document.createElement('div'); - } - if ( element.setAttribute && element.removeAttribute ) { - element.setAttribute(eventName, ''); - isSupported = is(element[eventName], 'function'); - - // If property was created, "remove it" (by setting value to `undefined`) - if ( !is(element[eventName], 'undefined') ) { - element[eventName] = undefined; - } - element.removeAttribute(eventName); - } - } - - element = null; - return isSupported; - } - return isEventSupported; - })(), - /*>>hasevent*/ - - // TODO :: Add flag for hasownprop ? didn't last time - - // hasOwnProperty shim by kangax needed for Safari 2.0 support - _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp; - - if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { - hasOwnProp = function (object, property) { - return _hasOwnProperty.call(object, property); - }; - } - else { - hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ - return ((property in object) && is(object.constructor.prototype[property], 'undefined')); - }; - } - - // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js - // es5.github.com/#x15.3.4.5 - - if (!Function.prototype.bind) { - Function.prototype.bind = function bind(that) { - - var target = this; - - if (typeof target != "function") { - throw new TypeError(); - } - - var args = slice.call(arguments, 1), - bound = function () { - - if (this instanceof bound) { - - var F = function(){}; - F.prototype = target.prototype; - var self = new F(); - - var result = target.apply( - self, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return self; - - } else { - - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - - return bound; - }; - } - - /** - * setCss applies given styles to the Modernizr DOM node. - */ - function setCss( str ) { - mStyle.cssText = str; - } - - /** - * setCssAll extrapolates all vendor-specific css strings. - */ - function setCssAll( str1, str2 ) { - return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); - } - - /** - * is returns a boolean for if typeof obj is exactly type. - */ - function is( obj, type ) { - return typeof obj === type; - } - - /** - * contains returns a boolean for if substr is found within str. - */ - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - /*>>testprop*/ - - // testProps is a generic CSS / DOM property test. - - // In testing support for a given CSS property, it's legit to test: - // `elem.style[styleName] !== undefined` - // If the property is supported it will return an empty string, - // if unsupported it will return undefined. - - // We'll take advantage of this quick test and skip setting a style - // on our modernizr element, but instead just testing undefined vs - // empty string. - - // Because the testing of the CSS property names (with "-", as - // opposed to the camelCase DOM properties) is non-portable and - // non-standard but works in WebKit and IE (but not Gecko or Opera), - // we explicitly reject properties with dashes so that authors - // developing in WebKit or IE first don't end up with - // browser-specific content by accident. - - function testProps( props, prefixed ) { - for ( var i in props ) { - var prop = props[i]; - if ( !contains(prop, "-") && mStyle[prop] !== undefined ) { - return prefixed == 'pfx' ? prop : true; - } - } - return false; - } - /*>>testprop*/ - - // TODO :: add testDOMProps - /** - * testDOMProps is a generic DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - */ - function testDOMProps( props, obj, elem ) { - for ( var i in props ) { - var item = obj[props[i]]; - if ( item !== undefined) { - - // return the property name as a string - if (elem === false) return props[i]; - - // let's bind a function - if (is(item, 'function')){ - // default to autobind unless override - return item.bind(elem || obj); - } - - // return the unbound function or obj or value - return item; - } - } - return false; - } - - /*>>testallprops*/ - /** - * testPropsAll tests a list of DOM properties we want to check against. - * We specify literally ALL possible (known and/or likely) properties on - * the element including the non-vendor prefixed one, for forward- - * compatibility. - */ - function testPropsAll( prop, prefixed, elem ) { - - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), - props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); - - // did they call .prefixed('boxSizing') or are we just testing a prop? - if(is(prefixed, "string") || is(prefixed, "undefined")) { - return testProps(props, prefixed); - - // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) - } else { - props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); - return testDOMProps(props, prefixed, elem); - } - } - /*>>testallprops*/ - - - /** - * Tests - * ----- - */ - - // The *new* flexbox - // dev.w3.org/csswg/css3-flexbox - - tests['flexbox'] = function() { - return testPropsAll('flexWrap'); - }; - - // The *old* flexbox - // www.w3.org/TR/2009/WD-css3-flexbox-20090723/ - - tests['flexboxlegacy'] = function() { - return testPropsAll('boxDirection'); - }; - - // On the S60 and BB Storm, getContext exists, but always returns undefined - // so we actually have to call getContext() to verify - // github.com/Modernizr/Modernizr/issues/issue/97/ - - tests['canvas'] = function() { - var elem = document.createElement('canvas'); - return !!(elem.getContext && elem.getContext('2d')); - }; - - tests['canvastext'] = function() { - return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); - }; - - // webk.it/70117 is tracking a legit WebGL feature detect proposal - - // We do a soft detect which may false positive in order to avoid - // an expensive context creation: bugzil.la/732441 - - tests['webgl'] = function() { - return !!window.WebGLRenderingContext; - }; - - /* - * The Modernizr.touch test only indicates if the browser supports - * touch events, which does not necessarily reflect a touchscreen - * device, as evidenced by tablets running Windows 7 or, alas, - * the Palm Pre / WebOS (touch) phones. - * - * Additionally, Chrome (desktop) used to lie about its support on this, - * but that has since been rectified: crbug.com/36415 - * - * We also test for Firefox 4 Multitouch Support. - * - * For more info, see: modernizr.github.com/Modernizr/touch.html - */ - - tests['touch'] = function() { - var bool; - - if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { - bool = true; - } else { - injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) { - bool = node.offsetTop === 9; - }); - } - - return bool; - }; - - - // geolocation is often considered a trivial feature detect... - // Turns out, it's quite tricky to get right: - // - // Using !!navigator.geolocation does two things we don't want. It: - // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513 - // 2. Disables page caching in WebKit: webk.it/43956 - // - // Meanwhile, in Firefox < 8, an about:config setting could expose - // a false positive that would throw an exception: bugzil.la/688158 - - tests['geolocation'] = function() { - return 'geolocation' in navigator; - }; - - - tests['postmessage'] = function() { - return !!window.postMessage; - }; - - - // Chrome incognito mode used to throw an exception when using openDatabase - // It doesn't anymore. - tests['websqldatabase'] = function() { - return !!window.openDatabase; - }; - - // Vendors had inconsistent prefixing with the experimental Indexed DB: - // - Webkit's implementation is accessible through webkitIndexedDB - // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB - // For speed, we don't test the legacy (and beta-only) indexedDB - tests['indexedDB'] = function() { - return !!testPropsAll("indexedDB", window); - }; - - // documentMode logic from YUI to filter out IE8 Compat Mode - // which false positives. - tests['hashchange'] = function() { - return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); - }; - - // Per 1.6: - // This used to be Modernizr.historymanagement but the longer - // name has been deprecated in favor of a shorter and property-matching one. - // The old API is still available in 1.6, but as of 2.0 will throw a warning, - // and in the first release thereafter disappear entirely. - tests['history'] = function() { - return !!(window.history && history.pushState); - }; - - tests['draganddrop'] = function() { - var div = document.createElement('div'); - return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); - }; - - // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10 - // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17. - // FF10 still uses prefixes, so check for it until then. - // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/ - tests['websockets'] = function() { - return 'WebSocket' in window || 'MozWebSocket' in window; - }; - - - // css-tricks.com/rgba-browser-support/ - tests['rgba'] = function() { - // Set an rgba() color and check the returned value - - setCss('background-color:rgba(150,255,150,.5)'); - - return contains(mStyle.backgroundColor, 'rgba'); - }; - - tests['hsla'] = function() { - // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, - // except IE9 who retains it as hsla - - setCss('background-color:hsla(120,40%,100%,.5)'); - - return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); - }; - - tests['multiplebgs'] = function() { - // Setting multiple images AND a color on the background shorthand property - // and then querying the style.background property value for the number of - // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! - - setCss('background:url(https://),url(https://),red url(https://)'); - - // If the UA supports multiple backgrounds, there should be three occurrences - // of the string "url(" in the return value for elemStyle.background - - return (/(url\s*\(.*?){3}/).test(mStyle.background); - }; - - - - // this will false positive in Opera Mini - // github.com/Modernizr/Modernizr/issues/396 - - tests['backgroundsize'] = function() { - return testPropsAll('backgroundSize'); - }; - - tests['borderimage'] = function() { - return testPropsAll('borderImage'); - }; - - - // Super comprehensive table about all the unique implementations of - // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance - - tests['borderradius'] = function() { - return testPropsAll('borderRadius'); - }; - - // WebOS unfortunately false positives on this test. - tests['boxshadow'] = function() { - return testPropsAll('boxShadow'); - }; - - // FF3.0 will false positive on this test - tests['textshadow'] = function() { - return document.createElement('div').style.textShadow === ''; - }; - - - tests['opacity'] = function() { - // Browsers that actually have CSS Opacity implemented have done so - // according to spec, which means their return values are within the - // range of [0.0,1.0] - including the leading zero. - - setCssAll('opacity:.55'); - - // The non-literal . in this regex is intentional: - // German Chrome returns this value as 0,55 - // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 - return (/^0.55$/).test(mStyle.opacity); - }; - - - // Note, Android < 4 will pass this test, but can only animate - // a single property at a time - // daneden.me/2011/12/putting-up-with-androids-bullshit/ - tests['cssanimations'] = function() { - return testPropsAll('animationName'); - }; - - - tests['csscolumns'] = function() { - return testPropsAll('columnCount'); - }; - - - tests['cssgradients'] = function() { - /** - * For CSS Gradients syntax, please see: - * webkit.org/blog/175/introducing-css-gradients/ - * developer.mozilla.org/en/CSS/-moz-linear-gradient - * developer.mozilla.org/en/CSS/-moz-radial-gradient - * dev.w3.org/csswg/css3-images/#gradients- - */ - - var str1 = 'background-image:', - str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', - str3 = 'linear-gradient(left top,#9f9, white);'; - - setCss( - // legacy webkit syntax (FIXME: remove when syntax not in use anymore) - (str1 + '-webkit- '.split(' ').join(str2 + str1) + - // standard syntax // trailing 'background-image:' - prefixes.join(str3 + str1)).slice(0, -str1.length) - ); - - return contains(mStyle.backgroundImage, 'gradient'); - }; - - - tests['cssreflections'] = function() { - return testPropsAll('boxReflect'); - }; - - - tests['csstransforms'] = function() { - return !!testPropsAll('transform'); - }; - - - tests['csstransforms3d'] = function() { - - var ret = !!testPropsAll('perspective'); - - // Webkit's 3D transforms are passed off to the browser's own graphics renderer. - // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in - // some conditions. As a result, Webkit typically recognizes the syntax but - // will sometimes throw a false positive, thus we must do a more thorough check: - if ( ret && 'webkitPerspective' in docElement.style ) { - - // Webkit allows this media query to succeed only if the feature is enabled. - // `@media (transform-3d),(-webkit-transform-3d){ ... }` - injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) { - ret = node.offsetLeft === 9 && node.offsetHeight === 3; - }); - } - return ret; - }; - - - tests['csstransitions'] = function() { - return testPropsAll('transition'); - }; - - - /*>>fontface*/ - // @font-face detection routine by Diego Perini - // javascript.nwbox.com/CSSSupport/ - - // false positives: - // WebOS github.com/Modernizr/Modernizr/issues/342 - // WP7 github.com/Modernizr/Modernizr/issues/538 - tests['fontface'] = function() { - var bool; - - injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) { - var style = document.getElementById('smodernizr'), - sheet = style.sheet || style.styleSheet, - cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; - - bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; - }); - - return bool; - }; - /*>>fontface*/ - - // CSS generated content detection - tests['generatedcontent'] = function() { - var bool; - - injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) { - bool = node.offsetHeight >= 3; - }); - - return bool; - }; - - - - // These tests evaluate support of the video/audio elements, as well as - // testing what types of content they support. - // - // We're using the Boolean constructor here, so that we can extend the value - // e.g. Modernizr.video // true - // Modernizr.video.ogg // 'probably' - // - // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 - // thx to NielsLeenheer and zcorpan - - // Note: in some older browsers, "no" was a return value instead of empty string. - // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 - // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 - - tests['video'] = function() { - var elem = document.createElement('video'), - bool = false; - - // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); - - // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 - bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); - - bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); - } - - } catch(e) { } - - return bool; - }; - - tests['audio'] = function() { - var elem = document.createElement('audio'), - bool = false; - - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); - bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); - - // Mimetypes accepted: - // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements - // bit.ly/iphoneoscodecs - bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); - bool.m4a = ( elem.canPlayType('audio/x-m4a;') || - elem.canPlayType('audio/aac;')) .replace(/^no$/,''); - } - } catch(e) { } - - return bool; - }; - - - // In FF4, if disabled, window.localStorage should === null. - - // Normally, we could not test that directly and need to do a - // `('localStorage' in window) && ` test first because otherwise Firefox will - // throw bugzil.la/365772 if cookies are disabled - - // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem - // will throw the exception: - // QUOTA_EXCEEDED_ERRROR DOM Exception 22. - // Peculiarly, getItem and removeItem calls do not throw. - - // Because we are forced to try/catch this, we'll go aggressive. - - // Just FWIW: IE8 Compat mode supports these features completely: - // www.quirksmode.org/dom/html5.html - // But IE8 doesn't support either with local files - - tests['localstorage'] = function() { - try { - localStorage.setItem(mod, mod); - localStorage.removeItem(mod); - return true; - } catch(e) { - return false; - } - }; - - tests['sessionstorage'] = function() { - try { - sessionStorage.setItem(mod, mod); - sessionStorage.removeItem(mod); - return true; - } catch(e) { - return false; - } - }; - - - tests['webworkers'] = function() { - return !!window.Worker; - }; - - - tests['applicationcache'] = function() { - return !!window.applicationCache; - }; - - - // Thanks to Erik Dahlstrom - tests['svg'] = function() { - return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; - }; - - // specifically for SVG inline in HTML, not within XHTML - // test page: paulirish.com/demo/inline-svg - tests['inlinesvg'] = function() { - var div = document.createElement('div'); - div.innerHTML = ''; - return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; - }; - - // SVG SMIL animation - tests['smil'] = function() { - return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); - }; - - // This test is only for clip paths in SVG proper, not clip paths on HTML content - // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg - - // However read the comments to dig into applying SVG clippaths to HTML content here: - // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491 - tests['svgclippaths'] = function() { - return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); - }; - - /*>>webforms*/ - // input features and input types go directly onto the ret object, bypassing the tests loop. - // Hold this guy to execute in a moment. - function webforms() { - /*>>input*/ - // Run through HTML5's new input attributes to see if the UA understands any. - // We're using f which is the element created early on - // Mike Taylr has created a comprehensive resource for testing these attributes - // when applied to all input types: - // miketaylr.com/code/input-type-attr.html - // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary - - // Only input placeholder is tested while textarea's placeholder is not. - // Currently Safari 4 and Opera 11 have support only for the input placeholder - // Both tests are available in feature-detects/forms-placeholder.js - Modernizr['input'] = (function( props ) { - for ( var i = 0, len = props.length; i < len; i++ ) { - attrs[ props[i] ] = !!(props[i] in inputElem); - } - if (attrs.list){ - // safari false positive's on datalist: webk.it/74252 - // see also github.com/Modernizr/Modernizr/issues/146 - attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement); - } - return attrs; - })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); - /*>>input*/ - - /*>>inputtypes*/ - // Run through HTML5's new input types to see if the UA understands any. - // This is put behind the tests runloop because it doesn't return a - // true/false like all the other tests; instead, it returns an object - // containing each input type with its corresponding true/false value - - // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/ - Modernizr['inputtypes'] = (function(props) { - - for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { - - inputElem.setAttribute('type', inputElemType = props[i]); - bool = inputElem.type !== 'text'; - - // We first check to see if the type we give it sticks.. - // If the type does, we feed it a textual value, which shouldn't be valid. - // If the value doesn't stick, we know there's input sanitization which infers a custom UI - if ( bool ) { - - inputElem.value = smile; - inputElem.style.cssText = 'position:absolute;visibility:hidden;'; - - if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { - - docElement.appendChild(inputElem); - defaultView = document.defaultView; - - // Safari 2-4 allows the smiley as a value, despite making a slider - bool = defaultView.getComputedStyle && - defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && - // Mobile android web browser has false positive, so must - // check the height to see if the widget is actually there. - (inputElem.offsetHeight !== 0); - - docElement.removeChild(inputElem); - - } else if ( /^(search|tel)$/.test(inputElemType) ){ - // Spec doesn't define any special parsing or detectable UI - // behaviors so we pass these through as true - - // Interestingly, opera fails the earlier test, so it doesn't - // even make it here. - - } else if ( /^(url|email)$/.test(inputElemType) ) { - // Real url and email support comes with prebaked validation. - bool = inputElem.checkValidity && inputElem.checkValidity() === false; - - } else { - // If the upgraded input compontent rejects the :) text, we got a winner - bool = inputElem.value != smile; - } - } - - inputs[ props[i] ] = !!bool; - } - return inputs; - })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); - /*>>inputtypes*/ - } - /*>>webforms*/ - - - // End of test definitions - // ----------------------- - - - - // Run through all tests and detect their support in the current UA. - // todo: hypothetically we could be doing an array of tests and use a basic loop here. - for ( var feature in tests ) { - if ( hasOwnProp(tests, feature) ) { - // run the test, throw the return value into the Modernizr, - // then based on that boolean, define an appropriate className - // and push it into an array of classes we'll join later. - featureName = feature.toLowerCase(); - Modernizr[featureName] = tests[feature](); - - classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); - } - } - - /*>>webforms*/ - // input tests need to run. - Modernizr.input || webforms(); - /*>>webforms*/ - - - /** - * addTest allows the user to define their own feature tests - * the result will be added onto the Modernizr object, - * as well as an appropriate className set on the html element - * - * @param feature - String naming the feature - * @param test - Function returning true if feature is supported, false if not - */ - Modernizr.addTest = function ( feature, test ) { - if ( typeof feature == 'object' ) { - for ( var key in feature ) { - if ( hasOwnProp( feature, key ) ) { - Modernizr.addTest( key, feature[ key ] ); - } - } - } else { - - feature = feature.toLowerCase(); - - if ( Modernizr[feature] !== undefined ) { - // we're going to quit if you're trying to overwrite an existing test - // if we were to allow it, we'd do this: - // var re = new RegExp("\\b(no-)?" + feature + "\\b"); - // docElement.className = docElement.className.replace( re, '' ); - // but, no rly, stuff 'em. - return Modernizr; - } - - test = typeof test == 'function' ? test() : test; - - if (typeof enableClasses !== "undefined" && enableClasses) { - docElement.className += ' ' + (test ? '' : 'no-') + feature; - } - Modernizr[feature] = test; - - } - - return Modernizr; // allow chaining. - }; - - - // Reset modElem.cssText to nothing to reduce memory footprint. - setCss(''); - modElem = inputElem = null; - - /*>>shiv*/ - /** - * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed - */ - ;(function(window, document) { - /*jshint evil:true */ - /** version */ - var version = '3.7.0'; - - /** Preset options */ - var options = window.html5 || {}; - - /** Used to skip problem elements */ - var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; - - /** Not all elements can be cloned in IE **/ - var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; - - /** Detect whether the browser supports default html5 styles */ - var supportsHtml5Styles; - - /** Name of the expando, to work with multiple documents or to re-shiv one document */ - var expando = '_html5shiv'; - - /** The id for the the documents expando */ - var expanID = 0; - - /** Cached data for each document */ - var expandoData = {}; - - /** Detect whether the browser supports unknown elements */ - var supportsUnknownElements; - - (function() { - try { - var a = document.createElement('a'); - a.innerHTML = ''; - //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles - supportsHtml5Styles = ('hidden' in a); - - supportsUnknownElements = a.childNodes.length == 1 || (function() { - // assign a false positive if unable to shiv - (document.createElement)('a'); - var frag = document.createDocumentFragment(); - return ( - typeof frag.cloneNode == 'undefined' || - typeof frag.createDocumentFragment == 'undefined' || - typeof frag.createElement == 'undefined' - ); - }()); - } catch(e) { - // assign a false positive if detection fails => unable to shiv - supportsHtml5Styles = true; - supportsUnknownElements = true; - } - - }()); - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a style sheet with the given CSS text and adds it to the document. - * @private - * @param {Document} ownerDocument The document. - * @param {String} cssText The CSS text. - * @returns {StyleSheet} The style element. - */ - function addStyleSheet(ownerDocument, cssText) { - var p = ownerDocument.createElement('p'), - parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; - - p.innerHTML = 'x'; - return parent.insertBefore(p.lastChild, parent.firstChild); - } - - /** - * Returns the value of `html5.elements` as an array. - * @private - * @returns {Array} An array of shived element node names. - */ - function getElements() { - var elements = html5.elements; - return typeof elements == 'string' ? elements.split(' ') : elements; - } - - /** - * Returns the data associated to the given document - * @private - * @param {Document} ownerDocument The document. - * @returns {Object} An object of data. - */ - function getExpandoData(ownerDocument) { - var data = expandoData[ownerDocument[expando]]; - if (!data) { - data = {}; - expanID++; - ownerDocument[expando] = expanID; - expandoData[expanID] = data; - } - return data; - } - - /** - * returns a shived element for the given nodeName and document - * @memberOf html5 - * @param {String} nodeName name of the element - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived element. - */ - function createElement(nodeName, ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createElement(nodeName); - } - if (!data) { - data = getExpandoData(ownerDocument); - } - var node; - - if (data.cache[nodeName]) { - node = data.cache[nodeName].cloneNode(); - } else if (saveClones.test(nodeName)) { - node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); - } else { - node = data.createElem(nodeName); - } - - // Avoid adding some elements to fragments in IE < 9 because - // * Attributes like `name` or `type` cannot be set/changed once an element - // is inserted into a document/fragment - // * Link elements with `src` attributes that are inaccessible, as with - // a 403 response, will cause the tab/window to crash - // * Script elements appended to fragments will execute when their `src` - // or `text` property is set - return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; - } - - /** - * returns a shived DocumentFragment for the given document - * @memberOf html5 - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived DocumentFragment. - */ - function createDocumentFragment(ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createDocumentFragment(); - } - data = data || getExpandoData(ownerDocument); - var clone = data.frag.cloneNode(), - i = 0, - elems = getElements(), - l = elems.length; - for(;i>shiv*/ - - // Assign private properties to the return object with prefix - Modernizr._version = version; - - // expose these for the plugin API. Look in the source for how to join() them against your input - /*>>prefixes*/ - Modernizr._prefixes = prefixes; - /*>>prefixes*/ - /*>>domprefixes*/ - Modernizr._domPrefixes = domPrefixes; - Modernizr._cssomPrefixes = cssomPrefixes; - /*>>domprefixes*/ - - /*>>mq*/ - // Modernizr.mq tests a given media query, live against the current state of the window - // A few important notes: - // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false - // * A max-width or orientation query will be evaluated against the current state, which may change later. - // * You must specify values. Eg. If you are testing support for the min-width media query use: - // Modernizr.mq('(min-width:0)') - // usage: - // Modernizr.mq('only screen and (max-width:768)') - Modernizr.mq = testMediaQuery; - /*>>mq*/ - - /*>>hasevent*/ - // Modernizr.hasEvent() detects support for a given event, with an optional element to test on - // Modernizr.hasEvent('gesturestart', elem) - Modernizr.hasEvent = isEventSupported; - /*>>hasevent*/ - - /*>>testprop*/ - // Modernizr.testProp() investigates whether a given style property is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testProp('pointerEvents') - Modernizr.testProp = function(prop){ - return testProps([prop]); - }; - /*>>testprop*/ - - /*>>testallprops*/ - // Modernizr.testAllProps() investigates whether a given style property, - // or any of its vendor-prefixed variants, is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testAllProps('boxSizing') - Modernizr.testAllProps = testPropsAll; - /*>>testallprops*/ - - - /*>>teststyles*/ - // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards - // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) - Modernizr.testStyles = injectElementWithStyles; - /*>>teststyles*/ - - - /*>>prefixed*/ - // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input - // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' - - // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. - // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: - // - // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); - - // If you're trying to ascertain which transition end event to bind to, you might do something like... - // - // var transEndEventNames = { - // 'WebkitTransition' : 'webkitTransitionEnd', - // 'MozTransition' : 'transitionend', - // 'OTransition' : 'oTransitionEnd', - // 'msTransition' : 'MSTransitionEnd', - // 'transition' : 'transitionend' - // }, - // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; - - Modernizr.prefixed = function(prop, obj, elem){ - if(!obj) { - return testPropsAll(prop, 'pfx'); - } else { - // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' - return testPropsAll(prop, obj, elem); - } - }; - /*>>prefixed*/ - - - /*>>cssclasses*/ - // Remove "no-js" class from element, if it exists: - docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + - - // Add the new classes to the element. - (enableClasses ? ' js ' + classes.join(' ') : ''); - /*>>cssclasses*/ - - return Modernizr; - -})(this, this.document); -/* @preserve - * Leaflet 1.4.0, a JS library for interactive maps. http://leafletjs.com - * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */ - - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.L = {}))); -}(this, (function (exports) { 'use strict'; - -var version = "1.4.0"; - -/* - * @namespace Util - * - * Various utility functions, used by Leaflet internally. - */ - -var freeze = Object.freeze; -Object.freeze = function (obj) { return obj; }; - -// @function extend(dest: Object, src?: Object): Object -// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut. -function extend(dest) { - var i, j, len, src; - - for (j = 1, len = arguments.length; j < len; j++) { - src = arguments[j]; - for (i in src) { - dest[i] = src[i]; - } - } - return dest; -} - -// @function create(proto: Object, properties?: Object): Object -// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create) -var create = Object.create || (function () { - function F() {} - return function (proto) { - F.prototype = proto; - return new F(); - }; -})(); - -// @function bind(fn: Function, …): Function -// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). -// Has a `L.bind()` shortcut. -function bind(fn, obj) { - var slice = Array.prototype.slice; - - if (fn.bind) { - return fn.bind.apply(fn, slice.call(arguments, 1)); - } - - var args = slice.call(arguments, 2); - - return function () { - return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments); - }; -} - -// @property lastId: Number -// Last unique ID used by [`stamp()`](#util-stamp) -var lastId = 0; - -// @function stamp(obj: Object): Number -// Returns the unique ID of an object, assigning it one if it doesn't have it. -function stamp(obj) { - /*eslint-disable */ - obj._leaflet_id = obj._leaflet_id || ++lastId; - return obj._leaflet_id; - /* eslint-enable */ -} - -// @function throttle(fn: Function, time: Number, context: Object): Function -// Returns a function which executes function `fn` with the given scope `context` -// (so that the `this` keyword refers to `context` inside `fn`'s code). The function -// `fn` will be called no more than one time per given amount of `time`. The arguments -// received by the bound function will be any arguments passed when binding the -// function, followed by any arguments passed when invoking the bound function. -// Has an `L.throttle` shortcut. -function throttle(fn, time, context) { - var lock, args, wrapperFn, later; - - later = function () { - // reset lock and call if queued - lock = false; - if (args) { - wrapperFn.apply(context, args); - args = false; - } - }; - - wrapperFn = function () { - if (lock) { - // called too soon, queue to call later - args = arguments; - - } else { - // call and lock until later - fn.apply(context, arguments); - setTimeout(later, time); - lock = true; - } - }; - - return wrapperFn; -} - -// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number -// Returns the number `num` modulo `range` in such a way so it lies within -// `range[0]` and `range[1]`. The returned value will be always smaller than -// `range[1]` unless `includeMax` is set to `true`. -function wrapNum(x, range, includeMax) { - var max = range[1], - min = range[0], - d = max - min; - return x === max && includeMax ? x : ((x - min) % d + d) % d + min; -} - -// @function falseFn(): Function -// Returns a function which always returns `false`. -function falseFn() { return false; } - -// @function formatNum(num: Number, digits?: Number): Number -// Returns the number `num` rounded to `digits` decimals, or to 6 decimals by default. -function formatNum(num, digits) { - var pow = Math.pow(10, (digits === undefined ? 6 : digits)); - return Math.round(num * pow) / pow; -} - -// @function trim(str: String): String -// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) -function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); -} - -// @function splitWords(str: String): String[] -// Trims and splits the string on whitespace and returns the array of parts. -function splitWords(str) { - return trim(str).split(/\s+/); -} - -// @function setOptions(obj: Object, options: Object): Object -// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut. -function setOptions(obj, options) { - if (!obj.hasOwnProperty('options')) { - obj.options = obj.options ? create(obj.options) : {}; - } - for (var i in options) { - obj.options[i] = options[i]; - } - return obj.options; -} - -// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String -// Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}` -// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will -// be appended at the end. If `uppercase` is `true`, the parameter names will -// be uppercased (e.g. `'?A=foo&B=bar'`) -function getParamString(obj, existingUrl, uppercase) { - var params = []; - for (var i in obj) { - params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i])); - } - return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); -} - -var templateRe = /\{ *([\w_-]+) *\}/g; - -// @function template(str: String, data: Object): String -// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` -// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string -// `('Hello foo, bar')`. You can also specify functions instead of strings for -// data values — they will be evaluated passing `data` as an argument. -function template(str, data) { - return str.replace(templateRe, function (str, key) { - var value = data[key]; - - if (value === undefined) { - throw new Error('No value provided for variable ' + str); - - } else if (typeof value === 'function') { - value = value(data); - } - return value; - }); -} - -// @function isArray(obj): Boolean -// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) -var isArray = Array.isArray || function (obj) { - return (Object.prototype.toString.call(obj) === '[object Array]'); -}; - -// @function indexOf(array: Array, el: Object): Number -// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) -function indexOf(array, el) { - for (var i = 0; i < array.length; i++) { - if (array[i] === el) { return i; } - } - return -1; -} - -// @property emptyImageUrl: String -// Data URI string containing a base64-encoded empty GIF image. -// Used as a hack to free memory from unused images on WebKit-powered -// mobile devices (by setting image `src` to this string). -var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; - -// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/ - -function getPrefixed(name) { - return window['webkit' + name] || window['moz' + name] || window['ms' + name]; -} - -var lastTime = 0; - -// fallback for IE 7-8 -function timeoutDefer(fn) { - var time = +new Date(), - timeToCall = Math.max(0, 16 - (time - lastTime)); - - lastTime = time + timeToCall; - return window.setTimeout(fn, timeToCall); -} - -var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer; -var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || - getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); }; - -// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number -// Schedules `fn` to be executed when the browser repaints. `fn` is bound to -// `context` if given. When `immediate` is set, `fn` is called immediately if -// the browser doesn't have native support for -// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame), -// otherwise it's delayed. Returns a request ID that can be used to cancel the request. -function requestAnimFrame(fn, context, immediate) { - if (immediate && requestFn === timeoutDefer) { - fn.call(context); - } else { - return requestFn.call(window, bind(fn, context)); - } -} - -// @function cancelAnimFrame(id: Number): undefined -// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame). -function cancelAnimFrame(id) { - if (id) { - cancelFn.call(window, id); - } -} - - -var Util = (Object.freeze || Object)({ - freeze: freeze, - extend: extend, - create: create, - bind: bind, - lastId: lastId, - stamp: stamp, - throttle: throttle, - wrapNum: wrapNum, - falseFn: falseFn, - formatNum: formatNum, - trim: trim, - splitWords: splitWords, - setOptions: setOptions, - getParamString: getParamString, - template: template, - isArray: isArray, - indexOf: indexOf, - emptyImageUrl: emptyImageUrl, - requestFn: requestFn, - cancelFn: cancelFn, - requestAnimFrame: requestAnimFrame, - cancelAnimFrame: cancelAnimFrame -}); - -// @class Class -// @aka L.Class - -// @section -// @uninheritable - -// Thanks to John Resig and Dean Edwards for inspiration! - -function Class() {} - -Class.extend = function (props) { - - // @function extend(props: Object): Function - // [Extends the current class](#class-inheritance) given the properties to be included. - // Returns a Javascript function that is a class constructor (to be called with `new`). - var NewClass = function () { - - // call the constructor - if (this.initialize) { - this.initialize.apply(this, arguments); - } - - // call all constructor hooks - this.callInitHooks(); - }; - - var parentProto = NewClass.__super__ = this.prototype; - - var proto = create(parentProto); - proto.constructor = NewClass; - - NewClass.prototype = proto; - - // inherit parent's statics - for (var i in this) { - if (this.hasOwnProperty(i) && i !== 'prototype' && i !== '__super__') { - NewClass[i] = this[i]; - } - } - - // mix static properties into the class - if (props.statics) { - extend(NewClass, props.statics); - delete props.statics; - } - - // mix includes into the prototype - if (props.includes) { - checkDeprecatedMixinEvents(props.includes); - extend.apply(null, [proto].concat(props.includes)); - delete props.includes; - } - - // merge options - if (proto.options) { - props.options = extend(create(proto.options), props.options); - } - - // mix given properties into the prototype - extend(proto, props); - - proto._initHooks = []; - - // add method for calling all hooks - proto.callInitHooks = function () { - - if (this._initHooksCalled) { return; } - - if (parentProto.callInitHooks) { - parentProto.callInitHooks.call(this); - } - - this._initHooksCalled = true; - - for (var i = 0, len = proto._initHooks.length; i < len; i++) { - proto._initHooks[i].call(this); - } - }; - - return NewClass; -}; - - -// @function include(properties: Object): this -// [Includes a mixin](#class-includes) into the current class. -Class.include = function (props) { - extend(this.prototype, props); - return this; -}; - -// @function mergeOptions(options: Object): this -// [Merges `options`](#class-options) into the defaults of the class. -Class.mergeOptions = function (options) { - extend(this.prototype.options, options); - return this; -}; - -// @function addInitHook(fn: Function): this -// Adds a [constructor hook](#class-constructor-hooks) to the class. -Class.addInitHook = function (fn) { // (Function) || (String, args...) - var args = Array.prototype.slice.call(arguments, 1); - - var init = typeof fn === 'function' ? fn : function () { - this[fn].apply(this, args); - }; - - this.prototype._initHooks = this.prototype._initHooks || []; - this.prototype._initHooks.push(init); - return this; -}; - -function checkDeprecatedMixinEvents(includes) { - if (typeof L === 'undefined' || !L || !L.Mixin) { return; } - - includes = isArray(includes) ? includes : [includes]; - - for (var i = 0; i < includes.length; i++) { - if (includes[i] === L.Mixin.Events) { - console.warn('Deprecated include of L.Mixin.Events: ' + - 'this property will be removed in future releases, ' + - 'please inherit from L.Evented instead.', new Error().stack); - } - } -} - -/* - * @class Evented - * @aka L.Evented - * @inherits Class - * - * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event). - * - * @example - * - * ```js - * map.on('click', function(e) { - * alert(e.latlng); - * } ); - * ``` - * - * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: - * - * ```js - * function onClick(e) { ... } - * - * map.on('click', onClick); - * map.off('click', onClick); - * ``` - */ - -var Events = { - /* @method on(type: String, fn: Function, context?: Object): this - * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`). - * - * @alternative - * @method on(eventMap: Object): this - * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` - */ - on: function (types, fn, context) { - - // types can be a map of types/handlers - if (typeof types === 'object') { - for (var type in types) { - // we don't process space-separated events here for performance; - // it's a hot path since Layer uses the on(obj) syntax - this._on(type, types[type], fn); - } - - } else { - // types can be a string of space-separated words - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - this._on(types[i], fn, context); - } - } - - return this; - }, - - /* @method off(type: String, fn?: Function, context?: Object): this - * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener. - * - * @alternative - * @method off(eventMap: Object): this - * Removes a set of type/listener pairs. - * - * @alternative - * @method off: this - * Removes all listeners to all events on the object. - */ - off: function (types, fn, context) { - - if (!types) { - // clear all listeners if called without arguments - delete this._events; - - } else if (typeof types === 'object') { - for (var type in types) { - this._off(type, types[type], fn); - } - - } else { - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - this._off(types[i], fn, context); - } - } - - return this; - }, - - // attach listener (without syntactic sugar now) - _on: function (type, fn, context) { - this._events = this._events || {}; - - /* get/init listeners for type */ - var typeListeners = this._events[type]; - if (!typeListeners) { - typeListeners = []; - this._events[type] = typeListeners; - } - - if (context === this) { - // Less memory footprint. - context = undefined; - } - var newListener = {fn: fn, ctx: context}, - listeners = typeListeners; - - // check if fn already there - for (var i = 0, len = listeners.length; i < len; i++) { - if (listeners[i].fn === fn && listeners[i].ctx === context) { - return; - } - } - - listeners.push(newListener); - }, - - _off: function (type, fn, context) { - var listeners, - i, - len; - - if (!this._events) { return; } - - listeners = this._events[type]; - - if (!listeners) { - return; - } - - if (!fn) { - // Set all removed listeners to noop so they are not called if remove happens in fire - for (i = 0, len = listeners.length; i < len; i++) { - listeners[i].fn = falseFn; - } - // clear all listeners for a type if function isn't specified - delete this._events[type]; - return; - } - - if (context === this) { - context = undefined; - } - - if (listeners) { - - // find fn and remove it - for (i = 0, len = listeners.length; i < len; i++) { - var l = listeners[i]; - if (l.ctx !== context) { continue; } - if (l.fn === fn) { - - // set the removed listener to noop so that's not called if remove happens in fire - l.fn = falseFn; - - if (this._firingCount) { - /* copy array in case events are being fired */ - this._events[type] = listeners = listeners.slice(); - } - listeners.splice(i, 1); - - return; - } - } - } - }, - - // @method fire(type: String, data?: Object, propagate?: Boolean): this - // Fires an event of the specified type. You can optionally provide an data - // object — the first argument of the listener function will contain its - // properties. The event can optionally be propagated to event parents. - fire: function (type, data, propagate) { - if (!this.listens(type, propagate)) { return this; } - - var event = extend({}, data, { - type: type, - target: this, - sourceTarget: data && data.sourceTarget || this - }); - - if (this._events) { - var listeners = this._events[type]; - - if (listeners) { - this._firingCount = (this._firingCount + 1) || 1; - for (var i = 0, len = listeners.length; i < len; i++) { - var l = listeners[i]; - l.fn.call(l.ctx || this, event); - } - - this._firingCount--; - } - } - - if (propagate) { - // propagate the event to parents (set with addEventParent) - this._propagateEvent(event); - } - - return this; - }, - - // @method listens(type: String): Boolean - // Returns `true` if a particular event type has any listeners attached to it. - listens: function (type, propagate) { - var listeners = this._events && this._events[type]; - if (listeners && listeners.length) { return true; } - - if (propagate) { - // also check parents for listeners if event propagates - for (var id in this._eventParents) { - if (this._eventParents[id].listens(type, propagate)) { return true; } - } - } - return false; - }, - - // @method once(…): this - // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed. - once: function (types, fn, context) { - - if (typeof types === 'object') { - for (var type in types) { - this.once(type, types[type], fn); - } - return this; - } - - var handler = bind(function () { - this - .off(types, fn, context) - .off(types, handler, context); - }, this); - - // add a listener that's executed once and removed after that - return this - .on(types, fn, context) - .on(types, handler, context); - }, - - // @method addEventParent(obj: Evented): this - // Adds an event parent - an `Evented` that will receive propagated events - addEventParent: function (obj) { - this._eventParents = this._eventParents || {}; - this._eventParents[stamp(obj)] = obj; - return this; - }, - - // @method removeEventParent(obj: Evented): this - // Removes an event parent, so it will stop receiving propagated events - removeEventParent: function (obj) { - if (this._eventParents) { - delete this._eventParents[stamp(obj)]; - } - return this; - }, - - _propagateEvent: function (e) { - for (var id in this._eventParents) { - this._eventParents[id].fire(e.type, extend({ - layer: e.target, - propagatedFrom: e.target - }, e), true); - } - } -}; - -// aliases; we should ditch those eventually - -// @method addEventListener(…): this -// Alias to [`on(…)`](#evented-on) -Events.addEventListener = Events.on; - -// @method removeEventListener(…): this -// Alias to [`off(…)`](#evented-off) - -// @method clearAllEventListeners(…): this -// Alias to [`off()`](#evented-off) -Events.removeEventListener = Events.clearAllEventListeners = Events.off; - -// @method addOneTimeEventListener(…): this -// Alias to [`once(…)`](#evented-once) -Events.addOneTimeEventListener = Events.once; - -// @method fireEvent(…): this -// Alias to [`fire(…)`](#evented-fire) -Events.fireEvent = Events.fire; - -// @method hasEventListeners(…): Boolean -// Alias to [`listens(…)`](#evented-listens) -Events.hasEventListeners = Events.listens; - -var Evented = Class.extend(Events); - -/* - * @class Point - * @aka L.Point - * - * Represents a point with `x` and `y` coordinates in pixels. - * - * @example - * - * ```js - * var point = L.point(200, 300); - * ``` - * - * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: - * - * ```js - * map.panBy([200, 300]); - * map.panBy(L.point(200, 300)); - * ``` - * - * Note that `Point` does not inherit from Leafet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - -function Point(x, y, round) { - // @property x: Number; The `x` coordinate of the point - this.x = (round ? Math.round(x) : x); - // @property y: Number; The `y` coordinate of the point - this.y = (round ? Math.round(y) : y); -} - -var trunc = Math.trunc || function (v) { - return v > 0 ? Math.floor(v) : Math.ceil(v); -}; - -Point.prototype = { - - // @method clone(): Point - // Returns a copy of the current point. - clone: function () { - return new Point(this.x, this.y); - }, - - // @method add(otherPoint: Point): Point - // Returns the result of addition of the current and the given points. - add: function (point) { - // non-destructive, returns a new point - return this.clone()._add(toPoint(point)); - }, - - _add: function (point) { - // destructive, used directly for performance in situations where it's safe to modify existing point - this.x += point.x; - this.y += point.y; - return this; - }, - - // @method subtract(otherPoint: Point): Point - // Returns the result of subtraction of the given point from the current. - subtract: function (point) { - return this.clone()._subtract(toPoint(point)); - }, - - _subtract: function (point) { - this.x -= point.x; - this.y -= point.y; - return this; - }, - - // @method divideBy(num: Number): Point - // Returns the result of division of the current point by the given number. - divideBy: function (num) { - return this.clone()._divideBy(num); - }, - - _divideBy: function (num) { - this.x /= num; - this.y /= num; - return this; - }, - - // @method multiplyBy(num: Number): Point - // Returns the result of multiplication of the current point by the given number. - multiplyBy: function (num) { - return this.clone()._multiplyBy(num); - }, - - _multiplyBy: function (num) { - this.x *= num; - this.y *= num; - return this; - }, - - // @method scaleBy(scale: Point): Point - // Multiply each coordinate of the current point by each coordinate of - // `scale`. In linear algebra terms, multiply the point by the - // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation) - // defined by `scale`. - scaleBy: function (point) { - return new Point(this.x * point.x, this.y * point.y); - }, - - // @method unscaleBy(scale: Point): Point - // Inverse of `scaleBy`. Divide each coordinate of the current point by - // each coordinate of `scale`. - unscaleBy: function (point) { - return new Point(this.x / point.x, this.y / point.y); - }, - - // @method round(): Point - // Returns a copy of the current point with rounded coordinates. - round: function () { - return this.clone()._round(); - }, - - _round: function () { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - return this; - }, - - // @method floor(): Point - // Returns a copy of the current point with floored coordinates (rounded down). - floor: function () { - return this.clone()._floor(); - }, - - _floor: function () { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - return this; - }, - - // @method ceil(): Point - // Returns a copy of the current point with ceiled coordinates (rounded up). - ceil: function () { - return this.clone()._ceil(); - }, - - _ceil: function () { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - return this; - }, - - // @method trunc(): Point - // Returns a copy of the current point with truncated coordinates (rounded towards zero). - trunc: function () { - return this.clone()._trunc(); - }, - - _trunc: function () { - this.x = trunc(this.x); - this.y = trunc(this.y); - return this; - }, - - // @method distanceTo(otherPoint: Point): Number - // Returns the cartesian distance between the current and the given points. - distanceTo: function (point) { - point = toPoint(point); - - var x = point.x - this.x, - y = point.y - this.y; - - return Math.sqrt(x * x + y * y); - }, - - // @method equals(otherPoint: Point): Boolean - // Returns `true` if the given point has the same coordinates. - equals: function (point) { - point = toPoint(point); - - return point.x === this.x && - point.y === this.y; - }, - - // @method contains(otherPoint: Point): Boolean - // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values). - contains: function (point) { - point = toPoint(point); - - return Math.abs(point.x) <= Math.abs(this.x) && - Math.abs(point.y) <= Math.abs(this.y); - }, - - // @method toString(): String - // Returns a string representation of the point for debugging purposes. - toString: function () { - return 'Point(' + - formatNum(this.x) + ', ' + - formatNum(this.y) + ')'; - } -}; - -// @factory L.point(x: Number, y: Number, round?: Boolean) -// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values. - -// @alternative -// @factory L.point(coords: Number[]) -// Expects an array of the form `[x, y]` instead. - -// @alternative -// @factory L.point(coords: Object) -// Expects a plain object of the form `{x: Number, y: Number}` instead. -function toPoint(x, y, round) { - if (x instanceof Point) { - return x; - } - if (isArray(x)) { - return new Point(x[0], x[1]); - } - if (x === undefined || x === null) { - return x; - } - if (typeof x === 'object' && 'x' in x && 'y' in x) { - return new Point(x.x, x.y); - } - return new Point(x, y, round); -} - -/* - * @class Bounds - * @aka L.Bounds - * - * Represents a rectangular area in pixel coordinates. - * - * @example - * - * ```js - * var p1 = L.point(10, 10), - * p2 = L.point(40, 60), - * bounds = L.bounds(p1, p2); - * ``` - * - * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: - * - * ```js - * otherBounds.intersects([[10, 10], [40, 60]]); - * ``` - * - * Note that `Bounds` does not inherit from Leafet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - -function Bounds(a, b) { - if (!a) { return; } - - var points = b ? [a, b] : a; - - for (var i = 0, len = points.length; i < len; i++) { - this.extend(points[i]); - } -} - -Bounds.prototype = { - // @method extend(point: Point): this - // Extends the bounds to contain the given point. - extend: function (point) { // (Point) - point = toPoint(point); - - // @property min: Point - // The top left corner of the rectangle. - // @property max: Point - // The bottom right corner of the rectangle. - if (!this.min && !this.max) { - this.min = point.clone(); - this.max = point.clone(); - } else { - this.min.x = Math.min(point.x, this.min.x); - this.max.x = Math.max(point.x, this.max.x); - this.min.y = Math.min(point.y, this.min.y); - this.max.y = Math.max(point.y, this.max.y); - } - return this; - }, - - // @method getCenter(round?: Boolean): Point - // Returns the center point of the bounds. - getCenter: function (round) { - return new Point( - (this.min.x + this.max.x) / 2, - (this.min.y + this.max.y) / 2, round); - }, - - // @method getBottomLeft(): Point - // Returns the bottom-left point of the bounds. - getBottomLeft: function () { - return new Point(this.min.x, this.max.y); - }, - - // @method getTopRight(): Point - // Returns the top-right point of the bounds. - getTopRight: function () { // -> Point - return new Point(this.max.x, this.min.y); - }, - - // @method getTopLeft(): Point - // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). - getTopLeft: function () { - return this.min; // left, top - }, - - // @method getBottomRight(): Point - // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). - getBottomRight: function () { - return this.max; // right, bottom - }, - - // @method getSize(): Point - // Returns the size of the given bounds - getSize: function () { - return this.max.subtract(this.min); - }, - - // @method contains(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle contains the given one. - // @alternative - // @method contains(point: Point): Boolean - // Returns `true` if the rectangle contains the given point. - contains: function (obj) { - var min, max; - - if (typeof obj[0] === 'number' || obj instanceof Point) { - obj = toPoint(obj); - } else { - obj = toBounds(obj); - } - - if (obj instanceof Bounds) { - min = obj.min; - max = obj.max; - } else { - min = max = obj; - } - - return (min.x >= this.min.x) && - (max.x <= this.max.x) && - (min.y >= this.min.y) && - (max.y <= this.max.y); - }, - - // @method intersects(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle intersects the given bounds. Two bounds - // intersect if they have at least one point in common. - intersects: function (bounds) { // (Bounds) -> Boolean - bounds = toBounds(bounds); - - var min = this.min, - max = this.max, - min2 = bounds.min, - max2 = bounds.max, - xIntersects = (max2.x >= min.x) && (min2.x <= max.x), - yIntersects = (max2.y >= min.y) && (min2.y <= max.y); - - return xIntersects && yIntersects; - }, - - // @method overlaps(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle overlaps the given bounds. Two bounds - // overlap if their intersection is an area. - overlaps: function (bounds) { // (Bounds) -> Boolean - bounds = toBounds(bounds); - - var min = this.min, - max = this.max, - min2 = bounds.min, - max2 = bounds.max, - xOverlaps = (max2.x > min.x) && (min2.x < max.x), - yOverlaps = (max2.y > min.y) && (min2.y < max.y); - - return xOverlaps && yOverlaps; - }, - - isValid: function () { - return !!(this.min && this.max); - } -}; - - -// @factory L.bounds(corner1: Point, corner2: Point) -// Creates a Bounds object from two corners coordinate pairs. -// @alternative -// @factory L.bounds(points: Point[]) -// Creates a Bounds object from the given array of points. -function toBounds(a, b) { - if (!a || a instanceof Bounds) { - return a; - } - return new Bounds(a, b); -} - -/* - * @class LatLngBounds - * @aka L.LatLngBounds - * - * Represents a rectangular geographical area on a map. - * - * @example - * - * ```js - * var corner1 = L.latLng(40.712, -74.227), - * corner2 = L.latLng(40.774, -74.125), - * bounds = L.latLngBounds(corner1, corner2); - * ``` - * - * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: - * - * ```js - * map.fitBounds([ - * [40.712, -74.227], - * [40.774, -74.125] - * ]); - * ``` - * - * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range. - * - * Note that `LatLngBounds` does not inherit from Leafet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - -function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[]) - if (!corner1) { return; } - - var latlngs = corner2 ? [corner1, corner2] : corner1; - - for (var i = 0, len = latlngs.length; i < len; i++) { - this.extend(latlngs[i]); - } -} - -LatLngBounds.prototype = { - - // @method extend(latlng: LatLng): this - // Extend the bounds to contain the given point - - // @alternative - // @method extend(otherBounds: LatLngBounds): this - // Extend the bounds to contain the given bounds - extend: function (obj) { - var sw = this._southWest, - ne = this._northEast, - sw2, ne2; - - if (obj instanceof LatLng) { - sw2 = obj; - ne2 = obj; - - } else if (obj instanceof LatLngBounds) { - sw2 = obj._southWest; - ne2 = obj._northEast; - - if (!sw2 || !ne2) { return this; } - - } else { - return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this; - } - - if (!sw && !ne) { - this._southWest = new LatLng(sw2.lat, sw2.lng); - this._northEast = new LatLng(ne2.lat, ne2.lng); - } else { - sw.lat = Math.min(sw2.lat, sw.lat); - sw.lng = Math.min(sw2.lng, sw.lng); - ne.lat = Math.max(ne2.lat, ne.lat); - ne.lng = Math.max(ne2.lng, ne.lng); - } - - return this; - }, - - // @method pad(bufferRatio: Number): LatLngBounds - // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. - // For example, a ratio of 0.5 extends the bounds by 50% in each direction. - // Negative values will retract the bounds. - pad: function (bufferRatio) { - var sw = this._southWest, - ne = this._northEast, - heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio, - widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; - - return new LatLngBounds( - new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), - new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer)); - }, - - // @method getCenter(): LatLng - // Returns the center point of the bounds. - getCenter: function () { - return new LatLng( - (this._southWest.lat + this._northEast.lat) / 2, - (this._southWest.lng + this._northEast.lng) / 2); - }, - - // @method getSouthWest(): LatLng - // Returns the south-west point of the bounds. - getSouthWest: function () { - return this._southWest; - }, - - // @method getNorthEast(): LatLng - // Returns the north-east point of the bounds. - getNorthEast: function () { - return this._northEast; - }, - - // @method getNorthWest(): LatLng - // Returns the north-west point of the bounds. - getNorthWest: function () { - return new LatLng(this.getNorth(), this.getWest()); - }, - - // @method getSouthEast(): LatLng - // Returns the south-east point of the bounds. - getSouthEast: function () { - return new LatLng(this.getSouth(), this.getEast()); - }, - - // @method getWest(): Number - // Returns the west longitude of the bounds - getWest: function () { - return this._southWest.lng; - }, - - // @method getSouth(): Number - // Returns the south latitude of the bounds - getSouth: function () { - return this._southWest.lat; - }, - - // @method getEast(): Number - // Returns the east longitude of the bounds - getEast: function () { - return this._northEast.lng; - }, - - // @method getNorth(): Number - // Returns the north latitude of the bounds - getNorth: function () { - return this._northEast.lat; - }, - - // @method contains(otherBounds: LatLngBounds): Boolean - // Returns `true` if the rectangle contains the given one. - - // @alternative - // @method contains (latlng: LatLng): Boolean - // Returns `true` if the rectangle contains the given point. - contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean - if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) { - obj = toLatLng(obj); - } else { - obj = toLatLngBounds(obj); - } - - var sw = this._southWest, - ne = this._northEast, - sw2, ne2; - - if (obj instanceof LatLngBounds) { - sw2 = obj.getSouthWest(); - ne2 = obj.getNorthEast(); - } else { - sw2 = ne2 = obj; - } - - return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) && - (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng); - }, - - // @method intersects(otherBounds: LatLngBounds): Boolean - // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common. - intersects: function (bounds) { - bounds = toLatLngBounds(bounds); - - var sw = this._southWest, - ne = this._northEast, - sw2 = bounds.getSouthWest(), - ne2 = bounds.getNorthEast(), - - latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat), - lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng); - - return latIntersects && lngIntersects; - }, - - // @method overlaps(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area. - overlaps: function (bounds) { - bounds = toLatLngBounds(bounds); - - var sw = this._southWest, - ne = this._northEast, - sw2 = bounds.getSouthWest(), - ne2 = bounds.getNorthEast(), - - latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat), - lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng); - - return latOverlaps && lngOverlaps; - }, - - // @method toBBoxString(): String - // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. - toBBoxString: function () { - return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(','); - }, - - // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean - // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number. - equals: function (bounds, maxMargin) { - if (!bounds) { return false; } - - bounds = toLatLngBounds(bounds); - - return this._southWest.equals(bounds.getSouthWest(), maxMargin) && - this._northEast.equals(bounds.getNorthEast(), maxMargin); - }, - - // @method isValid(): Boolean - // Returns `true` if the bounds are properly initialized. - isValid: function () { - return !!(this._southWest && this._northEast); - } -}; - -// TODO International date line? - -// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng) -// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle. - -// @alternative -// @factory L.latLngBounds(latlngs: LatLng[]) -// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds). -function toLatLngBounds(a, b) { - if (a instanceof LatLngBounds) { - return a; - } - return new LatLngBounds(a, b); -} - -/* @class LatLng - * @aka L.LatLng - * - * Represents a geographical point with a certain latitude and longitude. - * - * @example - * - * ``` - * var latlng = L.latLng(50.5, 30.5); - * ``` - * - * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent: - * - * ``` - * map.panTo([50, 30]); - * map.panTo({lon: 30, lat: 50}); - * map.panTo({lat: 50, lng: 30}); - * map.panTo(L.latLng(50, 30)); - * ``` - * - * Note that `LatLng` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - -function LatLng(lat, lng, alt) { - if (isNaN(lat) || isNaN(lng)) { - throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); - } - - // @property lat: Number - // Latitude in degrees - this.lat = +lat; - - // @property lng: Number - // Longitude in degrees - this.lng = +lng; - - // @property alt: Number - // Altitude in meters (optional) - if (alt !== undefined) { - this.alt = +alt; - } -} - -LatLng.prototype = { - // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean - // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number. - equals: function (obj, maxMargin) { - if (!obj) { return false; } - - obj = toLatLng(obj); - - var margin = Math.max( - Math.abs(this.lat - obj.lat), - Math.abs(this.lng - obj.lng)); - - return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin); - }, - - // @method toString(): String - // Returns a string representation of the point (for debugging purposes). - toString: function (precision) { - return 'LatLng(' + - formatNum(this.lat, precision) + ', ' + - formatNum(this.lng, precision) + ')'; - }, - - // @method distanceTo(otherLatLng: LatLng): Number - // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). - distanceTo: function (other) { - return Earth.distance(this, toLatLng(other)); - }, - - // @method wrap(): LatLng - // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees. - wrap: function () { - return Earth.wrapLatLng(this); - }, - - // @method toBounds(sizeInMeters: Number): LatLngBounds - // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`. - toBounds: function (sizeInMeters) { - var latAccuracy = 180 * sizeInMeters / 40075017, - lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); - - return toLatLngBounds( - [this.lat - latAccuracy, this.lng - lngAccuracy], - [this.lat + latAccuracy, this.lng + lngAccuracy]); - }, - - clone: function () { - return new LatLng(this.lat, this.lng, this.alt); - } -}; - - - -// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng -// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude). - -// @alternative -// @factory L.latLng(coords: Array): LatLng -// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead. - -// @alternative -// @factory L.latLng(coords: Object): LatLng -// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead. - -function toLatLng(a, b, c) { - if (a instanceof LatLng) { - return a; - } - if (isArray(a) && typeof a[0] !== 'object') { - if (a.length === 3) { - return new LatLng(a[0], a[1], a[2]); - } - if (a.length === 2) { - return new LatLng(a[0], a[1]); - } - return null; - } - if (a === undefined || a === null) { - return a; - } - if (typeof a === 'object' && 'lat' in a) { - return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt); - } - if (b === undefined) { - return null; - } - return new LatLng(a, b, c); -} - -/* - * @namespace CRS - * @crs L.CRS.Base - * Object that defines coordinate reference systems for projecting - * geographical points into pixel (screen) coordinates and back (and to - * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See - * [spatial reference system](http://en.wikipedia.org/wiki/Coordinate_reference_system). - * - * Leaflet defines the most usual CRSs by default. If you want to use a - * CRS not defined by default, take a look at the - * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. - * - * Note that the CRS instances do not inherit from Leafet's `Class` object, - * and can't be instantiated. Also, new classes can't inherit from them, - * and methods can't be added to them with the `include` function. - */ - -var CRS = { - // @method latLngToPoint(latlng: LatLng, zoom: Number): Point - // Projects geographical coordinates into pixel coordinates for a given zoom. - latLngToPoint: function (latlng, zoom) { - var projectedPoint = this.projection.project(latlng), - scale = this.scale(zoom); - - return this.transformation._transform(projectedPoint, scale); - }, - - // @method pointToLatLng(point: Point, zoom: Number): LatLng - // The inverse of `latLngToPoint`. Projects pixel coordinates on a given - // zoom into geographical coordinates. - pointToLatLng: function (point, zoom) { - var scale = this.scale(zoom), - untransformedPoint = this.transformation.untransform(point, scale); - - return this.projection.unproject(untransformedPoint); - }, - - // @method project(latlng: LatLng): Point - // Projects geographical coordinates into coordinates in units accepted for - // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services). - project: function (latlng) { - return this.projection.project(latlng); - }, - - // @method unproject(point: Point): LatLng - // Given a projected coordinate returns the corresponding LatLng. - // The inverse of `project`. - unproject: function (point) { - return this.projection.unproject(point); - }, - - // @method scale(zoom: Number): Number - // Returns the scale used when transforming projected coordinates into - // pixel coordinates for a particular zoom. For example, it returns - // `256 * 2^zoom` for Mercator-based CRS. - scale: function (zoom) { - return 256 * Math.pow(2, zoom); - }, - - // @method zoom(scale: Number): Number - // Inverse of `scale()`, returns the zoom level corresponding to a scale - // factor of `scale`. - zoom: function (scale) { - return Math.log(scale / 256) / Math.LN2; - }, - - // @method getProjectedBounds(zoom: Number): Bounds - // Returns the projection's bounds scaled and transformed for the provided `zoom`. - getProjectedBounds: function (zoom) { - if (this.infinite) { return null; } - - var b = this.projection.bounds, - s = this.scale(zoom), - min = this.transformation.transform(b.min, s), - max = this.transformation.transform(b.max, s); - - return new Bounds(min, max); - }, - - // @method distance(latlng1: LatLng, latlng2: LatLng): Number - // Returns the distance between two geographical coordinates. - - // @property code: String - // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`) - // - // @property wrapLng: Number[] - // An array of two numbers defining whether the longitude (horizontal) coordinate - // axis wraps around a given range and how. Defaults to `[-180, 180]` in most - // geographical CRSs. If `undefined`, the longitude axis does not wrap around. - // - // @property wrapLat: Number[] - // Like `wrapLng`, but for the latitude (vertical) axis. - - // wrapLng: [min, max], - // wrapLat: [min, max], - - // @property infinite: Boolean - // If true, the coordinate space will be unbounded (infinite in both axes) - infinite: false, - - // @method wrapLatLng(latlng: LatLng): LatLng - // Returns a `LatLng` where lat and lng has been wrapped according to the - // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds. - wrapLatLng: function (latlng) { - var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng, - lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat, - alt = latlng.alt; - - return new LatLng(lat, lng, alt); - }, - - // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds - // Returns a `LatLngBounds` with the same size as the given one, ensuring - // that its center is within the CRS's bounds. - // Only accepts actual `L.LatLngBounds` instances, not arrays. - wrapLatLngBounds: function (bounds) { - var center = bounds.getCenter(), - newCenter = this.wrapLatLng(center), - latShift = center.lat - newCenter.lat, - lngShift = center.lng - newCenter.lng; - - if (latShift === 0 && lngShift === 0) { - return bounds; - } - - var sw = bounds.getSouthWest(), - ne = bounds.getNorthEast(), - newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift), - newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift); - - return new LatLngBounds(newSw, newNe); - } -}; - -/* - * @namespace CRS - * @crs L.CRS.Earth - * - * Serves as the base for CRS that are global such that they cover the earth. - * Can only be used as the base for other CRS and cannot be used directly, - * since it does not have a `code`, `projection` or `transformation`. `distance()` returns - * meters. - */ - -var Earth = extend({}, CRS, { - wrapLng: [-180, 180], - - // Mean Earth Radius, as recommended for use by - // the International Union of Geodesy and Geophysics, - // see http://rosettacode.org/wiki/Haversine_formula - R: 6371000, - - // distance between two geographical points using spherical law of cosines approximation - distance: function (latlng1, latlng2) { - var rad = Math.PI / 180, - lat1 = latlng1.lat * rad, - lat2 = latlng2.lat * rad, - sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2), - sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2), - a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon, - c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); - return this.R * c; - } -}); - -/* - * @namespace Projection - * @projection L.Projection.SphericalMercator - * - * Spherical Mercator projection — the most common projection for online maps, - * used by almost all free and commercial tile providers. Assumes that Earth is - * a sphere. Used by the `EPSG:3857` CRS. - */ - -var SphericalMercator = { - - R: 6378137, - MAX_LATITUDE: 85.0511287798, - - project: function (latlng) { - var d = Math.PI / 180, - max = this.MAX_LATITUDE, - lat = Math.max(Math.min(max, latlng.lat), -max), - sin = Math.sin(lat * d); - - return new Point( - this.R * latlng.lng * d, - this.R * Math.log((1 + sin) / (1 - sin)) / 2); - }, - - unproject: function (point) { - var d = 180 / Math.PI; - - return new LatLng( - (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d, - point.x * d / this.R); - }, - - bounds: (function () { - var d = 6378137 * Math.PI; - return new Bounds([-d, -d], [d, d]); - })() -}; - -/* - * @class Transformation - * @aka L.Transformation - * - * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` - * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing - * the reverse. Used by Leaflet in its projections code. - * - * @example - * - * ```js - * var transformation = L.transformation(2, 5, -1, 10), - * p = L.point(1, 2), - * p2 = transformation.transform(p), // L.point(7, 8) - * p3 = transformation.untransform(p2); // L.point(1, 2) - * ``` - */ - - -// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) -// Creates a `Transformation` object with the given coefficients. -function Transformation(a, b, c, d) { - if (isArray(a)) { - // use array properties - this._a = a[0]; - this._b = a[1]; - this._c = a[2]; - this._d = a[3]; - return; - } - this._a = a; - this._b = b; - this._c = c; - this._d = d; -} - -Transformation.prototype = { - // @method transform(point: Point, scale?: Number): Point - // Returns a transformed point, optionally multiplied by the given scale. - // Only accepts actual `L.Point` instances, not arrays. - transform: function (point, scale) { // (Point, Number) -> Point - return this._transform(point.clone(), scale); - }, - - // destructive transform (faster) - _transform: function (point, scale) { - scale = scale || 1; - point.x = scale * (this._a * point.x + this._b); - point.y = scale * (this._c * point.y + this._d); - return point; - }, - - // @method untransform(point: Point, scale?: Number): Point - // Returns the reverse transformation of the given point, optionally divided - // by the given scale. Only accepts actual `L.Point` instances, not arrays. - untransform: function (point, scale) { - scale = scale || 1; - return new Point( - (point.x / scale - this._b) / this._a, - (point.y / scale - this._d) / this._c); - } -}; - -// factory L.transformation(a: Number, b: Number, c: Number, d: Number) - -// @factory L.transformation(a: Number, b: Number, c: Number, d: Number) -// Instantiates a Transformation object with the given coefficients. - -// @alternative -// @factory L.transformation(coefficients: Array): Transformation -// Expects an coefficients array of the form -// `[a: Number, b: Number, c: Number, d: Number]`. - -function toTransformation(a, b, c, d) { - return new Transformation(a, b, c, d); -} - -/* - * @namespace CRS - * @crs L.CRS.EPSG3857 - * - * The most common CRS for online maps, used by almost all free and commercial - * tile providers. Uses Spherical Mercator projection. Set in by default in - * Map's `crs` option. - */ - -var EPSG3857 = extend({}, Earth, { - code: 'EPSG:3857', - projection: SphericalMercator, - - transformation: (function () { - var scale = 0.5 / (Math.PI * SphericalMercator.R); - return toTransformation(scale, 0.5, -scale, 0.5); - }()) -}); - -var EPSG900913 = extend({}, EPSG3857, { - code: 'EPSG:900913' -}); - -// @namespace SVG; @section -// There are several static functions which can be called without instantiating L.SVG: - -// @function create(name: String): SVGElement -// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement), -// corresponding to the class name passed. For example, using 'line' will return -// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement). -function svgCreate(name) { - return document.createElementNS('http://www.w3.org/2000/svg', name); -} - -// @function pointsToPath(rings: Point[], closed: Boolean): String -// Generates a SVG path string for multiple rings, with each ring turning -// into "M..L..L.." instructions -function pointsToPath(rings, closed) { - var str = '', - i, j, len, len2, points, p; - - for (i = 0, len = rings.length; i < len; i++) { - points = rings[i]; - - for (j = 0, len2 = points.length; j < len2; j++) { - p = points[j]; - str += (j ? 'L' : 'M') + p.x + ' ' + p.y; - } - - // closes the ring for polygons; "x" is VML syntax - str += closed ? (svg ? 'z' : 'x') : ''; - } - - // SVG complains about empty path strings - return str || 'M0 0'; -} - -/* - * @namespace Browser - * @aka L.Browser - * - * A namespace with static properties for browser/feature detection used by Leaflet internally. - * - * @example - * - * ```js - * if (L.Browser.ielt9) { - * alert('Upgrade your browser, dude!'); - * } - * ``` - */ - -var style$1 = document.documentElement.style; - -// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge). -var ie = 'ActiveXObject' in window; - -// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9. -var ielt9 = ie && !document.addEventListener; - -// @property edge: Boolean; `true` for the Edge web browser. -var edge = 'msLaunchUri' in navigator && !('documentMode' in document); - -// @property webkit: Boolean; -// `true` for webkit-based browsers like Chrome and Safari (including mobile versions). -var webkit = userAgentContains('webkit'); - -// @property android: Boolean -// `true` for any browser running on an Android platform. -var android = userAgentContains('android'); - -// @property android23: Boolean; `true` for browsers running on Android 2 or Android 3. -var android23 = userAgentContains('android 2') || userAgentContains('android 3'); - -/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */ -var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit -// @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome) -var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window); - -// @property opera: Boolean; `true` for the Opera browser -var opera = !!window.opera; - -// @property chrome: Boolean; `true` for the Chrome browser. -var chrome = userAgentContains('chrome'); - -// @property gecko: Boolean; `true` for gecko-based browsers like Firefox. -var gecko = userAgentContains('gecko') && !webkit && !opera && !ie; - -// @property safari: Boolean; `true` for the Safari browser. -var safari = !chrome && userAgentContains('safari'); - -var phantom = userAgentContains('phantom'); - -// @property opera12: Boolean -// `true` for the Opera browser supporting CSS transforms (version 12 or later). -var opera12 = 'OTransition' in style$1; - -// @property win: Boolean; `true` when the browser is running in a Windows platform -var win = navigator.platform.indexOf('Win') === 0; - -// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms. -var ie3d = ie && ('transition' in style$1); - -// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms. -var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23; - -// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms. -var gecko3d = 'MozPerspective' in style$1; - -// @property any3d: Boolean -// `true` for all browsers supporting CSS transforms. -var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom; - -// @property mobile: Boolean; `true` for all browsers running in a mobile device. -var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile'); - -// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device. -var mobileWebkit = mobile && webkit; - -// @property mobileWebkit3d: Boolean -// `true` for all webkit-based browsers in a mobile device supporting CSS transforms. -var mobileWebkit3d = mobile && webkit3d; - -// @property msPointer: Boolean -// `true` for browsers implementing the Microsoft touch events model (notably IE10). -var msPointer = !window.PointerEvent && window.MSPointerEvent; - -// @property pointer: Boolean -// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx). -var pointer = !!(window.PointerEvent || msPointer); - -// @property touch: Boolean -// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events). -// This does not necessarily mean that the browser is running in a computer with -// a touchscreen, it only means that the browser is capable of understanding -// touch events. -var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window || - (window.DocumentTouch && document instanceof window.DocumentTouch)); - -// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device. -var mobileOpera = mobile && opera; - -// @property mobileGecko: Boolean -// `true` for gecko-based browsers running in a mobile device. -var mobileGecko = mobile && gecko; - -// @property retina: Boolean -// `true` for browsers on a high-resolution "retina" screen or on any screen when browser's display zoom is more than 100%. -var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1; - - -// @property canvas: Boolean -// `true` when the browser supports [``](https://developer.mozilla.org/docs/Web/API/Canvas_API). -var canvas = (function () { - return !!document.createElement('canvas').getContext; -}()); - -// @property svg: Boolean -// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG). -var svg = !!(document.createElementNS && svgCreate('svg').createSVGRect); - -// @property vml: Boolean -// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language). -var vml = !svg && (function () { - try { - var div = document.createElement('div'); - div.innerHTML = ''; - - var shape = div.firstChild; - shape.style.behavior = 'url(#default#VML)'; - - return shape && (typeof shape.adj === 'object'); - - } catch (e) { - return false; - } -}()); - - -function userAgentContains(str) { - return navigator.userAgent.toLowerCase().indexOf(str) >= 0; -} - - -var Browser = (Object.freeze || Object)({ - ie: ie, - ielt9: ielt9, - edge: edge, - webkit: webkit, - android: android, - android23: android23, - androidStock: androidStock, - opera: opera, - chrome: chrome, - gecko: gecko, - safari: safari, - phantom: phantom, - opera12: opera12, - win: win, - ie3d: ie3d, - webkit3d: webkit3d, - gecko3d: gecko3d, - any3d: any3d, - mobile: mobile, - mobileWebkit: mobileWebkit, - mobileWebkit3d: mobileWebkit3d, - msPointer: msPointer, - pointer: pointer, - touch: touch, - mobileOpera: mobileOpera, - mobileGecko: mobileGecko, - retina: retina, - canvas: canvas, - svg: svg, - vml: vml -}); - -/* - * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices. - */ - - -var POINTER_DOWN = msPointer ? 'MSPointerDown' : 'pointerdown'; -var POINTER_MOVE = msPointer ? 'MSPointerMove' : 'pointermove'; -var POINTER_UP = msPointer ? 'MSPointerUp' : 'pointerup'; -var POINTER_CANCEL = msPointer ? 'MSPointerCancel' : 'pointercancel'; -var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION']; - -var _pointers = {}; -var _pointerDocListener = false; - -// DomEvent.DoubleTap needs to know about this -var _pointersCount = 0; - -// Provides a touch events wrapper for (ms)pointer events. -// ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890 - -function addPointerListener(obj, type, handler, id) { - if (type === 'touchstart') { - _addPointerStart(obj, handler, id); - - } else if (type === 'touchmove') { - _addPointerMove(obj, handler, id); - - } else if (type === 'touchend') { - _addPointerEnd(obj, handler, id); - } - - return this; -} - -function removePointerListener(obj, type, id) { - var handler = obj['_leaflet_' + type + id]; - - if (type === 'touchstart') { - obj.removeEventListener(POINTER_DOWN, handler, false); - - } else if (type === 'touchmove') { - obj.removeEventListener(POINTER_MOVE, handler, false); - - } else if (type === 'touchend') { - obj.removeEventListener(POINTER_UP, handler, false); - obj.removeEventListener(POINTER_CANCEL, handler, false); - } - - return this; -} - -function _addPointerStart(obj, handler, id) { - var onDown = bind(function (e) { - if (e.pointerType !== 'mouse' && e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) { - // In IE11, some touch events needs to fire for form controls, or - // the controls will stop working. We keep a whitelist of tag names that - // need these events. For other target tags, we prevent default on the event. - if (TAG_WHITE_LIST.indexOf(e.target.tagName) < 0) { - preventDefault(e); - } else { - return; - } - } - - _handlePointer(e, handler); - }); - - obj['_leaflet_touchstart' + id] = onDown; - obj.addEventListener(POINTER_DOWN, onDown, false); - - // need to keep track of what pointers and how many are active to provide e.touches emulation - if (!_pointerDocListener) { - // we listen documentElement as any drags that end by moving the touch off the screen get fired there - document.documentElement.addEventListener(POINTER_DOWN, _globalPointerDown, true); - document.documentElement.addEventListener(POINTER_MOVE, _globalPointerMove, true); - document.documentElement.addEventListener(POINTER_UP, _globalPointerUp, true); - document.documentElement.addEventListener(POINTER_CANCEL, _globalPointerUp, true); - - _pointerDocListener = true; - } -} - -function _globalPointerDown(e) { - _pointers[e.pointerId] = e; - _pointersCount++; -} - -function _globalPointerMove(e) { - if (_pointers[e.pointerId]) { - _pointers[e.pointerId] = e; - } -} - -function _globalPointerUp(e) { - delete _pointers[e.pointerId]; - _pointersCount--; -} - -function _handlePointer(e, handler) { - e.touches = []; - for (var i in _pointers) { - e.touches.push(_pointers[i]); - } - e.changedTouches = [e]; - - handler(e); -} - -function _addPointerMove(obj, handler, id) { - var onMove = function (e) { - // don't fire touch moves when mouse isn't down - if ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; } - - _handlePointer(e, handler); - }; - - obj['_leaflet_touchmove' + id] = onMove; - obj.addEventListener(POINTER_MOVE, onMove, false); -} - -function _addPointerEnd(obj, handler, id) { - var onUp = function (e) { - _handlePointer(e, handler); - }; - - obj['_leaflet_touchend' + id] = onUp; - obj.addEventListener(POINTER_UP, onUp, false); - obj.addEventListener(POINTER_CANCEL, onUp, false); -} - -/* - * Extends the event handling code with double tap support for mobile browsers. - */ - -var _touchstart = msPointer ? 'MSPointerDown' : pointer ? 'pointerdown' : 'touchstart'; -var _touchend = msPointer ? 'MSPointerUp' : pointer ? 'pointerup' : 'touchend'; -var _pre = '_leaflet_'; - -// inspired by Zepto touch code by Thomas Fuchs -function addDoubleTapListener(obj, handler, id) { - var last, touch$$1, - doubleTap = false, - delay = 250; - - function onTouchStart(e) { - var count; - - if (pointer) { - if ((!edge) || e.pointerType === 'mouse') { return; } - count = _pointersCount; - } else { - count = e.touches.length; - } - - if (count > 1) { return; } - - var now = Date.now(), - delta = now - (last || now); - - touch$$1 = e.touches ? e.touches[0] : e; - doubleTap = (delta > 0 && delta <= delay); - last = now; - } - - function onTouchEnd(e) { - if (doubleTap && !touch$$1.cancelBubble) { - if (pointer) { - if ((!edge) || e.pointerType === 'mouse') { return; } - // work around .type being readonly with MSPointer* events - var newTouch = {}, - prop, i; - - for (i in touch$$1) { - prop = touch$$1[i]; - newTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop; - } - touch$$1 = newTouch; - } - touch$$1.type = 'dblclick'; - handler(touch$$1); - last = null; - } - } - - obj[_pre + _touchstart + id] = onTouchStart; - obj[_pre + _touchend + id] = onTouchEnd; - obj[_pre + 'dblclick' + id] = handler; - - obj.addEventListener(_touchstart, onTouchStart, false); - obj.addEventListener(_touchend, onTouchEnd, false); - - // On some platforms (notably, chrome<55 on win10 + touchscreen + mouse), - // the browser doesn't fire touchend/pointerup events but does fire - // native dblclicks. See #4127. - // Edge 14 also fires native dblclicks, but only for pointerType mouse, see #5180. - obj.addEventListener('dblclick', handler, false); - - return this; -} - -function removeDoubleTapListener(obj, id) { - var touchstart = obj[_pre + _touchstart + id], - touchend = obj[_pre + _touchend + id], - dblclick = obj[_pre + 'dblclick' + id]; - - obj.removeEventListener(_touchstart, touchstart, false); - obj.removeEventListener(_touchend, touchend, false); - if (!edge) { - obj.removeEventListener('dblclick', dblclick, false); - } - - return this; -} - -/* - * @namespace DomUtil - * - * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) - * tree, used by Leaflet internally. - * - * Most functions expecting or returning a `HTMLElement` also work for - * SVG elements. The only difference is that classes refer to CSS classes - * in HTML and SVG classes in SVG. - */ - - -// @property TRANSFORM: String -// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit). -var TRANSFORM = testProp( - ['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']); - -// webkitTransition comes first because some browser versions that drop vendor prefix don't do -// the same for the transitionend event, in particular the Android 4.1 stock browser - -// @property TRANSITION: String -// Vendor-prefixed transition style name. -var TRANSITION = testProp( - ['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']); - -// @property TRANSITION_END: String -// Vendor-prefixed transitionend event name. -var TRANSITION_END = - TRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend'; - - -// @function get(id: String|HTMLElement): HTMLElement -// Returns an element given its DOM id, or returns the element itself -// if it was passed directly. -function get(id) { - return typeof id === 'string' ? document.getElementById(id) : id; -} - -// @function getStyle(el: HTMLElement, styleAttrib: String): String -// Returns the value for a certain style attribute on an element, -// including computed values or values set through CSS. -function getStyle(el, style) { - var value = el.style[style] || (el.currentStyle && el.currentStyle[style]); - - if ((!value || value === 'auto') && document.defaultView) { - var css = document.defaultView.getComputedStyle(el, null); - value = css ? css[style] : null; - } - return value === 'auto' ? null : value; -} - -// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement -// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element. -function create$1(tagName, className, container) { - var el = document.createElement(tagName); - el.className = className || ''; - - if (container) { - container.appendChild(el); - } - return el; -} - -// @function remove(el: HTMLElement) -// Removes `el` from its parent element -function remove(el) { - var parent = el.parentNode; - if (parent) { - parent.removeChild(el); - } -} - -// @function empty(el: HTMLElement) -// Removes all of `el`'s children elements from `el` -function empty(el) { - while (el.firstChild) { - el.removeChild(el.firstChild); - } -} - -// @function toFront(el: HTMLElement) -// Makes `el` the last child of its parent, so it renders in front of the other children. -function toFront(el) { - var parent = el.parentNode; - if (parent && parent.lastChild !== el) { - parent.appendChild(el); - } -} - -// @function toBack(el: HTMLElement) -// Makes `el` the first child of its parent, so it renders behind the other children. -function toBack(el) { - var parent = el.parentNode; - if (parent && parent.firstChild !== el) { - parent.insertBefore(el, parent.firstChild); - } -} - -// @function hasClass(el: HTMLElement, name: String): Boolean -// Returns `true` if the element's class attribute contains `name`. -function hasClass(el, name) { - if (el.classList !== undefined) { - return el.classList.contains(name); - } - var className = getClass(el); - return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className); -} - -// @function addClass(el: HTMLElement, name: String) -// Adds `name` to the element's class attribute. -function addClass(el, name) { - if (el.classList !== undefined) { - var classes = splitWords(name); - for (var i = 0, len = classes.length; i < len; i++) { - el.classList.add(classes[i]); - } - } else if (!hasClass(el, name)) { - var className = getClass(el); - setClass(el, (className ? className + ' ' : '') + name); - } -} - -// @function removeClass(el: HTMLElement, name: String) -// Removes `name` from the element's class attribute. -function removeClass(el, name) { - if (el.classList !== undefined) { - el.classList.remove(name); - } else { - setClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' '))); - } -} - -// @function setClass(el: HTMLElement, name: String) -// Sets the element's class. -function setClass(el, name) { - if (el.className.baseVal === undefined) { - el.className = name; - } else { - // in case of SVG element - el.className.baseVal = name; - } -} - -// @function getClass(el: HTMLElement): String -// Returns the element's class. -function getClass(el) { - // Check if the element is an SVGElementInstance and use the correspondingElement instead - // (Required for linked SVG elements in IE11.) - if (el.correspondingElement) { - el = el.correspondingElement; - } - return el.className.baseVal === undefined ? el.className : el.className.baseVal; -} - -// @function setOpacity(el: HTMLElement, opacity: Number) -// Set the opacity of an element (including old IE support). -// `opacity` must be a number from `0` to `1`. -function setOpacity(el, value) { - if ('opacity' in el.style) { - el.style.opacity = value; - } else if ('filter' in el.style) { - _setOpacityIE(el, value); - } -} - -function _setOpacityIE(el, value) { - var filter = false, - filterName = 'DXImageTransform.Microsoft.Alpha'; - - // filters collection throws an error if we try to retrieve a filter that doesn't exist - try { - filter = el.filters.item(filterName); - } catch (e) { - // don't set opacity to 1 if we haven't already set an opacity, - // it isn't needed and breaks transparent pngs. - if (value === 1) { return; } - } - - value = Math.round(value * 100); - - if (filter) { - filter.Enabled = (value !== 100); - filter.Opacity = value; - } else { - el.style.filter += ' progid:' + filterName + '(opacity=' + value + ')'; - } -} - -// @function testProp(props: String[]): String|false -// Goes through the array of style names and returns the first name -// that is a valid style name for an element. If no such name is found, -// it returns false. Useful for vendor-prefixed styles like `transform`. -function testProp(props) { - var style = document.documentElement.style; - - for (var i = 0; i < props.length; i++) { - if (props[i] in style) { - return props[i]; - } - } - return false; -} - -// @function setTransform(el: HTMLElement, offset: Point, scale?: Number) -// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels -// and optionally scaled by `scale`. Does not have an effect if the -// browser doesn't support 3D CSS transforms. -function setTransform(el, offset, scale) { - var pos = offset || new Point(0, 0); - - el.style[TRANSFORM] = - (ie3d ? - 'translate(' + pos.x + 'px,' + pos.y + 'px)' : - 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') + - (scale ? ' scale(' + scale + ')' : ''); -} - -// @function setPosition(el: HTMLElement, position: Point) -// Sets the position of `el` to coordinates specified by `position`, -// using CSS translate or top/left positioning depending on the browser -// (used by Leaflet internally to position its layers). -function setPosition(el, point) { - - /*eslint-disable */ - el._leaflet_pos = point; - /* eslint-enable */ - - if (any3d) { - setTransform(el, point); - } else { - el.style.left = point.x + 'px'; - el.style.top = point.y + 'px'; - } -} - -// @function getPosition(el: HTMLElement): Point -// Returns the coordinates of an element previously positioned with setPosition. -function getPosition(el) { - // this method is only used for elements previously positioned using setPosition, - // so it's safe to cache the position for performance - - return el._leaflet_pos || new Point(0, 0); -} - -// @function disableTextSelection() -// Prevents the user from generating `selectstart` DOM events, usually generated -// when the user drags the mouse through a page with text. Used internally -// by Leaflet to override the behaviour of any click-and-drag interaction on -// the map. Affects drag interactions on the whole document. - -// @function enableTextSelection() -// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection). -var disableTextSelection; -var enableTextSelection; -var _userSelect; -if ('onselectstart' in document) { - disableTextSelection = function () { - on(window, 'selectstart', preventDefault); - }; - enableTextSelection = function () { - off(window, 'selectstart', preventDefault); - }; -} else { - var userSelectProperty = testProp( - ['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']); - - disableTextSelection = function () { - if (userSelectProperty) { - var style = document.documentElement.style; - _userSelect = style[userSelectProperty]; - style[userSelectProperty] = 'none'; - } - }; - enableTextSelection = function () { - if (userSelectProperty) { - document.documentElement.style[userSelectProperty] = _userSelect; - _userSelect = undefined; - } - }; -} - -// @function disableImageDrag() -// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but -// for `dragstart` DOM events, usually generated when the user drags an image. -function disableImageDrag() { - on(window, 'dragstart', preventDefault); -} - -// @function enableImageDrag() -// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection). -function enableImageDrag() { - off(window, 'dragstart', preventDefault); -} - -var _outlineElement; -var _outlineStyle; -// @function preventOutline(el: HTMLElement) -// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline) -// of the element `el` invisible. Used internally by Leaflet to prevent -// focusable elements from displaying an outline when the user performs a -// drag interaction on them. -function preventOutline(element) { - while (element.tabIndex === -1) { - element = element.parentNode; - } - if (!element.style) { return; } - restoreOutline(); - _outlineElement = element; - _outlineStyle = element.style.outline; - element.style.outline = 'none'; - on(window, 'keydown', restoreOutline); -} - -// @function restoreOutline() -// Cancels the effects of a previous [`L.DomUtil.preventOutline`](). -function restoreOutline() { - if (!_outlineElement) { return; } - _outlineElement.style.outline = _outlineStyle; - _outlineElement = undefined; - _outlineStyle = undefined; - off(window, 'keydown', restoreOutline); -} - -// @function getSizedParentNode(el: HTMLElement): HTMLElement -// Finds the closest parent node which size (width and height) is not null. -function getSizedParentNode(element) { - do { - element = element.parentNode; - } while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body); - return element; -} - -// @function getScale(el: HTMLElement): Object -// Computes the CSS scale currently applied on the element. -// Returns an object with `x` and `y` members as horizontal and vertical scales respectively, -// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). -function getScale(element) { - var rect = element.getBoundingClientRect(); // Read-only in old browsers. - - return { - x: rect.width / element.offsetWidth || 1, - y: rect.height / element.offsetHeight || 1, - boundingClientRect: rect - }; -} - - -var DomUtil = (Object.freeze || Object)({ - TRANSFORM: TRANSFORM, - TRANSITION: TRANSITION, - TRANSITION_END: TRANSITION_END, - get: get, - getStyle: getStyle, - create: create$1, - remove: remove, - empty: empty, - toFront: toFront, - toBack: toBack, - hasClass: hasClass, - addClass: addClass, - removeClass: removeClass, - setClass: setClass, - getClass: getClass, - setOpacity: setOpacity, - testProp: testProp, - setTransform: setTransform, - setPosition: setPosition, - getPosition: getPosition, - disableTextSelection: disableTextSelection, - enableTextSelection: enableTextSelection, - disableImageDrag: disableImageDrag, - enableImageDrag: enableImageDrag, - preventOutline: preventOutline, - restoreOutline: restoreOutline, - getSizedParentNode: getSizedParentNode, - getScale: getScale -}); - -/* - * @namespace DomEvent - * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally. - */ - -// Inspired by John Resig, Dean Edwards and YUI addEvent implementations. - -// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this -// Adds a listener function (`fn`) to a particular DOM event type of the -// element `el`. You can optionally specify the context of the listener -// (object the `this` keyword will point to). You can also pass several -// space-separated types (e.g. `'click dblclick'`). - -// @alternative -// @function on(el: HTMLElement, eventMap: Object, context?: Object): this -// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` -function on(obj, types, fn, context) { - - if (typeof types === 'object') { - for (var type in types) { - addOne(obj, type, types[type], fn); - } - } else { - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - addOne(obj, types[i], fn, context); - } - } - - return this; -} - -var eventsKey = '_leaflet_events'; - -// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this -// Removes a previously added listener function. -// Note that if you passed a custom context to on, you must pass the same -// context to `off` in order to remove the listener. - -// @alternative -// @function off(el: HTMLElement, eventMap: Object, context?: Object): this -// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` -function off(obj, types, fn, context) { - - if (typeof types === 'object') { - for (var type in types) { - removeOne(obj, type, types[type], fn); - } - } else if (types) { - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - removeOne(obj, types[i], fn, context); - } - } else { - for (var j in obj[eventsKey]) { - removeOne(obj, j, obj[eventsKey][j]); - } - delete obj[eventsKey]; - } - - return this; -} - -function addOne(obj, type, fn, context) { - var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''); - - if (obj[eventsKey] && obj[eventsKey][id]) { return this; } - - var handler = function (e) { - return fn.call(context || obj, e || window.event); - }; - - var originalHandler = handler; - - if (pointer && type.indexOf('touch') === 0) { - // Needs DomEvent.Pointer.js - addPointerListener(obj, type, handler, id); - - } else if (touch && (type === 'dblclick') && addDoubleTapListener && - !(pointer && chrome)) { - // Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener - // See #5180 - addDoubleTapListener(obj, handler, id); - - } else if ('addEventListener' in obj) { - - if (type === 'mousewheel') { - obj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false); - - } else if ((type === 'mouseenter') || (type === 'mouseleave')) { - handler = function (e) { - e = e || window.event; - if (isExternalTarget(obj, e)) { - originalHandler(e); - } - }; - obj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false); - - } else { - if (type === 'click' && android) { - handler = function (e) { - filterClick(e, originalHandler); - }; - } - obj.addEventListener(type, handler, false); - } - - } else if ('attachEvent' in obj) { - obj.attachEvent('on' + type, handler); - } - - obj[eventsKey] = obj[eventsKey] || {}; - obj[eventsKey][id] = handler; -} - -function removeOne(obj, type, fn, context) { - - var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''), - handler = obj[eventsKey] && obj[eventsKey][id]; - - if (!handler) { return this; } - - if (pointer && type.indexOf('touch') === 0) { - removePointerListener(obj, type, id); - - } else if (touch && (type === 'dblclick') && removeDoubleTapListener && - !(pointer && chrome)) { - removeDoubleTapListener(obj, id); - - } else if ('removeEventListener' in obj) { - - if (type === 'mousewheel') { - obj.removeEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false); - - } else { - obj.removeEventListener( - type === 'mouseenter' ? 'mouseover' : - type === 'mouseleave' ? 'mouseout' : type, handler, false); - } - - } else if ('detachEvent' in obj) { - obj.detachEvent('on' + type, handler); - } - - obj[eventsKey][id] = null; -} - -// @function stopPropagation(ev: DOMEvent): this -// Stop the given event from propagation to parent elements. Used inside the listener functions: -// ```js -// L.DomEvent.on(div, 'click', function (ev) { -// L.DomEvent.stopPropagation(ev); -// }); -// ``` -function stopPropagation(e) { - - if (e.stopPropagation) { - e.stopPropagation(); - } else if (e.originalEvent) { // In case of Leaflet event. - e.originalEvent._stopped = true; - } else { - e.cancelBubble = true; - } - skipped(e); - - return this; -} - -// @function disableScrollPropagation(el: HTMLElement): this -// Adds `stopPropagation` to the element's `'mousewheel'` events (plus browser variants). -function disableScrollPropagation(el) { - addOne(el, 'mousewheel', stopPropagation); - return this; -} - -// @function disableClickPropagation(el: HTMLElement): this -// Adds `stopPropagation` to the element's `'click'`, `'doubleclick'`, -// `'mousedown'` and `'touchstart'` events (plus browser variants). -function disableClickPropagation(el) { - on(el, 'mousedown touchstart dblclick', stopPropagation); - addOne(el, 'click', fakeStop); - return this; -} - -// @function preventDefault(ev: DOMEvent): this -// Prevents the default action of the DOM Event `ev` from happening (such as -// following a link in the href of the a element, or doing a POST request -// with page reload when a `
` is submitted). -// Use it inside listener functions. -function preventDefault(e) { - if (e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - } - return this; -} - -// @function stop(ev: DOMEvent): this -// Does `stopPropagation` and `preventDefault` at the same time. -function stop(e) { - preventDefault(e); - stopPropagation(e); - return this; -} - -// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point -// Gets normalized mouse position from a DOM event relative to the -// `container` (border excluded) or to the whole page if not specified. -function getMousePosition(e, container) { - if (!container) { - return new Point(e.clientX, e.clientY); - } - - var scale = getScale(container), - offset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y) - - return new Point( - // offset.left/top values are in page scale (like clientX/Y), - // whereas clientLeft/Top (border width) values are the original values (before CSS scale applies). - (e.clientX - offset.left) / scale.x - container.clientLeft, - (e.clientY - offset.top) / scale.y - container.clientTop - ); -} - -// Chrome on Win scrolls double the pixels as in other platforms (see #4538), -// and Firefox scrolls device pixels, not CSS pixels -var wheelPxFactor = - (win && chrome) ? 2 * window.devicePixelRatio : - gecko ? window.devicePixelRatio : 1; - -// @function getWheelDelta(ev: DOMEvent): Number -// Gets normalized wheel delta from a mousewheel DOM event, in vertical -// pixels scrolled (negative if scrolling down). -// Events from pointing devices without precise scrolling are mapped to -// a best guess of 60 pixels. -function getWheelDelta(e) { - return (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta - (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels - (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines - (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages - (e.deltaX || e.deltaZ) ? 0 : // Skip horizontal/depth wheel events - e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels - (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines - e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages - 0; -} - -var skipEvents = {}; - -function fakeStop(e) { - // fakes stopPropagation by setting a special event flag, checked/reset with skipped(e) - skipEvents[e.type] = true; -} - -function skipped(e) { - var events = skipEvents[e.type]; - // reset when checking, as it's only used in map container and propagates outside of the map - skipEvents[e.type] = false; - return events; -} - -// check if element really left/entered the event target (for mouseenter/mouseleave) -function isExternalTarget(el, e) { - - var related = e.relatedTarget; - - if (!related) { return true; } - - try { - while (related && (related !== el)) { - related = related.parentNode; - } - } catch (err) { - return false; - } - return (related !== el); -} - -var lastClick; - -// this is a horrible workaround for a bug in Android where a single touch triggers two click events -function filterClick(e, handler) { - var timeStamp = (e.timeStamp || (e.originalEvent && e.originalEvent.timeStamp)), - elapsed = lastClick && (timeStamp - lastClick); - - // are they closer together than 500ms yet more than 100ms? - // Android typically triggers them ~300ms apart while multiple listeners - // on the same event should be triggered far faster; - // or check if click is simulated on the element, and if it is, reject any non-simulated events - - if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) { - stop(e); - return; - } - lastClick = timeStamp; - - handler(e); -} - - - - -var DomEvent = (Object.freeze || Object)({ - on: on, - off: off, - stopPropagation: stopPropagation, - disableScrollPropagation: disableScrollPropagation, - disableClickPropagation: disableClickPropagation, - preventDefault: preventDefault, - stop: stop, - getMousePosition: getMousePosition, - getWheelDelta: getWheelDelta, - fakeStop: fakeStop, - skipped: skipped, - isExternalTarget: isExternalTarget, - addListener: on, - removeListener: off -}); - -/* - * @class PosAnimation - * @aka L.PosAnimation - * @inherits Evented - * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9. - * - * @example - * ```js - * var fx = new L.PosAnimation(); - * fx.run(el, [300, 500], 0.5); - * ``` - * - * @constructor L.PosAnimation() - * Creates a `PosAnimation` object. - * - */ - -var PosAnimation = Evented.extend({ - - // @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number) - // Run an animation of a given element to a new position, optionally setting - // duration in seconds (`0.25` by default) and easing linearity factor (3rd - // argument of the [cubic bezier curve](http://cubic-bezier.com/#0,0,.5,1), - // `0.5` by default). - run: function (el, newPos, duration, easeLinearity) { - this.stop(); - - this._el = el; - this._inProgress = true; - this._duration = duration || 0.25; - this._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2); - - this._startPos = getPosition(el); - this._offset = newPos.subtract(this._startPos); - this._startTime = +new Date(); - - // @event start: Event - // Fired when the animation starts - this.fire('start'); - - this._animate(); - }, - - // @method stop() - // Stops the animation (if currently running). - stop: function () { - if (!this._inProgress) { return; } - - this._step(true); - this._complete(); - }, - - _animate: function () { - // animation loop - this._animId = requestAnimFrame(this._animate, this); - this._step(); - }, - - _step: function (round) { - var elapsed = (+new Date()) - this._startTime, - duration = this._duration * 1000; - - if (elapsed < duration) { - this._runFrame(this._easeOut(elapsed / duration), round); - } else { - this._runFrame(1); - this._complete(); - } - }, - - _runFrame: function (progress, round) { - var pos = this._startPos.add(this._offset.multiplyBy(progress)); - if (round) { - pos._round(); - } - setPosition(this._el, pos); - - // @event step: Event - // Fired continuously during the animation. - this.fire('step'); - }, - - _complete: function () { - cancelAnimFrame(this._animId); - - this._inProgress = false; - // @event end: Event - // Fired when the animation ends. - this.fire('end'); - }, - - _easeOut: function (t) { - return 1 - Math.pow(1 - t, this._easeOutPower); - } -}); - -/* - * @class Map - * @aka L.Map - * @inherits Evented - * - * The central class of the API — it is used to create a map on a page and manipulate it. - * - * @example - * - * ```js - * // initialize the map on the "map" div with a given center and zoom - * var map = L.map('map', { - * center: [51.505, -0.09], - * zoom: 13 - * }); - * ``` - * - */ - -var Map = Evented.extend({ - - options: { - // @section Map State Options - // @option crs: CRS = L.CRS.EPSG3857 - // The [Coordinate Reference System](#crs) to use. Don't change this if you're not - // sure what it means. - crs: EPSG3857, - - // @option center: LatLng = undefined - // Initial geographic center of the map - center: undefined, - - // @option zoom: Number = undefined - // Initial map zoom level - zoom: undefined, - - // @option minZoom: Number = * - // Minimum zoom level of the map. - // If not specified and at least one `GridLayer` or `TileLayer` is in the map, - // the lowest of their `minZoom` options will be used instead. - minZoom: undefined, - - // @option maxZoom: Number = * - // Maximum zoom level of the map. - // If not specified and at least one `GridLayer` or `TileLayer` is in the map, - // the highest of their `maxZoom` options will be used instead. - maxZoom: undefined, - - // @option layers: Layer[] = [] - // Array of layers that will be added to the map initially - layers: [], - - // @option maxBounds: LatLngBounds = null - // When this option is set, the map restricts the view to the given - // geographical bounds, bouncing the user back if the user tries to pan - // outside the view. To set the restriction dynamically, use - // [`setMaxBounds`](#map-setmaxbounds) method. - maxBounds: undefined, - - // @option renderer: Renderer = * - // The default method for drawing vector layers on the map. `L.SVG` - // or `L.Canvas` by default depending on browser support. - renderer: undefined, - - - // @section Animation Options - // @option zoomAnimation: Boolean = true - // Whether the map zoom animation is enabled. By default it's enabled - // in all browsers that support CSS3 Transitions except Android. - zoomAnimation: true, - - // @option zoomAnimationThreshold: Number = 4 - // Won't animate zoom if the zoom difference exceeds this value. - zoomAnimationThreshold: 4, - - // @option fadeAnimation: Boolean = true - // Whether the tile fade animation is enabled. By default it's enabled - // in all browsers that support CSS3 Transitions except Android. - fadeAnimation: true, - - // @option markerZoomAnimation: Boolean = true - // Whether markers animate their zoom with the zoom animation, if disabled - // they will disappear for the length of the animation. By default it's - // enabled in all browsers that support CSS3 Transitions except Android. - markerZoomAnimation: true, - - // @option transform3DLimit: Number = 2^23 - // Defines the maximum size of a CSS translation transform. The default - // value should not be changed unless a web browser positions layers in - // the wrong place after doing a large `panBy`. - transform3DLimit: 8388608, // Precision limit of a 32-bit float - - // @section Interaction Options - // @option zoomSnap: Number = 1 - // Forces the map's zoom level to always be a multiple of this, particularly - // right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom. - // By default, the zoom level snaps to the nearest integer; lower values - // (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0` - // means the zoom level will not be snapped after `fitBounds` or a pinch-zoom. - zoomSnap: 1, - - // @option zoomDelta: Number = 1 - // Controls how much the map's zoom level will change after a - // [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+` - // or `-` on the keyboard, or using the [zoom controls](#control-zoom). - // Values smaller than `1` (e.g. `0.5`) allow for greater granularity. - zoomDelta: 1, - - // @option trackResize: Boolean = true - // Whether the map automatically handles browser window resize to update itself. - trackResize: true - }, - - initialize: function (id, options) { // (HTMLElement or String, Object) - options = setOptions(this, options); - - // Make sure to assign internal flags at the beginning, - // to avoid inconsistent state in some edge cases. - this._handlers = []; - this._layers = {}; - this._zoomBoundLayers = {}; - this._sizeChanged = true; - - this._initContainer(id); - this._initLayout(); - - // hack for https://github.com/Leaflet/Leaflet/issues/1980 - this._onResize = bind(this._onResize, this); - - this._initEvents(); - - if (options.maxBounds) { - this.setMaxBounds(options.maxBounds); - } - - if (options.zoom !== undefined) { - this._zoom = this._limitZoom(options.zoom); - } - - if (options.center && options.zoom !== undefined) { - this.setView(toLatLng(options.center), options.zoom, {reset: true}); - } - - this.callInitHooks(); - - // don't animate on browsers without hardware-accelerated transitions or old Android/Opera - this._zoomAnimated = TRANSITION && any3d && !mobileOpera && - this.options.zoomAnimation; - - // zoom transitions run with the same duration for all layers, so if one of transitionend events - // happens after starting zoom animation (propagating to the map pane), we know that it ended globally - if (this._zoomAnimated) { - this._createAnimProxy(); - on(this._proxy, TRANSITION_END, this._catchTransitionEnd, this); - } - - this._addLayers(this.options.layers); - }, - - - // @section Methods for modifying map state - - // @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this - // Sets the view of the map (geographical center and zoom) with the given - // animation options. - setView: function (center, zoom, options) { - - zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom); - center = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds); - options = options || {}; - - this._stop(); - - if (this._loaded && !options.reset && options !== true) { - - if (options.animate !== undefined) { - options.zoom = extend({animate: options.animate}, options.zoom); - options.pan = extend({animate: options.animate, duration: options.duration}, options.pan); - } - - // try animating pan or zoom - var moved = (this._zoom !== zoom) ? - this._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) : - this._tryAnimatedPan(center, options.pan); - - if (moved) { - // prevent resize handler call, the view will refresh after animation anyway - clearTimeout(this._sizeTimer); - return this; - } - } - - // animation didn't start, just reset the map view - this._resetView(center, zoom); - - return this; - }, - - // @method setZoom(zoom: Number, options?: Zoom/pan options): this - // Sets the zoom of the map. - setZoom: function (zoom, options) { - if (!this._loaded) { - this._zoom = zoom; - return this; - } - return this.setView(this.getCenter(), zoom, {zoom: options}); - }, - - // @method zoomIn(delta?: Number, options?: Zoom options): this - // Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). - zoomIn: function (delta, options) { - delta = delta || (any3d ? this.options.zoomDelta : 1); - return this.setZoom(this._zoom + delta, options); - }, - - // @method zoomOut(delta?: Number, options?: Zoom options): this - // Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). - zoomOut: function (delta, options) { - delta = delta || (any3d ? this.options.zoomDelta : 1); - return this.setZoom(this._zoom - delta, options); - }, - - // @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this - // Zooms the map while keeping a specified geographical point on the map - // stationary (e.g. used internally for scroll zoom and double-click zoom). - // @alternative - // @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this - // Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary. - setZoomAround: function (latlng, zoom, options) { - var scale = this.getZoomScale(zoom), - viewHalf = this.getSize().divideBy(2), - containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng), - - centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale), - newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset)); - - return this.setView(newCenter, zoom, {zoom: options}); - }, - - _getBoundsCenterZoom: function (bounds, options) { - - options = options || {}; - bounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds); - - var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]), - paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]), - - zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR)); - - zoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom; - - if (zoom === Infinity) { - return { - center: bounds.getCenter(), - zoom: zoom - }; - } - - var paddingOffset = paddingBR.subtract(paddingTL).divideBy(2), - - swPoint = this.project(bounds.getSouthWest(), zoom), - nePoint = this.project(bounds.getNorthEast(), zoom), - center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom); - - return { - center: center, - zoom: zoom - }; - }, - - // @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this - // Sets a map view that contains the given geographical bounds with the - // maximum zoom level possible. - fitBounds: function (bounds, options) { - - bounds = toLatLngBounds(bounds); - - if (!bounds.isValid()) { - throw new Error('Bounds are not valid.'); - } - - var target = this._getBoundsCenterZoom(bounds, options); - return this.setView(target.center, target.zoom, options); - }, - - // @method fitWorld(options?: fitBounds options): this - // Sets a map view that mostly contains the whole world with the maximum - // zoom level possible. - fitWorld: function (options) { - return this.fitBounds([[-90, -180], [90, 180]], options); - }, - - // @method panTo(latlng: LatLng, options?: Pan options): this - // Pans the map to a given center. - panTo: function (center, options) { // (LatLng) - return this.setView(center, this._zoom, {pan: options}); - }, - - // @method panBy(offset: Point, options?: Pan options): this - // Pans the map by a given number of pixels (animated). - panBy: function (offset, options) { - offset = toPoint(offset).round(); - options = options || {}; - - if (!offset.x && !offset.y) { - return this.fire('moveend'); - } - // If we pan too far, Chrome gets issues with tiles - // and makes them disappear or appear in the wrong place (slightly offset) #2602 - if (options.animate !== true && !this.getSize().contains(offset)) { - this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom()); - return this; - } - - if (!this._panAnim) { - this._panAnim = new PosAnimation(); - - this._panAnim.on({ - 'step': this._onPanTransitionStep, - 'end': this._onPanTransitionEnd - }, this); - } - - // don't fire movestart if animating inertia - if (!options.noMoveStart) { - this.fire('movestart'); - } - - // animate pan unless animate: false specified - if (options.animate !== false) { - addClass(this._mapPane, 'leaflet-pan-anim'); - - var newPos = this._getMapPanePos().subtract(offset).round(); - this._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity); - } else { - this._rawPanBy(offset); - this.fire('move').fire('moveend'); - } - - return this; - }, - - // @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this - // Sets the view of the map (geographical center and zoom) performing a smooth - // pan-zoom animation. - flyTo: function (targetCenter, targetZoom, options) { - - options = options || {}; - if (options.animate === false || !any3d) { - return this.setView(targetCenter, targetZoom, options); - } - - this._stop(); - - var from = this.project(this.getCenter()), - to = this.project(targetCenter), - size = this.getSize(), - startZoom = this._zoom; - - targetCenter = toLatLng(targetCenter); - targetZoom = targetZoom === undefined ? startZoom : targetZoom; - - var w0 = Math.max(size.x, size.y), - w1 = w0 * this.getZoomScale(startZoom, targetZoom), - u1 = (to.distanceTo(from)) || 1, - rho = 1.42, - rho2 = rho * rho; - - function r(i) { - var s1 = i ? -1 : 1, - s2 = i ? w1 : w0, - t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1, - b1 = 2 * s2 * rho2 * u1, - b = t1 / b1, - sq = Math.sqrt(b * b + 1) - b; - - // workaround for floating point precision bug when sq = 0, log = -Infinite, - // thus triggering an infinite loop in flyTo - var log = sq < 0.000000001 ? -18 : Math.log(sq); - - return log; - } - - function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; } - function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; } - function tanh(n) { return sinh(n) / cosh(n); } - - var r0 = r(0); - - function w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); } - function u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; } - - function easeOut(t) { return 1 - Math.pow(1 - t, 1.5); } - - var start = Date.now(), - S = (r(1) - r0) / rho, - duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8; - - function frame() { - var t = (Date.now() - start) / duration, - s = easeOut(t) * S; - - if (t <= 1) { - this._flyToFrame = requestAnimFrame(frame, this); - - this._move( - this.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom), - this.getScaleZoom(w0 / w(s), startZoom), - {flyTo: true}); - - } else { - this - ._move(targetCenter, targetZoom) - ._moveEnd(true); - } - } - - this._moveStart(true, options.noMoveStart); - - frame.call(this); - return this; - }, - - // @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this - // Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto), - // but takes a bounds parameter like [`fitBounds`](#map-fitbounds). - flyToBounds: function (bounds, options) { - var target = this._getBoundsCenterZoom(bounds, options); - return this.flyTo(target.center, target.zoom, options); - }, - - // @method setMaxBounds(bounds: Bounds): this - // Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option). - setMaxBounds: function (bounds) { - bounds = toLatLngBounds(bounds); - - if (!bounds.isValid()) { - this.options.maxBounds = null; - return this.off('moveend', this._panInsideMaxBounds); - } else if (this.options.maxBounds) { - this.off('moveend', this._panInsideMaxBounds); - } - - this.options.maxBounds = bounds; - - if (this._loaded) { - this._panInsideMaxBounds(); - } - - return this.on('moveend', this._panInsideMaxBounds); - }, - - // @method setMinZoom(zoom: Number): this - // Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option). - setMinZoom: function (zoom) { - var oldZoom = this.options.minZoom; - this.options.minZoom = zoom; - - if (this._loaded && oldZoom !== zoom) { - this.fire('zoomlevelschange'); - - if (this.getZoom() < this.options.minZoom) { - return this.setZoom(zoom); - } - } - - return this; - }, - - // @method setMaxZoom(zoom: Number): this - // Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option). - setMaxZoom: function (zoom) { - var oldZoom = this.options.maxZoom; - this.options.maxZoom = zoom; - - if (this._loaded && oldZoom !== zoom) { - this.fire('zoomlevelschange'); - - if (this.getZoom() > this.options.maxZoom) { - return this.setZoom(zoom); - } - } - - return this; - }, - - // @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this - // Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any. - panInsideBounds: function (bounds, options) { - this._enforcingBounds = true; - var center = this.getCenter(), - newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds)); - - if (!center.equals(newCenter)) { - this.panTo(newCenter, options); - } - - this._enforcingBounds = false; - return this; - }, - - // @method panInside(latlng: LatLng, options?: options): this - // Pans the map the minimum amount to make the `latlng` visible. Use - // `padding`, `paddingTopLeft` and `paddingTopRight` options to fit - // the display to more restricted bounds, like [`fitBounds`](#map-fitbounds). - // If `latlng` is already within the (optionally padded) display bounds, - // the map will not be panned. - panInside: function (latlng, options) { - options = options || {}; - - var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]), - paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]), - center = this.getCenter(), - pixelCenter = this.project(center), - pixelPoint = this.project(latlng), - pixelBounds = this.getPixelBounds(), - halfPixelBounds = pixelBounds.getSize().divideBy(2), - paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]); - - if (!paddedBounds.contains(pixelPoint)) { - this._enforcingBounds = true; - var diff = pixelCenter.subtract(pixelPoint), - newCenter = toPoint(pixelPoint.x + diff.x, pixelPoint.y + diff.y); - - if (pixelPoint.x < paddedBounds.min.x || pixelPoint.x > paddedBounds.max.x) { - newCenter.x = pixelCenter.x - diff.x; - if (diff.x > 0) { - newCenter.x += halfPixelBounds.x - paddingTL.x; - } else { - newCenter.x -= halfPixelBounds.x - paddingBR.x; - } - } - if (pixelPoint.y < paddedBounds.min.y || pixelPoint.y > paddedBounds.max.y) { - newCenter.y = pixelCenter.y - diff.y; - if (diff.y > 0) { - newCenter.y += halfPixelBounds.y - paddingTL.y; - } else { - newCenter.y -= halfPixelBounds.y - paddingBR.y; - } - } - this.panTo(this.unproject(newCenter), options); - this._enforcingBounds = false; - } - return this; - }, - - // @method invalidateSize(options: Zoom/pan options): this - // Checks if the map container size changed and updates the map if so — - // call it after you've changed the map size dynamically, also animating - // pan by default. If `options.pan` is `false`, panning will not occur. - // If `options.debounceMoveend` is `true`, it will delay `moveend` event so - // that it doesn't happen often even if the method is called many - // times in a row. - - // @alternative - // @method invalidateSize(animate: Boolean): this - // Checks if the map container size changed and updates the map if so — - // call it after you've changed the map size dynamically, also animating - // pan by default. - invalidateSize: function (options) { - if (!this._loaded) { return this; } - - options = extend({ - animate: false, - pan: true - }, options === true ? {animate: true} : options); - - var oldSize = this.getSize(); - this._sizeChanged = true; - this._lastCenter = null; - - var newSize = this.getSize(), - oldCenter = oldSize.divideBy(2).round(), - newCenter = newSize.divideBy(2).round(), - offset = oldCenter.subtract(newCenter); - - if (!offset.x && !offset.y) { return this; } - - if (options.animate && options.pan) { - this.panBy(offset); - - } else { - if (options.pan) { - this._rawPanBy(offset); - } - - this.fire('move'); - - if (options.debounceMoveend) { - clearTimeout(this._sizeTimer); - this._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200); - } else { - this.fire('moveend'); - } - } - - // @section Map state change events - // @event resize: ResizeEvent - // Fired when the map is resized. - return this.fire('resize', { - oldSize: oldSize, - newSize: newSize - }); - }, - - // @section Methods for modifying map state - // @method stop(): this - // Stops the currently running `panTo` or `flyTo` animation, if any. - stop: function () { - this.setZoom(this._limitZoom(this._zoom)); - if (!this.options.zoomSnap) { - this.fire('viewreset'); - } - return this._stop(); - }, - - // @section Geolocation methods - // @method locate(options?: Locate options): this - // Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound) - // event with location data on success or a [`locationerror`](#map-locationerror) event on failure, - // and optionally sets the map view to the user's location with respect to - // detection accuracy (or to the world view if geolocation failed). - // Note that, if your page doesn't use HTTPS, this method will fail in - // modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins)) - // See `Locate options` for more details. - locate: function (options) { - - options = this._locateOptions = extend({ - timeout: 10000, - watch: false - // setView: false - // maxZoom: - // maximumAge: 0 - // enableHighAccuracy: false - }, options); - - if (!('geolocation' in navigator)) { - this._handleGeolocationError({ - code: 0, - message: 'Geolocation not supported.' - }); - return this; - } - - var onResponse = bind(this._handleGeolocationResponse, this), - onError = bind(this._handleGeolocationError, this); - - if (options.watch) { - this._locationWatchId = - navigator.geolocation.watchPosition(onResponse, onError, options); - } else { - navigator.geolocation.getCurrentPosition(onResponse, onError, options); - } - return this; - }, - - // @method stopLocate(): this - // Stops watching location previously initiated by `map.locate({watch: true})` - // and aborts resetting the map view if map.locate was called with - // `{setView: true}`. - stopLocate: function () { - if (navigator.geolocation && navigator.geolocation.clearWatch) { - navigator.geolocation.clearWatch(this._locationWatchId); - } - if (this._locateOptions) { - this._locateOptions.setView = false; - } - return this; - }, - - _handleGeolocationError: function (error) { - var c = error.code, - message = error.message || - (c === 1 ? 'permission denied' : - (c === 2 ? 'position unavailable' : 'timeout')); - - if (this._locateOptions.setView && !this._loaded) { - this.fitWorld(); - } - - // @section Location events - // @event locationerror: ErrorEvent - // Fired when geolocation (using the [`locate`](#map-locate) method) failed. - this.fire('locationerror', { - code: c, - message: 'Geolocation error: ' + message + '.' - }); - }, - - _handleGeolocationResponse: function (pos) { - var lat = pos.coords.latitude, - lng = pos.coords.longitude, - latlng = new LatLng(lat, lng), - bounds = latlng.toBounds(pos.coords.accuracy * 2), - options = this._locateOptions; - - if (options.setView) { - var zoom = this.getBoundsZoom(bounds); - this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom); - } - - var data = { - latlng: latlng, - bounds: bounds, - timestamp: pos.timestamp - }; - - for (var i in pos.coords) { - if (typeof pos.coords[i] === 'number') { - data[i] = pos.coords[i]; - } - } - - // @event locationfound: LocationEvent - // Fired when geolocation (using the [`locate`](#map-locate) method) - // went successfully. - this.fire('locationfound', data); - }, - - // TODO Appropriate docs section? - // @section Other Methods - // @method addHandler(name: String, HandlerClass: Function): this - // Adds a new `Handler` to the map, given its name and constructor function. - addHandler: function (name, HandlerClass) { - if (!HandlerClass) { return this; } - - var handler = this[name] = new HandlerClass(this); - - this._handlers.push(handler); - - if (this.options[name]) { - handler.enable(); - } - - return this; - }, - - // @method remove(): this - // Destroys the map and clears all related event listeners. - remove: function () { - - this._initEvents(true); - - if (this._containerId !== this._container._leaflet_id) { - throw new Error('Map container is being reused by another instance'); - } - - try { - // throws error in IE6-8 - delete this._container._leaflet_id; - delete this._containerId; - } catch (e) { - /*eslint-disable */ - this._container._leaflet_id = undefined; - /* eslint-enable */ - this._containerId = undefined; - } - - if (this._locationWatchId !== undefined) { - this.stopLocate(); - } - - this._stop(); - - remove(this._mapPane); - - if (this._clearControlPos) { - this._clearControlPos(); - } - if (this._resizeRequest) { - cancelAnimFrame(this._resizeRequest); - this._resizeRequest = null; - } - - this._clearHandlers(); - - if (this._loaded) { - // @section Map state change events - // @event unload: Event - // Fired when the map is destroyed with [remove](#map-remove) method. - this.fire('unload'); - } - - var i; - for (i in this._layers) { - this._layers[i].remove(); - } - for (i in this._panes) { - remove(this._panes[i]); - } - - this._layers = []; - this._panes = []; - delete this._mapPane; - delete this._renderer; - - return this; - }, - - // @section Other Methods - // @method createPane(name: String, container?: HTMLElement): HTMLElement - // Creates a new [map pane](#map-pane) with the given name if it doesn't exist already, - // then returns it. The pane is created as a child of `container`, or - // as a child of the main map pane if not set. - createPane: function (name, container) { - var className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''), - pane = create$1('div', className, container || this._mapPane); - - if (name) { - this._panes[name] = pane; - } - return pane; - }, - - // @section Methods for Getting Map State - - // @method getCenter(): LatLng - // Returns the geographical center of the map view - getCenter: function () { - this._checkIfLoaded(); - - if (this._lastCenter && !this._moved()) { - return this._lastCenter; - } - return this.layerPointToLatLng(this._getCenterLayerPoint()); - }, - - // @method getZoom(): Number - // Returns the current zoom level of the map view - getZoom: function () { - return this._zoom; - }, - - // @method getBounds(): LatLngBounds - // Returns the geographical bounds visible in the current map view - getBounds: function () { - var bounds = this.getPixelBounds(), - sw = this.unproject(bounds.getBottomLeft()), - ne = this.unproject(bounds.getTopRight()); - - return new LatLngBounds(sw, ne); - }, - - // @method getMinZoom(): Number - // Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default. - getMinZoom: function () { - return this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom; - }, - - // @method getMaxZoom(): Number - // Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers). - getMaxZoom: function () { - return this.options.maxZoom === undefined ? - (this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) : - this.options.maxZoom; - }, - - // @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number - // Returns the maximum zoom level on which the given bounds fit to the map - // view in its entirety. If `inside` (optional) is set to `true`, the method - // instead returns the minimum zoom level on which the map view fits into - // the given bounds in its entirety. - getBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number - bounds = toLatLngBounds(bounds); - padding = toPoint(padding || [0, 0]); - - var zoom = this.getZoom() || 0, - min = this.getMinZoom(), - max = this.getMaxZoom(), - nw = bounds.getNorthWest(), - se = bounds.getSouthEast(), - size = this.getSize().subtract(padding), - boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(), - snap = any3d ? this.options.zoomSnap : 1, - scalex = size.x / boundsSize.x, - scaley = size.y / boundsSize.y, - scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley); - - zoom = this.getScaleZoom(scale, zoom); - - if (snap) { - zoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level - zoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap; - } - - return Math.max(min, Math.min(max, zoom)); - }, - - // @method getSize(): Point - // Returns the current size of the map container (in pixels). - getSize: function () { - if (!this._size || this._sizeChanged) { - this._size = new Point( - this._container.clientWidth || 0, - this._container.clientHeight || 0); - - this._sizeChanged = false; - } - return this._size.clone(); - }, - - // @method getPixelBounds(): Bounds - // Returns the bounds of the current map view in projected pixel - // coordinates (sometimes useful in layer and overlay implementations). - getPixelBounds: function (center, zoom) { - var topLeftPoint = this._getTopLeftPoint(center, zoom); - return new Bounds(topLeftPoint, topLeftPoint.add(this.getSize())); - }, - - // TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to - // the map pane? "left point of the map layer" can be confusing, specially - // since there can be negative offsets. - // @method getPixelOrigin(): Point - // Returns the projected pixel coordinates of the top left point of - // the map layer (useful in custom layer and overlay implementations). - getPixelOrigin: function () { - this._checkIfLoaded(); - return this._pixelOrigin; - }, - - // @method getPixelWorldBounds(zoom?: Number): Bounds - // Returns the world's bounds in pixel coordinates for zoom level `zoom`. - // If `zoom` is omitted, the map's current zoom level is used. - getPixelWorldBounds: function (zoom) { - return this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom); - }, - - // @section Other Methods - - // @method getPane(pane: String|HTMLElement): HTMLElement - // Returns a [map pane](#map-pane), given its name or its HTML element (its identity). - getPane: function (pane) { - return typeof pane === 'string' ? this._panes[pane] : pane; - }, - - // @method getPanes(): Object - // Returns a plain object containing the names of all [panes](#map-pane) as keys and - // the panes as values. - getPanes: function () { - return this._panes; - }, - - // @method getContainer: HTMLElement - // Returns the HTML element that contains the map. - getContainer: function () { - return this._container; - }, - - - // @section Conversion Methods - - // @method getZoomScale(toZoom: Number, fromZoom: Number): Number - // Returns the scale factor to be applied to a map transition from zoom level - // `fromZoom` to `toZoom`. Used internally to help with zoom animations. - getZoomScale: function (toZoom, fromZoom) { - // TODO replace with universal implementation after refactoring projections - var crs = this.options.crs; - fromZoom = fromZoom === undefined ? this._zoom : fromZoom; - return crs.scale(toZoom) / crs.scale(fromZoom); - }, - - // @method getScaleZoom(scale: Number, fromZoom: Number): Number - // Returns the zoom level that the map would end up at, if it is at `fromZoom` - // level and everything is scaled by a factor of `scale`. Inverse of - // [`getZoomScale`](#map-getZoomScale). - getScaleZoom: function (scale, fromZoom) { - var crs = this.options.crs; - fromZoom = fromZoom === undefined ? this._zoom : fromZoom; - var zoom = crs.zoom(scale * crs.scale(fromZoom)); - return isNaN(zoom) ? Infinity : zoom; - }, - - // @method project(latlng: LatLng, zoom: Number): Point - // Projects a geographical coordinate `LatLng` according to the projection - // of the map's CRS, then scales it according to `zoom` and the CRS's - // `Transformation`. The result is pixel coordinate relative to - // the CRS origin. - project: function (latlng, zoom) { - zoom = zoom === undefined ? this._zoom : zoom; - return this.options.crs.latLngToPoint(toLatLng(latlng), zoom); - }, - - // @method unproject(point: Point, zoom: Number): LatLng - // Inverse of [`project`](#map-project). - unproject: function (point, zoom) { - zoom = zoom === undefined ? this._zoom : zoom; - return this.options.crs.pointToLatLng(toPoint(point), zoom); - }, - - // @method layerPointToLatLng(point: Point): LatLng - // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), - // returns the corresponding geographical coordinate (for the current zoom level). - layerPointToLatLng: function (point) { - var projectedPoint = toPoint(point).add(this.getPixelOrigin()); - return this.unproject(projectedPoint); - }, - - // @method latLngToLayerPoint(latlng: LatLng): Point - // Given a geographical coordinate, returns the corresponding pixel coordinate - // relative to the [origin pixel](#map-getpixelorigin). - latLngToLayerPoint: function (latlng) { - var projectedPoint = this.project(toLatLng(latlng))._round(); - return projectedPoint._subtract(this.getPixelOrigin()); - }, - - // @method wrapLatLng(latlng: LatLng): LatLng - // Returns a `LatLng` where `lat` and `lng` has been wrapped according to the - // map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the - // CRS's bounds. - // By default this means longitude is wrapped around the dateline so its - // value is between -180 and +180 degrees. - wrapLatLng: function (latlng) { - return this.options.crs.wrapLatLng(toLatLng(latlng)); - }, - - // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds - // Returns a `LatLngBounds` with the same size as the given one, ensuring that - // its center is within the CRS's bounds. - // By default this means the center longitude is wrapped around the dateline so its - // value is between -180 and +180 degrees, and the majority of the bounds - // overlaps the CRS's bounds. - wrapLatLngBounds: function (latlng) { - return this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng)); - }, - - // @method distance(latlng1: LatLng, latlng2: LatLng): Number - // Returns the distance between two geographical coordinates according to - // the map's CRS. By default this measures distance in meters. - distance: function (latlng1, latlng2) { - return this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2)); - }, - - // @method containerPointToLayerPoint(point: Point): Point - // Given a pixel coordinate relative to the map container, returns the corresponding - // pixel coordinate relative to the [origin pixel](#map-getpixelorigin). - containerPointToLayerPoint: function (point) { // (Point) - return toPoint(point).subtract(this._getMapPanePos()); - }, - - // @method layerPointToContainerPoint(point: Point): Point - // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), - // returns the corresponding pixel coordinate relative to the map container. - layerPointToContainerPoint: function (point) { // (Point) - return toPoint(point).add(this._getMapPanePos()); - }, - - // @method containerPointToLatLng(point: Point): LatLng - // Given a pixel coordinate relative to the map container, returns - // the corresponding geographical coordinate (for the current zoom level). - containerPointToLatLng: function (point) { - var layerPoint = this.containerPointToLayerPoint(toPoint(point)); - return this.layerPointToLatLng(layerPoint); - }, - - // @method latLngToContainerPoint(latlng: LatLng): Point - // Given a geographical coordinate, returns the corresponding pixel coordinate - // relative to the map container. - latLngToContainerPoint: function (latlng) { - return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng))); - }, - - // @method mouseEventToContainerPoint(ev: MouseEvent): Point - // Given a MouseEvent object, returns the pixel coordinate relative to the - // map container where the event took place. - mouseEventToContainerPoint: function (e) { - return getMousePosition(e, this._container); - }, - - // @method mouseEventToLayerPoint(ev: MouseEvent): Point - // Given a MouseEvent object, returns the pixel coordinate relative to - // the [origin pixel](#map-getpixelorigin) where the event took place. - mouseEventToLayerPoint: function (e) { - return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e)); - }, - - // @method mouseEventToLatLng(ev: MouseEvent): LatLng - // Given a MouseEvent object, returns geographical coordinate where the - // event took place. - mouseEventToLatLng: function (e) { // (MouseEvent) - return this.layerPointToLatLng(this.mouseEventToLayerPoint(e)); - }, - - - // map initialization methods - - _initContainer: function (id) { - var container = this._container = get(id); - - if (!container) { - throw new Error('Map container not found.'); - } else if (container._leaflet_id) { - throw new Error('Map container is already initialized.'); - } - - on(container, 'scroll', this._onScroll, this); - this._containerId = stamp(container); - }, - - _initLayout: function () { - var container = this._container; - - this._fadeAnimated = this.options.fadeAnimation && any3d; - - addClass(container, 'leaflet-container' + - (touch ? ' leaflet-touch' : '') + - (retina ? ' leaflet-retina' : '') + - (ielt9 ? ' leaflet-oldie' : '') + - (safari ? ' leaflet-safari' : '') + - (this._fadeAnimated ? ' leaflet-fade-anim' : '')); - - var position = getStyle(container, 'position'); - - if (position !== 'absolute' && position !== 'relative' && position !== 'fixed') { - container.style.position = 'relative'; - } - - this._initPanes(); - - if (this._initControlPos) { - this._initControlPos(); - } - }, - - _initPanes: function () { - var panes = this._panes = {}; - this._paneRenderers = {}; - - // @section - // - // Panes are DOM elements used to control the ordering of layers on the map. You - // can access panes with [`map.getPane`](#map-getpane) or - // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the - // [`map.createPane`](#map-createpane) method. - // - // Every map has the following default panes that differ only in zIndex. - // - // @pane mapPane: HTMLElement = 'auto' - // Pane that contains all other map panes - - this._mapPane = this.createPane('mapPane', this._container); - setPosition(this._mapPane, new Point(0, 0)); - - // @pane tilePane: HTMLElement = 200 - // Pane for `GridLayer`s and `TileLayer`s - this.createPane('tilePane'); - // @pane overlayPane: HTMLElement = 400 - // Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s - this.createPane('shadowPane'); - // @pane shadowPane: HTMLElement = 500 - // Pane for overlay shadows (e.g. `Marker` shadows) - this.createPane('overlayPane'); - // @pane markerPane: HTMLElement = 600 - // Pane for `Icon`s of `Marker`s - this.createPane('markerPane'); - // @pane tooltipPane: HTMLElement = 650 - // Pane for `Tooltip`s. - this.createPane('tooltipPane'); - // @pane popupPane: HTMLElement = 700 - // Pane for `Popup`s. - this.createPane('popupPane'); - - if (!this.options.markerZoomAnimation) { - addClass(panes.markerPane, 'leaflet-zoom-hide'); - addClass(panes.shadowPane, 'leaflet-zoom-hide'); - } - }, - - - // private methods that modify map state - - // @section Map state change events - _resetView: function (center, zoom) { - setPosition(this._mapPane, new Point(0, 0)); - - var loading = !this._loaded; - this._loaded = true; - zoom = this._limitZoom(zoom); - - this.fire('viewprereset'); - - var zoomChanged = this._zoom !== zoom; - this - ._moveStart(zoomChanged, false) - ._move(center, zoom) - ._moveEnd(zoomChanged); - - // @event viewreset: Event - // Fired when the map needs to redraw its content (this usually happens - // on map zoom or load). Very useful for creating custom overlays. - this.fire('viewreset'); - - // @event load: Event - // Fired when the map is initialized (when its center and zoom are set - // for the first time). - if (loading) { - this.fire('load'); - } - }, - - _moveStart: function (zoomChanged, noMoveStart) { - // @event zoomstart: Event - // Fired when the map zoom is about to change (e.g. before zoom animation). - // @event movestart: Event - // Fired when the view of the map starts changing (e.g. user starts dragging the map). - if (zoomChanged) { - this.fire('zoomstart'); - } - if (!noMoveStart) { - this.fire('movestart'); - } - return this; - }, - - _move: function (center, zoom, data) { - if (zoom === undefined) { - zoom = this._zoom; - } - var zoomChanged = this._zoom !== zoom; - - this._zoom = zoom; - this._lastCenter = center; - this._pixelOrigin = this._getNewPixelOrigin(center); - - // @event zoom: Event - // Fired repeatedly during any change in zoom level, including zoom - // and fly animations. - if (zoomChanged || (data && data.pinch)) { // Always fire 'zoom' if pinching because #3530 - this.fire('zoom', data); - } - - // @event move: Event - // Fired repeatedly during any movement of the map, including pan and - // fly animations. - return this.fire('move', data); - }, - - _moveEnd: function (zoomChanged) { - // @event zoomend: Event - // Fired when the map has changed, after any animations. - if (zoomChanged) { - this.fire('zoomend'); - } - - // @event moveend: Event - // Fired when the center of the map stops changing (e.g. user stopped - // dragging the map). - return this.fire('moveend'); - }, - - _stop: function () { - cancelAnimFrame(this._flyToFrame); - if (this._panAnim) { - this._panAnim.stop(); - } - return this; - }, - - _rawPanBy: function (offset) { - setPosition(this._mapPane, this._getMapPanePos().subtract(offset)); - }, - - _getZoomSpan: function () { - return this.getMaxZoom() - this.getMinZoom(); - }, - - _panInsideMaxBounds: function () { - if (!this._enforcingBounds) { - this.panInsideBounds(this.options.maxBounds); - } - }, - - _checkIfLoaded: function () { - if (!this._loaded) { - throw new Error('Set map center and zoom first.'); - } - }, - - // DOM event handling - - // @section Interaction events - _initEvents: function (remove$$1) { - this._targets = {}; - this._targets[stamp(this._container)] = this; - - var onOff = remove$$1 ? off : on; - - // @event click: MouseEvent - // Fired when the user clicks (or taps) the map. - // @event dblclick: MouseEvent - // Fired when the user double-clicks (or double-taps) the map. - // @event mousedown: MouseEvent - // Fired when the user pushes the mouse button on the map. - // @event mouseup: MouseEvent - // Fired when the user releases the mouse button on the map. - // @event mouseover: MouseEvent - // Fired when the mouse enters the map. - // @event mouseout: MouseEvent - // Fired when the mouse leaves the map. - // @event mousemove: MouseEvent - // Fired while the mouse moves over the map. - // @event contextmenu: MouseEvent - // Fired when the user pushes the right mouse button on the map, prevents - // default browser context menu from showing if there are listeners on - // this event. Also fired on mobile when the user holds a single touch - // for a second (also called long press). - // @event keypress: KeyboardEvent - // Fired when the user presses a key from the keyboard while the map is focused. - onOff(this._container, 'click dblclick mousedown mouseup ' + - 'mouseover mouseout mousemove contextmenu keypress', this._handleDOMEvent, this); - - if (this.options.trackResize) { - onOff(window, 'resize', this._onResize, this); - } - - if (any3d && this.options.transform3DLimit) { - (remove$$1 ? this.off : this.on).call(this, 'moveend', this._onMoveEnd); - } - }, - - _onResize: function () { - cancelAnimFrame(this._resizeRequest); - this._resizeRequest = requestAnimFrame( - function () { this.invalidateSize({debounceMoveend: true}); }, this); - }, - - _onScroll: function () { - this._container.scrollTop = 0; - this._container.scrollLeft = 0; - }, - - _onMoveEnd: function () { - var pos = this._getMapPanePos(); - if (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) { - // https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have - // a pixel offset on very high values, see: http://jsfiddle.net/dg6r5hhb/ - this._resetView(this.getCenter(), this.getZoom()); - } - }, - - _findEventTargets: function (e, type) { - var targets = [], - target, - isHover = type === 'mouseout' || type === 'mouseover', - src = e.target || e.srcElement, - dragging = false; - - while (src) { - target = this._targets[stamp(src)]; - if (target && (type === 'click' || type === 'preclick') && !e._simulated && this._draggableMoved(target)) { - // Prevent firing click after you just dragged an object. - dragging = true; - break; - } - if (target && target.listens(type, true)) { - if (isHover && !isExternalTarget(src, e)) { break; } - targets.push(target); - if (isHover) { break; } - } - if (src === this._container) { break; } - src = src.parentNode; - } - if (!targets.length && !dragging && !isHover && isExternalTarget(src, e)) { - targets = [this]; - } - return targets; - }, - - _handleDOMEvent: function (e) { - if (!this._loaded || skipped(e)) { return; } - - var type = e.type; - - if (type === 'mousedown' || type === 'keypress') { - // prevents outline when clicking on keyboard-focusable element - preventOutline(e.target || e.srcElement); - } - - this._fireDOMEvent(e, type); - }, - - _mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'], - - _fireDOMEvent: function (e, type, targets) { - - if (e.type === 'click') { - // Fire a synthetic 'preclick' event which propagates up (mainly for closing popups). - // @event preclick: MouseEvent - // Fired before mouse click on the map (sometimes useful when you - // want something to happen on click before any existing click - // handlers start running). - var synth = extend({}, e); - synth.type = 'preclick'; - this._fireDOMEvent(synth, synth.type, targets); - } - - if (e._stopped) { return; } - - // Find the layer the event is propagating from and its parents. - targets = (targets || []).concat(this._findEventTargets(e, type)); - - if (!targets.length) { return; } - - var target = targets[0]; - if (type === 'contextmenu' && target.listens(type, true)) { - preventDefault(e); - } - - var data = { - originalEvent: e - }; - - if (e.type !== 'keypress') { - var isMarker = target.getLatLng && (!target._radius || target._radius <= 10); - data.containerPoint = isMarker ? - this.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e); - data.layerPoint = this.containerPointToLayerPoint(data.containerPoint); - data.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint); - } - - for (var i = 0; i < targets.length; i++) { - targets[i].fire(type, data, true); - if (data.originalEvent._stopped || - (targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; } - } - }, - - _draggableMoved: function (obj) { - obj = obj.dragging && obj.dragging.enabled() ? obj : this; - return (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved()); - }, - - _clearHandlers: function () { - for (var i = 0, len = this._handlers.length; i < len; i++) { - this._handlers[i].disable(); - } - }, - - // @section Other Methods - - // @method whenReady(fn: Function, context?: Object): this - // Runs the given function `fn` when the map gets initialized with - // a view (center and zoom) and at least one layer, or immediately - // if it's already initialized, optionally passing a function context. - whenReady: function (callback, context) { - if (this._loaded) { - callback.call(context || this, {target: this}); - } else { - this.on('load', callback, context); - } - return this; - }, - - - // private methods for getting map state - - _getMapPanePos: function () { - return getPosition(this._mapPane) || new Point(0, 0); - }, - - _moved: function () { - var pos = this._getMapPanePos(); - return pos && !pos.equals([0, 0]); - }, - - _getTopLeftPoint: function (center, zoom) { - var pixelOrigin = center && zoom !== undefined ? - this._getNewPixelOrigin(center, zoom) : - this.getPixelOrigin(); - return pixelOrigin.subtract(this._getMapPanePos()); - }, - - _getNewPixelOrigin: function (center, zoom) { - var viewHalf = this.getSize()._divideBy(2); - return this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round(); - }, - - _latLngToNewLayerPoint: function (latlng, zoom, center) { - var topLeft = this._getNewPixelOrigin(center, zoom); - return this.project(latlng, zoom)._subtract(topLeft); - }, - - _latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) { - var topLeft = this._getNewPixelOrigin(center, zoom); - return toBounds([ - this.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft), - this.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft), - this.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft), - this.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft) - ]); - }, - - // layer point of the current center - _getCenterLayerPoint: function () { - return this.containerPointToLayerPoint(this.getSize()._divideBy(2)); - }, - - // offset of the specified place to the current center in pixels - _getCenterOffset: function (latlng) { - return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint()); - }, - - // adjust center for view to get inside bounds - _limitCenter: function (center, zoom, bounds) { - - if (!bounds) { return center; } - - var centerPoint = this.project(center, zoom), - viewHalf = this.getSize().divideBy(2), - viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)), - offset = this._getBoundsOffset(viewBounds, bounds, zoom); - - // If offset is less than a pixel, ignore. - // This prevents unstable projections from getting into - // an infinite loop of tiny offsets. - if (offset.round().equals([0, 0])) { - return center; - } - - return this.unproject(centerPoint.add(offset), zoom); - }, - - // adjust offset for view to get inside bounds - _limitOffset: function (offset, bounds) { - if (!bounds) { return offset; } - - var viewBounds = this.getPixelBounds(), - newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset)); - - return offset.add(this._getBoundsOffset(newBounds, bounds)); - }, - - // returns offset needed for pxBounds to get inside maxBounds at a specified zoom - _getBoundsOffset: function (pxBounds, maxBounds, zoom) { - var projectedMaxBounds = toBounds( - this.project(maxBounds.getNorthEast(), zoom), - this.project(maxBounds.getSouthWest(), zoom) - ), - minOffset = projectedMaxBounds.min.subtract(pxBounds.min), - maxOffset = projectedMaxBounds.max.subtract(pxBounds.max), - - dx = this._rebound(minOffset.x, -maxOffset.x), - dy = this._rebound(minOffset.y, -maxOffset.y); - - return new Point(dx, dy); - }, - - _rebound: function (left, right) { - return left + right > 0 ? - Math.round(left - right) / 2 : - Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right)); - }, - - _limitZoom: function (zoom) { - var min = this.getMinZoom(), - max = this.getMaxZoom(), - snap = any3d ? this.options.zoomSnap : 1; - if (snap) { - zoom = Math.round(zoom / snap) * snap; - } - return Math.max(min, Math.min(max, zoom)); - }, - - _onPanTransitionStep: function () { - this.fire('move'); - }, - - _onPanTransitionEnd: function () { - removeClass(this._mapPane, 'leaflet-pan-anim'); - this.fire('moveend'); - }, - - _tryAnimatedPan: function (center, options) { - // difference between the new and current centers in pixels - var offset = this._getCenterOffset(center)._trunc(); - - // don't animate too far unless animate: true specified in options - if ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; } - - this.panBy(offset, options); - - return true; - }, - - _createAnimProxy: function () { - - var proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated'); - this._panes.mapPane.appendChild(proxy); - - this.on('zoomanim', function (e) { - var prop = TRANSFORM, - transform = this._proxy.style[prop]; - - setTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)); - - // workaround for case when transform is the same and so transitionend event is not fired - if (transform === this._proxy.style[prop] && this._animatingZoom) { - this._onZoomTransitionEnd(); - } - }, this); - - this.on('load moveend', function () { - var c = this.getCenter(), - z = this.getZoom(); - setTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1)); - }, this); - - this._on('unload', this._destroyAnimProxy, this); - }, - - _destroyAnimProxy: function () { - remove(this._proxy); - delete this._proxy; - }, - - _catchTransitionEnd: function (e) { - if (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) { - this._onZoomTransitionEnd(); - } - }, - - _nothingToAnimate: function () { - return !this._container.getElementsByClassName('leaflet-zoom-animated').length; - }, - - _tryAnimatedZoom: function (center, zoom, options) { - - if (this._animatingZoom) { return true; } - - options = options || {}; - - // don't animate if disabled, not supported or zoom difference is too large - if (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() || - Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; } - - // offset is the pixel coords of the zoom origin relative to the current center - var scale = this.getZoomScale(zoom), - offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale); - - // don't animate if the zoom origin isn't within one screen from the current center, unless forced - if (options.animate !== true && !this.getSize().contains(offset)) { return false; } - - requestAnimFrame(function () { - this - ._moveStart(true, false) - ._animateZoom(center, zoom, true); - }, this); - - return true; - }, - - _animateZoom: function (center, zoom, startAnim, noUpdate) { - if (!this._mapPane) { return; } - - if (startAnim) { - this._animatingZoom = true; - - // remember what center/zoom to set after animation - this._animateToCenter = center; - this._animateToZoom = zoom; - - addClass(this._mapPane, 'leaflet-zoom-anim'); - } - - // @event zoomanim: ZoomAnimEvent - // Fired at least once per zoom animation. For continous zoom, like pinch zooming, fired once per frame during zoom. - this.fire('zoomanim', { - center: center, - zoom: zoom, - noUpdate: noUpdate - }); - - // Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693 - setTimeout(bind(this._onZoomTransitionEnd, this), 250); - }, - - _onZoomTransitionEnd: function () { - if (!this._animatingZoom) { return; } - - if (this._mapPane) { - removeClass(this._mapPane, 'leaflet-zoom-anim'); - } - - this._animatingZoom = false; - - this._move(this._animateToCenter, this._animateToZoom); - - // This anim frame should prevent an obscure iOS webkit tile loading race condition. - requestAnimFrame(function () { - this._moveEnd(true); - }, this); - } -}); - -// @section - -// @factory L.map(id: String, options?: Map options) -// Instantiates a map object given the DOM ID of a `
` element -// and optionally an object literal with `Map options`. -// -// @alternative -// @factory L.map(el: HTMLElement, options?: Map options) -// Instantiates a map object given an instance of a `
` HTML element -// and optionally an object literal with `Map options`. -function createMap(id, options) { - return new Map(id, options); -} - -/* - * @class Control - * @aka L.Control - * @inherits Class - * - * L.Control is a base class for implementing map controls. Handles positioning. - * All other controls extend from this class. - */ - -var Control = Class.extend({ - // @section - // @aka Control options - options: { - // @option position: String = 'topright' - // The position of the control (one of the map corners). Possible values are `'topleft'`, - // `'topright'`, `'bottomleft'` or `'bottomright'` - position: 'topright' - }, - - initialize: function (options) { - setOptions(this, options); - }, - - /* @section - * Classes extending L.Control will inherit the following methods: - * - * @method getPosition: string - * Returns the position of the control. - */ - getPosition: function () { - return this.options.position; - }, - - // @method setPosition(position: string): this - // Sets the position of the control. - setPosition: function (position) { - var map = this._map; - - if (map) { - map.removeControl(this); - } - - this.options.position = position; - - if (map) { - map.addControl(this); - } - - return this; - }, - - // @method getContainer: HTMLElement - // Returns the HTMLElement that contains the control. - getContainer: function () { - return this._container; - }, - - // @method addTo(map: Map): this - // Adds the control to the given map. - addTo: function (map) { - this.remove(); - this._map = map; - - var container = this._container = this.onAdd(map), - pos = this.getPosition(), - corner = map._controlCorners[pos]; - - addClass(container, 'leaflet-control'); - - if (pos.indexOf('bottom') !== -1) { - corner.insertBefore(container, corner.firstChild); - } else { - corner.appendChild(container); - } - - return this; - }, - - // @method remove: this - // Removes the control from the map it is currently active on. - remove: function () { - if (!this._map) { - return this; - } - - remove(this._container); - - if (this.onRemove) { - this.onRemove(this._map); - } - - this._map = null; - - return this; - }, - - _refocusOnMap: function (e) { - // if map exists and event is not a keyboard event - if (this._map && e && e.screenX > 0 && e.screenY > 0) { - this._map.getContainer().focus(); - } - } -}); - -var control = function (options) { - return new Control(options); -}; - -/* @section Extension methods - * @uninheritable - * - * Every control should extend from `L.Control` and (re-)implement the following methods. - * - * @method onAdd(map: Map): HTMLElement - * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo). - * - * @method onRemove(map: Map) - * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove). - */ - -/* @namespace Map - * @section Methods for Layers and Controls - */ -Map.include({ - // @method addControl(control: Control): this - // Adds the given control to the map - addControl: function (control) { - control.addTo(this); - return this; - }, - - // @method removeControl(control: Control): this - // Removes the given control from the map - removeControl: function (control) { - control.remove(); - return this; - }, - - _initControlPos: function () { - var corners = this._controlCorners = {}, - l = 'leaflet-', - container = this._controlContainer = - create$1('div', l + 'control-container', this._container); - - function createCorner(vSide, hSide) { - var className = l + vSide + ' ' + l + hSide; - - corners[vSide + hSide] = create$1('div', className, container); - } - - createCorner('top', 'left'); - createCorner('top', 'right'); - createCorner('bottom', 'left'); - createCorner('bottom', 'right'); - }, - - _clearControlPos: function () { - for (var i in this._controlCorners) { - remove(this._controlCorners[i]); - } - remove(this._controlContainer); - delete this._controlCorners; - delete this._controlContainer; - } -}); - -/* - * @class Control.Layers - * @aka L.Control.Layers - * @inherits Control - * - * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](http://leafletjs.com/examples/layers-control/)). Extends `Control`. - * - * @example - * - * ```js - * var baseLayers = { - * "Mapbox": mapbox, - * "OpenStreetMap": osm - * }; - * - * var overlays = { - * "Marker": marker, - * "Roads": roadsLayer - * }; - * - * L.control.layers(baseLayers, overlays).addTo(map); - * ``` - * - * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values: - * - * ```js - * { - * "": layer1, - * "": layer2 - * } - * ``` - * - * The layer names can contain HTML, which allows you to add additional styling to the items: - * - * ```js - * {" My Layer": myLayer} - * ``` - */ - -var Layers = Control.extend({ - // @section - // @aka Control.Layers options - options: { - // @option collapsed: Boolean = true - // If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch. - collapsed: true, - position: 'topright', - - // @option autoZIndex: Boolean = true - // If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off. - autoZIndex: true, - - // @option hideSingleBase: Boolean = false - // If `true`, the base layers in the control will be hidden when there is only one. - hideSingleBase: false, - - // @option sortLayers: Boolean = false - // Whether to sort the layers. When `false`, layers will keep the order - // in which they were added to the control. - sortLayers: false, - - // @option sortFunction: Function = * - // A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) - // that will be used for sorting the layers, when `sortLayers` is `true`. - // The function receives both the `L.Layer` instances and their names, as in - // `sortFunction(layerA, layerB, nameA, nameB)`. - // By default, it sorts layers alphabetically by their name. - sortFunction: function (layerA, layerB, nameA, nameB) { - return nameA < nameB ? -1 : (nameB < nameA ? 1 : 0); - } - }, - - initialize: function (baseLayers, overlays, options) { - setOptions(this, options); - - this._layerControlInputs = []; - this._layers = []; - this._lastZIndex = 0; - this._handlingClick = false; - - for (var i in baseLayers) { - this._addLayer(baseLayers[i], i); - } - - for (i in overlays) { - this._addLayer(overlays[i], i, true); - } - }, - - onAdd: function (map) { - this._initLayout(); - this._update(); - - this._map = map; - map.on('zoomend', this._checkDisabledLayers, this); - - for (var i = 0; i < this._layers.length; i++) { - this._layers[i].layer.on('add remove', this._onLayerChange, this); - } - - return this._container; - }, - - addTo: function (map) { - Control.prototype.addTo.call(this, map); - // Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height. - return this._expandIfNotCollapsed(); - }, - - onRemove: function () { - this._map.off('zoomend', this._checkDisabledLayers, this); - - for (var i = 0; i < this._layers.length; i++) { - this._layers[i].layer.off('add remove', this._onLayerChange, this); - } - }, - - // @method addBaseLayer(layer: Layer, name: String): this - // Adds a base layer (radio button entry) with the given name to the control. - addBaseLayer: function (layer, name) { - this._addLayer(layer, name); - return (this._map) ? this._update() : this; - }, - - // @method addOverlay(layer: Layer, name: String): this - // Adds an overlay (checkbox entry) with the given name to the control. - addOverlay: function (layer, name) { - this._addLayer(layer, name, true); - return (this._map) ? this._update() : this; - }, - - // @method removeLayer(layer: Layer): this - // Remove the given layer from the control. - removeLayer: function (layer) { - layer.off('add remove', this._onLayerChange, this); - - var obj = this._getLayer(stamp(layer)); - if (obj) { - this._layers.splice(this._layers.indexOf(obj), 1); - } - return (this._map) ? this._update() : this; - }, - - // @method expand(): this - // Expand the control container if collapsed. - expand: function () { - addClass(this._container, 'leaflet-control-layers-expanded'); - this._section.style.height = null; - var acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50); - if (acceptableHeight < this._section.clientHeight) { - addClass(this._section, 'leaflet-control-layers-scrollbar'); - this._section.style.height = acceptableHeight + 'px'; - } else { - removeClass(this._section, 'leaflet-control-layers-scrollbar'); - } - this._checkDisabledLayers(); - return this; - }, - - // @method collapse(): this - // Collapse the control container if expanded. - collapse: function () { - removeClass(this._container, 'leaflet-control-layers-expanded'); - return this; - }, - - _initLayout: function () { - var className = 'leaflet-control-layers', - container = this._container = create$1('div', className), - collapsed = this.options.collapsed; - - // makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released - container.setAttribute('aria-haspopup', true); - - disableClickPropagation(container); - disableScrollPropagation(container); - - var section = this._section = create$1('section', className + '-list'); - - if (collapsed) { - this._map.on('click', this.collapse, this); - - if (!android) { - on(container, { - mouseenter: this.expand, - mouseleave: this.collapse - }, this); - } - } - - var link = this._layersLink = create$1('a', className + '-toggle', container); - link.href = '#'; - link.title = 'Layers'; - - if (touch) { - on(link, 'click', stop); - on(link, 'click', this.expand, this); - } else { - on(link, 'focus', this.expand, this); - } - - if (!collapsed) { - this.expand(); - } - - this._baseLayersList = create$1('div', className + '-base', section); - this._separator = create$1('div', className + '-separator', section); - this._overlaysList = create$1('div', className + '-overlays', section); - - container.appendChild(section); - }, - - _getLayer: function (id) { - for (var i = 0; i < this._layers.length; i++) { - - if (this._layers[i] && stamp(this._layers[i].layer) === id) { - return this._layers[i]; - } - } - }, - - _addLayer: function (layer, name, overlay) { - if (this._map) { - layer.on('add remove', this._onLayerChange, this); - } - - this._layers.push({ - layer: layer, - name: name, - overlay: overlay - }); - - if (this.options.sortLayers) { - this._layers.sort(bind(function (a, b) { - return this.options.sortFunction(a.layer, b.layer, a.name, b.name); - }, this)); - } - - if (this.options.autoZIndex && layer.setZIndex) { - this._lastZIndex++; - layer.setZIndex(this._lastZIndex); - } - - this._expandIfNotCollapsed(); - }, - - _update: function () { - if (!this._container) { return this; } - - empty(this._baseLayersList); - empty(this._overlaysList); - - this._layerControlInputs = []; - var baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0; - - for (i = 0; i < this._layers.length; i++) { - obj = this._layers[i]; - this._addItem(obj); - overlaysPresent = overlaysPresent || obj.overlay; - baseLayersPresent = baseLayersPresent || !obj.overlay; - baseLayersCount += !obj.overlay ? 1 : 0; - } - - // Hide base layers section if there's only one layer. - if (this.options.hideSingleBase) { - baseLayersPresent = baseLayersPresent && baseLayersCount > 1; - this._baseLayersList.style.display = baseLayersPresent ? '' : 'none'; - } - - this._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none'; - - return this; - }, - - _onLayerChange: function (e) { - if (!this._handlingClick) { - this._update(); - } - - var obj = this._getLayer(stamp(e.target)); - - // @namespace Map - // @section Layer events - // @event baselayerchange: LayersControlEvent - // Fired when the base layer is changed through the [layer control](#control-layers). - // @event overlayadd: LayersControlEvent - // Fired when an overlay is selected through the [layer control](#control-layers). - // @event overlayremove: LayersControlEvent - // Fired when an overlay is deselected through the [layer control](#control-layers). - // @namespace Control.Layers - var type = obj.overlay ? - (e.type === 'add' ? 'overlayadd' : 'overlayremove') : - (e.type === 'add' ? 'baselayerchange' : null); - - if (type) { - this._map.fire(type, obj); - } - }, - - // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe) - _createRadioElement: function (name, checked) { - - var radioHtml = ''; - - var radioFragment = document.createElement('div'); - radioFragment.innerHTML = radioHtml; - - return radioFragment.firstChild; - }, - - _addItem: function (obj) { - var label = document.createElement('label'), - checked = this._map.hasLayer(obj.layer), - input; - - if (obj.overlay) { - input = document.createElement('input'); - input.type = 'checkbox'; - input.className = 'leaflet-control-layers-selector'; - input.defaultChecked = checked; - } else { - input = this._createRadioElement('leaflet-base-layers', checked); - } - - this._layerControlInputs.push(input); - input.layerId = stamp(obj.layer); - - on(input, 'click', this._onInputClick, this); - - var name = document.createElement('span'); - name.innerHTML = ' ' + obj.name; - - // Helps from preventing layer control flicker when checkboxes are disabled - // https://github.com/Leaflet/Leaflet/issues/2771 - var holder = document.createElement('div'); - - label.appendChild(holder); - holder.appendChild(input); - holder.appendChild(name); - - var container = obj.overlay ? this._overlaysList : this._baseLayersList; - container.appendChild(label); - - this._checkDisabledLayers(); - return label; - }, - - _onInputClick: function () { - var inputs = this._layerControlInputs, - input, layer; - var addedLayers = [], - removedLayers = []; - - this._handlingClick = true; - - for (var i = inputs.length - 1; i >= 0; i--) { - input = inputs[i]; - layer = this._getLayer(input.layerId).layer; - - if (input.checked) { - addedLayers.push(layer); - } else if (!input.checked) { - removedLayers.push(layer); - } - } - - // Bugfix issue 2318: Should remove all old layers before readding new ones - for (i = 0; i < removedLayers.length; i++) { - if (this._map.hasLayer(removedLayers[i])) { - this._map.removeLayer(removedLayers[i]); - } - } - for (i = 0; i < addedLayers.length; i++) { - if (!this._map.hasLayer(addedLayers[i])) { - this._map.addLayer(addedLayers[i]); - } - } - - this._handlingClick = false; - - this._refocusOnMap(); - }, - - _checkDisabledLayers: function () { - var inputs = this._layerControlInputs, - input, - layer, - zoom = this._map.getZoom(); - - for (var i = inputs.length - 1; i >= 0; i--) { - input = inputs[i]; - layer = this._getLayer(input.layerId).layer; - input.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) || - (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom); - - } - }, - - _expandIfNotCollapsed: function () { - if (this._map && !this.options.collapsed) { - this.expand(); - } - return this; - }, - - _expand: function () { - // Backward compatibility, remove me in 1.1. - return this.expand(); - }, - - _collapse: function () { - // Backward compatibility, remove me in 1.1. - return this.collapse(); - } - -}); - - -// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options) -// Creates an attribution control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation. -var layers = function (baseLayers, overlays, options) { - return new Layers(baseLayers, overlays, options); -}; - -/* - * @class Control.Zoom - * @aka L.Control.Zoom - * @inherits Control - * - * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`. - */ - -var Zoom = Control.extend({ - // @section - // @aka Control.Zoom options - options: { - position: 'topleft', - - // @option zoomInText: String = '+' - // The text set on the 'zoom in' button. - zoomInText: '+', - - // @option zoomInTitle: String = 'Zoom in' - // The title set on the 'zoom in' button. - zoomInTitle: 'Zoom in', - - // @option zoomOutText: String = '−' - // The text set on the 'zoom out' button. - zoomOutText: '−', - - // @option zoomOutTitle: String = 'Zoom out' - // The title set on the 'zoom out' button. - zoomOutTitle: 'Zoom out' - }, - - onAdd: function (map) { - var zoomName = 'leaflet-control-zoom', - container = create$1('div', zoomName + ' leaflet-bar'), - options = this.options; - - this._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle, - zoomName + '-in', container, this._zoomIn); - this._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle, - zoomName + '-out', container, this._zoomOut); - - this._updateDisabled(); - map.on('zoomend zoomlevelschange', this._updateDisabled, this); - - return container; - }, - - onRemove: function (map) { - map.off('zoomend zoomlevelschange', this._updateDisabled, this); - }, - - disable: function () { - this._disabled = true; - this._updateDisabled(); - return this; - }, - - enable: function () { - this._disabled = false; - this._updateDisabled(); - return this; - }, - - _zoomIn: function (e) { - if (!this._disabled && this._map._zoom < this._map.getMaxZoom()) { - this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); - } - }, - - _zoomOut: function (e) { - if (!this._disabled && this._map._zoom > this._map.getMinZoom()) { - this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); - } - }, - - _createButton: function (html, title, className, container, fn) { - var link = create$1('a', className, container); - link.innerHTML = html; - link.href = '#'; - link.title = title; - - /* - * Will force screen readers like VoiceOver to read this as "Zoom in - button" - */ - link.setAttribute('role', 'button'); - link.setAttribute('aria-label', title); - - disableClickPropagation(link); - on(link, 'click', stop); - on(link, 'click', fn, this); - on(link, 'click', this._refocusOnMap, this); - - return link; - }, - - _updateDisabled: function () { - var map = this._map, - className = 'leaflet-disabled'; - - removeClass(this._zoomInButton, className); - removeClass(this._zoomOutButton, className); - - if (this._disabled || map._zoom === map.getMinZoom()) { - addClass(this._zoomOutButton, className); - } - if (this._disabled || map._zoom === map.getMaxZoom()) { - addClass(this._zoomInButton, className); - } - } -}); - -// @namespace Map -// @section Control options -// @option zoomControl: Boolean = true -// Whether a [zoom control](#control-zoom) is added to the map by default. -Map.mergeOptions({ - zoomControl: true -}); - -Map.addInitHook(function () { - if (this.options.zoomControl) { - // @section Controls - // @property zoomControl: Control.Zoom - // The default zoom control (only available if the - // [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map). - this.zoomControl = new Zoom(); - this.addControl(this.zoomControl); - } -}); - -// @namespace Control.Zoom -// @factory L.control.zoom(options: Control.Zoom options) -// Creates a zoom control -var zoom = function (options) { - return new Zoom(options); -}; - -/* - * @class Control.Scale - * @aka L.Control.Scale - * @inherits Control - * - * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`. - * - * @example - * - * ```js - * L.control.scale().addTo(map); - * ``` - */ - -var Scale = Control.extend({ - // @section - // @aka Control.Scale options - options: { - position: 'bottomleft', - - // @option maxWidth: Number = 100 - // Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500). - maxWidth: 100, - - // @option metric: Boolean = True - // Whether to show the metric scale line (m/km). - metric: true, - - // @option imperial: Boolean = True - // Whether to show the imperial scale line (mi/ft). - imperial: true - - // @option updateWhenIdle: Boolean = false - // If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)). - }, - - onAdd: function (map) { - var className = 'leaflet-control-scale', - container = create$1('div', className), - options = this.options; - - this._addScales(options, className + '-line', container); - - map.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this); - map.whenReady(this._update, this); - - return container; - }, - - onRemove: function (map) { - map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this); - }, - - _addScales: function (options, className, container) { - if (options.metric) { - this._mScale = create$1('div', className, container); - } - if (options.imperial) { - this._iScale = create$1('div', className, container); - } - }, - - _update: function () { - var map = this._map, - y = map.getSize().y / 2; - - var maxMeters = map.distance( - map.containerPointToLatLng([0, y]), - map.containerPointToLatLng([this.options.maxWidth, y])); - - this._updateScales(maxMeters); - }, - - _updateScales: function (maxMeters) { - if (this.options.metric && maxMeters) { - this._updateMetric(maxMeters); - } - if (this.options.imperial && maxMeters) { - this._updateImperial(maxMeters); - } - }, - - _updateMetric: function (maxMeters) { - var meters = this._getRoundNum(maxMeters), - label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km'; - - this._updateScale(this._mScale, label, meters / maxMeters); - }, - - _updateImperial: function (maxMeters) { - var maxFeet = maxMeters * 3.2808399, - maxMiles, miles, feet; - - if (maxFeet > 5280) { - maxMiles = maxFeet / 5280; - miles = this._getRoundNum(maxMiles); - this._updateScale(this._iScale, miles + ' mi', miles / maxMiles); - - } else { - feet = this._getRoundNum(maxFeet); - this._updateScale(this._iScale, feet + ' ft', feet / maxFeet); - } - }, - - _updateScale: function (scale, text, ratio) { - scale.style.width = Math.round(this.options.maxWidth * ratio) + 'px'; - scale.innerHTML = text; - }, - - _getRoundNum: function (num) { - var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1), - d = num / pow10; - - d = d >= 10 ? 10 : - d >= 5 ? 5 : - d >= 3 ? 3 : - d >= 2 ? 2 : 1; - - return pow10 * d; - } -}); - - -// @factory L.control.scale(options?: Control.Scale options) -// Creates an scale control with the given options. -var scale = function (options) { - return new Scale(options); -}; - -/* - * @class Control.Attribution - * @aka L.Control.Attribution - * @inherits Control - * - * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control. - */ - -var Attribution = Control.extend({ - // @section - // @aka Control.Attribution options - options: { - position: 'bottomright', - - // @option prefix: String = 'Leaflet' - // The HTML text shown before the attributions. Pass `false` to disable. - prefix: 'Leaflet' - }, - - initialize: function (options) { - setOptions(this, options); - - this._attributions = {}; - }, - - onAdd: function (map) { - map.attributionControl = this; - this._container = create$1('div', 'leaflet-control-attribution'); - disableClickPropagation(this._container); - - // TODO ugly, refactor - for (var i in map._layers) { - if (map._layers[i].getAttribution) { - this.addAttribution(map._layers[i].getAttribution()); - } - } - - this._update(); - - return this._container; - }, - - // @method setPrefix(prefix: String): this - // Sets the text before the attributions. - setPrefix: function (prefix) { - this.options.prefix = prefix; - this._update(); - return this; - }, - - // @method addAttribution(text: String): this - // Adds an attribution text (e.g. `'Vector data © Mapbox'`). - addAttribution: function (text) { - if (!text) { return this; } - - if (!this._attributions[text]) { - this._attributions[text] = 0; - } - this._attributions[text]++; - - this._update(); - - return this; - }, - - // @method removeAttribution(text: String): this - // Removes an attribution text. - removeAttribution: function (text) { - if (!text) { return this; } - - if (this._attributions[text]) { - this._attributions[text]--; - this._update(); - } - - return this; - }, - - _update: function () { - if (!this._map) { return; } - - var attribs = []; - - for (var i in this._attributions) { - if (this._attributions[i]) { - attribs.push(i); - } - } - - var prefixAndAttribs = []; - - if (this.options.prefix) { - prefixAndAttribs.push(this.options.prefix); - } - if (attribs.length) { - prefixAndAttribs.push(attribs.join(', ')); - } - - this._container.innerHTML = prefixAndAttribs.join(' | '); - } -}); - -// @namespace Map -// @section Control options -// @option attributionControl: Boolean = true -// Whether a [attribution control](#control-attribution) is added to the map by default. -Map.mergeOptions({ - attributionControl: true -}); - -Map.addInitHook(function () { - if (this.options.attributionControl) { - new Attribution().addTo(this); - } -}); - -// @namespace Control.Attribution -// @factory L.control.attribution(options: Control.Attribution options) -// Creates an attribution control. -var attribution = function (options) { - return new Attribution(options); -}; - -Control.Layers = Layers; -Control.Zoom = Zoom; -Control.Scale = Scale; -Control.Attribution = Attribution; - -control.layers = layers; -control.zoom = zoom; -control.scale = scale; -control.attribution = attribution; - -/* - L.Handler is a base class for handler classes that are used internally to inject - interaction features like dragging to classes like Map and Marker. -*/ - -// @class Handler -// @aka L.Handler -// Abstract class for map interaction handlers - -var Handler = Class.extend({ - initialize: function (map) { - this._map = map; - }, - - // @method enable(): this - // Enables the handler - enable: function () { - if (this._enabled) { return this; } - - this._enabled = true; - this.addHooks(); - return this; - }, - - // @method disable(): this - // Disables the handler - disable: function () { - if (!this._enabled) { return this; } - - this._enabled = false; - this.removeHooks(); - return this; - }, - - // @method enabled(): Boolean - // Returns `true` if the handler is enabled - enabled: function () { - return !!this._enabled; - } - - // @section Extension methods - // Classes inheriting from `Handler` must implement the two following methods: - // @method addHooks() - // Called when the handler is enabled, should add event hooks. - // @method removeHooks() - // Called when the handler is disabled, should remove the event hooks added previously. -}); - -// @section There is static function which can be called without instantiating L.Handler: -// @function addTo(map: Map, name: String): this -// Adds a new Handler to the given map with the given name. -Handler.addTo = function (map, name) { - map.addHandler(name, this); - return this; -}; - -var Mixin = {Events: Events}; - -/* - * @class Draggable - * @aka L.Draggable - * @inherits Evented - * - * A class for making DOM elements draggable (including touch support). - * Used internally for map and marker dragging. Only works for elements - * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition). - * - * @example - * ```js - * var draggable = new L.Draggable(elementToDrag); - * draggable.enable(); - * ``` - */ - -var START = touch ? 'touchstart mousedown' : 'mousedown'; -var END = { - mousedown: 'mouseup', - touchstart: 'touchend', - pointerdown: 'touchend', - MSPointerDown: 'touchend' -}; -var MOVE = { - mousedown: 'mousemove', - touchstart: 'touchmove', - pointerdown: 'touchmove', - MSPointerDown: 'touchmove' -}; - - -var Draggable = Evented.extend({ - - options: { - // @section - // @aka Draggable options - // @option clickTolerance: Number = 3 - // The max number of pixels a user can shift the mouse pointer during a click - // for it to be considered a valid click (as opposed to a mouse drag). - clickTolerance: 3 - }, - - // @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options) - // Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default). - initialize: function (element, dragStartTarget, preventOutline$$1, options) { - setOptions(this, options); - - this._element = element; - this._dragStartTarget = dragStartTarget || element; - this._preventOutline = preventOutline$$1; - }, - - // @method enable() - // Enables the dragging ability - enable: function () { - if (this._enabled) { return; } - - on(this._dragStartTarget, START, this._onDown, this); - - this._enabled = true; - }, - - // @method disable() - // Disables the dragging ability - disable: function () { - if (!this._enabled) { return; } - - // If we're currently dragging this draggable, - // disabling it counts as first ending the drag. - if (Draggable._dragging === this) { - this.finishDrag(); - } - - off(this._dragStartTarget, START, this._onDown, this); - - this._enabled = false; - this._moved = false; - }, - - _onDown: function (e) { - // Ignore simulated events, since we handle both touch and - // mouse explicitly; otherwise we risk getting duplicates of - // touch events, see #4315. - // Also ignore the event if disabled; this happens in IE11 - // under some circumstances, see #3666. - if (e._simulated || !this._enabled) { return; } - - this._moved = false; - - if (hasClass(this._element, 'leaflet-zoom-anim')) { return; } - - if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; } - Draggable._dragging = this; // Prevent dragging multiple objects at once. - - if (this._preventOutline) { - preventOutline(this._element); - } - - disableImageDrag(); - disableTextSelection(); - - if (this._moving) { return; } - - // @event down: Event - // Fired when a drag is about to start. - this.fire('down'); - - var first = e.touches ? e.touches[0] : e, - sizedParent = getSizedParentNode(this._element); - - this._startPoint = new Point(first.clientX, first.clientY); - - // Cache the scale, so that we can continuously compensate for it during drag (_onMove). - this._parentScale = getScale(sizedParent); - - on(document, MOVE[e.type], this._onMove, this); - on(document, END[e.type], this._onUp, this); - }, - - _onMove: function (e) { - // Ignore simulated events, since we handle both touch and - // mouse explicitly; otherwise we risk getting duplicates of - // touch events, see #4315. - // Also ignore the event if disabled; this happens in IE11 - // under some circumstances, see #3666. - if (e._simulated || !this._enabled) { return; } - - if (e.touches && e.touches.length > 1) { - this._moved = true; - return; - } - - var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e), - offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint); - - if (!offset.x && !offset.y) { return; } - if (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; } - - // We assume that the parent container's position, border and scale do not change for the duration of the drag. - // Therefore there is no need to account for the position and border (they are eliminated by the subtraction) - // and we can use the cached value for the scale. - offset.x /= this._parentScale.x; - offset.y /= this._parentScale.y; - - preventDefault(e); - - if (!this._moved) { - // @event dragstart: Event - // Fired when a drag starts - this.fire('dragstart'); - - this._moved = true; - this._startPos = getPosition(this._element).subtract(offset); - - addClass(document.body, 'leaflet-dragging'); - - this._lastTarget = e.target || e.srcElement; - // IE and Edge do not give the element, so fetch it - // if necessary - if ((window.SVGElementInstance) && (this._lastTarget instanceof SVGElementInstance)) { - this._lastTarget = this._lastTarget.correspondingUseElement; - } - addClass(this._lastTarget, 'leaflet-drag-target'); - } - - this._newPos = this._startPos.add(offset); - this._moving = true; - - cancelAnimFrame(this._animRequest); - this._lastEvent = e; - this._animRequest = requestAnimFrame(this._updatePosition, this, true); - }, - - _updatePosition: function () { - var e = {originalEvent: this._lastEvent}; - - // @event predrag: Event - // Fired continuously during dragging *before* each corresponding - // update of the element's position. - this.fire('predrag', e); - setPosition(this._element, this._newPos); - - // @event drag: Event - // Fired continuously during dragging. - this.fire('drag', e); - }, - - _onUp: function (e) { - // Ignore simulated events, since we handle both touch and - // mouse explicitly; otherwise we risk getting duplicates of - // touch events, see #4315. - // Also ignore the event if disabled; this happens in IE11 - // under some circumstances, see #3666. - if (e._simulated || !this._enabled) { return; } - this.finishDrag(); - }, - - finishDrag: function () { - removeClass(document.body, 'leaflet-dragging'); - - if (this._lastTarget) { - removeClass(this._lastTarget, 'leaflet-drag-target'); - this._lastTarget = null; - } - - for (var i in MOVE) { - off(document, MOVE[i], this._onMove, this); - off(document, END[i], this._onUp, this); - } - - enableImageDrag(); - enableTextSelection(); - - if (this._moved && this._moving) { - // ensure drag is not fired after dragend - cancelAnimFrame(this._animRequest); - - // @event dragend: DragEndEvent - // Fired when the drag ends. - this.fire('dragend', { - distance: this._newPos.distanceTo(this._startPos) - }); - } - - this._moving = false; - Draggable._dragging = false; - } - -}); - -/* - * @namespace LineUtil - * - * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast. - */ - -// Simplify polyline with vertex reduction and Douglas-Peucker simplification. -// Improves rendering performance dramatically by lessening the number of points to draw. - -// @function simplify(points: Point[], tolerance: Number): Point[] -// Dramatically reduces the number of points in a polyline while retaining -// its shape and returns a new array of simplified points, using the -// [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm). -// Used for a huge performance boost when processing/displaying Leaflet polylines for -// each zoom level and also reducing visual noise. tolerance affects the amount of -// simplification (lesser value means higher quality but slower and with more points). -// Also released as a separated micro-library [Simplify.js](http://mourner.github.com/simplify-js/). -function simplify(points, tolerance) { - if (!tolerance || !points.length) { - return points.slice(); - } - - var sqTolerance = tolerance * tolerance; - - // stage 1: vertex reduction - points = _reducePoints(points, sqTolerance); - - // stage 2: Douglas-Peucker simplification - points = _simplifyDP(points, sqTolerance); - - return points; -} - -// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number -// Returns the distance between point `p` and segment `p1` to `p2`. -function pointToSegmentDistance(p, p1, p2) { - return Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true)); -} - -// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number -// Returns the closest point from a point `p` on a segment `p1` to `p2`. -function closestPointOnSegment(p, p1, p2) { - return _sqClosestPointOnSegment(p, p1, p2); -} - -// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm -function _simplifyDP(points, sqTolerance) { - - var len = points.length, - ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array, - markers = new ArrayConstructor(len); - - markers[0] = markers[len - 1] = 1; - - _simplifyDPStep(points, markers, sqTolerance, 0, len - 1); - - var i, - newPoints = []; - - for (i = 0; i < len; i++) { - if (markers[i]) { - newPoints.push(points[i]); - } - } - - return newPoints; -} - -function _simplifyDPStep(points, markers, sqTolerance, first, last) { - - var maxSqDist = 0, - index, i, sqDist; - - for (i = first + 1; i <= last - 1; i++) { - sqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true); - - if (sqDist > maxSqDist) { - index = i; - maxSqDist = sqDist; - } - } - - if (maxSqDist > sqTolerance) { - markers[index] = 1; - - _simplifyDPStep(points, markers, sqTolerance, first, index); - _simplifyDPStep(points, markers, sqTolerance, index, last); - } -} - -// reduce points that are too close to each other to a single point -function _reducePoints(points, sqTolerance) { - var reducedPoints = [points[0]]; - - for (var i = 1, prev = 0, len = points.length; i < len; i++) { - if (_sqDist(points[i], points[prev]) > sqTolerance) { - reducedPoints.push(points[i]); - prev = i; - } - } - if (prev < len - 1) { - reducedPoints.push(points[len - 1]); - } - return reducedPoints; -} - -var _lastCode; - -// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean -// Clips the segment a to b by rectangular bounds with the -// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm) -// (modifying the segment points directly!). Used by Leaflet to only show polyline -// points that are on the screen or near, increasing performance. -function clipSegment(a, b, bounds, useLastCode, round) { - var codeA = useLastCode ? _lastCode : _getBitCode(a, bounds), - codeB = _getBitCode(b, bounds), - - codeOut, p, newCode; - - // save 2nd code to avoid calculating it on the next segment - _lastCode = codeB; - - while (true) { - // if a,b is inside the clip window (trivial accept) - if (!(codeA | codeB)) { - return [a, b]; - } - - // if a,b is outside the clip window (trivial reject) - if (codeA & codeB) { - return false; - } - - // other cases - codeOut = codeA || codeB; - p = _getEdgeIntersection(a, b, codeOut, bounds, round); - newCode = _getBitCode(p, bounds); - - if (codeOut === codeA) { - a = p; - codeA = newCode; - } else { - b = p; - codeB = newCode; - } - } -} - -function _getEdgeIntersection(a, b, code, bounds, round) { - var dx = b.x - a.x, - dy = b.y - a.y, - min = bounds.min, - max = bounds.max, - x, y; - - if (code & 8) { // top - x = a.x + dx * (max.y - a.y) / dy; - y = max.y; - - } else if (code & 4) { // bottom - x = a.x + dx * (min.y - a.y) / dy; - y = min.y; - - } else if (code & 2) { // right - x = max.x; - y = a.y + dy * (max.x - a.x) / dx; - - } else if (code & 1) { // left - x = min.x; - y = a.y + dy * (min.x - a.x) / dx; - } - - return new Point(x, y, round); -} - -function _getBitCode(p, bounds) { - var code = 0; - - if (p.x < bounds.min.x) { // left - code |= 1; - } else if (p.x > bounds.max.x) { // right - code |= 2; - } - - if (p.y < bounds.min.y) { // bottom - code |= 4; - } else if (p.y > bounds.max.y) { // top - code |= 8; - } - - return code; -} - -// square distance (to avoid unnecessary Math.sqrt calls) -function _sqDist(p1, p2) { - var dx = p2.x - p1.x, - dy = p2.y - p1.y; - return dx * dx + dy * dy; -} - -// return closest point on segment or distance to that point -function _sqClosestPointOnSegment(p, p1, p2, sqDist) { - var x = p1.x, - y = p1.y, - dx = p2.x - x, - dy = p2.y - y, - dot = dx * dx + dy * dy, - t; - - if (dot > 0) { - t = ((p.x - x) * dx + (p.y - y) * dy) / dot; - - if (t > 1) { - x = p2.x; - y = p2.y; - } else if (t > 0) { - x += dx * t; - y += dy * t; - } - } - - dx = p.x - x; - dy = p.y - y; - - return sqDist ? dx * dx + dy * dy : new Point(x, y); -} - - -// @function isFlat(latlngs: LatLng[]): Boolean -// Returns true if `latlngs` is a flat array, false is nested. -function isFlat(latlngs) { - return !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined'); -} - -function _flat(latlngs) { - console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.'); - return isFlat(latlngs); -} - - -var LineUtil = (Object.freeze || Object)({ - simplify: simplify, - pointToSegmentDistance: pointToSegmentDistance, - closestPointOnSegment: closestPointOnSegment, - clipSegment: clipSegment, - _getEdgeIntersection: _getEdgeIntersection, - _getBitCode: _getBitCode, - _sqClosestPointOnSegment: _sqClosestPointOnSegment, - isFlat: isFlat, - _flat: _flat -}); - -/* - * @namespace PolyUtil - * Various utility functions for polygon geometries. - */ - -/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] - * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)). - * Used by Leaflet to only show polygon points that are on the screen or near, increasing - * performance. Note that polygon points needs different algorithm for clipping - * than polyline, so there's a separate method for it. - */ -function clipPolygon(points, bounds, round) { - var clippedPoints, - edges = [1, 4, 2, 8], - i, j, k, - a, b, - len, edge, p; - - for (i = 0, len = points.length; i < len; i++) { - points[i]._code = _getBitCode(points[i], bounds); - } - - // for each edge (left, bottom, right, top) - for (k = 0; k < 4; k++) { - edge = edges[k]; - clippedPoints = []; - - for (i = 0, len = points.length, j = len - 1; i < len; j = i++) { - a = points[i]; - b = points[j]; - - // if a is inside the clip window - if (!(a._code & edge)) { - // if b is outside the clip window (a->b goes out of screen) - if (b._code & edge) { - p = _getEdgeIntersection(b, a, edge, bounds, round); - p._code = _getBitCode(p, bounds); - clippedPoints.push(p); - } - clippedPoints.push(a); - - // else if b is inside the clip window (a->b enters the screen) - } else if (!(b._code & edge)) { - p = _getEdgeIntersection(b, a, edge, bounds, round); - p._code = _getBitCode(p, bounds); - clippedPoints.push(p); - } - } - points = clippedPoints; - } - - return points; -} - - -var PolyUtil = (Object.freeze || Object)({ - clipPolygon: clipPolygon -}); - -/* - * @namespace Projection - * @section - * Leaflet comes with a set of already defined Projections out of the box: - * - * @projection L.Projection.LonLat - * - * Equirectangular, or Plate Carree projection — the most simple projection, - * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as - * latitude. Also suitable for flat worlds, e.g. game maps. Used by the - * `EPSG:4326` and `Simple` CRS. - */ - -var LonLat = { - project: function (latlng) { - return new Point(latlng.lng, latlng.lat); - }, - - unproject: function (point) { - return new LatLng(point.y, point.x); - }, - - bounds: new Bounds([-180, -90], [180, 90]) -}; - -/* - * @namespace Projection - * @projection L.Projection.Mercator - * - * Elliptical Mercator projection — more complex than Spherical Mercator. Takes into account that Earth is a geoid, not a perfect sphere. Used by the EPSG:3395 CRS. - */ - -var Mercator = { - R: 6378137, - R_MINOR: 6356752.314245179, - - bounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]), - - project: function (latlng) { - var d = Math.PI / 180, - r = this.R, - y = latlng.lat * d, - tmp = this.R_MINOR / r, - e = Math.sqrt(1 - tmp * tmp), - con = e * Math.sin(y); - - var ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2); - y = -r * Math.log(Math.max(ts, 1E-10)); - - return new Point(latlng.lng * d * r, y); - }, - - unproject: function (point) { - var d = 180 / Math.PI, - r = this.R, - tmp = this.R_MINOR / r, - e = Math.sqrt(1 - tmp * tmp), - ts = Math.exp(-point.y / r), - phi = Math.PI / 2 - 2 * Math.atan(ts); - - for (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) { - con = e * Math.sin(phi); - con = Math.pow((1 - con) / (1 + con), e / 2); - dphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi; - phi += dphi; - } - - return new LatLng(phi * d, point.x * d / r); - } -}; - -/* - * @class Projection - - * An object with methods for projecting geographical coordinates of the world onto - * a flat surface (and back). See [Map projection](http://en.wikipedia.org/wiki/Map_projection). - - * @property bounds: Bounds - * The bounds (specified in CRS units) where the projection is valid - - * @method project(latlng: LatLng): Point - * Projects geographical coordinates into a 2D point. - * Only accepts actual `L.LatLng` instances, not arrays. - - * @method unproject(point: Point): LatLng - * The inverse of `project`. Projects a 2D point into a geographical location. - * Only accepts actual `L.Point` instances, not arrays. - - * Note that the projection instances do not inherit from Leafet's `Class` object, - * and can't be instantiated. Also, new classes can't inherit from them, - * and methods can't be added to them with the `include` function. - - */ - - - - -var index = (Object.freeze || Object)({ - LonLat: LonLat, - Mercator: Mercator, - SphericalMercator: SphericalMercator -}); - -/* - * @namespace CRS - * @crs L.CRS.EPSG3395 - * - * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection. - */ -var EPSG3395 = extend({}, Earth, { - code: 'EPSG:3395', - projection: Mercator, - - transformation: (function () { - var scale = 0.5 / (Math.PI * Mercator.R); - return toTransformation(scale, 0.5, -scale, 0.5); - }()) -}); - -/* - * @namespace CRS - * @crs L.CRS.EPSG4326 - * - * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. - * - * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic), - * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer` - * with this CRS, ensure that there are two 256x256 pixel tiles covering the - * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90), - * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set. - */ - -var EPSG4326 = extend({}, Earth, { - code: 'EPSG:4326', - projection: LonLat, - transformation: toTransformation(1 / 180, 1, -1 / 180, 0.5) -}); - -/* - * @namespace CRS - * @crs L.CRS.Simple - * - * A simple CRS that maps longitude and latitude into `x` and `y` directly. - * May be used for maps of flat surfaces (e.g. game maps). Note that the `y` - * axis should still be inverted (going from bottom to top). `distance()` returns - * simple euclidean distance. - */ - -var Simple = extend({}, CRS, { - projection: LonLat, - transformation: toTransformation(1, 0, -1, 0), - - scale: function (zoom) { - return Math.pow(2, zoom); - }, - - zoom: function (scale) { - return Math.log(scale) / Math.LN2; - }, - - distance: function (latlng1, latlng2) { - var dx = latlng2.lng - latlng1.lng, - dy = latlng2.lat - latlng1.lat; - - return Math.sqrt(dx * dx + dy * dy); - }, - - infinite: true -}); - -CRS.Earth = Earth; -CRS.EPSG3395 = EPSG3395; -CRS.EPSG3857 = EPSG3857; -CRS.EPSG900913 = EPSG900913; -CRS.EPSG4326 = EPSG4326; -CRS.Simple = Simple; - -/* - * @class Layer - * @inherits Evented - * @aka L.Layer - * @aka ILayer - * - * A set of methods from the Layer base class that all Leaflet layers use. - * Inherits all methods, options and events from `L.Evented`. - * - * @example - * - * ```js - * var layer = L.Marker(latlng).addTo(map); - * layer.addTo(map); - * layer.remove(); - * ``` - * - * @event add: Event - * Fired after the layer is added to a map - * - * @event remove: Event - * Fired after the layer is removed from a map - */ - - -var Layer = Evented.extend({ - - // Classes extending `L.Layer` will inherit the following options: - options: { - // @option pane: String = 'overlayPane' - // By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default. - pane: 'overlayPane', - - // @option attribution: String = null - // String to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers. - attribution: null, - - bubblingMouseEvents: true - }, - - /* @section - * Classes extending `L.Layer` will inherit the following methods: - * - * @method addTo(map: Map|LayerGroup): this - * Adds the layer to the given map or layer group. - */ - addTo: function (map) { - map.addLayer(this); - return this; - }, - - // @method remove: this - // Removes the layer from the map it is currently active on. - remove: function () { - return this.removeFrom(this._map || this._mapToAdd); - }, - - // @method removeFrom(map: Map): this - // Removes the layer from the given map - removeFrom: function (obj) { - if (obj) { - obj.removeLayer(this); - } - return this; - }, - - // @method getPane(name? : String): HTMLElement - // Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer. - getPane: function (name) { - return this._map.getPane(name ? (this.options[name] || name) : this.options.pane); - }, - - addInteractiveTarget: function (targetEl) { - this._map._targets[stamp(targetEl)] = this; - return this; - }, - - removeInteractiveTarget: function (targetEl) { - delete this._map._targets[stamp(targetEl)]; - return this; - }, - - // @method getAttribution: String - // Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution). - getAttribution: function () { - return this.options.attribution; - }, - - _layerAdd: function (e) { - var map = e.target; - - // check in case layer gets added and then removed before the map is ready - if (!map.hasLayer(this)) { return; } - - this._map = map; - this._zoomAnimated = map._zoomAnimated; - - if (this.getEvents) { - var events = this.getEvents(); - map.on(events, this); - this.once('remove', function () { - map.off(events, this); - }, this); - } - - this.onAdd(map); - - if (this.getAttribution && map.attributionControl) { - map.attributionControl.addAttribution(this.getAttribution()); - } - - this.fire('add'); - map.fire('layeradd', {layer: this}); - } -}); - -/* @section Extension methods - * @uninheritable - * - * Every layer should extend from `L.Layer` and (re-)implement the following methods. - * - * @method onAdd(map: Map): this - * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer). - * - * @method onRemove(map: Map): this - * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer). - * - * @method getEvents(): Object - * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer. - * - * @method getAttribution(): String - * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible. - * - * @method beforeAdd(map: Map): this - * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only. - */ - - -/* @namespace Map - * @section Layer events - * - * @event layeradd: LayerEvent - * Fired when a new layer is added to the map. - * - * @event layerremove: LayerEvent - * Fired when some layer is removed from the map - * - * @section Methods for Layers and Controls - */ -Map.include({ - // @method addLayer(layer: Layer): this - // Adds the given layer to the map - addLayer: function (layer) { - if (!layer._layerAdd) { - throw new Error('The provided object is not a Layer.'); - } - - var id = stamp(layer); - if (this._layers[id]) { return this; } - this._layers[id] = layer; - - layer._mapToAdd = this; - - if (layer.beforeAdd) { - layer.beforeAdd(this); - } - - this.whenReady(layer._layerAdd, layer); - - return this; - }, - - // @method removeLayer(layer: Layer): this - // Removes the given layer from the map. - removeLayer: function (layer) { - var id = stamp(layer); - - if (!this._layers[id]) { return this; } - - if (this._loaded) { - layer.onRemove(this); - } - - if (layer.getAttribution && this.attributionControl) { - this.attributionControl.removeAttribution(layer.getAttribution()); - } - - delete this._layers[id]; - - if (this._loaded) { - this.fire('layerremove', {layer: layer}); - layer.fire('remove'); - } - - layer._map = layer._mapToAdd = null; - - return this; - }, - - // @method hasLayer(layer: Layer): Boolean - // Returns `true` if the given layer is currently added to the map - hasLayer: function (layer) { - return !!layer && (stamp(layer) in this._layers); - }, - - /* @method eachLayer(fn: Function, context?: Object): this - * Iterates over the layers of the map, optionally specifying context of the iterator function. - * ``` - * map.eachLayer(function(layer){ - * layer.bindPopup('Hello'); - * }); - * ``` - */ - eachLayer: function (method, context) { - for (var i in this._layers) { - method.call(context, this._layers[i]); - } - return this; - }, - - _addLayers: function (layers) { - layers = layers ? (isArray(layers) ? layers : [layers]) : []; - - for (var i = 0, len = layers.length; i < len; i++) { - this.addLayer(layers[i]); - } - }, - - _addZoomLimit: function (layer) { - if (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) { - this._zoomBoundLayers[stamp(layer)] = layer; - this._updateZoomLevels(); - } - }, - - _removeZoomLimit: function (layer) { - var id = stamp(layer); - - if (this._zoomBoundLayers[id]) { - delete this._zoomBoundLayers[id]; - this._updateZoomLevels(); - } - }, - - _updateZoomLevels: function () { - var minZoom = Infinity, - maxZoom = -Infinity, - oldZoomSpan = this._getZoomSpan(); - - for (var i in this._zoomBoundLayers) { - var options = this._zoomBoundLayers[i].options; - - minZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom); - maxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom); - } - - this._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom; - this._layersMinZoom = minZoom === Infinity ? undefined : minZoom; - - // @section Map state change events - // @event zoomlevelschange: Event - // Fired when the number of zoomlevels on the map is changed due - // to adding or removing a layer. - if (oldZoomSpan !== this._getZoomSpan()) { - this.fire('zoomlevelschange'); - } - - if (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) { - this.setZoom(this._layersMaxZoom); - } - if (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) { - this.setZoom(this._layersMinZoom); - } - } -}); - -/* - * @class LayerGroup - * @aka L.LayerGroup - * @inherits Layer - * - * Used to group several layers and handle them as one. If you add it to the map, - * any layers added or removed from the group will be added/removed on the map as - * well. Extends `Layer`. - * - * @example - * - * ```js - * L.layerGroup([marker1, marker2]) - * .addLayer(polyline) - * .addTo(map); - * ``` - */ - -var LayerGroup = Layer.extend({ - - initialize: function (layers, options) { - setOptions(this, options); - - this._layers = {}; - - var i, len; - - if (layers) { - for (i = 0, len = layers.length; i < len; i++) { - this.addLayer(layers[i]); - } - } - }, - - // @method addLayer(layer: Layer): this - // Adds the given layer to the group. - addLayer: function (layer) { - var id = this.getLayerId(layer); - - this._layers[id] = layer; - - if (this._map) { - this._map.addLayer(layer); - } - - return this; - }, - - // @method removeLayer(layer: Layer): this - // Removes the given layer from the group. - // @alternative - // @method removeLayer(id: Number): this - // Removes the layer with the given internal ID from the group. - removeLayer: function (layer) { - var id = layer in this._layers ? layer : this.getLayerId(layer); - - if (this._map && this._layers[id]) { - this._map.removeLayer(this._layers[id]); - } - - delete this._layers[id]; - - return this; - }, - - // @method hasLayer(layer: Layer): Boolean - // Returns `true` if the given layer is currently added to the group. - // @alternative - // @method hasLayer(id: Number): Boolean - // Returns `true` if the given internal ID is currently added to the group. - hasLayer: function (layer) { - return !!layer && (layer in this._layers || this.getLayerId(layer) in this._layers); - }, - - // @method clearLayers(): this - // Removes all the layers from the group. - clearLayers: function () { - return this.eachLayer(this.removeLayer, this); - }, - - // @method invoke(methodName: String, …): this - // Calls `methodName` on every layer contained in this group, passing any - // additional parameters. Has no effect if the layers contained do not - // implement `methodName`. - invoke: function (methodName) { - var args = Array.prototype.slice.call(arguments, 1), - i, layer; - - for (i in this._layers) { - layer = this._layers[i]; - - if (layer[methodName]) { - layer[methodName].apply(layer, args); - } - } - - return this; - }, - - onAdd: function (map) { - this.eachLayer(map.addLayer, map); - }, - - onRemove: function (map) { - this.eachLayer(map.removeLayer, map); - }, - - // @method eachLayer(fn: Function, context?: Object): this - // Iterates over the layers of the group, optionally specifying context of the iterator function. - // ```js - // group.eachLayer(function (layer) { - // layer.bindPopup('Hello'); - // }); - // ``` - eachLayer: function (method, context) { - for (var i in this._layers) { - method.call(context, this._layers[i]); - } - return this; - }, - - // @method getLayer(id: Number): Layer - // Returns the layer with the given internal ID. - getLayer: function (id) { - return this._layers[id]; - }, - - // @method getLayers(): Layer[] - // Returns an array of all the layers added to the group. - getLayers: function () { - var layers = []; - this.eachLayer(layers.push, layers); - return layers; - }, - - // @method setZIndex(zIndex: Number): this - // Calls `setZIndex` on every layer contained in this group, passing the z-index. - setZIndex: function (zIndex) { - return this.invoke('setZIndex', zIndex); - }, - - // @method getLayerId(layer: Layer): Number - // Returns the internal ID for a layer - getLayerId: function (layer) { - return stamp(layer); - } -}); - - -// @factory L.layerGroup(layers?: Layer[], options?: Object) -// Create a layer group, optionally given an initial set of layers and an `options` object. -var layerGroup = function (layers, options) { - return new LayerGroup(layers, options); -}; - -/* - * @class FeatureGroup - * @aka L.FeatureGroup - * @inherits LayerGroup - * - * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers: - * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip)) - * * Events are propagated to the `FeatureGroup`, so if the group has an event - * handler, it will handle events from any of the layers. This includes mouse events - * and custom events. - * * Has `layeradd` and `layerremove` events - * - * @example - * - * ```js - * L.featureGroup([marker1, marker2, polyline]) - * .bindPopup('Hello world!') - * .on('click', function() { alert('Clicked on a member of the group!'); }) - * .addTo(map); - * ``` - */ - -var FeatureGroup = LayerGroup.extend({ - - addLayer: function (layer) { - if (this.hasLayer(layer)) { - return this; - } - - layer.addEventParent(this); - - LayerGroup.prototype.addLayer.call(this, layer); - - // @event layeradd: LayerEvent - // Fired when a layer is added to this `FeatureGroup` - return this.fire('layeradd', {layer: layer}); - }, - - removeLayer: function (layer) { - if (!this.hasLayer(layer)) { - return this; - } - if (layer in this._layers) { - layer = this._layers[layer]; - } - - layer.removeEventParent(this); - - LayerGroup.prototype.removeLayer.call(this, layer); - - // @event layerremove: LayerEvent - // Fired when a layer is removed from this `FeatureGroup` - return this.fire('layerremove', {layer: layer}); - }, - - // @method setStyle(style: Path options): this - // Sets the given path options to each layer of the group that has a `setStyle` method. - setStyle: function (style) { - return this.invoke('setStyle', style); - }, - - // @method bringToFront(): this - // Brings the layer group to the top of all other layers - bringToFront: function () { - return this.invoke('bringToFront'); - }, - - // @method bringToBack(): this - // Brings the layer group to the back of all other layers - bringToBack: function () { - return this.invoke('bringToBack'); - }, - - // @method getBounds(): LatLngBounds - // Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children). - getBounds: function () { - var bounds = new LatLngBounds(); - - for (var id in this._layers) { - var layer = this._layers[id]; - bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng()); - } - return bounds; - } -}); - -// @factory L.featureGroup(layers: Layer[]) -// Create a feature group, optionally given an initial set of layers. -var featureGroup = function (layers) { - return new FeatureGroup(layers); -}; - -/* - * @class Icon - * @aka L.Icon - * - * Represents an icon to provide when creating a marker. - * - * @example - * - * ```js - * var myIcon = L.icon({ - * iconUrl: 'my-icon.png', - * iconRetinaUrl: 'my-icon@2x.png', - * iconSize: [38, 95], - * iconAnchor: [22, 94], - * popupAnchor: [-3, -76], - * shadowUrl: 'my-icon-shadow.png', - * shadowRetinaUrl: 'my-icon-shadow@2x.png', - * shadowSize: [68, 95], - * shadowAnchor: [22, 94] - * }); - * - * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); - * ``` - * - * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default. - * - */ - -var Icon = Class.extend({ - - /* @section - * @aka Icon options - * - * @option iconUrl: String = null - * **(required)** The URL to the icon image (absolute or relative to your script path). - * - * @option iconRetinaUrl: String = null - * The URL to a retina sized version of the icon image (absolute or relative to your - * script path). Used for Retina screen devices. - * - * @option iconSize: Point = null - * Size of the icon image in pixels. - * - * @option iconAnchor: Point = null - * The coordinates of the "tip" of the icon (relative to its top left corner). The icon - * will be aligned so that this point is at the marker's geographical location. Centered - * by default if size is specified, also can be set in CSS with negative margins. - * - * @option popupAnchor: Point = [0, 0] - * The coordinates of the point from which popups will "open", relative to the icon anchor. - * - * @option tooltipAnchor: Point = [0, 0] - * The coordinates of the point from which tooltips will "open", relative to the icon anchor. - * - * @option shadowUrl: String = null - * The URL to the icon shadow image. If not specified, no shadow image will be created. - * - * @option shadowRetinaUrl: String = null - * - * @option shadowSize: Point = null - * Size of the shadow image in pixels. - * - * @option shadowAnchor: Point = null - * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same - * as iconAnchor if not specified). - * - * @option className: String = '' - * A custom class name to assign to both icon and shadow images. Empty by default. - */ - - options: { - popupAnchor: [0, 0], - tooltipAnchor: [0, 0] - }, - - initialize: function (options) { - setOptions(this, options); - }, - - // @method createIcon(oldIcon?: HTMLElement): HTMLElement - // Called internally when the icon has to be shown, returns a `` HTML element - // styled according to the options. - createIcon: function (oldIcon) { - return this._createIcon('icon', oldIcon); - }, - - // @method createShadow(oldIcon?: HTMLElement): HTMLElement - // As `createIcon`, but for the shadow beneath it. - createShadow: function (oldIcon) { - return this._createIcon('shadow', oldIcon); - }, - - _createIcon: function (name, oldIcon) { - var src = this._getIconUrl(name); - - if (!src) { - if (name === 'icon') { - throw new Error('iconUrl not set in Icon options (see the docs).'); - } - return null; - } - - var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null); - this._setIconStyles(img, name); - - return img; - }, - - _setIconStyles: function (img, name) { - var options = this.options; - var sizeOption = options[name + 'Size']; - - if (typeof sizeOption === 'number') { - sizeOption = [sizeOption, sizeOption]; - } - - var size = toPoint(sizeOption), - anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor || - size && size.divideBy(2, true)); - - img.className = 'leaflet-marker-' + name + ' ' + (options.className || ''); - - if (anchor) { - img.style.marginLeft = (-anchor.x) + 'px'; - img.style.marginTop = (-anchor.y) + 'px'; - } - - if (size) { - img.style.width = size.x + 'px'; - img.style.height = size.y + 'px'; - } - }, - - _createImg: function (src, el) { - el = el || document.createElement('img'); - el.src = src; - return el; - }, - - _getIconUrl: function (name) { - return retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url']; - } -}); - - -// @factory L.icon(options: Icon options) -// Creates an icon instance with the given options. -function icon(options) { - return new Icon(options); -} - -/* - * @miniclass Icon.Default (Icon) - * @aka L.Icon.Default - * @section - * - * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when - * no icon is specified. Points to the blue marker image distributed with Leaflet - * releases. - * - * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options` - * (which is a set of `Icon options`). - * - * If you want to _completely_ replace the default icon, override the - * `L.Marker.prototype.options.icon` with your own icon instead. - */ - -var IconDefault = Icon.extend({ - - options: { - iconUrl: 'marker-icon.png', - iconRetinaUrl: 'marker-icon-2x.png', - shadowUrl: 'marker-shadow.png', - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - tooltipAnchor: [16, -28], - shadowSize: [41, 41] - }, - - _getIconUrl: function (name) { - if (!IconDefault.imagePath) { // Deprecated, backwards-compatibility only - IconDefault.imagePath = this._detectIconPath(); - } - - // @option imagePath: String - // `Icon.Default` will try to auto-detect the location of the - // blue icon images. If you are placing these images in a non-standard - // way, set this option to point to the right path. - return (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name); - }, - - _detectIconPath: function () { - var el = create$1('div', 'leaflet-default-icon-path', document.body); - var path = getStyle(el, 'background-image') || - getStyle(el, 'backgroundImage'); // IE8 - - document.body.removeChild(el); - - if (path === null || path.indexOf('url') !== 0) { - path = ''; - } else { - path = path.replace(/^url\(["']?/, '').replace(/marker-icon\.png["']?\)$/, ''); - } - - return path; - } -}); - -/* - * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable. - */ - - -/* @namespace Marker - * @section Interaction handlers - * - * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example: - * - * ```js - * marker.dragging.disable(); - * ``` - * - * @property dragging: Handler - * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)). - */ - -var MarkerDrag = Handler.extend({ - initialize: function (marker) { - this._marker = marker; - }, - - addHooks: function () { - var icon = this._marker._icon; - - if (!this._draggable) { - this._draggable = new Draggable(icon, icon, true); - } - - this._draggable.on({ - dragstart: this._onDragStart, - predrag: this._onPreDrag, - drag: this._onDrag, - dragend: this._onDragEnd - }, this).enable(); - - addClass(icon, 'leaflet-marker-draggable'); - }, - - removeHooks: function () { - this._draggable.off({ - dragstart: this._onDragStart, - predrag: this._onPreDrag, - drag: this._onDrag, - dragend: this._onDragEnd - }, this).disable(); - - if (this._marker._icon) { - removeClass(this._marker._icon, 'leaflet-marker-draggable'); - } - }, - - moved: function () { - return this._draggable && this._draggable._moved; - }, - - _adjustPan: function (e) { - var marker = this._marker, - map = marker._map, - speed = this._marker.options.autoPanSpeed, - padding = this._marker.options.autoPanPadding, - iconPos = getPosition(marker._icon), - bounds = map.getPixelBounds(), - origin = map.getPixelOrigin(); - - var panBounds = toBounds( - bounds.min._subtract(origin).add(padding), - bounds.max._subtract(origin).subtract(padding) - ); - - if (!panBounds.contains(iconPos)) { - // Compute incremental movement - var movement = toPoint( - (Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) - - (Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x), - - (Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) - - (Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y) - ).multiplyBy(speed); - - map.panBy(movement, {animate: false}); - - this._draggable._newPos._add(movement); - this._draggable._startPos._add(movement); - - setPosition(marker._icon, this._draggable._newPos); - this._onDrag(e); - - this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); - } - }, - - _onDragStart: function () { - // @section Dragging events - // @event dragstart: Event - // Fired when the user starts dragging the marker. - - // @event movestart: Event - // Fired when the marker starts moving (because of dragging). - - this._oldLatLng = this._marker.getLatLng(); - this._marker - .closePopup() - .fire('movestart') - .fire('dragstart'); - }, - - _onPreDrag: function (e) { - if (this._marker.options.autoPan) { - cancelAnimFrame(this._panRequest); - this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); - } - }, - - _onDrag: function (e) { - var marker = this._marker, - shadow = marker._shadow, - iconPos = getPosition(marker._icon), - latlng = marker._map.layerPointToLatLng(iconPos); - - // update shadow position - if (shadow) { - setPosition(shadow, iconPos); - } - - marker._latlng = latlng; - e.latlng = latlng; - e.oldLatLng = this._oldLatLng; - - // @event drag: Event - // Fired repeatedly while the user drags the marker. - marker - .fire('move', e) - .fire('drag', e); - }, - - _onDragEnd: function (e) { - // @event dragend: DragEndEvent - // Fired when the user stops dragging the marker. - - cancelAnimFrame(this._panRequest); - - // @event moveend: Event - // Fired when the marker stops moving (because of dragging). - delete this._oldLatLng; - this._marker - .fire('moveend') - .fire('dragend', e); - } -}); - -/* - * @class Marker - * @inherits Interactive layer - * @aka L.Marker - * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`. - * - * @example - * - * ```js - * L.marker([50.5, 30.5]).addTo(map); - * ``` - */ - -var Marker = Layer.extend({ - - // @section - // @aka Marker options - options: { - // @option icon: Icon = * - // Icon instance to use for rendering the marker. - // See [Icon documentation](#L.Icon) for details on how to customize the marker icon. - // If not specified, a common instance of `L.Icon.Default` is used. - icon: new IconDefault(), - - // Option inherited from "Interactive layer" abstract class - interactive: true, - - // @option keyboard: Boolean = true - // Whether the marker can be tabbed to with a keyboard and clicked by pressing enter. - keyboard: true, - - // @option title: String = '' - // Text for the browser tooltip that appear on marker hover (no tooltip by default). - title: '', - - // @option alt: String = '' - // Text for the `alt` attribute of the icon image (useful for accessibility). - alt: '', - - // @option zIndexOffset: Number = 0 - // By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively). - zIndexOffset: 0, - - // @option opacity: Number = 1.0 - // The opacity of the marker. - opacity: 1, - - // @option riseOnHover: Boolean = false - // If `true`, the marker will get on top of others when you hover the mouse over it. - riseOnHover: false, - - // @option riseOffset: Number = 250 - // The z-index offset used for the `riseOnHover` feature. - riseOffset: 250, - - // @option pane: String = 'markerPane' - // `Map pane` where the markers icon will be added. - pane: 'markerPane', - - // @option bubblingMouseEvents: Boolean = false - // When `true`, a mouse event on this marker will trigger the same event on the map - // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). - bubblingMouseEvents: false, - - // @section Draggable marker options - // @option draggable: Boolean = false - // Whether the marker is draggable with mouse/touch or not. - draggable: false, - - // @option autoPan: Boolean = false - // Whether to pan the map when dragging this marker near its edge or not. - autoPan: false, - - // @option autoPanPadding: Point = Point(50, 50) - // Distance (in pixels to the left/right and to the top/bottom) of the - // map edge to start panning the map. - autoPanPadding: [50, 50], - - // @option autoPanSpeed: Number = 10 - // Number of pixels the map should pan by. - autoPanSpeed: 10 - }, - - /* @section - * - * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods: - */ - - initialize: function (latlng, options) { - setOptions(this, options); - this._latlng = toLatLng(latlng); - }, - - onAdd: function (map) { - this._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation; - - if (this._zoomAnimated) { - map.on('zoomanim', this._animateZoom, this); - } - - this._initIcon(); - this.update(); - }, - - onRemove: function (map) { - if (this.dragging && this.dragging.enabled()) { - this.options.draggable = true; - this.dragging.removeHooks(); - } - delete this.dragging; - - if (this._zoomAnimated) { - map.off('zoomanim', this._animateZoom, this); - } - - this._removeIcon(); - this._removeShadow(); - }, - - getEvents: function () { - return { - zoom: this.update, - viewreset: this.update - }; - }, - - // @method getLatLng: LatLng - // Returns the current geographical position of the marker. - getLatLng: function () { - return this._latlng; - }, - - // @method setLatLng(latlng: LatLng): this - // Changes the marker position to the given point. - setLatLng: function (latlng) { - var oldLatLng = this._latlng; - this._latlng = toLatLng(latlng); - this.update(); - - // @event move: Event - // Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`. - return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng}); - }, - - // @method setZIndexOffset(offset: Number): this - // Changes the [zIndex offset](#marker-zindexoffset) of the marker. - setZIndexOffset: function (offset) { - this.options.zIndexOffset = offset; - return this.update(); - }, - - // @method setIcon(icon: Icon): this - // Changes the marker icon. - setIcon: function (icon) { - - this.options.icon = icon; - - if (this._map) { - this._initIcon(); - this.update(); - } - - if (this._popup) { - this.bindPopup(this._popup, this._popup.options); - } - - return this; - }, - - getElement: function () { - return this._icon; - }, - - update: function () { - - if (this._icon && this._map) { - var pos = this._map.latLngToLayerPoint(this._latlng).round(); - this._setPos(pos); - } - - return this; - }, - - _initIcon: function () { - var options = this.options, - classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'); - - var icon = options.icon.createIcon(this._icon), - addIcon = false; - - // if we're not reusing the icon, remove the old one and init new one - if (icon !== this._icon) { - if (this._icon) { - this._removeIcon(); - } - addIcon = true; - - if (options.title) { - icon.title = options.title; - } - - if (icon.tagName === 'IMG') { - icon.alt = options.alt || ''; - } - } - - addClass(icon, classToAdd); - - if (options.keyboard) { - icon.tabIndex = '0'; - } - - this._icon = icon; - - if (options.riseOnHover) { - this.on({ - mouseover: this._bringToFront, - mouseout: this._resetZIndex - }); - } - - var newShadow = options.icon.createShadow(this._shadow), - addShadow = false; - - if (newShadow !== this._shadow) { - this._removeShadow(); - addShadow = true; - } - - if (newShadow) { - addClass(newShadow, classToAdd); - newShadow.alt = ''; - } - this._shadow = newShadow; - - - if (options.opacity < 1) { - this._updateOpacity(); - } - - - if (addIcon) { - this.getPane().appendChild(this._icon); - } - this._initInteraction(); - if (newShadow && addShadow) { - this.getPane('shadowPane').appendChild(this._shadow); - } - }, - - _removeIcon: function () { - if (this.options.riseOnHover) { - this.off({ - mouseover: this._bringToFront, - mouseout: this._resetZIndex - }); - } - - remove(this._icon); - this.removeInteractiveTarget(this._icon); - - this._icon = null; - }, - - _removeShadow: function () { - if (this._shadow) { - remove(this._shadow); - } - this._shadow = null; - }, - - _setPos: function (pos) { - setPosition(this._icon, pos); - - if (this._shadow) { - setPosition(this._shadow, pos); - } - - this._zIndex = pos.y + this.options.zIndexOffset; - - this._resetZIndex(); - }, - - _updateZIndex: function (offset) { - this._icon.style.zIndex = this._zIndex + offset; - }, - - _animateZoom: function (opt) { - var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round(); - - this._setPos(pos); - }, - - _initInteraction: function () { - - if (!this.options.interactive) { return; } - - addClass(this._icon, 'leaflet-interactive'); - - this.addInteractiveTarget(this._icon); - - if (MarkerDrag) { - var draggable = this.options.draggable; - if (this.dragging) { - draggable = this.dragging.enabled(); - this.dragging.disable(); - } - - this.dragging = new MarkerDrag(this); - - if (draggable) { - this.dragging.enable(); - } - } - }, - - // @method setOpacity(opacity: Number): this - // Changes the opacity of the marker. - setOpacity: function (opacity) { - this.options.opacity = opacity; - if (this._map) { - this._updateOpacity(); - } - - return this; - }, - - _updateOpacity: function () { - var opacity = this.options.opacity; - - setOpacity(this._icon, opacity); - - if (this._shadow) { - setOpacity(this._shadow, opacity); - } - }, - - _bringToFront: function () { - this._updateZIndex(this.options.riseOffset); - }, - - _resetZIndex: function () { - this._updateZIndex(0); - }, - - _getPopupAnchor: function () { - return this.options.icon.options.popupAnchor; - }, - - _getTooltipAnchor: function () { - return this.options.icon.options.tooltipAnchor; - } -}); - - -// factory L.marker(latlng: LatLng, options? : Marker options) - -// @factory L.marker(latlng: LatLng, options? : Marker options) -// Instantiates a Marker object given a geographical point and optionally an options object. -function marker(latlng, options) { - return new Marker(latlng, options); -} - -/* - * @class Path - * @aka L.Path - * @inherits Interactive layer - * - * An abstract class that contains options and constants shared between vector - * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`. - */ - -var Path = Layer.extend({ - - // @section - // @aka Path options - options: { - // @option stroke: Boolean = true - // Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles. - stroke: true, - - // @option color: String = '#3388ff' - // Stroke color - color: '#3388ff', - - // @option weight: Number = 3 - // Stroke width in pixels - weight: 3, - - // @option opacity: Number = 1.0 - // Stroke opacity - opacity: 1, - - // @option lineCap: String= 'round' - // A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke. - lineCap: 'round', - - // @option lineJoin: String = 'round' - // A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke. - lineJoin: 'round', - - // @option dashArray: String = null - // A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). - dashArray: null, - - // @option dashOffset: String = null - // A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). - dashOffset: null, - - // @option fill: Boolean = depends - // Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles. - fill: false, - - // @option fillColor: String = * - // Fill color. Defaults to the value of the [`color`](#path-color) option - fillColor: null, - - // @option fillOpacity: Number = 0.2 - // Fill opacity. - fillOpacity: 0.2, - - // @option fillRule: String = 'evenodd' - // A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined. - fillRule: 'evenodd', - - // className: '', - - // Option inherited from "Interactive layer" abstract class - interactive: true, - - // @option bubblingMouseEvents: Boolean = true - // When `true`, a mouse event on this path will trigger the same event on the map - // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). - bubblingMouseEvents: true - }, - - beforeAdd: function (map) { - // Renderer is set here because we need to call renderer.getEvents - // before this.getEvents. - this._renderer = map.getRenderer(this); - }, - - onAdd: function () { - this._renderer._initPath(this); - this._reset(); - this._renderer._addPath(this); - }, - - onRemove: function () { - this._renderer._removePath(this); - }, - - // @method redraw(): this - // Redraws the layer. Sometimes useful after you changed the coordinates that the path uses. - redraw: function () { - if (this._map) { - this._renderer._updatePath(this); - } - return this; - }, - - // @method setStyle(style: Path options): this - // Changes the appearance of a Path based on the options in the `Path options` object. - setStyle: function (style) { - setOptions(this, style); - if (this._renderer) { - this._renderer._updateStyle(this); - } - return this; - }, - - // @method bringToFront(): this - // Brings the layer to the top of all path layers. - bringToFront: function () { - if (this._renderer) { - this._renderer._bringToFront(this); - } - return this; - }, - - // @method bringToBack(): this - // Brings the layer to the bottom of all path layers. - bringToBack: function () { - if (this._renderer) { - this._renderer._bringToBack(this); - } - return this; - }, - - getElement: function () { - return this._path; - }, - - _reset: function () { - // defined in child classes - this._project(); - this._update(); - }, - - _clickTolerance: function () { - // used when doing hit detection for Canvas layers - return (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance; - } -}); - -/* - * @class CircleMarker - * @aka L.CircleMarker - * @inherits Path - * - * A circle of a fixed size with radius specified in pixels. Extends `Path`. - */ - -var CircleMarker = Path.extend({ - - // @section - // @aka CircleMarker options - options: { - fill: true, - - // @option radius: Number = 10 - // Radius of the circle marker, in pixels - radius: 10 - }, - - initialize: function (latlng, options) { - setOptions(this, options); - this._latlng = toLatLng(latlng); - this._radius = this.options.radius; - }, - - // @method setLatLng(latLng: LatLng): this - // Sets the position of a circle marker to a new location. - setLatLng: function (latlng) { - this._latlng = toLatLng(latlng); - this.redraw(); - return this.fire('move', {latlng: this._latlng}); - }, - - // @method getLatLng(): LatLng - // Returns the current geographical position of the circle marker - getLatLng: function () { - return this._latlng; - }, - - // @method setRadius(radius: Number): this - // Sets the radius of a circle marker. Units are in pixels. - setRadius: function (radius) { - this.options.radius = this._radius = radius; - return this.redraw(); - }, - - // @method getRadius(): Number - // Returns the current radius of the circle - getRadius: function () { - return this._radius; - }, - - setStyle : function (options) { - var radius = options && options.radius || this._radius; - Path.prototype.setStyle.call(this, options); - this.setRadius(radius); - return this; - }, - - _project: function () { - this._point = this._map.latLngToLayerPoint(this._latlng); - this._updateBounds(); - }, - - _updateBounds: function () { - var r = this._radius, - r2 = this._radiusY || r, - w = this._clickTolerance(), - p = [r + w, r2 + w]; - this._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p)); - }, - - _update: function () { - if (this._map) { - this._updatePath(); - } - }, - - _updatePath: function () { - this._renderer._updateCircle(this); - }, - - _empty: function () { - return this._radius && !this._renderer._bounds.intersects(this._pxBounds); - }, - - // Needed by the `Canvas` renderer for interactivity - _containsPoint: function (p) { - return p.distanceTo(this._point) <= this._radius + this._clickTolerance(); - } -}); - - -// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options) -// Instantiates a circle marker object given a geographical point, and an optional options object. -function circleMarker(latlng, options) { - return new CircleMarker(latlng, options); -} - -/* - * @class Circle - * @aka L.Circle - * @inherits CircleMarker - * - * A class for drawing circle overlays on a map. Extends `CircleMarker`. - * - * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion). - * - * @example - * - * ```js - * L.circle([50.5, 30.5], {radius: 200}).addTo(map); - * ``` - */ - -var Circle = CircleMarker.extend({ - - initialize: function (latlng, options, legacyOptions) { - if (typeof options === 'number') { - // Backwards compatibility with 0.7.x factory (latlng, radius, options?) - options = extend({}, legacyOptions, {radius: options}); - } - setOptions(this, options); - this._latlng = toLatLng(latlng); - - if (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); } - - // @section - // @aka Circle options - // @option radius: Number; Radius of the circle, in meters. - this._mRadius = this.options.radius; - }, - - // @method setRadius(radius: Number): this - // Sets the radius of a circle. Units are in meters. - setRadius: function (radius) { - this._mRadius = radius; - return this.redraw(); - }, - - // @method getRadius(): Number - // Returns the current radius of a circle. Units are in meters. - getRadius: function () { - return this._mRadius; - }, - - // @method getBounds(): LatLngBounds - // Returns the `LatLngBounds` of the path. - getBounds: function () { - var half = [this._radius, this._radiusY || this._radius]; - - return new LatLngBounds( - this._map.layerPointToLatLng(this._point.subtract(half)), - this._map.layerPointToLatLng(this._point.add(half))); - }, - - setStyle: Path.prototype.setStyle, - - _project: function () { - - var lng = this._latlng.lng, - lat = this._latlng.lat, - map = this._map, - crs = map.options.crs; - - if (crs.distance === Earth.distance) { - var d = Math.PI / 180, - latR = (this._mRadius / Earth.R) / d, - top = map.project([lat + latR, lng]), - bottom = map.project([lat - latR, lng]), - p = top.add(bottom).divideBy(2), - lat2 = map.unproject(p).lat, - lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) / - (Math.cos(lat * d) * Math.cos(lat2 * d))) / d; - - if (isNaN(lngR) || lngR === 0) { - lngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425 - } - - this._point = p.subtract(map.getPixelOrigin()); - this._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x; - this._radiusY = p.y - top.y; - - } else { - var latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0])); - - this._point = map.latLngToLayerPoint(this._latlng); - this._radius = this._point.x - map.latLngToLayerPoint(latlng2).x; - } - - this._updateBounds(); - } -}); - -// @factory L.circle(latlng: LatLng, options?: Circle options) -// Instantiates a circle object given a geographical point, and an options object -// which contains the circle radius. -// @alternative -// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options) -// Obsolete way of instantiating a circle, for compatibility with 0.7.x code. -// Do not use in new applications or plugins. -function circle(latlng, options, legacyOptions) { - return new Circle(latlng, options, legacyOptions); -} - -/* - * @class Polyline - * @aka L.Polyline - * @inherits Path - * - * A class for drawing polyline overlays on a map. Extends `Path`. - * - * @example - * - * ```js - * // create a red polyline from an array of LatLng points - * var latlngs = [ - * [45.51, -122.68], - * [37.77, -122.43], - * [34.04, -118.2] - * ]; - * - * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map); - * - * // zoom the map to the polyline - * map.fitBounds(polyline.getBounds()); - * ``` - * - * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape: - * - * ```js - * // create a red polyline from an array of arrays of LatLng points - * var latlngs = [ - * [[45.51, -122.68], - * [37.77, -122.43], - * [34.04, -118.2]], - * [[40.78, -73.91], - * [41.83, -87.62], - * [32.76, -96.72]] - * ]; - * ``` - */ - - -var Polyline = Path.extend({ - - // @section - // @aka Polyline options - options: { - // @option smoothFactor: Number = 1.0 - // How much to simplify the polyline on each zoom level. More means - // better performance and smoother look, and less means more accurate representation. - smoothFactor: 1.0, - - // @option noClip: Boolean = false - // Disable polyline clipping. - noClip: false - }, - - initialize: function (latlngs, options) { - setOptions(this, options); - this._setLatLngs(latlngs); - }, - - // @method getLatLngs(): LatLng[] - // Returns an array of the points in the path, or nested arrays of points in case of multi-polyline. - getLatLngs: function () { - return this._latlngs; - }, - - // @method setLatLngs(latlngs: LatLng[]): this - // Replaces all the points in the polyline with the given array of geographical points. - setLatLngs: function (latlngs) { - this._setLatLngs(latlngs); - return this.redraw(); - }, - - // @method isEmpty(): Boolean - // Returns `true` if the Polyline has no LatLngs. - isEmpty: function () { - return !this._latlngs.length; - }, - - // @method closestLayerPoint(p: Point): Point - // Returns the point closest to `p` on the Polyline. - closestLayerPoint: function (p) { - var minDistance = Infinity, - minPoint = null, - closest = _sqClosestPointOnSegment, - p1, p2; - - for (var j = 0, jLen = this._parts.length; j < jLen; j++) { - var points = this._parts[j]; - - for (var i = 1, len = points.length; i < len; i++) { - p1 = points[i - 1]; - p2 = points[i]; - - var sqDist = closest(p, p1, p2, true); - - if (sqDist < minDistance) { - minDistance = sqDist; - minPoint = closest(p, p1, p2); - } - } - } - if (minPoint) { - minPoint.distance = Math.sqrt(minDistance); - } - return minPoint; - }, - - // @method getCenter(): LatLng - // Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the polyline. - getCenter: function () { - // throws error when not yet added to map as this center calculation requires projected coordinates - if (!this._map) { - throw new Error('Must add layer to map before using getCenter()'); - } - - var i, halfDist, segDist, dist, p1, p2, ratio, - points = this._rings[0], - len = points.length; - - if (!len) { return null; } - - // polyline centroid algorithm; only uses the first ring if there are multiple - - for (i = 0, halfDist = 0; i < len - 1; i++) { - halfDist += points[i].distanceTo(points[i + 1]) / 2; - } - - // The line is so small in the current view that all points are on the same pixel. - if (halfDist === 0) { - return this._map.layerPointToLatLng(points[0]); - } - - for (i = 0, dist = 0; i < len - 1; i++) { - p1 = points[i]; - p2 = points[i + 1]; - segDist = p1.distanceTo(p2); - dist += segDist; - - if (dist > halfDist) { - ratio = (dist - halfDist) / segDist; - return this._map.layerPointToLatLng([ - p2.x - ratio * (p2.x - p1.x), - p2.y - ratio * (p2.y - p1.y) - ]); - } - } - }, - - // @method getBounds(): LatLngBounds - // Returns the `LatLngBounds` of the path. - getBounds: function () { - return this._bounds; - }, - - // @method addLatLng(latlng: LatLng, latlngs? LatLng[]): this - // Adds a given point to the polyline. By default, adds to the first ring of - // the polyline in case of a multi-polyline, but can be overridden by passing - // a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)). - addLatLng: function (latlng, latlngs) { - latlngs = latlngs || this._defaultShape(); - latlng = toLatLng(latlng); - latlngs.push(latlng); - this._bounds.extend(latlng); - return this.redraw(); - }, - - _setLatLngs: function (latlngs) { - this._bounds = new LatLngBounds(); - this._latlngs = this._convertLatLngs(latlngs); - }, - - _defaultShape: function () { - return isFlat(this._latlngs) ? this._latlngs : this._latlngs[0]; - }, - - // recursively convert latlngs input into actual LatLng instances; calculate bounds along the way - _convertLatLngs: function (latlngs) { - var result = [], - flat = isFlat(latlngs); - - for (var i = 0, len = latlngs.length; i < len; i++) { - if (flat) { - result[i] = toLatLng(latlngs[i]); - this._bounds.extend(result[i]); - } else { - result[i] = this._convertLatLngs(latlngs[i]); - } - } - - return result; - }, - - _project: function () { - var pxBounds = new Bounds(); - this._rings = []; - this._projectLatlngs(this._latlngs, this._rings, pxBounds); - - var w = this._clickTolerance(), - p = new Point(w, w); - - if (this._bounds.isValid() && pxBounds.isValid()) { - pxBounds.min._subtract(p); - pxBounds.max._add(p); - this._pxBounds = pxBounds; - } - }, - - // recursively turns latlngs into a set of rings with projected coordinates - _projectLatlngs: function (latlngs, result, projectedBounds) { - var flat = latlngs[0] instanceof LatLng, - len = latlngs.length, - i, ring; - - if (flat) { - ring = []; - for (i = 0; i < len; i++) { - ring[i] = this._map.latLngToLayerPoint(latlngs[i]); - projectedBounds.extend(ring[i]); - } - result.push(ring); - } else { - for (i = 0; i < len; i++) { - this._projectLatlngs(latlngs[i], result, projectedBounds); - } - } - }, - - // clip polyline by renderer bounds so that we have less to render for performance - _clipPoints: function () { - var bounds = this._renderer._bounds; - - this._parts = []; - if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { - return; - } - - if (this.options.noClip) { - this._parts = this._rings; - return; - } - - var parts = this._parts, - i, j, k, len, len2, segment, points; - - for (i = 0, k = 0, len = this._rings.length; i < len; i++) { - points = this._rings[i]; - - for (j = 0, len2 = points.length; j < len2 - 1; j++) { - segment = clipSegment(points[j], points[j + 1], bounds, j, true); - - if (!segment) { continue; } - - parts[k] = parts[k] || []; - parts[k].push(segment[0]); - - // if segment goes out of screen, or it's the last one, it's the end of the line part - if ((segment[1] !== points[j + 1]) || (j === len2 - 2)) { - parts[k].push(segment[1]); - k++; - } - } - } - }, - - // simplify each clipped part of the polyline for performance - _simplifyPoints: function () { - var parts = this._parts, - tolerance = this.options.smoothFactor; - - for (var i = 0, len = parts.length; i < len; i++) { - parts[i] = simplify(parts[i], tolerance); - } - }, - - _update: function () { - if (!this._map) { return; } - - this._clipPoints(); - this._simplifyPoints(); - this._updatePath(); - }, - - _updatePath: function () { - this._renderer._updatePoly(this); - }, - - // Needed by the `Canvas` renderer for interactivity - _containsPoint: function (p, closed) { - var i, j, k, len, len2, part, - w = this._clickTolerance(); - - if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; } - - // hit detection for polylines - for (i = 0, len = this._parts.length; i < len; i++) { - part = this._parts[i]; - - for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { - if (!closed && (j === 0)) { continue; } - - if (pointToSegmentDistance(p, part[k], part[j]) <= w) { - return true; - } - } - } - return false; - } -}); - -// @factory L.polyline(latlngs: LatLng[], options?: Polyline options) -// Instantiates a polyline object given an array of geographical points and -// optionally an options object. You can create a `Polyline` object with -// multiple separate lines (`MultiPolyline`) by passing an array of arrays -// of geographic points. -function polyline(latlngs, options) { - return new Polyline(latlngs, options); -} - -// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1. -Polyline._flat = _flat; - -/* - * @class Polygon - * @aka L.Polygon - * @inherits Polyline - * - * A class for drawing polygon overlays on a map. Extends `Polyline`. - * - * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points. - * - * - * @example - * - * ```js - * // create a red polygon from an array of LatLng points - * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]]; - * - * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map); - * - * // zoom the map to the polygon - * map.fitBounds(polygon.getBounds()); - * ``` - * - * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape: - * - * ```js - * var latlngs = [ - * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring - * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole - * ]; - * ``` - * - * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape. - * - * ```js - * var latlngs = [ - * [ // first polygon - * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring - * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole - * ], - * [ // second polygon - * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]] - * ] - * ]; - * ``` - */ - -var Polygon = Polyline.extend({ - - options: { - fill: true - }, - - isEmpty: function () { - return !this._latlngs.length || !this._latlngs[0].length; - }, - - getCenter: function () { - // throws error when not yet added to map as this center calculation requires projected coordinates - if (!this._map) { - throw new Error('Must add layer to map before using getCenter()'); - } - - var i, j, p1, p2, f, area, x, y, center, - points = this._rings[0], - len = points.length; - - if (!len) { return null; } - - // polygon centroid algorithm; only uses the first ring if there are multiple - - area = x = y = 0; - - for (i = 0, j = len - 1; i < len; j = i++) { - p1 = points[i]; - p2 = points[j]; - - f = p1.y * p2.x - p2.y * p1.x; - x += (p1.x + p2.x) * f; - y += (p1.y + p2.y) * f; - area += f * 3; - } - - if (area === 0) { - // Polygon is so small that all points are on same pixel. - center = points[0]; - } else { - center = [x / area, y / area]; - } - return this._map.layerPointToLatLng(center); - }, - - _convertLatLngs: function (latlngs) { - var result = Polyline.prototype._convertLatLngs.call(this, latlngs), - len = result.length; - - // remove last point if it equals first one - if (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) { - result.pop(); - } - return result; - }, - - _setLatLngs: function (latlngs) { - Polyline.prototype._setLatLngs.call(this, latlngs); - if (isFlat(this._latlngs)) { - this._latlngs = [this._latlngs]; - } - }, - - _defaultShape: function () { - return isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0]; - }, - - _clipPoints: function () { - // polygons need a different clipping algorithm so we redefine that - - var bounds = this._renderer._bounds, - w = this.options.weight, - p = new Point(w, w); - - // increase clip padding by stroke width to avoid stroke on clip edges - bounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p)); - - this._parts = []; - if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { - return; - } - - if (this.options.noClip) { - this._parts = this._rings; - return; - } - - for (var i = 0, len = this._rings.length, clipped; i < len; i++) { - clipped = clipPolygon(this._rings[i], bounds, true); - if (clipped.length) { - this._parts.push(clipped); - } - } - }, - - _updatePath: function () { - this._renderer._updatePoly(this, true); - }, - - // Needed by the `Canvas` renderer for interactivity - _containsPoint: function (p) { - var inside = false, - part, p1, p2, i, j, k, len, len2; - - if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; } - - // ray casting algorithm for detecting if point is in polygon - for (i = 0, len = this._parts.length; i < len; i++) { - part = this._parts[i]; - - for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { - p1 = part[j]; - p2 = part[k]; - - if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) { - inside = !inside; - } - } - } - - // also check if it's on polygon stroke - return inside || Polyline.prototype._containsPoint.call(this, p, true); - } - -}); - - -// @factory L.polygon(latlngs: LatLng[], options?: Polyline options) -function polygon(latlngs, options) { - return new Polygon(latlngs, options); -} - -/* - * @class GeoJSON - * @aka L.GeoJSON - * @inherits FeatureGroup - * - * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse - * GeoJSON data and display it on the map. Extends `FeatureGroup`. - * - * @example - * - * ```js - * L.geoJSON(data, { - * style: function (feature) { - * return {color: feature.properties.color}; - * } - * }).bindPopup(function (layer) { - * return layer.feature.properties.description; - * }).addTo(map); - * ``` - */ - -var GeoJSON = FeatureGroup.extend({ - - /* @section - * @aka GeoJSON options - * - * @option pointToLayer: Function = * - * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally - * called when data is added, passing the GeoJSON point feature and its `LatLng`. - * The default is to spawn a default `Marker`: - * ```js - * function(geoJsonPoint, latlng) { - * return L.marker(latlng); - * } - * ``` - * - * @option style: Function = * - * A `Function` defining the `Path options` for styling GeoJSON lines and polygons, - * called internally when data is added. - * The default value is to not override any defaults: - * ```js - * function (geoJsonFeature) { - * return {} - * } - * ``` - * - * @option onEachFeature: Function = * - * A `Function` that will be called once for each created `Feature`, after it has - * been created and styled. Useful for attaching events and popups to features. - * The default is to do nothing with the newly created layers: - * ```js - * function (feature, layer) {} - * ``` - * - * @option filter: Function = * - * A `Function` that will be used to decide whether to include a feature or not. - * The default is to include all features: - * ```js - * function (geoJsonFeature) { - * return true; - * } - * ``` - * Note: dynamically changing the `filter` option will have effect only on newly - * added data. It will _not_ re-evaluate already included features. - * - * @option coordsToLatLng: Function = * - * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s. - * The default is the `coordsToLatLng` static method. - */ - - initialize: function (geojson, options) { - setOptions(this, options); - - this._layers = {}; - - if (geojson) { - this.addData(geojson); - } - }, - - // @method addData( data ): this - // Adds a GeoJSON object to the layer. - addData: function (geojson) { - var features = isArray(geojson) ? geojson : geojson.features, - i, len, feature; - - if (features) { - for (i = 0, len = features.length; i < len; i++) { - // only add this if geometry or geometries are set and not null - feature = features[i]; - if (feature.geometries || feature.geometry || feature.features || feature.coordinates) { - this.addData(feature); - } - } - return this; - } - - var options = this.options; - - if (options.filter && !options.filter(geojson)) { return this; } - - var layer = geometryToLayer(geojson, options); - if (!layer) { - return this; - } - layer.feature = asFeature(geojson); - - layer.defaultOptions = layer.options; - this.resetStyle(layer); - - if (options.onEachFeature) { - options.onEachFeature(geojson, layer); - } - - return this.addLayer(layer); - }, - - // @method resetStyle( layer ): this - // Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events. - resetStyle: function (layer) { - // reset any custom styles - layer.options = extend({}, layer.defaultOptions); - this._setLayerStyle(layer, this.options.style); - return this; - }, - - // @method setStyle( style ): this - // Changes styles of GeoJSON vector layers with the given style function. - setStyle: function (style) { - return this.eachLayer(function (layer) { - this._setLayerStyle(layer, style); - }, this); - }, - - _setLayerStyle: function (layer, style) { - if (typeof style === 'function') { - style = style(layer.feature); - } - if (layer.setStyle) { - layer.setStyle(style); - } - } -}); - -// @section -// There are several static functions which can be called without instantiating L.GeoJSON: - -// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer -// Creates a `Layer` from a given GeoJSON feature. Can use a custom -// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng) -// functions if provided as options. -function geometryToLayer(geojson, options) { - - var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson, - coords = geometry ? geometry.coordinates : null, - layers = [], - pointToLayer = options && options.pointToLayer, - _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng, - latlng, latlngs, i, len; - - if (!coords && !geometry) { - return null; - } - - switch (geometry.type) { - case 'Point': - latlng = _coordsToLatLng(coords); - return pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng); - - case 'MultiPoint': - for (i = 0, len = coords.length; i < len; i++) { - latlng = _coordsToLatLng(coords[i]); - layers.push(pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng)); - } - return new FeatureGroup(layers); - - case 'LineString': - case 'MultiLineString': - latlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng); - return new Polyline(latlngs, options); - - case 'Polygon': - case 'MultiPolygon': - latlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng); - return new Polygon(latlngs, options); - - case 'GeometryCollection': - for (i = 0, len = geometry.geometries.length; i < len; i++) { - var layer = geometryToLayer({ - geometry: geometry.geometries[i], - type: 'Feature', - properties: geojson.properties - }, options); - - if (layer) { - layers.push(layer); - } - } - return new FeatureGroup(layers); - - default: - throw new Error('Invalid GeoJSON object.'); - } -} - -// @function coordsToLatLng(coords: Array): LatLng -// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude) -// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points. -function coordsToLatLng(coords) { - return new LatLng(coords[1], coords[0], coords[2]); -} - -// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array -// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array. -// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). -// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function. -function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) { - var latlngs = []; - - for (var i = 0, len = coords.length, latlng; i < len; i++) { - latlng = levelsDeep ? - coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) : - (_coordsToLatLng || coordsToLatLng)(coords[i]); - - latlngs.push(latlng); - } - - return latlngs; -} - -// @function latLngToCoords(latlng: LatLng, precision?: Number): Array -// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng) -function latLngToCoords(latlng, precision) { - precision = typeof precision === 'number' ? precision : 6; - return latlng.alt !== undefined ? - [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] : - [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)]; -} - -// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array -// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs) -// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default. -function latLngsToCoords(latlngs, levelsDeep, closed, precision) { - var coords = []; - - for (var i = 0, len = latlngs.length; i < len; i++) { - coords.push(levelsDeep ? - latLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) : - latLngToCoords(latlngs[i], precision)); - } - - if (!levelsDeep && closed) { - coords.push(coords[0]); - } - - return coords; -} - -function getFeature(layer, newGeometry) { - return layer.feature ? - extend({}, layer.feature, {geometry: newGeometry}) : - asFeature(newGeometry); -} - -// @function asFeature(geojson: Object): Object -// Normalize GeoJSON geometries/features into GeoJSON features. -function asFeature(geojson) { - if (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') { - return geojson; - } - - return { - type: 'Feature', - properties: {}, - geometry: geojson - }; -} - -var PointToGeoJSON = { - toGeoJSON: function (precision) { - return getFeature(this, { - type: 'Point', - coordinates: latLngToCoords(this.getLatLng(), precision) - }); - } -}; - -// @namespace Marker -// @method toGeoJSON(): Object -// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature). -Marker.include(PointToGeoJSON); - -// @namespace CircleMarker -// @method toGeoJSON(): Object -// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature). -Circle.include(PointToGeoJSON); -CircleMarker.include(PointToGeoJSON); - - -// @namespace Polyline -// @method toGeoJSON(): Object -// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature). -Polyline.include({ - toGeoJSON: function (precision) { - var multi = !isFlat(this._latlngs); - - var coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision); - - return getFeature(this, { - type: (multi ? 'Multi' : '') + 'LineString', - coordinates: coords - }); - } -}); - -// @namespace Polygon -// @method toGeoJSON(): Object -// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature). -Polygon.include({ - toGeoJSON: function (precision) { - var holes = !isFlat(this._latlngs), - multi = holes && !isFlat(this._latlngs[0]); - - var coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision); - - if (!holes) { - coords = [coords]; - } - - return getFeature(this, { - type: (multi ? 'Multi' : '') + 'Polygon', - coordinates: coords - }); - } -}); - - -// @namespace LayerGroup -LayerGroup.include({ - toMultiPoint: function (precision) { - var coords = []; - - this.eachLayer(function (layer) { - coords.push(layer.toGeoJSON(precision).geometry.coordinates); - }); - - return getFeature(this, { - type: 'MultiPoint', - coordinates: coords - }); - }, - - // @method toGeoJSON(): Object - // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`). - toGeoJSON: function (precision) { - - var type = this.feature && this.feature.geometry && this.feature.geometry.type; - - if (type === 'MultiPoint') { - return this.toMultiPoint(precision); - } - - var isGeometryCollection = type === 'GeometryCollection', - jsons = []; - - this.eachLayer(function (layer) { - if (layer.toGeoJSON) { - var json = layer.toGeoJSON(precision); - if (isGeometryCollection) { - jsons.push(json.geometry); - } else { - var feature = asFeature(json); - // Squash nested feature collections - if (feature.type === 'FeatureCollection') { - jsons.push.apply(jsons, feature.features); - } else { - jsons.push(feature); - } - } - } - }); - - if (isGeometryCollection) { - return getFeature(this, { - geometries: jsons, - type: 'GeometryCollection' - }); - } - - return { - type: 'FeatureCollection', - features: jsons - }; - } -}); - -// @namespace GeoJSON -// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options) -// Creates a GeoJSON layer. Optionally accepts an object in -// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map -// (you can alternatively add it later with `addData` method) and an `options` object. -function geoJSON(geojson, options) { - return new GeoJSON(geojson, options); -} - -// Backward compatibility. -var geoJson = geoJSON; - -/* - * @class ImageOverlay - * @aka L.ImageOverlay - * @inherits Interactive layer - * - * Used to load and display a single image over specific bounds of the map. Extends `Layer`. - * - * @example - * - * ```js - * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', - * imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; - * L.imageOverlay(imageUrl, imageBounds).addTo(map); - * ``` - */ - -var ImageOverlay = Layer.extend({ - - // @section - // @aka ImageOverlay options - options: { - // @option opacity: Number = 1.0 - // The opacity of the image overlay. - opacity: 1, - - // @option alt: String = '' - // Text for the `alt` attribute of the image (useful for accessibility). - alt: '', - - // @option interactive: Boolean = false - // If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered. - interactive: false, - - // @option crossOrigin: Boolean|String = false - // Whether the crossOrigin attribute will be added to the image. - // If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data. - // Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values. - crossOrigin: false, - - // @option errorOverlayUrl: String = '' - // URL to the overlay image to show in place of the overlay that failed to load. - errorOverlayUrl: '', - - // @option zIndex: Number = 1 - // The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer. - zIndex: 1, - - // @option className: String = '' - // A custom class name to assign to the image. Empty by default. - className: '' - }, - - initialize: function (url, bounds, options) { // (String, LatLngBounds, Object) - this._url = url; - this._bounds = toLatLngBounds(bounds); - - setOptions(this, options); - }, - - onAdd: function () { - if (!this._image) { - this._initImage(); - - if (this.options.opacity < 1) { - this._updateOpacity(); - } - } - - if (this.options.interactive) { - addClass(this._image, 'leaflet-interactive'); - this.addInteractiveTarget(this._image); - } - - this.getPane().appendChild(this._image); - this._reset(); - }, - - onRemove: function () { - remove(this._image); - if (this.options.interactive) { - this.removeInteractiveTarget(this._image); - } - }, - - // @method setOpacity(opacity: Number): this - // Sets the opacity of the overlay. - setOpacity: function (opacity) { - this.options.opacity = opacity; - - if (this._image) { - this._updateOpacity(); - } - return this; - }, - - setStyle: function (styleOpts) { - if (styleOpts.opacity) { - this.setOpacity(styleOpts.opacity); - } - return this; - }, - - // @method bringToFront(): this - // Brings the layer to the top of all overlays. - bringToFront: function () { - if (this._map) { - toFront(this._image); - } - return this; - }, - - // @method bringToBack(): this - // Brings the layer to the bottom of all overlays. - bringToBack: function () { - if (this._map) { - toBack(this._image); - } - return this; - }, - - // @method setUrl(url: String): this - // Changes the URL of the image. - setUrl: function (url) { - this._url = url; - - if (this._image) { - this._image.src = url; - } - return this; - }, - - // @method setBounds(bounds: LatLngBounds): this - // Update the bounds that this ImageOverlay covers - setBounds: function (bounds) { - this._bounds = toLatLngBounds(bounds); - - if (this._map) { - this._reset(); - } - return this; - }, - - getEvents: function () { - var events = { - zoom: this._reset, - viewreset: this._reset - }; - - if (this._zoomAnimated) { - events.zoomanim = this._animateZoom; - } - - return events; - }, - - // @method setZIndex(value: Number): this - // Changes the [zIndex](#imageoverlay-zindex) of the image overlay. - setZIndex: function (value) { - this.options.zIndex = value; - this._updateZIndex(); - return this; - }, - - // @method getBounds(): LatLngBounds - // Get the bounds that this ImageOverlay covers - getBounds: function () { - return this._bounds; - }, - - // @method getElement(): HTMLElement - // Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement) - // used by this overlay. - getElement: function () { - return this._image; - }, - - _initImage: function () { - var wasElementSupplied = this._url.tagName === 'IMG'; - var img = this._image = wasElementSupplied ? this._url : create$1('img'); - - addClass(img, 'leaflet-image-layer'); - if (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); } - if (this.options.className) { addClass(img, this.options.className); } - - img.onselectstart = falseFn; - img.onmousemove = falseFn; - - // @event load: Event - // Fired when the ImageOverlay layer has loaded its image - img.onload = bind(this.fire, this, 'load'); - img.onerror = bind(this._overlayOnError, this, 'error'); - - if (this.options.crossOrigin || this.options.crossOrigin === '') { - img.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin; - } - - if (this.options.zIndex) { - this._updateZIndex(); - } - - if (wasElementSupplied) { - this._url = img.src; - return; - } - - img.src = this._url; - img.alt = this.options.alt; - }, - - _animateZoom: function (e) { - var scale = this._map.getZoomScale(e.zoom), - offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min; - - setTransform(this._image, offset, scale); - }, - - _reset: function () { - var image = this._image, - bounds = new Bounds( - this._map.latLngToLayerPoint(this._bounds.getNorthWest()), - this._map.latLngToLayerPoint(this._bounds.getSouthEast())), - size = bounds.getSize(); - - setPosition(image, bounds.min); - - image.style.width = size.x + 'px'; - image.style.height = size.y + 'px'; - }, - - _updateOpacity: function () { - setOpacity(this._image, this.options.opacity); - }, - - _updateZIndex: function () { - if (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) { - this._image.style.zIndex = this.options.zIndex; - } - }, - - _overlayOnError: function () { - // @event error: Event - // Fired when the ImageOverlay layer fails to load its image - this.fire('error'); - - var errorUrl = this.options.errorOverlayUrl; - if (errorUrl && this._url !== errorUrl) { - this._url = errorUrl; - this._image.src = errorUrl; - } - } -}); - -// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options) -// Instantiates an image overlay object given the URL of the image and the -// geographical bounds it is tied to. -var imageOverlay = function (url, bounds, options) { - return new ImageOverlay(url, bounds, options); -}; - -/* - * @class VideoOverlay - * @aka L.VideoOverlay - * @inherits ImageOverlay - * - * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`. - * - * A video overlay uses the [`