wonder-image 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/DOCS.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -0
  4. package/babel.config.json +3 -0
  5. package/demo/backend/body-end.php +10 -0
  6. package/demo/backend/head.php +93 -0
  7. package/demo/frontend/body-end.php +19 -0
  8. package/demo/frontend/head.php +244 -0
  9. package/demo/wonder-image.php +41 -0
  10. package/dist/0d01fa889dc2b0202b98.png +0 -0
  11. package/dist/203d1199e7aef04c0a34.gif +0 -0
  12. package/dist/26d6ed3fa1c815e4c78f.png +0 -0
  13. package/dist/39795c0b4513de014cf8.woff +0 -0
  14. package/dist/40b30ca122107c2852be.png +0 -0
  15. package/dist/4a7b4107b62ef059ba65.png +0 -0
  16. package/dist/4dce7f71b08755f19759.png +0 -0
  17. package/dist/60af14fddca897f348bb.png +0 -0
  18. package/dist/67172a36bcdeaca8592a.png +0 -0
  19. package/dist/a85c6dc53638f894de38.png +0 -0
  20. package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
  21. package/dist/backend/body-end.js +3 -0
  22. package/dist/backend/body-end.js.LICENSE.txt +44 -0
  23. package/dist/backend/body-end.js.map +1 -0
  24. package/dist/backend/head.css +2 -0
  25. package/dist/backend/head.css.map +1 -0
  26. package/dist/backend/head.js +3 -0
  27. package/dist/backend/head.js.LICENSE.txt +46 -0
  28. package/dist/backend/head.js.map +1 -0
  29. package/dist/backend/lib.js +2 -0
  30. package/dist/backend/lib.js.LICENSE.txt +1 -0
  31. package/dist/frontend/body-end.js +3 -0
  32. package/dist/frontend/body-end.js.LICENSE.txt +46 -0
  33. package/dist/frontend/body-end.js.map +1 -0
  34. package/dist/frontend/head.css +2 -0
  35. package/dist/frontend/head.css.map +1 -0
  36. package/dist/frontend/head.js +3 -0
  37. package/dist/frontend/head.js.LICENSE.txt +46 -0
  38. package/dist/frontend/head.js.map +1 -0
  39. package/dist/frontend/lib.css +2 -0
  40. package/dist/frontend/lib.css.map +1 -0
  41. package/dist/frontend/lib.js +3 -0
  42. package/dist/frontend/lib.js.LICENSE.txt +151 -0
  43. package/dist/frontend/lib.js.map +1 -0
  44. package/dist/lib/autonumeric/autonumeric.js +3 -0
  45. package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
  46. package/dist/lib/autonumeric/autonumeric.js.map +1 -0
  47. package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
  48. package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
  49. package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
  50. package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
  51. package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
  52. package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
  53. package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
  54. package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
  55. package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
  56. package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
  57. package/dist/lib/bootstrap/bootstrap.css +2 -0
  58. package/dist/lib/bootstrap/bootstrap.css.map +1 -0
  59. package/dist/lib/bootstrap/bootstrap.js +3 -0
  60. package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
  61. package/dist/lib/bootstrap/bootstrap.js.map +1 -0
  62. package/dist/lib/chartjs/chart.js +3 -0
  63. package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
  64. package/dist/lib/chartjs/chart.js.map +1 -0
  65. package/dist/lib/datatables/datatables.css +2 -0
  66. package/dist/lib/datatables/datatables.css.map +1 -0
  67. package/dist/lib/datatables/datatables.js +3 -0
  68. package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
  69. package/dist/lib/datatables/datatables.js.map +1 -0
  70. package/dist/lib/editorjs/editor.js +3 -0
  71. package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
  72. package/dist/lib/editorjs/editor.js.map +1 -0
  73. package/dist/lib/fancyapps/fancyapps.css +2 -0
  74. package/dist/lib/fancyapps/fancyapps.css.map +1 -0
  75. package/dist/lib/fancyapps/fancyapps.js +3 -0
  76. package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
  77. package/dist/lib/fancyapps/fancyapps.js.map +1 -0
  78. package/dist/lib/filepond/filepond.css +2 -0
  79. package/dist/lib/filepond/filepond.css.map +1 -0
  80. package/dist/lib/filepond/filepond.js +3 -0
  81. package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
  82. package/dist/lib/filepond/filepond.js.map +1 -0
  83. package/dist/lib/fullcalendar/fullcalendar.js +3 -0
  84. package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
  85. package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
  86. package/dist/lib/jquery/jquery-plugin.css +2 -0
  87. package/dist/lib/jquery/jquery-plugin.css.map +1 -0
  88. package/dist/lib/jquery/jquery-plugin.js +3 -0
  89. package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
  90. package/dist/lib/jquery/jquery-plugin.js.map +1 -0
  91. package/dist/lib/jquery/jquery.js +3 -0
  92. package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
  93. package/dist/lib/jquery/jquery.js.map +1 -0
  94. package/dist/lib/jstree/jstree.css +2 -0
  95. package/dist/lib/jstree/jstree.css.map +1 -0
  96. package/dist/lib/jstree/jstree.js +3 -0
  97. package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
  98. package/dist/lib/jstree/jstree.js.map +1 -0
  99. package/dist/lib/moment/moment.js +3 -0
  100. package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
  101. package/dist/lib/moment/moment.js.map +1 -0
  102. package/dist/lib/quilljs/quill.css +2 -0
  103. package/dist/lib/quilljs/quill.css.map +1 -0
  104. package/dist/lib/quilljs/quill.js +3 -0
  105. package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
  106. package/dist/lib/quilljs/quill.js.map +1 -0
  107. package/dist/lib/swiperjs/swiper-plugin.css +2 -0
  108. package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
  109. package/dist/lib/swiperjs/swiper-plugin.js +3 -0
  110. package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
  111. package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
  112. package/dist/lib/swiperjs/swiper.css +2 -0
  113. package/dist/lib/swiperjs/swiper.css.map +1 -0
  114. package/dist/lib/swiperjs/swiper.js +3 -0
  115. package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
  116. package/dist/lib/swiperjs/swiper.js.map +1 -0
  117. package/dist/lib/videojs/video.css +2 -0
  118. package/dist/lib/videojs/video.css.map +1 -0
  119. package/dist/lib/videojs/video.js +3 -0
  120. package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
  121. package/dist/lib/videojs/video.js.map +1 -0
  122. package/package.json +95 -0
  123. package/src/build/backend/css/header.css +252 -0
  124. package/src/build/backend/css/input.css +295 -0
  125. package/src/build/backend/css/list.css +57 -0
  126. package/src/build/backend/css/order.css +99 -0
  127. package/src/build/backend/js/ajax.js +96 -0
  128. package/src/build/backend/js/alert.js +78 -0
  129. package/src/build/backend/js/bootstrap.js +52 -0
  130. package/src/build/backend/js/form/editor.js +293 -0
  131. package/src/build/backend/js/form/file.js +142 -0
  132. package/src/build/backend/js/form/filepond.js +11 -0
  133. package/src/build/backend/js/form/input.js +313 -0
  134. package/src/build/backend/js/form/inputRow.js +164 -0
  135. package/src/build/backend/js/form/send.js +14 -0
  136. package/src/build/backend/js/form/set.js +314 -0
  137. package/src/build/backend/js/jquery.js +15 -0
  138. package/src/build/backend/js/list.js +19 -0
  139. package/src/build/backend/js/modal.js +31 -0
  140. package/src/build/backend/js/pageSetUp.js +125 -0
  141. package/src/build/backend/js/utility.js +38 -0
  142. package/src/build/frontend/css/class/dimension.css +3376 -0
  143. package/src/build/frontend/css/class/function.css +316 -0
  144. package/src/build/frontend/css/class/grid.css +240 -0
  145. package/src/build/frontend/css/class/margin.css +823 -0
  146. package/src/build/frontend/css/class/padding.css +760 -0
  147. package/src/build/frontend/css/class/position.css +351 -0
  148. package/src/build/frontend/css/class/resize.css +24 -0
  149. package/src/build/frontend/css/class/section.css +41 -0
  150. package/src/build/frontend/css/class/text.css +244 -0
  151. package/src/build/frontend/css/components/alert.css +42 -0
  152. package/src/build/frontend/css/components/button.css +107 -0
  153. package/src/build/frontend/css/components/dropdown.css +118 -0
  154. package/src/build/frontend/css/components/form/address.css +26 -0
  155. package/src/build/frontend/css/components/form/checkbox.css +65 -0
  156. package/src/build/frontend/css/components/form/date.css +133 -0
  157. package/src/build/frontend/css/components/form/input.css +176 -0
  158. package/src/build/frontend/css/components/form/select.css +69 -0
  159. package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
  160. package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
  161. package/src/build/frontend/css/components/header/header.css +57 -0
  162. package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
  163. package/src/build/frontend/css/components/modal.css +76 -0
  164. package/src/build/frontend/css/components/spinner.css +37 -0
  165. package/src/build/frontend/css/generator/dimension.php +93 -0
  166. package/src/build/frontend/css/generator/margin.php +48 -0
  167. package/src/build/frontend/css/generator/padding.php +48 -0
  168. package/src/build/frontend/css/lib.css +3 -0
  169. package/src/build/frontend/css/main.css +37 -0
  170. package/src/build/frontend/js/alert.js +64 -0
  171. package/src/build/frontend/js/aos.js +9 -0
  172. package/src/build/frontend/js/dropdown.js +73 -0
  173. package/src/build/frontend/js/form/input.js +211 -0
  174. package/src/build/frontend/js/form/list.js +155 -0
  175. package/src/build/frontend/js/form/select.js +108 -0
  176. package/src/build/frontend/js/form/send.js +137 -0
  177. package/src/build/frontend/js/header.js +12 -0
  178. package/src/build/frontend/js/modal.js +26 -0
  179. package/src/build/frontend/js/pageSetUp.js +35 -0
  180. package/src/build/frontend/js/scroll.js +70 -0
  181. package/src/build/frontend/js/utility.js +21 -0
  182. package/src/build/global/js/canvas.js +82 -0
  183. package/src/build/global/js/fetch.js +47 -0
  184. package/src/build/global/js/form/autonumeric.js +136 -0
  185. package/src/build/global/js/form/phone.js +19 -0
  186. package/src/build/global/js/utility.js +88 -0
  187. package/src/build/global/js/video.js +7 -0
  188. package/src/build/lib/editorjs/gallery.js +39 -0
  189. package/src/build/lib/editorjs/hyperlink.js +170 -0
  190. package/src/build/lib/editorjs/video.js +61 -0
  191. package/src/build/lib/swiperjs/effect-carousel.css +24 -0
  192. package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
  193. package/src/build/lib/swiperjs/effect-shutters.css +33 -0
  194. package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
  195. package/src/build/lib/swiperjs/effect-slicer.css +39 -0
  196. package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
  197. package/src/build/lib/swiperjs/swiper-gl.css +44 -0
  198. package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
  199. package/src/export/backend/body-end.js +4 -0
  200. package/src/export/backend/head.js +25 -0
  201. package/src/export/backend/lib.js +0 -0
  202. package/src/export/frontend/body-end.js +9 -0
  203. package/src/export/frontend/head.js +42 -0
  204. package/src/export/frontend/lib.js +17 -0
  205. package/src/export/lib/autonumeric/autonumeric.js +3 -0
  206. package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
  207. package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
  208. package/src/export/lib/bootstrap/bootstrap.js +3 -0
  209. package/src/export/lib/chartjs/chart.js +4 -0
  210. package/src/export/lib/datatables/datatables.js +6 -0
  211. package/src/export/lib/editorjs/editor.js +48 -0
  212. package/src/export/lib/fancyapps/fancyapps.js +7 -0
  213. package/src/export/lib/filepond/filepond.js +51 -0
  214. package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
  215. package/src/export/lib/jquery/jquery-plugin.js +14 -0
  216. package/src/export/lib/jquery/jquery.js +4 -0
  217. package/src/export/lib/jstree/jstree.js +2 -0
  218. package/src/export/lib/moment/moment.js +12 -0
  219. package/src/export/lib/quilljs/quill.js +4 -0
  220. package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
  221. package/src/export/lib/swiperjs/swiper.js +4 -0
  222. package/src/export/lib/videojs/video.js +3 -0
  223. package/webpack.config.js +79 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see editor.js.LICENSE.txt */
2
+ (()=>{var __webpack_modules__={8402:e=>{window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=6)}([function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){var o=n(2),r=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void c(t.promise,e)}l(t.promise,o)}else(1===e._state?l:c)(t.promise,e._value)}))):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void p((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){c(e,t)}var o,r}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,l(t,e))}),(function(e){n||(n=!0,c(t,e))}))}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new d(e,t,n)),n},a.prototype.finally=o.a,a.all=function(e){return new a((function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var r=o.length;function i(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){i(e,t)}),n)}o[e]=a,0==--r&&t(o)}catch(e){n(e)}}for(var a=0;a<o.length;a++)i(a,o[a])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t.a=a}).call(this,n(5).setImmediate)},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(4);var r,i,a,s,l,c,u,d=n(8),p=(i=function(e){return new Promise((function(t,n){e=s(e),(e=l(e)).beforeSend&&e.beforeSend();var o=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");o.open(e.method,e.url),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e.headers).forEach((function(t){var n=e.headers[t];o.setRequestHeader(t,n)}));var r=e.ratio;o.upload.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*r/100);e.progress(Math.min(o,100))}),!1),o.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*(100-r)/100)+r;e.progress(Math.min(o,100))}),!1),o.onreadystatechange=function(){if(4===o.readyState){var e=o.response;try{e=JSON.parse(e)}catch(e){}var r=d.parseHeaders(o.getAllResponseHeaders()),i={body:e,code:o.status,headers:r};u(o.status)?t(i):n(i)}},o.send(e.data)}))},a=function(e){return e.method="POST",i(e)},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==o(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(r).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},l=function(e){switch(e.method){case"GET":var t=c(e.data,r.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||r.JSON}(e);(d.isFormData(e.data)||d.isFormElement(e.data))&&(n=r.FORM),e.data=c(e.data,n),n!==p.contentType.FORM&&(e.headers["content-type"]=n)}return e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case r.URLENCODED:return d.urlEncode(e);case r.JSON:return d.jsonEncode(e);case r.FORM:return d.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:r={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),d.selectFiles(e).then((function(t){for(var n=new FormData,o=0;o<t.length;o++)n.append(e.fieldName,t[o],t[o].name);d.isObject(e.data)&&Object.keys(e.data).forEach((function(t){var o=e.data[t];n.append(t,o)}));var r=e.beforeSend;return e.beforeSend=function(){return r(t)},e.data=n,a(e)}))},selectFiles:function(e){return delete(e=s(e)).beforeSend,d.selectFiles(e)}});e.exports=p},function(e,t,n){"use strict";n.r(t);var o=n(1);window.Promise=window.Promise||o.a},function(e,t,n){(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var o,r,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),o=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},o=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,o=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[l]=r,o(l),l++},p.clearImmediate=f}function f(e){delete c[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(7))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,c=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=n(9);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return(t=[{key:"urlEncode",value:function(e){return r(e)}},{key:"jsonEncode",value:function(e){return JSON.stringify(e)}},{key:"formEncode",value:function(e){if(this.isFormData(e))return e;if(this.isFormElement(e))return new FormData(e);if(this.isObject(e)){var t=new FormData;return Object.keys(e).forEach((function(n){var o=e[n];t.append(n,o)})),t}throw new Error("`data` must be an instance of Object, FormData or <FORM> HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var o=document.createElement("INPUT");o.type="file",e.multiple&&o.setAttribute("multiple","multiple"),e.accept&&o.setAttribute("accept",e.accept),o.style.display="none",document.body.appendChild(o),o.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(o)}),!1),o.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),o=t.shift(),r=t.join(": ");o&&(n[o]=r)})),n}}])&&o(e,t),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},o=function(e,t,r,i){return t=t||null,r=r||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}(Object.keys(e).map((function(a){var s,l,c=a;if(i&&(c=i+"["+c+"]"),"object"==typeof e[a]&&null!==e[a])s=o(e[a],null,r,c);else{t&&(l=c,c=!isNaN(parseFloat(l))&&isFinite(l)?t+Number(c):c);var u=e[a];u=(u=0===(u=!1===(u=!0===u?"1":u)?"0":u)?"0":u)||"",s=n(c)+"="+n(u)}return s}))).join(r).replace(/[!'()*]/g,""):""};e.exports=o}])},function(e,t,n){var o=n(2);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(4)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,".cdx-attaches {\n --color-line: #EFF0F1;\n --color-bg: #fff;\n --color-bg-secondary: #F8F8F8;\n --color-bg-secondary--hover: #f2f2f2;\n --color-text-secondary: #707684;\n}\n\n .cdx-attaches--with-file {\n display: flex;\n align-items: center;\n padding: 10px 12px;\n border: 1px solid var(--color-line);\n border-radius: 7px;\n background: var(--color-bg);\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-info {\n display: grid;\n grid-gap: 4px;\n max-width: calc(100% - 80px);\n margin: auto 0;\n flex-grow: 2;\n }\n\n .cdx-attaches--with-file .cdx-attaches__download-button {\n display: flex;\n align-items: center;\n background: var(--color-bg-secondary);\n padding: 6px;\n border-radius: 6px;\n margin: auto 0 auto auto;\n }\n\n .cdx-attaches--with-file .cdx-attaches__download-button:hover {\n background: var(--color-bg-secondary--hover);\n }\n\n .cdx-attaches--with-file .cdx-attaches__download-button svg {\n width: 20px;\n height: 20px;\n fill: none;\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-icon {\n position: relative;\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-icon-background {\n background-color: #333;\n\n width: 27px;\n height: 30px;\n margin-right: 12px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n @supports(-webkit-mask-box-image: url('')){\n\n .cdx-attaches--with-file .cdx-attaches__file-icon-background {\n border-radius: 0;\n -webkit-mask-box-image: url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10.3872C0 1.83334 1.83334 0 10.3872 0H13.6128C22.1667 0 24 1.83334 24 10.3872V13.6128C24 22.1667 22.1667 24 13.6128 24H10.3872C1.83334 24 0 22.1667 0 13.6128V10.3872Z' fill='black'/%3E%3C/svg%3E%0A\") 48% 41% 37.9% 53.3%\n };\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-icon-label {\n position: absolute;\n left: 3px;\n top: 11px;\n background: inherit;\n text-transform: uppercase;\n line-height: 1em;\n color: #fff;\n padding: 1px 2px;\n border-radius: 3px;\n font-size: 10px;\n font-weight: bold;\n /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.22); */\n font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;\n letter-spacing: 0.02em;\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-icon svg {\n width: 20px;\n height: 20px;\n }\n\n .cdx-attaches--with-file .cdx-attaches__file-icon path {\n stroke: #fff;\n }\n\n .cdx-attaches--with-file .cdx-attaches__size {\n color: var(--color-text-secondary);\n font-size: 12px;\n line-height: 1em;\n }\n\n .cdx-attaches--with-file .cdx-attaches__size::after {\n content: attr(data-size);\n margin-left: 0.2em;\n }\n\n .cdx-attaches--with-file .cdx-attaches__title {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n outline: none;\n max-width: 90%;\n font-size: 14px;\n font-weight: 500;\n line-height: 1em;\n }\n\n .cdx-attaches--with-file .cdx-attaches__title:empty::before {\n content: attr(data-placeholder);\n color: #7b7e89;\n }\n\n .cdx-attaches--loading .cdx-attaches__title,\n .cdx-attaches--loading .cdx-attaches__file-icon,\n .cdx-attaches--loading .cdx-attaches__size,\n .cdx-attaches--loading .cdx-attaches__download-button,\n .cdx-attaches--loading .cdx-attaches__button {\n opacity: 0;\n font-size: 0;\n }\n\n .cdx-attaches__button {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #000;\n border-radius: 7px;\n font-weight: 500;\n }\n\n .cdx-attaches__button svg {\n margin-top: 0;\n }\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||"",r=e[3];if(!r)return o;if(t&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[o].concat(a).concat([i]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var o,r,i={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),c=null,u=0,d=[],p=n(5);function f(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=i[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(b(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(b(o.parts[a],t));i[o.id]={id:o.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function m(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=d[d.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function y(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=y(t)),o=x.bind(null,n,a,!1),r=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),o=E.bind(null,n,t),r=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),o=S.bind(null,n),r=function(){g(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var a=n[r];(s=i[a.id]).refs--,o.push(s)}for(e&&f(h(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[s.id]}}}};var w,k=(w=[],function(e,t){return w[e]=t,w.filter(Boolean).join("\n")});function x(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=k(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function S(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function E(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=p(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f})),n(1);var o=n(0),r=n.n(o);function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var a=function(){function e(t){var n=t.config,o=t.onUpload,r=t.onError;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=n,this.onUpload=o,this.onError=r}var t,n,o;return t=e,(n=[{key:"uploadSelectedFile",value:function(e){var t=this,n=e.onPreview;(this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile?r.a.selectFiles({accept:this.config.types}).then((function(e){n();var o,r=t.config.uploader.uploadByFile(e[0]);return(o=r)&&"function"==typeof o.then||console.warn("Custom uploader method uploadByFile should return a Promise"),r})):r.a.transport({url:this.config.endpoint,accept:this.config.types,beforeSend:function(){return n()},fieldName:this.config.field,headers:this.config.additionalRequestHeaders||{}}).then((function(e){return e.body}))).then((function(e){t.onUpload(e)})).catch((function(e){var n=e.body,o=n&&n.message?n.message:t.config.errorMessage;t.onError(o)}))}}])&&i(t.prototype,n),o&&i(t,o),e}();function s(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.createElement(e);for(var i in Array.isArray(n)?(t=r.classList).add.apply(t,s(n)):n&&r.classList.add(n),o)r[i]=o[i];return r}function u(e){return 0===Object.keys(e).length}const d='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.3236 8.43554L9.49533 12.1908C9.13119 12.5505 8.93118 13.043 8.9393 13.5598C8.94741 14.0767 9.163 14.5757 9.53862 14.947C9.91424 15.3182 10.4191 15.5314 10.9422 15.5397C11.4653 15.5479 11.9637 15.3504 12.3279 14.9908L16.1562 11.2355C16.8845 10.5161 17.2845 9.53123 17.2682 8.4975C17.252 7.46376 16.8208 6.46583 16.0696 5.72324C15.3184 4.98066 14.3086 4.55425 13.2624 4.53782C12.2162 4.52138 11.2193 4.91627 10.4911 5.63562L6.66277 9.39093C5.57035 10.4699 4.97032 11.9473 4.99467 13.4979C5.01903 15.0485 5.66578 16.5454 6.79264 17.6592C7.9195 18.7731 9.43417 19.4127 11.0034 19.4374C12.5727 19.462 14.068 18.8697 15.1604 17.7907L18.9887 14.0354"/></svg>';function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var f=function(){function e(t){var n=this,o=t.data,r=t.config,i=t.api,s=t.readOnly;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=i,this.readOnly=s,this.nodes={wrapper:null,button:null,title:null},this._data={file:{},title:""},this.config={endpoint:r.endpoint||"",field:r.field||"file",types:r.types||"*",buttonText:r.buttonText||"Select file to upload",errorMessage:r.errorMessage||"File upload failed",uploader:r.uploader||void 0,additionalRequestHeaders:r.additionalRequestHeaders||{}},void 0===o||u(o)||(this.data=o),this.uploader=new a({config:this.config,onUpload:function(e){return n.onUpload(e)},onError:function(e){return n.uploadingFailed(e)}}),this.enableFileUpload=this.enableFileUpload.bind(this)}var t,n,o;return t=e,o=[{key:"toolbox",get:function(){return{icon:d,title:"Attachment"}}},{key:"isReadOnlySupported",get:function(){return!0}}],(n=[{key:"CSS",get:function(){return{baseClass:this.api.styles.block,apiButton:this.api.styles.button,loader:this.api.styles.loader,wrapper:"cdx-attaches",wrapperWithFile:"cdx-attaches--with-file",wrapperLoading:"cdx-attaches--loading",button:"cdx-attaches__button",title:"cdx-attaches__title",size:"cdx-attaches__size",downloadButton:"cdx-attaches__download-button",fileInfo:"cdx-attaches__file-info",fileIcon:"cdx-attaches__file-icon",fileIconBackground:"cdx-attaches__file-icon-background",fileIconLabel:"cdx-attaches__file-icon-label"}}},{key:"EXTENSIONS",get:function(){return{doc:"#1483E9",docx:"#1483E9",odt:"#1483E9",pdf:"#DB2F2F",rtf:"#744FDC",tex:"#5a5a5b",txt:"#5a5a5b",pptx:"#E35200",ppt:"#E35200",mp3:"#eab456",mp4:"#f676a6",xls:"#11AE3D",html:"#2988f0",htm:"#2988f0",png:"#AA2284",jpg:"#D13359",jpeg:"#D13359",gif:"#f6af76",zip:"#4f566f",rar:"#4f566f",exe:"#e26f6f",svg:"#bf5252",key:"#00B2FF",sketch:"#FFC700",ai:"#FB601D",psd:"#388ae5",dmg:"#e26f6f",json:"#2988f0",csv:"#11AE3D"}}},{key:"validate",value:function(e){return!u(e.file)}},{key:"save",value:function(e){if(this.pluginHasData()){var t=e.querySelector(".".concat(this.CSS.title));t&&Object.assign(this.data,{title:t.innerHTML})}return this.data}},{key:"render",value:function(){var e=c("div",this.CSS.baseClass);return this.nodes.wrapper=c("div",this.CSS.wrapper),this.pluginHasData()?this.showFileData():this.prepareUploadButton(),e.appendChild(this.nodes.wrapper),e}},{key:"prepareUploadButton",value:function(){this.nodes.button=c("div",[this.CSS.apiButton,this.CSS.button]),this.nodes.button.innerHTML="".concat(d," ").concat(this.config.buttonText),this.readOnly||this.nodes.button.addEventListener("click",this.enableFileUpload),this.nodes.wrapper.appendChild(this.nodes.button)}},{key:"appendCallback",value:function(){this.nodes.button.click()}},{key:"pluginHasData",value:function(){return""!==this.data.title||Object.values(this.data.file).some((function(e){return void 0!==e}))}},{key:"enableFileUpload",value:function(){var e=this;this.uploader.uploadSelectedFile({onPreview:function(){e.nodes.wrapper.classList.add(e.CSS.wrapperLoading,e.CSS.loader)}})}},{key:"onUpload",value:function(e){var t,n,o,r=e;try{r.success&&void 0!==r.file&&!u(r.file)?(this.data={file:r.file,title:r.file.title||""},this.nodes.button.remove(),this.showFileData(),t=this.nodes.title,n=document.createRange(),o=window.getSelection(),n.selectNodeContents(t),n.collapse(!1),o.removeAllRanges(),o.addRange(n),this.removeLoader()):this.uploadingFailed(this.config.errorMessage)}catch(e){console.error("Attaches tool error:",e),this.uploadingFailed(this.config.errorMessage)}this.api.blocks.getBlockByIndex(this.api.blocks.getCurrentBlockIndex()).dispatchChange()}},{key:"appendFileIcon",value:function(e){var t,n=e.extension||(void 0===(t=e.name)?"":t.split(".").pop()),o=this.EXTENSIONS[n],r=c("div",this.CSS.fileIcon),i=c("div",this.CSS.fileIconBackground);if(o&&(i.style.backgroundColor=o),r.appendChild(i),n){var a=n;n.length>4&&(a=n.substring(0,4)+"…");var s=c("div",this.CSS.fileIconLabel,{textContent:a,title:n});o&&(s.style.backgroundColor=o),r.appendChild(s)}else i.innerHTML=d;this.nodes.wrapper.appendChild(r)}},{key:"removeLoader",value:function(){var e=this;setTimeout((function(){return e.nodes.wrapper.classList.remove(e.CSS.wrapperLoading,e.CSS.loader)}),500)}},{key:"showFileData",value:function(){this.nodes.wrapper.classList.add(this.CSS.wrapperWithFile);var e=this.data,t=e.file,n=e.title;this.appendFileIcon(t);var o=c("div",this.CSS.fileInfo);if(this.nodes.title=c("div",this.CSS.title,{contentEditable:!1===this.readOnly}),this.nodes.title.dataset.placeholder=this.api.i18n.t("File title"),this.nodes.title.textContent=n||"",o.appendChild(this.nodes.title),t.size){var r,i,a=c("div",this.CSS.size);Math.log10(+t.size)>=6?(r="MiB",i=t.size/Math.pow(2,20)):(r="KiB",i=t.size/Math.pow(2,10)),a.textContent=i.toFixed(1),a.setAttribute("data-size",r),o.appendChild(a)}if(this.nodes.wrapper.appendChild(o),void 0!==t.url){var s=c("a",this.CSS.downloadButton,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>',href:t.url,target:"_blank",rel:"nofollow noindex noreferrer"});this.nodes.wrapper.appendChild(s)}}},{key:"uploadingFailed",value:function(e){this.api.notifier.show({message:e,style:"error"}),this.removeLoader()}},{key:"data",get:function(){return this._data},set:function(e){var t=e.file,n=e.title;this._data={file:t,title:n}}}])&&p(t.prototype,n),o&&p(t,o),e}()}]).default},8606:e=>{self,e.exports=function(){var e={966:function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}n(548).toString();var r=n(630).make,i=function(){function e(t){var n=t.api,o=t.data,r=t.config,i=t.block;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=n,this.block=i,this.settings=r,this.data=o||{alignment:this.getAlignment()},this.alignmentSettings=[{name:"left",icon:'<svg xmlns="http://www.w3.org/2000/svg" id="Layer" enable-background="new 0 0 64 64" height="20" viewBox="0 0 64 64" width="20"><path d="m54 8h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 52h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m10 23h28c1.104 0 2-.896 2-2s-.896-2-2-2h-28c-1.104 0-2 .896-2 2s.896 2 2 2z"/><path d="m54 30h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m10 45h28c1.104 0 2-.896 2-2s-.896-2-2-2h-28c-1.104 0-2 .896-2 2s.896 2 2 2z"/></svg>'},{name:"center",icon:'<svg xmlns="http://www.w3.org/2000/svg" id="Layer" enable-background="new 0 0 64 64" height="20" viewBox="0 0 64 64" width="20"><path d="m54 8h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 52h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m46 23c1.104 0 2-.896 2-2s-.896-2-2-2h-28c-1.104 0-2 .896-2 2s.896 2 2 2z"/><path d="m54 30h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m46 45c1.104 0 2-.896 2-2s-.896-2-2-2h-28c-1.104 0-2 .896-2 2s.896 2 2 2z"/></svg>'},{name:"right",icon:'<svg xmlns="http://www.w3.org/2000/svg" id="Layer" enable-background="new 0 0 64 64" height="20" viewBox="0 0 64 64" width="20"><path d="m54 8h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 52h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 19h-28c-1.104 0-2 .896-2 2s.896 2 2 2h28c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 30h-44c-1.104 0-2 .896-2 2s.896 2 2 2h44c1.104 0 2-.896 2-2s-.896-2-2-2z"/><path d="m54 41h-28c-1.104 0-2 .896-2 2s.896 2 2 2h28c1.104 0 2-.896 2-2s-.896-2-2-2z"/></svg>'}],this._CSS={alignment:{left:"ce-tune-alignment--left",center:"ce-tune-alignment--center",right:"ce-tune-alignment--right"}}}var t,n,i;return t=e,i=[{key:"DEFAULT_ALIGNMENT",get:function(){return"left"}},{key:"isTune",get:function(){return!0}}],(n=[{key:"getAlignment",value:function(){var t,n;return null!==(t=this.settings)&&void 0!==t&&t.blocks&&this.settings.blocks.hasOwnProperty(this.block.name)?this.settings.blocks[this.block.name]:null!==(n=this.settings)&&void 0!==n&&n.default?this.settings.default:e.DEFAULT_ALIGNMENT}},{key:"wrap",value:function(e){return this.wrapper=r("div"),this.wrapper.classList.toggle(this._CSS.alignment[this.data.alignment]),this.wrapper.append(e),this.wrapper}},{key:"render",value:function(){var e=this,t=r("div");return this.alignmentSettings.map((function(n){var o=document.createElement("button");return o.classList.add(e.api.styles.settingsButton),o.innerHTML=n.icon,o.type="button",o.classList.toggle(e.api.styles.settingsButtonActive,n.name===e.data.alignment),t.appendChild(o),o})).forEach((function(t,n,o){t.addEventListener("click",(function(){e.data={alignment:e.alignmentSettings[n].name},o.forEach((function(t,n){var o=e.alignmentSettings[n].name;t.classList.toggle(e.api.styles.settingsButtonActive,o===e.data.alignment),e.wrapper.classList.toggle(e._CSS.alignment[o],o===e.data.alignment)}))}))})),t}},{key:"save",value:function(){return this.data}}])&&o(t.prototype,n),i&&o(t,i),e}();e.exports=i},630:function(e,t,n){"use strict";function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,o(n)):n&&i.classList.add(n),r)i[a]=r[a];return i}n.r(t),n.d(t,{make:function(){return i}})},424:function(e,t,n){"use strict";var o=n(645),r=n.n(o)()((function(e){return e[1]}));r.push([e.id,".ce-tune-alignment--right {\n text-align: right;\n}\n.ce-tune-alignment--center {\n text-align: center;\n}\n.ce-tune-alignment--left {\n text-align: left;\n}",""]),t.Z=r},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);o&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},548:function(e,t,n){"use strict";var o=n(379),r=n.n(o),i=n(424);r()(i.Z,{insert:"head",singleton:!1}),i.Z.locals},379:function(e,t,n){"use strict";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},o=[],r=0;r<e.length;r++){var s=e[r],l=t.base?s[0]+t.base:s[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=a(u),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(i[d].references++,i[d].updater(p)):i.push({identifier:u,updater:m(p,t),references:1}),o.push(u)}return o}function l(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var f=null,h=0;function m(e,t){var n,o,r;if(t.singleton){var i=h++;n=f||(f=l(t)),o=d.bind(null,n,i,!1),r=d.bind(null,n,i,!0)}else n=l(t),o=p.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=a(n[o]);i[r].references--}for(var l=s(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}n=l}}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o](i,i.exports,n),i.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(966)}()},9660:e=>{window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=22)}([function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){var o=n(2),r=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void c(t.promise,e)}l(t.promise,o)}else(1===e._state?l:c)(t.promise,e._value)}))):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void p((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){c(e,t)}var o,r}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,l(t,e))}),(function(e){n||(n=!0,c(t,e))}))}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new d(e,t,n)),n},a.prototype.finally=o.a,a.all=function(e){return new a((function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var r=o.length;function i(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){i(e,t)}),n)}o[e]=a,0==--r&&t(o)}catch(e){n(e)}}for(var a=0;a<o.length;a++)i(a,o[a])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t.a=a}).call(this,n(5).setImmediate)},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(4);var r,i,a,s,l,c,u,d=n(8),p=(i=function(e){return new Promise((function(t,n){e=s(e),(e=l(e)).beforeSend&&e.beforeSend();var o=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");o.open(e.method,e.url),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e.headers).forEach((function(t){var n=e.headers[t];o.setRequestHeader(t,n)}));var r=e.ratio;o.upload.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*r/100);e.progress(Math.min(o,100))}),!1),o.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*(100-r)/100)+r;e.progress(Math.min(o,100))}),!1),o.onreadystatechange=function(){if(4===o.readyState){var e=o.response;try{e=JSON.parse(e)}catch(e){}var r=d.parseHeaders(o.getAllResponseHeaders()),i={body:e,code:o.status,headers:r};u(o.status)?t(i):n(i)}},o.send(e.data)}))},a=function(e){return e.method="POST",i(e)},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==o(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(r).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},l=function(e){switch(e.method){case"GET":var t=c(e.data,r.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||r.JSON}(e);(d.isFormData(e.data)||d.isFormElement(e.data))&&(n=r.FORM),e.data=c(e.data,n),n!==p.contentType.FORM&&(e.headers["content-type"]=n)}return e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case r.URLENCODED:return d.urlEncode(e);case r.JSON:return d.jsonEncode(e);case r.FORM:return d.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:r={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),d.selectFiles(e).then((function(t){for(var n=new FormData,o=0;o<t.length;o++)n.append(e.fieldName,t[o],t[o].name);d.isObject(e.data)&&Object.keys(e.data).forEach((function(t){var o=e.data[t];n.append(t,o)}));var r=e.beforeSend;return e.beforeSend=function(){return r(t)},e.data=n,a(e)}))},selectFiles:function(e){return delete(e=s(e)).beforeSend,d.selectFiles(e)}});e.exports=p},function(e,t,n){"use strict";n.r(t);var o=n(1);window.Promise=window.Promise||o.a},function(e,t,n){(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var o,r,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),o=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},o=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,o=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[l]=r,o(l),l++},p.clearImmediate=f}function f(e){delete c[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(7))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,c=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=n(9);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return(t=[{key:"urlEncode",value:function(e){return r(e)}},{key:"jsonEncode",value:function(e){return JSON.stringify(e)}},{key:"formEncode",value:function(e){if(this.isFormData(e))return e;if(this.isFormElement(e))return new FormData(e);if(this.isObject(e)){var t=new FormData;return Object.keys(e).forEach((function(n){var o=e[n];t.append(n,o)})),t}throw new Error("`data` must be an instance of Object, FormData or <FORM> HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var o=document.createElement("INPUT");o.type="file",e.multiple&&o.setAttribute("multiple","multiple"),e.accept&&o.setAttribute("accept",e.accept),o.style.display="none",document.body.appendChild(o),o.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(o)}),!1),o.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),o=t.shift(),r=t.join(": ");o&&(n[o]=r)})),n}}])&&o(e,t),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},o=function(e,t,r,i){return t=t||null,r=r||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}(Object.keys(e).map((function(a){var s,l,c=a;if(i&&(c=i+"["+c+"]"),"object"==typeof e[a]&&null!==e[a])s=o(e[a],null,r,c);else{t&&(l=c,c=!isNaN(parseFloat(l))&&isFinite(l)?t+Number(c):c);var u=e[a];u=(u=0===(u=!1===(u=!0===u?"1":u)?"0":u)?"0":u)||"",s=n(c)+"="+n(u)}return s}))).join(r).replace(/[!'()*]/g,""):""};e.exports=o}])},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){var o=n(3);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t,n){var o=n(16),r=n(17),i=n(4),a=n(18);e.exports=function(e){return o(e)||r(e)||i(e)||a()}},function(e,t){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.15 13.628A7.749 7.749 0 0 0 10 17.75a7.74 7.74 0 0 0 6.305-3.242l-2.387-2.127-2.765 2.244-4.389-4.496-3.614 3.5zm-.787-2.303l4.446-4.371 4.52 4.63 2.534-2.057 3.533 2.797c.23-.734.354-1.514.354-2.324a7.75 7.75 0 1 0-15.387 1.325zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"></path><path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="24" viewBox="0 -960 960 960" width="24"><path d="M363.077-406.154h373.844L612.769-569.23l-95.078 121.539-62.769-77.693-91.845 119.23Zm-40.769 146.153q-30.308 0-51.307-21-21-21-21-51.308v-455.382q0-30.308 21-51.308 20.999-21 51.307-21h455.383q30.307 0 51.307 21 21 21 21 51.308v455.382q0 30.308-21 51.308t-51.307 21H322.308Zm0-59.999h455.383q4.615 0 8.462-3.846 3.846-3.847 3.846-8.463v-455.382q0-4.616-3.846-8.463-3.847-3.846-8.462-3.846H322.308q-4.616 0-8.462 3.846-3.847 3.847-3.847 8.463v455.382q0 4.616 3.847 8.463 3.846 3.846 8.462 3.846ZM182.309-120.003q-30.307 0-51.307-21-21-21-21-51.307v-515.381h59.999v515.381q0 4.616 3.846 8.462 3.847 3.847 8.462 3.847h515.382v59.998H182.309ZM309.999-800v480-480Z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="24" height="24" viewBox="0 -960 960 960"><path d="M142.309-220.001q-29.826 0-51.067-21.241-21.24-21.24-21.24-51.067v-375.382q0-29.827 21.24-51.067 21.241-21.241 51.067-21.241h375.383q29.827 0 51.067 21.241 21.24 21.24 21.24 51.067v375.382q0 29.827-21.24 51.067-21.24 21.241-51.067 21.241H142.309ZM706.343-520q-15.652 0-25.998-10.346-10.346-10.346-10.346-25.998v-147.311q0-15.651 10.346-25.997 10.346-10.347 25.998-10.347h147.311q15.652 0 25.998 10.347 10.346 10.346 10.346 25.997v147.311q0 15.652-10.346 25.998Q869.306-520 853.654-520H706.343Zm23.655-59.999h100.001V-680H729.998v100.001ZM142.309-280h375.383q5.385 0 8.847-3.462 3.462-3.462 3.462-8.847v-375.382q0-5.385-3.462-8.847-3.462-3.462-8.847-3.462H142.309q-5.385 0-8.846 3.462-3.462 3.462-3.462 8.847v375.382q0 5.385 3.462 8.847 3.461 3.462 8.846 3.462Zm31.538-81.923h312.307l-101.153-135-75 100-55-73-81.154 108Zm532.496 141.922q-15.652 0-25.998-10.347-10.346-10.346-10.346-25.997v-147.311q0-15.652 10.346-25.998Q690.691-440 706.343-440h147.311q15.652 0 25.998 10.346 10.346 10.346 10.346 25.998v147.311q0 15.651-10.346 25.997-10.346 10.347-25.998 10.347H706.343ZM729.998-280h100.001v-100.001H729.998V-280Zm-599.997 0v-400 400Zm599.997-299.999V-680v100.001Zm0 299.999v-100.001V-280Z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="20" viewBox="0 -960 960 960" width="20"><path d="M360-384h384L618-552l-90 120-66-88-102 136Zm-48 144q-29.7 0-50.85-21.15Q240-282.3 240-312v-480q0-29.7 21.15-50.85Q282.3-864 312-864h480q29.7 0 50.85 21.15Q864-821.7 864-792v480q0 29.7-21.15 50.85Q821.7-240 792-240H312Zm0-72h480v-480H312v480ZM168-96q-29.7 0-50.85-21.15Q96-138.3 96-168v-552h72v552h552v72H168Zm144-696v480-480Z"></path></svg>'},function(e,t,n){var o=n(19),r=n(20),i=n(4),a=n(21);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||a()}},function(e,t,n){var o=n(13),r=n(14);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var i=(o(r,{insert:"head",singleton:!1}),r.locals?r.locals:{});e.exports=i},function(e,t,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},o=[],r=0;r<e.length;r++){var i=e[r],l=t.base?i[0]+t.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:u,updater:g(p,t),references:1}),o.push(u)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var h=null,m=0;function g(e,t){var n,o,r;if(t.singleton){var i=m++;n=h||(h=c(t)),o=p.bind(null,n,i,!1),r=p.bind(null,n,i,!0)}else n=c(t),o=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=s(n[o]);a[r].references--}for(var i=l(e,t),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=i}}}},function(e,t,n){(t=n(15)(!1)).push([e.i,'.image-gallery {\r\n --bg-color: #cdd1e0;\r\n --front-color: #388ae5;\r\n --border-color: #e8e8eb;\r\n}\r\n\r\n .image-gallery__container {\r\n background: black;\r\n margin-bottom: 10px;\r\n padding: 5px;\r\n }\r\n\r\n .image-gallery__controls {\r\n display: flex;\r\n gap: 10px;\r\n padding: 8px 2px 3px;\r\n }\r\n\r\n .image-gallery__items {\r\n display: grid;\r\n gap: 10px;\r\n grid-template-columns: 1fr 1fr 1fr;\r\n padding: 10px;\r\n background-color: #222222;\r\n }\r\n\r\n .image-gallery__items:empty {\r\n display: none;\r\n }\r\n\r\n .image-gallery__preloaders {\r\n display: flex;\r\n flex-grow: 1;\r\n flex-wrap: nowrap;\r\n padding: 5px;\r\n gap: 8px;\r\n overflow: hidden;\r\n }\r\n\r\n .image-gallery__preloader {\r\n min-width: 30px;\r\n height: 30px;\r\n border-radius: 50%;\r\n background-size: cover;\r\n position: relative;\r\n background-color: var(--bg-color);\r\n background-position: center center;\r\n }\r\n\r\n .image-gallery__preloader::after {\r\n content: "";\r\n position: absolute;\r\n z-index: 3;\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 50%;\r\n border: 2px solid var(--bg-color);\r\n border-top-color: var(--front-color);\r\n left: 50%;\r\n top: 50%;\r\n margin-top: -15px;\r\n margin-left: -15px;\r\n animation: image-preloader-spin 2s infinite linear;\r\n box-sizing: border-box;\r\n }\r\n\r\n .image-gallery__image {\r\n position: relative;\r\n overflow: hidden;\r\n aspect-ratio: 16 / 9;\r\n cursor: move;\r\n user-select: none;\r\n background-color: black;\r\n border-radius: 3px;\r\n padding: 5px;\r\n }\r\n\r\n .image-gallery__image.sortable-ghost {\r\n opacity: .75;\r\n }\r\n\r\n .image-gallery__image--empty,\r\n .image-gallery__image--loading {\r\n display: none;\r\n }\r\n\r\n .image-gallery__image-picture {\r\n border-radius: 3px;\r\n max-width: 100%;\r\n height: 100%;\r\n display: block;\r\n margin: auto;\r\n object-fit: cover;\r\n pointer-events: none;\r\n }\r\n\r\n .image-gallery__image-trash {\r\n position: absolute;\r\n top: 3px;\r\n right: 3px;\r\n cursor: pointer;\r\n color: #fff;\r\n font-size: 18px;\r\n background-color: rgba(0, 0, 0, .25);\r\n line-height: 1;\r\n padding: 6px 8px;\r\n border-radius: 3px;\r\n transition: background-color .1s;\r\n }\r\n\r\n .image-gallery__image-trash:hover {\r\n background-color: rgba(0, 0, 0, .5);\r\n }\r\n\r\n .image-gallery__counter {\r\n display: flex;\r\n align-items: center;\r\n color: gray;\r\n font-size: 14px;\r\n margin-right: 6px;\r\n }\r\n\r\n .image-gallery__caption[contentEditable="true"][data-placeholder]::before {\r\n position: absolute !important;\r\n content: attr(data-placeholder);\r\n color: #707684;\r\n font-weight: normal;\r\n display: none;\r\n }\r\n\r\n .image-gallery__caption[contentEditable="true"][data-placeholder]:empty::before {\r\n display: block;\r\n }\r\n\r\n .image-gallery__caption[contentEditable="true"][data-placeholder]:empty:focus::before {\r\n display: none;\r\n }\r\n\r\n .image-gallery__caption {\r\n margin-bottom: 10px;\r\n }\r\n\r\n .image-gallery .cdx-button {\r\n height: 40px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 12px;\r\n gap: 5px;\r\n white-space: nowrap;\r\n }\r\n\r\n /**\r\n * Tunes\r\n * ----------------\r\n */\r\n\r\n .image-gallery__tune-wrapper {\r\n display: flex;\r\n gap: 6px;\r\n margin: 6px 0;\r\n }\r\n\r\n .image-gallery__tune-wrapper:first-child {\r\n margin-top: 0;\r\n }\r\n\r\n .image-gallery__tune-wrapper:last-child {\r\n margin-bottom: 0;\r\n }\r\n\r\n .image-gallery__tune {\r\n flex-grow: 1;\r\n padding: 6px;\r\n color: var(--color-text-primary);\r\n }\r\n\r\n .image-gallery__tune.active {\r\n background: var(--color-background-icon-active);\r\n color: var(--color-text-icon-active);\r\n border-color: var(--color-text-icon-active);\r\n }\r\n\r\n .image-gallery__tune svg {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n@keyframes image-preloader-spin {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}',""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o,r,i=e[1]||"",a=e[3];if(!a)return i;if(t&&"function"==typeof btoa){var s=(n=a,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([s]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);o&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){var o=n(3);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Lt}));var o=n(1),r=n.n(o),i=n(0),a=n.n(i),s=(n(12),n(5)),l=n.n(s);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var g=m(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),y=m(/Edge/i),v=m(/firefox/i),b=m(/safari/i)&&!m(/chrome/i)&&!m(/android/i),w=m(/iP(ad|od|hone)/i),k=m(/chrome/i)&&m(/android/i),x={capture:!1,passive:!1};function S(e,t,n){e.addEventListener(t,n,!g&&x)}function E(e,t,n){e.removeEventListener(t,n,!g&&x)}function C(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function _(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function T(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&C(e,t):C(e,t))||o&&e===n)return e;if(e===n)break}while(e=_(e))}return null}var O,P=/\s+/g;function M(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(P," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(P," ")}}function L(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function B(e,t){var n="";if("string"==typeof e)n=e;else do{var o=L(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function I(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function A(){return document.scrollingElement||document.documentElement}function j(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,a,s,l,c,u,d;if(e!==window&&e.parentNode&&e!==A()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,c=i.right,u=i.height,d=i.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!g))do{if(r&&r.getBoundingClientRect&&("none"!==L(r,"transform")||n&&"static"!==L(r,"position"))){var p=r.getBoundingClientRect();a-=p.top+parseInt(L(r,"border-top-width")),s-=p.left+parseInt(L(r,"border-left-width")),l=a+i.height,c=s+i.width;break}}while(r=r.parentNode);if(o&&e!==window){var f=B(r||e),h=f&&f.a,m=f&&f.d;f&&(l=(a/=m)+(u/=m),c=(s/=h)+(d/=h))}return{top:a,left:s,bottom:l,right:c,width:d,height:u}}}function R(e,t,n){for(var o=U(e,!0),r=j(e)[t];o;){var i=j(o)[n];if(!("top"===n||"left"===n?r>=i:r<=i))return o;if(o===A())break;o=U(o,!1)}return!1}function D(e,t,n,o){for(var r=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==$e.ghost&&(o||a[i]!==$e.dragged)&&T(a[i],n.draggable,e,!1)){if(r===t)return a[i];r++}i++}return null}function N(e,t){for(var n=e.lastElementChild;n&&(n===$e.ghost||"none"===L(n,"display")||t&&!C(n,t));)n=n.previousElementSibling;return n||null}function F(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===$e.clone||t&&!C(e,t)||n++;return n}function H(e){var t=0,n=0,o=A();if(e)do{var r=B(e),i=r.a,a=r.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function U(e,t){if(!e||!e.getBoundingClientRect)return A();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=L(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(o||t)return n;o=!0}}}while(n=n.parentNode);return A()}function z(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function V(e,t){return function(){if(!O){var n=arguments,o=this;1===n.length?e.call(o,n[0]):e.apply(o,n),O=setTimeout((function(){O=void 0}),t)}}}function q(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function $(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var W="Sortable"+(new Date).getTime();function Y(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==L(e,"display")&&e!==$e.ghost){t.push({target:e,rect:j(e)});var n=u({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=B(e,!0);o&&(n.top-=o.f,n.left-=o.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var r=!1,i=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,s=j(n),l=n.prevFromRect,c=n.prevToRect,u=e.rect,d=B(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&z(l,s)&&!z(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(t=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,l,c,o.options)),z(s,a)||(n.prevFromRect=a,n.prevToRect=s,t||(t=o.options.animation),o.animate(n,u,s,t)),t&&(r=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),r?e=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,o){if(o){L(e,"transition",""),L(e,"transform","");var r=B(this.el),i=r&&r.a,a=r&&r.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,L(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),L(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),L(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){L(e,"transition",""),L(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}}var X=[],K={initializeByDefault:!0},Q={mount:function(e){for(var t in K)K.hasOwnProperty(t)&&!(t in e)&&(e[t]=K[t]);X.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),X.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";X.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](u({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](u({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in X.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var i=new o(e,t,e.options);i.sortable=e,i.options=e.options,e[r]=i,f(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);void 0!==i&&(e.options[r]=i)}},getEventProperties:function(e,t){var n={};return X.forEach((function(o){"function"==typeof o.eventProperties&&f(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return X.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};function G(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,i=e.cloneEl,a=e.toEl,s=e.fromEl,l=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,p=e.newDraggableIndex,f=e.originalEvent,h=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[W]){var v,b=t.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||g||y?(v=document.createEvent("Event")).initEvent(o,!0,!0):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=s||n,v.item=r||n,v.clone=i,v.oldIndex=l,v.newIndex=c,v.oldDraggableIndex=d,v.newDraggableIndex=p,v.originalEvent=f,v.pullMode=h?h.lastPutMode:void 0;var k=u(u({},m),Q.getEventProperties(o,t));for(var x in k)v[x]=k[x];n&&n.dispatchEvent(v),b[w]&&b[w].call(t,v)}}var Z=["evt"],J=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=h(n,Z);Q.pluginEvent.bind($e)(e,t,u({dragEl:te,parentEl:ne,ghostEl:oe,rootEl:re,nextEl:ie,lastDownEl:ae,cloneEl:se,cloneHidden:le,dragStarted:ke,putSortable:he,activeSortable:$e.active,originalEvent:o,oldIndex:ce,oldDraggableIndex:de,newIndex:ue,newDraggableIndex:pe,hideGhostForTarget:Ue,unhideGhostForTarget:ze,cloneNowHidden:function(){le=!0},cloneNowShown:function(){le=!1},dispatchSortableEvent:function(e){ee({sortable:t,name:e,originalEvent:o})}},r))};function ee(e){G(u({putSortable:he,cloneEl:se,targetEl:te,rootEl:re,oldIndex:ce,oldDraggableIndex:de,newIndex:ue,newDraggableIndex:pe},e))}var te,ne,oe,re,ie,ae,se,le,ce,ue,de,pe,fe,he,me,ge,ye,ve,be,we,ke,xe,Se,Ee,Ce,_e=!1,Te=!1,Oe=[],Pe=!1,Me=!1,Le=[],Be=!1,Ie=[],Ae="undefined"!=typeof document,je=w,Re=y||g?"cssFloat":"float",De=Ae&&!k&&!w&&"draggable"in document.createElement("div"),Ne=function(){if(Ae){if(g)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Fe=function(e,t){var n=L(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=D(e,0,t),i=D(e,1,t),a=r&&L(r),s=i&&L(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+j(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+j(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===n[Re]||i&&"none"===n[Re]&&l+c>o)?"vertical":"horizontal"},He=function(e){function t(e,n){return function(o,r,i,a){var s=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,i,a),n)(o,r,i,a);var l=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==d(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Ue=function(){!Ne&&oe&&L(oe,"display","none")},ze=function(){!Ne&&oe&&L(oe,"display","")};Ae&&!k&&document.addEventListener("click",(function(e){if(Te)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Te=!1,!1}),!0);var Ve=function(e){if(te){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,Oe.some((function(e){var t=e[W].options.emptyInsertThreshold;if(t&&!N(e)){var n=j(e),o=r>=n.left-t&&r<=n.right+t,s=i>=n.top-t&&i<=n.bottom+t;return o&&s?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[W]._onDragOver(n)}}var r,i,a},qe=function(e){te&&te.parentNode[W]._isOutsideThisEl(e.target)};function $e(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=f({},t),e[W]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==$e.supportPointer&&"PointerEvent"in window&&!b,emptyInsertThreshold:5};for(var o in Q.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var r in He(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&De,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?S(e,"pointerdown",this._onTapStart):(S(e,"mousedown",this._onTapStart),S(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(S(e,"dragover",this),S(e,"dragenter",this)),Oe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),f(this,Y())}function We(e,t,n,o,r,i,a,s){var l,c,u=e[W],d=u.options.onMove;return!window.CustomEvent||g||y?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=o,l.related=r||t,l.relatedRect=i||j(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d&&(c=d.call(u,l,a)),c}function Ye(e){e.draggable=!1}function Xe(){Be=!1}function Ke(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Qe(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}$e.prototype={constructor:$e,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(xe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,te):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(function(e){Ie.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Ie.push(o)}}(n),!te&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!b||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=T(s,o.draggable,n,!1))&&s.animated||ae===s)){if(ce=F(s),de=F(s,o.draggable),"function"==typeof c){if(c.call(this,e,s,this))return ee({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),J("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=T(l,o.trim(),n,!1))return ee({sortable:t,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),J("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!T(l,o.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,a=r.options,s=i.ownerDocument;if(n&&!te&&n.parentNode===i){var l=j(n);if(re=i,ne=(te=n).parentNode,ie=te.nextSibling,ae=n,fe=a.group,$e.dragged=te,me={target:te,clientX:(t||e).clientX,clientY:(t||e).clientY},be=me.clientX-l.left,we=me.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,te.style["will-change"]="all",o=function(){J("delayEnded",r,{evt:e}),$e.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!v&&r.nativeDraggable&&(te.draggable=!0),r._triggerDragStart(e,t),ee({sortable:r,name:"choose",originalEvent:e}),M(te,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){I(te,e.trim(),Ye)})),S(s,"dragover",Ve),S(s,"mousemove",Ve),S(s,"touchmove",Ve),S(s,"mouseup",r._onDrop),S(s,"touchend",r._onDrop),S(s,"touchcancel",r._onDrop),v&&this.nativeDraggable&&(this.options.touchStartThreshold=4,te.draggable=!0),J("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(y||g))o();else{if($e.eventCanceled)return void this._onDrop();S(s,"mouseup",r._disableDelayedDrag),S(s,"touchend",r._disableDelayedDrag),S(s,"touchcancel",r._disableDelayedDrag),S(s,"mousemove",r._delayedDragTouchMoveHandler),S(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&S(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){te&&Ye(te),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?S(document,"pointermove",this._onTouchMove):S(document,t?"touchmove":"mousemove",this._onTouchMove):(S(te,"dragend",this),S(re,"dragstart",this._onDragStart));try{document.selection?Qe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(_e=!1,re&&te){J("dragStarted",this,{evt:t}),this.nativeDraggable&&S(document,"dragover",qe);var n=this.options;!e&&M(te,n.dragClass,!1),M(te,n.ghostClass,!0),$e.active=this,e&&this._appendGhost(),ee({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ge){this._lastX=ge.clientX,this._lastY=ge.clientY,Ue();for(var e=document.elementFromPoint(ge.clientX,ge.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ge.clientX,ge.clientY))!==t;)t=e;if(te.parentNode[W]._isOutsideThisEl(e),t)do{if(t[W]&&t[W]._onDragOver({clientX:ge.clientX,clientY:ge.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);ze()}},_onTouchMove:function(e){if(me){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=oe&&B(oe,!0),a=oe&&i&&i.a,s=oe&&i&&i.d,l=je&&Ce&&H(Ce),c=(r.clientX-me.clientX+o.x)/(a||1)+(l?l[0]-Le[0]:0)/(a||1),u=(r.clientY-me.clientY+o.y)/(s||1)+(l?l[1]-Le[1]:0)/(s||1);if(!$e.active&&!_e){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(oe){i?(i.e+=c-(ye||0),i.f+=u-(ve||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");L(oe,"webkitTransform",d),L(oe,"mozTransform",d),L(oe,"msTransform",d),L(oe,"transform",d),ye=c,ve=u,ge=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!oe){var e=this.options.fallbackOnBody?document.body:re,t=j(te,!0,je,!0,e),n=this.options;if(je){for(Ce=e;"static"===L(Ce,"position")&&"none"===L(Ce,"transform")&&Ce!==document;)Ce=Ce.parentNode;Ce!==document.body&&Ce!==document.documentElement?(Ce===document&&(Ce=A()),t.top+=Ce.scrollTop,t.left+=Ce.scrollLeft):Ce=A(),Le=H(Ce)}M(oe=te.cloneNode(!0),n.ghostClass,!1),M(oe,n.fallbackClass,!0),M(oe,n.dragClass,!0),L(oe,"transition",""),L(oe,"transform",""),L(oe,"box-sizing","border-box"),L(oe,"margin",0),L(oe,"top",t.top),L(oe,"left",t.left),L(oe,"width",t.width),L(oe,"height",t.height),L(oe,"opacity","0.8"),L(oe,"position",je?"absolute":"fixed"),L(oe,"zIndex","100000"),L(oe,"pointerEvents","none"),$e.ghost=oe,e.appendChild(oe),L(oe,"transform-origin",be/parseInt(oe.style.width)*100+"% "+we/parseInt(oe.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;J("dragStart",this,{evt:e}),$e.eventCanceled?this._onDrop():(J("setupClone",this),$e.eventCanceled||((se=$(te)).removeAttribute("id"),se.draggable=!1,se.style["will-change"]="",this._hideClone(),M(se,this.options.chosenClass,!1),$e.clone=se),n.cloneId=Qe((function(){J("clone",n),$e.eventCanceled||(n.options.removeCloneOnHide||re.insertBefore(se,te),n._hideClone(),ee({sortable:n,name:"clone"}))})),!t&&M(te,r.dragClass,!0),t?(Te=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,te)),S(document,"drop",n),L(te,"transform","translateZ(0)")),_e=!0,n._dragStartId=Qe(n._dragStarted.bind(n,t,e)),S(document,"selectstart",n),ke=!0,b&&L(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,i=this.el,a=e.target,s=this.options,l=s.group,c=$e.active,d=fe===l,p=s.sort,f=he||c,h=this,m=!1;if(!Be){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=T(a,s.draggable,i,!0),I("dragOver"),$e.eventCanceled)return m;if(te.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return H(!1);if(Te=!1,c&&!s.disabled&&(d?p||(o=ne!==re):he===this||(this.lastPutMode=fe.checkPull(this,c,te,e))&&l.checkPut(this,c,te,e))){if(r="vertical"===this._getDirection(e,a),t=j(te),I("dragOverValid"),$e.eventCanceled)return m;if(o)return ne=re,A(),this._hideClone(),I("revert"),$e.eventCanceled||(ie?re.insertBefore(te,ie):re.appendChild(te)),H(!0);var g=N(i,s.draggable);if(!g||function(e,t,n){var o=j(N(n.el,n.options.draggable));return t?e.clientX>o.right+10||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+10}(e,r,this)&&!g.animated){if(g===te)return H(!1);if(g&&i===e.target&&(a=g),a&&(n=j(a)),!1!==We(re,i,te,t,a,n,e,!!a))return A(),g&&g.nextSibling?i.insertBefore(te,g.nextSibling):i.appendChild(te),ne=i,U(),H(!0)}else if(g&&function(e,t,n){var o=j(D(n.el,0,n.options,!0));return t?e.clientX<o.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,r,this)){var y=D(i,0,s,!0);if(y===te)return H(!1);if(n=j(a=y),!1!==We(re,i,te,t,a,n,e,!1))return A(),i.insertBefore(te,y),ne=i,U(),H(!0)}else if(a.parentNode===i){n=j(a);var v,b,w,k=te.parentNode!==i,x=!function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return o===a||r===s||o+i/2===a+l/2}(te.animated&&te.toRect||t,a.animated&&a.toRect||n,r),S=r?"top":"left",E=R(a,"top","top")||R(te,"top","top"),C=E?E.scrollTop:void 0;if(xe!==a&&(b=n[S],Pe=!1,Me=!x&&s.invertSwap||k),0!==(v=function(e,t,n,o,r,i,a,s){var l=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,p=!1;if(!a)if(s&&Ee<c*r){if(!Pe&&(1===Se?l>u+c*i/2:l<d-c*i/2)&&(Pe=!0),Pe)p=!0;else if(1===Se?l<u+Ee:l>d-Ee)return-Se}else if(l>u+c*(1-r)/2&&l<d-c*(1-r)/2)return function(e){return F(te)<F(e)?1:-1}(t);return(p=p||a)&&(l<u+c*i/2||l>d-c*i/2)?l>u+c/2?1:-1:0}(e,a,n,r,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Me,xe===a))){var _=F(te);do{_-=v,w=ne.children[_]}while(w&&("none"===L(w,"display")||w===oe))}if(0===v||w===a)return H(!1);xe=a,Se=v;var O=a.nextElementSibling,P=!1,B=We(re,i,te,t,a,n,e,P=1===v);if(!1!==B)return 1!==B&&-1!==B||(P=1===B),Be=!0,setTimeout(Xe,30),A(),P&&!O?i.appendChild(te):a.parentNode.insertBefore(te,P?O:a),E&&q(E,0,C-E.scrollTop),ne=te.parentNode,void 0===b||Me||(Ee=Math.abs(b-j(a)[S])),U(),H(!0)}if(i.contains(te))return H(!1)}return!1}function I(s,l){J(s,h,u({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:a,completed:H,onMove:function(n,o){return We(re,i,te,t,n,j(n),e,o)},changed:U},l))}function A(){I("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function H(t){return I("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(h),h!==f&&(M(te,he?he.options.ghostClass:c.options.ghostClass,!1),M(te,s.ghostClass,!0)),he!==h&&h!==$e.active?he=h:h===$e.active&&he&&(he=null),f===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){I("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===te&&!te.animated||a===i&&!a.animated)&&(xe=null),s.dragoverBubble||e.rootEl||a===document||(te.parentNode[W]._isOutsideThisEl(e.target),!t&&Ve(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function U(){ue=F(te),pe=F(te,s.draggable),ee({sortable:h,name:"change",toEl:i,newIndex:ue,newDraggableIndex:pe,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",Ve),E(document,"mousemove",Ve),E(document,"touchmove",Ve)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ue=F(te),pe=F(te,n.draggable),J("drop",this,{evt:e}),ne=te&&te.parentNode,ue=F(te),pe=F(te,n.draggable),$e.eventCanceled||(_e=!1,Me=!1,Pe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&L(document.body,"user-select",""),L(te,"transform",""),e&&(ke&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),oe&&oe.parentNode&&oe.parentNode.removeChild(oe),(re===ne||he&&"clone"!==he.lastPutMode)&&se&&se.parentNode&&se.parentNode.removeChild(se),te&&(this.nativeDraggable&&E(te,"dragend",this),Ye(te),te.style["will-change"]="",ke&&!_e&&M(te,he?he.options.ghostClass:this.options.ghostClass,!1),M(te,this.options.chosenClass,!1),ee({sortable:this,name:"unchoose",toEl:ne,newIndex:null,newDraggableIndex:null,originalEvent:e}),re!==ne?(ue>=0&&(ee({rootEl:ne,name:"add",toEl:ne,fromEl:re,originalEvent:e}),ee({sortable:this,name:"remove",toEl:ne,originalEvent:e}),ee({rootEl:ne,name:"sort",toEl:ne,fromEl:re,originalEvent:e}),ee({sortable:this,name:"sort",toEl:ne,originalEvent:e})),he&&he.save()):ue!==ce&&ue>=0&&(ee({sortable:this,name:"update",toEl:ne,originalEvent:e}),ee({sortable:this,name:"sort",toEl:ne,originalEvent:e})),$e.active&&(null!=ue&&-1!==ue||(ue=ce,pe=de),ee({sortable:this,name:"end",toEl:ne,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){J("nulling",this),re=te=ne=oe=ie=se=ae=le=me=ge=ke=ue=pe=ce=de=xe=Se=he=fe=$e.dragged=$e.ghost=$e.clone=$e.active=null,Ie.forEach((function(e){e.checked=!0})),Ie.length=ye=ve=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":te&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;o<r;o++)T(e=n[o],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Ke(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var r=o.children[t];T(r,this.options.draggable,o,!1)&&(n[e]=r)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return T(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Q.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&He(n)},destroy:function(){J("destroy",this);var e=this.el;e[W]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Oe.splice(Oe.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!le){if(J("hideClone",this),$e.eventCanceled)return;L(se,"display","none"),this.options.removeCloneOnHide&&se.parentNode&&se.parentNode.removeChild(se),le=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(le){if(J("showClone",this),$e.eventCanceled)return;te.parentNode!=re||this.options.group.revertClone?ie?re.insertBefore(se,ie):re.appendChild(se):re.insertBefore(se,te),this.options.group.revertClone&&this.animate(te,se),L(se,"display",""),le=!1}}else this._hideClone()}},Ae&&S(document,"touchmove",(function(e){($e.active||_e)&&e.cancelable&&e.preventDefault()})),$e.utils={on:S,off:E,css:L,find:I,is:function(e,t){return!!T(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:V,closest:T,toggleClass:M,clone:$,index:F,nextTick:Qe,cancelNextTick:Ge,detectDirection:Fe,getChild:D},$e.get=function(e){return e[W]},$e.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&($e.utils=u(u({},$e.utils),e.utils)),Q.mount(e)}))},$e.create=function(e,t){return new $e(e,t)},$e.version="1.15.0";var Ze,Je,et,tt,nt,ot,rt=[],it=!1;function at(){rt.forEach((function(e){clearInterval(e.pid)})),rt=[]}function st(){clearInterval(ot)}var lt=V((function(e,t,n,o){if(t.scroll){var r,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=A(),u=!1;Je!==n&&(Je=n,at(),Ze=t.scroll,r=t.scrollFn,!0===Ze&&(Ze=U(n,!0)));var d=0,p=Ze;do{var f=p,h=j(f),m=h.top,g=h.bottom,y=h.left,v=h.right,b=h.width,w=h.height,k=void 0,x=void 0,S=f.scrollWidth,E=f.scrollHeight,C=L(f),_=f.scrollLeft,T=f.scrollTop;f===c?(k=b<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),x=w<E&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(k=b<S&&("auto"===C.overflowX||"scroll"===C.overflowX),x=w<E&&("auto"===C.overflowY||"scroll"===C.overflowY));var O=k&&(Math.abs(v-i)<=s&&_+b<S)-(Math.abs(y-i)<=s&&!!_),P=x&&(Math.abs(g-a)<=s&&T+w<E)-(Math.abs(m-a)<=s&&!!T);if(!rt[d])for(var M=0;M<=d;M++)rt[M]||(rt[M]={});rt[d].vx==O&&rt[d].vy==P&&rt[d].el===f||(rt[d].el=f,rt[d].vx=O,rt[d].vy=P,clearInterval(rt[d].pid),0==O&&0==P||(u=!0,rt[d].pid=setInterval(function(){o&&0===this.layer&&$e.active._onTouchMove(nt);var t=rt[this.layer].vy?rt[this.layer].vy*l:0,n=rt[this.layer].vx?rt[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call($e.dragged.parentNode[W],n,t,e,nt,rt[this.layer].el)||q(rt[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=U(p,!1)));it=u}}),30),ct=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||r;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function ut(){}function dt(){}ut.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=D(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:ct},f(ut,{pluginName:"revertOnSpill"}),dt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ct},f(dt,{pluginName:"removeOnSpill"}),$e.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):this.options.supportPointer?S(document,"pointermove",this._handleFallbackAutoScroll):t.touches?S(document,"touchmove",this._handleFallbackAutoScroll):S(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),st(),at(),clearTimeout(O),O=void 0},nulling:function(){nt=Je=Ze=it=ot=et=tt=null,rt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(o,r);if(nt=e,t||this.options.forceAutoScrollFallback||y||g||b){lt(e,this.options,i,t);var a=U(i,!0);!it||ot&&o===et&&r===tt||(ot&&st(),ot=setInterval((function(){var i=U(document.elementFromPoint(o,r),!0);i!==a&&(a=i,at()),lt(e,n.options,i,t)}),10),et=o,tt=r)}else{if(!this.options.bubbleScroll||U(i,!0)===A())return void at();lt(e,this.options,U(i,!1),!1)}}},f(e,{pluginName:"scroll",initializeByDefault:!0})}),$e.mount(dt,ut);var pt=$e,ft=n(6),ht=n.n(ft),mt=n(7),gt=n.n(mt),yt=function(){function e(t){var n=this,o=t.api,i=t.config,a=t.onSelectFile,s=t.onDeleteFile,l=t.onMoveFile,c=t.readOnly;r()(this,e),this.api=o,this.config=i,this.onSelectFile=a,this.onDeleteFile=s,this.onMoveFile=l,this.readOnly=c,this.nodes={wrapper:vt("div",[this.CSS.baseClass,this.CSS.wrapper]),fileButton:this.createFileButton(),container:vt("div",this.CSS.container),itemsContainer:vt("div",this.CSS.itemsContainer),controls:vt("div",this.CSS.controls),preloaderContainer:vt("div",this.CSS.preloaderContainer),caption:vt("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly})},this.nodes.caption.dataset.placeholder=this.config.captionPlaceholder,this.nodes.controls.appendChild(this.nodes.preloaderContainer),this.config.maxElementCount&&(this.nodes.limitCounter=vt("div",this.CSS.limitCounter),this.nodes.controls.appendChild(this.nodes.limitCounter)),this.nodes.controls.appendChild(this.nodes.fileButton),this.nodes.container.appendChild(this.nodes.itemsContainer),this.nodes.container.appendChild(this.nodes.controls),this.nodes.wrapper.appendChild(this.nodes.container),this.nodes.wrapper.appendChild(this.nodes.caption),["dragenter","dragover","dragleave","drop"].forEach((function(e){n.nodes.itemsContainer.addEventListener(e,(function(e){e.preventDefault(),e.stopPropagation()}),!1)}))}return a()(e,[{key:"render",value:function(e){return this.nodes.wrapper}},{key:"onRendered",value:function(){var e=this;this.sortable||(this.sortable=new pt(this.nodes.itemsContainer,{handle:".".concat(this.CSS.imageContainer),filter:".".concat(this.CSS.trashButton),onStart:function(){e.nodes.itemsContainer.classList.add("".concat(e.CSS.itemsContainer,"--drag"))},onEnd:function(t){e.nodes.itemsContainer.classList.remove("".concat(e.CSS.itemsContainer,"--drag")),t.oldIndex!==t.newIndex&&e.onMoveFile(t.oldIndex,t.newIndex)}}))}},{key:"createFileButton",value:function(){var e=this,t=vt("div",[this.CSS.button]);return t.innerHTML=this.config.buttonContent||"".concat(ht.a," ").concat(this.api.i18n.t("Select an Image")),t.addEventListener("click",(function(){e.onSelectFile()})),t}},{key:"showFileButton",value:function(){this.nodes.fileButton.style.display=""}},{key:"hideFileButton",value:function(){this.nodes.fileButton.style.display="none"}},{key:"getPreloader",value:function(e){var t=vt("div",this.CSS.imagePreloader);this.nodes.preloaderContainer.append(t);var n=new FileReader;return n.readAsDataURL(e),n.onload=function(e){t.style.backgroundImage="url(".concat(e.target.result,")")},t}},{key:"removePreloader",value:function(e){e.remove()}},{key:"appendImage",value:function(t){var n=this,o=t.url,r=/\.mp4$/.test(o)?"VIDEO":"IMG",i={src:o},a="load";"VIDEO"===r&&(i.autoplay=!1,i.muted=!0,i.playsinline=!0,a="loadeddata");var s=vt("div",[this.CSS.imageContainer]),l=vt(r,this.CSS.imageEl,i);l.addEventListener(a,(function(){n.toggleStatus(s,e.status.FILLED)})),s.appendChild(l);var c=this.api.i18n.t("Delete"),u=vt("div",[this.CSS.trashButton],{innerHTML:gt.a,title:c});this.api.tooltip.onHover(u,c,{placement:"top"}),u.addEventListener("click",(function(){n.api.tooltip.hide();var e=Array.prototype.slice.call(n.nodes.itemsContainer.children).indexOf(s);-1!==e&&(n.nodes.itemsContainer.removeChild(s),n.onDeleteFile(e))})),s.appendChild(u),this.nodes.itemsContainer.append(s)}},{key:"fillCaption",value:function(e){this.nodes.caption&&(this.nodes.caption.innerHTML=e)}},{key:"toggleStatus",value:function(t,n){for(var o in e.status)Object.prototype.hasOwnProperty.call(e.status,o)&&t.classList.toggle("".concat(this.CSS.imageContainer,"--").concat(e.status[o]),n===e.status[o])}},{key:"updateLimitCounter",value:function(e,t){t&&this.nodes.limitCounter&&(0===e?this.nodes.limitCounter.style.display="none":(this.nodes.limitCounter.style.display=null,this.nodes.limitCounter.innerText="".concat(e," / ").concat(t)))}},{key:"CSS",get:function(){return{baseClass:this.api.styles.block,loading:this.api.styles.loader,input:this.api.styles.input,button:this.api.styles.button,wrapper:"image-gallery",container:"image-gallery__container",controls:"image-gallery__controls",limitCounter:"image-gallery__counter",itemsContainer:"image-gallery__items",imageContainer:"image-gallery__image",preloaderContainer:"image-gallery__preloaders",imagePreloader:"image-gallery__preloader",imageEl:"image-gallery__image-picture",trashButton:"image-gallery__image-trash",caption:"image-gallery__caption"}}}],[{key:"status",get:function(){return{EMPTY:"empty",UPLOADING:"loading",FILLED:"filled"}}}]),e}(),vt=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.createElement(e);for(var i in Array.isArray(n)?(t=r.classList).add.apply(t,l()(n)):n&&r.classList.add(n),o)r[i]=o[i];return r},bt=n(8),wt=n.n(bt),kt=n(9),xt=n.n(kt),St=function(){function e(t){var n=t.api,o=t.actions,i=t.onChange;r()(this,e),this.api=n,this.actions=o,this.onChange=i,this.buttons=[]}return a()(e,[{key:"render",value:function(t){var n=this,o=vt("div",this.CSS.wrapper);return this.buttons=[],e.tunes.concat(this.actions).forEach((function(e){var r=n.api.i18n.t(e.title),i=vt("div",[n.CSS.buttonBase,n.CSS.button],{innerHTML:e.icon,title:r});i.addEventListener("click",(function(){n.tuneClicked(e.name,e.action)})),i.dataset.tune=e.name,i.classList.toggle(n.CSS.buttonActive,t.style===e.name),n.buttons.push(i),n.api.tooltip.onHover(i,r,{placement:"top"}),o.appendChild(i)})),o}},{key:"tuneClicked",value:function(e,t){var n=this;if("function"==typeof t&&!t(e))return!1;this.buttons.forEach((function(t){t.classList.toggle(n.CSS.buttonActive,t.dataset.tune===e)})),this.onChange(e)}},{key:"CSS",get:function(){return{wrapper:"image-gallery__tune-wrapper",buttonBase:this.api.styles.button,button:"image-gallery__tune",buttonActive:"active"}}}],[{key:"tunes",get:function(){return[{name:"slider",icon:wt.a,title:"Slider"},{name:"fit",icon:xt.a,title:"Fit"}]}}]),e}(),Et=n(10),Ct=n.n(Et),_t=n(11),Tt=n.n(_t),Ot=n(2),Pt=n.n(Ot),Mt=function(){function e(t){var n=t.config;r()(this,e),this.config=n}return a()(e,[{key:"uploadSelectedFiles",value:function(e,t){var n=this,o=t.onPreview,r=t.onUpload,i=t.onError;Pt.a.selectFiles({accept:this.config.types,multiple:!0}).then((function(t){for(var a=0,s=function(){if(null!==e&&a==e)return"break";a++;var s,c=t[l],u=o(c),d=void 0;if(n.config.uploader&&"function"==typeof n.config.uploader.uploadByFile){var p=n.config.uploader.uploadByFile(c);(s=p)&&"function"==typeof s.then||console.warn("Custom uploader method uploadByFile should return a Promise"),d=p}else d=n.uploadByFile(c);d.then((function(e){r(e,u)})).catch((function(e){i(e,u)}))},l=0;l<t.length&&"break"!==s();l++);}))}},{key:"uploadByFile",value:function(e){var t=new FormData;return t.append(this.config.field,e),this.config.additionalRequestData&&Object.keys(this.config.additionalRequestData).length&&Object.entries(this.config.additionalRequestData).forEach((function(e){var n=Tt()(e,2),o=n[0],r=n[1];t.append(o,r)})),Pt.a.post({url:this.config.endpoints.byFile,data:t,type:Pt.a.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((function(e){return e.body}))}}]),e}(),Lt=function(){function e(t){var n=this,o=t.data,i=t.config,a=t.api,s=t.readOnly;r()(this,e),this.api=a,this.readOnly=s,this.config={endpoints:i.endpoints||"",additionalRequestData:i.additionalRequestData||{},additionalRequestHeaders:i.additionalRequestHeaders||{},field:i.field||"image",types:i.types||"image/*",captionPlaceholder:this.api.i18n.t(i.captionPlaceholder||"Gallery caption"),buttonContent:i.buttonContent||"",uploader:i.uploader||void 0,actions:i.actions||[],maxElementCount:i.maxElementCount||void 0},this.uploader=new Mt({config:this.config}),this.ui=new yt({api:a,config:this.config,onSelectFile:function(){var e=n.config.maxElementCount?n.config.maxElementCount-n._data.files.length:null;n.uploader.uploadSelectedFiles(e,{onPreview:function(e){return n.ui.getPreloader(e)},onUpload:function(e,t){n.onUpload(e,t)},onError:function(e,t){n.uploadingFailed(e,t)}})},onDeleteFile:function(e){n.deleteImage(e)},onMoveFile:function(e,t){n.moveImage(e,t)},readOnly:s}),this.tunes=new St({api:a,actions:this.config.actions,onChange:function(e){return n.styleToggled(e)}}),this._data={},this.data=o}return a()(e,null,[{key:"isReadOnlySupported",get:function(){return!0}},{key:"toolbox",get:function(){return{icon:Ct.a,title:"Gallery"}}}]),a()(e,[{key:"render",value:function(){return this.ui.render(this.data)}},{key:"rendered",value:function(){return this.checkMaxElemCount(),this.ui.onRendered()}},{key:"validate",value:function(e){return!(!e.files||!e.files.length)}},{key:"save",value:function(){var e=this.ui.nodes.caption;return this._data.caption=e.innerHTML,this.data}},{key:"renderSettings",value:function(){return this.tunes.render(this.data)}},{key:"appendImage",value:function(e){if(e&&e.url){if(this.config.maxElementCount&&this._data.files.length>=this.config.maxElementCount)return;this._data.files.push(e),this.ui.appendImage(e),this.checkMaxElemCount()}}},{key:"moveImage",value:function(e,t){t>=this._data.files.length&&(t=this._data.files.length-1),this._data.files.splice(t,0,this._data.files.splice(e,1)[0])}},{key:"deleteImage",value:function(e){void 0!==this._data.files[e]&&(this._data.files.splice(e,1),this.checkMaxElemCount())}},{key:"onUpload",value:function(e,t){this.ui.removePreloader(t),e.success&&e.file?this.appendImage(e.file):this.uploadingFailed("incorrect response: "+JSON.stringify(e))}},{key:"uploadingFailed",value:function(e,t){this.ui.removePreloader(t),console.log("Image Tool: uploading failed because of",e),this.api.notifier.show({message:this.api.i18n.t("Couldn’t upload image. Please try another."),style:"error"})}},{key:"styleToggled",value:function(e){this._data.style="fit"===e?"fit":"slider"}},{key:"checkMaxElemCount",value:function(){this.ui.updateLimitCounter(this._data.files.length,this.config.maxElementCount),this.config.maxElementCount&&this._data.files.length>=this.config.maxElementCount?this.ui.hideFileButton():this.ui.showFileButton()}},{key:"data",set:function(e){var t=this;this._data.files=[],e.files&&e.files.forEach((function(e){t.appendImage(e)})),this._data.caption=e.caption||"",this.ui.fillCaption(this._data.caption);var n=e.style||"";this.styleToggled(n)},get:function(){return this._data}}]),e}()}]).default},9968:module=>{var factory;window,factory=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s="./src/Hyperlink.js")}({"./node_modules/css-loader/dist/cjs.js!./src/Hyperlink.css":function(module,exports,__webpack_require__){eval('// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, ".ce-inline-tool-hyperlink-wrapper {\\r\\n outline: none;\\r\\n border: 0;\\r\\n border-radius: 0 0 4px 4px;\\r\\n margin: 0;\\r\\n font-size: 13px;\\r\\n padding: 10px;\\r\\n width: 100%;\\r\\n -webkit-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n display: none;\\r\\n font-weight: 500;\\r\\n border-top: 1px solid rgba(201,201,204,.48);\\r\\n}\\r\\n\\r\\n.ce-inline-tool-hyperlink-wrapper.ce-inline-tool-hyperlink-wrapper--showed {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.ce-inline-tool-hyperlink--input,\\r\\n.ce-inline-tool-hyperlink--select-target,\\r\\n.ce-inline-tool-hyperlink--select-rel {\\r\\n border: 1px solid rgba(201,201,204,.48);\\r\\n -webkit-box-shadow: inset 0 1px 2px 0 rgba(35,44,72,.06);\\r\\n box-shadow: inset 0 1px 2px 0 rgba(35,44,72,.06);\\r\\n border-radius: 5px;\\r\\n padding: 5px 8px;\\r\\n margin-bottom: 10px;\\r\\n outline: none;\\r\\n width: 100%;\\r\\n -webkit-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n\\r\\n.ce-inline-tool-hyperlink--select-target,\\r\\n.ce-inline-tool-hyperlink--select-rel {\\r\\n width: 48%;\\r\\n display: inline-block;\\r\\n}\\r\\n.ce-inline-tool-hyperlink--select-target {\\r\\n margin-right: 2%;\\r\\n}\\r\\n.ce-inline-tool-hyperlink--select-rel {\\r\\n margin-left: 2%;\\r\\n}\\r\\n\\r\\n.ce-inline-tool-hyperlink--button {\\r\\n display: block;\\r\\n width: 100%;\\r\\n background-color: #34c38f;\\r\\n color: #fff;\\r\\n padding: 7px 0;\\r\\n border: none;\\r\\n text-align: center;\\r\\n text-decoration: none;\\r\\n font-size: 16px;\\r\\n border-radius: 5px;\\r\\n cursor: pointer;\\r\\n}\\r\\n", ""]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack://Hyperlink/./src/Hyperlink.css?./node_modules/css-loader/dist/cjs.js')},"./node_modules/css-loader/dist/runtime/api.js":function(module,exports,__webpack_require__){"use strict";eval('\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return "@media ".concat(item[2], " {").concat(content, "}");\n }\n\n return content;\n }).join(\'\');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \'string\') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \'\']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = "".concat(mediaQuery, " and ").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || \'\'; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === \'function\') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return "/*# sourceURL=".concat(cssMapping.sourceRoot || \'\').concat(source, " */");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');\n }\n\n return [content].join(\'\\n\');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);\n return "/*# ".concat(data, " */");\n}\n\n//# sourceURL=webpack://Hyperlink/./node_modules/css-loader/dist/runtime/api.js?')},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":function(module,exports,__webpack_require__){"use strict";eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : undefined;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://Hyperlink/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?")},"./src/Hyperlink.css":function(module,exports,__webpack_require__){eval('var api = __webpack_require__(/*! ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");\n var content = __webpack_require__(/*! !../node_modules/css-loader/dist/cjs.js!./Hyperlink.css */ "./node_modules/css-loader/dist/cjs.js!./src/Hyperlink.css");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === \'string\') {\n content = [[module.i, content, \'\']];\n }\n\nvar options = {};\n\noptions.insert = "head";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};\n\n//# sourceURL=webpack://Hyperlink/./src/Hyperlink.css?')},"./src/Hyperlink.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Hyperlink; });\n/* harmony import */ var _SelectionUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SelectionUtils */ \"./src/SelectionUtils.js\");\n/* harmony import */ var _Hyperlink_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Hyperlink.css */ \"./src/Hyperlink.css\");\n/* harmony import */ var _Hyperlink_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Hyperlink_css__WEBPACK_IMPORTED_MODULE_1__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar Hyperlink = /*#__PURE__*/function () {\n function Hyperlink(_ref) {\n var data = _ref.data,\n config = _ref.config,\n api = _ref.api,\n readOnly = _ref.readOnly;\n\n _classCallCheck(this, Hyperlink);\n\n this.toolbar = api.toolbar;\n this.inlineToolbar = api.inlineToolbar;\n this.tooltip = api.tooltip;\n this.i18n = api.i18n;\n this.config = config;\n this.selection = new _SelectionUtils__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n this.commandLink = 'createLink';\n this.commandUnlink = 'unlink';\n this.CSS = {\n wrapper: 'ce-inline-tool-hyperlink-wrapper',\n wrapperShowed: 'ce-inline-tool-hyperlink-wrapper--showed',\n button: 'ce-inline-tool',\n buttonActive: 'ce-inline-tool--active',\n buttonModifier: 'ce-inline-tool--link',\n buttonUnlink: 'ce-inline-tool--unlink',\n input: 'ce-inline-tool-hyperlink--input',\n selectTarget: 'ce-inline-tool-hyperlink--select-target',\n selectRel: 'ce-inline-tool-hyperlink--select-rel',\n buttonSave: 'ce-inline-tool-hyperlink--button'\n };\n this.targetAttributes = this.config.availableTargets || ['_blank', // Opens the linked document in a new window or tab\n '_self', // Opens the linked document in the same frame as it was clicked (this is default)\n '_parent', // Opens the linked document in the parent frame\n '_top' // Opens the linked document in the full body of the window\n ];\n this.relAttributes = this.config.availableRels || ['alternate', //Provides a link to an alternate representation of the document (i.e. print page, translated or mirror)\n 'author', //Provides a link to the author of the document\n 'bookmark', //Permanent URL used for bookmarking\n 'external', //Indicates that the referenced document is not part of the same site as the current document\n 'help', //Provides a link to a help document\n 'license', //Provides a link to licensing information for the document\n 'next', //Provides a link to the next document in the series\n 'nofollow', //Links to an unendorsed document, like a paid link. (\"nofollow\" is used by Google, to specify that the Google search spider should not follow that link)\n 'noreferrer', //Requires that the browser should not send an HTTP referer header if the user follows the hyperlink\n 'noopener', //Requires that any browsing context created by following the hyperlink must not have an opener browsing context\n 'prev', //The previous document in a selection\n 'search', //Links to a search tool for the document\n 'tag' //A tag (keyword) for the current document\n ];\n this.nodes = {\n button: null,\n wrapper: null,\n input: null,\n selectTarget: null,\n selectRel: null,\n buttonSave: null\n };\n this.inputOpened = false;\n }\n\n _createClass(Hyperlink, [{\n key: \"render\",\n value: function render() {\n this.nodes.button = document.createElement('button');\n this.nodes.button.type = 'button';\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n this.nodes.button.appendChild(this.iconSvg('link', 14, 10));\n this.nodes.button.appendChild(this.iconSvg('unlink', 15, 11));\n return this.nodes.button;\n }\n }, {\n key: \"renderActions\",\n value: function renderActions() {\n var _this = this;\n\n this.nodes.wrapper = document.createElement('div');\n this.nodes.wrapper.classList.add(this.CSS.wrapper); // Input\n\n this.nodes.input = document.createElement('input');\n this.nodes.input.placeholder = 'https://...';\n this.nodes.input.classList.add(this.CSS.input);\n var i; // Target\n\n this.nodes.selectTarget = document.createElement('select');\n this.nodes.selectTarget.classList.add(this.CSS.selectTarget);\n this.addOption(this.nodes.selectTarget, this.i18n.t('Select target'), '');\n\n for (i = 0; i < this.targetAttributes.length; i++) {\n this.addOption(this.nodes.selectTarget, this.targetAttributes[i], this.targetAttributes[i]);\n }\n\n if (!!this.config.target) {\n this.nodes.selectTarget.value = this.config.target;\n } // Rel\n\n\n this.nodes.selectRel = document.createElement('select');\n this.nodes.selectRel.classList.add(this.CSS.selectRel);\n this.addOption(this.nodes.selectRel, this.i18n.t('Select rel'), '');\n\n for (i = 0; i < this.relAttributes.length; i++) {\n this.addOption(this.nodes.selectRel, this.relAttributes[i], this.relAttributes[i]);\n }\n\n if (!!this.config.rel) {\n this.nodes.selectRel.value = this.config.rel;\n } // Button\n\n\n this.nodes.buttonSave = document.createElement('button');\n this.nodes.buttonSave.type = 'button';\n this.nodes.buttonSave.classList.add(this.CSS.buttonSave);\n this.nodes.buttonSave.innerHTML = this.i18n.t('Save');\n this.nodes.buttonSave.addEventListener('click', function (event) {\n _this.savePressed(event);\n }); // append\n\n this.nodes.wrapper.appendChild(this.nodes.input);\n this.nodes.wrapper.appendChild(this.nodes.selectTarget);\n this.nodes.wrapper.appendChild(this.nodes.selectRel);\n this.nodes.wrapper.appendChild(this.nodes.buttonSave);\n return this.nodes.wrapper;\n }\n }, {\n key: \"surround\",\n value: function surround(range) {\n if (range) {\n if (!this.inputOpened) {\n this.selection.setFakeBackground();\n this.selection.save();\n } else {\n this.selection.restore();\n this.selection.removeFakeBackground();\n }\n\n var parentAnchor = this.selection.findParentTag('A');\n\n if (parentAnchor) {\n this.selection.expandToTag(parentAnchor);\n this.unlink();\n this.closeActions();\n this.checkState();\n this.toolbar.close();\n return;\n }\n }\n\n this.toggleActions();\n }\n }, {\n key: \"checkState\",\n value: function checkState() {\n var selection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var anchorTag = this.selection.findParentTag('A');\n\n if (anchorTag) {\n this.nodes.button.classList.add(this.CSS.buttonUnlink);\n this.nodes.button.classList.add(this.CSS.buttonActive);\n this.openActions();\n var hrefAttr = anchorTag.getAttribute('href');\n var targetAttr = anchorTag.getAttribute('target');\n var relAttr = anchorTag.getAttribute('rel');\n this.nodes.input.value = !!hrefAttr ? hrefAttr : '';\n this.nodes.selectTarget.value = !!targetAttr ? targetAttr : '';\n this.nodes.selectRel.value = !!relAttr ? relAttr : '';\n this.selection.save();\n } else {\n this.nodes.button.classList.remove(this.CSS.buttonUnlink);\n this.nodes.button.classList.remove(this.CSS.buttonActive);\n }\n\n return !!anchorTag;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.closeActions();\n }\n }, {\n key: \"toggleActions\",\n value: function toggleActions() {\n if (!this.inputOpened) {\n this.openActions(true);\n } else {\n this.closeActions(false);\n }\n }\n }, {\n key: \"openActions\",\n value: function openActions() {\n var needFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.nodes.wrapper.classList.add(this.CSS.wrapperShowed);\n\n if (needFocus) {\n this.nodes.input.focus();\n }\n\n this.inputOpened = true;\n }\n }, {\n key: \"closeActions\",\n value: function closeActions() {\n var clearSavedSelection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (this.selection.isFakeBackgroundEnabled) {\n var currentSelection = new _SelectionUtils__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n currentSelection.save();\n this.selection.restore();\n this.selection.removeFakeBackground();\n currentSelection.restore();\n }\n\n this.nodes.wrapper.classList.remove(this.CSS.wrapperShowed);\n this.nodes.input.value = '';\n this.nodes.selectTarget.value = '';\n this.nodes.selectRel.value = '';\n\n if (clearSavedSelection) {\n this.selection.clearSaved();\n }\n\n this.inputOpened = false;\n }\n }, {\n key: \"savePressed\",\n value: function savePressed(event) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n var value = this.nodes.input.value || '';\n var target = this.nodes.selectTarget.value || '';\n var rel = this.nodes.selectRel.value || '';\n\n if (!value.trim()) {\n this.selection.restore();\n this.unlink();\n event.preventDefault();\n this.closeActions();\n } // if (!this.validateURL(value)) {\n // this.tooltip.show(this.nodes.input, 'Pasted link is not valid.', {\n // placement: 'top',\n // });\n // setTimeout(() => {\n // this.tooltip.hide();\n // }, 1000);\n // return;\n // }\n\n\n value = this.prepareLink(value);\n this.selection.restore();\n this.selection.removeFakeBackground();\n this.insertLink(value, target, rel);\n this.selection.collapseToEnd();\n this.inlineToolbar.close();\n }\n }, {\n key: \"validateURL\",\n value: function validateURL(str) {\n var pattern = new RegExp('^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\n\n return !!pattern.test(str);\n }\n }, {\n key: \"prepareLink\",\n value: function prepareLink(link) {\n link = link.trim();\n link = this.addProtocol(link);\n return link;\n }\n }, {\n key: \"addProtocol\",\n value: function addProtocol(link) {\n if (/^(\\w+):(\\/\\/)?/.test(link)) {\n return link;\n }\n\n var isInternal = /^\\/[^/\\s]/.test(link),\n isAnchor = link.substring(0, 1) === '#',\n isProtocolRelative = /^\\/\\/[^/\\s]/.test(link);\n\n if (!isInternal && !isAnchor && !isProtocolRelative) {\n link = 'http://' + link;\n }\n\n return link;\n }\n }, {\n key: \"insertLink\",\n value: function insertLink(link) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var rel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var anchorTag = this.selection.findParentTag('A');\n\n if (anchorTag) {\n this.selection.expandToTag(anchorTag);\n } else {\n document.execCommand(this.commandLink, false, link);\n anchorTag = this.selection.findParentTag('A');\n }\n\n if (anchorTag) {\n if (!!target) {\n anchorTag['target'] = target;\n } else {\n anchorTag.removeAttribute('target');\n }\n\n if (!!rel) {\n anchorTag['rel'] = rel;\n } else {\n anchorTag.removeAttribute('rel');\n }\n }\n }\n }, {\n key: \"unlink\",\n value: function unlink() {\n document.execCommand(this.commandUnlink);\n }\n }, {\n key: \"iconSvg\",\n value: function iconSvg(name) {\n var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 14;\n var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 14;\n var icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n icon.classList.add('icon', 'icon--' + name);\n icon.setAttribute('width', width + 'px');\n icon.setAttribute('height', height + 'px');\n icon.innerHTML = \"<use xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" xlink:href=\\\"#\".concat(name, \"\\\"></use>\");\n return icon;\n }\n }, {\n key: \"addOption\",\n value: function addOption(element, text) {\n var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var option = document.createElement('option');\n option.text = text;\n option.value = value;\n element.add(option);\n }\n }, {\n key: \"shortcut\",\n get: function get() {\n return this.config.shortcut || 'CMD+L';\n }\n }, {\n key: \"title\",\n get: function get() {\n return 'Hyperlink';\n }\n }], [{\n key: \"isInline\",\n get: function get() {\n return true;\n }\n }, {\n key: \"sanitize\",\n get: function get() {\n return {\n a: {\n href: true,\n target: true,\n rel: true\n }\n };\n }\n }]);\n\n return Hyperlink;\n}();\n\n\n\n//# sourceURL=webpack://Hyperlink/./src/Hyperlink.js?")},"./src/SelectionUtils.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SelectionUtils; });\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar SelectionUtils = /*#__PURE__*/function () {\n function SelectionUtils() {\n _classCallCheck(this, SelectionUtils);\n\n this.selection = null;\n this.savedSelectionRange = null;\n this.isFakeBackgroundEnabled = false;\n this.commandBackground = \'backColor\';\n this.commandRemoveFormat = \'removeFormat\';\n }\n\n _createClass(SelectionUtils, [{\n key: "isElement",\n value: function isElement(node) {\n return node && _typeof(node) === \'object\' && node.nodeType && node.nodeType === Node.ELEMENT_NODE;\n }\n }, {\n key: "isContentEditable",\n value: function isContentEditable(element) {\n return element.contentEditable === \'true\';\n }\n }, {\n key: "isNativeInput",\n value: function isNativeInput(target) {\n var nativeInputs = [\'INPUT\', \'TEXTAREA\'];\n return target && target.tagName ? nativeInputs.includes(target.tagName) : false;\n }\n }, {\n key: "canSetCaret",\n value: function canSetCaret(target) {\n var result = true;\n\n if (this.isNativeInput(target)) {\n switch (target.type) {\n case \'file\':\n case \'checkbox\':\n case \'radio\':\n case \'hidden\':\n case \'submit\':\n case \'button\':\n case \'image\':\n case \'reset\':\n result = false;\n break;\n\n default:\n }\n } else {\n result = this.isContentEditable(target);\n }\n\n return result;\n }\n }, {\n key: "CSS",\n value: function CSS() {\n return {\n editorWrapper: \'codex-editor\',\n editorZone: \'codex-editor__redactor\'\n };\n }\n }, {\n key: "anchorNode",\n value: function anchorNode() {\n var selection = window.getSelection();\n return selection ? selection.anchorNode : null;\n }\n }, {\n key: "anchorElement",\n value: function anchorElement() {\n var selection = window.getSelection();\n\n if (!selection) {\n return null;\n }\n\n var anchorNode = selection.anchorNode;\n\n if (!anchorNode) {\n return null;\n }\n\n if (!this.isElement(anchorNode)) {\n return anchorNode.parentElement;\n } else {\n return anchorNode;\n }\n }\n }, {\n key: "anchorOffset",\n value: function anchorOffset() {\n var selection = window.getSelection();\n return selection ? selection.anchorOffset : null;\n }\n }, {\n key: "isCollapsed",\n value: function isCollapsed() {\n var selection = window.getSelection();\n return selection ? selection.isCollapsed : null;\n }\n }, {\n key: "isAtEditor",\n value: function isAtEditor() {\n var selection = SelectionUtils.get();\n var selectedNode = selection.anchorNode || selection.focusNode;\n\n if (selectedNode && selectedNode.nodeType === Node.TEXT_NODE) {\n selectedNode = selectedNode.parentNode;\n }\n\n var editorZone = null;\n\n if (selectedNode) {\n editorZone = selectedNode.closest(".".concat(SelectionUtils.CSS.editorZone));\n }\n\n return editorZone && editorZone.nodeType === Node.ELEMENT_NODE;\n }\n }, {\n key: "isSelectionExists",\n value: function isSelectionExists() {\n var selection = SelectionUtils.get();\n return !!selection.anchorNode;\n }\n }, {\n key: "get",\n value: function get() {\n return window.getSelection();\n }\n }, {\n key: "setCursor",\n value: function setCursor(element) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var range = document.createRange();\n var selection = window.getSelection();\n\n if (this.isNativeInput(element)) {\n if (!this.canSetCaret(element)) {\n return;\n }\n\n element.focus();\n element.selectionStart = element.selectionEnd = offset;\n return element.getBoundingClientRect();\n }\n\n range.setStart(element, offset);\n range.setEnd(element, offset);\n selection.removeAllRanges();\n selection.addRange(range);\n return range.getBoundingClientRect();\n }\n }, {\n key: "removeFakeBackground",\n value: function removeFakeBackground() {\n if (!this.isFakeBackgroundEnabled) {\n return;\n }\n\n this.isFakeBackgroundEnabled = false;\n document.execCommand(this.commandRemoveFormat);\n }\n }, {\n key: "setFakeBackground",\n value: function setFakeBackground() {\n document.execCommand(this.commandBackground, false, \'#a8d6ff\');\n this.isFakeBackgroundEnabled = true;\n }\n }, {\n key: "save",\n value: function save() {\n this.savedSelectionRange = SelectionUtils.range;\n }\n }, {\n key: "restore",\n value: function restore() {\n if (!this.savedSelectionRange) {\n return;\n }\n\n var sel = window.getSelection();\n sel.removeAllRanges();\n sel.addRange(this.savedSelectionRange);\n }\n }, {\n key: "clearSaved",\n value: function clearSaved() {\n this.savedSelectionRange = null;\n }\n }, {\n key: "collapseToEnd",\n value: function collapseToEnd() {\n var sel = window.getSelection();\n var range = document.createRange();\n range.selectNodeContents(sel.focusNode);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n }\n }, {\n key: "findParentTag",\n value: function findParentTag(tagName) {\n var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var searchDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n var selection = window.getSelection();\n var parentTag = null;\n\n if (!selection || !selection.anchorNode || !selection.focusNode) {\n return null;\n }\n\n var boundNodes = [selection.anchorNode, selection.focusNode];\n boundNodes.forEach(function (parent) {\n var searchDepthIterable = searchDepth;\n\n while (searchDepthIterable > 0 && parent.parentNode) {\n if (parent.tagName === tagName) {\n parentTag = parent;\n\n if (className && parent.classList && !parent.classList.contains(className)) {\n parentTag = null;\n }\n\n if (parentTag) {\n break;\n }\n }\n\n parent = parent.parentNode;\n searchDepthIterable--;\n }\n });\n return parentTag;\n }\n }, {\n key: "expandToTag",\n value: function expandToTag(element) {\n var selection = window.getSelection();\n selection.removeAllRanges();\n var range = document.createRange();\n range.selectNodeContents(element);\n selection.addRange(range);\n }\n }], [{\n key: "range",\n get: function get() {\n var selection = window.getSelection();\n return selection && selection.rangeCount ? selection.getRangeAt(0) : null;\n }\n }, {\n key: "rect",\n get: function get() {\n var sel = document.selection,\n range;\n var rect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n\n if (sel && sel.type !== \'Control\') {\n range = sel.createRange();\n rect.x = range.boundingLeft;\n rect.y = range.boundingTop;\n rect.width = range.boundingWidth;\n rect.height = range.boundingHeight;\n return rect;\n }\n\n if (!window.getSelection) {\n return rect;\n }\n\n sel = window.getSelection();\n\n if (sel.rangeCount === null || isNaN(sel.rangeCount)) {\n return rect;\n }\n\n if (sel.rangeCount === 0) {\n return rect;\n }\n\n range = sel.getRangeAt(0).cloneRange();\n\n if (range.getBoundingClientRect) {\n rect = range.getBoundingClientRect();\n }\n\n if (rect.x === 0 && rect.y === 0) {\n var span = document.createElement(\'span\');\n\n if (span.getBoundingClientRect) {\n span.appendChild(document.createTextNode("\\u200B"));\n range.insertNode(span);\n rect = span.getBoundingClientRect();\n var spanParent = span.parentNode;\n spanParent.removeChild(span);\n spanParent.normalize();\n }\n }\n\n return rect;\n }\n }, {\n key: "text",\n get: function get() {\n return window.getSelection ? window.getSelection().toString() : \'\';\n }\n }]);\n\n return SelectionUtils;\n}();\n\n\n\n//# sourceURL=webpack://Hyperlink/./src/SelectionUtils.js?')}}).default},module.exports=factory()},2185:e=>{window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=62)}([function(e,t,n){"use strict";e.exports=n(31)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStartTime=function(e){return p(e,l)},t.parseEndTime=function(e){return p(e,c)},t.randomString=function(){return Math.random().toString(36).substr(2,5)},t.queryString=function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(e[t])})).join("&")},t.getSDK=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.default,a=f(t);return a&&r(a)?Promise.resolve(a):new Promise((function(o,r){if(h[e])h[e].push({resolve:o,reject:r});else{h[e]=[{resolve:o,reject:r}];var a=function(t){h[e].forEach((function(e){return e.resolve(t)}))};if(n){var s=window[n];window[n]=function(){s&&s(),a(f(t))}}i(e,(function(o){o?(h[e].forEach((function(e){return e.reject(o)})),h[e]=null):n||a(f(t))}))}}))},t.getConfig=function(e,t){return(0,r.default)(t.config,e.config)},t.omit=function(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];for(var i=(t=[]).concat.apply(t,o),a={},s=0,l=Object.keys(e);s<l.length;s++){var c=l[s];-1===i.indexOf(c)&&(a[c]=e[c])}return a},t.callPlayer=function(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: ".concat(this.constructor.displayName," player could not call %c").concat(e,"%c – ");return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return(t=this.player)[e].apply(t,r)},t.isMediaStream=function(e){return"undefined"!=typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream},t.isBlobUrl=function(e){return/^blob:/.test(e)},t.supportsWebKitPresentationMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("video"),t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"==typeof e.webkitSetPresentationMode&&t};var o=i(n(38)),r=i(n(10));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var l=/[?&#](?:start|t)=([0-9hms]+)/,c=/[?&#]end=([0-9hms]+)/,u=/(\d+)(h|m|s)/g,d=/^\d+$/;function p(e,t){if(!(e instanceof Array)){var n=e.match(t);if(n){var o=n[1];if(o.match(u))return function(e){for(var t=0,n=u.exec(e);null!==n;){var o=a(n,3),r=o[1],i=o[2];"h"===i&&(t+=60*parseInt(r,10)*60),"m"===i&&(t+=60*parseInt(r,10)),"s"===i&&(t+=parseInt(r,10)),n=u.exec(e)}return t}(o);if(d.test(o))return parseInt(o)}}}function f(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}var h={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canPlay=t.FLV_EXTENSIONS=t.DASH_EXTENSIONS=t.HLS_EXTENSIONS=t.VIDEO_EXTENSIONS=t.AUDIO_EXTENSIONS=t.MATCH_URL_KALTURA=t.MATCH_URL_VIDYARD=t.MATCH_URL_MIXCLOUD=t.MATCH_URL_DAILYMOTION=t.MATCH_URL_TWITCH_CHANNEL=t.MATCH_URL_TWITCH_VIDEO=t.MATCH_URL_WISTIA=t.MATCH_URL_STREAMABLE=t.MATCH_URL_FACEBOOK_WATCH=t.MATCH_URL_FACEBOOK=t.MATCH_URL_VIMEO=t.MATCH_URL_SOUNDCLOUD=t.MATCH_URL_YOUTUBE=void 0;var o=n(1);function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var a=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;t.MATCH_URL_YOUTUBE=a;var s=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/;t.MATCH_URL_SOUNDCLOUD=s;var l=/vimeo\.com\/.+/;t.MATCH_URL_VIMEO=l;var c=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;t.MATCH_URL_FACEBOOK=c;var u=/^https?:\/\/fb\.watch\/.+$/;t.MATCH_URL_FACEBOOK_WATCH=u;var d=/streamable\.com\/([a-z0-9]+)$/;t.MATCH_URL_STREAMABLE=d;var p=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?(.*)$/;t.MATCH_URL_WISTIA=p;var f=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;t.MATCH_URL_TWITCH_VIDEO=f;var h=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/;t.MATCH_URL_TWITCH_CHANNEL=h;var m=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;t.MATCH_URL_DAILYMOTION=m;var g=/mixcloud\.com\/([^/]+\/[^/]+)/;t.MATCH_URL_MIXCLOUD=g;var y=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-]+)/;t.MATCH_URL_VIDYARD=y;var v=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_]+)$/;t.MATCH_URL_KALTURA=v;var b=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;t.AUDIO_EXTENSIONS=b;var w=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;t.VIDEO_EXTENSIONS=w;var k=/\.(m3u8)($|\?)/i;t.HLS_EXTENSIONS=k;var x=/\.(mpd)($|\?)/i;t.DASH_EXTENSIONS=x;var S=/\.(flv)($|\?)/i;t.FLV_EXTENSIONS=S;var E={youtube:function(e){return e instanceof Array?e.every((function(e){return a.test(e)})):a.test(e)},soundcloud:function(e){return s.test(e)&&!b.test(e)},vimeo:function(e){return l.test(e)&&!w.test(e)&&!k.test(e)},facebook:function(e){return c.test(e)||u.test(e)},streamable:function(e){return d.test(e)},wistia:function(e){return p.test(e)},twitch:function(e){return f.test(e)||h.test(e)},dailymotion:function(e){return m.test(e)},mixcloud:function(e){return g.test(e)},vidyard:function(e){return y.test(e)},kaltura:function(e){return v.test(e)},file:function e(t){if(t instanceof Array){var n,i=r(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if("string"==typeof a&&e(a))return!0;if(e(a.src))return!0}}catch(e){i.e(e)}finally{i.f()}return!1}return!(!(0,o.isMediaStream)(t)&&!(0,o.isBlobUrl)(t))||b.test(t)||w.test(t)||k.test(t)||x.test(t)||S.test(t)}};t.canPlay=E},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){var o=n(2),r=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void c(t.promise,e)}l(t.promise,o)}else(1===e._state?l:c)(t.promise,e._value)}))):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void p((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){c(e,t)}var o,r}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,l(t,e))}),(function(e){n||(n=!0,c(t,e))}))}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new d(e,t,n)),n},a.prototype.finally=o.a,a.all=function(e){return new a((function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var r=o.length;function i(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){i(e,t)}),n)}o[e]=a,0==--r&&t(o)}catch(e){n(e)}}for(var a=0;a<o.length;a++)i(a,o[a])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t.a=a}).call(this,n(5).setImmediate)},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(4);var r,i,a,s,l,c,u,d=n(8),p=(i=function(e){return new Promise((function(t,n){e=s(e),(e=l(e)).beforeSend&&e.beforeSend();var o=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");o.open(e.method,e.url),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e.headers).forEach((function(t){var n=e.headers[t];o.setRequestHeader(t,n)}));var r=e.ratio;o.upload.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*r/100);e.progress(Math.min(o,100))}),!1),o.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*(100-r)/100)+r;e.progress(Math.min(o,100))}),!1),o.onreadystatechange=function(){if(4===o.readyState){var e=o.response;try{e=JSON.parse(e)}catch(e){}var r=d.parseHeaders(o.getAllResponseHeaders()),i={body:e,code:o.status,headers:r};u(o.status)?t(i):n(i)}},o.send(e.data)}))},a=function(e){return e.method="POST",i(e)},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==o(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(r).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},l=function(e){switch(e.method){case"GET":var t=c(e.data,r.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||r.JSON}(e);(d.isFormData(e.data)||d.isFormElement(e.data))&&(n=r.FORM),e.data=c(e.data,n),n!==p.contentType.FORM&&(e.headers["content-type"]=n)}return e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case r.URLENCODED:return d.urlEncode(e);case r.JSON:return d.jsonEncode(e);case r.FORM:return d.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:r={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),d.selectFiles(e).then((function(t){for(var n=new FormData,o=0;o<t.length;o++)n.append(e.fieldName,t[o],t[o].name);d.isObject(e.data)&&Object.keys(e.data).forEach((function(t){var o=e.data[t];n.append(t,o)}));var r=e.beforeSend;return e.beforeSend=function(){return r(t)},e.data=n,a(e)}))},selectFiles:function(e){return delete(e=s(e)).beforeSend,d.selectFiles(e)}});e.exports=p},function(e,t,n){"use strict";n.r(t);var o=n(1);window.Promise=window.Promise||o.a},function(e,t,n){(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var o,r,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),o=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},o=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,o=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[l]=r,o(l),l++},p.clearImmediate=f}function f(e){delete c[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(7))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,c=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=n(9);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return(t=[{key:"urlEncode",value:function(e){return r(e)}},{key:"jsonEncode",value:function(e){return JSON.stringify(e)}},{key:"formEncode",value:function(e){if(this.isFormData(e))return e;if(this.isFormElement(e))return new FormData(e);if(this.isObject(e)){var t=new FormData;return Object.keys(e).forEach((function(n){var o=e[n];t.append(n,o)})),t}throw new Error("`data` must be an instance of Object, FormData or <FORM> HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var o=document.createElement("INPUT");o.type="file",e.multiple&&o.setAttribute("multiple","multiple"),e.accept&&o.setAttribute("accept",e.accept),o.style.display="none",document.body.appendChild(o),o.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(o)}),!1),o.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),o=t.shift(),r=t.join(": ");o&&(n[o]=r)})),n}}])&&o(e,t),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},o=function(e,t,r,i){return t=t||null,r=r||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}(Object.keys(e).map((function(a){var s,l,c=a;if(i&&(c=i+"["+c+"]"),"object"==typeof e[a]&&null!==e[a])s=o(e[a],null,r,c);else{t&&(l=c,c=!isNaN(parseFloat(l))&&isFinite(l)?t+Number(c):c);var u=e[a];u=(u=0===(u=!1===(u=!0===u?"1":u)?"0":u)?"0":u)||"",s=n(c)+"="+n(u)}return s}))).join(r).replace(/[!'()*]/g,""):""};e.exports=o}])},function(e,t,n){e.exports=n(23)},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){var o=n(7);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t,n){"use strict";var o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))r.call(n,u)&&(l[u]=n[u]);if(o){s=o(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var o=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function l(e,t){try{return t in e}catch(e){return!1}}function c(e,t,n){var o={};return n.isMergeableObject(e)&&s(e).forEach((function(t){o[t]=i(e[t],n)})),s(t).forEach((function(r){(function(e,t){return l(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(l(e,r)&&n.isMergeableObject(t[r])?o[r]=function(e,t){if(!t.customMerge)return u;var n=t.customMerge(e);return"function"==typeof n?n:u}(r,n)(e[r],t[r],n):o[r]=i(t[r],n))})),o}function u(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||o,n.cloneUnlessOtherwiseSpecified=i;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):c(e,t,n):i(t,n)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return u(e,n,t)}),{})};var d=u;e.exports=d},function(e,t){var n="undefined"!=typeof Element,o="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,t){try{return function e(t,a){if(t===a)return!0;if(t&&a&&"object"==typeof t&&"object"==typeof a){if(t.constructor!==a.constructor)return!1;var s,l,c,u;if(Array.isArray(t)){if((s=t.length)!=a.length)return!1;for(l=s;0!=l--;)if(!e(t[l],a[l]))return!1;return!0}if(o&&t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(u=t.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=t.entries();!(l=u.next()).done;)if(!e(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(u=t.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(a)){if((s=t.length)!=a.length)return!1;for(l=s;0!=l--;)if(t[l]!==a[l])return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if((s=(c=Object.keys(t)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(n&&t instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!t.$$typeof)&&!e(t[c[l]],a[c[l]]))return!1;return!0}return t!=t&&a!=a}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var o,r=(o=n(54))&&o.__esModule?o:{default:o},i=r.default.string,a=r.default.bool,s=r.default.number,l=r.default.array,c=r.default.oneOfType,u=r.default.shape,d=r.default.object,p=r.default.func,f=r.default.node,h={url:c([i,l,d]),playing:a,loop:a,controls:a,volume:s,muted:a,playbackRate:s,width:c([i,s]),height:c([i,s]),style:d,progressInterval:s,playsinline:a,pip:a,stopOnUnmount:a,light:c([a,i]),playIcon:f,previewTabIndex:s,fallback:f,wrapper:c([i,p,u({render:p.isRequired})]),config:u({soundcloud:u({options:d}),youtube:u({playerVars:d,embedOptions:d,onUnstarted:p}),facebook:u({appId:i,version:i,playerId:i,attributes:d}),dailymotion:u({params:d}),vimeo:u({playerOptions:d}),file:u({attributes:d,tracks:l,forceVideo:a,forceAudio:a,forceHLS:a,forceDASH:a,forceFLV:a,hlsOptions:d,hlsVersion:i,dashVersion:i,flvVersion:i}),wistia:u({options:d,playerId:i,customControls:l}),mixcloud:u({options:d}),twitch:u({options:d,playerId:i}),vidyard:u({options:d})}),onReady:p,onStart:p,onPlay:p,onPause:p,onBuffer:p,onBufferEnd:p,onEnded:p,onError:p,onDuration:p,onSeek:p,onProgress:p,onClickPreview:p,onEnablePIP:p,onDisablePIP:p};t.propTypes=h;var m=function(){},g={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:m},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1}},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"0.14.16",dashVersion:"3.1.3",flvVersion:"1.5.0"},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:m,onStart:m,onPlay:m,onPause:m,onBuffer:m,onBufferEnd:m,onEnded:m,onError:m,onDuration:m,onSeek:m,onProgress:m,onClickPreview:m,onEnablePIP:m,onDisablePIP:m};t.defaultProps=g},function(e,t){function n(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,r)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise((function(r,i){var a=e.apply(t,o);function s(e){n(a,r,i,s,l,"next",e)}function l(e){n(a,r,i,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){var o=n(28),r=n(29),i=n(8),a=n(30);e.exports=function(e){return o(e)||r(e)||i(e)||a()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.15 13.628A7.749 7.749 0 0 0 10 17.75a7.74 7.74 0 0 0 6.305-3.242l-2.387-2.127-2.765 2.244-4.389-4.496-3.614 3.5zm-.787-2.303l4.446-4.371 4.52 4.63 2.534-2.057 3.533 2.797c.23-.734.354-1.514.354-2.324a7.75 7.75 0 1 0-15.387 1.325zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"></path></svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.render)(o.default.createElement(i.default,t),e)};var o=a(n(0)),r=n(32),i=a(n(36));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.043 8.265l3.183-3.183h-2.924L4.75 10.636v2.923l4.15-4.15v2.351l-2.158 2.159H8.9v2.137H4.7c-1.215 0-2.2-.936-2.2-2.09v-8.93c0-1.154.985-2.09 2.2-2.09h10.663l.033-.033.034.034c1.178.04 2.12.96 2.12 2.089v3.23H15.3V5.359l-2.906 2.906h-2.35zM7.951 5.082H4.75v3.201l3.201-3.2zm5.099 7.078v3.04h4.15v-3.04h-4.15zm-1.1-2.137h6.35c.635 0 1.15.489 1.15 1.092v5.13c0 .603-.515 1.092-1.15 1.092h-6.35c-.635 0-1.15-.489-1.15-1.092v-5.13c0-.603.515-1.092 1.15-1.092z"></path></svg>'},function(e,t){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.8 10.592v2.043h2.35v2.138H15.8v2.232h-2.25v-2.232h-2.4v-2.138h2.4v-2.28h2.25v.237h1.15-1.15zM1.9 8.455v-3.42c0-1.154.985-2.09 2.2-2.09h4.2v2.137H4.15v3.373H1.9zm0 2.137h2.25v3.325H8.3v2.138H4.1c-1.215 0-2.2-.936-2.2-2.09v-3.373zm15.05-2.137H14.7V5.082h-4.15V2.945h4.2c1.215 0 2.2.936 2.2 2.09v3.42z"></path></svg>'},function(e,t){e.exports='<svg width="17" height="10" viewBox="0 0 17 10" xmlns="http://www.w3.org/2000/svg"><path d="M13.568 5.925H4.056l1.703 1.703a1.125 1.125 0 0 1-1.59 1.591L.962 6.014A1.069 1.069 0 0 1 .588 4.26L4.38.469a1.069 1.069 0 0 1 1.512 1.511L4.084 3.787h9.606l-1.85-1.85a1.069 1.069 0 1 1 1.512-1.51l3.792 3.791a1.069 1.069 0 0 1-.475 1.788L13.514 9.16a1.125 1.125 0 0 1-1.59-1.591l1.644-1.644z"></path></svg>'},function(e,t){e.exports='<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 489.2 489.2"><path d="M439.6,0h-390C22.2,0,0,22.2,0,49.6v390c0,27.4,22.2,49.6,49.6,49.6h390c27.4,0,49.6-22.2,49.6-49.6V49.7 C489.3,22.3,467,0,439.6,0z M300.6,47.8h42.5v42.5h-42.5V47.8z M223.4,47.8h42.5v42.5h-42.5V47.8L223.4,47.8z M146.1,47.8h42.5 v42.5h-42.5V47.8z M111.3,441.6H68.8v-42.5h42.5V441.6z M111.3,90.3H68.8V47.8h42.5V90.3z M188.6,441.6h-42.5v-42.5h42.5V441.6z M265.8,441.6h-42.5v-42.5h42.5V441.6z M343.1,441.6h-42.5v-42.5h42.5V441.6z M352.5,256.7l-163.1,94.2c-9.2,5.3-20.8-1.3-20.8-12 V150.5c0-10.7,11.6-17.3,20.8-12l163.1,94.2C361.8,238,361.8,251.4,352.5,256.7z M420.4,441.6h-42.5v-42.5h42.5V441.6z M420.4,90.3 h-42.5V47.8h42.5V90.3z"></path></svg>'},function(e,t,n){var o=n(59),r=n(60),i=n(8),a=n(61);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||a()}},function(e,t,n){var o=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var r=t&&t.prototype instanceof d?t:d,i=Object.create(r.prototype),a=new S(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return C()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=c(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function d(){}function p(){}function f(){}var h={};h[r]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==t&&n.call(g,r)&&(h=g);var y=f.prototype=d.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var o;this._invoke=function(r,i){function a(){return new t((function(o,a){!function o(r,i,a,s){var l=c(e[r],e,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}(r,i,o,a)}))}return o=o?o.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=c(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=y.constructor=f,f.constructor=p,p.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,o,r,i){void 0===i&&(i=Promise);var a=new b(l(t,n,o,r),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(y),s(y,a,"Generator"),y[r]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;x(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){var o=n(25),r=n(26);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]),o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},function(e,t,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},o=[],r=0;r<e.length;r++){var i=e[r],l=t.base?i[0]+t.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:u,updater:g(p,t),references:1}),o.push(u)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var h=null,m=0;function g(e,t){var n,o,r;if(t.singleton){var i=m++;n=h||(h=c(t)),o=p.bind(null,n,i,!1),r=p.bind(null,n,i,!0)}else n=c(t),o=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=s(n[o]);a[r].references--}for(var i=l(e,t),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=i}}}},function(e,t,n){(t=n(27)(!1)).push([e.i,'.video-tool {\n --bg-color: #cdd1e0;\n --front-color: #388ae5;\n --border-color: #e8e8eb;\n}\n\n .video-tool__video {\n border-radius: 3px;\n overflow: hidden;\n margin-bottom: 10px;\n }\n\n .video-tool__video-picture {\n max-width: 100%;\n vertical-align: bottom;\n display: block;\n }\n\n .video-tool__video-preloader {\n width: 50px;\n height: 50px;\n border-radius: 50%;\n background-size: cover;\n margin: auto;\n position: relative;\n background-color: var(--bg-color);\n background-position: center center;\n }\n\n .video-tool__video-preloader::after {\n content: "";\n position: absolute;\n z-index: 3;\n width: 60px;\n height: 60px;\n border-radius: 50%;\n border: 2px solid var(--bg-color);\n border-top-color: var(--front-color);\n left: 50%;\n top: 50%;\n margin-top: -30px;\n margin-left: -30px;\n animation: video-preloader-spin 2s infinite linear;\n box-sizing: border-box;\n }\n\n .video-tool__caption[contentEditable="true"][data-placeholder]::before {\n position: absolute !important;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n display: none;\n }\n\n .video-tool__caption[contentEditable="true"][data-placeholder]:empty::before {\n display: block;\n }\n\n .video-tool__caption[contentEditable="true"][data-placeholder]:empty:focus::before {\n display: none;\n }\n\n .video-tool--empty .video-tool__video {\n display: none;\n }\n\n .video-tool--empty .video-tool__caption, .video-tool--loading .video-tool__caption {\n display: none;\n }\n\n .video-tool--filled .cdx-button {\n display: none;\n }\n\n .video-tool--filled .video-tool__video-preloader {\n display: none;\n }\n\n .video-tool--loading .video-tool__video {\n min-height: 200px;\n display: flex;\n border: 1px solid var(--border-color);\n background-color: #fff;\n }\n\n .video-tool--loading .video-tool__video-picture {\n display: none;\n }\n\n .video-tool--loading .cdx-button {\n display: none;\n }\n\n /**\n * Tunes\n * ----------------\n */\n\n .video-tool--withBorder .video-tool__video {\n border: 1px solid var(--border-color);\n }\n\n .video-tool--withBackground .video-tool__video {\n padding: 15px;\n background: var(--bg-color);\n }\n\n .video-tool--withBackground .video-tool__video-picture {\n max-width: 60%;\n margin: 0 auto;\n }\n\n .video-tool--stretched .video-tool__video-picture {\n width: 100%;\n }\n\n@keyframes video-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n',""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o,r,i=e[1]||"",a=e[3];if(!a)return i;if(t&&"function"==typeof btoa){var s=(n=a,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([s]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);o&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){var o=n(7);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var o=n(9),r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}function k(){}function x(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var S=x.prototype=new k;S.constructor=x,o(S,w.prototype),S.isPureReactComponent=!0;var E={current:null},C=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var o,r={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,o)&&!_.hasOwnProperty(o)&&(r[o]=t[o]);var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===r[o]&&(r[o]=l[o]);return{$$typeof:i,type:e,key:a,ref:s,props:r,_owner:E.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,M=[];function L(e,t,n,o){if(M.length){var r=M.pop();return r.result=e,r.keyPrefix=t,r.func=n,r.context=o,r.count=0,r}return{result:e,keyPrefix:t,func:n,context:o,count:0}}function B(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function I(e,t,n){return null==e?0:function e(t,n,o,r){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return o(r,t,""===n?"."+A(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+A(s=t[c],c);l+=e(s,u,o,r)}else if("function"==typeof(u=null===t||"object"!=typeof t?null:"function"==typeof(u=g&&t[g]||t["@@iterator"])?u:null))for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+A(s,c++),o,r);else if("object"===s)throw o=""+t,Error(y(31,"[object Object]"===o?"object with keys {"+Object.keys(t).join(", ")+"}":o,""));return l}(e,"",t,n)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var o=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,o,n,(function(e){return e})):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),o.push(e))}function D(e,t,n,o,r){var i="";null!=n&&(i=(""+n).replace(P,"$&/")+"/"),I(e,R,t=L(t,i,o,r)),B(t)}var N={current:null};function F(){var e=N.current;if(null===e)throw Error(y(321));return e}var H={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:o};t.Children={map:function(e,t,n){if(null==e)return e;var o=[];return D(e,o,null,t,n),o},forEach:function(e,t,n){if(null==e)return e;I(e,j,t=L(null,null,t,n)),B(t)},count:function(e){return I(e,(function(){return null}),null)},toArray:function(e){var t=[];return D(e,t,null,(function(e){return e})),t},only:function(e){if(!O(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=x,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var r=o({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)C.call(t,u)&&!_.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:r,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(33)},function(e,t,n){"use strict";var o=n(0),r=n(9),i=n(34);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!o)throw Error(a(227));function s(e,t,n,o,r,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var l=!1,c=null,u=!1,d=null,p={onError:function(e){l=!0,c=e}};function f(e,t,n,o,r,i,a,u,d){l=!1,c=null,s.apply(p,arguments)}var h=null,m=null,g=null;function y(e,t,n){var o=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,o,r,i,s,p,h){if(f.apply(this,arguments),l){if(!l)throw Error(a(198));var m=c;l=!1,c=null,u||(u=!0,d=m)}}(o,t,void 0,e),e.currentTarget=null}var v=null,b={};function w(){if(v)for(var e in b){var t=b[e],n=v.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!x[n]){if(!t.extractEvents)throw Error(a(97,e));for(var o in x[n]=t,n=t.eventTypes){var r=void 0,i=n[o],s=t,l=o;if(S.hasOwnProperty(l))throw Error(a(99,l));S[l]=i;var c=i.phasedRegistrationNames;if(c){for(r in c)c.hasOwnProperty(r)&&k(c[r],s,l);r=!0}else i.registrationName?(k(i.registrationName,s,l),r=!0):r=!1;if(!r)throw Error(a(98,o,e))}}}}function k(e,t,n){if(E[e])throw Error(a(100,e));E[e]=t,C[e]=t.eventTypes[n].dependencies}var x=[],S={},E={},C={};function _(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];if(!b.hasOwnProperty(t)||b[t]!==o){if(b[t])throw Error(a(102,t));b[t]=o,n=!0}}n&&w()}var T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),O=null,P=null,M=null;function L(e){if(e=m(e)){if("function"!=typeof O)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),O(e.stateNode,e.type,t))}}function B(e){P?M?M.push(e):M=[e]:P=e}function I(){if(P){var e=P,t=M;if(M=P=null,L(e),t)for(e=0;e<t.length;e++)L(t[e])}}function A(e,t){return e(t)}function j(e,t,n,o,r){return e(t,n,o,r)}function R(){}var D=A,N=!1,F=!1;function H(){null===P&&null===M||(R(),I())}function U(e,t,n){if(F)return e(t,n);F=!0;try{return D(e,t,n)}finally{F=!1,H()}}var z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,q={},$={};function W(e,t,n,o,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Y[e]=new W(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Y[t]=new W(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Y[e]=new W(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Y[e]=new W(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Y[e]=new W(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Y[e]=new W(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Y[e]=new W(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Y[e]=new W(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Y[e]=new W(e,5,!1,e.toLowerCase(),null,!1)}));var X=/[\-:]([a-z])/g;function K(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(X,K);Y[t]=new W(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(X,K);Y[t]=new W(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(X,K);Y[t]=new W(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Y[e]=new W(e,1,!1,e.toLowerCase(),null,!1)})),Y.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Y[e]=new W(e,1,!1,e.toLowerCase(),null,!0)}));var Q=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function G(e,t,n,o){var r=Y.hasOwnProperty(t)?Y[t]:null;(null!==r?0===r.type:!o&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,o){if(null==t||function(e,t,n,o){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!o&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,o))return!0;if(o)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,o)&&(n=null),o||null===r?function(e){return!!V.call($,e)||!V.call(q,e)&&(z.test(e)?$[e]=!0:(q[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,o=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,o?e.setAttributeNS(o,t,n):e.setAttribute(t,n))))}Q.hasOwnProperty("ReactCurrentDispatcher")||(Q.ReactCurrentDispatcher={current:null}),Q.hasOwnProperty("ReactCurrentBatchConfig")||(Q.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,J="function"==typeof Symbol&&Symbol.for,ee=J?Symbol.for("react.element"):60103,te=J?Symbol.for("react.portal"):60106,ne=J?Symbol.for("react.fragment"):60107,oe=J?Symbol.for("react.strict_mode"):60108,re=J?Symbol.for("react.profiler"):60114,ie=J?Symbol.for("react.provider"):60109,ae=J?Symbol.for("react.context"):60110,se=J?Symbol.for("react.concurrent_mode"):60111,le=J?Symbol.for("react.forward_ref"):60112,ce=J?Symbol.for("react.suspense"):60113,ue=J?Symbol.for("react.suspense_list"):60120,de=J?Symbol.for("react.memo"):60115,pe=J?Symbol.for("react.lazy"):60116,fe=J?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case re:return"Profiler";case oe:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ge(e.type);case fe:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var o=e._debugOwner,r=e._debugSource,i=ge(e.type);n=null,o&&(n=ge(o.type)),o=i,i="",r?i=" (at "+r.fileName.replace(Z,"")+":"+r.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(o||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ve(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){o=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(e){o=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=be(e)?e.checked?"true":"false":e.value),(e=o)!==n&&(t.setValue(e),!0)}function xe(e,t){var n=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Se(e,t){var n=null==t.defaultValue?"":t.defaultValue,o=null!=t.checked?t.checked:t.defaultChecked;n=ve(null!=t.value?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ee(e,t){null!=(t=t.checked)&&G(e,"checked",t,!1)}function Ce(e,t){Ee(e,t);var n=ve(t.value),o=t.type;if(null!=n)"number"===o?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===o||"reset"===o)return void e.removeAttribute("value");t.hasOwnProperty("value")?Te(e,t.type,n):t.hasOwnProperty("defaultValue")&&Te(e,t.type,ve(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function _e(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!("submit"!==o&&"reset"!==o||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Te(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Oe(e,t){return e=r({children:void 0},t),(t=function(e){var t="";return o.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Pe(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&o&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(o&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function Me(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return r({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Be(e,t){var n=ve(t.value),o=ve(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=o&&(e.defaultValue=""+o)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ae="http://www.w3.org/1999/xhtml",je="http://www.w3.org/2000/svg";function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function De(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ne,Fe=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,o,r){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==je||"innerHTML"in e)e.innerHTML=t;else{for((Ne=Ne||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function He(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ue(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ze={animationend:Ue("Animation","AnimationEnd"),animationiteration:Ue("Animation","AnimationIteration"),animationstart:Ue("Animation","AnimationStart"),transitionend:Ue("Transition","TransitionEnd")},Ve={},qe={};function $e(e){if(Ve[e])return Ve[e];if(!ze[e])return e;var t,n=ze[e];for(t in n)if(n.hasOwnProperty(t)&&t in qe)return Ve[e]=n[t];return e}T&&(qe=document.createElement("div").style,"AnimationEvent"in window||(delete ze.animationend.animation,delete ze.animationiteration.animation,delete ze.animationstart.animation),"TransitionEvent"in window||delete ze.transitionend.transition);var We=$e("animationend"),Ye=$e("animationiteration"),Xe=$e("animationstart"),Ke=$e("transitionend"),Qe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ge=new("function"==typeof WeakMap?WeakMap:Map);function Ze(e){var t=Ge.get(e);return void 0===t&&(t=new Map,Ge.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function tt(e){if(Je(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,o=t;;){var r=n.return;if(null===r)break;var i=r.alternate;if(null===i){if(null!==(o=r.return)){n=o;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return tt(r),e;if(i===o)return tt(r),t;i=i.sibling}throw Error(a(188))}if(n.return!==o.return)n=r,o=i;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,o=i;break}if(l===o){s=!0,o=r,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,o=r;break}if(l===o){s=!0,o=i,n=r;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==o)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function ot(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var o=0;o<t.length&&!e.isPropagationStopped();o++)y(e,t[o],n[o]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function st(e){if(null!==e&&(it=ot(it,e)),e=it,it=null,e){if(rt(e,at),it)throw Error(a(95));if(u)throw e=d,u=!1,d=null,e}}function lt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ct(e){if(!T)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ut=[];function dt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ut.length&&ut.push(e)}function pt(e,t,n,o){if(ut.length){var r=ut.pop();return r.topLevelType=e,r.eventSystemFlags=o,r.nativeEvent=t,r.targetInst=n,r}return{topLevelType:e,eventSystemFlags:o,nativeEvent:t,targetInst:n,ancestors:[]}}function ft(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var o=n;if(3===o.tag)o=o.stateNode.containerInfo;else{for(;o.return;)o=o.return;o=3!==o.tag?null:o.stateNode.containerInfo}if(!o)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Tn(o)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var r=lt(e.nativeEvent);o=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,l=0;l<x.length;l++){var c=x[l];c&&(c=c.extractEvents(o,t,i,r,a))&&(s=ot(s,c))}st(s)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":Xt(t,"scroll",!0);break;case"focus":case"blur":Xt(t,"focus",!0),Xt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ct(e)&&Xt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Qe.indexOf(e)&&Yt(e,t)}n.set(e,null)}}var mt,gt,yt,vt=!1,bt=[],wt=null,kt=null,xt=null,St=new Map,Et=new Map,Ct=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Tt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ot(e,t,n,o,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r,container:o}}function Pt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":St.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Et.delete(t.pointerId)}}function Mt(e,t,n,o,r,i){return null===e||e.nativeEvent!==i?(e=Ot(t,n,o,r,i),null!==t&&null!==(t=On(t))&&gt(t),e):(e.eventSystemFlags|=o,e)}function Lt(e){var t=Tn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){yt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=On(t);return null!==n&&gt(n),e.blockedOn=t,!1}return!0}function It(e,t,n){Bt(e)&&n.delete(t)}function At(){for(vt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=On(e.blockedOn))&&mt(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&Bt(wt)&&(wt=null),null!==kt&&Bt(kt)&&(kt=null),null!==xt&&Bt(xt)&&(xt=null),St.forEach(It),Et.forEach(It)}function jt(e,t){e.blockedOn===t&&(e.blockedOn=null,vt||(vt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,At)))}function Rt(e){function t(t){return jt(t,e)}if(0<bt.length){jt(bt[0],e);for(var n=1;n<bt.length;n++){var o=bt[n];o.blockedOn===e&&(o.blockedOn=null)}}for(null!==wt&&jt(wt,e),null!==kt&&jt(kt,e),null!==xt&&jt(xt,e),St.forEach(t),Et.forEach(t),n=0;n<Ct.length;n++)(o=Ct[n]).blockedOn===e&&(o.blockedOn=null);for(;0<Ct.length&&null===(n=Ct[0]).blockedOn;)Lt(n),null===n.blockedOn&&Ct.shift()}var Dt={},Nt=new Map,Ft=new Map,Ht=["abort","abort",We,"animationEnd",Ye,"animationIteration",Xe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ke,"transitionEnd","waiting","waiting"];function Ut(e,t){for(var n=0;n<e.length;n+=2){var o=e[n],r=e[n+1],i="on"+(r[0].toUpperCase()+r.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[o],eventPriority:t},Ft.set(o,t),Nt.set(o,i),Dt[r]=i}}Ut("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ut("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ut(Ht,2);for(var zt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Vt=0;Vt<zt.length;Vt++)Ft.set(zt[Vt],0);var qt=i.unstable_UserBlockingPriority,$t=i.unstable_runWithPriority,Wt=!0;function Yt(e,t){Xt(t,e,!1)}function Xt(e,t,n){var o=Ft.get(t);switch(void 0===o?2:o){case 0:o=Kt.bind(null,t,1,e);break;case 1:o=Qt.bind(null,t,1,e);break;default:o=Gt.bind(null,t,1,e)}n?e.addEventListener(t,o,!0):e.addEventListener(t,o,!1)}function Kt(e,t,n,o){N||R();var r=Gt,i=N;N=!0;try{j(r,e,t,n,o)}finally{(N=i)||H()}}function Qt(e,t,n,o){$t(qt,Gt.bind(null,e,t,n,o))}function Gt(e,t,n,o){if(Wt)if(0<bt.length&&-1<_t.indexOf(e))e=Ot(null,e,t,n,o),bt.push(e);else{var r=Zt(e,t,n,o);if(null===r)Pt(e,o);else if(-1<_t.indexOf(e))e=Ot(r,e,t,n,o),bt.push(e);else if(!function(e,t,n,o,r){switch(t){case"focus":return wt=Mt(wt,e,t,n,o,r),!0;case"dragenter":return kt=Mt(kt,e,t,n,o,r),!0;case"mouseover":return xt=Mt(xt,e,t,n,o,r),!0;case"pointerover":var i=r.pointerId;return St.set(i,Mt(St.get(i)||null,e,t,n,o,r)),!0;case"gotpointercapture":return i=r.pointerId,Et.set(i,Mt(Et.get(i)||null,e,t,n,o,r)),!0}return!1}(r,e,t,n,o)){Pt(e,o),e=pt(e,o,null,t);try{U(ft,e)}finally{dt(e)}}}}function Zt(e,t,n,o){if(null!==(n=Tn(n=lt(o)))){var r=Je(n);if(null===r)n=null;else{var i=r.tag;if(13===i){if(null!==(n=et(r)))return n;n=null}else if(3===i){if(r.stateNode.hydrate)return 3===r.tag?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}e=pt(e,o,n,t);try{U(ft,e)}finally{dt(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var o=0===n.indexOf("--"),r=tn(n,t[n],o);"float"===n&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}Object.keys(Jt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var on=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(on[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Ae;function ln(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=C[t];for(var o=0;o<t.length;o++)ht(t[o],e,n)}function cn(){}function un(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function dn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pn(e,t){var n,o=dn(e);for(e=0;o;){if(3===o.nodeType){if(n=e+o.textContent.length,e<=t&&n>=t)return{node:o,offset:t-e};e=n}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=dn(o)}}function fn(){for(var e=window,t=un();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=un((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mn=null,gn=null;function yn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function vn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function kn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function xn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Sn=Math.random().toString(36).slice(2),En="__reactInternalInstance$"+Sn,Cn="__reactEventHandlers$"+Sn,_n="__reactContainere$"+Sn;function Tn(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_n]||n[En]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=xn(e);null!==e;){if(n=e[En])return n;e=xn(e)}return t}n=(e=n).parentNode}return null}function On(e){return!(e=e[En]||e[_n])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Pn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Mn(e){return e[Cn]||null}function Ln(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Bn(e,t){var n=e.stateNode;if(!n)return null;var o=h(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function In(e,t,n){(t=Bn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function An(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Ln(t);for(t=n.length;0<t--;)In(n[t],"captured",e);for(t=0;t<n.length;t++)In(n[t],"bubbled",e)}}function jn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Bn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function Rn(e){e&&e.dispatchConfig.registrationName&&jn(e._targetInst,null,e)}function Dn(e){rt(e,An)}var Nn=null,Fn=null,Hn=null;function Un(){if(Hn)return Hn;var e,t,n=Fn,o=n.length,r="value"in Nn?Nn.value:Nn.textContent,i=r.length;for(e=0;e<o&&n[e]===r[e];e++);var a=o-e;for(t=1;t<=a&&n[o-t]===r[i-t];t++);return Hn=r.slice(e,1<t?1-t:void 0)}function zn(){return!0}function Vn(){return!1}function qn(e,t,n,o){for(var r in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(r)&&((t=e[r])?this[r]=t(n):"target"===r?this.target=o:this[r]=n[r]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?zn:Vn,this.isPropagationStopped=Vn,this}function $n(e,t,n,o){if(this.eventPool.length){var r=this.eventPool.pop();return this.call(r,e,t,n,o),r}return new this(e,t,n,o)}function Wn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Yn(e){e.eventPool=[],e.getPooled=$n,e.release=Wn}r(qn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=zn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=zn)},persist:function(){this.isPersistent=zn},isPersistent:Vn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Vn,this._dispatchInstances=this._dispatchListeners=null}}),qn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qn.extend=function(e){function t(){}function n(){return o.apply(this,arguments)}var o=this;t.prototype=o.prototype;var i=new t;return r(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=r({},o.Interface,e),n.extend=o.extend,Yn(n),n},Yn(qn);var Xn=qn.extend({data:null}),Kn=qn.extend({data:null}),Qn=[9,13,27,32],Gn=T&&"CompositionEvent"in window,Zn=null;T&&"documentMode"in document&&(Zn=document.documentMode);var Jn=T&&"TextEvent"in window&&!Zn,eo=T&&(!Gn||Zn&&8<Zn&&11>=Zn),to=String.fromCharCode(32),no={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},oo=!1;function ro(e,t){switch(e){case"keyup":return-1!==Qn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function io(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ao=!1,so={eventTypes:no,extractEvents:function(e,t,n,o){var r;if(Gn)e:{switch(e){case"compositionstart":var i=no.compositionStart;break e;case"compositionend":i=no.compositionEnd;break e;case"compositionupdate":i=no.compositionUpdate;break e}i=void 0}else ao?ro(e,n)&&(i=no.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=no.compositionStart);return i?(eo&&"ko"!==n.locale&&(ao||i!==no.compositionStart?i===no.compositionEnd&&ao&&(r=Un()):(Fn="value"in(Nn=o)?Nn.value:Nn.textContent,ao=!0)),i=Xn.getPooled(i,t,n,o),(r||null!==(r=io(n)))&&(i.data=r),Dn(i),r=i):r=null,(e=Jn?function(e,t){switch(e){case"compositionend":return io(t);case"keypress":return 32!==t.which?null:(oo=!0,to);case"textInput":return(e=t.data)===to&&oo?null:e;default:return null}}(e,n):function(e,t){if(ao)return"compositionend"===e||!Gn&&ro(e,t)?(e=Un(),Hn=Fn=Nn=null,ao=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return eo&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Kn.getPooled(no.beforeInput,t,n,o)).data=e,Dn(t)):t=null,null===r?t:null===t?r:[r,t]}},lo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lo[e.type]:"textarea"===t}var uo={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function po(e,t,n){return(e=qn.getPooled(uo.change,e,t,n)).type="change",B(n),Dn(e),e}var fo=null,ho=null;function mo(e){st(e)}function go(e){if(ke(Pn(e)))return e}function yo(e,t){if("change"===e)return t}var vo=!1;function bo(){fo&&(fo.detachEvent("onpropertychange",wo),ho=fo=null)}function wo(e){if("value"===e.propertyName&&go(ho))if(e=po(ho,e,lt(e)),N)st(e);else{N=!0;try{A(mo,e)}finally{N=!1,H()}}}function ko(e,t,n){"focus"===e?(bo(),ho=n,(fo=t).attachEvent("onpropertychange",wo)):"blur"===e&&bo()}function xo(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return go(ho)}function So(e,t){if("click"===e)return go(t)}function Eo(e,t){if("input"===e||"change"===e)return go(t)}T&&(vo=ct("input")&&(!document.documentMode||9<document.documentMode));var Co={eventTypes:uo,_isInputEventSupported:vo,extractEvents:function(e,t,n,o){var r=t?Pn(t):window,i=r.nodeName&&r.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===r.type)var a=yo;else if(co(r))if(vo)a=Eo;else{a=xo;var s=ko}else(i=r.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===r.type||"radio"===r.type)&&(a=So);if(a&&(a=a(e,t)))return po(a,n,o);s&&s(e,r,t),"blur"===e&&(e=r._wrapperState)&&e.controlled&&"number"===r.type&&Te(r,"number",r.value)}},_o=qn.extend({view:null,detail:null}),To={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Oo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=To[e])&&!!t[e]}function Po(){return Oo}var Mo=0,Lo=0,Bo=!1,Io=!1,Ao=_o.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Po,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Mo;return Mo=e.screenX,Bo?"mousemove"===e.type?e.screenX-t:0:(Bo=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Lo;return Lo=e.screenY,Io?"mousemove"===e.type?e.screenY-t:0:(Io=!0,0)}}),jo=Ao.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ro={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Do={eventTypes:Ro,extractEvents:function(e,t,n,o,r){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&!(32&r)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=o.window===o?o:(i=o.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Tn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Ao,l=Ro.mouseLeave,c=Ro.mouseEnter,u="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=jo,l=Ro.pointerLeave,c=Ro.pointerEnter,u="pointer");if(e=null==a?i:Pn(a),i=null==t?i:Pn(t),(l=s.getPooled(l,a,n,o)).type=u+"leave",l.target=e,l.relatedTarget=i,(n=s.getPooled(c,t,n,o)).type=u+"enter",n.target=i,n.relatedTarget=e,u=t,(o=a)&&u)e:{for(c=u,a=0,e=s=o;e;e=Ln(e))a++;for(e=0,t=c;t;t=Ln(t))e++;for(;0<a-e;)s=Ln(s),a--;for(;0<e-a;)c=Ln(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=Ln(s),c=Ln(c)}s=null}else s=null;for(c=s,s=[];o&&o!==c&&(null===(a=o.alternate)||a!==c);)s.push(o),o=Ln(o);for(o=[];u&&u!==c&&(null===(a=u.alternate)||a!==c);)o.push(u),u=Ln(u);for(u=0;u<s.length;u++)jn(s[u],"bubbled",l);for(u=o.length;0<u--;)jn(o[u],"captured",n);return 64&r?[l,n]:[l]}},No="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fo=Object.prototype.hasOwnProperty;function Ho(e,t){if(No(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++)if(!Fo.call(t,n[o])||!No(e[n[o]],t[n[o]]))return!1;return!0}var Uo=T&&"documentMode"in document&&11>=document.documentMode,zo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vo=null,qo=null,$o=null,Wo=!1;function Yo(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Wo||null==Vo||Vo!==un(n)?null:(n="selectionStart"in(n=Vo)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},$o&&Ho($o,n)?null:($o=n,(e=qn.getPooled(zo.select,qo,e,t)).type="select",e.target=Vo,Dn(e),e))}var Xo={eventTypes:zo,extractEvents:function(e,t,n,o,r,i){if(!(i=!(r=i||(o.window===o?o.document:9===o.nodeType?o:o.ownerDocument)))){e:{r=Ze(r),i=C.onSelect;for(var a=0;a<i.length;a++)if(!r.has(i[a])){r=!1;break e}r=!0}i=!r}if(i)return null;switch(r=t?Pn(t):window,e){case"focus":(co(r)||"true"===r.contentEditable)&&(Vo=r,qo=t,$o=null);break;case"blur":$o=qo=Vo=null;break;case"mousedown":Wo=!0;break;case"contextmenu":case"mouseup":case"dragend":return Wo=!1,Yo(n,o);case"selectionchange":if(Uo)break;case"keydown":case"keyup":return Yo(n,o)}return null}},Ko=qn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qo=qn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Go=_o.extend({relatedTarget:null});function Zo(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},er={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tr=_o.extend({key:function(e){if(e.key){var t=Jo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Zo(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?er[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Po,charCode:function(e){return"keypress"===e.type?Zo(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Zo(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),nr=Ao.extend({dataTransfer:null}),or=_o.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Po}),rr=qn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ir=Ao.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ar={eventTypes:Dt,extractEvents:function(e,t,n,o){var r=Nt.get(e);if(!r)return null;switch(e){case"keypress":if(0===Zo(n))return null;case"keydown":case"keyup":e=tr;break;case"blur":case"focus":e=Go;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Ao;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=nr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=or;break;case We:case Ye:case Xe:e=Ko;break;case Ke:e=rr;break;case"scroll":e=_o;break;case"wheel":e=ir;break;case"copy":case"cut":case"paste":e=Qo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=jo;break;default:e=qn}return Dn(t=e.getPooled(r,t,n,o)),t}};if(v)throw Error(a(101));v=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Mn,m=On,g=Pn,_({SimpleEventPlugin:ar,EnterLeaveEventPlugin:Do,ChangeEventPlugin:Co,SelectEventPlugin:Xo,BeforeInputEventPlugin:so});var sr=[],lr=-1;function cr(e){0>lr||(e.current=sr[lr],sr[lr]=null,lr--)}function ur(e,t){lr++,sr[lr]=e.current,e.current=t}var dr={},pr={current:dr},fr={current:!1},hr=dr;function mr(e,t){var n=e.type.contextTypes;if(!n)return dr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r,i={};for(r in n)i[r]=t[r];return o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function gr(e){return null!=e.childContextTypes}function yr(){cr(fr),cr(pr)}function vr(e,t,n){if(pr.current!==dr)throw Error(a(168));ur(pr,t),ur(fr,n)}function br(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,"function"!=typeof o.getChildContext)return n;for(var i in o=o.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return r({},n,{},o)}function wr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dr,hr=pr.current,ur(pr,e),ur(fr,fr.current),!0}function kr(e,t,n){var o=e.stateNode;if(!o)throw Error(a(169));n?(e=br(e,t,hr),o.__reactInternalMemoizedMergedChildContext=e,cr(fr),cr(pr),ur(pr,e)):cr(fr),ur(fr,n)}var xr=i.unstable_runWithPriority,Sr=i.unstable_scheduleCallback,Er=i.unstable_cancelCallback,Cr=i.unstable_requestPaint,_r=i.unstable_now,Tr=i.unstable_getCurrentPriorityLevel,Or=i.unstable_ImmediatePriority,Pr=i.unstable_UserBlockingPriority,Mr=i.unstable_NormalPriority,Lr=i.unstable_LowPriority,Br=i.unstable_IdlePriority,Ir={},Ar=i.unstable_shouldYield,jr=void 0!==Cr?Cr:function(){},Rr=null,Dr=null,Nr=!1,Fr=_r(),Hr=1e4>Fr?_r:function(){return _r()-Fr};function Ur(){switch(Tr()){case Or:return 99;case Pr:return 98;case Mr:return 97;case Lr:return 96;case Br:return 95;default:throw Error(a(332))}}function zr(e){switch(e){case 99:return Or;case 98:return Pr;case 97:return Mr;case 96:return Lr;case 95:return Br;default:throw Error(a(332))}}function Vr(e,t){return e=zr(e),xr(e,t)}function qr(e,t,n){return e=zr(e),Sr(e,t,n)}function $r(e){return null===Rr?(Rr=[e],Dr=Sr(Or,Yr)):Rr.push(e),Ir}function Wr(){if(null!==Dr){var e=Dr;Dr=null,Er(e)}Yr()}function Yr(){if(!Nr&&null!==Rr){Nr=!0;var e=0;try{var t=Rr;Vr(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Rr=null}catch(t){throw null!==Rr&&(Rr=Rr.slice(e+1)),Sr(Or,Wr),t}finally{Nr=!1}}}function Xr(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Kr(e,t){if(e&&e.defaultProps)for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Qr={current:null},Gr=null,Zr=null,Jr=null;function ei(){Jr=Zr=Gr=null}function ti(e){var t=Qr.current;cr(Qr),e.type._context._currentValue=t}function ni(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function oi(e,t){Gr=e,Jr=Zr=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Ma=!0),e.firstContext=null)}function ri(e,t){if(Jr!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Jr=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Zr){if(null===Gr)throw Error(a(308));Zr=t,Gr.dependencies={expirationTime:0,firstContext:t,responders:null}}else Zr=Zr.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function si(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ci(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ui(e,t){var n=e.alternate;null!==n&&si(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function di(e,t,n,o){var i=e.updateQueue;ii=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var l=a.next;a.next=s.next,s.next=l}a=s,i.shared.pending=null,null!==(l=e.alternate)&&null!==(l=l.updateQueue)&&(l.baseQueue=s)}if(null!==a){l=a.next;var c=i.baseState,u=0,d=null,p=null,f=null;if(null!==l)for(var h=l;;){if((s=h.expirationTime)<o){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===f?(p=f=m,d=c):f=f.next=m,s>u&&(u=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),il(s,h.suspenseConfig);e:{var g=e,y=h;switch(s=t,m=n,y.tag){case 1:if("function"==typeof(g=y.payload)){c=g.call(m,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=y.payload)?g.call(m,c,s):g))break e;c=r({},c,s);break e;case 2:ii=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===l){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=l,i.baseQueue=a=s,i.shared.pending=null}}null===f?d=c:f.next=p,i.baseState=d,i.baseQueue=f,al(u),e.expirationTime=u,e.memoizedState=c}}function pi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],r=o.callback;if(null!==r){if(o.callback=null,o=r,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var fi=Q.ReactCurrentBatchConfig,hi=(new o.Component).refs;function mi(e,t,n,o){n=null==(n=n(o,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var o=Ws(),r=fi.suspense;(r=li(o=Ys(o,e,r),r)).payload=t,null!=n&&(r.callback=n),ci(e,r),Xs(e,o)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var o=Ws(),r=fi.suspense;(r=li(o=Ys(o,e,r),r)).tag=1,r.payload=t,null!=n&&(r.callback=n),ci(e,r),Xs(e,o)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ws(),o=fi.suspense;(o=li(n=Ys(n,e,o),o)).tag=2,null!=t&&(o.callback=t),ci(e,o),Xs(e,n)}};function yi(e,t,n,o,r,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(o,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Ho(n,o)&&Ho(r,i))}function vi(e,t,n){var o=!1,r=dr,i=t.contextType;return"object"==typeof i&&null!==i?i=ri(i):(r=gr(t)?hr:pr.current,i=(o=null!=(o=t.contextTypes))?mr(e,r):dr),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternalFiber=e,o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,o){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,o),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function wi(e,t,n,o){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=hi,ai(e);var i=t.contextType;"object"==typeof i&&null!==i?r.context=ri(i):(i=gr(t)?hr:pr.current,r.context=mr(e,i)),di(e,n,r,o),r.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(mi(e,t,i,n),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&gi.enqueueReplaceState(r,r.state,null),di(e,n,r,o),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var ki=Array.isArray;function xi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var o=n.stateNode}if(!o)throw Error(a(147,e));var r=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===r?t.ref:((t=function(e){var t=o.refs;t===hi&&(t=o.refs={}),null===e?delete t[r]:t[r]=e})._stringRef=r,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Si(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Ei(e){function t(t,n){if(e){var o=t.lastEffect;null!==o?(o.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,o){if(!e)return null;for(;null!==o;)t(n,o),o=o.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=_l(e,t)).index=0,e.sibling=null,e}function i(t,n,o){return t.index=o,e?null!==(o=t.alternate)?(o=o.index)<n?(t.effectTag=2,n):o:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,o){return null===t||6!==t.tag?((t=Pl(n,e.mode,o)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,o){return null!==t&&t.elementType===n.type?((o=r(t,n.props)).ref=xi(e,t,n),o.return=e,o):((o=Tl(n.type,n.key,n.props,null,e.mode,o)).ref=xi(e,t,n),o.return=e,o)}function u(e,t,n,o){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ml(n,e.mode,o)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,o,i){return null===t||7!==t.tag?((t=Ol(n,e.mode,o,i)).return=e,t):((t=r(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Pl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Tl(t.type,t.key,t.props,null,e.mode,n)).ref=xi(e,null,t),n.return=e,n;case te:return(t=Ml(t,e.mode,n)).return=e,t}if(ki(t)||me(t))return(t=Ol(t,e.mode,n,null)).return=e,t;Si(e,t)}return null}function f(e,t,n,o){var r=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==r?null:l(e,t,""+n,o);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===r?n.type===ne?d(e,t,n.props.children,o,r):c(e,t,n,o):null;case te:return n.key===r?u(e,t,n,o):null}if(ki(n)||me(n))return null!==r?null:d(e,t,n,o,null);Si(e,n)}return null}function h(e,t,n,o,r){if("string"==typeof o||"number"==typeof o)return l(t,e=e.get(n)||null,""+o,r);if("object"==typeof o&&null!==o){switch(o.$$typeof){case ee:return e=e.get(null===o.key?n:o.key)||null,o.type===ne?d(t,e,o.props.children,r,o.key):c(t,e,o,r);case te:return u(t,e=e.get(null===o.key?n:o.key)||null,o,r)}if(ki(o)||me(o))return d(t,e=e.get(n)||null,o,r,null);Si(t,o)}return null}function m(r,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=f(r,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(r,d),a=i(y,a,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return n(r,d),c;if(null===d){for(;m<s.length;m++)null!==(d=p(r,s[m],l))&&(a=i(d,a,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=o(r,d);m<s.length;m++)null!==(g=h(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=i(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(r,e)})),c}function g(r,s,l,c){var u=me(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=f(r,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(r,m),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b,m=y}if(v.done)return n(r,m),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=p(r,v.value,c))&&(s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return u}for(m=o(r,m);!v.done;g++,v=l.next())null!==(v=h(m,r,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(r,e)})),u}return function(e,o,i,l){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case ee:e:{for(u=i.key,c=o;null!==c;){if(c.key===u){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(o=r(c,i.props.children)).return=e,e=o;break e}}else if(c.elementType===i.type){n(e,c.sibling),(o=r(c,i.props)).ref=xi(e,c,i),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((o=Ol(i.props.children,e.mode,l,i.key)).return=e,e=o):((l=Tl(i.type,i.key,i.props,null,e.mode,l)).ref=xi(e,o,i),l.return=e,e=l)}return s(e);case te:e:{for(c=i.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(e,o.sibling),(o=r(o,i.children||[])).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=Ml(i,e.mode,l)).return=e,e=o}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==o&&6===o.tag?(n(e,o.sibling),(o=r(o,i)).return=e,e=o):(n(e,o),(o=Pl(i,e.mode,l)).return=e,e=o),s(e);if(ki(i))return m(e,o,i,l);if(me(i))return g(e,o,i,l);if(u&&Si(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,o)}}var Ci=Ei(!0),_i=Ei(!1),Ti={},Oi={current:Ti},Pi={current:Ti},Mi={current:Ti};function Li(e){if(e===Ti)throw Error(a(174));return e}function Bi(e,t){switch(ur(Mi,t),ur(Pi,e),ur(Oi,Ti),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:De(null,"");break;default:t=De(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}cr(Oi),ur(Oi,t)}function Ii(){cr(Oi),cr(Pi),cr(Mi)}function Ai(e){Li(Mi.current);var t=Li(Oi.current),n=De(t,e.type);t!==n&&(ur(Pi,e),ur(Oi,n))}function ji(e){Pi.current===e&&(cr(Oi),cr(Pi))}var Ri={current:0};function Di(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(64&t.effectTag)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Ni(e,t){return{responder:e,props:t}}var Fi=Q.ReactCurrentDispatcher,Hi=Q.ReactCurrentBatchConfig,Ui=0,zi=null,Vi=null,qi=null,$i=!1;function Wi(){throw Error(a(321))}function Yi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!No(e[n],t[n]))return!1;return!0}function Xi(e,t,n,o,r,i){if(Ui=i,zi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Fi.current=null===e||null===e.memoizedState?ya:va,e=n(o,r),t.expirationTime===Ui){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,qi=Vi=null,t.updateQueue=null,Fi.current=ba,e=n(o,r)}while(t.expirationTime===Ui)}if(Fi.current=ga,t=null!==Vi&&null!==Vi.next,Ui=0,qi=Vi=zi=null,$i=!1,t)throw Error(a(300));return e}function Ki(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qi?zi.memoizedState=qi=e:qi=qi.next=e,qi}function Qi(){if(null===Vi){var e=zi.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===qi?zi.memoizedState:qi.next;if(null!==t)qi=t,Vi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===qi?zi.memoizedState=qi=e:qi=qi.next=e}return qi}function Gi(e,t){return"function"==typeof t?t(e):t}function Zi(e){var t=Qi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var o=Vi,r=o.baseQueue,i=n.pending;if(null!==i){if(null!==r){var s=r.next;r.next=i.next,i.next=s}o.baseQueue=r=i,n.pending=null}if(null!==r){r=r.next,o=o.baseState;var l=s=i=null,c=r;do{var u=c.expirationTime;if(u<Ui){var d={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,i=o):l=l.next=d,u>zi.expirationTime&&(zi.expirationTime=u,al(u))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),il(u,c.suspenseConfig),o=c.eagerReducer===e?c.eagerState:e(o,c.action);c=c.next}while(null!==c&&c!==r);null===l?i=o:l.next=s,No(o,t.memoizedState)||(Ma=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function Ji(e){var t=Qi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var o=n.dispatch,r=n.pending,i=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{i=e(i,s.action),s=s.next}while(s!==r);No(i,t.memoizedState)||(Ma=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,o]}function ea(e){var t=Ki();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:e}).dispatch=ma.bind(null,zi,e),[t.memoizedState,e]}function ta(e,t,n,o){return e={tag:e,create:t,destroy:n,deps:o,next:null},null===(t=zi.updateQueue)?(t={lastEffect:null},zi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function na(){return Qi().memoizedState}function oa(e,t,n,o){var r=Ki();zi.effectTag|=e,r.memoizedState=ta(1|t,n,void 0,void 0===o?null:o)}function ra(e,t,n,o){var r=Qi();o=void 0===o?null:o;var i=void 0;if(null!==Vi){var a=Vi.memoizedState;if(i=a.destroy,null!==o&&Yi(o,a.deps))return void ta(t,n,i,o)}zi.effectTag|=e,r.memoizedState=ta(1|t,n,i,o)}function ia(e,t){return oa(516,4,e,t)}function aa(e,t){return ra(516,4,e,t)}function sa(e,t){return ra(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ca(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,la.bind(null,t,e),n)}function ua(){}function da(e,t){return Ki().memoizedState=[e,void 0===t?null:t],e}function pa(e,t){var n=Qi();t=void 0===t?null:t;var o=n.memoizedState;return null!==o&&null!==t&&Yi(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function fa(e,t){var n=Qi();t=void 0===t?null:t;var o=n.memoizedState;return null!==o&&null!==t&&Yi(t,o[1])?o[0]:(e=e(),n.memoizedState=[e,t],e)}function ha(e,t,n){var o=Ur();Vr(98>o?98:o,(function(){e(!0)})),Vr(97<o?97:o,(function(){var o=Hi.suspense;Hi.suspense=void 0===t?null:t;try{e(!1),n()}finally{Hi.suspense=o}}))}function ma(e,t,n){var o=Ws(),r=fi.suspense;r={expirationTime:o=Ys(o,e,r),suspenseConfig:r,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?r.next=r:(r.next=i.next,i.next=r),t.pending=r,i=e.alternate,e===zi||null!==i&&i===zi)$i=!0,r.expirationTime=Ui,zi.expirationTime=Ui;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(r.eagerReducer=i,r.eagerState=s,No(s,a))return}catch(e){}Xs(e,o)}}var ga={readContext:ri,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useLayoutEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useResponder:Wi,useDeferredValue:Wi,useTransition:Wi},ya={readContext:ri,useCallback:da,useContext:ri,useEffect:ia,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,oa(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oa(4,2,e,t)},useMemo:function(e,t){var n=Ki();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=Ki();return t=void 0!==n?n(t):t,o.memoizedState=o.baseState=t,e=(e=o.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ma.bind(null,zi,e),[o.memoizedState,e]},useRef:function(e){return e={current:e},Ki().memoizedState=e},useState:ea,useDebugValue:ua,useResponder:Ni,useDeferredValue:function(e,t){var n=ea(e),o=n[0],r=n[1];return ia((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{r(e)}finally{Hi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[da(ha.bind(null,t,e),[t,e]),n]}},va={readContext:ri,useCallback:pa,useContext:ri,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:fa,useReducer:Zi,useRef:na,useState:function(){return Zi(Gi)},useDebugValue:ua,useResponder:Ni,useDeferredValue:function(e,t){var n=Zi(Gi),o=n[0],r=n[1];return aa((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{r(e)}finally{Hi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=Zi(Gi),n=t[0];return t=t[1],[pa(ha.bind(null,t,e),[t,e]),n]}},ba={readContext:ri,useCallback:pa,useContext:ri,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:fa,useReducer:Ji,useRef:na,useState:function(){return Ji(Gi)},useDebugValue:ua,useResponder:Ni,useDeferredValue:function(e,t){var n=Ji(Gi),o=n[0],r=n[1];return aa((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{r(e)}finally{Hi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=Ji(Gi),n=t[0];return t=t[1],[pa(ha.bind(null,t,e),[t,e]),n]}},wa=null,ka=null,xa=!1;function Sa(e,t){var n=El(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ea(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ca(e){if(xa){var t=ka;if(t){var n=t;if(!Ea(e,t)){if(!(t=kn(n.nextSibling))||!Ea(e,t))return e.effectTag=-1025&e.effectTag|2,xa=!1,void(wa=e);Sa(wa,n)}wa=e,ka=kn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,xa=!1,wa=e}}function _a(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function Ta(e){if(e!==wa)return!1;if(!xa)return _a(e),xa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!vn(t,e.memoizedProps))for(t=ka;t;)Sa(e,t),t=kn(t.nextSibling);if(_a(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ka=kn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ka=null}}else ka=wa?kn(e.stateNode.nextSibling):null;return!0}function Oa(){ka=wa=null,xa=!1}var Pa=Q.ReactCurrentOwner,Ma=!1;function La(e,t,n,o){t.child=null===e?_i(t,null,n,o):Ci(t,e.child,n,o)}function Ba(e,t,n,o,r){n=n.render;var i=t.ref;return oi(t,r),o=Xi(e,t,n,o,i,r),null===e||Ma?(t.effectTag|=1,La(e,t,o,r),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Xa(e,t,r))}function Ia(e,t,n,o,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Cl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Tl(n.type,null,o,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Aa(e,t,a,o,r,i))}return a=e.child,r<i&&(r=a.memoizedProps,(n=null!==(n=n.compare)?n:Ho)(r,o)&&e.ref===t.ref)?Xa(e,t,i):(t.effectTag|=1,(e=_l(a,o)).ref=t.ref,e.return=t,t.child=e)}function Aa(e,t,n,o,r,i){return null!==e&&Ho(e.memoizedProps,o)&&e.ref===t.ref&&(Ma=!1,r<i)?(t.expirationTime=e.expirationTime,Xa(e,t,i)):Ra(e,t,n,o,i)}function ja(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ra(e,t,n,o,r){var i=gr(n)?hr:pr.current;return i=mr(t,i),oi(t,r),n=Xi(e,t,n,o,i,r),null===e||Ma?(t.effectTag|=1,La(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Xa(e,t,r))}function Da(e,t,n,o,r){if(gr(n)){var i=!0;wr(t)}else i=!1;if(oi(t,r),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),vi(t,n,o),wi(t,n,o,r),o=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;c="object"==typeof c&&null!==c?ri(c):mr(t,c=gr(n)?hr:pr.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==o||l!==c)&&bi(t,a,o,c),ii=!1;var p=t.memoizedState;a.state=p,di(t,o,a,r),l=t.memoizedState,s!==o||p!==l||fr.current||ii?("function"==typeof u&&(mi(t,n,u,o),l=t.memoizedState),(s=ii||yi(t,n,s,o,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=o,t.memoizedState=l),a.props=o,a.state=l,a.context=c,o=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),o=!1)}else a=t.stateNode,si(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Kr(t.type,s),l=a.context,c="object"==typeof(c=n.contextType)&&null!==c?ri(c):mr(t,c=gr(n)?hr:pr.current),(d="function"==typeof(u=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==o||l!==c)&&bi(t,a,o,c),ii=!1,l=t.memoizedState,a.state=l,di(t,o,a,r),p=t.memoizedState,s!==o||l!==p||fr.current||ii?("function"==typeof u&&(mi(t,n,u,o),p=t.memoizedState),(u=ii||yi(t,n,s,o,l,p,c))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(o,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(o,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=o,t.memoizedState=p),a.props=o,a.state=p,a.context=c,o=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),o=!1);return Na(e,t,n,o,i,r)}function Na(e,t,n,o,r,i){ja(e,t);var a=!!(64&t.effectTag);if(!o&&!a)return r&&kr(t,n,!1),Xa(e,t,i);o=t.stateNode,Pa.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:o.render();return t.effectTag|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,s,i)):La(e,t,s,i),t.memoizedState=o.state,r&&kr(t,n,!0),t.child}function Fa(e){var t=e.stateNode;t.pendingContext?vr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&vr(0,t.context,!1),Bi(e,t.containerInfo)}var Ha,Ua,za,Va={dehydrated:null,retryTime:0};function qa(e,t,n){var o,r=t.mode,i=t.pendingProps,a=Ri.current,s=!1;if((o=!!(64&t.effectTag))||(o=!!(2&a)&&(null===e||null!==e.memoizedState)),o?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),ur(Ri,1&a),null===e){if(void 0!==i.fallback&&Ca(t),s){if(s=i.fallback,(i=Ol(null,r,0,null)).return=t,!(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ol(s,r,n,null)).return=t,i.sibling=n,t.memoizedState=Va,t.child=i,n}return r=i.children,t.memoizedState=null,t.child=_i(t,null,r,n)}if(null!==e.memoizedState){if(r=(e=e.child).sibling,s){if(i=i.fallback,(n=_l(e,e.pendingProps)).return=t,!(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(r=_l(r,i)).return=t,n.sibling=r,n.childExpirationTime=0,t.memoizedState=Va,t.child=n,r}return n=Ci(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Ol(null,r,0,null)).return=t,i.child=e,null!==e&&(e.return=i),!(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ol(s,r,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Va,t.child=i,n}return t.memoizedState=null,t.child=Ci(t,e,i.children,n)}function $a(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ni(e.return,t)}function Wa(e,t,n,o,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailExpiration:0,tailMode:r,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=n,a.tailExpiration=0,a.tailMode=r,a.lastEffect=i)}function Ya(e,t,n){var o=t.pendingProps,r=o.revealOrder,i=o.tail;if(La(e,t,o.children,n),2&(o=Ri.current))o=1&o|2,t.effectTag|=64;else{if(null!==e&&64&e.effectTag)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n);else if(19===e.tag)$a(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(ur(Ri,o),2&t.mode)switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===Di(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Wa(t,!1,r,n,i,t.lastEffect);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===Di(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Wa(t,!0,n,null,i,t.lastEffect);break;case"together":Wa(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Xa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var o=t.expirationTime;if(0!==o&&al(o),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=_l(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_l(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ka(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;null!==n;)null!==n.alternate&&(o=n),n=n.sibling;null===o?t||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Qa(e,t,n){var o=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return gr(t.type)&&yr(),null;case 3:return Ii(),cr(fr),cr(pr),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ta(t)||(t.effectTag|=4),null;case 5:ji(t),n=Li(Mi.current);var i=t.type;if(null!==e&&null!=t.stateNode)Ua(e,t,i,o,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!o){if(null===t.stateNode)throw Error(a(166));return null}if(e=Li(Oi.current),Ta(t)){o=t.stateNode,i=t.type;var s=t.memoizedProps;switch(o[En]=t,o[Cn]=s,i){case"iframe":case"object":case"embed":Yt("load",o);break;case"video":case"audio":for(e=0;e<Qe.length;e++)Yt(Qe[e],o);break;case"source":Yt("error",o);break;case"img":case"image":case"link":Yt("error",o),Yt("load",o);break;case"form":Yt("reset",o),Yt("submit",o);break;case"details":Yt("toggle",o);break;case"input":Se(o,s),Yt("invalid",o),ln(n,"onChange");break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Yt("invalid",o),ln(n,"onChange");break;case"textarea":Le(o,s),Yt("invalid",o),ln(n,"onChange")}for(var l in rn(i,s),e=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?o.textContent!==c&&(e=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(e=["children",""+c]):E.hasOwnProperty(l)&&null!=c&&ln(n,l)}switch(i){case"input":we(o),_e(o,s,!0);break;case"textarea":we(o),Ie(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=cn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===sn&&(e=Re(i)),e===sn?"script"===i?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(i,{is:o.is}):(e=l.createElement(i),"select"===i&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,i),e[En]=t,e[Cn]=o,Ha(e,t),t.stateNode=e,l=an(i,o),i){case"iframe":case"object":case"embed":Yt("load",e),c=o;break;case"video":case"audio":for(c=0;c<Qe.length;c++)Yt(Qe[c],e);c=o;break;case"source":Yt("error",e),c=o;break;case"img":case"image":case"link":Yt("error",e),Yt("load",e),c=o;break;case"form":Yt("reset",e),Yt("submit",e),c=o;break;case"details":Yt("toggle",e),c=o;break;case"input":Se(e,o),c=xe(e,o),Yt("invalid",e),ln(n,"onChange");break;case"option":c=Oe(e,o);break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=r({},o,{value:void 0}),Yt("invalid",e),ln(n,"onChange");break;case"textarea":Le(e,o),c=Me(e,o),Yt("invalid",e),ln(n,"onChange");break;default:c=o}rn(i,c);var u=c;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?nn(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&Fe(e,d):"children"===s?"string"==typeof d?("textarea"!==i||""!==d)&&He(e,d):"number"==typeof d&&He(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?null!=d&&ln(n,s):null!=d&&G(e,s,d,l))}switch(i){case"input":we(e),_e(e,o,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=o.value&&e.setAttribute("value",""+ve(o.value));break;case"select":e.multiple=!!o.multiple,null!=(n=o.value)?Pe(e,!!o.multiple,n,!1):null!=o.defaultValue&&Pe(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=cn)}yn(i,o)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)za(0,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(a(166));n=Li(Mi.current),Li(Oi.current),Ta(t)?(n=t.stateNode,o=t.memoizedProps,n[En]=t,n.nodeValue!==o&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(o))[En]=t,t.stateNode=n)}return null;case 13:return cr(Ri),o=t.memoizedState,64&t.effectTag?(t.expirationTime=n,t):(n=null!==o,o=!1,null===e?void 0!==t.memoizedProps.fallback&&Ta(t):(o=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!o&&!!(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||1&Ri.current?Ts===ws&&(Ts=ks):(Ts!==ws&&Ts!==ks||(Ts=xs),0!==Bs&&null!==Es&&(Il(Es,_s),Al(Es,Bs)))),(n||o)&&(t.effectTag|=4),null);case 4:return Ii(),null;case 10:return ti(t),null;case 19:if(cr(Ri),null===(o=t.memoizedState))return null;if(i=!!(64&t.effectTag),null===(s=o.rendering)){if(i)Ka(o,!1);else if(Ts!==ws||null!==e&&64&e.effectTag)for(s=t.child;null!==s;){if(null!==(e=Di(s))){for(t.effectTag|=64,Ka(o,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=t.child;null!==o;)s=n,(i=o).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),o=o.sibling;return ur(Ri,1&Ri.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=Di(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ka(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate)return null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null),null}else 2*Hr()-o.renderingStartTime>o.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Ka(o,!1),t.expirationTime=t.childExpirationTime=n-1);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(0===o.tailExpiration&&(o.tailExpiration=Hr()+500),n=o.tail,o.rendering=n,o.tail=n.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=Hr(),n.sibling=null,t=Ri.current,ur(Ri,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Ga(e){switch(e.tag){case 1:gr(e.type)&&yr();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ii(),cr(fr),cr(pr),64&(t=e.effectTag))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return ji(e),null;case 13:return cr(Ri),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return cr(Ri),null;case 4:return Ii(),null;case 10:return ti(e),null;default:return null}}function Za(e,t){return{value:e,source:t,stack:ye(t)}}Ha=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(e,t,n,o,i){var a=e.memoizedProps;if(a!==o){var s,l,c=t.stateNode;switch(Li(Oi.current),e=null,n){case"input":a=xe(c,a),o=xe(c,o),e=[];break;case"option":a=Oe(c,a),o=Oe(c,o),e=[];break;case"select":a=r({},a,{value:void 0}),o=r({},o,{value:void 0}),e=[];break;case"textarea":a=Me(c,a),o=Me(c,o),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof o.onClick&&(c.onclick=cn)}for(s in rn(n,o),n=null,a)if(!o.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(l in c=a[s])c.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in o){var u=o[s];if(c=null!=a?a[s]:void 0,o.hasOwnProperty(s)&&u!==c&&(null!=u||null!=c))if("style"===s)if(c){for(l in c)!c.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&c[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(e||(e=[]),e.push(s,n)),n=u;else"dangerouslySetInnerHTML"===s?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(s,u)):"children"===s?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(s,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(E.hasOwnProperty(s)?(null!=u&&ln(i,s),e||c===u||(e=[])):(e=e||[]).push(s,u))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},za=function(e,t,n,o){n!==o&&(t.effectTag|=4)};var Ja="function"==typeof WeakSet?WeakSet:Set;function es(e,t){var n=t.source,o=t.stack;null===o&&null!==n&&(o=ye(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ts(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){vl(e,t)}else t.current=null}function ns(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,o=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Kr(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function os(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var o=n.destroy;n.destroy=void 0,void 0!==o&&o()}n=n.next}while(n!==t)}}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function is(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void rs(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var o=n.elementType===n.type?t.memoizedProps:Kr(n.type,t.memoizedProps);e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&pi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}pi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&yn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Rt(n)))))}throw Error(a(163))}function as(e,t,n){switch("function"==typeof xl&&xl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var o=e.next;Vr(97<n?97:n,(function(){var e=o;do{var n=e.destroy;if(void 0!==n){var r=t;try{n()}catch(e){vl(r,e)}}e=e.next}while(e!==o)}))}break;case 1:ts(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){vl(e,t)}}(t,n);break;case 5:ts(t);break;case 4:us(e,t,n)}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t)}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function cs(e){e:{for(var t=e.return;null!==t;){if(ls(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:case 4:t=t.containerInfo,o=!0;break;default:throw Error(a(161))}16&n.effectTag&&(He(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ls(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}o?function e(t,n,o){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===o.nodeType?o.parentNode.insertBefore(t,n):o.insertBefore(t,n):(8===o.nodeType?(n=o.parentNode).insertBefore(t,o):(n=o).appendChild(t),null!==(o=o._reactRootContainer)&&void 0!==o||null!==n.onclick||(n.onclick=cn));else if(4!==r&&null!==(t=t.child))for(e(t,n,o),t=t.sibling;null!==t;)e(t,n,o),t=t.sibling}(e,n,t):function e(t,n,o){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,n?o.insertBefore(t,n):o.appendChild(t);else if(4!==r&&null!==(t=t.child))for(e(t,n,o),t=t.sibling;null!==t;)e(t,n,o),t=t.sibling}(e,n,t)}function us(e,t,n){for(var o,r,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(o=s.stateNode,s.tag){case 5:r=!1;break e;case 3:case 4:o=o.containerInfo,r=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var l=e,c=i,u=n,d=c;;)if(as(l,d,u),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===c)break e;for(;null===d.sibling;){if(null===d.return||d.return===c)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}r?(l=o,c=i.stateNode,8===l.nodeType?l.parentNode.removeChild(c):l.removeChild(c)):o.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){o=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(as(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function ds(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void os(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps,r=null!==e?e.memoizedProps:o;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Cn]=o,"input"===e&&"radio"===o.type&&null!=o.name&&Ee(n,o),an(e,r),t=an(e,o),r=0;r<i.length;r+=2){var s=i[r],l=i[r+1];"style"===s?nn(n,l):"dangerouslySetInnerHTML"===s?Fe(n,l):"children"===s?He(n,l):G(n,s,l,t)}switch(e){case"input":Ce(n,o);break;case"textarea":Be(n,o);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!o.multiple,null!=(e=o.value)?Pe(n,!!o.multiple,e,!1):t!==!!o.multiple&&(null!=o.defaultValue?Pe(n,!!o.multiple,o.defaultValue,!0):Pe(n,!!o.multiple,o.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Rt(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?o=!1:(o=!0,n=t.child,As=Hr()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,o?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,r=null!=(r=e.memoizedProps.style)&&r.hasOwnProperty("display")?r.display:null,i.style.display=tn("display",r));else if(6===e.tag)e.stateNode.nodeValue=o?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ps(t);case 19:return void ps(t)}throw Error(a(163))}function ps(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var o=wl.bind(null,e,t);n.has(t)||(n.add(t),t.then(o,o))}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){Rs||(Rs=!0,Ds=o),es(e,t)},n}function ms(e,t,n){(n=li(n,null)).tag=3;var o=e.type.getDerivedStateFromError;if("function"==typeof o){var r=t.value;n.payload=function(){return es(e,t),o(r)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof o&&(null===Ns?Ns=new Set([this]):Ns.add(this),es(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var gs,ys=Math.ceil,vs=Q.ReactCurrentDispatcher,bs=Q.ReactCurrentOwner,ws=0,ks=3,xs=4,Ss=0,Es=null,Cs=null,_s=0,Ts=ws,Os=null,Ps=1073741823,Ms=1073741823,Ls=null,Bs=0,Is=!1,As=0,js=null,Rs=!1,Ds=null,Ns=null,Fs=!1,Hs=null,Us=90,zs=null,Vs=0,qs=null,$s=0;function Ws(){return 48&Ss?1073741821-(Hr()/10|0):0!==$s?$s:$s=1073741821-(Hr()/10|0)}function Ys(e,t,n){if(!(2&(t=t.mode)))return 1073741823;var o=Ur();if(!(4&t))return 99===o?1073741823:1073741822;if(16&Ss)return _s;if(null!==n)e=Xr(e,0|n.timeoutMs||5e3,250);else switch(o){case 99:e=1073741823;break;case 98:e=Xr(e,150,100);break;case 97:case 96:e=Xr(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Es&&e===_s&&--e,e}function Xs(e,t){if(50<Vs)throw Vs=0,qs=null,Error(a(185));if(null!==(e=Ks(e,t))){var n=Ur();1073741823===t?8&Ss&&!(48&Ss)?Js(e):(Gs(e),0===Ss&&Wr()):Gs(e),!(4&Ss)||98!==n&&99!==n||(null===zs?zs=new Map([[e,t]]):(void 0===(n=zs.get(e))||n>t)&&zs.set(e,t))}}function Ks(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var o=e.return,r=null;if(null===o&&3===e.tag)r=e.stateNode;else for(;null!==o;){if(n=o.alternate,o.childExpirationTime<t&&(o.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===o.return&&3===o.tag){r=o.stateNode;break}o=o.return}return null!==r&&(Es===r&&(al(t),Ts===xs&&Il(r,_s)),Al(r,t)),r}function Qs(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Bl(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Gs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=$r(Js.bind(null,e));else{var t=Qs(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var o=Ws();if(o=1073741823===t?99:1===t||2===t?95:0>=(o=10*(1073741821-t)-10*(1073741821-o))?99:250>=o?98:5250>=o?97:95,null!==n){var r=e.callbackPriority;if(e.callbackExpirationTime===t&&r>=o)return;n!==Ir&&Er(n)}e.callbackExpirationTime=t,e.callbackPriority=o,t=1073741823===t?$r(Js.bind(null,e)):qr(o,Zs.bind(null,e),{timeout:10*(1073741821-t)-Hr()}),e.callbackNode=t}}}function Zs(e,t){if($s=0,t)return jl(e,t=Ws()),Gs(e),null;var n=Qs(e);if(0!==n){if(t=e.callbackNode,48&Ss)throw Error(a(327));if(ml(),e===Es&&n===_s||nl(e,n),null!==Cs){var o=Ss;Ss|=16;for(var r=rl();;)try{ll();break}catch(t){ol(e,t)}if(ei(),Ss=o,vs.current=r,1===Ts)throw t=Os,nl(e,n),Il(e,n),Gs(e),t;if(null===Cs)switch(r=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,o=Ts,Es=null,o){case ws:case 1:throw Error(a(345));case 2:jl(e,2<n?2:n);break;case ks:if(Il(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=dl(r)),1073741823===Ps&&10<(r=As+500-Hr())){if(Is){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,nl(e,n);break}}if(0!==(i=Qs(e))&&i!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}e.timeoutHandle=bn(pl.bind(null,e),r);break}pl(e);break;case xs:if(Il(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=dl(r)),Is&&(0===(r=e.lastPingedTime)||r>=n)){e.lastPingedTime=n,nl(e,n);break}if(0!==(r=Qs(e))&&r!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}if(1073741823!==Ms?o=10*(1073741821-Ms)-Hr():1073741823===Ps?o=0:(o=10*(1073741821-Ps)-5e3,0>(o=(r=Hr())-o)&&(o=0),(n=10*(1073741821-n)-r)<(o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*ys(o/1960))-o)&&(o=n)),10<o){e.timeoutHandle=bn(pl.bind(null,e),o);break}pl(e);break;case 5:if(1073741823!==Ps&&null!==Ls){i=Ps;var s=Ls;if(0>=(o=0|s.busyMinDurationMs)?o=0:(r=0|s.busyDelayMs,o=(i=Hr()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=r?0:r+o-i),10<o){Il(e,n),e.timeoutHandle=bn(pl.bind(null,e),o);break}}pl(e);break;default:throw Error(a(329))}if(Gs(e),e.callbackNode===t)return Zs.bind(null,e)}}return null}function Js(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,48&Ss)throw Error(a(327));if(ml(),e===Es&&t===_s||nl(e,t),null!==Cs){var n=Ss;Ss|=16;for(var o=rl();;)try{sl();break}catch(t){ol(e,t)}if(ei(),Ss=n,vs.current=o,1===Ts)throw n=Os,nl(e,t),Il(e,t),Gs(e),n;if(null!==Cs)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Es=null,pl(e),Gs(e)}return null}function el(e,t){var n=Ss;Ss|=1;try{return e(t)}finally{0===(Ss=n)&&Wr()}}function tl(e,t){var n=Ss;Ss&=-2,Ss|=8;try{return e(t)}finally{0===(Ss=n)&&Wr()}}function nl(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==Cs)for(n=Cs.return;null!==n;){var o=n;switch(o.tag){case 1:null!=(o=o.type.childContextTypes)&&yr();break;case 3:Ii(),cr(fr),cr(pr);break;case 5:ji(o);break;case 4:Ii();break;case 13:case 19:cr(Ri);break;case 10:ti(o)}n=n.return}Es=e,Cs=_l(e.current,null),_s=t,Ts=ws,Os=null,Ms=Ps=1073741823,Ls=null,Bs=0,Is=!1}function ol(e,t){for(;;){try{if(ei(),Fi.current=ga,$i)for(var n=zi.memoizedState;null!==n;){var o=n.queue;null!==o&&(o.pending=null),n=n.next}if(Ui=0,qi=Vi=zi=null,$i=!1,null===Cs||null===Cs.return)return Ts=1,Os=t,Cs=null;e:{var r=e,i=Cs.return,a=Cs,s=t;if(t=_s,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(!(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var u=!!(1&Ri.current),d=i;do{var p;if(p=13===d.tag){var f=d.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!u)}}if(p){var m=d.updateQueue;if(null===m){var g=new Set;g.add(l),d.updateQueue=g}else m.add(l);if(!(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=li(1073741823,null);y.tag=2,ci(a,y)}a.expirationTime=1073741823;break e}s=void 0,a=t;var v=r.pingCache;if(null===v?(v=r.pingCache=new fs,s=new Set,v.set(l,s)):void 0===(s=v.get(l))&&(s=new Set,v.set(l,s)),!s.has(a)){s.add(a);var b=bl.bind(null,r,l,a);l.then(b,b)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==Ts&&(Ts=2),s=Za(s,a),d=i;do{switch(d.tag){case 3:l=s,d.effectTag|=4096,d.expirationTime=t,ui(d,hs(d,l,t));break e;case 1:l=s;var w=d.type,k=d.stateNode;if(!(64&d.effectTag||"function"!=typeof w.getDerivedStateFromError&&(null===k||"function"!=typeof k.componentDidCatch||null!==Ns&&Ns.has(k)))){d.effectTag|=4096,d.expirationTime=t,ui(d,ms(d,l,t));break e}}d=d.return}while(null!==d)}Cs=ul(Cs)}catch(e){t=e;continue}break}}function rl(){var e=vs.current;return vs.current=ga,null===e?ga:e}function il(e,t){e<Ps&&2<e&&(Ps=e),null!==t&&e<Ms&&2<e&&(Ms=e,Ls=t)}function al(e){e>Bs&&(Bs=e)}function sl(){for(;null!==Cs;)Cs=cl(Cs)}function ll(){for(;null!==Cs&&!Ar();)Cs=cl(Cs)}function cl(e){var t=gs(e.alternate,e,_s);return e.memoizedProps=e.pendingProps,null===t&&(t=ul(e)),bs.current=null,t}function ul(e){Cs=e;do{var t=Cs.alternate;if(e=Cs.return,2048&Cs.effectTag){if(null!==(t=Ga(Cs)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}else{if(t=Qa(t,Cs,_s),1===_s||1!==Cs.childExpirationTime){for(var n=0,o=Cs.child;null!==o;){var r=o.expirationTime,i=o.childExpirationTime;r>n&&(n=r),i>n&&(n=i),o=o.sibling}Cs.childExpirationTime=n}if(null!==t)return t;null!==e&&!(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Cs.firstEffect),null!==Cs.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Cs.firstEffect),e.lastEffect=Cs.lastEffect),1<Cs.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Cs:e.firstEffect=Cs,e.lastEffect=Cs))}if(null!==(t=Cs.sibling))return t;Cs=e}while(null!==Cs);return Ts===ws&&(Ts=5),null}function dl(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function pl(e){var t=Ur();return Vr(99,fl.bind(null,e,t)),null}function fl(e,t){do{ml()}while(null!==Hs);if(48&Ss)throw Error(a(327));var n=e.finishedWork,o=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var r=dl(n);if(e.firstPendingTime=r,o<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:o<=e.firstSuspendedTime&&(e.firstSuspendedTime=o-1),o<=e.lastPingedTime&&(e.lastPingedTime=0),o<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Es&&(Cs=Es=null,_s=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){var i=Ss;Ss|=32,bs.current=null,mn=Wt;var s=fn();if(hn(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(l=(l=s.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(c&&0!==c.rangeCount){l=c.anchorNode;var u=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{l.nodeType,d.nodeType}catch(e){l=null;break e}var p=0,f=-1,h=-1,m=0,g=0,y=s,v=null;t:for(;;){for(var b;y!==l||0!==u&&3!==y.nodeType||(f=p+u),y!==d||0!==c&&3!==y.nodeType||(h=p+c),3===y.nodeType&&(p+=y.nodeValue.length),null!==(b=y.firstChild);)v=y,y=b;for(;;){if(y===s)break t;if(v===l&&++m===u&&(f=p),v===d&&++g===c&&(h=p),null!==(b=y.nextSibling))break;v=(y=v).parentNode}y=b}l=-1===f||-1===h?null:{start:f,end:h}}else l=null}l=l||{start:0,end:0}}else l=null;gn={activeElementDetached:null,focusedElem:s,selectionRange:l},Wt=!1,js=r;do{try{hl()}catch(e){if(null===js)throw Error(a(330));vl(js,e),js=js.nextEffect}}while(null!==js);js=r;do{try{for(s=e,l=t;null!==js;){var w=js.effectTag;if(16&w&&He(js.stateNode,""),128&w){var k=js.alternate;if(null!==k){var x=k.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&w){case 2:cs(js),js.effectTag&=-3;break;case 6:cs(js),js.effectTag&=-3,ds(js.alternate,js);break;case 1024:js.effectTag&=-1025;break;case 1028:js.effectTag&=-1025,ds(js.alternate,js);break;case 4:ds(js.alternate,js);break;case 8:us(s,u=js,l),ss(u)}js=js.nextEffect}}catch(e){if(null===js)throw Error(a(330));vl(js,e),js=js.nextEffect}}while(null!==js);if(x=gn,k=fn(),w=x.focusedElem,l=x.selectionRange,k!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==l&&hn(w)&&(k=l.start,void 0===(x=l.end)&&(x=k),"selectionStart"in w?(w.selectionStart=k,w.selectionEnd=Math.min(x,w.value.length)):(x=(k=w.ownerDocument||document)&&k.defaultView||window).getSelection&&(x=x.getSelection(),u=w.textContent.length,s=Math.min(l.start,u),l=void 0===l.end?s:Math.min(l.end,u),!x.extend&&s>l&&(u=l,l=s,s=u),u=pn(w,s),d=pn(w,l),u&&d&&(1!==x.rangeCount||x.anchorNode!==u.node||x.anchorOffset!==u.offset||x.focusNode!==d.node||x.focusOffset!==d.offset)&&((k=k.createRange()).setStart(u.node,u.offset),x.removeAllRanges(),s>l?(x.addRange(k),x.extend(d.node,d.offset)):(k.setEnd(d.node,d.offset),x.addRange(k))))),k=[];for(x=w;x=x.parentNode;)1===x.nodeType&&k.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<k.length;w++)(x=k[w]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Wt=!!mn,gn=mn=null,e.current=n,js=r;do{try{for(w=e;null!==js;){var S=js.effectTag;if(36&S&&is(w,js.alternate,js),128&S){k=void 0;var E=js.ref;if(null!==E){var C=js.stateNode;js.tag,k=C,"function"==typeof E?E(k):E.current=k}}js=js.nextEffect}}catch(e){if(null===js)throw Error(a(330));vl(js,e),js=js.nextEffect}}while(null!==js);js=null,jr(),Ss=i}else e.current=n;if(Fs)Fs=!1,Hs=e,Us=t;else for(js=r;null!==js;)t=js.nextEffect,js.nextEffect=null,js=t;if(0===(t=e.firstPendingTime)&&(Ns=null),1073741823===t?e===qs?Vs++:(Vs=0,qs=e):Vs=0,"function"==typeof kl&&kl(n.stateNode,o),Gs(e),Rs)throw Rs=!1,e=Ds,Ds=null,e;return!!(8&Ss)||Wr(),null}function hl(){for(;null!==js;){var e=js.effectTag;!!(256&e)&&ns(js.alternate,js),!(512&e)||Fs||(Fs=!0,qr(97,(function(){return ml(),null}))),js=js.nextEffect}}function ml(){if(90!==Us){var e=97<Us?97:Us;return Us=90,Vr(e,gl)}}function gl(){if(null===Hs)return!1;var e=Hs;if(Hs=null,48&Ss)throw Error(a(331));var t=Ss;for(Ss|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(512&n.effectTag)switch(n.tag){case 0:case 11:case 15:case 22:os(5,n),rs(5,n)}}catch(t){if(null===e)throw Error(a(330));vl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ss=t,Wr(),!0}function yl(e,t,n){ci(e,t=hs(e,t=Za(n,t),1073741823)),null!==(e=Ks(e,1073741823))&&Gs(e)}function vl(e,t){if(3===e.tag)yl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){yl(n,e,t);break}if(1===n.tag){var o=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof o.componentDidCatch&&(null===Ns||!Ns.has(o))){ci(n,e=ms(n,e=Za(t,e),1073741823)),null!==(n=Ks(n,1073741823))&&Gs(n);break}}n=n.return}}function bl(e,t,n){var o=e.pingCache;null!==o&&o.delete(t),Es===e&&_s===n?Ts===xs||Ts===ks&&1073741823===Ps&&Hr()-As<500?nl(e,_s):Is=!0:Bl(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Gs(e)))}function wl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Ys(t=Ws(),e,null)),null!==(e=Ks(e,t))&&Gs(e)}gs=function(e,t,n){var o=t.expirationTime;if(null!==e){var r=t.pendingProps;if(e.memoizedProps!==r||fr.current)Ma=!0;else{if(o<n){switch(Ma=!1,t.tag){case 3:Fa(t),Oa();break;case 5:if(Ai(t),4&t.mode&&1!==n&&r.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:gr(t.type)&&wr(t);break;case 4:Bi(t,t.stateNode.containerInfo);break;case 10:o=t.memoizedProps.value,r=t.type._context,ur(Qr,r._currentValue),r._currentValue=o;break;case 13:if(null!==t.memoizedState)return 0!==(o=t.child.childExpirationTime)&&o>=n?qa(e,t,n):(ur(Ri,1&Ri.current),null!==(t=Xa(e,t,n))?t.sibling:null);ur(Ri,1&Ri.current);break;case 19:if(o=t.childExpirationTime>=n,64&e.effectTag){if(o)return Ya(e,t,n);t.effectTag|=64}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null),ur(Ri,Ri.current),!o)return null}return Xa(e,t,n)}Ma=!1}}else Ma=!1;switch(t.expirationTime=0,t.tag){case 2:if(o=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,r=mr(t,pr.current),oi(t,n),r=Xi(null,t,o,e,r,n),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,gr(o)){var i=!0;wr(t)}else i=!1;t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,ai(t);var s=o.getDerivedStateFromProps;"function"==typeof s&&mi(t,o,s,e),r.updater=gi,t.stateNode=r,r._reactInternalFiber=t,wi(t,o,e,n),t=Na(null,t,o,!0,i,n)}else t.tag=0,La(null,t,r,n),t=t.child;return t;case 16:e:{if(r=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(r),1!==r._status)throw r._result;switch(r=r._result,t.type=r,i=t.tag=function(e){if("function"==typeof e)return Cl(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===de)return 14}return 2}(r),e=Kr(r,e),i){case 0:t=Ra(null,t,r,e,n);break e;case 1:t=Da(null,t,r,e,n);break e;case 11:t=Ba(null,t,r,e,n);break e;case 14:t=Ia(null,t,r,Kr(r.type,e),o,n);break e}throw Error(a(306,r,""))}return t;case 0:return o=t.type,r=t.pendingProps,Ra(e,t,o,r=t.elementType===o?r:Kr(o,r),n);case 1:return o=t.type,r=t.pendingProps,Da(e,t,o,r=t.elementType===o?r:Kr(o,r),n);case 3:if(Fa(t),o=t.updateQueue,null===e||null===o)throw Error(a(282));if(o=t.pendingProps,r=null!==(r=t.memoizedState)?r.element:null,si(e,t),di(t,o,null,n),(o=t.memoizedState.element)===r)Oa(),t=Xa(e,t,n);else{if((r=t.stateNode.hydrate)&&(ka=kn(t.stateNode.containerInfo.firstChild),wa=t,r=xa=!0),r)for(n=_i(t,null,o,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else La(e,t,o,n),Oa();t=t.child}return t;case 5:return Ai(t),null===e&&Ca(t),o=t.type,r=t.pendingProps,i=null!==e?e.memoizedProps:null,s=r.children,vn(o,r)?s=null:null!==i&&vn(o,i)&&(t.effectTag|=16),ja(e,t),4&t.mode&&1!==n&&r.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(La(e,t,s,n),t=t.child),t;case 6:return null===e&&Ca(t),null;case 13:return qa(e,t,n);case 4:return Bi(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Ci(t,null,o,n):La(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,Ba(e,t,o,r=t.elementType===o?r:Kr(o,r),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value;var l=t.type._context;if(ur(Qr,l._currentValue),l._currentValue=i,null!==s)if(l=s.value,0==(i=No(l,i)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(l,i):1073741823))){if(s.children===r.children&&!fr.current){t=Xa(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===o&&u.observedBits&i){1===l.tag&&((u=li(n,null)).tag=2,ci(l,u)),l.expirationTime<n&&(l.expirationTime=n),null!==(u=l.alternate)&&u.expirationTime<n&&(u.expirationTime=n),ni(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}La(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=(i=t.pendingProps).children,oi(t,n),o=o(r=ri(r,i.unstable_observedBits)),t.effectTag|=1,La(e,t,o,n),t.child;case 14:return i=Kr(r=t.type,t.pendingProps),Ia(e,t,r,i=Kr(r.type,i),o,n);case 15:return Aa(e,t,t.type,t.pendingProps,o,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Kr(o,r),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,gr(o)?(e=!0,wr(t)):e=!1,oi(t,n),vi(t,o,r),wi(t,o,r,n),Na(null,t,o,!0,e,n);case 19:return Ya(e,t,n)}throw Error(a(156,t.tag))};var kl=null,xl=null;function Sl(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function El(e,t,n,o){return new Sl(e,t,n,o)}function Cl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _l(e,t){var n=e.alternate;return null===n?((n=El(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tl(e,t,n,o,r,i){var s=2;if(o=e,"function"==typeof e)Cl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Ol(n.children,r,i,t);case se:s=8,r|=7;break;case oe:s=8,r|=1;break;case re:return(e=El(12,n,t,8|r)).elementType=re,e.type=re,e.expirationTime=i,e;case ce:return(e=El(13,n,t,r)).type=ce,e.elementType=ce,e.expirationTime=i,e;case ue:return(e=El(19,n,t,r)).elementType=ue,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case le:s=11;break e;case de:s=14;break e;case pe:s=16,o=null;break e;case fe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=El(s,n,t,r)).elementType=e,t.type=o,t.expirationTime=i,t}function Ol(e,t,n,o){return(e=El(7,e,o,t)).expirationTime=n,e}function Pl(e,t,n){return(e=El(6,e,null,t)).expirationTime=n,e}function Ml(e,t,n){return(t=El(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ll(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Bl(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Il(e,t){var n=e.firstSuspendedTime,o=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(o>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Al(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function jl(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Rl(e,t,n,o){var r=t.current,i=Ws(),s=fi.suspense;i=Ys(i,r,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(gr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(gr(c)){n=br(n,c,l);break e}}n=l}else n=dr;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,s)).payload={element:e},null!==(o=void 0===o?null:o)&&(t.callback=o),ci(r,t),Xs(r,i),i}function Dl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Nl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Fl(e,t){Nl(e,t),(e=e.alternate)&&Nl(e,t)}function Hl(e,t,n){var o=new Ll(e,t,n=null!=n&&!0===n.hydrate),r=El(3,null,null,2===t?7:1===t?3:0);o.current=r,r.stateNode=o,ai(r),e[_n]=o.current,n&&0!==t&&function(e,t){var n=Ze(t);_t.forEach((function(e){ht(e,t,n)})),Tt.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=o}function Ul(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function zl(e,t,n,o,r){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof r){var s=r;r=function(){var e=Dl(a);s.call(e)}}Rl(t,a,e,r)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Hl(e,0,t?{hydrate:!0}:void 0)}(n,o),a=i._internalRoot,"function"==typeof r){var l=r;r=function(){var e=Dl(a);l.call(e)}}tl((function(){Rl(t,a,e,r)}))}return Dl(a)}function Vl(e,t,n){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==o?null:""+o,children:e,containerInfo:t,implementation:n}}function ql(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ul(t))throw Error(a(200));return Vl(e,t,null,n)}Hl.prototype.render=function(e){Rl(e,this._internalRoot,null,null)},Hl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Rl(null,e,null,(function(){t[_n]=null}))},mt=function(e){if(13===e.tag){var t=Xr(Ws(),150,100);Xs(e,t),Fl(e,t)}},gt=function(e){13===e.tag&&(Xs(e,3),Fl(e,3))},yt=function(e){if(13===e.tag){var t=Ws();Xs(e,t=Ys(t,e,null)),Fl(e,t)}},O=function(e,t,n){switch(t){case"input":if(Ce(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var r=Mn(o);if(!r)throw Error(a(90));ke(o),Ce(o,r)}}}break;case"textarea":Be(e,n);break;case"select":null!=(t=n.value)&&Pe(e,!!n.multiple,t,!1)}},A=el,j=function(e,t,n,o,r){var i=Ss;Ss|=4;try{return Vr(98,e.bind(null,t,n,o,r))}finally{0===(Ss=i)&&Wr()}},R=function(){!(49&Ss)&&(function(){if(null!==zs){var e=zs;zs=null,e.forEach((function(e,t){jl(t,e),Gs(t)})),Wr()}}(),ml())},D=function(e,t){var n=Ss;Ss|=2;try{return e(t)}finally{0===(Ss=n)&&Wr()}};var $l,Wl,Yl={Events:[On,Pn,Mn,_,S,Dn,function(e){rt(e,Rn)},B,I,Gt,st,ml,{current:!1}]};Wl=($l={findFiberByHostInstance:Tn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);kl=function(e){try{t.onCommitFiberRoot(n,e,void 0,!(64&~e.current.effectTag))}catch(e){}},xl=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(r({},$l,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Wl?Wl(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yl,t.createPortal=ql,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(48&Ss)throw Error(a(187));var n=Ss;Ss|=1;try{return Vr(99,e.bind(null,t))}finally{Ss=n,Wr()}},t.hydrate=function(e,t,n){if(!Ul(t))throw Error(a(200));return zl(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ul(t))throw Error(a(200));return zl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ul(e))throw Error(a(40));return!!e._reactRootContainer&&(tl((function(){zl(null,null,e,!1,(function(){e._reactRootContainer=null,e[_n]=null}))})),!0)},t.unstable_batchedUpdates=el,t.unstable_createPortal=function(e,t){return ql(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!Ul(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return zl(e,t,n,!1,o)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(35)},function(e,t,n){"use strict";var o,r,i,a,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}},d=Date.now();t.unstable_now=function(){return Date.now()-d},o=function(e){null!==l?setTimeout(o,0,e):(l=e,setTimeout(u,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,f=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var y=f.now();t.unstable_now=function(){return f.now()-y}}var v=!1,b=null,w=-1,k=5,x=0;a=function(){return t.unstable_now()>=x},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=0<e?Math.floor(1e3/e):5};var S=new MessageChannel,E=S.port2;S.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();x=e+k;try{b(!0,e)?E.postMessage(null):(v=!1,b=null)}catch(e){throw E.postMessage(null),e}}else v=!1},o=function(e){b=e,v||(v=!0,E.postMessage(null))},r=function(e,n){w=h((function(){e(t.unstable_now())}),n)},i=function(){m(w),w=-1}}function C(e,t){var n=e.length;e.push(t);e:for(;;){var o=n-1>>>1,r=e[o];if(!(void 0!==r&&0<O(r,t)))break e;e[o]=t,e[n]=r,n=o}}function _(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,r=e.length;o<r;){var i=2*(o+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>O(a,n))void 0!==l&&0>O(l,a)?(e[o]=l,e[s]=n,o=s):(e[o]=a,e[i]=n,o=i);else{if(!(void 0!==l&&0>O(l,n)))break e;e[o]=l,e[s]=n,o=s}}}return t}return null}function O(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],M=[],L=1,B=null,I=3,A=!1,j=!1,R=!1;function D(e){for(var t=_(M);null!==t;){if(null===t.callback)T(M);else{if(!(t.startTime<=e))break;T(M),t.sortIndex=t.expirationTime,C(P,t)}t=_(M)}}function N(e){if(R=!1,D(e),!j)if(null!==_(P))j=!0,o(F);else{var t=_(M);null!==t&&r(N,t.startTime-e)}}function F(e,n){j=!1,R&&(R=!1,i()),A=!0;var o=I;try{for(D(n),B=_(P);null!==B&&(!(B.expirationTime>n)||e&&!a());){var s=B.callback;if(null!==s){B.callback=null,I=B.priorityLevel;var l=s(B.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?B.callback=l:B===_(P)&&T(P),D(n)}else T(P);B=_(P)}if(null!==B)var c=!0;else{var u=_(M);null!==u&&r(N,u.startTime-n),c=!1}return c}finally{B=null,I=o,A=!1}}function H(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||A||(j=!0,o(F))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:H(e)}else a=H(e),l=s;return e={id:L++,callback:n,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,C(M,e),null===_(P)&&e===_(M)&&(R?i():R=!0,r(N,l-s))):(e.sortIndex=a,C(P,e),j||A||(j=!0,o(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=_(P);return n!==B&&null!==B&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<B.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,r=(o=n(37))&&o.__esModule?o:{default:o},i=n(51),a=r.default[r.default.length-1],s=(0,i.createReactPlayer)(r.default,a);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(0),r=n(1),i=n(2);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}var c=[{key:"youtube",name:"YouTube",canPlay:i.canPlay.youtube,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(39))}))}))},{key:"soundcloud",name:"SoundCloud",canPlay:i.canPlay.soundcloud,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(40))}))}))},{key:"vimeo",name:"Vimeo",canPlay:i.canPlay.vimeo,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(41))}))}))},{key:"facebook",name:"Facebook",canPlay:i.canPlay.facebook,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(42))}))}))},{key:"streamable",name:"Streamable",canPlay:i.canPlay.streamable,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(43))}))}))},{key:"wistia",name:"Wistia",canPlay:i.canPlay.wistia,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(44))}))}))},{key:"twitch",name:"Twitch",canPlay:i.canPlay.twitch,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(45))}))}))},{key:"dailymotion",name:"DailyMotion",canPlay:i.canPlay.dailymotion,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(46))}))}))},{key:"mixcloud",name:"Mixcloud",canPlay:i.canPlay.mixcloud,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(47))}))}))},{key:"vidyard",name:"Vidyard",canPlay:i.canPlay.vidyard,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(48))}))}))},{key:"kaltura",name:"Kaltura",canPlay:i.canPlay.kaltura,lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(49))}))}))},{key:"file",name:"FilePlayer",canPlay:i.canPlay.file,canEnablePIP:function(e){return i.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,r.supportsWebKitPresentationMode)())&&!i.AUDIO_EXTENSIONS.test(e)},lazyPlayer:(0,o.lazy)((function(){return Promise.resolve().then((function(){return l(n(50))}))}))}];t.default=c},function(e,t){function n(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,r){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async=!("async"in t)||!!t.async,a.src=e,t.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(a,t.attrs),t.text&&(a.text=""+t.text),("onload"in a?n:o)(a,r),a.onload||n(a,r),i.appendChild(a)}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=v(e);if(t){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,k=/user\/([a-zA-Z0-9_-]+)\/?/,x=/youtube-nocookie\.com/,S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(l,e);var t,n,o,s=m(l);function l(){var e;p(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return b(y(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),b(y(e),"parsePlaylist",(function(t){return t instanceof Array?{listType:"playlist",playlist:t.map(e.getID).join(",")}:w.test(t)?{listType:"playlist",list:u(t.match(w),2)[1].replace(/^UC/,"UU")}:k.test(t)?{listType:"user_uploads",list:u(t.match(k),2)[1]}:{}})),b(y(e),"onStateChange",(function(t){var n=t.data,o=e.props,r=o.onPlay,i=o.onPause,a=o.onBuffer,s=o.onBufferEnd,l=o.onEnded,c=o.onReady,u=o.loop,d=o.config,p=d.playerVars,f=d.onUnstarted,h=window.YT.PlayerState,m=h.UNSTARTED,g=h.PLAYING,y=h.PAUSED,v=h.BUFFERING,b=h.ENDED,w=h.CUED;if(n===m&&f(),n===g&&(r(),s()),n===y&&i(),n===v&&a(),n===b){var k=!!e.callPlayer("getPlaylist");u&&!k&&(p.start?e.seekTo(p.start):e.play()),l()}n===w&&c()})),b(y(e),"mute",(function(){e.callPlayer("mute")})),b(y(e),"unmute",(function(){e.callPlayer("unMute")})),b(y(e),"ref",(function(t){e.container=t})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"getID",value:function(e){return!e||e instanceof Array||w.test(e)?null:e.match(a.MATCH_URL_YOUTUBE)[1]}},{key:"load",value:function(e,t){var n=this,o=this.props,r=o.playing,a=o.muted,s=o.playsinline,l=o.controls,u=o.loop,d=o.config,p=o.onError,f=d.playerVars,h=d.embedOptions,m=this.getID(e);if(t)return w.test(e)||k.test(e)||e instanceof Array?void this.player.loadPlaylist(this.parsePlaylist(e)):void this.player.cueVideoById({videoId:m,startSeconds:(0,i.parseStartTime)(e)||f.start,endSeconds:(0,i.parseEndTime)(e)||f.end});(0,i.getSDK)("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady",(function(e){return e.loaded})).then((function(t){n.container&&(n.player=new t.Player(n.container,c({width:"100%",height:"100%",videoId:m,playerVars:c(c({autoplay:r?1:0,mute:a?1:0,controls:l?1:0,start:(0,i.parseStartTime)(e),end:(0,i.parseEndTime)(e),origin:window.location.origin,playsinline:s?1:0},n.parsePlaylist(e)),f),events:{onReady:function(){u&&n.player.setLoop(!0),n.props.onReady()},onStateChange:n.onStateChange,onError:function(e){return p(e.data)}},host:x.test(e)?"https://www.youtube-nocookie.com":void 0},h)))}),p),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e),this.props.playing||this.pause()}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return r.default.createElement("div",{style:e},r.default.createElement("div",{ref:this.ref}))}}])&&f(t.prototype,n),o&&f(t,o),l}(r.Component);t.default=S,b(S,"displayName","YouTube"),b(S,"canPlay",a.canPlay.youtube)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(s,e);var t,n,o,a=f(s);function s(){var e;u(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(m(e=a.call.apply(a,[this].concat(n))),"callPlayer",i.callPlayer),y(m(e),"duration",null),y(m(e),"currentTime",null),y(m(e),"fractionLoaded",null),y(m(e),"mute",(function(){e.setVolume(0)})),y(m(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),y(m(e),"ref",(function(t){e.iframe=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this;(0,i.getSDK)("https://w.soundcloud.com/player/api.js","SC").then((function(o){if(n.iframe){var r=o.Widget.Events,i=r.PLAY,a=r.PLAY_PROGRESS,s=r.PAUSE,l=r.FINISH,u=r.ERROR;t||(n.player=o.Widget(n.iframe),n.player.bind(i,n.props.onPlay),n.player.bind(s,(function(){n.duration-n.currentTime<.05||n.props.onPause()})),n.player.bind(a,(function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress})),n.player.bind(l,(function(){return n.props.onEnded()})),n.player.bind(u,(function(e){return n.props.onError(e)}))),n.player.load(e,c(c({},n.props.config.options),{},{callback:function(){n.player.getDuration((function(e){n.duration=e/1e3,n.props.onReady()}))}}))}}))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return r.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:e,frameBorder:0,allow:"autoplay"})}}])&&d(t.prototype,n),o&&d(t,o),s}(r.Component);t.default=v,y(v,"displayName","SoundCloud"),y(v,"canPlay",a.canPlay.soundcloud),y(v,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,o,a=p(s);function s(){var e;c(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return g(h(e=a.call.apply(a,[this].concat(n))),"callPlayer",i.callPlayer),g(h(e),"duration",null),g(h(e),"currentTime",null),g(h(e),"secondsLoaded",null),g(h(e),"mute",(function(){e.setVolume(0)})),g(h(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),g(h(e),"ref",(function(t){e.container=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;this.duration=null,(0,i.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then((function(n){t.container&&(t.player=new n.Player(t.container,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({url:e,autoplay:t.props.playing,muted:t.props.muted,loop:t.props.loop,playsinline:t.props.playsinline,controls:t.props.controls},t.props.config.playerOptions)),t.player.ready().then((function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"})).catch(t.props.onError),t.player.on("loaded",(function(){t.props.onReady(),t.refreshDuration()})),t.player.on("play",(function(){t.props.onPlay(),t.refreshDuration()})),t.player.on("pause",t.props.onPause),t.player.on("seeked",(function(e){return t.props.onSeek(e.seconds)})),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.seconds;t.currentTime=n})),t.player.on("progress",(function(e){var n=e.seconds;t.secondsLoaded=n})),t.player.on("bufferstart",t.props.onBuffer),t.player.on("bufferend",t.props.onBufferEnd))}),this.props.onError)}},{key:"refreshDuration",value:function(){var e=this;this.player.getDuration().then((function(t){e.duration=t}))}},{key:"play",value:function(){var e=this.callPlayer("play");e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e={width:"100%",height:"100%",overflow:"hidden",display:this.props.display};return r.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}])&&u(t.prototype,n),o&&u(t,o),s}(r.Component);t.default=y,g(y,"displayName","Vimeo"),g(y,"canPlay",a.canPlay.vimeo),g(y,"forceLoad",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y="https://connect.facebook.net/en_US/sdk.js",v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,o,a=p(s);function s(){var e;c(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return g(h(e=a.call.apply(a,[this].concat(n))),"callPlayer",i.callPlayer),g(h(e),"playerID",e.props.config.playerId||"".concat("facebook-player-").concat((0,i.randomString)())),g(h(e),"mute",(function(){e.callPlayer("mute")})),g(h(e),"unmute",(function(){e.callPlayer("unmute")})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this;t?(0,i.getSDK)(y,"FB","fbAsyncInit").then((function(e){return e.XFBML.parse()})):(0,i.getSDK)(y,"FB","fbAsyncInit").then((function(e){e.init({appId:n.props.config.appId,xfbml:!0,version:n.props.config.version}),e.Event.subscribe("xfbml.render",(function(e){n.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(function(e){"video"===e.type&&e.id===n.playerID&&(n.player=e.instance,n.player.subscribe("startedPlaying",n.props.onPlay),n.player.subscribe("paused",n.props.onPause),n.player.subscribe("finishedPlaying",n.props.onEnded),n.player.subscribe("startedBuffering",n.props.onBuffer),n.player.subscribe("finishedBuffering",n.props.onBufferEnd),n.player.subscribe("error",n.props.onError),n.props.muted?n.callPlayer("mute"):n.callPlayer("unmute"),n.props.onReady(),document.getElementById(n.playerID).querySelector("iframe").style.visibility="visible")}))}))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props.config.attributes;return r.default.createElement("div",l({style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"},e))}}])&&u(t.prototype,n),o&&u(t,o),s}(r.Component);t.default=v,g(v,"displayName","Facebook"),g(v,"canPlay",a.canPlay.facebook),g(v,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=h(e);if(t){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(p,e);var t,n,o,s=d(p);function p(){var e;l(this,p);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return m(f(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),m(f(e),"duration",null),m(f(e),"currentTime",null),m(f(e),"secondsLoaded",null),m(f(e),"mute",(function(){e.callPlayer("mute")})),m(f(e),"unmute",(function(){e.callPlayer("unmute")})),m(f(e),"ref",(function(t){e.iframe=t})),e}return t=p,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,i.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.setLoop(t.props.loop),t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.duration,o=e.seconds;t.duration=n,t.currentTime=o})),t.player.on("buffered",(function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)})),t.props.muted&&t.player.mute())}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(a.MATCH_URL_STREAMABLE)[1];return r.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat(e),frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allowFullScreen:!0})}}])&&c(t.prototype,n),o&&c(t,o),p}(r.Component);t.default=g,m(g,"displayName","Streamable"),m(g,"canPlay",a.canPlay.streamable)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(l,e);var t,n,o,s=f(l);function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(m(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),y(m(e),"playerID",e.props.config.playerId||"".concat("wistia-player-").concat((0,i.randomString)())),y(m(e),"onPlay",(function(){var t;return(t=e.props).onPlay.apply(t,arguments)})),y(m(e),"onPause",(function(){var t;return(t=e.props).onPause.apply(t,arguments)})),y(m(e),"onSeek",(function(){var t;return(t=e.props).onSeek.apply(t,arguments)})),y(m(e),"onEnded",(function(){var t;return(t=e.props).onEnded.apply(t,arguments)})),y(m(e),"mute",(function(){e.callPlayer("mute")})),y(m(e),"unmute",(function(){e.callPlayer("unmute")})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,o=n.playing,r=n.muted,a=n.controls,s=n.onReady,l=n.config,u=n.onError;(0,i.getSDK)("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then((function(e){l.customControls&&l.customControls.forEach((function(t){return e.defineControl(t)})),window._wq=window._wq||[],window._wq.push({id:t.playerID,options:c({autoPlay:o,silentAutoPlay:"allow",muted:r,controlsVisibleOnLoad:a,fullscreenButton:a,playbar:a,playbackRateControl:a,qualityControl:a,volumeControl:a,settingsControl:a,smallPlayButton:a},l.options),onReady:function(e){t.player=e,t.unbind(),t.player.bind("play",t.onPlay),t.player.bind("pause",t.onPause),t.player.bind("seek",t.onSeek),t.player.bind("end",t.onEnded),s()}})}),u)}},{key:"unbind",value:function(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.unbind(),this.callPlayer("remove")}},{key:"seekTo",value:function(e){this.callPlayer("time",e)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props.url,t=e&&e.match(a.MATCH_URL_WISTIA)[1],n="wistia_embed wistia_async_".concat(t);return r.default.createElement("div",{id:this.playerID,key:t,className:n,style:{width:"100%",height:"100%"}})}}])&&d(t.prototype,n),o&&d(t,o),l}(r.Component);t.default=v,y(v,"displayName","Wistia"),y(v,"canPlay",a.canPlay.wistia),y(v,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(f,e);var t,n,o,s=p(f);function f(){var e;c(this,f);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return g(h(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),g(h(e),"playerID",e.props.config.playerId||"".concat("twitch-player-").concat((0,i.randomString)())),g(h(e),"mute",(function(){e.callPlayer("setMuted",!0)})),g(h(e),"unmute",(function(){e.callPlayer("setMuted",!1)})),e}return t=f,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e,t){var n=this,o=this.props,r=o.playsinline,s=o.onError,c=o.config,u=o.controls,d=a.MATCH_URL_TWITCH_CHANNEL.test(e),p=d?e.match(a.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(a.MATCH_URL_TWITCH_VIDEO)[1];t?d?this.player.setChannel(p):this.player.setVideo("v"+p):(0,i.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then((function(t){n.player=new t.Player(n.playerID,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({video:d?"":p,channel:d?p:"",height:"100%",width:"100%",playsinline:r,autoplay:n.props.playing,muted:n.props.muted,controls:!!d||u,time:(0,i.parseStartTime)(e)},c.options));var o=t.Player,a=o.READY,s=o.PLAYING,f=o.PAUSE,h=o.ENDED,m=o.ONLINE,y=o.OFFLINE;n.player.addEventListener(a,n.props.onReady),n.player.addEventListener(s,n.props.onPlay),n.player.addEventListener(f,n.props.onPause),n.player.addEventListener(h,n.props.onEnded),n.player.addEventListener(m,n.props.onLoaded),n.player.addEventListener(y,n.props.onLoaded)}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){return r.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID})}}])&&u(t.prototype,n),o&&u(t,o),f}(r.Component);t.default=y,g(y,"displayName","Twitch"),g(y,"canPlay",a.canPlay.twitch),g(y,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=v(e);if(t){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(l,e);var t,n,o,s=m(l);function l(){var e;p(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return b(y(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),b(y(e),"onDurationChange",(function(){var t=e.getDuration();e.props.onDuration(t)})),b(y(e),"mute",(function(){e.callPlayer("setMuted",!0)})),b(y(e),"unmute",(function(){e.callPlayer("setMuted",!1)})),b(y(e),"ref",(function(t){e.container=t})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,o=n.controls,r=n.config,s=n.onError,l=n.playing,d=u(e.match(a.MATCH_URL_DAILYMOTION),2)[1];this.player?this.player.load(d,{start:(0,i.parseStartTime)(e),autoplay:l}):(0,i.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",(function(e){return e.player})).then((function(n){if(t.container){var a=n.player;t.player=new a(t.container,{width:"100%",height:"100%",video:d,params:c({controls:o,autoplay:t.props.playing,mute:t.props.muted,start:(0,i.parseStartTime)(e),origin:window.location.origin},r.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return s(e)}}})}}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return r.default.createElement("div",{style:e},r.default.createElement("div",{ref:this.ref}))}}])&&f(t.prototype,n),o&&f(t,o),l}(r.Component);t.default=w,b(w,"displayName","DailyMotion"),b(w,"canPlay",a.canPlay.dailymotion),b(w,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(l,e);var t,n,o,s=f(l);function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(m(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),y(m(e),"duration",null),y(m(e),"currentTime",null),y(m(e),"secondsLoaded",null),y(m(e),"mute",(function(){})),y(m(e),"unmute",(function(){})),y(m(e),"ref",(function(t){e.iframe=t})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,i.getSDK)("https://widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then((function(e){t.player=e.PlayerWidget(t.iframe),t.player.ready.then((function(){t.player.events.play.on(t.props.onPlay),t.player.events.pause.on(t.props.onPause),t.player.events.ended.on(t.props.onEnded),t.player.events.error.on(t.props.error),t.player.events.progress.on((function(e,n){t.currentTime=e,t.duration=n})),t.props.onReady()}))}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.config,o=t.match(a.MATCH_URL_MIXCLOUD)[1],s=(0,i.queryString)(c(c({},n.options),{},{feed:"/".concat(o,"/")}));return r.default.createElement("iframe",{key:o,ref:this.ref,style:{width:"100%",height:"100%"},src:"https://www.mixcloud.com/widget/iframe/?".concat(s),frameBorder:"0"})}}])&&d(t.prototype,n),o&&d(t,o),l}(r.Component);t.default=v,y(v,"displayName","Mixcloud"),y(v,"canPlay",a.canPlay.mixcloud),y(v,"loopOnEnded",!0)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(f,e);var t,n,o,s=p(f);function f(){var e;c(this,f);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return g(h(e=s.call.apply(s,[this].concat(n))),"callPlayer",i.callPlayer),g(h(e),"mute",(function(){e.setVolume(0)})),g(h(e),"unmute",(function(){null!==e.props.volume&&e.setVolume(e.props.volume)})),g(h(e),"ref",(function(t){e.container=t})),e}return t=f,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this,n=this.props,o=n.playing,r=n.config,s=n.onError,c=n.onDuration,u=e&&e.match(a.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,i.getSDK)("https://play.vidyard.com/embed/v4.js","VidyardV4","onVidyardAPI").then((function(e){t.container&&(e.api.addReadyListener((function(e,n){t.player=n,t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seek",t.props.onSeek),t.player.on("playerComplete",t.props.onEnded)}),u),e.api.renderPlayer(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({uuid:u,container:t.container,autoplay:o?1:0},r.options)),e.api.getPlayerMetadata(u).then((function(e){t.duration=e.length_in_seconds,c(e.length_in_seconds)})))}),s)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){window.VidyardV4.api.destroyPlayer(this.player)}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackSpeed",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.callPlayer("currentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.display};return r.default.createElement("div",{style:e},r.default.createElement("div",{ref:this.ref}))}}])&&u(t.prototype,n),o&&u(t,o),f}(r.Component);t.default=y,g(y,"displayName","Vidyard"),g(y,"canPlay",a.canPlay.vidyard)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=h(e);if(t){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,n,o,a=d(s);function s(){var e;l(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return m(f(e=a.call.apply(a,[this].concat(n))),"callPlayer",i.callPlayer),m(f(e),"duration",null),m(f(e),"currentTime",null),m(f(e),"secondsLoaded",null),m(f(e),"mute",(function(){e.callPlayer("mute")})),m(f(e),"unmute",(function(){e.callPlayer("unmute")})),m(f(e),"ref",(function(t){e.iframe=t})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(e){var t=this;(0,i.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.on("ready",(function(){t.player.isReady=!0,t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",(function(e){var n=e.duration,o=e.seconds;t.duration=n,t.currentTime=o})),t.player.on("buffered",(function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)})),t.player.setLoop(t.props.loop),t.props.muted&&t.player.mute(),setTimeout((function(){t.props.onReady()}))})))}),this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){return r.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allowFullScreen:!0,allow:"encrypted-media",referrerPolicy:"no-referrer-when-downgrade"})}}])&&c(t.prototype,n),o&&c(t,o),s}(r.Component);t.default=g,m(g,"displayName","Kaltura"),m(g,"canPlay",a.canPlay.kaltura)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),i=n(1),a=n(2);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y="undefined"!=typeof navigator,v=y&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,b=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||v)&&!window.MSStream,w=/www\.dropbox\.com\/.+/,k=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(f,e);var t,n,o,s=p(f);function f(){var e;c(this,f);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return g(h(e=s.call.apply(s,[this].concat(n))),"onReady",(function(){var t;return(t=e.props).onReady.apply(t,arguments)})),g(h(e),"onPlay",(function(){var t;return(t=e.props).onPlay.apply(t,arguments)})),g(h(e),"onBuffer",(function(){var t;return(t=e.props).onBuffer.apply(t,arguments)})),g(h(e),"onBufferEnd",(function(){var t;return(t=e.props).onBufferEnd.apply(t,arguments)})),g(h(e),"onPause",(function(){var t;return(t=e.props).onPause.apply(t,arguments)})),g(h(e),"onEnded",(function(){var t;return(t=e.props).onEnded.apply(t,arguments)})),g(h(e),"onError",(function(){var t;return(t=e.props).onError.apply(t,arguments)})),g(h(e),"onEnablePIP",(function(){var t;return(t=e.props).onEnablePIP.apply(t,arguments)})),g(h(e),"onDisablePIP",(function(t){var n=e.props,o=n.onDisablePIP,r=n.playing;o(t),r&&e.play()})),g(h(e),"onPresentationModeChange",(function(t){if(e.player&&(0,i.supportsWebKitPresentationMode)(e.player)){var n=e.player.webkitPresentationMode;"picture-in-picture"===n?e.onEnablePIP(t):"inline"===n&&e.onDisablePIP(t)}})),g(h(e),"onSeek",(function(t){e.props.onSeek(t.target.currentTime)})),g(h(e),"mute",(function(){e.player.muted=!0})),g(h(e),"unmute",(function(){e.player.muted=!1})),g(h(e),"renderSourceElement",(function(e,t){return"string"==typeof e?r.default.createElement("source",{key:t,src:e}):r.default.createElement("source",l({key:t},e))})),g(h(e),"renderTrack",(function(e,t){return r.default.createElement("track",l({key:t},e))})),g(h(e),"ref",(function(t){e.player&&(e.prevPlayer=e.player),e.player=t})),e}return t=f,(n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player),b&&this.player.load()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url===e.url||(0,i.isMediaStream)(this.props.url)||(this.player.srcObject=null)}},{key:"componentWillUnmount",value:function(){this.removeListeners(this.player),this.hls&&this.hls.destroy()}},{key:"addListeners",value:function(e){var t=this.props,n=t.url,o=t.playsinline;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(n)||e.addEventListener("canplay",this.onReady),o&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}},{key:"removeListeners",value:function(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}},{key:"shouldUseAudio",value:function(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(a.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}},{key:"shouldUseHLS",value:function(e){return!!this.props.config.forceHLS||!b&&(a.HLS_EXTENSIONS.test(e)||k.test(e))}},{key:"shouldUseDASH",value:function(e){return a.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}},{key:"shouldUseFLV",value:function(e){return a.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}},{key:"load",value:function(e){var t=this,n=this.props.config,o=n.hlsVersion,r=n.hlsOptions,a=n.dashVersion,s=n.flvVersion;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,i.getSDK)("https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js".replace("VERSION",o),"Hls").then((function(n){if(t.hls=new n(r),t.hls.on(n.Events.MANIFEST_PARSED,(function(){t.props.onReady()})),t.hls.on(n.Events.ERROR,(function(e,o){t.props.onError(e,o,t.hls,n)})),k.test(e)){var o=e.match(k)[1];t.hls.loadSource("https://videodelivery.net/{id}/manifest/video.m3u8".replace("{id}",o))}else t.hls.loadSource(e);t.hls.attachMedia(t.player),t.props.onLoaded()})),this.shouldUseDASH(e)&&(0,i.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js".replace("VERSION",a),"dashjs").then((function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.on("error",t.props.onError),parseInt(a)<3?t.dash.getDebug().setLogToBrowserConsole(!1):t.dash.updateSettings({debug:{logLevel:n.Debug.LOG_LEVEL_NONE}}),t.props.onLoaded()})),this.shouldUseFLV(e)&&(0,i.getSDK)("https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js".replace("VERSION",s),"flvjs").then((function(n){t.flv=n.createPlayer({type:"flv",url:e}),t.flv.attachMediaElement(t.player),t.flv.load(),t.props.onLoaded()})),e instanceof Array)this.player.load();else if((0,i.isMediaStream)(e))try{this.player.srcObject=e}catch(t){this.player.src=window.URL.createObjectURL(e)}}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,i.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,i.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){if(!this.player)return null;var e=this.player,t=e.duration,n=e.seekable;return t===1/0&&n.length>0?n.end(n.length-1):t}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var e=this.player.buffered;if(0===e.length)return 0;var t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}},{key:"getSource",value:function(e){var t=this.shouldUseHLS(e),n=this.shouldUseDASH(e),o=this.shouldUseFLV(e);if(!(e instanceof Array||(0,i.isMediaStream)(e)||t||n||o))return w.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.playing,o=e.loop,i=e.controls,a=e.muted,s=e.config,c=e.width,u=e.height,d=this.shouldUseAudio(this.props)?"audio":"video",p={width:"auto"===c?c:"100%",height:"auto"===u?u:"100%"};return r.default.createElement(d,l({ref:this.ref,src:this.getSource(t),style:p,preload:"auto",autoPlay:n||void 0,controls:i,muted:a,loop:o},s.attributes),t instanceof Array&&t.map(this.renderSourceElement),s.tracks.map(this.renderTrack))}}])&&u(t.prototype,n),o&&u(t,o),f}(r.Component);t.default=x,g(x,"displayName","FilePlayer"),g(x,"canPlay",a.canPlay.file)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createReactPlayer=void 0;var o=_(n(0)),r=u(n(10)),i=u(n(53)),a=u(n(11)),s=n(12),l=n(1),c=u(n(57));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function m(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=S(e);if(t){var r=S(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?x(e):t}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}var T=(0,o.lazy)((function(){return Promise.resolve().then((function(){return _(n(58))}))})),O="undefined"!=typeof window&&window.document,P=void 0!==e&&e.window&&e.window.document,M=Object.keys(s.propTypes),L=O||P?o.Suspense:function(){return null},B=[];t.createReactPlayer=function(e,t){var n,u;return u=n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(k,n);var u,d,p,g=w(k);function k(){var n;y(this,k);for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];return E(x(n=g.call.apply(g,[this].concat(u))),"state",{showPreview:!!n.props.light}),E(x(n),"references",{wrapper:function(e){n.wrapper=e},player:function(e){n.player=e}}),E(x(n),"handleClickPreview",(function(e){n.setState({showPreview:!1}),n.props.onClickPreview(e)})),E(x(n),"showPreview",(function(){n.setState({showPreview:!0})})),E(x(n),"getDuration",(function(){return n.player?n.player.getDuration():null})),E(x(n),"getCurrentTime",(function(){return n.player?n.player.getCurrentTime():null})),E(x(n),"getSecondsLoaded",(function(){return n.player?n.player.getSecondsLoaded():null})),E(x(n),"getInternalPlayer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null})),E(x(n),"seekTo",(function(e,t){if(!n.player)return null;n.player.seekTo(e,t)})),E(x(n),"handleReady",(function(){n.props.onReady(x(n))})),E(x(n),"getActivePlayer",(0,i.default)((function(n){for(var o=0,r=[].concat(B,m(e));o<r.length;o++){var i=r[o];if(i.canPlay(n))return i}return t||null}))),E(x(n),"getConfig",(0,i.default)((function(e,t){var o=n.props.config;return r.default.all([s.defaultProps.config,s.defaultProps.config[t]||{},o,o[t]||{}])}))),E(x(n),"getAttributes",(0,i.default)((function(e){return(0,l.omit)(n.props,M)}))),E(x(n),"renderActivePlayer",(function(e){if(!e)return null;var t=n.getActivePlayer(e);if(!t)return null;var r=n.getConfig(e,t.key);return o.default.createElement(c.default,h({},n.props,{key:t.key,ref:n.references.player,config:r,activePlayer:t.lazyPlayer||t,onReady:n.handleReady}))})),n}return u=k,(d=[{key:"shouldComponentUpdate",value:function(e,t){return!(0,a.default)(this.props,e)||!(0,a.default)(this.state,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.light;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}},{key:"renderPreview",value:function(e){if(!e)return null;var t=this.props,n=t.light,r=t.playIcon,i=t.previewTabIndex;return o.default.createElement(T,{url:e,light:n,playIcon:r,previewTabIndex:i,onClick:this.handleClickPreview})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,i=e.height,a=e.fallback,s=e.wrapper,l=this.state.showPreview,c=this.getAttributes(t);return o.default.createElement(s,h({ref:this.references.wrapper,style:f(f({},n),{},{width:r,height:i})},c),o.default.createElement(L,{fallback:a},l?this.renderPreview(t):this.renderActivePlayer(t)))}}])&&v(u.prototype,d),p&&v(u,p),k}(o.Component),E(n,"displayName","ReactPlayer"),E(n,"propTypes",s.propTypes),E(n,"defaultProps",s.defaultProps),E(n,"addCustomPlayer",(function(e){B.push(e)})),E(n,"removeCustomPlayers",(function(){B.length=0})),E(n,"canPlay",(function(t){for(var n=0,o=[].concat(B,m(e));n<o.length;n++)if(o[n].canPlay(t))return!0;return!1})),E(n,"canEnablePIP",(function(t){for(var n=0,o=[].concat(B,m(e));n<o.length;n++){var r=o[n];if(r.canEnablePIP&&r.canEnablePIP(t))return!0}return!1})),u}}).call(this,n(52))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var o=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(i=t[n])||o(r)&&o(i)))return!1;var r,i;return!0}t.default=function(e,t){var n;void 0===t&&(t=r);var o,i=[],a=!1;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return a&&n===this&&t(r,i)||(o=e.apply(this,r),a=!0,n=this,i=r),o}}},function(e,t,n){e.exports=n(55)()},function(e,t,n){"use strict";var o=n(56);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(0)),a=(r=n(11))&&r.__esModule?r:{default:r},s=n(12);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(s,e);var t,n,o,r=f(s);function s(){var e;u(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(m(e=r.call.apply(r,[this].concat(n))),"mounted",!1),y(m(e),"isReady",!1),y(m(e),"isPlaying",!1),y(m(e),"isLoading",!0),y(m(e),"loadOnReady",null),y(m(e),"startOnPlay",!0),y(m(e),"seekOnPlay",null),y(m(e),"onDurationCalled",!1),y(m(e),"handlePlayerMount",(function(t){e.player=t,e.player.load(e.props.url),e.progress()})),y(m(e),"getInternalPlayer",(function(t){return e.player?e.player[t]:null})),y(m(e),"progress",(function(){if(e.props.url&&e.player&&e.isReady){var t=e.getCurrentTime()||0,n=e.getSecondsLoaded(),o=e.getDuration();if(o){var r={playedSeconds:t,played:t/o};null!==n&&(r.loadedSeconds=n,r.loaded=n/o),r.playedSeconds===e.prevPlayed&&r.loadedSeconds===e.prevLoaded||e.props.onProgress(r),e.prevPlayed=r.playedSeconds,e.prevLoaded=r.loadedSeconds}}e.progressTimeout=setTimeout(e.progress,e.props.progressFrequency||e.props.progressInterval)})),y(m(e),"handleReady",(function(){if(e.mounted){e.isReady=!0,e.isLoading=!1;var t=e.props,n=t.onReady,o=t.playing,r=t.volume,i=t.muted;n(),i||null===r||e.player.setVolume(r),e.loadOnReady?(e.player.load(e.loadOnReady,!0),e.loadOnReady=null):o&&e.player.play(),e.handleDurationCheck()}})),y(m(e),"handlePlay",(function(){e.isPlaying=!0,e.isLoading=!1;var t=e.props,n=t.onStart,o=t.onPlay,r=t.playbackRate;e.startOnPlay&&(e.player.setPlaybackRate&&1!==r&&e.player.setPlaybackRate(r),n(),e.startOnPlay=!1),o(),e.seekOnPlay&&(e.seekTo(e.seekOnPlay),e.seekOnPlay=null),e.handleDurationCheck()})),y(m(e),"handlePause",(function(t){e.isPlaying=!1,e.isLoading||e.props.onPause(t)})),y(m(e),"handleEnded",(function(){var t=e.props,n=t.activePlayer,o=t.loop,r=t.onEnded;n.loopOnEnded&&o&&e.seekTo(0),o||(e.isPlaying=!1,r())})),y(m(e),"handleError",(function(){var t;e.isLoading=!1,(t=e.props).onError.apply(t,arguments)})),y(m(e),"handleDurationCheck",(function(){clearTimeout(e.durationCheckTimeout);var t=e.getDuration();t?e.onDurationCalled||(e.props.onDuration(t),e.onDurationCalled=!0):e.durationCheckTimeout=setTimeout(e.handleDurationCheck,100)})),y(m(e),"handleLoaded",(function(){e.isLoading=!1})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.player){var n=this.props,o=n.url,r=n.playing,i=n.volume,s=n.muted,l=n.playbackRate,c=n.pip,u=n.loop,d=n.activePlayer;if(!(0,a.default)(e.url,o)){if(this.isLoading&&!d.forceLoad)return console.warn("ReactPlayer: the attempt to load ".concat(o," is being deferred until the player has loaded")),void(this.loadOnReady=o);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(o,this.isReady)}e.playing||!r||this.isPlaying||this.player.play(),e.playing&&!r&&this.isPlaying&&this.player.pause(),!e.pip&&c&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!c&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==i&&null!==i&&this.player.setVolume(i),e.muted!==s&&(s?this.player.mute():(this.player.unmute(),null!==i&&setTimeout((function(){return t.player.setVolume(i)})))),e.playbackRate!==l&&this.player.setPlaybackRate&&this.player.setPlaybackRate(l),e.loop!==u&&this.player.setLoop&&this.player.setLoop(u)}}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e,t){var n=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout((function(){n.seekOnPlay=null}),5e3);if(t?"fraction"===t:e>0&&e<1){var o=this.player.getDuration();return o?void this.player.seekTo(o*e):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return e?i.default.createElement(e,c({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}])&&d(t.prototype,n),o&&d(t,o),s}(i.Component);t.default=v,y(v,"displayName","Player"),y(v,"propTypes",s.propTypes),y(v,"defaultProps",s.defaultProps)},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(0));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=h(e);if(t){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g={},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,o,i=d(a);function a(){var e;l(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return m(f(e=i.call.apply(i,[this].concat(n))),"mounted",!1),m(f(e),"state",{image:null}),m(f(e),"handleKeyPress",(function(t){"Enter"!==t.key&&" "!==t.key||e.props.onClick()})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.url,o=t.light;e.url===n&&e.light===o||this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function(e){var t=this,n=e.url,o=e.light;if("string"!=typeof o){if(!g[n])return this.setState({image:null}),window.fetch("https://noembed.com/embed?url=".concat(n)).then((function(e){return e.json()})).then((function(e){if(e.thumbnail_url&&t.mounted){var o=e.thumbnail_url.replace("height=100","height=480");t.setState({image:o}),g[n]=o}}));this.setState({image:g[n]})}else this.setState({image:o})}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.playIcon,o=e.previewTabIndex,i=this.state.image,a={display:"flex",alignItems:"center",justifyContent:"center"},l={preview:s({width:"100%",height:"100%",backgroundImage:i?"url(".concat(i,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},a),shadow:s({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:"64px",width:"64px",height:"64px"},a),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},c=r.default.createElement("div",{style:l.shadow,className:"react-player__shadow"},r.default.createElement("div",{style:l.playIcon,className:"react-player__play-icon"}));return r.default.createElement("div",{style:l.preview,className:"react-player__preview",onClick:t,tabIndex:o,onKeyPress:this.handleKeyPress},n||c)}}])&&c(t.prototype,n),o&&c(t,o),a}(r.Component);t.default=y},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return D}));var o=n(6),r=n.n(o),i=n(13),a=n.n(i),s=n(4),l=n.n(s),c=n(3),u=n.n(c),d=(n(24),n(14)),p=n.n(d),f=n(15),h=n.n(f),m=n(16),g=n.n(m),y=n(17),v=n.n(y);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var w=function(){function e(t){var n=t.api,o=t.config,r=t.onSelectFile,i=t.readOnly;l()(this,e),this.api=n,this.config=o,this.onSelectFile=r,this.readOnly=i,this.nodes={wrapper:k("div",[this.CSS.baseClass,this.CSS.wrapper]),videoContainer:k("div",[this.CSS.videoContainer]),fileButton:this.createFileButton(),videoEl:void 0,videoPreloader:k("video",this.CSS.videoPreloader),caption:k("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly})},this.nodes.caption.dataset.placeholder=this.config.captionPlaceholder,this.nodes.videoContainer.appendChild(this.nodes.videoPreloader),this.nodes.wrapper.appendChild(this.nodes.videoContainer),this.nodes.wrapper.appendChild(this.nodes.caption),this.nodes.wrapper.appendChild(this.nodes.fileButton)}return u()(e,[{key:"render",value:function(t){return t.file&&0!==Object.keys(t.file).length?this.toggleStatus(e.status.UPLOADING):this.toggleStatus(e.status.EMPTY),this.nodes.wrapper}},{key:"createFileButton",value:function(){var e=this,t=k("div",[this.CSS.button]);return t.innerHTML=this.config.buttonContent||"".concat(g.a," ").concat(this.api.i18n.t("Select an Video")),t.addEventListener("click",(function(){e.onSelectFile()})),t}},{key:"showPreloader",value:function(t){this.nodes.videoPreloader.src="url(".concat(t,")"),this.toggleStatus(e.status.UPLOADING)}},{key:"hidePreloader",value:function(){this.nodes.videoPreloader.src="",this.toggleStatus(e.status.EMPTY)}},{key:"fillVideo",value:function(e){v()(this.nodes.videoContainer,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){h()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({url:e},this.config.player))}},{key:"fillCaption",value:function(e){this.nodes.caption&&(this.nodes.caption.innerHTML=e)}},{key:"toggleStatus",value:function(t){for(var n in e.status)Object.prototype.hasOwnProperty.call(e.status,n)&&this.nodes.wrapper.classList.toggle("".concat(this.CSS.wrapper,"--").concat(e.status[n]),t===e.status[n])}},{key:"applyTune",value:function(e,t){this.nodes.wrapper.classList.toggle("".concat(this.CSS.wrapper,"--").concat(e),t)}},{key:"CSS",get:function(){return{baseClass:this.api.styles.block,loading:this.api.styles.loader,input:this.api.styles.input,button:this.api.styles.button,wrapper:"video-tool",videoContainer:"video-tool__video",videoPreloader:"video-tool__video-preloader",videoEl:"video-tool__video-picture",caption:"video-tool__caption"}}}],[{key:"status",get:function(){return{EMPTY:"empty",UPLOADING:"loading",FILLED:"filled"}}}]),e}(),k=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.createElement(e);for(var i in Array.isArray(n)?(t=r.classList).add.apply(t,p()(n)):n&&r.classList.add(n),o)r[i]=o[i];return r},x=n(18),S=n.n(x),E=n(19),C=n.n(E),_=n(20),T=n.n(_),O=function(){function e(t){var n=t.api,o=t.actions,r=t.onChange;l()(this,e),this.api=n,this.actions=o,this.onChange=r,this.buttons=[]}return u()(e,[{key:"render",value:function(t){var n=this,o=k("div",this.CSS.wrapper);return this.buttons=[],e.tunes.concat(this.actions).forEach((function(e){var r=n.api.i18n.t(e.title),i=k("div",[n.CSS.buttonBase,n.CSS.button],{innerHTML:e.icon,title:r});i.addEventListener("click",(function(){n.tuneClicked(e.name,e.action)})),i.dataset.tune=e.name,i.classList.toggle(n.CSS.buttonActive,t[e.name]),n.buttons.push(i),n.api.tooltip.onHover(i,r,{placement:"top"}),o.appendChild(i)})),o}},{key:"tuneClicked",value:function(e,t){if("function"==typeof t&&!t(e))return!1;var n=this.buttons.find((function(t){return t.dataset.tune===e}));n.classList.toggle(this.CSS.buttonActive,!n.classList.contains(this.CSS.buttonActive)),this.onChange(e)}},{key:"CSS",get:function(){return{wrapper:"",buttonBase:this.api.styles.settingsButton,button:"video-tool__tune",buttonActive:this.api.styles.settingsButtonActive}}}],[{key:"tunes",get:function(){return[{name:"withBorder",icon:C.a,title:"With border"},{name:"stretched",icon:T.a,title:"Stretch video"},{name:"withBackground",icon:S.a,title:"With background"}]}}]),e}(),P=n(21),M=n.n(P),L=n(22),B=n.n(L),I=n(5),A=n.n(I),j=function(){function e(t){var n=t.config,o=t.onUpload,r=t.onError;l()(this,e),this.config=n,this.onUpload=o,this.onError=r}return u()(e,[{key:"uploadSelectedFile",value:function(e){var t=this,n=e.onPreview,o=function(e){var t=new FileReader;t.readAsDataURL(e),t.onload=function(e){n(e.target.result)}};(this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile?A.a.selectFiles({accept:this.config.types}).then((function(e){o(e[0]);var n=t.config.uploader.uploadByFile(e[0]);return R(n)||console.warn("Custom uploader method uploadByFile should return a Promise"),n})):A.a.transport({url:this.config.endpoints.byFile,data:this.config.additionalRequestData,accept:this.config.types,headers:this.config.additionalRequestHeaders,beforeSend:function(e){o(e[0])},fieldName:this.config.field}).then((function(e){return e.body}))).then((function(e){t.onUpload(e)})).catch((function(e){t.onError(e)}))}},{key:"uploadByUrl",value:function(e){var t,n=this;this.config.uploader&&"function"==typeof this.config.uploader.uploadByUrl?R(t=this.config.uploader.uploadByUrl(e))||console.warn("Custom uploader method uploadByUrl should return a Promise"):t=A.a.post({url:this.config.endpoints.byUrl,data:Object.assign({url:e},this.config.additionalRequestData),type:A.a.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((function(e){return e.body})),t.then((function(e){n.onUpload(e)})).catch((function(e){n.onError(e)}))}},{key:"uploadByFile",value:function(e,t){var n,o=this,r=t.onPreview,i=new FileReader;if(i.readAsDataURL(e),i.onload=function(e){r(e.target.result)},this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile)R(n=this.config.uploader.uploadByFile(e))||console.warn("Custom uploader method uploadByFile should return a Promise");else{var a=new FormData;a.append(this.config.field,e),this.config.additionalRequestData&&Object.keys(this.config.additionalRequestData).length&&Object.entries(this.config.additionalRequestData).forEach((function(e){var t=B()(e,2),n=t[0],o=t[1];a.append(n,o)})),n=A.a.post({url:this.config.endpoints.byFile,data:a,type:A.a.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((function(e){return e.body}))}n.then((function(e){o.onUpload(e)})).catch((function(e){o.onError(e)}))}}]),e}();function R(e){return Promise.resolve(e)===e}var D=function(){function e(t){var n=this,o=t.data,r=t.config,i=t.api,a=t.readOnly;l()(this,e),this.api=i,this.readOnly=a,this.config={endpoints:r.endpoints||"",additionalRequestData:r.additionalRequestData||{},additionalRequestHeaders:r.additionalRequestHeaders||{},field:r.field||"video",types:r.types||"video/*",captionPlaceholder:this.api.i18n.t(r.captionPlaceholder||"Caption"),buttonContent:r.buttonContent||"",uploader:r.uploader||void 0,actions:r.actions||[],player:{pip:r.player.pip||!1,controls:r.player.controls||!1,light:r.player.light||!1,playing:r.player.playing||!1}},this.uploader=new j({config:this.config,onUpload:function(e){return n.onUpload(e)},onError:function(e){return n.uploadingFailed(e)}}),this.ui=new w({api:i,config:this.config,onSelectFile:function(){n.uploader.uploadSelectedFile({onPreview:function(e){n.ui.showPreloader(e)}})},readOnly:a}),this.tunes=new O({api:i,actions:this.config.actions,onChange:function(e){return n.tuneToggled(e)}}),this._data={},this.data=o}var t;return u()(e,null,[{key:"isReadOnlySupported",get:function(){return!0}},{key:"toolbox",get:function(){return{icon:M.a,title:"Video"}}}]),u()(e,[{key:"render",value:function(){return this.ui.render(this.data)}},{key:"save",value:function(){var e=this.ui.nodes.caption;return this._data.caption=e.innerHTML,this.data}},{key:"renderSettings",value:function(){return this.tunes.render(this.data)}},{key:"appendCallback",value:function(){this.ui.nodes.fileButton.click()}},{key:"onPaste",value:(t=a()(r.a.mark((function e(t){var n,o,i,a,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="tag"===e.t0?3:"pattern"===e.t0?15:"file"===e.t0?18:21;break;case 3:if(n=t.detail.data,!/^blob:/.test(n.src)){e.next=13;break}return e.next=7,fetch(n.src);case 7:return o=e.sent,e.next=10,o.blob();case 10:return i=e.sent,this.uploadFile(i),e.abrupt("break",21);case 13:return this.uploadUrl(n.src),e.abrupt("break",21);case 15:return a=t.detail.data,this.uploadUrl(a),e.abrupt("break",21);case 18:return s=t.detail.file,this.uploadFile(s),e.abrupt("break",21);case 21:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"onUpload",value:function(e){e.success&&e.file?this.video=e.file:this.uploadingFailed("incorrect response: "+JSON.stringify(e))}},{key:"uploadingFailed",value:function(e){console.log("Video Tool: uploading failed because of",e),this.api.notifier.show({message:this.api.i18n.t("Couldn’t upload video. Please try another."),style:"error"}),this.ui.hidePreloader()}},{key:"tuneToggled",value:function(e){this.setTune(e,!this._data[e])}},{key:"setTune",value:function(e,t){var n=this;this._data[e]=t,this.ui.applyTune(e,t),"stretched"===e&&Promise.resolve().then((function(){var e=n.api.blocks.getCurrentBlockIndex();n.api.blocks.stretchBlock(e,t)})).catch((function(e){console.error(e)}))}},{key:"uploadFile",value:function(e){var t=this;this.uploader.uploadByFile(e,{onPreview:function(e){t.ui.showPreloader(e)}})}},{key:"uploadUrl",value:function(e){this.ui.showPreloader(e),this.uploader.uploadByUrl(e)}},{key:"data",set:function(e){var t=this;this.video=e.file,this._data.caption=e.caption||"",this.ui.fillCaption(this._data.caption),O.tunes.forEach((function(n){var o=n.name,r=void 0!==e[o]&&(!0===e[o]||"true"===e[o]);t.setTune(o,r)}))},get:function(){return this._data}},{key:"video",set:function(e){this._data.file=e||{},e&&e.url&&this.ui.fillVideo(e.url)}}],[{key:"pasteConfig",get:function(){return{tags:["video"],patterns:{video:/https?:\/\/\S+\.(mp4)$/i},files:{mimeTypes:["video/*"]}}}}]),e}()}]).default}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(){}Object.assign(t,{default:t,register:t,revert:function(){},__esModule:!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){const t=(this.document||this.ownerDocument).querySelectorAll(e);let n=t.length;for(;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){const t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach((e=>{const n=e instanceof Node;t.appendChild(n?e:document.createTextNode(e))})),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){e=0===arguments.length||!!e;const t=this.parentNode,n=window.getComputedStyle(t,null),o=parseInt(n.getPropertyValue("border-top-width")),r=parseInt(n.getPropertyValue("border-left-width")),i=this.offsetTop-t.offsetTop<t.scrollTop,a=this.offsetTop-t.offsetTop+this.clientHeight-o>t.scrollTop+t.clientHeight,s=this.offsetLeft-t.offsetLeft<t.scrollLeft,l=this.offsetLeft-t.offsetLeft+this.clientWidth-r>t.scrollLeft+t.clientWidth,c=i&&!a;(i||a)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(s||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-r+this.clientWidth/2),(i||a||s||l)&&!e&&this.scrollIntoView(c)}),window.requestIdleCallback=window.requestIdleCallback||function(e){const t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)};var n=(e=>(e.VERBOSE="VERBOSE",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e))(n||{});const o=8,r=9,i=13,a=27,s=37,l=38,c=40,u=39,d=46,p=0;function f(e,t,n="log",o,r="color: inherit"){if(!("console"in window)||!window.console[n])return;const i=["info","log","warn","error"].includes(n),a=[];switch(f.logLevel){case"ERROR":if("error"!==n)return;break;case"WARN":if(!["error","warn"].includes(n))return;break;case"INFO":if(!i||e)return}o&&a.push(o);const s="Editor.js 2.29.1";e&&(i?(a.unshift("line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;",r),t=`%c${s}%c ${t}`):t=`( ${s} )${t}`);try{i?o?console[n](`${t} %o`,...a):console[n](t,...a):console[n](t)}catch{}}f.logLevel="VERBOSE";const h=f.bind(window,!1),m=f.bind(window,!0);function g(e){return Object.prototype.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function y(e){return"function"===g(e)||"asyncfunction"===g(e)}function v(e){return"object"===g(e)}function b(e){return"string"===g(e)}function w(e){return"number"===g(e)}function k(e){return"undefined"===g(e)}function x(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function S(e){return e>47&&e<58||32===e||13===e||229===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223}async function E(e,t=(()=>{}),n=(()=>{})){return e.reduce((async(e,o)=>(await e,async function(e,t,n){try{await e.function(e.data),await t(k(e.data)?{}:e.data)}catch{n(k(e.data)?{}:e.data)}}(o,t,n))),Promise.resolve())}function C(e){return Array.prototype.slice.call(e)}function _(e,t){return function(){const n=this,o=arguments;window.setTimeout((()=>e.apply(n,o)),t)}}function T(e,t,n){let o;return(...r)=>{const i=this,a=n&&!o;window.clearTimeout(o),o=window.setTimeout((()=>{o=null,n||e.apply(i,r)}),t),a&&e.apply(i,r)}}function O(e,t,n=void 0){let o,r,i,a=null,s=0;n||(n={});const l=function(){s=!1===n.leading?0:Date.now(),a=null,i=e.apply(o,r),a||(o=r=null)};return function(){const c=Date.now();!s&&!1===n.leading&&(s=c);const u=t-(c-s);return o=this,r=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,i=e.apply(o,r),a||(o=r=null)):!a&&!1!==n.trailing&&(a=setTimeout(l,u)),i}}function P(e){return e[0].toUpperCase()+e.slice(1)}function M(e,...t){if(!t.length)return e;const n=t.shift();if(v(e)&&v(n))for(const t in n)v(n[t])?(e[t]||Object.assign(e,{[t]:{}}),M(e[t],n[t])):Object.assign(e,{[t]:n[t]});return M(e,...t)}function L(e){const t=function(){const e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find((e=>-1!==window.navigator.appVersion.toLowerCase().indexOf(e)));return t&&(e[t]=!0),e}();return e=e.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e=t.mac?e.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):e.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")}function B(){return((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(10)}function I(e,t,n){e&&m(`«${t}» is deprecated and will be removed in the next major release. Please use the «${n}» instead.`,"warn")}function A(e,t,n){const o=n.value?"value":"get",r=n[o],i=`#${t}Cache`;if(n[o]=function(...e){return void 0===this[i]&&(this[i]=r.apply(this,...e)),this[i]},"get"===o&&n.set){const t=n.set;n.set=function(n){delete e[i],t.apply(this,n)}}return n}function j(){return window.matchMedia("(max-width: 650px)").matches}const R=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);class D{static isSingleTag(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(o[e]=n[e]);return o}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach((t=>e.prepend(t))):e.prepend(t)}static swap(e,t){const n=document.createElement("div"),o=e.parentNode;o.insertBefore(n,e),o.insertBefore(e,t),o.insertBefore(t,n),o.removeChild(n)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((e=>`input[type="${e}"]`)).join(", ")}static findAllInputs(e){return C(e.querySelectorAll(D.allInputsSelector)).reduce(((e,t)=>D.isNativeInput(t)||D.containsOnlyInlineElements(t)?[...e,t]:[...e,...D.getDeepestBlockElements(t)]),[])}static getDeepestNode(e,t=!1){const n=t?"lastChild":"firstChild",o=t?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[n]){let r=e[n];if(D.isSingleTag(r)&&!D.isNativeInput(r)&&!D.isLineBreakTag(r))if(r[o])r=r[o];else{if(!r.parentNode[o])return r.parentNode;r=r.parentNode[o]}return this.getDeepestNode(r,t)}return e}static isElement(e){return!w(e)&&(e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE)}static isFragment(e){return!w(e)&&(e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isContentEditable(e){return"true"===e.contentEditable}static isNativeInput(e){return!(!e||!e.tagName)&&["INPUT","TEXTAREA"].includes(e.tagName)}static canSetCaret(e){let t=!0;if(D.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1}else t=D.isContentEditable(e);return t}static isNodeEmpty(e,t){let n;return!(this.isSingleTag(e)&&!this.isLineBreakTag(e))&&(n=this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent.replace("​",""),t&&(n=n.replace(new RegExp(t,"g"),"")),0===n.trim().length)}static isLeaf(e){return!!e&&0===e.childNodes.length}static isEmpty(e,t){e.normalize();const n=[e];for(;n.length>0;)if(e=n.shift()){if(this.isLeaf(e)&&!this.isNodeEmpty(e,t))return!1;e.childNodes&&n.push(...Array.from(e.childNodes))}return!0}static isHTMLString(e){const t=D.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return D.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){let t;b(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;const n=e=>!D.blockElements.includes(e.tagName.toLowerCase())&&Array.from(e.children).every(n);return Array.from(t.children).every(n)}static getDeepestBlockElements(e){return D.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce(((e,t)=>[...e,...D.getDeepestBlockElements(t)]),[])}static getHolder(e){return b(e)?document.getElementById(e):e}static isAnchor(e){return"a"===e.tagName.toLowerCase()}static offset(e){const t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,r=t.top+o,i=t.left+n;return{top:r,left:i,bottom:r+t.height,right:i+t.width}}}const N={ui:{blockTunes:{toggler:{"Click to tune":"","or drag to move":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{Add:""}},popover:{Filter:"","Nothing found":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},F=class{static ui(e,t){return F._t(e,t)}static t(e,t){return F._t(e,t)}static setDictionary(e){F.currentDictionary=e}static _t(e,t){const n=F.getNamespace(e);return n&&n[t]?n[t]:t}static getNamespace(e){return e.split(".").reduce(((e,t)=>e&&Object.keys(e).length?e[t]:{}),F.currentDictionary)}};let H=F;H.currentDictionary=N;class U extends Error{}class z{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const n=o=>{const r=t(o),i=this.subscribers[e].indexOf(n);return-1!==i&&this.subscribers[e].splice(i,1),r};this.subscribers[e].push(n)}emit(e,t){x(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce(((e,t)=>{const n=t(e);return void 0!==n?n:e}),t)}off(e,t){if(void 0!==this.subscribers[e]){for(let n=0;n<this.subscribers[e].length;n++)if(this.subscribers[e][n]===t){delete this.subscribers[e][n];break}}else console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`)}destroy(){this.subscribers={}}}function V(e){Object.setPrototypeOf(this,{get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(t){e.stretched=t},get stretched(){return e.stretched},get focusable(){return e.focusable},call:(t,n)=>e.call(t,n),save:()=>e.save(),validate:t=>e.validate(t),dispatchChange(){e.dispatchChange()}})}class q{constructor(){this.allListeners=[]}on(e,t,n,o=!1){const r=function(e=""){return`${e}${Math.floor(1e8*Math.random()).toString(16)}`}("l"),i={id:r,element:e,eventType:t,handler:n,options:o};if(!this.findOne(e,t,n))return this.allListeners.push(i),e.addEventListener(t,n,o),r}off(e,t,n,o){const r=this.findAll(e,t,n);r.forEach(((e,t)=>{const n=this.allListeners.indexOf(r[t]);n>-1&&(this.allListeners.splice(n,1),e.element.removeEventListener(e.eventType,e.handler,e.options))}))}offById(e){const t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}findOne(e,t,n){const o=this.findAll(e,t,n);return o.length>0?o[0]:null}findAll(e,t,n){let o;const r=e?this.findByEventTarget(e):[];return o=e&&t&&n?r.filter((e=>e.eventType===t&&e.handler===n)):e&&t?r.filter((e=>e.eventType===t)):r,o}removeAll(){this.allListeners.map((e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)})),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter((t=>{if(t.element===e)return t}))}findByType(e){return this.allListeners.filter((t=>{if(t.eventType===e)return t}))}findByHandler(e){return this.allListeners.filter((t=>{if(t.handler===e)return t}))}findById(e){return this.allListeners.find((t=>t.id===e))}}class ${constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new q,this.readOnlyMutableListeners={on:(e,t,n,o=!1)=>{this.mutableListenerIds.push(this.listeners.on(e,t,n,o))},clearAll:()=>{for(const e of this.mutableListenerIds)this.listeners.offById(e);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===$)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t}set state(e){this.Editor=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return"rtl"===this.config.i18n.direction}}class W{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}static get CSS(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?D.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtEditor(){return this.isSelectionAtEditor(W.get())}static isSelectionAtEditor(e){if(!e)return!1;let t=e.anchorNode||e.focusNode;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let n=null;return t&&t instanceof Element&&(n=t.closest(`.${W.CSS.editorZone}`)),!!n&&n.nodeType===Node.ELEMENT_NODE}static isRangeAtEditor(e){if(!e)return;let t=e.startContainer;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let n=null;return t&&t instanceof Element&&(n=t.closest(`.${W.CSS.editorZone}`)),!!n&&n.nodeType===Node.ELEMENT_NODE}static get isSelectionExists(){return!!W.get().anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){let e,t=document.selection,n={x:0,y:0,width:0,height:0};if(t&&"Control"!==t.type)return e=t.createRange(),n.x=e.boundingLeft,n.y=e.boundingTop,n.width=e.boundingWidth,n.height=e.boundingHeight,n;if(!window.getSelection)return h("Method window.getSelection is not supported","warn"),n;if(t=window.getSelection(),null===t.rangeCount||isNaN(t.rangeCount))return h("Method SelectionUtils.rangeCount is not supported","warn"),n;if(0===t.rangeCount)return n;if(e=t.getRangeAt(0).cloneRange(),e.getBoundingClientRect&&(n=e.getBoundingClientRect()),0===n.x&&0===n.y){const t=document.createElement("span");if(t.getBoundingClientRect){t.appendChild(document.createTextNode("​")),e.insertNode(t),n=t.getBoundingClientRect();const o=t.parentNode;o.removeChild(t),o.normalize()}}return n}static get text(){return window.getSelection?window.getSelection().toString():""}static get(){return window.getSelection()}static setCursor(e,t=0){const n=document.createRange(),o=window.getSelection();return D.isNativeInput(e)?D.canSetCaret(e)?(e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()):void 0:(n.setStart(e,t),n.setEnd(e,t),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect())}static isRangeInsideContainer(e){const t=W.range;return null!==t&&e.contains(t.startContainer)}static addFakeCursor(){const e=W.range;if(null===e)return;const t=D.make("span","codex-editor__fake-cursor");t.dataset.mutationFree="true",e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return null!==D.find(e,".codex-editor__fake-cursor")}static removeFakeCursor(e=document.body){const t=D.find(e,".codex-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}setFakeBackground(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}save(){this.savedSelectionRange=W.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,n=10){const o=window.getSelection();let r=null;return o&&o.anchorNode&&o.focusNode?([o.anchorNode,o.focusNode].forEach((o=>{let i=n;for(;i>0&&o.parentNode&&(o.tagName!==e||(r=o,t&&o.classList&&!o.classList.contains(t)&&(r=null),!r));)o=o.parentNode,i--})),r):null}expandToTag(e){const t=window.getSelection();t.removeAllRanges();const n=document.createRange();n.selectNodeContents(e),t.addRange(n)}}const Y="redactor dom changed",X="block changed",K="fake cursor is about to be toggled",Q="fake cursor have been set";function G(e,t){return e.mergeable&&e.name===t.name}var Z=(e=>(e.APPEND_CALLBACK="appendCallback",e.RENDERED="rendered",e.MOVED="moved",e.UPDATED="updated",e.REMOVED="removed",e.ON_PASTE="onPaste",e))(Z||{});class J extends z{constructor({id:e=B(),data:t,tool:n,api:o,readOnly:r,tunesData:i},a){super(),this.cachedInputs=[],this.toolRenderedElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.unavailableTunesData={},this.inputIndex=0,this.editorEventBus=null,this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(e=void 0)=>{const t=void 0===e,n=e instanceof InputEvent;let o;!t&&!n&&this.detectToolRootChange(e),o=!(!t&&!n)||!(e.length>0&&e.every((e=>{const{addedNodes:t,removedNodes:n,target:o}=e;return[...Array.from(t),...Array.from(n),o].some((e=>(D.isElement(e)||(e=e.parentElement),e&&null!==e.closest('[data-mutation-free="true"]'))))}))),o&&(this.dropInputsCache(),this.updateCurrentInput(),this.call("updated"),this.emit("didMutated",this))},this.name=n.name,this.id=e,this.settings=n.settings,this.config=n.settings.config||{},this.api=o,this.editorEventBus=a||null,this.blockAPI=new V(this),this.tool=n,this.toolInstance=n.create(t,this.blockAPI,r),this.tunes=n.tunes,this.composeTunes(i),this.holder=this.compose(),window.requestIdleCallback((()=>{this.watchBlockMutations(),this.addInputEvents()}))}static get CSS(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}get inputs(){if(0!==this.cachedInputs.length)return this.cachedInputs;const e=D.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){const t=this.inputs.findIndex((t=>t===e||t.contains(e)));-1!==t&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then((e=>e&&!x(e.data)?e.data:{}))}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return y(this.toolInstance.merge)}get focusable(){return 0!==this.inputs.length}get isEmpty(){const e=D.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}set selected(e){var t,n;this.holder.classList.toggle(J.CSS.selected,e);const o=!0===e&&W.isRangeInsideContainer(this.holder),r=!1===e&&W.isFakeCursorInsideContainer(this.holder);(o||r)&&(null==(t=this.editorEventBus)||t.emit(K,{state:e}),o?W.addFakeCursor():W.removeFakeCursor(this.holder),null==(n=this.editorEventBus)||n.emit(Q,{state:e}))}get selected(){return this.holder.classList.contains(J.CSS.selected)}set stretched(e){this.holder.classList.toggle(J.CSS.wrapperStretched,e)}get stretched(){return this.holder.classList.contains(J.CSS.wrapperStretched)}set dropTarget(e){this.holder.classList.toggle(J.CSS.dropTarget,e)}get pluginsContent(){return this.toolRenderedElement}call(e,t){if(y(this.toolInstance[e])){"appendCallback"===e&&h("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(t){h(`Error during '${e}' call: ${t.message}`,"error")}}}async mergeWith(e){await this.toolInstance.merge(e)}async save(){const e=await this.toolInstance.save(this.pluginsContent),t=this.unavailableTunesData;[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach((([e,n])=>{if(y(n.save))try{t[e]=n.save()}catch(e){h(`Tune ${n.constructor.name} save method throws an Error %o`,"warn",e)}}));const n=window.performance.now();let o;return Promise.resolve(e).then((e=>(o=window.performance.now(),{id:this.id,tool:this.name,data:e,tunes:t,time:o-n}))).catch((e=>{h(`Saving process for ${this.name} tool failed due to the ${e}`,"log","red")}))}async validate(e){let t=!0;return this.toolInstance.validate instanceof Function&&(t=await this.toolInstance.validate(e)),t}getTunes(){const e=document.createElement("div"),t=[];return["function"==typeof this.toolInstance.renderSettings?this.toolInstance.renderSettings():[],[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map((e=>e.render()))].flat().forEach((n=>{D.isElement(n)?e.appendChild(n):Array.isArray(n)?t.push(...n):t.push(n)})),[t,e]}updateCurrentInput(){this.currentInput=D.isNativeInput(document.activeElement)||!W.anchorNode?document.activeElement:W.anchorNode}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),y(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(1===e.length)return Promise.resolve(this.tool.toolbox[0]);const t=await this.data;return e.find((e=>Object.entries(e.data).some((([e,n])=>t[e]&&function(e,t){const n=Array.isArray(e)||v(e),o=Array.isArray(t)||v(t);return n||o?JSON.stringify(e)===JSON.stringify(t):e===t}(t[e],n)))))}async exportDataAsString(){return function(e,t){const n=null==t?void 0:t.export;return y(n)?n(e):b(n)?e[n]:(void 0!==n&&h("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")}(await this.data,this.tool.conversionConfig)}compose(){const e=D.make("div",J.CSS.wrapper),t=D.make("div",J.CSS.content),n=this.toolInstance.render();e.dataset.id=this.id,this.toolRenderedElement=n,t.appendChild(this.toolRenderedElement);let o=t;return[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].forEach((e=>{if(y(e.wrap))try{o=e.wrap(o)}catch(t){h(`Tune ${e.constructor.name} wrap method throws an Error %o`,"warn",t)}})),e.appendChild(o),e}composeTunes(e){Array.from(this.tunes.values()).forEach((t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))})),Object.entries(e).forEach((([e,t])=>{this.tunesInstances.has(e)||(this.unavailableTunesData[e]=t)}))}addInputEvents(){this.inputs.forEach((e=>{e.addEventListener("focus",this.handleFocus),D.isNativeInput(e)&&e.addEventListener("input",this.didMutated)}))}removeInputEvents(){this.inputs.forEach((e=>{e.removeEventListener("focus",this.handleFocus),D.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)}))}watchBlockMutations(){var e;this.redactorDomChangedCallback=e=>{const{mutations:t}=e;t.some((e=>function(e,t){const{type:n,target:o,addedNodes:r,removedNodes:i}=e;if(o===t)return!0;if(["characterData","attributes"].includes(n)){const e=o.nodeType===Node.TEXT_NODE?o.parentNode:o;return t.contains(e)}const a=Array.from(r).some((e=>t.contains(e))),s=Array.from(i).some((e=>t.contains(e)));return a||s}(e,this.toolRenderedElement)))&&this.didMutated(t)},null==(e=this.editorEventBus)||e.on(Y,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;null==(e=this.editorEventBus)||e.off(Y,this.redactorDomChangedCallback)}detectToolRootChange(e){e.forEach((e=>{if(Array.from(e.removedNodes).includes(this.toolRenderedElement)){const t=e.addedNodes[e.addedNodes.length-1];this.toolRenderedElement=t}}))}dropInputsCache(){this.cachedInputs=[]}}class ee extends ${static getNamespace(e){return e.isTune()?`blockTunes.${e.name}`:`tools.${e.name}`}get methods(){return{t:()=>{m("I18n.t() method can be accessed only from Tools","warn")}}}getMethodsForTool(e){return Object.assign(this.methods,{t:t=>H.t(ee.getNamespace(e),t)})}}var te={},ne={get exports(){return te},set exports(e){te=e}};!function(e,t){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){n(1),e.exports=function(){var e=n(6),t="cdx-notify--bounce-in",o=null;return{show:function(n){if(n.message){!function(){if(o)return!0;o=e.getWrapper(),document.body.appendChild(o)}();var r=null,i=n.time||8e3;switch(n.type){case"confirm":r=e.confirm(n);break;case"prompt":r=e.prompt(n);break;default:r=e.alert(n),window.setTimeout((function(){r.remove()}),i)}o.appendChild(r),r.classList.add(t)}}}}()},function(e,t,n){var o=n(2);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(4)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\'\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\'\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||"",r=e[3];if(!r)return o;if(t&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[o].concat(a).concat([i]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var o,r,i={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),s=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch{n=null}t[e]=n}return t[e]}}(),l=null,c=0,u=[],d=n(5);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=i[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(v(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(v(o.parts[a],t));i[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(e,t){var n=s(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=u[u.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),u.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=s(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}function m(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=u.indexOf(e);t>=0&&u.splice(t,1)}function g(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=g(t)),o=k.bind(null,n,a,!1),r=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=d(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if(typeof DEBUG<"u"&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var a=n[r];(s=i[a.id]).refs--,o.push(s)}for(e&&p(f(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=typeof window<"u"&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,t,n){var o,r,i,a,s,l,c,u,d;e.exports=(o="cdx-notifies",r="cdx-notify",i="cdx-notify__cross",a="cdx-notify__button--confirm",s="cdx-notify__button--cancel",l="cdx-notify__input",c="cdx-notify__button",u="cdx-notify__btns-wrapper",{alert:d=function(e){var t=document.createElement("DIV"),n=document.createElement("DIV"),o=e.message,a=e.style;return t.classList.add(r),a&&t.classList.add(r+"--"+a),t.innerHTML=o,n.classList.add(i),n.addEventListener("click",t.remove.bind(t)),t.appendChild(n),t},confirm:function(e){var t=d(e),n=document.createElement("div"),o=document.createElement("button"),r=document.createElement("button"),l=t.querySelector("."+i),p=e.cancelHandler,f=e.okHandler;return n.classList.add(u),o.innerHTML=e.okText||"Confirm",r.innerHTML=e.cancelText||"Cancel",o.classList.add(c),r.classList.add(c),o.classList.add(a),r.classList.add(s),p&&"function"==typeof p&&(r.addEventListener("click",p),l.addEventListener("click",p)),f&&"function"==typeof f&&o.addEventListener("click",f),o.addEventListener("click",t.remove.bind(t)),r.addEventListener("click",t.remove.bind(t)),n.appendChild(o),n.appendChild(r),t.appendChild(n),t},prompt:function(e){var t=d(e),n=document.createElement("div"),o=document.createElement("button"),r=document.createElement("input"),s=t.querySelector("."+i),p=e.cancelHandler,f=e.okHandler;return n.classList.add(u),o.innerHTML=e.okText||"Ok",o.classList.add(c),o.classList.add(a),r.classList.add(l),e.placeholder&&r.setAttribute("placeholder",e.placeholder),e.default&&(r.value=e.default),e.inputType&&(r.type=e.inputType),p&&"function"==typeof p&&s.addEventListener("click",p),f&&"function"==typeof f&&o.addEventListener("click",(function(){f(r.value)})),o.addEventListener("click",t.remove.bind(t)),n.appendChild(r),n.appendChild(o),t.appendChild(n),t},getWrapper:function(){var e=document.createElement("DIV");return e.classList.add(o),e}})}])}(ne);const oe=e(te);class re{show(e){oe.show(e)}}var ie={},ae={get exports(){return ie},set exports(e){ie=e}};!function(e,t){e.exports=function(){function e(e){var t=e.tags,n=Object.keys(t).map((function(e){return typeof t[e]})).every((function(e){return"object"===e||"boolean"===e||"function"===e}));if(!n)throw new Error("The configuration was invalid");this.config=e}var t=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function n(e){return-1!==t.indexOf(e.nodeName)}var o=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function r(e){return-1!==o.indexOf(e.nodeName)}function i(e,t){return e.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function a(e,t,n){return"function"==typeof e.tags[t]?e.tags[t](n):e.tags[t]}function s(e,t){return typeof t>"u"||"boolean"==typeof t&&!t}function l(e,t,n){var o=e.name.toLowerCase();return!0!==t&&("function"==typeof t[o]?!t[o](e.value,n):typeof t[o]>"u"||!1===t[o]||"string"==typeof t[o]&&t[o]!==e.value)}return e.prototype.clean=function(e){const t=document.implementation.createHTMLDocument(),n=t.createElement("div");return n.innerHTML=e,this._sanitize(t,n),n.innerHTML},e.prototype._sanitize=function(e,t){var o=i(e,t),c=o.firstChild();if(c)do{if(c.nodeType!==Node.TEXT_NODE){if(c.nodeType===Node.COMMENT_NODE){t.removeChild(c),this._sanitize(e,t);break}var u,d=r(c);d&&(u=Array.prototype.some.call(c.childNodes,n));var p=!!t.parentNode,f=n(t)&&n(c)&&p,h=c.nodeName.toLowerCase(),m=a(this.config,h,c);if(d&&u||s(c,m)||!this.config.keepNestedBlockElements&&f){if("SCRIPT"!==c.nodeName&&"STYLE"!==c.nodeName)for(;c.childNodes.length>0;)t.insertBefore(c.childNodes[0],c);t.removeChild(c),this._sanitize(e,t);break}for(var g=0;g<c.attributes.length;g+=1){var y=c.attributes[g];l(y,m,c)&&(c.removeAttribute(y.name),g-=1)}this._sanitize(e,c)}else if(""===c.data.trim()&&(c.previousElementSibling&&n(c.previousElementSibling)||c.nextElementSibling&&n(c.nextElementSibling))){t.removeChild(c),this._sanitize(e,t);break}}while(c=o.nextSibling())},e}()}(ae);const se=ie;function le(e,t){return e.map((e=>{const n=y(t)?t(e.tool):t;return x(n)||(e.data=ue(e.data,n)),e}))}function ce(e,t={}){return new se({tags:t}).clean(e)}function ue(e,t){return Array.isArray(e)?function(e,t){return e.map((e=>ue(e,t)))}(e,t):v(e)?function(e,t){const n={};for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const r=e[o],i=de(t[o])?t[o]:t;n[o]=ue(r,i)}return n}(e,t):b(e)?function(e,t){return v(t)?ce(e,t):!1===t?ce(e,{}):e}(e,t):e}function de(e){return v(e)||function(e){return"boolean"===g(e)}(e)||y(e)}var pe={},fe={get exports(){return pe},set exports(e){pe=e}};!function(e,t){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));class o{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=10,this.offsetLeft=10,this.offsetRight=10,this.hidingDelay=0,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(e,t,n){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const o=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},n);if(o.hidingDelay&&(this.hidingDelay=o.hidingDelay),this.nodes.content.innerHTML="","string"==typeof t)this.nodes.content.appendChild(document.createTextNode(t));else{if(!(t instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof t+" given.");this.nodes.content.appendChild(t)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case"top":this.placeTop(e,o);break;case"left":this.placeLeft(e,o);break;case"right":this.placeRight(e,o);break;default:this.placeBottom(e,o)}o&&o.delay?this.showingTimeout=setTimeout((()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0}),o.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(e=!1){if(this.hidingDelay&&!e)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout((()=>{this.hide(!0)}),this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(e,t,n){e.addEventListener("mouseenter",(()=>{this.show(e,t,n)})),e.addEventListener("mouseleave",(()=>{this.hide()}))}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const e="codex-tooltips-style";if(document.getElementById(e))return;const t=n(2),o=this.make("style",null,{textContent:t.toString(),id:e});this.prepend(document.head,o)}placeBottom(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.bottom+window.pageYOffset+this.offsetTop+t.marginTop;this.applyPlacement("bottom",o,r)}placeTop(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",o,r)}placeLeft(e,t){const n=e.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-t.marginLeft,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",o,r)}placeRight(e,t){const n=e.getBoundingClientRect(),o=n.right+this.offsetRight+t.marginRight,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",o,r)}applyPlacement(e,t,n){this.nodes.wrapper.classList.add(this.CSS.placement[e]),this.nodes.wrapper.style.left=t+"px",this.nodes.wrapper.style.top=n+"px"}make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o}append(e,t){Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.appendChild(t)}prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach((t=>e.prepend(t))):e.prepend(t)}}},function(e,t){e.exports='.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10.71 0h2.58c3.02 0 4.64.42 6.1 1.2a8.18 8.18 0 013.4 3.4C23.6 6.07 24 7.7 24 10.71v2.58c0 3.02-.42 4.64-1.2 6.1a8.18 8.18 0 01-3.4 3.4c-1.47.8-3.1 1.21-6.11 1.21H10.7c-3.02 0-4.64-.42-6.1-1.2a8.18 8.18 0 01-3.4-3.4C.4 17.93 0 16.3 0 13.29V10.7c0-3.02.42-4.64 1.2-6.1a8.18 8.18 0 013.4-3.4C6.07.4 7.7 0 10.71 0z"/></svg>\') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}'}]).default}(fe);const he=e(pe);let me=null;function ge(){me||(me=new he)}function ye(e=!1){ge(),null==me||me.hide(e)}function ve(e,t,n){ge(),null==me||me.onHover(e,t,n)}const be=function e(t,n){const o={};return Object.entries(t).forEach((([t,r])=>{if(v(r)){const i=n?`${n}.${t}`:t;Object.values(r).every((e=>b(e)))?o[t]=i:o[t]=e(r,i)}else o[t]=r})),o}(N);const we='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>',ke='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>';class xe{constructor(e){this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{this.nodes.root.classList.remove(xe.CSS.noFocus)},this.removeSpecialHoverBehavior=()=>{this.nodes.root.classList.remove(xe.CSS.noHover)},this.onErrorAnimationEnd=()=>{this.nodes.icon.classList.remove(xe.CSS.wobbleAnimation),this.nodes.icon.removeEventListener("animationend",this.onErrorAnimationEnd)},this.params=e,this.nodes.root=this.make(e)}get isDisabled(){return this.params.isDisabled}get toggle(){return this.params.toggle}get title(){return this.params.title}get closeOnActivate(){return this.params.closeOnActivate}get isConfirmationStateEnabled(){return null!==this.confirmationState}get isFocused(){return this.nodes.root.classList.contains(xe.CSS.focused)}static get CSS(){return{container:"ce-popover-item",title:"ce-popover-item__title",secondaryTitle:"ce-popover-item__secondary-title",icon:"ce-popover-item__icon",active:"ce-popover-item--active",disabled:"ce-popover-item--disabled",focused:"ce-popover-item--focused",hidden:"ce-popover-item--hidden",confirmationState:"ce-popover-item--confirmation",noHover:"ce-popover-item--no-hover",noFocus:"ce-popover-item--no-focus",wobbleAnimation:"wobble"}}getElement(){return this.nodes.root}handleClick(){this.isConfirmationStateEnabled?this.activateOrEnableConfirmationMode(this.confirmationState):this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){this.nodes.root.classList.toggle(xe.CSS.active,e)}toggleHidden(e){this.nodes.root.classList.toggle(xe.CSS.hidden,e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e){const t=D.make("div",xe.CSS.container);return e.name&&(t.dataset.itemName=e.name),this.nodes.icon=D.make("div",xe.CSS.icon,{innerHTML:e.icon||'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/></svg>'}),t.appendChild(this.nodes.icon),t.appendChild(D.make("div",xe.CSS.title,{innerHTML:e.title||""})),e.secondaryLabel&&t.appendChild(D.make("div",xe.CSS.secondaryTitle,{textContent:e.secondaryLabel})),e.isActive&&t.classList.add(xe.CSS.active),e.isDisabled&&t.classList.add(xe.CSS.disabled),t}enableConfirmationMode(e){const t={...this.params,...e,confirmation:e.confirmation},n=this.make(t);this.nodes.root.innerHTML=n.innerHTML,this.nodes.root.classList.add(xe.CSS.confirmationState),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior()}disableConfirmationMode(){const e=this.make(this.params);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.classList.remove(xe.CSS.confirmationState),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior()}enableSpecialHoverAndFocusBehavior(){this.nodes.root.classList.add(xe.CSS.noHover),this.nodes.root.classList.add(xe.CSS.noFocus),this.nodes.root.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.nodes.root.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){if(void 0===e.confirmation)try{e.onActivate(e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){this.nodes.icon.classList.contains(xe.CSS.wobbleAnimation)||(this.nodes.icon.classList.add(xe.CSS.wobbleAnimation),this.nodes.icon.addEventListener("animationend",this.onErrorAnimationEnd))}}const Se=class{constructor(e,t){this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=t}get currentItem(){return-1===this.cursor?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}setItems(e){this.items=e}next(){this.cursor=this.leafNodesAndReturnIndex(Se.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(Se.directions.LEFT)}dropCursor(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}leafNodesAndReturnIndex(e){if(0===this.items.length)return this.cursor;let t=this.cursor;return-1===t?t=e===Se.directions.RIGHT?-1:0:this.items[t].classList.remove(this.focusedCssClass),t=e===Se.directions.RIGHT?(t+1)%this.items.length:(this.items.length+t-1)%this.items.length,D.canSetCaret(this.items[t])&&_((()=>W.setCursor(this.items[t])),50)(),this.items[t].classList.add(this.focusedCssClass),t}};let Ee=Se;Ee.directions={RIGHT:"right",LEFT:"left"};class Ce{constructor(e){this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=e=>{if(this.isEventReadyForHandling(e))switch(Ce.usedKeys.includes(e.keyCode)&&e.preventDefault(),e.keyCode){case r:this.handleTabPress(e);break;case s:case l:this.flipLeft();break;case u:case c:this.flipRight();break;case i:this.handleEnterPress(e)}},this.iterator=new Ee(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Ce.usedKeys}get isActivated(){return this.activated}static get usedKeys(){return[r,s,u,i,l,c]}activate(e,t){this.activated=!0,e&&this.iterator.setItems(e),void 0!==t&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}focusFirst(){this.dropCursor(),this.flipRight()}flipLeft(){this.iterator.previous(),this.flipCallback()}flipRight(){this.iterator.next(),this.flipCallback()}hasFocus(){return!!this.iterator.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter((t=>t!==e))}dropCursor(){this.iterator.dropCursor()}isEventReadyForHandling(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}handleTabPress(e){switch(e.shiftKey?Ee.directions.LEFT:Ee.directions.RIGHT){case Ee.directions.RIGHT:this.flipRight();break;case Ee.directions.LEFT:this.flipLeft()}}handleEnterPress(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),y(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach((e=>e()))}}class _e{static get CSS(){return{wrapper:"cdx-search-field",icon:"cdx-search-field__icon",input:"cdx-search-field__input"}}constructor({items:e,onSearch:t,placeholder:n}){this.listeners=new q,this.items=e,this.onSearch=t,this.render(n)}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value="",this.searchQuery="",this.onSearch("",this.foundItems)}destroy(){this.listeners.removeAll()}render(e){this.wrapper=D.make("div",_e.CSS.wrapper);const t=D.make("div",_e.CSS.icon,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="5.5" stroke="currentColor" stroke-width="2"/><line x1="15.4142" x2="19" y1="15" y2="18.5858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>'});this.input=D.make("input",_e.CSS.input,{placeholder:e,tabIndex:-1}),this.wrapper.appendChild(t),this.wrapper.appendChild(this.input),this.listeners.on(this.input,"input",(()=>{this.searchQuery=this.input.value,this.onSearch(this.searchQuery,this.foundItems)}))}get foundItems(){return this.items.filter((e=>this.checkItem(e)))}checkItem(e){var t;const n=(null==(t=e.title)?void 0:t.toLowerCase())||"",o=this.searchQuery.toLowerCase();return n.includes(o)}}const Te=class{lock(){R?this.lockHard():document.body.classList.add(Te.CSS.scrollLocked)}unlock(){R?this.unlockHard():document.body.classList.remove(Te.CSS.scrollLocked)}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(Te.CSS.scrollLockedHard)}unlockHard(){document.body.classList.remove(Te.CSS.scrollLockedHard),null!==this.scrollPosition&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};let Oe=Te;Oe.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"};var Pe=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Le=(e=>(e.Close="close",e))(Le||{});const Be=class extends z{constructor(e){super(),this.scopeElement=document.body,this.listeners=new q,this.scrollLocker=new Oe,this.nodes={wrapper:null,popover:null,nothingFoundMessage:null,customContent:null,items:null,overlay:null},this.messages={nothingFound:"Nothing found",search:"Search"},this.onFlip=()=>{this.items.find((e=>e.isFocused)).onFocus()},this.items=e.items.map((e=>new xe(e))),void 0!==e.scopeElement&&(this.scopeElement=e.scopeElement),e.messages&&(this.messages={...this.messages,...e.messages}),e.customContentFlippableItems&&(this.customContentFlippableItems=e.customContentFlippableItems),this.make(),e.customContent&&this.addCustomContent(e.customContent),e.searchable&&this.addSearch(),this.initializeFlipper()}static get CSS(){return{popover:"ce-popover",popoverOpenTop:"ce-popover--open-top",popoverOpened:"ce-popover--opened",search:"ce-popover__search",nothingFoundMessage:"ce-popover__nothing-found-message",nothingFoundMessageDisplayed:"ce-popover__nothing-found-message--displayed",customContent:"ce-popover__custom-content",customContentHidden:"ce-popover__custom-content--hidden",items:"ce-popover__items",overlay:"ce-popover__overlay",overlayHidden:"ce-popover__overlay--hidden"}}getElement(){return this.nodes.wrapper}hasFocus(){return this.flipper.hasFocus()}show(){this.shouldOpenBottom||(this.nodes.popover.style.setProperty("--popover-height",this.height+"px"),this.nodes.popover.classList.add(Be.CSS.popoverOpenTop)),this.nodes.overlay.classList.remove(Be.CSS.overlayHidden),this.nodes.popover.classList.add(Be.CSS.popoverOpened),this.flipper.activate(this.flippableElements),void 0!==this.search&&requestAnimationFrame((()=>{var e;null==(e=this.search)||e.focus()})),j()&&this.scrollLocker.lock()}hide(){this.nodes.popover.classList.remove(Be.CSS.popoverOpened),this.nodes.popover.classList.remove(Be.CSS.popoverOpenTop),this.nodes.overlay.classList.add(Be.CSS.overlayHidden),this.flipper.deactivate(),this.items.forEach((e=>e.reset())),void 0!==this.search&&this.search.clear(),j()&&this.scrollLocker.unlock(),this.emit("close")}destroy(){this.flipper.deactivate(),this.listeners.removeAll(),j()&&this.scrollLocker.unlock()}make(){this.nodes.popover=D.make("div",[Be.CSS.popover]),this.nodes.nothingFoundMessage=D.make("div",[Be.CSS.nothingFoundMessage],{textContent:this.messages.nothingFound}),this.nodes.popover.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=D.make("div",[Be.CSS.items]),this.items.forEach((e=>{this.nodes.items.appendChild(e.getElement())})),this.nodes.popover.appendChild(this.nodes.items),this.listeners.on(this.nodes.popover,"click",(e=>{const t=this.getTargetItem(e);void 0!==t&&this.handleItemClick(t)})),this.nodes.wrapper=D.make("div"),this.nodes.overlay=D.make("div",[Be.CSS.overlay,Be.CSS.overlayHidden]),this.listeners.on(this.nodes.overlay,"click",(()=>{this.hide()})),this.nodes.wrapper.appendChild(this.nodes.overlay),this.nodes.wrapper.appendChild(this.nodes.popover)}addSearch(){this.search=new _e({items:this.items,placeholder:this.messages.search,onSearch:(e,t)=>{this.items.forEach((e=>{const n=!t.includes(e);e.toggleHidden(n)})),this.toggleNothingFoundMessage(0===t.length),this.toggleCustomContent(""!==e);const n=""===e?this.flippableElements:t.map((e=>e.getElement()));this.flipper.isActivated&&(this.flipper.deactivate(),this.flipper.activate(n))}});const e=this.search.getElement();e.classList.add(Be.CSS.search),this.nodes.popover.insertBefore(e,this.nodes.popover.firstChild)}addCustomContent(e){this.nodes.customContent=e,this.nodes.customContent.classList.add(Be.CSS.customContent),this.nodes.popover.insertBefore(e,this.nodes.popover.firstChild)}getTargetItem(e){return this.items.find((t=>e.composedPath().includes(t.getElement())))}handleItemClick(e){e.isDisabled||(this.items.filter((t=>t!==e)).forEach((e=>e.reset())),e.handleClick(),this.toggleItemActivenessIfNeeded(e),e.closeOnActivate&&this.hide())}initializeFlipper(){this.flipper=new Ce({items:this.flippableElements,focusedItemClass:xe.CSS.focused,allowedKeys:[r,l,c,i]}),this.flipper.onFlip(this.onFlip)}get flippableElements(){const e=this.items.map((e=>e.getElement()));return(this.customContentFlippableItems||[]).concat(e)}get height(){let e=0;if(null===this.nodes.popover)return e;const t=this.nodes.popover.cloneNode(!0);return t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.classList.add(Be.CSS.popoverOpened),document.body.appendChild(t),e=t.offsetHeight,t.remove(),e}get shouldOpenBottom(){const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),n=this.height,o=e.top+n,r=e.top-n,i=Math.min(window.innerHeight,t.bottom);return r<t.top||o<=i}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle(Be.CSS.nothingFoundMessageDisplayed,e)}toggleCustomContent(e){var t;null==(t=this.nodes.customContent)||t.classList.toggle(Be.CSS.customContentHidden,e)}toggleItemActivenessIfNeeded(e){if(!0===e.toggle&&e.toggleActive(),"string"==typeof e.toggle){const t=this.items.filter((t=>t.toggle===e.toggle));if(1===t.length)return void e.toggleActive();t.forEach((t=>{t.toggleActive(t===e)}))}}};let Ie=Be;((e,t,n,o)=>{for(var r,i=o>1?void 0:o?Me(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(i=(o?r(t,n,i):r(i))||i);o&&i&&Pe(t,n,i)})([A],Ie.prototype,"height",1);class Ae extends ${constructor(){super(...arguments),this.opened=!1,this.tools=[],this.flipper=null,this.togglingCallback=null}static get CSS(){return{conversionToolbarWrapper:"ce-conversion-toolbar",conversionToolbarShowed:"ce-conversion-toolbar--showed",conversionToolbarTools:"ce-conversion-toolbar__tools",conversionToolbarLabel:"ce-conversion-toolbar__label",conversionTool:"ce-conversion-tool",conversionToolHidden:"ce-conversion-tool--hidden",conversionToolIcon:"ce-conversion-tool__icon",conversionToolSecondaryLabel:"ce-conversion-tool__secondary-label",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}make(){this.nodes.wrapper=D.make("div",[Ae.CSS.conversionToolbarWrapper,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),this.nodes.tools=D.make("div",Ae.CSS.conversionToolbarTools);const e=D.make("div",Ae.CSS.conversionToolbarLabel,{textContent:H.ui(be.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),D.append(this.nodes.wrapper,e),D.append(this.nodes.wrapper,this.nodes.tools),this.nodes.wrapper}destroy(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}toggle(e){this.opened?this.close():this.open(),y(e)&&(this.togglingCallback=e)}open(){this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(Ae.CSS.conversionToolbarShowed),window.requestAnimationFrame((()=>{this.flipper.activate(this.tools.map((e=>e.button)).filter((e=>!e.classList.contains(Ae.CSS.conversionToolHidden)))),this.flipper.focusFirst(),y(this.togglingCallback)&&this.togglingCallback(!0)}))}close(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(Ae.CSS.conversionToolbarShowed),y(this.togglingCallback)&&this.togglingCallback(!1)}hasTools(){return 1!==this.tools.length||this.tools[0].name!==this.config.defaultBlock}async replaceWithBlock(e,t){const{BlockManager:n,BlockSelection:o,InlineToolbar:r,Caret:i}=this.Editor;n.convert(this.Editor.BlockManager.currentBlock,e,t),o.clearSelection(),this.close(),r.close(),window.requestAnimationFrame((()=>{i.setToBlock(this.Editor.BlockManager.currentBlock,i.positions.END)}))}addTools(){const e=this.Editor.Tools.blockTools;Array.from(e.entries()).forEach((([e,t])=>{var n;const o=t.conversionConfig;!o||!o.import||null==(n=t.toolbox)||n.forEach((t=>this.addToolIfValid(e,t)))}))}addToolIfValid(e,t){x(t)||!t.icon||this.addTool(e,t)}addTool(e,t){var n;const o=D.make("div",[Ae.CSS.conversionTool]),r=D.make("div",[Ae.CSS.conversionToolIcon]);o.dataset.tool=e,r.innerHTML=t.icon,D.append(o,r),D.append(o,D.text(H.t(be.toolNames,t.title||P(e))));const i=null==(n=this.Editor.Tools.blockTools.get(e))?void 0:n.shortcut;if(i){const e=D.make("span",Ae.CSS.conversionToolSecondaryLabel,{innerText:L(i)});D.append(o,e)}D.append(this.nodes.tools,o),this.tools.push({name:e,button:o,toolboxItem:t}),this.listeners.on(o,"click",(async()=>{await this.replaceWithBlock(e,t.data)}))}async filterTools(){const{currentBlock:e}=this.Editor.BlockManager,t=await e.getActiveToolboxEntry();this.tools.forEach((n=>{let o=!1;if(t){const r=function(e,t){return e.icon===t.icon&&e.title===t.title}(t,n.toolboxItem);o=n.button.dataset.tool===e.name&&r}n.button.hidden=o,n.button.classList.toggle(Ae.CSS.conversionToolHidden,o)}))}enableFlipper(){this.flipper=new Ce({focusedItemClass:Ae.CSS.conversionToolFocused})}}var je={},Re={get exports(){return je},set exports(e){je=e}};!function(e,t){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.r(t);var i=function(){function e(t){var n=this;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.commands={},this.keys={},this.name=t.name,this.parseShortcutName(t.name),this.element=t.on,this.callback=t.callback,this.executeShortcut=function(e){n.execute(e)},this.element.addEventListener("keydown",this.executeShortcut,!1)}return r(e,null,[{key:"supportedCommands",get:function(){return{SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]}}},{key:"keyCodes",get:function(){return{0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,BACKSPACE:8,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,".":190}}}]),r(e,[{key:"parseShortcutName",value:function(t){t=t.split("+");for(var n=0;n<t.length;n++){t[n]=t[n].toUpperCase();var o=!1;for(var r in e.supportedCommands)if(e.supportedCommands[r].includes(t[n])){o=this.commands[r]=!0;break}o||(this.keys[t[n]]=!0)}for(var i in e.supportedCommands)this.commands[i]||(this.commands[i]=!1)}},{key:"execute",value:function(t){var n,o={CMD:t.ctrlKey||t.metaKey,SHIFT:t.shiftKey,ALT:t.altKey},r=!0;for(n in this.commands)this.commands[n]!==o[n]&&(r=!1);var i,a=!0;for(i in this.keys)a=a&&t.keyCode===e.keyCodes[i];r&&a&&this.callback(t)}},{key:"remove",value:function(){this.element.removeEventListener("keydown",this.executeShortcut)}}]),e}();t.default=i}]).default}(Re);const De=e(je);const Ne=new class{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const t=new De({name:e.name,on:e.on,callback:e.handler}),n=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...n,t])}remove(e,t){const n=this.findShortcut(e,t);if(!n)return;n.remove();const o=this.registeredShortcuts.get(e);this.registeredShortcuts.set(e,o.filter((e=>e!==n)))}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find((({name:e})=>e===t))}};var Fe=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Ue=(e,t,n,o)=>{for(var r,i=o>1?void 0:o?He(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(i=(o?r(t,n,i):r(i))||i);return o&&i&&Fe(t,n,i),i},ze=(e=>(e.Opened="toolbox-opened",e.Closed="toolbox-closed",e.BlockAdded="toolbox-block-added",e))(ze||{});const Ve=class extends z{constructor({api:e,tools:t,i18nLabels:n}){super(),this.opened=!1,this.nodes={toolbox:null},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=n}get isEmpty(){return 0===this.toolsToBeDisplayed.length}static get CSS(){return{toolbox:"ce-toolbox"}}make(){return this.popover=new Ie({scopeElement:this.api.ui.nodes.redactor,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Le.Close,this.onPopoverClose),this.enableShortcuts(),this.nodes.toolbox=this.popover.getElement(),this.nodes.toolbox.classList.add(Ve.CSS.toolbox),this.nodes.toolbox}hasFocus(){var e;return null==(e=this.popover)?void 0:e.hasFocus()}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&(this.nodes.toolbox.remove(),this.nodes.toolbox=null),this.removeAllShortcuts(),null==(e=this.popover)||e.off(Le.Close,this.onPopoverClose)}toolButtonActivated(e,t){this.insertNewBlock(e,t)}open(){var e;this.isEmpty||(null==(e=this.popover)||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;null==(e=this.popover)||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}get toolsToBeDisplayed(){const e=[];return this.tools.forEach((t=>{t.toolbox&&e.push(t)})),e}get toolboxItemsToBeDisplayed(){const e=(e,t)=>({icon:e.icon,title:H.t(be.toolNames,e.title||P(t.name)),name:t.name,onActivate:()=>{this.toolButtonActivated(t.name,e.data)},secondaryLabel:t.shortcut?L(t.shortcut):""});return this.toolsToBeDisplayed.reduce(((t,n)=>(Array.isArray(n.toolbox)?n.toolbox.forEach((o=>{t.push(e(o,n))})):void 0!==n.toolbox&&t.push(e(n.toolbox,n)),t)),[])}enableShortcuts(){this.toolsToBeDisplayed.forEach((e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)}))}enableShortcutForTool(e,t){Ne.add({name:t,on:this.api.ui.nodes.redactor,handler:t=>{t.preventDefault();const n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n);if(o)try{return this.api.blocks.convert(o.id,e),void window.requestAnimationFrame((()=>{this.api.caret.setToBlock(n,"end")}))}catch{}this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach((e=>{const t=e.shortcut;t&&Ne.remove(this.api.ui.nodes.redactor,t)}))}async insertNewBlock(e,t){const n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n);if(!o)return;const r=o.isEmpty?n:n+1;let i;if(t){const n=await this.api.blocks.composeBlockData(e);i=Object.assign(n,t)}const a=this.api.blocks.insert(e,i,void 0,r,void 0,o.isEmpty);a.call(Z.APPEND_CALLBACK),this.api.caret.setToBlock(r),this.emit("toolbox-block-added",{block:a}),this.api.toolbar.close()}};let qe=Ve;Ue([A],qe.prototype,"toolsToBeDisplayed",1),Ue([A],qe.prototype,"toolboxItemsToBeDisplayed",1);const $e="block hovered";var We=(e=>(e[e.Block=0]="Block",e[e.Inline=1]="Inline",e[e.Tune=2]="Tune",e))(We||{}),Ye=(e=>(e.Shortcut="shortcut",e.Toolbox="toolbox",e.EnabledInlineTools="inlineToolbar",e.EnabledBlockTunes="tunes",e.Config="config",e))(Ye||{}),Xe=(e=>(e.Shortcut="shortcut",e.SanitizeConfig="sanitize",e))(Xe||{}),Ke=(e=>(e.IsEnabledLineBreaks="enableLineBreaks",e.Toolbox="toolbox",e.ConversionConfig="conversionConfig",e.IsReadOnlySupported="isReadOnlySupported",e.PasteConfig="pasteConfig",e))(Ke||{}),Qe=(e=>(e.IsInline="isInline",e.Title="title",e))(Qe||{}),Ge=(e=>(e.IsTune="isTune",e))(Ge||{});class Ze{constructor({name:e,constructable:t,config:n,api:o,isDefault:r,isInternal:i=!1,defaultPlaceholder:a}){this.api=o,this.name=e,this.constructable=t,this.config=n,this.isDefault=r,this.isInternal=i,this.defaultPlaceholder=a}get settings(){const e=this.config.config||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(y(this.constructable.reset))return this.constructable.reset()}prepare(){if(y(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return 1===this.type}isBlock(){return 0===this.type}isTune(){return 2===this.type}}class Je{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return C(this.workingArea.children)}static set(e,t,n){return isNaN(Number(t))?(Reflect.set(e,t,n),!0):(e.insert(+t,n),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}swap(e,t){const n=this.blocks[t];D.swap(this.blocks[e].holder,n.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=n}move(e,t){const n=this.blocks.splice(t,1)[0],o=e-1,r=Math.max(0,o),i=this.blocks[r];e>0?this.insertToDOM(n,"afterend",i):this.insertToDOM(n,"beforebegin",i),this.blocks.splice(e,0,n);const a=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});n.call(Z.MOVED,a)}insert(e,t,n=!1){if(!this.length)return void this.push(t);e>this.length&&(e=this.length),n&&(this.blocks[e].holder.remove(),this.blocks[e].call(Z.REMOVED));const o=n?1:0;if(this.blocks.splice(e,o,t),e>0){const n=this.blocks[e-1];this.insertToDOM(t,"afterend",n)}else{const n=this.blocks[e+1];n?this.insertToDOM(t,"beforebegin",n):this.insertToDOM(t)}}replace(e,t){if(void 0===this.blocks[e])throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const n=new DocumentFragment;for(const t of e)n.appendChild(t.holder);if(this.length>0){if(t>0){const e=Math.min(t-1,this.length-1);this.blocks[e].holder.after(n)}else 0===t&&this.workingArea.prepend(n);this.blocks.splice(t,0,...e)}else this.blocks.push(...e),this.workingArea.appendChild(n);e.forEach((e=>e.call(Z.RENDERED)))}remove(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(Z.REMOVED),this.blocks.splice(e,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach((e=>e.call(Z.REMOVED))),this.blocks.length=0}insertAfter(e,t){const n=this.blocks.indexOf(e);this.insert(n+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,n){t?n.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Z.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}const et="block-removed",tt="block-added",nt="block-changed";class ot{constructor(){this.completed=Promise.resolve()}add(e){return new Promise(((t,n)=>{this.completed=this.completed.then(e).then(t).catch(n)}))}}class rt extends ${get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"cdx-shadow-caret"}}get isAtStart(){const{currentBlock:e}=this.Editor.BlockManager;if(!e.focusable)return!0;const t=W.get(),n=D.getDeepestNode(e.currentInput);let o=t.focusNode;if(D.isNativeInput(n))return 0===n.selectionEnd;if(!t.anchorNode)return!1;let r=o.textContent.search(/\S/);-1===r&&(r=0);let i=t.focusOffset;return o.nodeType!==Node.TEXT_NODE&&o.childNodes.length&&(o.childNodes[i]?(o=o.childNodes[i],i=0):(o=o.childNodes[i-1],i=o.textContent.length)),!(!D.isLineBreakTag(n)&&!D.isEmpty(n)||!this.getHigherLevelSiblings(o,"left").every((e=>{const t=D.isLineBreakTag(e),n=1===e.children.length&&D.isLineBreakTag(e.children[0]),o=t||n;return D.isEmpty(e)&&!o}))||i!==r)||(null===n||o===n&&i<=r)}get isAtEnd(){const{currentBlock:e}=this.Editor.BlockManager;if(!e.focusable)return!0;const t=W.get();let n=t.focusNode;const o=D.getDeepestNode(e.currentInput,!0);if(D.isNativeInput(o))return o.selectionEnd===o.value.length;if(!t.focusNode)return!1;let r=t.focusOffset;if(n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[r-1]?(n=n.childNodes[r-1],r=n.textContent.length):(n=n.childNodes[0],r=0)),D.isLineBreakTag(o)||D.isEmpty(o)){const e=this.getHigherLevelSiblings(n,"right");if(e.every(((t,n)=>n===e.length-1&&D.isLineBreakTag(t)||D.isEmpty(t)&&!D.isLineBreakTag(t)))&&r===n.textContent.length)return!0}const i=o.textContent.replace(/\s+$/,"");return n===o&&r>=i.length}setToBlock(e,t=this.positions.DEFAULT,n=0){var o;const{BlockManager:r,BlockSelection:i}=this.Editor;if(i.clearSelection(),!e.focusable)return null==(o=window.getSelection())||o.removeAllRanges(),i.selectBlock(e),void(r.currentBlock=e);let a;switch(t){case this.positions.START:a=e.firstInput;break;case this.positions.END:a=e.lastInput;break;default:a=e.currentInput}if(!a)return;const s=D.getDeepestNode(a,t===this.positions.END),l=D.getContentLength(s);switch(!0){case t===this.positions.START:n=0;break;case t===this.positions.END:case n>l:n=l}this.set(s,n),r.setCurrentBlockByChildNode(e.holder),r.currentBlock.currentInput=a}setToInput(e,t=this.positions.DEFAULT,n=0){const{currentBlock:o}=this.Editor.BlockManager,r=D.getDeepestNode(e);switch(t){case this.positions.START:this.set(r,0);break;case this.positions.END:this.set(r,D.getContentLength(r));break;default:n&&this.set(r,n)}o.currentInput=e}set(e,t=0){const{top:n,bottom:o}=W.setCursor(e,t),{innerHeight:r}=window;n<0?window.scrollBy(0,n-30):o>r&&window.scrollBy(0,o-r+30)}setToTheLastBlock(){const e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}extractFragmentFromCaretPosition(){const e=W.get();if(e.rangeCount){const t=e.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),n){if(D.isNativeInput(n)){const e=n,t=document.createDocumentFragment(),o=e.value.substring(0,e.selectionStart),r=e.value.substring(e.selectionStart);return t.textContent=r,e.value=o,t}{const e=t.cloneRange();return e.selectNodeContents(n),e.setStart(t.endContainer,t.endOffset),e.extractContents()}}}}navigateNext(e=!1){const{BlockManager:t}=this.Editor,{currentBlock:n,nextBlock:o}=t,{nextInput:r}=n,i=this.isAtEnd;let a=o;const s=e||i;if(r&&s)return this.setToInput(r,this.positions.START),!0;if(null===a){if(n.tool.isDefault||!s)return!1;a=t.insertAtEnd()}return!!s&&(this.setToBlock(a,this.positions.START),!0)}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:n}=this.Editor.BlockManager;if(!t)return!1;const{previousInput:o}=t,r=e||this.isAtStart;return o&&r?(this.setToInput(o,this.positions.END),!0):!(null===n||!r)&&(this.setToBlock(n,this.positions.END),!0)}createShadow(e){const t=document.createElement("span");t.classList.add(rt.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector(`.${rt.CSS.shadowCaret}`);if(!t)return;(new W).expandToTag(t);const n=document.createRange();n.selectNode(t),n.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),n=document.createElement("div"),o=W.get(),r=W.range;n.innerHTML=e,Array.from(n.childNodes).forEach((e=>t.appendChild(e))),0===t.childNodes.length&&t.appendChild(new Text);const i=t.lastChild;r.deleteContents(),r.insertNode(t);const a=document.createRange(),s=i.nodeType===Node.TEXT_NODE?i:i.firstChild;null!==s&&null!==s.textContent&&a.setStart(s,s.textContent.length),o.removeAllRanges(),o.addRange(a)}getHigherLevelSiblings(e,t){let n=e;const o=[];for(;n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;const r="left"===t?"previousSibling":"nextSibling";for(;n[r];)n=n[r],o.push(n);return o}}const it=class extends ${constructor(){super(...arguments),this.MIME_TYPE="application/x-editor-js",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.processTool=e=>{try{const t=e.create({},{},!1);if(!1===e.pasteConfig)return void this.exceptionList.push(e.name);if(!y(t.onPaste))return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){h(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:n}=this.Editor,o=t.setCurrentBlockByChildNode(e.target);!o||this.isNativeBehaviour(e.target)&&!e.clipboardData.types.includes("Files")||o&&this.exceptionList.includes(o.name)||(e.preventDefault(),this.processDataTransfer(e.clipboardData),n.close())}}async prepare(){this.processTools()}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}async processDataTransfer(e,t=!1){const{Tools:n}=this.Editor,o=e.types;if((o.includes?o.includes("Files"):o.contains("Files"))&&!x(this.toolsFiles))return void await this.processFiles(e.files);const r=e.getData(this.MIME_TYPE),i=e.getData("text/plain");let a=e.getData("text/html");if(r)try{return void this.insertEditorJSData(JSON.parse(r))}catch{}t&&i.trim()&&a.trim()&&(a="<p>"+(a.trim()?a:i)+"</p>");const s=Object.keys(this.toolsTags).reduce(((e,t)=>(e[t.toLowerCase()]=this.toolsTags[t].sanitizationConfig??{},e)),{}),l=ce(a,Object.assign({},s,n.getAllInlineToolsSanitizeConfig(),{br:{}}));l.trim()&&l.trim()!==i&&D.isHTMLString(l)?await this.processText(l,!0):await this.processText(i)}async processText(e,t=!1){const{Caret:n,BlockManager:o}=this.Editor,r=t?this.processHTML(e):this.processPlain(e);if(!r.length)return;if(1===r.length)return void(r[0].isBlock?this.processSingleBlock(r.pop()):this.processInlinePaste(r.pop()));const i=o.currentBlock&&o.currentBlock.tool.isDefault&&o.currentBlock.isEmpty;r.map((async(e,t)=>this.insertBlock(e,0===t&&i))),o.currentBlock&&n.setToBlock(o.currentBlock,n.positions.END)}setCallback(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}unsetCallback(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}processTools(){const e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return b(e)?[e]:v(e)?Object.keys(e):[]}getTagsConfig(e){if(!1===e.pasteConfig)return;const t=e.pasteConfig.tags||[],n=[];t.forEach((t=>{const o=this.collectTagNames(t);n.push(...o),o.forEach((n=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,n))return void h(`Paste handler for «${e.name}» Tool on «${n}» tag is skipped because it is already used by «${this.toolsTags[n].tool.name}» Tool.`,"warn");const o=v(t)?t[n]:null;this.toolsTags[n.toUpperCase()]={tool:e,sanitizationConfig:o}}))})),this.tagsByTool[e.name]=n.map((e=>e.toUpperCase()))}getFilesConfig(e){if(!1===e.pasteConfig)return;const{files:t={}}=e.pasteConfig;let{extensions:n,mimeTypes:o}=t;!n&&!o||(n&&!Array.isArray(n)&&(h(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`),n=[]),o&&!Array.isArray(o)&&(h(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`),o=[]),o&&(o=o.filter((t=>!!function(e){return/^[-\w]+\/([-+\w]+|\*)$/.test(e)}(t)||(h(`MIME type value «${t}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)))),this.toolsFiles[e.name]={extensions:n||[],mimeTypes:o||[]})}getPatternsConfig(e){!1===e.pasteConfig||!e.pasteConfig.patterns||x(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach((([t,n])=>{n instanceof RegExp||h(`Pattern ${n} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:n,tool:e})}))}isNativeBehaviour(e){return D.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Editor;let n;n=await Promise.all(Array.from(e).map((e=>this.processFile(e)))),n=n.filter((e=>!!e));const o=t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty;n.forEach(((e,n)=>{t.paste(e.type,e.event,0===n&&o)}))}async processFile(e){const t=function(e){return e.name.split(".").pop()}(e),n=Object.entries(this.toolsFiles).find((([n,{mimeTypes:o,extensions:r}])=>{const[i,a]=e.type.split("/"),s=r.find((e=>e.toLowerCase()===t.toLowerCase())),l=o.find((e=>{const[t,n]=e.split("/");return t===i&&(n===a||"*"===n)}));return!!s||!!l}));if(!n)return;const[o]=n;return{event:this.composePasteEvent("file",{file:e}),type:o}}processHTML(e){const{Tools:t}=this.Editor,n=D.make("DIV");return n.innerHTML=e,this.getNodes(n).map((e=>{let n,o=t.defaultTool,r=!1;switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:n=D.make("div"),n.appendChild(e);break;case Node.ELEMENT_NODE:n=e,r=!0,this.toolsTags[n.tagName]&&(o=this.toolsTags[n.tagName].tool)}const{tags:i}=o.pasteConfig||{tags:[]},a=i.reduce(((e,t)=>(this.collectTagNames(t).forEach((n=>{const o=v(t)?t[n]:null;e[n.toLowerCase()]=o||{}})),e)),{}),s=Object.assign({},a,o.baseSanitizeConfig);if("table"===n.tagName.toLowerCase()){const e=ce(n.outerHTML,s);n=D.make("div",void 0,{innerHTML:e}).firstChild}else n.innerHTML=ce(n.innerHTML,s);const l=this.composePasteEvent("tag",{data:n});return{content:n,isBlock:r,tool:o.name,event:l}})).filter((e=>{const t=D.isEmpty(e.content),n=D.isSingleTag(e.content);return!t||n}))}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const n=t;return e.split(/\r?\n/).filter((e=>e.trim())).map((e=>{const t=D.make("div");t.textContent=e;const o=this.composePasteEvent("tag",{data:t});return{content:t,tool:n,isBlock:!1,event:o}}))}async processSingleBlock(e){const{Caret:t,BlockManager:n}=this.Editor,{currentBlock:o}=n;o&&e.tool===o.name&&D.containsOnlyInlineElements(e.content.innerHTML)?t.insertContentAtCaretPosition(e.content.innerHTML):this.insertBlock(e,(null==o?void 0:o.tool.isDefault)&&o.isEmpty)}async processInlinePaste(e){const{BlockManager:t,Caret:n}=this.Editor,{content:o}=e;if(t.currentBlock&&t.currentBlock.tool.isDefault&&o.textContent.length<it.PATTERN_PROCESSING_MAX_LENGTH){const e=await this.processPattern(o.textContent);if(e){const o=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,r=t.paste(e.tool,e.event,o);return void n.setToBlock(r,n.positions.END)}}if(t.currentBlock&&t.currentBlock.currentInput){const e=t.currentBlock.tool.baseSanitizeConfig;document.execCommand("insertHTML",!1,ce(o.innerHTML,e))}else this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find((t=>{const n=t.pattern.exec(e);return!!n&&e===n.shift()}));return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}insertBlock(e,t=!1){const{BlockManager:n,Caret:o}=this.Editor,{currentBlock:r}=n;let i;if(t&&r&&r.isEmpty)return i=n.paste(e.tool,e.event,!0),void o.setToBlock(i,o.positions.END);i=n.paste(e.tool,e.event),o.setToBlock(i,o.positions.END)}insertEditorJSData(e){const{BlockManager:t,Caret:n,Tools:o}=this.Editor;le(e,(e=>o.blockTools.get(e).sanitizeConfig)).forEach((({tool:e,data:o},r)=>{let i=!1;0===r&&(i=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty);const a=t.insert({tool:e,data:o,replace:i});n.setToBlock(a,n.positions.END)}))}processElementNode(e,t,n){const o=Object.keys(this.toolsTags),r=e,{tool:i}=this.toolsTags[r.tagName]||{},a=this.tagsByTool[null==i?void 0:i.name]||[],s=o.includes(r.tagName),l=D.blockElements.includes(r.tagName.toLowerCase()),c=Array.from(r.children).some((({tagName:e})=>o.includes(e)&&!a.includes(e))),u=Array.from(r.children).some((({tagName:e})=>D.blockElements.includes(e.toLowerCase())));return l||s||c?s&&!c||l&&!u&&!c?[...t,n,r]:void 0:(n.appendChild(r),[...t,n])}getNodes(e){const t=Array.from(e.childNodes);let n;const o=(e,t)=>{if(D.isEmpty(t)&&!D.isSingleTag(t))return e;const r=e[e.length-1];let i=new DocumentFragment;switch(r&&D.isFragment(r)&&(i=e.pop()),t.nodeType){case Node.ELEMENT_NODE:if(n=this.processElementNode(t,e,i),n)return n;break;case Node.TEXT_NODE:return i.appendChild(t),[...e,i];default:return[...e,i]}return[...e,...Array.from(t.childNodes).reduce(o,[])]};return t.reduce(o,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};let at=it;at.PATTERN_PROCESSING_MAX_LENGTH=450;class st extends ${constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.listenerIds=[]}static get CSS(){return{overlay:"codex-editor-overlay",overlayContainer:"codex-editor-overlay__container",rect:"codex-editor-overlay__rectangle",topScrollZone:"codex-editor-overlay__scroll-zone--top",bottomScrollZone:"codex-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const n=document.elementFromPoint(e-window.pageXOffset,t-window.pageYOffset);n.closest(`.${this.Editor.Toolbar.CSS.toolbar}`)||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const o=[`.${J.CSS.content}`,`.${this.Editor.Toolbar.CSS.toolbar}`,`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`],r=n.closest("."+this.Editor.UI.CSS.editorWrapper),i=o.some((e=>!!n.closest(e)));!r||i||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",(e=>{this.processMouseDown(e)}),!1),this.listeners.on(document.body,"mousemove",O((e=>{this.processMouseMove(e)}),10),{passive:!0}),this.listeners.on(document.body,"mouseleave",(()=>{this.processMouseLeave()})),this.listeners.on(window,"scroll",O((e=>{this.processScroll(e)}),10),{passive:!0}),this.listeners.on(document.body,"mouseup",(()=>{this.processMouseUp()}),!1)}processMouseDown(e){e.button===this.MAIN_MOUSE_BUTTON&&(null!==e.target.closest(D.allInputsSelector)||this.startSelection(e.pageX,e.pageY))}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),this.inScrollZone?this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0):this.isScrolling=!1}genHTML(){const{UI:e}=this.Editor,t=e.nodes.holder.querySelector("."+e.CSS.editorWrapper),n=D.make("div",st.CSS.overlay,{}),o=D.make("div",st.CSS.overlayContainer,{}),r=D.make("div",st.CSS.rect,{});return o.appendChild(r),n.appendChild(o),t.appendChild(n),this.overlayRectangle=r,{container:t,overlay:n}}scrollVertical(e){if(!this.inScrollZone||!this.mousedown)return;const t=window.pageYOffset;window.scrollBy(0,e),this.mouseY+=window.pageYOffset-t,setTimeout((()=>{this.scrollVertical(e)}),0)}changingRectangle(e){if(!this.mousedown)return;void 0!==e.pageY&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:t,leftPos:n,index:o}=this.genInfoForMouseSelection(),r=this.startX>t&&this.mouseX>t,i=this.startX<n&&this.mouseX<n;this.rectCrossesBlocks=!(r||i),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),this.overlayRectangle.style.display="block"),this.updateRectangleSize(),this.Editor.Toolbar.close(),void 0!==o&&(this.trySelectNextBlock(o),this.inverseSelection(),W.get().removeAllRanges())}shrinkRectangleToPoint(){this.overlayRectangle.style.left=this.startX-window.pageXOffset+"px",this.overlayRectangle.style.top=this.startY-window.pageYOffset+"px",this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`}inverseSelection(){const e=this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]).selected;if(this.rectCrossesBlocks&&!e)for(const e of this.stackOfSelected)this.Editor.BlockSelection.selectBlockByIndex(e);if(!this.rectCrossesBlocks&&e)for(const e of this.stackOfSelected)this.Editor.BlockSelection.unSelectBlockByIndex(e)}updateRectangleSize(){this.mouseY>=this.startY?(this.overlayRectangle.style.top=this.startY-window.pageYOffset+"px",this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-window.pageYOffset}px`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.top=this.mouseY-window.pageYOffset+"px"),this.mouseX>=this.startX?(this.overlayRectangle.style.left=this.startX-window.pageXOffset+"px",this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-window.pageXOffset}px`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.left=this.mouseX-window.pageXOffset+"px")}genInfoForMouseSelection(){const e=document.body.offsetWidth/2,t=this.mouseY-window.pageYOffset,n=document.elementFromPoint(e,t),o=this.Editor.BlockManager.getBlockByChildNode(n);let r;void 0!==o&&(r=this.Editor.BlockManager.blocks.findIndex((e=>e.holder===o.holder)));const i=this.Editor.BlockManager.lastBlock.holder.querySelector("."+J.CSS.content),a=Number.parseInt(window.getComputedStyle(i).width,10)/2;return{index:r,leftPos:e-a,rightPos:e+a}}addBlockInSelection(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected[this.stackOfSelected.length-1]===e,n=this.stackOfSelected.length;if(t)return;const o=this.stackOfSelected[n-1]-this.stackOfSelected[n-2]>0;let r=0;n>1&&(r=o?1:-1);const i=e>this.stackOfSelected[n-1]&&1===r,a=e<this.stackOfSelected[n-1]&&-1===r,s=!(i||a||0===r);if(!s&&(e>this.stackOfSelected[n-1]||void 0===this.stackOfSelected[n-1])){let t=this.stackOfSelected[n-1]+1||e;for(;t<=e;t++)this.addBlockInSelection(t);return}if(!s&&e<this.stackOfSelected[n-1]){for(let t=this.stackOfSelected[n-1]-1;t>=e;t--)this.addBlockInSelection(t);return}if(!s)return;let l,c=n-1;for(l=e>this.stackOfSelected[n-1]?()=>e>this.stackOfSelected[c]:()=>e<this.stackOfSelected[c];l();)this.rectCrossesBlocks&&this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[c]),this.stackOfSelected.pop(),c--}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-paragraph{line-height:1.6em;outline:none}.ce-paragraph[data-placeholder]:empty:before{content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty:before{opacity:1}.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph[data-placeholder]:empty:before,.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty:focus:before{opacity:0}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class lt{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:n,readOnly:o}){this.api=n,this.readOnly=o,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t.placeholder?t.placeholder:lt.DEFAULT_PLACEHOLDER,this._data={},this._element=null,this._preserveBlank=void 0!==t.preserveBlank&&t.preserveBlank,this.data=e}onKeyUp(e){if("Backspace"!==e.code&&"Delete"!==e.code)return;const{textContent:t}=this._element;""===t&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable=!1,e.dataset.placeholder=this.api.i18n.t(this._placeholder),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable=!0,e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){const t={text:this.data.text+e.text};this.data=t}validate(e){return!(""===e.text.trim()&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t={text:e.detail.data.innerHTML};this.data=t}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}get data(){if(null!==this._element){const e=this._element.innerHTML;this._data.text=e}return this._data}set data(e){this._data=e||{},null!==this._element&&this.hydrate()}hydrate(){window.requestAnimationFrame((()=>{this._element.innerHTML=this._data.text||""}))}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>',title:"Text"}}}class ct{constructor(){this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}static get sanitize(){return{b:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"/></svg>',this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+B"}}ct.isInline=!0,ct.title="Bold";class ut{constructor(){this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}static get sanitize(){return{i:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"/></svg>',this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+I"}}ut.isInline=!0,ut.title="Italic";class dt{constructor({api:e}){this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new W}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=ke,this.nodes.button}renderActions(){return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",(e=>{e.keyCode===this.ENTER_KEY&&this.enterPressed(e)})),this.nodes.input}surround(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());const e=this.selection.findParentTag("A");if(e)return this.selection.expandToTag(e),this.unlink(),this.closeActions(),this.checkState(),void this.toolbar.close()}this.toggleActions()}checkState(){const e=this.selection.findParentTag("A");if(e){this.nodes.button.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();const t=e.getAttribute("href");this.nodes.input.value="null"!==t?t:"",this.selection.save()}else this.nodes.button.innerHTML=ke,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}clear(){this.closeActions()}get shortcut(){return"CMD+K"}toggleActions(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}openActions(e=!1){this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}closeActions(e=!0){if(this.selection.isFakeBackgroundEnabled){const e=new W;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}enterPressed(e){let t=this.nodes.input.value||"";return t.trim()?this.validateURL(t)?(t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),void this.inlineToolbar.close()):(this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void h("Incorrect Link pasted","warn",t)):(this.selection.restore(),this.unlink(),e.preventDefault(),void this.closeActions())}validateURL(e){return!/\s/.test(e)}prepareLink(e){return e=e.trim(),e=this.addProtocol(e)}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),n="#"===e.substring(0,1),o=/^\/\/[^/\s]/.test(e);return!t&&!n&&!o&&(e="http://"+e),e}insertLink(e){const t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}unlink(){document.execCommand(this.commandUnlink)}}dt.isInline=!0,dt.title="Link";class pt{constructor({data:e,api:t}){this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=D.make("div",this.CSS.wrapper),t=D.make("div",this.CSS.info),n=D.make("div",this.CSS.title,{textContent:this.title}),o=D.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><line x1="12" x2="12" y1="9" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 15.02V15.01"/></svg>',t.appendChild(n),t.appendChild(o),e.appendChild(t),e}}pt.isReadOnlySupported=!0;class ft extends Ze{constructor(){super(...arguments),this.type=We.Inline}get title(){return this.constructable[Qe.Title]}create(){return new this.constructable({api:this.api.getMethodsForTool(this),config:this.settings})}}class ht extends Ze{constructor(){super(...arguments),this.type=We.Tune}create(e,t){return new this.constructable({api:this.api.getMethodsForTool(this),config:this.settings,block:t,data:e})}}class mt extends Map{get blockTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isBlock()));return new mt(e)}get inlineTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isInline()));return new mt(e)}get blockTunes(){const e=Array.from(this.entries()).filter((([,e])=>e.isTune()));return new mt(e)}get internalTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isInternal));return new mt(e)}get externalTools(){const e=Array.from(this.entries()).filter((([,e])=>!e.isInternal));return new mt(e)}}var gt=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,vt=(e,t,n,o)=>{for(var r,i=o>1?void 0:o?yt(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(i=(o?r(t,n,i):r(i))||i);return o&&i&&gt(t,n,i),i};class bt extends Ze{constructor(){super(...arguments),this.type=We.Block,this.inlineTools=new mt,this.tunes=new mt}create(e,t,n){return new this.constructable({data:e,block:t,readOnly:n,api:this.api.getMethodsForTool(this),config:this.settings})}get isReadOnlySupported(){return!0===this.constructable[Ke.IsReadOnlySupported]}get isLineBreaksEnabled(){return this.constructable[Ke.IsEnabledLineBreaks]}get toolbox(){const e=this.constructable[Ke.Toolbox],t=this.config[Ye.Toolbox];if(!x(e)&&!1!==t)return t?Array.isArray(e)?Array.isArray(t)?t.map(((t,n)=>{const o=e[n];return o?{...o,...t}:t})):[t]:Array.isArray(t)?t:[{...e,...t}]:Array.isArray(e)?e:[e]}get conversionConfig(){return this.constructable[Ke.ConversionConfig]}get enabledInlineTools(){return this.config[Ye.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[Ye.EnabledBlockTunes]}get pasteConfig(){return this.constructable[Ke.PasteConfig]??{}}get sanitizeConfig(){const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(x(e))return t;const n={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const r=e[o];v(r)?n[o]=Object.assign({},t,r):n[o]=r}return n}get baseSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach((t=>Object.assign(e,t.sanitizeConfig))),Array.from(this.tunes.values()).forEach((t=>Object.assign(e,t.sanitizeConfig))),e}}vt([A],bt.prototype,"sanitizeConfig",1),vt([A],bt.prototype,"baseSanitizeConfig",1);class wt{constructor(e,t,n){this.api=n,this.config=e,this.editorConfig=t}get(e){const{class:t,isInternal:n=!1,...o}=this.config[e];return new(this.getConstructor(t))({name:e,constructable:t,config:o,api:this.api,isDefault:e===this.editorConfig.defaultBlock,defaultPlaceholder:this.editorConfig.placeholder,isInternal:n})}getConstructor(e){switch(!0){case e[Qe.IsInline]:return ft;case e[Ge.IsTune]:return ht;default:return bt}}}class kt{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:we,title:this.api.i18n.t("Move down"),onActivate:()=>this.handleClick(),name:"move-down"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e+1);if(!t)throw new Error("Unable to move Block down since it is already the last");const n=t.holder,o=n.getBoundingClientRect();let r=Math.abs(window.innerHeight-n.offsetHeight);o.top<window.innerHeight&&(r=window.scrollY+n.offsetHeight),window.scrollTo(0,r),this.api.blocks.move(e+1),this.api.toolbar.toggleBlockSettings(!0)}}kt.isTune=!0;class xt{constructor({api:e}){this.api=e}render(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>',title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}}xt.isTune=!0;class St{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 15L11.8586 10.1414C11.9367 10.0633 12.0633 10.0633 12.1414 10.1414L17 15"/></svg>',title:this.api.i18n.t("Move up"),onActivate:()=>this.handleClick(),name:"move-up"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e),n=this.api.blocks.getBlockByIndex(e-1);if(0===e||!t||!n)throw new Error("Unable to move Block up since it is already the first");const o=t.holder,r=n.holder,i=o.getBoundingClientRect(),a=r.getBoundingClientRect();let s;s=a.top>0?Math.abs(i.top)-Math.abs(a.top):Math.abs(i.top)+a.height,window.scrollBy(0,-1*s),this.api.blocks.move(e-1),this.api.toolbar.toggleBlockSettings(!0)}}St.isTune=!0;var Et=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor;class _t extends ${constructor(){super(...arguments),this.stubTool="stub",this.toolsAvailable=new mt,this.toolsUnavailable=new mt}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){return this.blockTools.get(this.config.defaultBlock)}get internal(){return this.available.internalTools}async prepare(){if(this.validateTools(),this.config.tools=M({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");const e=this.prepareConfig();this.factory=new wt(e,this.config,this.Editor.API);const t=this.getListOfPrepareFunctions(e);if(0===t.length)return Promise.resolve();await E(t,(e=>{this.toolPrepareMethodSuccess(e)}),(e=>{this.toolPrepareMethodFallback(e)})),this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach((t=>{Object.assign(e,t.sanitizeConfig)})),e}destroy(){Object.values(this.available).forEach((async e=>{y(e.reset)&&await e.reset()}))}get internalTools(){return{bold:{class:ct,isInternal:!0},italic:{class:ut,isInternal:!0},link:{class:dt,isInternal:!0},paragraph:{class:lt,inlineToolbar:!0,isInternal:!0},stub:{class:pt,isInternal:!0},moveUp:{class:St,isInternal:!0},delete:{class:xt,isInternal:!0},moveDown:{class:kt,isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.factory.get(e.toolName);if(t.isInline()){const e=["render","surround","checkState"].filter((e=>!t.create()[e]));if(e.length)return h(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",e),void this.toolsUnavailable.set(t.name,t)}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}getListOfPrepareFunctions(e){const t=[];return Object.entries(e).forEach((([e,n])=>{t.push({function:y(n.class.prepare)?n.class.prepare:()=>{},data:{toolName:e,config:n.config}})})),t}prepareBlockTools(){Array.from(this.blockTools.values()).forEach((e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)}))}assignInlineToolsToBlockTool(e){if(!1!==this.config.inlineToolbar){if(!0===e.enabledInlineTools)return void(e.inlineTools=new mt(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map((e=>[e,this.inlineTools.get(e)])):Array.from(this.inlineTools.entries())));Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new mt(e.enabledInlineTools.map((e=>[e,this.inlineTools.get(e)]))))}}assignBlockTunesToBlockTool(e){if(!1!==e.enabledBlockTunes){if(Array.isArray(e.enabledBlockTunes)){const t=new mt(e.enabledBlockTunes.map((e=>[e,this.blockTunes.get(e)])));return void(e.tunes=new mt([...t,...this.blockTunes.internalTools]))}if(Array.isArray(this.config.tunes)){const t=new mt(this.config.tunes.map((e=>[e,this.blockTunes.get(e)])));return void(e.tunes=new mt([...t,...this.blockTunes.internalTools]))}e.tunes=this.blockTunes.internalTools}}validateTools(){for(const e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;const t=this.config.tools[e];if(!y(t)&&!y(t.class))throw Error(`Tool «${e}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(){const e={};for(const t in this.config.tools)v(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}((e,t,n,o)=>{for(var r,i=o>1?void 0:o?Ct(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(i=(o?r(t,n,i):r(i))||i);o&&i&&Et(t,n,i)})([A],_t.prototype,"getAllInlineToolsSanitizeConfig",1);const Tt=':root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar--showed{opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;border-radius:0;line-height:normal}.ce-inline-tool svg{width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{outline:none;border:0;border-radius:0 0 4px 4px;margin:0;font-size:13px;padding:10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;border-top:1px solid rgba(201,201,204,.48);-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;-webkit-transform:translateY(-8px);transform:translateY(-8px);left:-1px;width:190px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-toolbar__label{color:#707684;font-size:11px;font-weight:500;letter-spacing:.33px;padding:10px 10px 5px;text-transform:uppercase}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px 10px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--hidden{display:none}.ce-conversion-tool--focused{background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#eff2f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48);box-shadow:0 0 0 1px #c9c9cc7a;border-radius:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-negative:0;flex-shrink:0;margin-right:10px}.ce-conversion-tool__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-conversion-tool__icon{width:36px;height:36px;border-radius:8px}.ce-conversion-tool__icon svg{width:28px;height:28px}}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-conversion-tool__secondary-label{color:#707684;font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-conversion-tool__secondary-label{display:none}}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;line-height:32px}.ce-settings__button svg{width:20px;height:20px}@media (max-width: 650px){.ce-settings__button svg{width:28px;height:28px}}@media (hover: hover){.ce-settings__button:hover{background-color:#eff2f5}}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{background:rgba(34,186,255,.08)!important}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button--disabled{cursor:not-allowed!important}.ce-settings__button--disabled{opacity:.3}.ce-settings__button--selected{color:#388ae5}@media (min-width: 651px){.codex-editor--narrow .ce-settings .ce-popover{right:0;left:auto;left:initial}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button svg{width:20px;height:20px}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0px;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #e8e8eb;--color-shadow: rgba(13,20,33,.13);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #eff2f5;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:0;top:calc(100% + var(--offset-from-target));background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}.ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + var(--popover-height)))}@media (max-width: 650px){.ce-popover{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}.ce-popover .ce-popover__search{display:none}}.ce-popover__search,.ce-popover__custom-content:not(:empty){margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width: 651px){.ce-popover__custom-content:not(:empty){padding:0}}.ce-popover__custom-content--hidden{display:none}.ce-popover-item{--border-radius: 6px;--icon-size: 20px;--icon-size-mobile: 28px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px;color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{border-radius:5px;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px var(--color-border-icon);box-shadow:0 0 0 1px var(--color-border-icon);background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:var(--icon-size-mobile);height:var(--icon-size-mobile)}}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--active .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--disabled .ce-popover-item__icon{-webkit-box-shadow:0 0 0 1px var(--color-border-icon-disabled);box-shadow:0 0 0 1px var(--color-border-icon-disabled)}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--focused:not(.ce-popover-item--no-focus){-webkit-box-shadow:inset 0 0 0px 1px var(--color-shadow-item-focus);box-shadow:inset 0 0 0 1px var(--color-shadow-item-focus)}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}.ce-popover-item:hover .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__icon{color:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}.ce-popover-item--confirmation .ce-popover-item__icon,.ce-popover-item--active .ce-popover-item__icon,.ce-popover-item--focused .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}\n';const Ot={BlocksAPI:class extends ${constructor(){super(...arguments),this.insert=(e=this.config.defaultBlock,t={},n={},o,r,i,a)=>new V(this.Editor.BlockManager.insert({id:a,tool:e,data:t,index:o,needToFocus:r,replace:i})),this.composeBlockData=async e=>{const t=this.Editor.Tools.blockTools.get(e);return new J({tool:t,api:this.Editor.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t)=>{const{BlockManager:n}=this.Editor,o=n.getBlockById(e);if(void 0===o)throw new Error(`Block with id "${e}" not found`);return new V(await n.update(o,t))},this.convert=(e,t,n)=>{var o,r;const{BlockManager:i,Tools:a}=this.Editor,s=i.getBlockById(e);if(!s)throw new Error(`Block with id "${e}" not found`);const l=a.blockTools.get(s.name),c=a.blockTools.get(t);if(!c)throw new Error(`Block Tool with type "${t}" not found`);const u=void 0!==(null==(o=null==l?void 0:l.conversionConfig)?void 0:o.export),d=void 0!==(null==(r=c.conversionConfig)?void 0:r.import);if(!u||!d){const e=[!u&&P(s.name),!d&&P(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${s.name}" to "${t}" is not possible. ${e} tool(s) should provide a "conversionConfig"`)}i.convert(s,t,n)},this.insertMany=(e,t=this.Editor.BlockManager.blocks.length-1)=>{this.validateIndex(t);const n=e.map((({id:e,type:t,data:n})=>this.Editor.BlockManager.composeBlock({id:e,tool:t||this.config.defaultBlock,data:n})));return this.Editor.BlockManager.insertMany(n,t),n.map((e=>new V(e)))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),swap:(e,t)=>this.swap(e,t),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),stretchBlock:(e,t=!0)=>this.stretchBlock(e,t),insertNewBlock:()=>this.insertNewBlock(),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert}}getBlocksCount(){return this.Editor.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Editor.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Editor.BlockManager.getBlockById(e);if(t)return this.Editor.BlockManager.getBlockIndex(t);m("There is no block with id `"+e+"`","warn")}getBlockByIndex(e){const t=this.Editor.BlockManager.getBlockByIndex(e);if(void 0!==t)return new V(t);m("There is no block at index `"+e+"`","warn")}getById(e){const t=this.Editor.BlockManager.getBlockById(e);return void 0===t?(m("There is no block with id `"+e+"`","warn"),null):new V(t)}swap(e,t){h("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}move(e,t){this.Editor.BlockManager.move(e,t)}delete(e=this.Editor.BlockManager.currentBlockIndex){try{const t=this.Editor.BlockManager.getBlockByIndex(e);this.Editor.BlockManager.removeBlock(t)}catch(e){return void m(e,"warn")}0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}async clear(){await this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}async render(e){if(void 0===e||void 0===e.blocks)throw new Error("Incorrect data passed to the render() method");this.Editor.ModificationsObserver.disable(),await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(e.blocks),this.Editor.ModificationsObserver.enable()}renderFromHTML(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}stretchBlock(e,t=!0){I(!0,"blocks.stretchBlock()","BlockAPI");const n=this.Editor.BlockManager.getBlockByIndex(e);n&&(n.stretched=t)}insertNewBlock(){h("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}validateIndex(e){if("number"!=typeof e)throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(null===e)throw new Error("Index should be greater than or equal to 0")}},CaretAPI:class extends ${constructor(){super(...arguments),this.setToFirstBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.firstBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock,e,t),!0),this.setToLastBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.lastBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock,e,t),!0),this.setToPreviousBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.previousBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock,e,t),!0),this.setToNextBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.nextBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock,e,t),!0),this.setToBlock=(e,t=this.Editor.Caret.positions.DEFAULT,n=0)=>!!this.Editor.BlockManager.blocks[e]&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.blocks[e],t,n),!0),this.focus=(e=!1)=>e?this.setToLastBlock(this.Editor.Caret.positions.END):this.setToFirstBlock(this.Editor.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}},EventsAPI:class extends ${get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}},I18nAPI:ee,API:class extends ${get methods(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods,ui:this.Editor.UiAPI.methods}}getMethodsForTool(e){return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(e)})}},InlineToolbarAPI:class extends ${get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Editor.InlineToolbar.tryToShow()}close(){this.Editor.InlineToolbar.close()}},ListenersAPI:class extends ${get methods(){return{on:(e,t,n,o)=>this.on(e,t,n,o),off:(e,t,n,o)=>this.off(e,t,n,o),offById:e=>this.offById(e)}}on(e,t,n,o){return this.listeners.on(e,t,n,o)}off(e,t,n,o){this.listeners.off(e,t,n,o)}offById(e){this.listeners.offById(e)}},NotifierAPI:class extends ${constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new re}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}},ReadOnlyAPI:class extends ${get methods(){const e=()=>this.isEnabled;return{toggle:e=>this.toggle(e),get isEnabled(){return e()}}}toggle(e){return this.Editor.ReadOnly.toggle(e)}get isEnabled(){return this.Editor.ReadOnly.isEnabled}},SanitizerAPI:class extends ${get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return ce(e,t)}},SaverAPI:class extends ${get methods(){return{save:()=>this.save()}}save(){const e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(m(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}},SelectionAPI:class extends ${get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e)}}findParentTag(e,t){return(new W).findParentTag(e,t)}expandToTag(e){(new W).expandToTag(e)}},StylesAPI:class extends ${get classes(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}},ToolbarAPI:class extends ${get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Editor.Toolbar.moveAndOpen()}close(){this.Editor.Toolbar.close()}toggleBlockSettings(e){-1!==this.Editor.BlockManager.currentBlockIndex?e??!this.Editor.BlockSettings.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close():m("Could't toggle the Toolbar because there is no block selected ","warn")}toggleToolbox(e){-1!==this.Editor.BlockManager.currentBlockIndex?e??!this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()):this.Editor.Toolbar.toolbox.close():m("Could't toggle the Toolbox because there is no block selected ","warn")}},TooltipAPI:class extends ${constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,n)=>this.show(e,t,n),hide:()=>this.hide(),onHover:(e,t,n)=>this.onHover(e,t,n)}}show(e,t,n){!function(e,t,n){ge(),null==me||me.show(e,t,n)}(e,t,n)}hide(){ye()}onHover(e,t,n){ve(e,t,n)}},UiAPI:class extends ${get methods(){return{nodes:this.editorNodes}}get editorNodes(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}},BlockSettings:class extends ${constructor(){super(...arguments),this.opened=!1,this.selection=new W,this.onPopoverClose=()=>{this.close()}}get events(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}get CSS(){return{settings:"ce-settings"}}get flipper(){var e;return null==(e=this.popover)?void 0:e.flipper}make(){this.nodes.wrapper=D.make("div",[this.CSS.settings])}destroy(){this.removeAllNodes()}open(e=this.Editor.BlockManager.currentBlock){this.opened=!0,this.selection.save(),this.Editor.BlockSelection.selectBlock(e),this.Editor.BlockSelection.clearCache();const[t,n]=e.getTunes();this.eventsDispatcher.emit(this.events.opened),this.popover=new Ie({searchable:!0,items:t.map((e=>this.resolveTuneAliases(e))),customContent:n,customContentFlippableItems:this.getControls(n),scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:H.ui(be.ui.popover,"Nothing found"),search:H.ui(be.ui.popover,"Filter")}}),this.popover.on(Le.Close,this.onPopoverClose),this.nodes.wrapper.append(this.popover.getElement()),this.popover.show()}getElement(){return this.nodes.wrapper}close(){this.opened&&(this.opened=!1,W.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&this.Editor.BlockSelection.unselectBlock(this.Editor.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Le.Close,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))}getControls(e){const{StylesAPI:t}=this.Editor,n=e.querySelectorAll(`.${t.classes.settingsButton}, ${D.allInputsSelector}`);return Array.from(n)}resolveTuneAliases(e){const t=function(e,t){const n={};return Object.keys(e).forEach((o=>{const r=t[o];void 0!==r?n[r]=e[o]:n[o]=e[o]})),n}(e,{label:"title"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}},ConversionToolbar:Ae,Toolbar:class extends ${constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.toolboxInstance=null}get CSS(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",openedToolboxHolderModifier:"codex-editor--toolbox-opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",settingsToggler:"ce-toolbar__settings-btn",settingsTogglerHidden:"ce-toolbar__settings-btn--hidden"}}get opened(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}get toolbox(){var e;return{opened:null==(e=this.toolboxInstance)?void 0:e.opened,close:()=>{var e;null==(e=this.toolboxInstance)||e.close()},open:()=>{null!==this.toolboxInstance?(this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.open()):h("toolbox.open() called before initialization is finished","warn")},toggle:()=>{null!==this.toolboxInstance?this.toolboxInstance.toggle():h("toolbox.toggle() called before initialization is finished","warn")},hasFocus:()=>{var e;return null==(e=this.toolboxInstance)?void 0:e.hasFocus()}}}get blockActions(){return{hide:()=>{this.nodes.actions.classList.remove(this.CSS.actionsOpened)},show:()=>{this.nodes.actions.classList.add(this.CSS.actionsOpened)}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback((()=>{this.drawUI(),this.enableModuleBindings()}),{timeout:2e3})}moveAndOpen(e=this.Editor.BlockManager.currentBlock){if(null===this.toolboxInstance)return void h("Can't open Toolbar since Editor initialization is not finished yet","warn");if(this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Editor.BlockSettings.opened&&this.Editor.BlockSettings.close(),!e)return;this.hoveredBlock=e;const t=e.holder,{isMobile:n}=this.Editor.UI,o=e.pluginsContent,r=window.getComputedStyle(o),i=parseInt(r.paddingTop,10),a=t.offsetHeight;let s;s=n?t.offsetTop+a:t.offsetTop+i,this.nodes.wrapper.style.top=`${Math.floor(s)}px`,1===this.Editor.BlockManager.blocks.length&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t;this.Editor.ReadOnly.isEnabled||(null==(e=this.nodes.wrapper)||e.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),null==(t=this.toolboxInstance)||t.close(),this.Editor.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper.style.top="unset"}open(e=!0){this.nodes.wrapper.classList.add(this.CSS.toolbarOpened),e?this.blockActions.show():this.blockActions.hide()}async make(){this.nodes.wrapper=D.make("div",this.CSS.toolbar),["content","actions"].forEach((e=>{this.nodes[e]=D.make("div",this.CSS[e])})),D.append(this.nodes.wrapper,this.nodes.content),D.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=D.make("div",this.CSS.plusButton,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>'}),D.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(()=>{ye(!0),this.plusButtonClicked()}),!1);const e=D.make("div");e.appendChild(document.createTextNode(H.ui(be.ui.toolbar.toolbox,"Add"))),e.appendChild(D.make("div",this.CSS.plusButtonShortcut,{textContent:"/"})),ve(this.nodes.plusButton,e,{hidingDelay:400}),this.nodes.settingsToggler=D.make("span",this.CSS.settingsToggler,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 7.29999H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 7.29999H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.30999 12H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 12H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 16.7H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 16.7H14.59"/></svg>'}),D.append(this.nodes.actions,this.nodes.settingsToggler);const t=D.make("div"),n=D.text(H.ui(be.ui.blockTunes.toggler,"Click to tune")),o=await async function(e,t){const n=navigator.keyboard;return n&&(await n.getLayoutMap()).get(e)||t}("Slash","/");t.appendChild(n),t.appendChild(D.make("div",this.CSS.plusButtonShortcut,{textContent:L(`CMD + ${o}`)})),ve(this.nodes.settingsToggler,t,{hidingDelay:400}),D.append(this.nodes.actions,this.makeToolbox()),D.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),D.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}makeToolbox(){return this.toolboxInstance=new qe({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:H.ui(be.ui.popover,"Filter"),nothingFound:H.ui(be.ui.popover,"Nothing found")}}),this.toolboxInstance.on(ze.Opened,(()=>{this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(ze.Closed,(()=>{this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(ze.BlockAdded,(({block:e})=>{const{BlockManager:t,Caret:n}=this.Editor,o=t.getBlockById(e.id);0===o.inputs.length&&(o===t.lastBlock?(t.insertAtEnd(),n.setToBlock(t.lastBlock)):n.setToBlock(t.nextBlock))})),this.toolboxInstance.make()}plusButtonClicked(){var e;this.Editor.BlockManager.currentBlock=this.hoveredBlock,null==(e=this.toolboxInstance)||e.toggle()}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",(e=>{var t;e.stopPropagation(),this.settingsTogglerClicked(),null!=(t=this.toolboxInstance)&&t.opened&&this.toolboxInstance.close(),ye(!0)}),!0),j()||this.eventsDispatcher.on($e,(e=>{var t;this.Editor.BlockSettings.opened||null!=(t=this.toolboxInstance)&&t.opened||this.moveAndOpen(e.block)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}settingsTogglerClicked(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}drawUI(){this.Editor.BlockSettings.make(),this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}},InlineToolbar:class extends ${constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",inlineToolbarLeftOriented:"ce-inline-toolbar--left-oriented",inlineToolbarRightOriented:"ce-inline-toolbar--right-oriented",inlineToolbarShortcut:"ce-inline-toolbar__shortcut",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inputField:"cdx-input",focusedButton:"ce-inline-tool--focused",conversionToggler:"ce-inline-toolbar__dropdown",conversionTogglerArrow:"ce-inline-toolbar__dropdown-arrow",conversionTogglerHidden:"ce-inline-toolbar__dropdown--hidden",conversionTogglerContent:"ce-inline-toolbar__dropdown-content",togglerAndButtonsWrapper:"ce-inline-toolbar__toggler-and-button-wrapper"},this.opened=!1,this.toolbarVerticalMargin=j()?20:6,this.buttonsList=null,this.width=0,this.flipper=null}toggleReadOnly(e){e?(this.destroy(),this.Editor.ConversionToolbar.destroy()):window.requestIdleCallback((()=>{this.make()}),{timeout:2e3})}async tryToShow(e=!1,t=!0){e&&this.close(),this.allowedToShow()&&(await this.addToolsFiltered(t),this.move(),this.open(t),this.Editor.Toolbar.close())}close(){this.opened&&(this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),Array.from(this.toolsInstances.entries()).forEach((([e,t])=>{const n=this.getToolShortcut(e);n&&Ne.remove(this.Editor.UI.nodes.redactor,n),y(t.clear)&&t.clear()})),this.reset(),this.opened=!1,this.flipper.deactivate(),this.Editor.ConversionToolbar.close()))}containsNode(e){return void 0!==this.nodes.wrapper&&this.nodes.wrapper.contains(e)}destroy(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}make(){this.nodes.wrapper=D.make("div",[this.CSS.inlineToolbar,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),this.nodes.togglerAndButtonsWrapper=D.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=D.make("div",this.CSS.buttonsWrapper),this.nodes.actions=D.make("div",this.CSS.actionsWrapper),this.listeners.on(this.nodes.wrapper,"mousedown",(e=>{e.target.closest(`.${this.CSS.actionsWrapper}`)||e.preventDefault()})),D.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),D.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),D.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),window.requestAnimationFrame((()=>{this.recalculateWidth()})),this.enableFlipper()}open(){if(this.opened)return;this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.buttonsList=this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`),this.opened=!0;let e=Array.from(this.buttonsList);e.unshift(this.nodes.conversionToggler),e=e.filter((e=>!e.hidden)),this.flipper.activate(e)}move(){const e=W.rect,t=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:e.x-t.x,y:e.y+e.height-t.top+this.toolbarVerticalMargin};n.x+this.width+t.x>this.Editor.UI.contentRect.right&&(n.x=this.Editor.UI.contentRect.right-this.width-t.x),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}reset(){this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarLeftOriented,this.CSS.inlineToolbarRightOriented),this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0"}allowedToShow(){const e=W.get(),t=W.text;if(!e||!e.anchorNode||e.isCollapsed||t.length<1)return!1;const n=D.isElement(e.anchorNode)?e.anchorNode:e.anchorNode.parentElement;if(e&&["IMG","INPUT"].includes(n.tagName)||null===n.closest('[contenteditable="true"]'))return!1;const o=this.Editor.BlockManager.getBlock(e.anchorNode);return!!o&&0!==o.tool.inlineTools.size}recalculateWidth(){this.width=this.nodes.wrapper.offsetWidth}addConversionToggler(){this.nodes.conversionToggler=D.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=D.make("div",this.CSS.conversionTogglerContent);const e=D.make("div",this.CSS.conversionTogglerArrow,{innerHTML:we});this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(e),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.listeners.on(this.nodes.conversionToggler,"click",(()=>{this.Editor.ConversionToolbar.toggle((e=>{!e&&this.opened?this.flipper.activate():this.opened&&this.flipper.deactivate()}))})),!1===j()&&ve(this.nodes.conversionToggler,H.ui(be.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}async setConversionTogglerContent(){const{BlockManager:e}=this.Editor,{currentBlock:t}=e,n=t.name,o=t.tool.conversionConfig,r=o&&o.export;this.nodes.conversionToggler.hidden=!r,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!r);const i=await t.getActiveToolboxEntry()||{};this.nodes.conversionTogglerContent.innerHTML=i.icon||i.title||P(n)}prepareConversionToolbar(){const e=this.Editor.ConversionToolbar.make();D.append(this.nodes.wrapper,e)}async addToolsFiltered(e=!0){const t=W.get(),n=this.Editor.BlockManager.getBlock(t.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,Array.from(n.tool.inlineTools.values()).forEach((e=>{this.addTool(e)})),e&&this.Editor.ConversionToolbar.hasTools()?await this.setConversionTogglerContent():this.nodes.conversionToggler.hidden=!0,this.recalculateWidth()}addTool(e){const t=e.create(),n=t.render();if(!n)return void h("Render method must return an instance of Node","warn",e.name);if(n.dataset.tool=e.name,this.nodes.buttons.appendChild(n),this.toolsInstances.set(e.name,t),y(t.renderActions)){const e=t.renderActions();this.nodes.actions.appendChild(e)}this.listeners.on(n,"click",(e=>{this.toolClicked(t),e.preventDefault()}));const o=this.getToolShortcut(e.name);if(o)try{this.enableShortcuts(t,o)}catch{}const r=D.make("div"),i=H.t(be.toolNames,e.title||P(e.name));r.appendChild(D.text(i)),o&&r.appendChild(D.make("div",this.CSS.inlineToolbarShortcut,{textContent:L(o)})),!1===j()&&ve(n,r,{placement:"top",hidingDelay:100}),t.checkState(W.get())}getToolShortcut(e){const{Tools:t}=this.Editor,n=t.inlineTools.get(e),o=t.internal.inlineTools;return Array.from(o.keys()).includes(e)?this.inlineTools[e][Xe.Shortcut]:n.shortcut}enableShortcuts(e,t){Ne.add({name:t,handler:t=>{const{currentBlock:n}=this.Editor.BlockManager;n&&n.tool.enabledInlineTools&&(t.preventDefault(),this.toolClicked(e))},on:this.Editor.UI.nodes.redactor})}toolClicked(e){const t=W.range;e.surround(t),this.checkToolsState(),void 0!==e.renderActions&&this.flipper.deactivate()}checkToolsState(){this.toolsInstances.forEach((e=>{e.checkState(W.get())}))}get inlineTools(){const e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach((([t,n])=>{e[t]=n.create()})),e}enableFlipper(){this.flipper=new Ce({focusedItemClass:this.CSS.focusedButton,allowedKeys:[i,r]})}},BlockEvents:class extends ${keydown(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case o:this.backspace(e);break;case d:this.delete(e);break;case i:this.enter(e);break;case c:case u:this.arrowRightAndDown(e);break;case l:case s:this.arrowLeftAndUp(e);break;case r:this.tabPressed(e)}"/"===e.key&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(),"Slash"===e.code&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}beforeKeydownProcessing(e){this.needToolbarClosing(e)&&S(e.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||this.Editor.BlockSelection.clearSelection(e))}keyup(e){e.shiftKey||this.Editor.UI.checkEmptiness()}dragOver(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!0}dragLeave(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!1}handleCommandC(e){const{BlockSelection:t}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:n,Caret:o}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e).then((()=>{const r=n.removeSelectedBlocks(),i=n.insertDefaultBlockAtIndex(r,!0);o.setToBlock(i,o.positions.START),t.clearSelection(e)}))}tabPressed(e){const{InlineToolbar:t,ConversionToolbar:n,Caret:o}=this.Editor;n.opened||t.opened||(e.shiftKey?o.navigatePrevious(!0):o.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Editor.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(){this.Editor.BlockManager.currentBlock.isEmpty&&this.activateToolbox()}enter(e){const{BlockManager:t,UI:n}=this.Editor;if(t.currentBlock.tool.isLineBreaksEnabled||n.someToolbarOpened&&n.someFlipperButtonFocused||e.shiftKey)return;let o=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):o=this.Editor.Caret.isAtEnd?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex+1):this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(o),this.Editor.Toolbar.moveAndOpen(o),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:n}=this.Editor,{currentBlock:o,previousBlock:r}=t;if(W.isCollapsed&&n.isAtStart)if(e.preventDefault(),this.Editor.Toolbar.close(),o.currentInput===o.firstInput){if(null!==r)if(r.isEmpty)t.removeBlock(r);else if(o.isEmpty){t.removeBlock(o);const e=t.currentBlock;n.setToBlock(e,n.positions.END)}else G(o,r)?this.mergeBlocks(r,o):n.setToBlock(r,n.positions.END)}else n.navigatePrevious()}delete(e){const{BlockManager:t,Caret:n}=this.Editor,{currentBlock:o,nextBlock:r}=t;if(W.isCollapsed&&n.isAtEnd)if(e.preventDefault(),this.Editor.Toolbar.close(),o.currentInput===o.lastInput){if(null!==r){if(!r.isEmpty)return o.isEmpty?(t.removeBlock(o),void n.setToBlock(r,n.positions.START)):void(G(o,r)?this.mergeBlocks(o,r):n.setToBlock(r,n.positions.START));t.removeBlock(r)}}else n.navigateNext()}mergeBlocks(e,t){const{BlockManager:n,Caret:o,Toolbar:r}=this.Editor;o.createShadow(e.pluginsContent),n.mergeBlocks(e,t).then((()=>{window.requestAnimationFrame((()=>{o.restoreCaret(e.pluginsContent),e.pluginsContent.normalize(),r.close()}))}))}arrowRightAndDown(e){const t=Ce.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===r);if(this.Editor.UI.someToolbarOpened&&t)return;this.Editor.Toolbar.close();const n=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===c&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState():(e.keyCode===c||e.keyCode===u&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?e.preventDefault():(_((()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}arrowLeftAndUp(e){if(this.Editor.UI.someToolbarOpened){if(Ce.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===r))return;this.Editor.UI.closeAllToolbars()}this.Editor.Toolbar.close();const t=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===l&&t?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):(e.keyCode===l||e.keyCode===s&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?e.preventDefault():(_((()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}needToolbarClosing(e){const t=e.keyCode===i&&this.Editor.Toolbar.toolbox.opened,n=e.keyCode===i&&this.Editor.BlockSettings.opened,o=e.keyCode===i&&this.Editor.InlineToolbar.opened,a=e.keyCode===i&&this.Editor.ConversionToolbar.opened,s=e.keyCode===r;return!(e.shiftKey||s||t||n||o||a)}activateToolbox(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}activateBlockSettings(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}},BlockManager:class extends ${constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this._blocks[0]}get lastBlock(){return this._blocks[this._blocks.length-1]}get currentBlock(){return this._blocks[this.currentBlockIndex]}set currentBlock(e){this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find((e=>!!e.inputs.length))}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((e=>!!e.inputs.length))}get previousBlock(){return 0===this.currentBlockIndex?null:this._blocks[this.currentBlockIndex-1]}get blocks(){return this._blocks.array}get isEditorEmpty(){return this.blocks.every((e=>e.isEmpty))}prepare(){const e=new Je(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Je.set,get:Je.get}),this.listeners.on(document,"copy",(e=>this.Editor.BlockEvents.handleCommandC(e)))}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:n,tunes:o={}}){const r=this.Editor.ReadOnly.isEnabled,i=this.Editor.Tools.blockTools.get(e),a=new J({id:n,data:t,tool:i,api:this.Editor.API,readOnly:r,tunesData:o},this.eventsDispatcher);return r||window.requestIdleCallback((()=>{this.bindBlockEvents(a)}),{timeout:2e3}),a}insert({id:e,tool:t=this.config.defaultBlock,data:n={},index:o,needToFocus:r=!0,replace:i=!1,tunes:a={}}={}){let s=o;void 0===s&&(s=this.currentBlockIndex+(i?0:1));const l=this.composeBlock({id:e,tool:t,data:n,tunes:a});return i&&this.blockDidMutated(et,this.getBlockByIndex(s),{index:s}),this._blocks.insert(s,l,i),this.blockDidMutated(tt,l,{index:s}),r?this.currentBlockIndex=s:s<=this.currentBlockIndex&&this.currentBlockIndex++,l}insertMany(e,t=0){this._blocks.insertMany(e,t)}async update(e,t){const n=await e.data,o=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},n,t),tunes:e.tunes}),r=this.getBlockIndex(e);return this._blocks.replace(r,o),this.blockDidMutated(nt,o,{index:r}),o}replace(e,t,n){const o=this.getBlockIndex(e);this.insert({tool:t,data:n,index:o,replace:!0})}paste(e,t,n=!1){const o=this.insert({tool:e,replace:n});try{window.requestIdleCallback((()=>{o.call(Z.ON_PASTE,t)}))}catch(t){h(`${e}: onPaste callback call is failed`,"error",t)}return o}insertDefaultBlockAtIndex(e,t=!1){const n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=n,this.blockDidMutated(tt,n,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,n}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const n=await t.data;x(n)||await e.mergeWith(n),this.removeBlock(t),this.currentBlockIndex=this._blocks.indexOf(e)}removeBlock(e,t=!0){return new Promise((n=>{const o=this._blocks.indexOf(e);if(!this.validateIndex(o))throw new Error("Can't find a Block to remove");e.destroy(),this._blocks.remove(o),this.blockDidMutated(et,e,{index:o}),this.currentBlockIndex>=o&&this.currentBlockIndex--,this.blocks.length?0===o&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,t&&this.insert()),n()}))}removeSelectedBlocks(){let e;for(let t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(this.blocks[t]),e=t);return e}removeAllBlocks(){for(let e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}split(){const e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=D.make("div");t.appendChild(e);const n={text:D.isEmpty(t)?"":t.innerHTML};return this.insert({data:n})}getBlockByIndex(e){return-1===e&&(e=this._blocks.length-1),this._blocks[e]}getBlockIndex(e){return this._blocks.indexOf(e)}getBlockById(e){return this._blocks.array.find((t=>t.id===e))}getBlock(e){D.isElement(e)||(e=e.parentNode);const t=this._blocks.nodes,n=e.closest(`.${J.CSS.wrapper}`),o=t.indexOf(n);if(o>=0)return this._blocks[o]}setCurrentBlockByChildNode(e){D.isElement(e)||(e=e.parentNode);const t=e.closest(`.${J.CSS.wrapper}`);if(!t)return;const n=t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);return null!=n&&n.isEqualNode(this.Editor.UI.nodes.wrapper)?(this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock):void 0}getBlockByChildNode(e){if(!(e&&e instanceof Node))return;D.isElement(e)||(e=e.parentNode);const t=e.closest(`.${J.CSS.wrapper}`);return this.blocks.find((e=>e.holder===t))}swap(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}move(e,t=this.currentBlockIndex){isNaN(e)||isNaN(t)?h("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(e)&&this.validateIndex(t)?(this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated("block-moved",this.currentBlock,{fromIndex:t,toIndex:e})):h("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn")}async convert(e,t,n){if(!await e.save())throw new Error("Could not convert Block. Failed to extract original Block data.");const o=this.Editor.Tools.blockTools.get(t);if(!o)throw new Error(`Could not convert Block. Tool «${t}» not found.`);let r=function(e,t){const n=null==t?void 0:t.import;return y(n)?n(e):b(n)?{[n]:e}:(void 0!==n&&h("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})}(ce(await e.exportDataAsString(),o.sanitizeConfig),o.conversionConfig);n&&(r=Object.assign(r,n)),this.replace(e,o.name,r)}dropPointer(){this.currentBlockIndex=-1}async clear(e=!1){const t=new ot;this.blocks.forEach((e=>{t.add((async()=>{await this.removeBlock(e,!1)}))})),await t.completed,this.dropPointer(),e&&this.insert(),this.Editor.UI.checkEmptiness()}async destroy(){await Promise.all(this.blocks.map((e=>e.destroy())))}bindBlockEvents(e){const{BlockEvents:t}=this.Editor;this.readOnlyMutableListeners.on(e.holder,"keydown",(e=>{t.keydown(e)})),this.readOnlyMutableListeners.on(e.holder,"keyup",(e=>{t.keyup(e)})),this.readOnlyMutableListeners.on(e.holder,"dragover",(e=>{t.dragOver(e)})),this.readOnlyMutableListeners.on(e.holder,"dragleave",(e=>{t.dragLeave(e)})),e.on("didMutated",(e=>this.blockDidMutated(nt,e,{index:this.getBlockIndex(e)})))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",(e=>this.Editor.BlockEvents.handleCommandX(e))),this.blocks.forEach((e=>{this.bindBlockEvents(e)}))}validateIndex(e){return!(e<0||e>=this._blocks.length)}blockDidMutated(e,t,n){const o=new CustomEvent(e,{detail:{target:new V(t),...n}});return this.eventsDispatcher.emit(X,{event:o}),t}},BlockSelection:class extends ${constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1}get sanitizerConfig(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}get allBlocksSelected(){const{BlockManager:e}=this.Editor;return e.blocks.every((e=>!0===e.selected))}set allBlocksSelected(e){const{BlockManager:t}=this.Editor;t.blocks.forEach((t=>{t.selected=e})),this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Editor;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=e.blocks.some((e=>!0===e.selected))),this.anyBlockSelectedCache}get selectedBlocks(){return this.Editor.BlockManager.blocks.filter((e=>e.selected))}prepare(){this.selection=new W,Ne.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:n}=this.Editor;if(n.isEnabled)return e.preventDefault(),void this.selectAllBlocks();t.currentBlock&&this.handleCommandA(e)},on:this.Editor.UI.nodes.redactor})}toggleReadOnly(){W.get().removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Editor;let n;n=isNaN(e)?t.currentBlock:t.getBlockByIndex(e),n.selected=!1,this.clearCache()}clearSelection(e,t=!1){const{BlockManager:n,Caret:o,RectangleSelection:r}=this.Editor;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,a=i&&S(e.keyCode);if(this.anyBlockSelected&&i&&a&&!W.isSelectionExists){const t=n.removeSelectedBlocks();n.insertDefaultBlockAtIndex(t,!0),o.setToBlock(n.currentBlock),_((()=>{const t=e.key;o.insertContentAtCaretPosition(t.length>1?"":t)}),20)()}this.Editor.CrossBlockSelection.clear(e),this.anyBlockSelected&&!r.isRectActivated()?(t&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}copySelectedBlocks(e){e.preventDefault();const t=D.make("div");this.selectedBlocks.forEach((e=>{const n=ce(e.holder.innerHTML,this.sanitizerConfig),o=D.make("p");o.innerHTML=n,t.appendChild(o)}));const n=Array.from(t.childNodes).map((e=>e.textContent)).join("\n\n"),o=t.innerHTML;return e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",o),Promise.all(this.selectedBlocks.map((e=>e.save()))).then((t=>{try{e.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(t))}catch{}}))}selectBlockByIndex(e){const{BlockManager:t}=this.Editor,n=t.getBlockByIndex(e);void 0!==n&&this.selectBlock(n)}selectBlock(e){this.selection.save(),W.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}unselectBlock(e){e.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){Ne.remove(this.Editor.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Editor.RectangleSelection.clearSelection(),D.isNativeInput(e.target)&&!this.readyToBlockSelection)return void(this.readyToBlockSelection=!0);const t=this.Editor.BlockManager.getBlock(e.target),n=t.inputs;n.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==n.length||this.needToSelectAll?this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0):this.needToSelectAll=!0}selectAllBlocks(){this.selection.save(),W.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}},Caret:rt,CrossBlockSelection:class extends ${constructor(){super(...arguments),this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const{BlockManager:t,BlockSelection:n}=this.Editor;if(null===e.relatedTarget&&null===e.target)return;const o=t.getBlockByChildNode(e.relatedTarget)||this.lastSelectedBlock,r=t.getBlockByChildNode(e.target);if(o&&r&&r!==o){if(o===this.firstSelectedBlock)return W.get().removeAllRanges(),o.selected=!0,r.selected=!0,void n.clearCache();if(r===this.firstSelectedBlock)return o.selected=!1,r.selected=!1,void n.clearCache();this.Editor.InlineToolbar.close(),this.toggleBlocksSelectedState(o,r),this.lastSelectedBlock=r}}}async prepare(){this.listeners.on(document,"mousedown",(e=>{this.enableCrossBlockSelection(e)}))}watchSelection(e){if(e.button!==p)return;const{BlockManager:t}=this.Editor;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:n}=this.Editor;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=t.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,n.clearCache(),W.get().removeAllRanges());const o=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),r=t.blocks[o];r&&(this.lastSelectedBlock.selected!==r.selected?(r.selected=!0,n.clearCache()):(this.lastSelectedBlock.selected=!1,n.clearCache()),this.lastSelectedBlock=r,this.Editor.InlineToolbar.close(),r.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:n,Caret:o}=this.Editor,r=t.blocks.indexOf(this.firstSelectedBlock),i=t.blocks.indexOf(this.lastSelectedBlock);if(n.anyBlockSelected&&r>-1&&i>-1&&e&&e instanceof KeyboardEvent)switch(e.keyCode){case c:case u:o.setToBlock(t.blocks[Math.max(r,i)],o.positions.END);break;case l:case s:o.setToBlock(t.blocks[Math.min(r,i)],o.positions.START);break;default:o.setToBlock(t.blocks[Math.max(r,i)],o.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Editor;W.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:n,BlockSelection:o}=this.Editor,r=n.blocks.indexOf(e),i=n.blocks.indexOf(t),a=e.selected!==t.selected;for(let s=Math.min(r,i);s<=Math.max(r,i);s++){const r=n.blocks[s];r!==this.firstSelectedBlock&&r!==(a?e:t)&&(n.blocks[s].selected=!n.blocks[s].selected,o.clearCache())}}},DragNDrop:class extends ${constructor(){super(...arguments),this.isStartedAtEditor=!1}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}enableModuleBindings(){const{UI:e}=this.Editor;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",(async e=>{await this.processDrop(e)}),!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",(()=>{this.processDragStart()})),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",(e=>{this.processDragOver(e)}),!0)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}async processDrop(e){const{BlockManager:t,Caret:n,Paste:o}=this.Editor;e.preventDefault(),t.blocks.forEach((e=>{e.dropTarget=!1})),W.isAtEditor&&!W.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;const r=t.setCurrentBlockByChildNode(e.target);if(r)this.Editor.Caret.setToBlock(r,n.positions.END);else{const e=t.setCurrentBlockByChildNode(t.lastBlock.holder);this.Editor.Caret.setToBlock(e,n.positions.END)}await o.processDataTransfer(e.dataTransfer,!0)}processDragStart(){W.isAtEditor&&!W.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}processDragOver(e){e.preventDefault()}},ModificationsObserver:class extends ${constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=400,this.mutationObserver=new MutationObserver((e=>{this.redactorChanged(e)})),this.eventsDispatcher.on(X,(e=>{this.particularBlockChanged(e.event)})),this.eventsDispatcher.on(K,(()=>{this.disable()})),this.eventsDispatcher.on(Q,(()=>{this.enable()}))}enable(){this.mutationObserver.observe(this.Editor.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!y(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout((()=>{let e;e=1===this.batchingOnChangeQueue.size?this.batchingOnChangeQueue.values().next().value:Array.from(this.batchingOnChangeQueue.values()),this.config.onChange&&this.config.onChange(this.Editor.API.methods,e),this.batchingOnChangeQueue.clear()}),this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(Y,{mutations:e})}},Paste:at,ReadOnly:class extends ${constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Editor,{blockTools:t}=e,n=[];Array.from(t.entries()).forEach((([e,t])=>{t.isReadOnlySupported||n.push(e)})),this.toolsDontSupportReadOnly=n,this.config.readOnly&&n.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly)}async toggle(e=!this.readOnlyEnabled){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const t=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const t in this.Editor)this.Editor[t].toggleReadOnly&&this.Editor[t].toggleReadOnly(e);if(t===e)return this.readOnlyEnabled;const n=await this.Editor.Saver.save();return await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(n.blocks),this.readOnlyEnabled}throwCriticalError(){throw new U(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}},RectangleSelection:st,Renderer:class extends ${async render(e){return new Promise((t=>{const{Tools:n,BlockManager:o}=this.Editor;if(0===e.length)o.insert();else{const t=e.map((({type:e,data:t,tunes:r,id:i})=>{let a;!1===n.available.has(e)&&(m(`Tool «${e}» is not found. Check 'tools' property at the Editor.js config.`,"warn"),t=this.composeStubDataForTool(e,t,i),e=n.stubTool);try{a=o.composeBlock({id:i,tool:e,data:t,tunes:r})}catch(s){h(`Block «${e}» skipped because of plugins error`,"error",{data:t,error:s}),t=this.composeStubDataForTool(e,t,i),e=n.stubTool,a=o.composeBlock({id:i,tool:e,data:t,tunes:r})}return a}));o.insertMany(t)}window.requestIdleCallback((()=>{t()}),{timeout:2e3})}))}composeStubDataForTool(e,t,n){const{Tools:o}=this.Editor;let r=e;if(o.unavailable.has(e)){const t=o.unavailable.get(e).toolbox;void 0!==t&&void 0!==t[0].title&&(r=t[0].title)}return{savedData:{id:n,type:e,data:t},title:r}}},Saver:class extends ${async save(){const{BlockManager:e,Tools:t}=this.Editor,n=e.blocks,o=[];try{n.forEach((e=>{o.push(this.getSavedData(e))}));const e=await Promise.all(o),r=await le(e,(e=>t.blockTools.get(e).sanitizeConfig));return this.makeOutput(r)}catch(e){m("Saving failed due to the Error %o","error",e)}}async getSavedData(e){const t=await e.save(),n=t&&await e.validate(t.data);return{...t,isValid:n}}makeOutput(e){const t=[];return e.forEach((({id:e,tool:n,data:o,tunes:r,isValid:i})=>{if(!i)return void h(`Block «${n}» skipped because saved data is invalid`);if(n===this.Editor.Tools.stubTool)return void t.push(o);const a={id:e,type:n,data:o,...!x(r)&&{tunes:r}};t.push(a)})),{time:+new Date,blocks:t,version:"2.29.1"}}},Tools:_t,UI:class extends ${constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=void 0,this.resizeDebouncer=T((()=>{this.windowResize()}),200)}get CSS(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}get contentRect(){if(this.contentRectCache)return this.contentRectCache;const e=this.nodes.wrapper.querySelector(`.${J.CSS.content}`);return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.checkIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){e?this.disableModuleBindings():window.requestIdleCallback((()=>{this.enableModuleBindings()}),{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Editor;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:n,ConversionToolbar:o}=this.Editor;return t.opened||n.opened||o.opened||e.toolbox.opened}get someFlipperButtonFocused(){return!!this.Editor.Toolbar.toolbox.hasFocus()||Object.entries(this.Editor).filter((([e,t])=>t.flipper instanceof Ce)).some((([e,t])=>t.flipper.hasFocus()))}destroy(){this.nodes.holder.innerHTML=""}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:n,ConversionToolbar:o}=this.Editor;t.close(),n.close(),o.close(),e.toolbox.close()}checkIsMobile(){this.isMobile=window.innerWidth<650}make(){this.nodes.holder=D.getHolder(this.config.holder),this.nodes.wrapper=D.make("div",[this.CSS.editorWrapper,...this.isRtl?[this.CSS.editorRtlFix]:[]]),this.nodes.redactor=D.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper)}loadStyles(){const e="editor-js-styles";if(D.get(e))return;const t=D.make("style",null,{id:e,textContent:Tt.toString()});this.config.style&&!x(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),D.prepend(document.head,t)}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",(e=>{this.redactorClicked(e)}),!1),this.readOnlyMutableListeners.on(this.nodes.redactor,"mousedown",(e=>{this.documentTouched(e)}),{capture:!0,passive:!0}),this.readOnlyMutableListeners.on(this.nodes.redactor,"touchstart",(e=>{this.documentTouched(e)}),{capture:!0,passive:!0}),this.readOnlyMutableListeners.on(document,"keydown",(e=>{this.documentKeydown(e)}),!0),this.readOnlyMutableListeners.on(document,"mousedown",(e=>{this.documentClicked(e)}),!0);const e=T((()=>{this.selectionChanged()}),180);this.readOnlyMutableListeners.on(document,"selectionchange",e,!0),this.readOnlyMutableListeners.on(window,"resize",(()=>{this.resizeDebouncer()}),{passive:!0}),this.watchBlockHoveredEvents()}watchBlockHoveredEvents(){let e;this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",O((t=>{const n=t.target.closest(".ce-block");this.Editor.BlockSelection.anyBlockSelected||n&&e!==n&&(e=n,this.eventsDispatcher.emit($e,{block:this.Editor.BlockManager.getBlockByChildNode(n)}))}),20),{passive:!0})}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.checkIsMobile()}documentKeydown(e){switch(e.keyCode){case i:this.enterPressed(e);break;case o:case d:this.backspacePressed(e);break;case a:this.escapePressed(e);break;default:this.defaultBehaviour(e)}}defaultBehaviour(e){const{currentBlock:t}=this.Editor.BlockManager,n=e.target.closest(`.${this.CSS.editorWrapper}`),o=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;void 0===t||null!==n?n||t&&o||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close()):this.Editor.BlockEvents.keydown(e)}backspacePressed(e){const{BlockManager:t,BlockSelection:n,Caret:o}=this.Editor;if(n.anyBlockSelected&&!W.isSelectionExists){const r=t.removeSelectedBlocks(),i=t.insertDefaultBlockAtIndex(r,!0);o.setToBlock(i,o.positions.START),n.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}}escapePressed(e){this.Editor.BlockSelection.clearSelection(e),this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.toolbox.close(),this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END)):this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.ConversionToolbar.opened?this.Editor.ConversionToolbar.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:n}=this.Editor,o=t.currentBlockIndex>=0;if(n.anyBlockSelected&&!W.isSelectionExists)return n.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),void e.stopPropagation();if(!this.someToolbarOpened&&o&&"BODY"===e.target.tagName){const e=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(e),this.Editor.Toolbar.moveAndOpen(e)}this.Editor.BlockSelection.clearSelection(e)}documentClicked(e){var t,n;if(!e.isTrusted)return;const o=e.target;this.nodes.holder.contains(o)||W.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close());const r=null==(t=this.Editor.BlockSettings.nodes.wrapper)?void 0:t.contains(o),i=null==(n=this.Editor.Toolbar.nodes.settingsToggler)?void 0:n.contains(o),a=r||i;if(this.Editor.BlockSettings.opened&&!a){this.Editor.BlockSettings.close();const e=this.Editor.BlockManager.getBlockByChildNode(o);this.Editor.Toolbar.moveAndOpen(e)}this.Editor.BlockSelection.clearSelection(e)}documentTouched(e){let t=e.target;if(t===this.nodes.redactor){const n=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,o=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t)}catch{this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.moveAndOpen()}redactorClicked(e){if(!W.isCollapsed)return;const t=e.target,n=e.metaKey||e.ctrlKey;if(D.isAnchor(t)&&n){e.stopImmediatePropagation(),e.stopPropagation();const n=function(e){try{return new URL(e).href}catch{}return"//"===e.substring(0,2)?window.location.protocol+e:window.location.origin+e}(t.getAttribute("href"));!function(e){window.open(e,"_blank")}(n)}else this.processBottomZoneClick(e)}processBottomZoneClick(e){const t=this.Editor.BlockManager.getBlockByIndex(-1),n=D.offset(t.holder).bottom,o=e.pageY,{BlockSelection:r}=this.Editor;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!r.anyBlockSelected&&n<o){e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:t,Caret:n,Toolbar:o}=this.Editor;(!t.lastBlock.tool.isDefault||!t.lastBlock.isEmpty)&&t.insertAtEnd(),n.setToTheLastBlock(),o.moveAndOpen(t.lastBlock)}}selectionChanged(){const{CrossBlockSelection:e,BlockSelection:t}=this.Editor,n=W.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&W.get().removeAllRanges(),!n)return void(W.range||this.Editor.InlineToolbar.close());const o=null===n.closest(`.${J.CSS.content}`);if(o&&(this.Editor.InlineToolbar.containsNode(n)||this.Editor.InlineToolbar.close(),"true"!==n.dataset.inlineToolbar))return;this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.setCurrentBlockByChildNode(n);const r=!0!==o;this.Editor.InlineToolbar.tryToShow(!0,r)}}};class Pt{constructor(e){let t,n;this.moduleInstances={},this.eventsDispatcher=new z,this.isReady=new Promise(((e,o)=>{t=e,n=o})),Promise.resolve().then((async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:n,Caret:o,UI:r,ModificationsObserver:i}=this.moduleInstances;r.checkEmptiness(),i.enable(),this.configuration.autofocus&&o.setToBlock(n.blocks[0],o.positions.START),t()})).catch((e=>{h(`Editor.js is not ready because of ${e}`,"error"),n(e)}))}set configuration(e){var t,o;v(e)?this.config={...e}:this.config={holder:e},I(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=n.VERBOSE),function(e){f.logLevel=e}(this.config.logLevel),I(!!this.config.initialBlock,"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=void 0!==this.config.minHeight?this.config.minHeight:300;const r={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=void 0===this.config.inlineToolbar||this.config.inlineToolbar,(x(this.config.data)||!this.config.data.blocks||0===this.config.data.blocks.length)&&(this.config.data={blocks:[r]}),this.config.readOnly=this.config.readOnly||!1,null!=(t=this.config.i18n)&&t.messages&&H.setDictionary(this.config.i18n.messages),this.config.i18n.direction=(null==(o=this.config.i18n)?void 0:o.direction)||"ltr"}get configuration(){return this.config}validate(){const{holderId:e,holder:t}=this.config;if(e&&t)throw Error("«holderId» and «holder» param can't assign at the same time.");if(b(t)&&!D.get(t))throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);if(t&&v(t)&&!D.isElement(t))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce(((e,t)=>e.then((async()=>{try{await this.moduleInstances[t].prepare()}catch(e){if(e instanceof U)throw new Error(e.message);h(`Module ${t} was skipped because of %o`,"warn",e)}}))),Promise.resolve())}render(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}constructModules(){Object.entries(Ot).forEach((([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(t){h("[constructModules]",`Module ${e} skipped because`,"error",t)}}))}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}getModulesDiff(e){const t={};for(const n in this.moduleInstances)n!==e&&(t[n]=this.moduleInstances[n]);return t}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-header{padding:.6em 0 3px;margin:0;line-height:1.25em;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-header[contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;display:none;cursor:text}.ce-header[contentEditable=true][data-placeholder]:empty:before{display:block}.ce-header[contentEditable=true][data-placeholder]:empty:focus:before{display:none}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:block}.image-tool__image-preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:image-preloader-spin 2s infinite linear;box-sizing:border-box}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important;content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__caption,.image-tool--loading .image-tool__caption{display:none}.image-tool .cdx-button{display:flex;align-items:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--loading .image-tool__image{min-height:200px;display:flex;border:1px solid var(--border-color);background-color:#fff}.image-tool--loading .image-tool__image-picture,.image-tool--loading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}@keyframes image-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();const Mt='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.13968 15.32L8.69058 11.5661C9.02934 11.2036 9.48873 11 9.96774 11C10.4467 11 10.9061 11.2036 11.2449 11.5661L15.3871 16M13.5806 14.0664L15.0132 12.533C15.3519 12.1705 15.8113 11.9668 16.2903 11.9668C16.7693 11.9668 17.2287 12.1705 17.5675 12.533L18.841 13.9634"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.7778 9.33331H13.7867"/></svg>';function Lt(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)o[e]=n[e];return o}class Bt{constructor({api:e,config:t,onSelectFile:n,readOnly:o}){this.api=e,this.config=t,this.onSelectFile=n,this.readOnly=o,this.nodes={wrapper:Lt("div",[this.CSS.baseClass,this.CSS.wrapper]),imageContainer:Lt("div",[this.CSS.imageContainer]),fileButton:this.createFileButton(),imageEl:void 0,imagePreloader:Lt("div",this.CSS.imagePreloader),caption:Lt("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly})},this.nodes.caption.dataset.placeholder=this.config.captionPlaceholder,this.nodes.imageContainer.appendChild(this.nodes.imagePreloader),this.nodes.wrapper.appendChild(this.nodes.imageContainer),this.nodes.wrapper.appendChild(this.nodes.caption),this.nodes.wrapper.appendChild(this.nodes.fileButton)}get CSS(){return{baseClass:this.api.styles.block,loading:this.api.styles.loader,input:this.api.styles.input,button:this.api.styles.button,wrapper:"image-tool",imageContainer:"image-tool__image",imagePreloader:"image-tool__image-preloader",imageEl:"image-tool__image-picture",caption:"image-tool__caption"}}static get status(){return{EMPTY:"empty",UPLOADING:"loading",FILLED:"filled"}}render(e){return e.file&&0!==Object.keys(e.file).length?this.toggleStatus(Bt.status.UPLOADING):this.toggleStatus(Bt.status.EMPTY),this.nodes.wrapper}createFileButton(){const e=Lt("div",[this.CSS.button]);return e.innerHTML=this.config.buttonContent||`${Mt} ${this.api.i18n.t("Select an Image")}`,e.addEventListener("click",(()=>{this.onSelectFile()})),e}showPreloader(e){this.nodes.imagePreloader.style.backgroundImage=`url(${e})`,this.toggleStatus(Bt.status.UPLOADING)}hidePreloader(){this.nodes.imagePreloader.style.backgroundImage="",this.toggleStatus(Bt.status.EMPTY)}fillImage(e){const t=/\.mp4$/.test(e)?"VIDEO":"IMG",n={src:e};let o="load";"VIDEO"===t&&(n.autoplay=!0,n.loop=!0,n.muted=!0,n.playsinline=!0,o="loadeddata"),this.nodes.imageEl=Lt(t,this.CSS.imageEl,n),this.nodes.imageEl.addEventListener(o,(()=>{this.toggleStatus(Bt.status.FILLED),this.nodes.imagePreloader&&(this.nodes.imagePreloader.style.backgroundImage="")})),this.nodes.imageContainer.appendChild(this.nodes.imageEl)}fillCaption(e){this.nodes.caption&&(this.nodes.caption.innerHTML=e)}toggleStatus(e){for(const t in Bt.status)Object.prototype.hasOwnProperty.call(Bt.status,t)&&this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${Bt.status[t]}`,e===Bt.status[t])}applyTune(e,t){this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${e}`,t)}}function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={exports:{}};window,At.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){var o=n(2),r=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void c(t.promise,e)}l(t.promise,o)}else(1===e._state?l:c)(t.promise,e._value)}))):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void p((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){c(e,t)}var o,r}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,l(t,e))}),(function(e){n||(n=!0,c(t,e))}))}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new d(e,t,n)),n},a.prototype.finally=o.a,a.all=function(e){return new a((function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var r=o.length;function i(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){i(e,t)}),n)}o[e]=a,0==--r&&t(o)}catch(e){n(e)}}for(var a=0;a<o.length;a++)i(a,o[a])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){r(e,0)},a._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t.a=a}).call(this,n(5).setImmediate)},function(e,t,n){t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(4);var r,i,a,s,l,c,u,d=n(8),p=(i=function(e){return new Promise((function(t,n){e=s(e),(e=l(e)).beforeSend&&e.beforeSend();var o=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");o.open(e.method,e.url),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e.headers).forEach((function(t){var n=e.headers[t];o.setRequestHeader(t,n)}));var r=e.ratio;o.upload.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*r/100);e.progress(Math.min(o,100))}),!1),o.addEventListener("progress",(function(t){var n=Math.round(t.loaded/t.total*100),o=Math.ceil(n*(100-r)/100)+r;e.progress(Math.min(o,100))}),!1),o.onreadystatechange=function(){if(4===o.readyState){var e=o.response;try{e=JSON.parse(e)}catch{}var r=d.parseHeaders(o.getAllResponseHeaders()),i={body:e,code:o.status,headers:r};u(o.status)?t(i):n(i)}},o.send(e.data)}))},a=function(e){return e.method="POST",i(e)},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==o(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(r).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},l=function(e){switch(e.method){case"GET":var t=c(e.data,r.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||r.JSON}(e);(d.isFormData(e.data)||d.isFormElement(e.data))&&(n=r.FORM),e.data=c(e.data,n),n!==p.contentType.FORM&&(e.headers["content-type"]=n)}return e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case r.URLENCODED:return d.urlEncode(e);case r.JSON:return d.jsonEncode(e);case r.FORM:return d.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:r={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),d.selectFiles(e).then((function(t){for(var n=new FormData,o=0;o<t.length;o++)n.append(e.fieldName,t[o],t[o].name);d.isObject(e.data)&&Object.keys(e.data).forEach((function(t){var o=e.data[t];n.append(t,o)}));var r=e.beforeSend;return e.beforeSend=function(){return r(t)},e.data=n,a(e)}))},selectFiles:function(e){return delete(e=s(e)).beforeSend,d.selectFiles(e)}});e.exports=p},function(e,t,n){n.r(t);var o=n(1);window.Promise=window.Promise||o.a},function(e,t,n){(function(e){var o=void 0!==e&&e||typeof self<"u"&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),t.setImmediate=typeof self<"u"&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var o,r,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),o=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},o=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,o=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[l]=r,o(l),l++},p.clearImmediate=f}function f(e){delete c[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,o=e.args;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;default:t.apply(n,o)}}(t)}finally{f(e),u=!1}}}}}(typeof self>"u"?void 0===e?this:e:self)}).call(this,n(0),n(7))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch{try{return n.call(null,e,0)}catch{return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch{n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch{o=a}}();var l,c=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch{try{return o.call(null,e)}catch{return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=n(9);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"urlEncode",value:function(e){return r(e)}},{key:"jsonEncode",value:function(e){return JSON.stringify(e)}},{key:"formEncode",value:function(e){if(this.isFormData(e))return e;if(this.isFormElement(e))return new FormData(e);if(this.isObject(e)){var t=new FormData;return Object.keys(e).forEach((function(n){var o=e[n];t.append(n,o)})),t}throw new Error("`data` must be an instance of Object, FormData or <FORM> HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var o=document.createElement("INPUT");o.type="file",e.multiple&&o.setAttribute("multiple","multiple"),e.accept&&o.setAttribute("accept",e.accept),o.style.display="none",document.body.appendChild(o),o.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(o)}),!1),o.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),o=t.shift(),r=t.join(": ");o&&(n[o]=r)})),n}}],(n=null)&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},o=function(e,t,r,i){return t=t||null,r=r||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}(Object.keys(e).map((function(a){var s,l,c=a;if(i&&(c=i+"["+c+"]"),"object"==typeof e[a]&&null!==e[a])s=o(e[a],null,r,c);else{t&&(l=c,c=!isNaN(parseFloat(l))&&isFinite(l)?t+Number(c):c);var u=e[a];u=(u=0===(u=!1===(u=!0===u?"1":u)?"0":u)?"0":u)||"",s=n(c)+"="+n(u)}return s}))).join(r).replace(/[!'()*]/g,""):""};e.exports=o}]);const jt=It(At.exports);function Rt(e){return e&&"function"==typeof e.then}class Dt{constructor({config:e,onUpload:t,onError:n}){this.config=e,this.onUpload=t,this.onError=n}uploadSelectedFile({onPreview:e}){const t=function(t){const n=new FileReader;n.readAsDataURL(t),n.onload=t=>{e(t.target.result)}};let n;n=this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile?jt.selectFiles({accept:this.config.types}).then((e=>{t(e[0]);const n=this.config.uploader.uploadByFile(e[0]);return Rt(n)||console.warn("Custom uploader method uploadByFile should return a Promise"),n})):jt.transport({url:this.config.endpoints.byFile,data:this.config.additionalRequestData,accept:this.config.types,headers:this.config.additionalRequestHeaders,beforeSend:e=>{t(e[0])},fieldName:this.config.field}).then((e=>e.body)),n.then((e=>{this.onUpload(e)})).catch((e=>{this.onError(e)}))}uploadByUrl(e){let t;this.config.uploader&&"function"==typeof this.config.uploader.uploadByUrl?(t=this.config.uploader.uploadByUrl(e),Rt(t)||console.warn("Custom uploader method uploadByUrl should return a Promise")):t=jt.post({url:this.config.endpoints.byUrl,data:Object.assign({url:e},this.config.additionalRequestData),type:jt.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((e=>e.body)),t.then((e=>{this.onUpload(e)})).catch((e=>{this.onError(e)}))}uploadByFile(e,{onPreview:t}){const n=new FileReader;let o;if(n.readAsDataURL(e),n.onload=e=>{t(e.target.result)},this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile)o=this.config.uploader.uploadByFile(e),Rt(o)||console.warn("Custom uploader method uploadByFile should return a Promise");else{const t=new FormData;t.append(this.config.field,e),this.config.additionalRequestData&&Object.keys(this.config.additionalRequestData).length&&Object.entries(this.config.additionalRequestData).forEach((([e,n])=>{t.append(e,n)})),o=jt.post({url:this.config.endpoints.byFile,data:t,type:jt.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((e=>e.body))}o.then((e=>{this.onUpload(e)})).catch((e=>{this.onError(e)}))}}class Nt{static get isReadOnlySupported(){return!0}static get toolbox(){return{icon:Mt,title:"Image"}}static get tunes(){return[{name:"withBorder",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.9919 9.5H19.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.5 5H14.5096"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.625 5H15C17.2091 5 19 6.79086 19 9V9.375"/><path stroke="currentColor" stroke-width="2" d="M9.375 5L9 5C6.79086 5 5 6.79086 5 9V9.375"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.3725 5H9.38207"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 9.5H5.00957"/><path stroke="currentColor" stroke-width="2" d="M9.375 19H9C6.79086 19 5 17.2091 5 15V14.625"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.3725 19H9.38207"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 14.55H5.00957"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 13V16M16 19V16M19 16H16M16 16H13"/></svg>',title:"With border",toggle:!0},{name:"stretched",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 9L20 12L17 15"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 12H20"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 9L4 12L7 15"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12H10"/></svg>',title:"Stretch image",toggle:!0},{name:"withBackground",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19V19C9.13623 19 8.20435 19 7.46927 18.6955C6.48915 18.2895 5.71046 17.5108 5.30448 16.5307C5 15.7956 5 14.8638 5 13V12C5 9.19108 5 7.78661 5.67412 6.77772C5.96596 6.34096 6.34096 5.96596 6.77772 5.67412C7.78661 5 9.19108 5 12 5H13.5C14.8956 5 15.5933 5 16.1611 5.17224C17.4395 5.56004 18.44 6.56046 18.8278 7.83886C19 8.40666 19 9.10444 19 10.5V10.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 13V16M16 19V16M19 16H16M16 16H13"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6.5 17.5L17.5 6.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.9919 10.5H19.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.9919 19H11.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13L13 5"/></svg>',title:"With background",toggle:!0}]}constructor({data:e,config:t,api:n,readOnly:o,block:r}){this.api=n,this.readOnly=o,this.block=r,this.config={endpoints:t.endpoints||"",additionalRequestData:t.additionalRequestData||{},additionalRequestHeaders:t.additionalRequestHeaders||{},field:t.field||"image",types:t.types||"image/*",captionPlaceholder:this.api.i18n.t(t.captionPlaceholder||"Caption"),buttonContent:t.buttonContent||"",uploader:t.uploader||void 0,actions:t.actions||[]},this.uploader=new Dt({config:this.config,onUpload:e=>this.onUpload(e),onError:e=>this.uploadingFailed(e)}),this.ui=new Bt({api:n,config:this.config,onSelectFile:()=>{this.uploader.uploadSelectedFile({onPreview:e=>{this.ui.showPreloader(e)}})},readOnly:o}),this._data={},this.data=e}render(){return this.ui.render(this.data)}validate(e){return e.file&&e.file.url}save(){const e=this.ui.nodes.caption;return this._data.caption=e.innerHTML,this.data}renderSettings(){return Nt.tunes.concat(this.config.actions).map((e=>({icon:e.icon,label:this.api.i18n.t(e.title),name:e.name,toggle:e.toggle,isActive:this.data[e.name],onActivate:()=>{"function"!=typeof e.action?this.tuneToggled(e.name):e.action(e.name)}})))}appendCallback(){this.ui.nodes.fileButton.click()}static get pasteConfig(){return{tags:[{img:{src:!0}}],patterns:{image:/https?:\/\/\S+\.(gif|jpe?g|tiff|png|svg|webp)(\?[a-z0-9=]*)?$/i},files:{mimeTypes:["image/*"]}}}async onPaste(e){switch(e.type){case"tag":{const t=e.detail.data;if(/^blob:/.test(t.src)){const e=await(await fetch(t.src)).blob();this.uploadFile(e);break}this.uploadUrl(t.src);break}case"pattern":{const t=e.detail.data;this.uploadUrl(t);break}case"file":{const t=e.detail.file;this.uploadFile(t);break}}}set data(e){this.image=e.file,this._data.caption=e.caption||"",this.ui.fillCaption(this._data.caption),Nt.tunes.forEach((({name:t})=>{const n=typeof e[t]<"u"&&(!0===e[t]||"true"===e[t]);this.setTune(t,n)}))}get data(){return this._data}set image(e){this._data.file=e||{},e&&e.url&&this.ui.fillImage(e.url)}onUpload(e){e.success&&e.file?this.image=e.file:this.uploadingFailed("incorrect response: "+JSON.stringify(e))}uploadingFailed(e){console.log("Image Tool: uploading failed because of",e),this.api.notifier.show({message:this.api.i18n.t("Couldn’t upload image. Please try another."),style:"error"}),this.ui.hidePreloader()}tuneToggled(e){this.setTune(e,!this._data[e])}setTune(e,t){this._data[e]=t,this.ui.applyTune(e,t),"stretched"===e&&Promise.resolve().then((()=>{this.block.stretched=t})).catch((e=>{console.error(e)}))}uploadFile(e){this.uploader.uploadByFile(e,{onPreview:e=>{this.ui.showPreloader(e)}})}uploadUrl(e){this.ui.showPreloader(e),this.uploader.uploadByUrl(e)}}function Ft(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)o[e]=n[e];return o}function Ht(e){const t=Ft("div");return t.appendChild(e),t.innerHTML}function Ut(e){let t;return e.nodeType!==Node.ELEMENT_NODE?t=e.textContent:(t=e.innerHTML,t=t.replaceAll("<br>","")),0===t.trim().length}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cdx-nested-list{margin:0;padding:0;outline:none;counter-reset:item;list-style:none}.cdx-nested-list__item{line-height:1.6em;display:flex;margin:2px 0}.cdx-nested-list__item [contenteditable]{outline:none}.cdx-nested-list__item-body{flex-grow:2}.cdx-nested-list__item-content,.cdx-nested-list__item-children{flex-basis:100%}.cdx-nested-list__item-content{word-break:break-word;white-space:pre-wrap}.cdx-nested-list__item:before{counter-increment:item;margin-right:5px;white-space:nowrap}.cdx-nested-list--ordered>.cdx-nested-list__item:before{content:counters(item,".") ". "}.cdx-nested-list--unordered>.cdx-nested-list__item:before{content:"•"}.cdx-nested-list__settings{display:flex}.cdx-nested-list__settings .cdx-settings-button{width:50%}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class zt{constructor(){this.savedFakeCaret=void 0}save(){const e=zt.range,t=Ft("span");t.hidden=!0,e.insertNode(t),this.savedFakeCaret=t}restore(){if(!this.savedFakeCaret)return;const e=window.getSelection(),t=new Range;t.setStartAfter(this.savedFakeCaret),t.setEndAfter(this.savedFakeCaret),e.removeAllRanges(),e.addRange(t),setTimeout((()=>{this.savedFakeCaret.remove()}),150)}static get range(){const e=window.getSelection();return e&&e.rangeCount?e.getRangeAt(0):null}static extractFragmentFromCaretPositionTillTheEnd(){const e=window.getSelection();if(!e.rangeCount)return;const t=e.getRangeAt(0);let n=t.startContainer;n.nodeType!==Node.ELEMENT_NODE&&(n=n.parentNode);const o=n.closest("[contenteditable]");t.deleteContents();const r=t.cloneRange();return r.selectNodeContents(o),r.setStart(t.endContainer,t.endOffset),r.extractContents()}static focus(e,t=!0){const n=document.createRange(),o=window.getSelection();n.selectNodeContents(e),n.collapse(t),o.removeAllRanges(),o.addRange(n)}static isAtStart(){const e=window.getSelection();if(e.focusOffset>0)return!1;const t=e.focusNode;return zt.getHigherLevelSiblings(t,"left").every((e=>Ut(e)))}static getHigherLevelSiblings(e,t="left"){let n=e;const o=[];for(;n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;const r="left"===t?"previousSibling":"nextSibling";for(;n[r];)n=n[r],o.push(n);return o}}const Vt='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="9" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 17H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 12H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 7H4.99002"/></svg>',qt='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="12" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.79999 14L7.79999 7.2135C7.79999 7.12872 7.7011 7.0824 7.63597 7.13668L4.79999 9.5"/></svg>';class $t{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}static get toolbox(){return{icon:qt,title:"List"}}constructor({data:e,config:t,api:n,readOnly:o}){this.nodes={wrapper:null},this.api=n,this.readOnly=o,this.config=t,this.defaultListStyle="ordered"===this.config.defaultStyle?"ordered":"unordered";const r={style:this.defaultListStyle,items:[]};this.data=e&&Object.keys(e).length?e:r,this.caret=new zt}render(){return this.nodes.wrapper=this.makeListWrapper(this.data.style,[this.CSS.baseBlock]),this.data.items.length?this.appendItems(this.data.items,this.nodes.wrapper):this.appendItems([{content:"",items:[]}],this.nodes.wrapper),this.readOnly||this.nodes.wrapper.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.enterPressed(e);break;case"Backspace":this.backspace(e);break;case"Tab":e.shiftKey?this.shiftTab(e):this.addTab(e)}}),!1),this.nodes.wrapper}renderSettings(){return[{name:"unordered",label:this.api.i18n.t("Unordered"),icon:Vt},{name:"ordered",label:this.api.i18n.t("Ordered"),icon:qt}].map((e=>({name:e.name,icon:e.icon,label:e.label,isActive:this.data.style===e.name,closeOnActivate:!0,onActivate:()=>{this.listStyle=e.name}})))}static get pasteConfig(){return{tags:["OL","UL","LI"]}}onPaste(e){const t=e.detail.data;this.data=this.pasteHandler(t);const n=this.nodes.wrapper;n&&n.parentNode.replaceChild(this.render(),n)}pasteHandler(e){const{tagName:t}=e;let n,o;switch(t){case"OL":n="ordered",o="ol";break;case"UL":case"LI":n="unordered",o="ul"}const r={style:n,items:[]},i=e=>Array.from(e.querySelectorAll(":scope > li")).map((e=>{var t;const n=e.querySelector(`:scope > ${o}`),r=n?i(n):[];return{content:(null==(t=null==e?void 0:e.firstChild)?void 0:t.textContent)||"",items:r}}));return r.items=i(e),r}appendItems(e,t){e.forEach((e=>{const n=this.createItem(e.content,e.items);t.appendChild(n)}))}createItem(e,t=[]){const n=Ft("li",this.CSS.item),o=Ft("div",this.CSS.itemBody),r=Ft("div",this.CSS.itemContent,{innerHTML:e,contentEditable:!this.readOnly});return o.appendChild(r),n.appendChild(o),t&&t.length>0&&this.addChildrenList(n,t),n}save(){const e=t=>Array.from(t.querySelectorAll(`:scope > .${this.CSS.item}`)).map((t=>{const n=t.querySelector(`.${this.CSS.itemChildren}`);return{content:this.getItemContent(t),items:n?e(n):[]}}));return{style:this.data.style,items:e(this.nodes.wrapper)}}addChildrenList(e,t){const n=e.querySelector(`.${this.CSS.itemBody}`),o=this.makeListWrapper(void 0,[this.CSS.itemChildren]);this.appendItems(t,o),n.appendChild(o)}makeListWrapper(e=this.listStyle,t=[]){const n="ordered"===e?"ol":"ul",o="ordered"===e?this.CSS.wrapperOrdered:this.CSS.wrapperUnordered;return t.push(o),Ft(n,[this.CSS.wrapper,...t])}get CSS(){return{baseBlock:this.api.styles.block,wrapper:"cdx-nested-list",wrapperOrdered:"cdx-nested-list--ordered",wrapperUnordered:"cdx-nested-list--unordered",item:"cdx-nested-list__item",itemBody:"cdx-nested-list__item-body",itemContent:"cdx-nested-list__item-content",itemChildren:"cdx-nested-list__item-children",settingsWrapper:"cdx-nested-list__settings",settingsButton:this.api.styles.settingsButton,settingsButtonActive:this.api.styles.settingsButtonActive}}get listStyle(){return this.data.style||this.defaultListStyle}set listStyle(e){const t=Array.from(this.nodes.wrapper.querySelectorAll(`.${this.CSS.wrapper}`));t.push(this.nodes.wrapper),t.forEach((t=>{t.classList.toggle(this.CSS.wrapperUnordered,"unordered"===e),t.classList.toggle(this.CSS.wrapperOrdered,"ordered"===e)})),this.data.style=e}get currentItem(){let e=window.getSelection().anchorNode;return e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentNode),e.closest(`.${this.CSS.item}`)}enterPressed(e){const t=this.currentItem;if(e.stopPropagation(),e.preventDefault(),e.isComposing)return;const n=0===this.getItemContent(t).trim().length,o=t.parentNode===this.nodes.wrapper,r=null===t.nextElementSibling;if(o&&r&&n)return void this.getOutOfList();if(r&&n)return void this.unshiftItem();const i=Ht(zt.extractFragmentFromCaretPositionTillTheEnd()),a=t.querySelector(`.${this.CSS.itemChildren}`),s=this.createItem(i,void 0);a&&Array.from(a.querySelectorAll(`.${this.CSS.item}`)).length>0?a.prepend(s):t.after(s),this.focusItem(s)}unshiftItem(){const e=this.currentItem,t=e.parentNode.closest(`.${this.CSS.item}`);if(!t)return;this.caret.save(),t.after(e),this.caret.restore();const n=t.querySelector(`.${this.CSS.itemChildren}`);0===n.children.length&&n.remove()}getItemContent(e){const t=e.querySelector(`.${this.CSS.itemContent}`);return Ut(t)?"":t.innerHTML}focusItem(e,t=!0){const n=e.querySelector(`.${this.CSS.itemContent}`);zt.focus(n,t)}getOutOfList(){this.currentItem.remove(),this.api.blocks.insert(),this.api.caret.setToBlock(this.api.blocks.getCurrentBlockIndex())}backspace(e){if(!zt.isAtStart())return;e.preventDefault();const t=this.currentItem,n=t.previousSibling,o=t.parentNode.closest(`.${this.CSS.item}`);if(!n&&!o)return;let r;if(e.stopPropagation(),n){const e=n.querySelectorAll(`.${this.CSS.item}`);r=Array.from(e).pop()||n}else r=o;const i=Ht(zt.extractFragmentFromCaretPositionTillTheEnd()),a=r.querySelector(`.${this.CSS.itemContent}`);zt.focus(a,!1),this.caret.save(),a.insertAdjacentHTML("beforeend",i);let s=t.querySelectorAll(`.${this.CSS.itemChildren} > .${this.CSS.item}`);s=Array.from(s),s=s.filter((e=>e.parentNode.closest(`.${this.CSS.item}`)===t)),s.reverse().forEach((e=>{n?r.after(e):t.after(e)})),t.remove(),this.caret.restore()}addTab(e){e.stopPropagation(),e.preventDefault();const t=this.currentItem,n=t.previousSibling;if(!n)return;const o=n.querySelector(`.${this.CSS.itemChildren}`);if(this.caret.save(),o)o.appendChild(t);else{const e=this.makeListWrapper(void 0,[this.CSS.itemChildren]),o=n.querySelector(`.${this.CSS.itemBody}`);e.appendChild(t),o.appendChild(e)}this.caret.restore()}shiftTab(e){e.stopPropagation(),e.preventDefault(),this.unshiftItem()}static joinRecursive(e){return e.items.map((e=>`${e.content} ${$t.joinRecursive(e)}`)).join("")}static get conversionConfig(){return{export:e=>$t.joinRecursive(e),import:e=>({items:[{content:e,items:[]}],style:"unordered"})}}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".cdx-quote-icon svg{transform:rotate(180deg)}.cdx-quote{margin:0}.cdx-quote__text{min-height:158px;margin-bottom:10px}.cdx-quote [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-quote [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-quote [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.cdx-quote-settings{display:flex}.cdx-quote-settings .cdx-settings-button{width:50%}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class Wt{static get isReadOnlySupported(){return!0}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"/></svg>',title:"Quote"}}static get contentless(){return!0}static get enableLineBreaks(){return!0}static get DEFAULT_QUOTE_PLACEHOLDER(){return"Enter a quote"}static get DEFAULT_CAPTION_PLACEHOLDER(){return"Enter a caption"}static get ALIGNMENTS(){return{left:"left",center:"center"}}static get DEFAULT_ALIGNMENT(){return Wt.ALIGNMENTS.left}static get conversionConfig(){return{import:"text",export:function(e){return e.caption?`${e.text} — ${e.caption}`:e.text}}}get CSS(){return{baseClass:this.api.styles.block,wrapper:"cdx-quote",text:"cdx-quote__text",input:this.api.styles.input,caption:"cdx-quote__caption"}}get settings(){return[{name:"left",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17 7L5 7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17 17H5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13 12L5 12"/></svg>'},{name:"center",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 7L6 7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 17H6"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 12L8 12"/></svg>'}]}constructor({data:e,config:t,api:n,readOnly:o}){const{ALIGNMENTS:r,DEFAULT_ALIGNMENT:i}=Wt;this.api=n,this.readOnly=o,this.quotePlaceholder=t.quotePlaceholder||Wt.DEFAULT_QUOTE_PLACEHOLDER,this.captionPlaceholder=t.captionPlaceholder||Wt.DEFAULT_CAPTION_PLACEHOLDER,this.data={text:e.text||"",caption:e.caption||"",alignment:Object.values(r).includes(e.alignment)&&e.alignment||t.defaultAlignment||i}}render(){const e=this._make("blockquote",[this.CSS.baseClass,this.CSS.wrapper]),t=this._make("div",[this.CSS.input,this.CSS.text],{contentEditable:!this.readOnly,innerHTML:this.data.text}),n=this._make("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly,innerHTML:this.data.caption});return t.dataset.placeholder=this.quotePlaceholder,n.dataset.placeholder=this.captionPlaceholder,e.appendChild(t),e.appendChild(n),e}save(e){const t=e.querySelector(`.${this.CSS.text}`),n=e.querySelector(`.${this.CSS.caption}`);return Object.assign(this.data,{text:t.innerHTML,caption:n.innerHTML})}static get sanitize(){return{text:{br:!0},caption:{br:!0},alignment:{}}}renderSettings(){const e=e=>e[0].toUpperCase()+e.substr(1);return this.settings.map((t=>({icon:t.icon,label:this.api.i18n.t(`Align ${e(t.name)}`),onActivate:()=>this._toggleTune(t.name),isActive:this.data.alignment===t.name,closeOnActivate:!0})))}_toggleTune(e){this.data.alignment=e}_make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)o[e]=n[e];return o}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".cdx-marker{background:rgba(245,235,111,.29);padding:3px 0}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class Yt{static get CSS(){return"cdx-marker"}constructor({api:e}){this.api=e,this.button=null,this.tag="MARK",this.iconClasses={base:this.api.styles.inlineToolButton,active:this.api.styles.inlineToolButtonActive}}static get isInline(){return!0}render(){return this.button=document.createElement("button"),this.button.type="button",this.button.classList.add(this.iconClasses.base),this.button.innerHTML=this.toolboxIcon,this.button}surround(e){if(!e)return;let t=this.api.selection.findParentTag(this.tag,Yt.CSS);t?this.unwrap(t):this.wrap(e)}wrap(e){let t=document.createElement(this.tag);t.classList.add(Yt.CSS),t.appendChild(e.extractContents()),e.insertNode(t),this.api.selection.expandToTag(t)}unwrap(e){this.api.selection.expandToTag(e);let t=window.getSelection(),n=t.getRangeAt(0),o=n.extractContents();e.parentNode.removeChild(e),n.insertNode(o),t.removeAllRanges(),t.addRange(n)}checkState(){const e=this.api.selection.findParentTag(this.tag,Yt.CSS);this.button.classList.toggle(this.iconClasses.active,!!e)}get toolboxIcon(){return'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M11.3536 9.31802L12.7678 7.90381C13.5488 7.12276 14.8151 7.12276 15.5962 7.90381C16.3772 8.68486 16.3772 9.95119 15.5962 10.7322L14.182 12.1464M11.3536 9.31802L7.96729 12.7043C7.40889 13.2627 7.02827 13.9739 6.8734 14.7482L6.69798 15.6253C6.55804 16.325 7.17496 16.942 7.87468 16.802L8.75176 16.6266C9.52612 16.4717 10.2373 16.0911 10.7957 15.5327L14.182 12.1464M11.3536 9.31802L14.182 12.1464"/><line x1="15" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>'}static get sanitize(){return{mark:{class:Yt.CSS}}}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ce-delimiter{line-height:1.6em;width:100%;text-align:center}.ce-delimiter:before{display:inline-block;content:"***";font-size:30px;line-height:65px;height:30px;letter-spacing:.2em}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-code__textarea{min-height:200px;font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#41314e;line-height:1.6em;font-size:12px;background:#f8f7fa;border:1px solid #f1f1f4;box-shadow:none;white-space:pre;word-wrap:normal;overflow-x:auto;resize:vertical}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class Xt{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:e,config:t,api:n,readOnly:o}){this.api=n,this.readOnly=o,this.placeholder=this.api.i18n.t(t.placeholder||Xt.DEFAULT_PLACEHOLDER),this.CSS={baseClass:this.api.styles.block,input:this.api.styles.input,wrapper:"ce-code",textarea:"ce-code__textarea"},this.nodes={holder:null,textarea:null},this.data={code:e.code||""},this.nodes.holder=this.drawView()}drawView(){const e=document.createElement("div"),t=document.createElement("textarea");return e.classList.add(this.CSS.baseClass,this.CSS.wrapper),t.classList.add(this.CSS.textarea,this.CSS.input),t.textContent=this.data.code,t.placeholder=this.placeholder,this.readOnly&&(t.disabled=!0),e.appendChild(t),t.addEventListener("keydown",(e=>{if("Tab"===e.code)this.tabHandler(e)})),this.nodes.textarea=t,e}render(){return this.nodes.holder}save(e){return{code:e.querySelector("textarea").value}}onPaste(e){const t=e.detail.data;this.data={code:t.textContent}}get data(){return this._data}set data(e){this._data=e,this.nodes.textarea&&(this.nodes.textarea.textContent=e.code)}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 8L5 12L9 16"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 8L19 12L15 16"/></svg>',title:"Code"}}static get DEFAULT_PLACEHOLDER(){return"Enter a code"}static get pasteConfig(){return{tags:["pre"]}}static get sanitize(){return{code:!0}}tabHandler(e){e.stopPropagation(),e.preventDefault();const t=e.target,n=e.shiftKey,o=t.selectionStart,r=t.value,i=" ";let a;if(n){const e=function(e,t){let n="";for(;"\n"!==n&&t>0;)t-=1,n=e.substr(t,1);return"\n"===n&&(t+=1),t}(r,o);if(r.substr(e,2)!==i)return;t.value=r.substring(0,e)+r.substring(e+2),a=o-2}else a=o+2,t.value=r.substring(0,o)+i+r.substring(o);t.setSelectionRange(a,a)}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.embed-tool--loading .embed-tool__caption{display:none}.embed-tool--loading .embed-tool__preloader{display:block}.embed-tool--loading .embed-tool__content{display:none}.embed-tool__preloader{display:none;position:relative;height:200px;box-sizing:border-box;border-radius:5px;border:1px solid #e6e9eb}.embed-tool__preloader:before{content:"";position:absolute;z-index:3;left:50%;top:50%;width:30px;height:30px;margin-top:-25px;margin-left:-15px;border-radius:50%;border:2px solid #cdd1e0;border-top-color:#388ae5;box-sizing:border-box;animation:embed-preloader-spin 2s infinite linear}.embed-tool__url{position:absolute;bottom:20px;left:50%;transform:translate(-50%);max-width:250px;color:#7b7e89;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.embed-tool__content{width:100%}.embed-tool__caption{margin-top:7px}.embed-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.embed-tool__caption[contentEditable=true][data-placeholder]:empty:before{opacity:1}.embed-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}@keyframes embed-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();const Kt={vimeo:{regex:/(?:http[s]?:\/\/)?(?:www.)?(?:player.)?vimeo\.co(?:.+\/([^\/]\d+)(?:#t=[\d]+)?s?$)/,embedUrl:"https://player.vimeo.com/video/<%= remote_id %>?title=0&byline=0",html:'<iframe style="width:100%;" height="320" frameborder="0"></iframe>',height:320,width:580},youtube:{regex:/(?:https?:\/\/)?(?:www\.)?(?:(?:youtu\.be\/)|(?:youtube\.com)\/(?:v\/|u\/\w\/|embed\/|watch))(?:(?:\?v=)?([^#&?=]*))?((?:[?&]\w*=\w*)*)/,embedUrl:"https://www.youtube.com/embed/<%= remote_id %>",html:'<iframe style="width:100%;" height="320" frameborder="0" allowfullscreen></iframe>',height:320,width:580,id:([e,t])=>{if(!t&&e)return e;const n={start:"start",end:"end",t:"start",time_continue:"start",list:"list"};return t=t.slice(1).split("&").map((t=>{const[o,r]=t.split("=");return e||"v"!==o?!n[o]||"LL"===r||r.startsWith("RDMM")||r.startsWith("FL")?null:`${n[o]}=${r}`:(e=r,null)})).filter((e=>!!e)),e+"?"+t.join("&")}},coub:{regex:/https?:\/\/coub\.com\/view\/([^\/\?\&]+)/,embedUrl:"https://coub.com/embed/<%= remote_id %>",html:'<iframe style="width:100%;" height="320" frameborder="0" allowfullscreen></iframe>',height:320,width:580},vine:{regex:/https?:\/\/vine\.co\/v\/([^\/\?\&]+)/,embedUrl:"https://vine.co/v/<%= remote_id %>/embed/simple/",html:'<iframe style="width:100%;" height="320" frameborder="0" allowfullscreen></iframe>',height:320,width:580},imgur:{regex:/https?:\/\/(?:i\.)?imgur\.com.*\/([a-zA-Z0-9]+)(?:\.gifv)?/,embedUrl:"http://imgur.com/<%= remote_id %>/embed",html:'<iframe allowfullscreen="true" scrolling="no" id="imgur-embed-iframe-pub-<%= remote_id %>" class="imgur-embed-iframe-pub" style="height: 500px; width: 100%; border: 1px solid #000"></iframe>',height:500,width:540},gfycat:{regex:/https?:\/\/gfycat\.com(?:\/detail)?\/([a-zA-Z]+)/,embedUrl:"https://gfycat.com/ifr/<%= remote_id %>",html:"<iframe frameborder='0' scrolling='no' style=\"width:100%;\" height='436' allowfullscreen ></iframe>",height:436,width:580},"twitch-channel":{regex:/https?:\/\/www\.twitch\.tv\/([^\/\?\&]*)\/?$/,embedUrl:"https://player.twitch.tv/?channel=<%= remote_id %>",html:'<iframe frameborder="0" allowfullscreen="true" scrolling="no" height="366" style="width:100%;"></iframe>',height:366,width:600},"twitch-video":{regex:/https?:\/\/www\.twitch\.tv\/(?:[^\/\?\&]*\/v|videos)\/([0-9]*)/,embedUrl:"https://player.twitch.tv/?video=v<%= remote_id %>",html:'<iframe frameborder="0" allowfullscreen="true" scrolling="no" height="366" style="width:100%;"></iframe>',height:366,width:600},"yandex-music-album":{regex:/https?:\/\/music\.yandex\.ru\/album\/([0-9]*)\/?$/,embedUrl:"https://music.yandex.ru/iframe/#album/<%= remote_id %>/",html:'<iframe frameborder="0" style="border:none;width:540px;height:400px;" style="width:100%;" height="400"></iframe>',height:400,width:540},"yandex-music-track":{regex:/https?:\/\/music\.yandex\.ru\/album\/([0-9]*)\/track\/([0-9]*)/,embedUrl:"https://music.yandex.ru/iframe/#track/<%= remote_id %>/",html:'<iframe frameborder="0" style="border:none;width:540px;height:100px;" style="width:100%;" height="100"></iframe>',height:100,width:540,id:e=>e.join("/")},"yandex-music-playlist":{regex:/https?:\/\/music\.yandex\.ru\/users\/([^\/\?\&]*)\/playlists\/([0-9]*)/,embedUrl:"https://music.yandex.ru/iframe/#playlist/<%= remote_id %>/show/cover/description/",html:'<iframe frameborder="0" style="border:none;width:540px;height:400px;" width="540" height="400"></iframe>',height:400,width:540,id:e=>e.join("/")},codepen:{regex:/https?:\/\/codepen\.io\/([^\/\?\&]*)\/pen\/([^\/\?\&]*)/,embedUrl:"https://codepen.io/<%= remote_id %>?height=300&theme-id=0&default-tab=css,result&embed-version=2",html:"<iframe height='300' scrolling='no' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'></iframe>",height:300,width:600,id:e=>e.join("/embed/")},instagram:{regex:/https?:\/\/www\.instagram\.com\/p\/([^\/\?\&]+)\/?.*/,embedUrl:"https://www.instagram.com/p/<%= remote_id %>/embed",html:'<iframe width="400" height="505" style="margin: 0 auto;" frameborder="0" scrolling="no" allowtransparency="true"></iframe>',height:505,width:400},twitter:{regex:/^https?:\/\/(www\.)?twitter\.com\/.+\/status\/(\d+)/,embedUrl:"https://platform.twitter.com/embed/Tweet.html?id=<%= remote_id %>",html:'<iframe width="600" height="600" style="margin: 0 auto;" frameborder="0" scrolling="no" allowtransparency="true"></iframe>',height:300,width:600,id:e=>e[1]},pinterest:{regex:/https?:\/\/([^\/\?\&]*).pinterest.com\/pin\/([^\/\?\&]*)\/?$/,embedUrl:"https://assets.pinterest.com/ext/embed.html?id=<%= remote_id %>",html:"<iframe scrolling='no' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%; min-height: 400px; max-height: 1000px;'></iframe>",id:e=>e[1]},facebook:{regex:/https?:\/\/www.facebook.com\/([^\/\?\&]*)\/(.*)/,embedUrl:"https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/<%= remote_id %>&width=500",html:"<iframe scrolling='no' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%; min-height: 500px; max-height: 1000px;'></iframe>",id:e=>e.join("/")},aparat:{regex:/(?:http[s]?:\/\/)?(?:www.)?aparat\.com\/v\/([^\/\?\&]+)\/?/,embedUrl:"https://www.aparat.com/video/video/embed/videohash/<%= remote_id %>/vt/frame",html:'<iframe width="600" height="300" style="margin: 0 auto;" frameborder="0" scrolling="no" allowtransparency="true"></iframe>',height:300,width:600},miro:{regex:/https:\/\/miro.com\/\S+(\S{12})\/(\S+)?/,embedUrl:"https://miro.com/app/live-embed/<%= remote_id %>",html:'<iframe width="700" height="500" style="margin: 0 auto;" allowFullScreen frameBorder="0" scrolling="no"></iframe>'},github:{regex:/https?:\/\/gist.github.com\/([^\/\?\&]*)\/([^\/\?\&]*)/,embedUrl:'data:text/html;charset=utf-8,<head><base target="_blank" /></head><body><script src="https://gist.github.com/<%= remote_id %>" ><\/script></body>',html:'<iframe width="100%" height="350" frameborder="0" style="margin: 0 auto;"></iframe>',height:300,width:600,id:e=>`${e.join("/")}.js`}};function Qt(e,t,n){var o,r,i,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?o=setTimeout(l,t-c):(o=null,n||(s=e.apply(i,r),i=r=null))}null==t&&(t=100);var c=function(){i=this,r=arguments,a=Date.now();var c=n&&!o;return o||(o=setTimeout(l,t)),c&&(s=e.apply(i,r),i=r=null),s};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.flush=function(){o&&(s=e.apply(i,r),i=r=null,clearTimeout(o),o=null)},c}Qt.debounce=Qt;var Gt=Qt;class Zt{constructor({data:e,api:t,readOnly:n}){this.api=t,this._data={},this.element=null,this.readOnly=n,this.data=e}set data(e){if(!(e instanceof Object))throw Error("Embed Tool data should be object");const{service:t,source:n,embed:o,width:r,height:i,caption:a=""}=e;this._data={service:t||this.data.service,source:n||this.data.source,embed:o||this.data.embed,width:r||this.data.width,height:i||this.data.height,caption:a||this.data.caption||""};const s=this.element;s&&s.parentNode.replaceChild(this.render(),s)}get data(){if(this.element){const e=this.element.querySelector(`.${this.api.styles.input}`);this._data.caption=e?e.innerHTML:""}return this._data}get CSS(){return{baseClass:this.api.styles.block,input:this.api.styles.input,container:"embed-tool",containerLoading:"embed-tool--loading",preloader:"embed-tool__preloader",caption:"embed-tool__caption",url:"embed-tool__url",content:"embed-tool__content"}}render(){if(!this.data.service){const e=document.createElement("div");return this.element=e,e}const{html:e}=Zt.services[this.data.service],t=document.createElement("div"),n=document.createElement("div"),o=document.createElement("template"),r=this.createPreloader();t.classList.add(this.CSS.baseClass,this.CSS.container,this.CSS.containerLoading),n.classList.add(this.CSS.input,this.CSS.caption),t.appendChild(r),n.contentEditable=!this.readOnly,n.dataset.placeholder=this.api.i18n.t("Enter a caption"),n.innerHTML=this.data.caption||"",o.innerHTML=e,o.content.firstChild.setAttribute("src",this.data.embed),o.content.firstChild.classList.add(this.CSS.content);const i=this.embedIsReady(t);return t.appendChild(o.content.firstChild),t.appendChild(n),i.then((()=>{t.classList.remove(this.CSS.containerLoading)})),this.element=t,t}createPreloader(){const e=document.createElement("preloader"),t=document.createElement("div");return t.textContent=this.data.source,e.classList.add(this.CSS.preloader),t.classList.add(this.CSS.url),e.appendChild(t),e}save(){return this.data}onPaste(e){const{key:t,data:n}=e.detail,{regex:o,embedUrl:r,width:i,height:a,id:s=(e=>e.shift())}=Zt.services[t],l=o.exec(n).slice(1),c=r.replace(/<%= remote_id %>/g,s(l));this.data={service:t,source:n,embed:c,width:i,height:a}}static prepare({config:e={}}){const{services:t={}}=e;let n=Object.entries(Kt);const o=Object.entries(t).filter((([e,t])=>"boolean"==typeof t&&!0===t)).map((([e])=>e)),r=Object.entries(t).filter((([e,t])=>"object"==typeof t)).filter((([e,t])=>Zt.checkServiceConfig(t))).map((([e,t])=>{const{regex:n,embedUrl:o,html:r,height:i,width:a,id:s}=t;return[e,{regex:n,embedUrl:o,html:r,height:i,width:a,id:s}]}));o.length&&(n=n.filter((([e])=>o.includes(e)))),n=n.concat(r),Zt.services=n.reduce(((e,[t,n])=>t in e?(e[t]=Object.assign({},e[t],n),e):(e[t]=n,e)),{}),Zt.patterns=n.reduce(((e,[t,n])=>(e[t]=n.regex,e)),{})}static checkServiceConfig(e){const{regex:t,embedUrl:n,html:o,height:r,width:i,id:a}=e;let s=t&&t instanceof RegExp&&n&&"string"==typeof n&&o&&"string"==typeof o;return s=s&&(void 0===a||a instanceof Function),s=s&&(void 0===r||Number.isFinite(r)),s=s&&(void 0===i||Number.isFinite(i)),s}static get pasteConfig(){return{patterns:Zt.patterns}}static get isReadOnlySupported(){return!0}embedIsReady(e){let t=null;return new Promise(((n,o)=>{t=new MutationObserver(Gt.debounce(n,450)),t.observe(e,{childList:!0,subtree:!0})})).then((()=>{t.disconnect()}))}}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".inline-code{background:rgba(250,239,240,.78);color:#b44437;padding:3px 4px;border-radius:5px;margin:0 1px;font-family:inherit;font-size:.86em;font-weight:500;letter-spacing:.3px}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class Jt{static get CSS(){return"inline-code"}constructor({api:e}){this.api=e,this.button=null,this.tag="CODE",this.iconClasses={base:this.api.styles.inlineToolButton,active:this.api.styles.inlineToolButtonActive}}static get isInline(){return!0}render(){return this.button=document.createElement("button"),this.button.type="button",this.button.classList.add(this.iconClasses.base),this.button.innerHTML=this.toolboxIcon,this.button}surround(e){if(!e)return;let t=this.api.selection.findParentTag(this.tag,Jt.CSS);t?this.unwrap(t):this.wrap(e)}wrap(e){let t=document.createElement(this.tag);t.classList.add(Jt.CSS),t.appendChild(e.extractContents()),e.insertNode(t),this.api.selection.expandToTag(t)}unwrap(e){this.api.selection.expandToTag(e);let t=window.getSelection(),n=t.getRangeAt(0),o=n.extractContents();e.parentNode.removeChild(e),n.insertNode(o),t.removeAllRanges(),t.addRange(n)}checkState(){const e=this.api.selection.findParentTag(this.tag,Jt.CSS);this.button.classList.toggle(this.iconClasses.active,!!e)}get toolboxIcon(){return'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.5 8L6.11524 11.8683C6.04926 11.9437 6.04926 12.0563 6.11524 12.1317L9.5 16"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15 8L18.3848 11.8683C18.4507 11.9437 18.4507 12.0563 18.3848 12.1317L15 16"/></svg>'}static get sanitize(){return{code:{class:Jt.CSS}}}}function en(e,t,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(o[e]=n[e]);return o}function tn(e){const t=e.getBoundingClientRect();return{y1:Math.floor(t.top+window.pageYOffset),x1:Math.floor(t.left+window.pageXOffset),x2:Math.floor(t.right+window.pageXOffset),y2:Math.floor(t.bottom+window.pageYOffset)}}function nn(e,t){const n=tn(e),o=tn(t);return{fromTopBorder:o.y1-n.y1,fromLeftBorder:o.x1-n.x1,fromRightBorder:n.x2-o.x2,fromBottomBorder:n.y2-o.y2}}function on(e,t){return t.parentNode.insertBefore(e,t)}function rn(e,t=!0){const n=document.createRange(),o=window.getSelection();n.selectNodeContents(e),n.collapse(t),o.removeAllRanges(),o.addRange(n)}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.tc-wrap{--color-background:#f9f9fb;--color-text-secondary:#7b7e89;--color-border:#e8e8eb;--cell-size:34px;--toolbox-icon-size:18px;--toolbox-padding:6px;--toolbox-aiming-field-size:calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);border-left:0;position:relative;height:100%;width:100%;margin-top:var(--toolbox-icon-size);box-sizing:border-box;display:grid;grid-template-columns:calc(100% - var(--cell-size)) var(--cell-size)}.tc-wrap--readonly{grid-template-columns:100% var(--cell-size)}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px;grid-template-columns:100% var(--cell-size)}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);line-height:1.4}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{padding:4px 0;justify-content:center;border-top:1px solid var(--color-border)}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);align-items:center;padding-left:4px;position:relative}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(10px,1fr));position:relative;border-bottom:1px solid var(--color-border)}.tc-row:after{content:"";pointer-events:none;position:absolute;width:var(--cell-size);height:100%;bottom:-1px;right:calc(var(--cell-size)*-1);border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding:6px;--popover-margin:30px;--toggler-click-zone-size:30px;--toggler-dots-color:#7b7e89;--toggler-dots-color-hovered:#1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:flex;align-items:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border:#eaeaea;--color-background:#fff;--color-background-hover:rgba(232,232,235,.49);--color-background-confirm:#e24a4a;--color-background-confirm-hover:#d54040;--color-text-confirm:#fff;background:var(--color-background);border:1px solid var(--color-border);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:block;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:flex;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{transition:transform .2s ease-in;transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@keyframes menuShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class an{constructor({items:e}){this.items=e,this.wrapper=void 0,this.itemEls=[]}static get CSS(){return{popover:"tc-popover",popoverOpened:"tc-popover--opened",item:"tc-popover__item",itemHidden:"tc-popover__item--hidden",itemConfirmState:"tc-popover__item--confirm",itemIcon:"tc-popover__item-icon",itemLabel:"tc-popover__item-label"}}render(){return this.wrapper=en("div",an.CSS.popover),this.items.forEach(((e,t)=>{const n=en("div",an.CSS.item),o=en("div",an.CSS.itemIcon,{innerHTML:e.icon}),r=en("div",an.CSS.itemLabel,{textContent:e.label});n.dataset.index=t,n.appendChild(o),n.appendChild(r),this.wrapper.appendChild(n),this.itemEls.push(n)})),this.wrapper.addEventListener("click",(e=>{this.popoverClicked(e)})),this.wrapper}popoverClicked(e){const t=e.target.closest(`.${an.CSS.item}`);if(!t)return;const n=t.dataset.index,o=this.items[n];!o.confirmationRequired||this.hasConfirmationState(t)?o.onClick():this.setConfirmationState(t)}setConfirmationState(e){e.classList.add(an.CSS.itemConfirmState)}clearConfirmationState(e){e.classList.remove(an.CSS.itemConfirmState)}hasConfirmationState(e){return e.classList.contains(an.CSS.itemConfirmState)}get opened(){return this.wrapper.classList.contains(an.CSS.popoverOpened)}open(){this.items.forEach(((e,t)=>{"function"==typeof e.hideIf&&this.itemEls[t].classList.toggle(an.CSS.itemHidden,e.hideIf())})),this.wrapper.classList.add(an.CSS.popoverOpened)}close(){this.wrapper.classList.remove(an.CSS.popoverOpened),this.itemEls.forEach((e=>{this.clearConfirmationState(e)}))}}const sn='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>',ln='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>';class cn{constructor({api:e,items:t,onOpen:n,onClose:o,cssModifier:r=""}){this.api=e,this.items=t,this.onOpen=n,this.onClose=o,this.cssModifier=r,this.popover=null,this.wrapper=this.createToolbox()}static get CSS(){return{toolbox:"tc-toolbox",toolboxShowed:"tc-toolbox--showed",toggler:"tc-toolbox__toggler"}}get element(){return this.wrapper}createToolbox(){const e=en("div",[cn.CSS.toolbox,this.cssModifier?`${cn.CSS.toolbox}--${this.cssModifier}`:""]);e.dataset.mutationFree="true";const t=this.createPopover(),n=this.createToggler();return e.appendChild(n),e.appendChild(t),e}createToggler(){const e=en("div",cn.CSS.toggler,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.41 9.66H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 9.66H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.31 14.36H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 14.36H14.59"/></svg>'});return e.addEventListener("click",(()=>{this.togglerClicked()})),e}createPopover(){return this.popover=new an({items:this.items}),this.popover.render()}togglerClicked(){this.popover.opened?(this.popover.close(),this.onClose()):(this.popover.open(),this.onOpen())}show(e){const t=e();Object.entries(t).forEach((([e,t])=>{this.wrapper.style[e]=t})),this.wrapper.classList.add(cn.CSS.toolboxShowed)}hide(){this.popover.close(),this.wrapper.classList.remove(cn.CSS.toolboxShowed)}}const un="tc-wrap",dn="tc-wrap--readonly",pn="tc-table",fn="tc-row",hn="tc-table--heading",mn="tc-row--selected",gn="tc-cell",yn="tc-cell--selected",vn="tc-add-row",bn="tc-add-column";class wn{constructor(e,t,n,o){this.readOnly=e,this.api=t,this.data=n,this.config=o,this.wrapper=null,this.table=null,this.toolboxColumn=this.createColumnToolbox(),this.toolboxRow=this.createRowToolbox(),this.createTableWrapper(),this.hoveredRow=0,this.hoveredColumn=0,this.selectedRow=0,this.selectedColumn=0,this.tunes={withHeadings:!1},this.resize(),this.fill(),this.focusedCell={row:0,column:0},this.documentClicked=e=>{const t=null!==e.target.closest(`.${pn}`),n=null===e.target.closest(`.${un}`);(t||n)&&this.hideToolboxes();const o=e.target.closest(`.${vn}`),r=e.target.closest(`.${bn}`);o&&o.parentNode===this.wrapper?(this.addRow(void 0,!0),this.hideToolboxes()):r&&r.parentNode===this.wrapper&&(this.addColumn(void 0,!0),this.hideToolboxes())},this.readOnly||this.bindEvents()}getWrapper(){return this.wrapper}bindEvents(){document.addEventListener("click",this.documentClicked),this.table.addEventListener("mousemove",function(e,t){let n=0;return function(...o){const r=(new Date).getTime();if(!(r-n<e))return n=r,t(...o)}}(150,(e=>this.onMouseMoveInTable(e))),{passive:!0}),this.table.onkeypress=e=>this.onKeyPressListener(e),this.table.addEventListener("keydown",(e=>this.onKeyDownListener(e))),this.table.addEventListener("focusin",(e=>this.focusInTableListener(e)))}createColumnToolbox(){return new cn({api:this.api,cssModifier:"column",items:[{label:this.api.i18n.t("Add column to left"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.9167 14.9167L11.5833 18.25M11.5833 18.25L8.25 14.9167M11.5833 18.25L11.5833 10.0833C11.5833 9.19928 11.9345 8.35143 12.5596 7.72631C13.1848 7.10119 14.0326 6.75 14.9167 6.75"/></svg>',onClick:()=>{this.addColumn(this.selectedColumn,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Add column to right"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.13333 14.9167L12.4667 18.25M12.4667 18.25L15.8 14.9167M12.4667 18.25L12.4667 10.0833C12.4667 9.19928 12.1155 8.35143 11.4904 7.72631C10.8652 7.10119 10.0174 6.75 9.13333 6.75"/></svg>',onClick:()=>{this.addColumn(this.selectedColumn+1,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Delete column"),icon:sn,hideIf:()=>1===this.numberOfColumns,confirmationRequired:!0,onClick:()=>{this.deleteColumn(this.selectedColumn),this.hideToolboxes()}}],onOpen:()=>{this.selectColumn(this.hoveredColumn),this.hideRowToolbox()},onClose:()=>{this.unselectColumn()}})}createRowToolbox(){return new cn({api:this.api,cssModifier:"row",items:[{label:this.api.i18n.t("Add row above"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 15.8333L18.2167 12.5M18.2167 12.5L14.8833 9.16667M18.2167 12.5L10.05 12.5C9.16595 12.5 8.31811 12.8512 7.69299 13.4763C7.06787 14.1014 6.71667 14.9493 6.71667 15.8333"/></svg>',onClick:()=>{this.addRow(this.selectedRow,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Add row below"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 9.16666L18.2167 12.5M18.2167 12.5L14.8833 15.8333M18.2167 12.5H10.05C9.16594 12.5 8.31809 12.1488 7.69297 11.5237C7.06785 10.8986 6.71666 10.0507 6.71666 9.16666"/></svg>',onClick:()=>{this.addRow(this.selectedRow+1,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Delete row"),icon:sn,hideIf:()=>1===this.numberOfRows,confirmationRequired:!0,onClick:()=>{this.deleteRow(this.selectedRow),this.hideToolboxes()}}],onOpen:()=>{this.selectRow(this.hoveredRow),this.hideColumnToolbox()},onClose:()=>{this.unselectRow()}})}moveCursorToNextRow(){this.focusedCell.row!==this.numberOfRows?(this.focusedCell.row+=1,this.focusCell(this.focusedCell)):(this.addRow(),this.focusedCell.row+=1,this.focusCell(this.focusedCell),this.updateToolboxesPosition(0,0))}getCell(e,t){return this.table.querySelectorAll(`.${fn}:nth-child(${e}) .${gn}`)[t-1]}getRow(e){return this.table.querySelector(`.${fn}:nth-child(${e})`)}getRowByCell(e){return e.parentElement}getRowFirstCell(e){return e.querySelector(`.${gn}:first-child`)}setCellContent(e,t,n){this.getCell(e,t).innerHTML=n}addColumn(e=-1,t=!1){let n=this.numberOfColumns;for(let o=1;o<=this.numberOfRows;o++){let r;const i=this.createCell();if(e>0&&e<=n?(r=this.getCell(o,e),on(i,r)):r=this.getRow(o).appendChild(i),1===o){const r=this.getCell(o,e>0?e:n+1);r&&t&&rn(r)}}this.addHeadingAttrToFirstRow()}addRow(e=-1,t=!1){let n,o=en("div",fn);this.tunes.withHeadings&&this.removeHeadingAttrFromFirstRow();let r=this.numberOfColumns;if(e>0&&e<=this.numberOfRows){n=on(o,this.getRow(e))}else n=this.table.appendChild(o);this.fillRow(n,r),this.tunes.withHeadings&&this.addHeadingAttrToFirstRow();const i=this.getRowFirstCell(n);return i&&t&&rn(i),n}deleteColumn(e){for(let t=1;t<=this.numberOfRows;t++){const n=this.getCell(t,e);if(!n)return;n.remove()}}deleteRow(e){this.getRow(e).remove(),this.addHeadingAttrToFirstRow()}createTableWrapper(){if(this.wrapper=en("div",un),this.table=en("div",pn),this.readOnly&&this.wrapper.classList.add(dn),this.wrapper.appendChild(this.toolboxRow.element),this.wrapper.appendChild(this.toolboxColumn.element),this.wrapper.appendChild(this.table),!this.readOnly){const e=en("div",bn,{innerHTML:ln}),t=en("div",vn,{innerHTML:ln});this.wrapper.appendChild(e),this.wrapper.appendChild(t)}}computeInitialSize(){const e=this.data&&this.data.content,t=Array.isArray(e),n=!!t&&e.length,o=t?e.length:void 0,r=n?e[0].length:void 0,i=Number.parseInt(this.config&&this.config.rows),a=Number.parseInt(this.config&&this.config.cols),s=!isNaN(i)&&i>0?i:void 0,l=!isNaN(a)&&a>0?a:void 0;return{rows:o||s||2,cols:r||l||2}}resize(){const{rows:e,cols:t}=this.computeInitialSize();for(let t=0;t<e;t++)this.addRow();for(let e=0;e<t;e++)this.addColumn()}fill(){const e=this.data;if(e&&e.content)for(let t=0;t<e.content.length;t++)for(let n=0;n<e.content[t].length;n++)this.setCellContent(t+1,n+1,e.content[t][n])}fillRow(e,t){for(let n=1;n<=t;n++){const t=this.createCell();e.appendChild(t)}}createCell(){return en("div",gn,{contentEditable:!this.readOnly})}get numberOfRows(){return this.table.childElementCount}get numberOfColumns(){return this.numberOfRows?this.table.querySelectorAll(`.${fn}:first-child .${gn}`).length:0}get isColumnMenuShowing(){return 0!==this.selectedColumn}get isRowMenuShowing(){return 0!==this.selectedRow}onMouseMoveInTable(e){const{row:t,column:n}=this.getHoveredCell(e);this.hoveredColumn=n,this.hoveredRow=t,this.updateToolboxesPosition()}onKeyPressListener(e){if("Enter"===e.key){if(e.shiftKey)return!0;this.moveCursorToNextRow()}return"Enter"!==e.key}onKeyDownListener(e){"Tab"===e.key&&e.stopPropagation()}focusInTableListener(e){const t=e.target,n=this.getRowByCell(t);this.focusedCell={row:Array.from(this.table.querySelectorAll(`.${fn}`)).indexOf(n)+1,column:Array.from(n.querySelectorAll(`.${gn}`)).indexOf(t)+1}}hideToolboxes(){this.hideRowToolbox(),this.hideColumnToolbox(),this.updateToolboxesPosition()}hideRowToolbox(){this.unselectRow(),this.toolboxRow.hide()}hideColumnToolbox(){this.unselectColumn(),this.toolboxColumn.hide()}focusCell(){this.focusedCellElem.focus()}get focusedCellElem(){const{row:e,column:t}=this.focusedCell;return this.getCell(e,t)}updateToolboxesPosition(e=this.hoveredRow,t=this.hoveredColumn){this.isColumnMenuShowing||t>0&&t<=this.numberOfColumns&&this.toolboxColumn.show((()=>({left:`calc((100% - var(--cell-size)) / (${this.numberOfColumns} * 2) * (1 + (${t} - 1) * 2))`}))),this.isRowMenuShowing||e>0&&e<=this.numberOfRows&&this.toolboxRow.show((()=>{const t=this.getRow(e),{fromTopBorder:n}=nn(this.table,t),{height:o}=t.getBoundingClientRect();return{top:`${Math.ceil(n+o/2)}px`}}))}setHeadingsSetting(e){this.tunes.withHeadings=e,e?(this.table.classList.add(hn),this.addHeadingAttrToFirstRow()):(this.table.classList.remove(hn),this.removeHeadingAttrFromFirstRow())}addHeadingAttrToFirstRow(){for(let e=1;e<=this.numberOfColumns;e++){let t=this.getCell(1,e);t&&t.setAttribute("heading",this.api.i18n.t("Heading"))}}removeHeadingAttrFromFirstRow(){for(let e=1;e<=this.numberOfColumns;e++){let t=this.getCell(1,e);t&&t.removeAttribute("heading")}}selectRow(e){const t=this.getRow(e);t&&(this.selectedRow=e,t.classList.add(mn))}unselectRow(){if(this.selectedRow<=0)return;const e=this.table.querySelector(`.${mn}`);e&&e.classList.remove(mn),this.selectedRow=0}selectColumn(e){for(let t=1;t<=this.numberOfRows;t++){const n=this.getCell(t,e);n&&n.classList.add(yn)}this.selectedColumn=e}unselectColumn(){if(this.selectedColumn<=0)return;let e=this.table.querySelectorAll(`.${yn}`);Array.from(e).forEach((e=>{e.classList.remove(yn)})),this.selectedColumn=0}getHoveredCell(e){let t=this.hoveredRow,n=this.hoveredColumn;const{width:o,height:r,x:i,y:a}=function(e,t){const n=e.getBoundingClientRect(),{width:o,height:r,x:i,y:a}=n,{clientX:s,clientY:l}=t;return{width:o,height:r,x:s-i,y:l-a}}(this.table,e);return i>=0&&(n=this.binSearch(this.numberOfColumns,(e=>this.getCell(1,e)),(({fromLeftBorder:e})=>i<e),(({fromRightBorder:e})=>i>o-e))),a>=0&&(t=this.binSearch(this.numberOfRows,(e=>this.getCell(e,1)),(({fromTopBorder:e})=>a<e),(({fromBottomBorder:e})=>a>r-e))),{row:t||this.hoveredRow,column:n||this.hoveredColumn}}binSearch(e,t,n,o){let r,i=0,a=e+1,s=0;for(;i<a-1&&s<10;){r=Math.ceil((i+a)/2);const e=t(r),l=nn(this.table,e);if(n(l))a=r;else{if(!o(l))break;i=r}s++}return r}getData(){const e=[];for(let t=1;t<=this.numberOfRows;t++){const n=this.table.querySelector(`.${fn}:nth-child(${t})`),o=Array.from(n.querySelectorAll(`.${gn}`));o.every((e=>!e.textContent.trim()))||e.push(o.map((e=>e.innerHTML)))}return e}destroy(){document.removeEventListener("click",this.documentClicked)}}var kn=__webpack_require__(8606),xn=__webpack_require__.n(kn),Sn=__webpack_require__(8402),En=__webpack_require__.n(Sn),Cn=__webpack_require__(9968),_n=__webpack_require__.n(Cn),Tn=__webpack_require__(2185),On=__webpack_require__.n(Tn),Pn=__webpack_require__(9660),Mn=__webpack_require__.n(Pn);window.EditorJS=class{static get version(){return"2.29.1"}constructor(e){let t=()=>{};v(e)&&y(e.onReady)&&(t=e.onReady);const n=new Pt(e);this.isReady=n.isReady.then((()=>{this.exportAPI(n),t()}))}exportAPI(e){["configuration"].forEach((t=>{this[t]=e[t]})),this.destroy=()=>{Object.values(e.moduleInstances).forEach((e=>{y(e.destroy)&&e.destroy(),e.listeners.removeAll()})),null==me||me.destroy(),me=null,e=null;for(const e in this)Object.prototype.hasOwnProperty.call(this,e)&&delete this[e];Object.setPrototypeOf(this,null)},Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach((([t,n])=>{Object.entries(n).forEach((([n,o])=>{this[o]=e.moduleInstances.API.methods[t][n]}))}))}},window.Header=class{constructor({data:e,config:t,api:n,readOnly:o}){this.api=n,this.readOnly=o,this._CSS={block:this.api.styles.block,wrapper:"ce-header"},this._settings=t,this._data=this.normalizeData(e),this._element=this.getTag()}normalizeData(e){const t={};return"object"!=typeof e&&(e={}),t.text=e.text||"",t.level=parseInt(e.level)||this.defaultLevel.number,t}render(){return this._element}renderSettings(){return this.levels.map((e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number})))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){const t={text:this.data.text+e.text,level:this.data.level};this.data=t}validate(e){return""!==e.text.trim()}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),void 0!==e.level&&this._element.parentNode){const e=this.getTag();e.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(e,this._element),this._element=e}void 0!==e.text&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.classList.add(this._CSS.wrapper),e.contentEditable=this.readOnly?"false":"true",e.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),e}get currentLevel(){let e=this.levels.find((e=>e.number===this._data.level));return e||(e=this.defaultLevel),e}get defaultLevel(){if(this._settings.defaultLevel){const e=this.levels.find((e=>e.number===this._settings.defaultLevel));if(e)return e;console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels")}return this.levels[1]}get levels(){const e=[{number:1,tag:"H1",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17V10.2135C19 10.1287 18.9011 10.0824 18.836 10.1367L16 12.5"/></svg>'},{number:2,tag:"H2",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10 19 9.5 19 12C19 13.9771 16.0684 13.9997 16.0012 16.8981C15.9999 16.9533 16.0448 17 16.1 17L19.3 17"/></svg>'},{number:3,tag:"H3",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10.5 16.8323 10 17.6 10C18.3677 10 19.5 10.311 19.5 11.5C19.5 12.5315 18.7474 12.9022 18.548 12.9823C18.5378 12.9864 18.5395 13.0047 18.5503 13.0063C18.8115 13.0456 20 13.3065 20 14.8C20 16 19.5 17 17.8 17C17.8 17 16 17 16 16.3"/></svg>'},{number:4,tag:"H4",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 10L15.2834 14.8511C15.246 14.9178 15.294 15 15.3704 15C16.8489 15 18.7561 15 20.2 15M19 17C19 15.7187 19 14.8813 19 13.6"/></svg>'},{number:5,tag:"H5",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 15.9C16 15.9 16.3768 17 17.8 17C19.5 17 20 15.6199 20 14.7C20 12.7323 17.6745 12.0486 16.1635 12.9894C16.094 13.0327 16 12.9846 16 12.9027V10.1C16 10.0448 16.0448 10 16.1 10H19.8"/></svg>'},{number:6,tag:"H6",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19.5 10C16.5 10.5 16 13.3285 16 15M16 15V15C16 16.1046 16.8954 17 18 17H18.3246C19.3251 17 20.3191 16.3492 20.2522 15.3509C20.0612 12.4958 16 12.6611 16 15Z"/></svg>'}];return this._settings.levels?e.filter((e=>this._settings.levels.includes(e.number))):e}onPaste(e){const t=e.detail.data;let n=this.defaultLevel.number;switch(t.tagName){case"H1":n=1;break;case"H2":n=2;break;case"H3":n=3;break;case"H4":n=4;break;case"H5":n=5;break;case"H6":n=6}this._settings.levels&&(n=this._settings.levels.reduce(((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e))),this.data={level:n,text:t.innerHTML}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 7L9 12M9 17V12M9 12L15 12M15 7V12M15 17L15 12"/></svg>',title:"Heading"}}},window.ImageTool=Nt,window.NestedList=$t,window.Quote=Wt,window.Marker=Yt,window.Delimiter=class{static get isReadOnlySupported(){return!0}static get contentless(){return!0}constructor({data:e,config:t,api:n}){this.api=n,this._CSS={block:this.api.styles.block,wrapper:"ce-delimiter"},this._data={},this._element=this.drawView(),this.data=e}drawView(){let e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e}render(){return this._element}save(e){return{}}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="6" x2="10" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="14" x2="18" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',title:"Delimiter"}}},window.CodeTool=Xt,window.Embed=Zt,window.InlineCode=Jt,window.Table=class{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:e,config:t,api:n,readOnly:o}){this.api=n,this.readOnly=o,this.config=t,this.data={withHeadings:this.getConfig("withHeadings",!1,e),content:e&&e.content?e.content:[]},this.table=null}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>',title:"Table"}}render(){return this.table=new wn(this.readOnly,this.api,this.data,this.config),this.container=en("div",this.api.styles.block),this.container.appendChild(this.table.getWrapper()),this.table.setHeadingsSetting(this.data.withHeadings),this.container}renderSettings(){return[{label:this.api.i18n.t("With headings"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>',isActive:this.data.withHeadings,closeOnActivate:!0,toggle:!0,onActivate:()=>{this.data.withHeadings=!0,this.table.setHeadingsSetting(this.data.withHeadings)}},{label:this.api.i18n.t("Without headings"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M14 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><path stroke="currentColor" stroke-width="2" d="M5 14H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>',isActive:!this.data.withHeadings,closeOnActivate:!0,toggle:!0,onActivate:()=>{this.data.withHeadings=!1,this.table.setHeadingsSetting(this.data.withHeadings)}}]}save(){const e=this.table.getData();return{withHeadings:this.data.withHeadings,content:e}}destroy(){this.table.destroy()}getConfig(e,t=void 0,n=void 0){const o=this.data||n;return o?o[e]?o[e]:t:this.config&&this.config[e]?this.config[e]:t}static get pasteConfig(){return{tags:["TABLE","TR","TH","TD"]}}onPaste(e){const t=e.detail.data,n=t.querySelector(":scope > thead, tr:first-of-type th"),o=Array.from(t.querySelectorAll("tr")).map((e=>Array.from(e.querySelectorAll("th, td")).map((e=>e.innerHTML))));this.data={withHeadings:null!==n,content:o},this.table.wrapper&&this.table.wrapper.replaceWith(this.render())}},window.AlignmentTuneTool=xn(),window.AttachesTool=En(),window.Hyperlink=_n(),window.VideoTool=On(),window.ImageGallery=Mn()})(),window.wonder=__webpack_exports__})();
3
+ //# sourceMappingURL=editor.js.map